Skip to content

Commit a346c66

Browse files
authored
docs: fix metafield and metaobject definition intent docs (#3646)
## Description Updates the documentation for Metafield Definition and Metaobject Definition intents to include the correct data parameters: - Adds `{ ownerType: 'Product' }` as the data parameter for Metafield Definition create and edit actions - Replaces the value parameter with a data parameter `{ type: 'my_metaobject_definition_type' }` for Metaobject Definition edit action - Updates the corresponding example code for editing a Metaobject Definition to use the data parameter instead of the value parameter ## 🎩 - Verify that the updated documentation accurately reflects the expected parameters for these intents - Confirm that the example code works correctly with the new parameter structure ## Checklist - [ ] I have 🎩'd these changes - [ ] I have updated relevant documentation
2 parents 07ecfdf + c236f3d commit a346c66

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/ui-extensions/src/surfaces/admin/api/intents/examples/edit-metafield-definition.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const {intents} = useApi(TARGET);
22

33
const activity = await intents.invoke('edit:shopify/MetafieldDefinition', {
44
value: 'gid://shopify/MetafieldDefinition/123456789',
5+
data: {ownerType: 'product'},
56
});
67

78
const response = await activity.complete;

packages/ui-extensions/src/surfaces/admin/api/intents/examples/edit-metaobject-definition.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const {intents} = useApi(TARGET);
22

33
const activity = await intents.invoke('edit:shopify/MetaobjectDefinition', {
4-
value: 'gid://shopify/MetaobjectDefinition/123456789',
4+
data: {type: 'my_metaobject_definition_type'},
55
});
66

77
const response = await activity.complete;

packages/ui-extensions/src/surfaces/admin/api/intents/intents.doc.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ Where:
8383
### Metafield Definition
8484
| Action | Type | Value | Data |
8585
|--------|------|-------|------|
86-
| \`create\` | \`shopify/MetafieldDefinition\` | — | |
87-
| \`edit\` | \`shopify/MetafieldDefinition\` | \`gid://shopify/MetafieldDefinition/{id}\` | |
86+
| \`create\` | \`shopify/MetafieldDefinition\` | — | { ownerType: 'Product' } |
87+
| \`edit\` | \`shopify/MetafieldDefinition\` | \`gid://shopify/MetafieldDefinition/{id}\` | { ownerType: 'Product' } |
8888
8989
### Metaobject
9090
| Action | Type | Value | Data |
@@ -96,7 +96,7 @@ Where:
9696
| Action | Type | Value | Data |
9797
|--------|------|-------|------|
9898
| \`create\` | \`shopify/MetaobjectDefinition\` | — | — |
99-
| \`edit\` | \`shopify/MetaobjectDefinition\` | \`gid://shopify/MetaobjectDefinition/{id}\` | |
99+
| \`edit\` | \`shopify/MetaobjectDefinition\` | | { type: 'my_metaobject_definition_type' } |
100100
101101
### Page
102102
| Action | Type | Value | Data |

0 commit comments

Comments
 (0)