n8n-nodes-shopify-custom 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -0
- package/README.md +68 -0
- package/dist/credentials/ShopifyCustomAdminApi.credentials.d.ts +10 -0
- package/dist/credentials/ShopifyCustomAdminApi.credentials.js +65 -0
- package/dist/credentials/ShopifyCustomAdminApi.credentials.js.map +1 -0
- package/dist/icons/shopify.dark.svg +12 -0
- package/dist/icons/shopify.svg +12 -0
- package/dist/nodes/ShopifyCustom/ShopifyCustom.node.d.ts +15 -0
- package/dist/nodes/ShopifyCustom/ShopifyCustom.node.js +358 -0
- package/dist/nodes/ShopifyCustom/ShopifyCustom.node.js.map +1 -0
- package/dist/nodes/ShopifyCustom/ShopifyCustom.node.json +18 -0
- package/dist/nodes/ShopifyCustom/config/operations/collection.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/collection.js +306 -0
- package/dist/nodes/ShopifyCustom/config/operations/collection.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/common.d.ts +13 -0
- package/dist/nodes/ShopifyCustom/config/operations/common.js +222 -0
- package/dist/nodes/ShopifyCustom/config/operations/common.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/customer.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/customer.js +107 -0
- package/dist/nodes/ShopifyCustom/config/operations/customer.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/draftOrder.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/draftOrder.js +118 -0
- package/dist/nodes/ShopifyCustom/config/operations/draftOrder.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/index.d.ts +7 -0
- package/dist/nodes/ShopifyCustom/config/operations/index.js +48 -0
- package/dist/nodes/ShopifyCustom/config/operations/index.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/metafieldDefinition.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/metafieldDefinition.js +192 -0
- package/dist/nodes/ShopifyCustom/config/operations/metafieldDefinition.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/metafieldValue.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/metafieldValue.js +125 -0
- package/dist/nodes/ShopifyCustom/config/operations/metafieldValue.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/metaobject.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/metaobject.js +198 -0
- package/dist/nodes/ShopifyCustom/config/operations/metaobject.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/order.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/order.js +111 -0
- package/dist/nodes/ShopifyCustom/config/operations/order.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/product.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/product.js +118 -0
- package/dist/nodes/ShopifyCustom/config/operations/product.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/productVariant.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/productVariant.js +109 -0
- package/dist/nodes/ShopifyCustom/config/operations/productVariant.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/service.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/config/operations/service.js +14 -0
- package/dist/nodes/ShopifyCustom/config/operations/service.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/operations/types.d.ts +13 -0
- package/dist/nodes/ShopifyCustom/config/operations/types.js +3 -0
- package/dist/nodes/ShopifyCustom/config/operations/types.js.map +1 -0
- package/dist/nodes/ShopifyCustom/config/resources.d.ts +9 -0
- package/dist/nodes/ShopifyCustom/config/resources.js +62 -0
- package/dist/nodes/ShopifyCustom/config/resources.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/collections/ruleConditions.d.ts +17 -0
- package/dist/nodes/ShopifyCustom/shared/collections/ruleConditions.js +281 -0
- package/dist/nodes/ShopifyCustom/shared/collections/ruleConditions.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/errors.d.ts +8 -0
- package/dist/nodes/ShopifyCustom/shared/errors.js +37 -0
- package/dist/nodes/ShopifyCustom/shared/errors.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/client.d.ts +26 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/client.js +73 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/client.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/registry.d.ts +17 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/registry.js +962 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/registry.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/collection.d.ts +5 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/collection.js +99 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/collection.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/commonFragments.d.ts +7 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/commonFragments.js +69 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/commonFragments.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/customer.d.ts +5 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/customer.js +94 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/customer.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/draftOrder.d.ts +5 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/draftOrder.js +91 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/draftOrder.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/metafields.d.ts +10 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/metafields.js +223 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/metafields.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/metaobject.d.ts +5 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/metaobject.js +92 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/metaobject.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/order.d.ts +5 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/order.js +95 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/order.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/product.d.ts +5 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/product.js +107 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/product.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/productVariant.d.ts +5 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/productVariant.js +99 -0
- package/dist/nodes/ShopifyCustom/shared/graphql/templates/productVariant.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/definitions.d.ts +24 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/definitions.js +65 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/definitions.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/ownerTypeMap.d.ts +3 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/ownerTypeMap.js +19 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/ownerTypeMap.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/referenceLoaders.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/referenceLoaders.js +122 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/referenceLoaders.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/types.d.ts +17 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/types.js +57 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/types.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/uiFactory.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/uiFactory.js +395 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/uiFactory.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/constants.d.ts +20 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/constants.js +61 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/constants.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/index.d.ts +3 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/index.js +43 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/index.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/list.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/list.js +103 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/list.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/reference.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/reference.js +80 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/reference.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/scalar.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/scalar.js +110 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/scalar.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/structured.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/structured.js +64 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/structured.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valuePayload.d.ts +3 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valuePayload.js +89 -0
- package/dist/nodes/ShopifyCustom/shared/metafields/valuePayload.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/output/outputMapper.d.ts +3 -0
- package/dist/nodes/ShopifyCustom/shared/output/outputMapper.js +82 -0
- package/dist/nodes/ShopifyCustom/shared/output/outputMapper.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shared/themes/templateSuffixes.d.ts +2 -0
- package/dist/nodes/ShopifyCustom/shared/themes/templateSuffixes.js +83 -0
- package/dist/nodes/ShopifyCustom/shared/themes/templateSuffixes.js.map +1 -0
- package/dist/nodes/ShopifyCustom/shopify.dark.svg +12 -0
- package/dist/nodes/ShopifyCustom/shopify.svg +12 -0
- package/dist/package.json +62 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.METAOBJECT_OPERATION_CONFIGS = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
const METAOBJECT_SORT_OPTIONS = [
|
|
6
|
+
{ name: 'Display Name', value: 'display_name' },
|
|
7
|
+
{ name: 'ID', value: 'id' },
|
|
8
|
+
{ name: 'Type', value: 'type' },
|
|
9
|
+
{ name: 'Updated At', value: 'updated_at' },
|
|
10
|
+
];
|
|
11
|
+
const METAOBJECT_FIELDS_COLLECTION = {
|
|
12
|
+
displayName: 'Fields',
|
|
13
|
+
name: 'metaobjectFields',
|
|
14
|
+
type: 'fixedCollection',
|
|
15
|
+
typeOptions: {
|
|
16
|
+
multipleValues: true,
|
|
17
|
+
},
|
|
18
|
+
default: {},
|
|
19
|
+
options: [
|
|
20
|
+
{
|
|
21
|
+
name: 'items',
|
|
22
|
+
displayName: 'Field',
|
|
23
|
+
values: [
|
|
24
|
+
{
|
|
25
|
+
displayName: 'Key',
|
|
26
|
+
name: 'key',
|
|
27
|
+
type: 'string',
|
|
28
|
+
default: '',
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
displayName: 'Value',
|
|
33
|
+
name: 'value',
|
|
34
|
+
type: 'string',
|
|
35
|
+
default: '',
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
};
|
|
42
|
+
function metaobjectCreateFields() {
|
|
43
|
+
return [
|
|
44
|
+
{
|
|
45
|
+
displayName: 'Type',
|
|
46
|
+
name: 'metaobjectType',
|
|
47
|
+
type: 'string',
|
|
48
|
+
default: '',
|
|
49
|
+
required: true,
|
|
50
|
+
description: 'Metaobject definition type',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
displayName: 'Handle',
|
|
54
|
+
name: 'handle',
|
|
55
|
+
type: 'string',
|
|
56
|
+
default: '',
|
|
57
|
+
},
|
|
58
|
+
METAOBJECT_FIELDS_COLLECTION,
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
function metaobjectGetManyFields() {
|
|
62
|
+
return [
|
|
63
|
+
{
|
|
64
|
+
displayName: 'Type',
|
|
65
|
+
name: 'metaobjectType',
|
|
66
|
+
type: 'string',
|
|
67
|
+
default: '',
|
|
68
|
+
required: true,
|
|
69
|
+
description: 'Metaobject definition type',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
displayName: 'Get All',
|
|
73
|
+
name: 'getAll',
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
default: true,
|
|
76
|
+
description: 'Whether to fetch all pages',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
displayName: 'Limit',
|
|
80
|
+
name: 'limit',
|
|
81
|
+
type: 'number',
|
|
82
|
+
description: 'Max number of results to return',
|
|
83
|
+
default: 50,
|
|
84
|
+
typeOptions: {
|
|
85
|
+
minValue: 1,
|
|
86
|
+
maxValue: 250,
|
|
87
|
+
},
|
|
88
|
+
displayOptions: {
|
|
89
|
+
show: {
|
|
90
|
+
getAll: [false],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
displayName: 'Options',
|
|
96
|
+
name: 'paginationOptions',
|
|
97
|
+
type: 'collection',
|
|
98
|
+
placeholder: 'Add option',
|
|
99
|
+
default: {},
|
|
100
|
+
options: [
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Cursor',
|
|
103
|
+
name: 'afterCursor',
|
|
104
|
+
type: 'string',
|
|
105
|
+
default: '',
|
|
106
|
+
description: 'Use to continue from a specific cursor',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
displayName: 'Query',
|
|
110
|
+
name: 'query',
|
|
111
|
+
type: 'string',
|
|
112
|
+
default: '',
|
|
113
|
+
description: 'Search query for metaobjects',
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
displayName: 'Reverse',
|
|
117
|
+
name: 'reverse',
|
|
118
|
+
type: 'boolean',
|
|
119
|
+
default: false,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
displayName: 'Sort By',
|
|
123
|
+
name: 'sortKey',
|
|
124
|
+
type: 'options',
|
|
125
|
+
options: METAOBJECT_SORT_OPTIONS,
|
|
126
|
+
default: 'updated_at',
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
},
|
|
130
|
+
];
|
|
131
|
+
}
|
|
132
|
+
exports.METAOBJECT_OPERATION_CONFIGS = [
|
|
133
|
+
{
|
|
134
|
+
resource: 'metaobject',
|
|
135
|
+
value: 'create',
|
|
136
|
+
name: 'Create',
|
|
137
|
+
description: 'Create a metaobject',
|
|
138
|
+
registryKey: 'metaobject.create',
|
|
139
|
+
fields: metaobjectCreateFields(),
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
resource: 'metaobject',
|
|
143
|
+
value: 'get',
|
|
144
|
+
name: 'Get',
|
|
145
|
+
description: 'Get a metaobject by ID',
|
|
146
|
+
registryKey: 'metaobject.get',
|
|
147
|
+
fields: [(0, common_1.gidField)('metaobjectId', 'Metaobject ID', 'Global metaobject ID in Shopify')],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
resource: 'metaobject',
|
|
151
|
+
value: 'getMany',
|
|
152
|
+
name: 'Get Many',
|
|
153
|
+
description: 'Get many metaobjects by type',
|
|
154
|
+
registryKey: 'metaobject.getMany',
|
|
155
|
+
fields: metaobjectGetManyFields(),
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
resource: 'metaobject',
|
|
159
|
+
value: 'update',
|
|
160
|
+
name: 'Update',
|
|
161
|
+
description: 'Update a metaobject',
|
|
162
|
+
registryKey: 'metaobject.update',
|
|
163
|
+
fields: [
|
|
164
|
+
(0, common_1.gidField)('metaobjectId', 'Metaobject ID', 'Global metaobject ID in Shopify'),
|
|
165
|
+
{
|
|
166
|
+
displayName: 'Handle',
|
|
167
|
+
name: 'handle',
|
|
168
|
+
type: 'string',
|
|
169
|
+
default: '',
|
|
170
|
+
},
|
|
171
|
+
METAOBJECT_FIELDS_COLLECTION,
|
|
172
|
+
{
|
|
173
|
+
displayName: 'Options',
|
|
174
|
+
name: 'metaobjectOptions',
|
|
175
|
+
type: 'collection',
|
|
176
|
+
placeholder: 'Add option',
|
|
177
|
+
default: {},
|
|
178
|
+
options: [
|
|
179
|
+
{
|
|
180
|
+
displayName: 'Redirect New Handle',
|
|
181
|
+
name: 'redirectNewHandle',
|
|
182
|
+
type: 'boolean',
|
|
183
|
+
default: false,
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
],
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
resource: 'metaobject',
|
|
191
|
+
value: 'delete',
|
|
192
|
+
name: 'Delete',
|
|
193
|
+
description: 'Delete a metaobject',
|
|
194
|
+
registryKey: 'metaobject.delete',
|
|
195
|
+
fields: [(0, common_1.gidField)('metaobjectId', 'Metaobject ID', 'Global metaobject ID in Shopify')],
|
|
196
|
+
},
|
|
197
|
+
];
|
|
198
|
+
//# sourceMappingURL=metaobject.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metaobject.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/metaobject.ts"],"names":[],"mapp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AAK;qBACd;iBACD;aACD;SACD;KACD;IACD;QACC,QAAQ,EAAE,YAAY;QACtB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,qBAAqB;QAClC,WAAW,EAAE,mBAAmB;QAChC,MAAM,EAAE,CAAC,IAAA,iBAAQ,EAAC,cAAc,EAAE,eAAe,EAAE,iCAAiC,CAAC,CAAC;KACtF;CACD,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ORDER_OPERATION_CONFIGS = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
const ORDER_SORT_OPTIONS = [
|
|
6
|
+
{ name: 'Processed At', value: 'PROCESSED_AT' },
|
|
7
|
+
{ name: 'Created At', value: 'CREATED_AT' },
|
|
8
|
+
{ name: 'Updated At', value: 'UPDATED_AT' },
|
|
9
|
+
{ name: 'Order Number', value: 'ORDER_NUMBER' },
|
|
10
|
+
];
|
|
11
|
+
const lineItemsField = {
|
|
12
|
+
displayName: 'Line Items',
|
|
13
|
+
name: 'lineItems',
|
|
14
|
+
type: 'fixedCollection',
|
|
15
|
+
typeOptions: {
|
|
16
|
+
multipleValues: true,
|
|
17
|
+
},
|
|
18
|
+
default: {},
|
|
19
|
+
options: [
|
|
20
|
+
{
|
|
21
|
+
name: 'items',
|
|
22
|
+
displayName: 'Item',
|
|
23
|
+
values: [
|
|
24
|
+
{
|
|
25
|
+
displayName: 'Variant ID',
|
|
26
|
+
name: 'variantId',
|
|
27
|
+
type: 'string',
|
|
28
|
+
default: '',
|
|
29
|
+
required: true,
|
|
30
|
+
description: 'Global product variant ID',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Quantity',
|
|
34
|
+
name: 'quantity',
|
|
35
|
+
type: 'number',
|
|
36
|
+
default: 1,
|
|
37
|
+
typeOptions: {
|
|
38
|
+
minValue: 1,
|
|
39
|
+
},
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
};
|
|
46
|
+
function orderBaseFields() {
|
|
47
|
+
return [
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Email',
|
|
50
|
+
name: 'email',
|
|
51
|
+
type: 'string',
|
|
52
|
+
placeholder: 'name@email.com',
|
|
53
|
+
default: '',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
displayName: 'Note',
|
|
57
|
+
name: 'note',
|
|
58
|
+
type: 'string',
|
|
59
|
+
typeOptions: {
|
|
60
|
+
rows: 4,
|
|
61
|
+
},
|
|
62
|
+
default: '',
|
|
63
|
+
},
|
|
64
|
+
common_1.TAGS_FIELD,
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
exports.ORDER_OPERATION_CONFIGS = [
|
|
68
|
+
{
|
|
69
|
+
resource: 'order',
|
|
70
|
+
value: 'create',
|
|
71
|
+
name: 'Create',
|
|
72
|
+
description: 'Create an order',
|
|
73
|
+
registryKey: 'order.create',
|
|
74
|
+
fields: [...orderBaseFields(), lineItemsField],
|
|
75
|
+
supportsMetafields: true,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
resource: 'order',
|
|
79
|
+
value: 'get',
|
|
80
|
+
name: 'Get',
|
|
81
|
+
description: 'Get an order by ID',
|
|
82
|
+
registryKey: 'order.get',
|
|
83
|
+
fields: [(0, common_1.gidField)('orderId', 'Order ID', 'Global order ID in Shopify'), ...(0, common_1.readMetafieldsFields)()],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
resource: 'order',
|
|
87
|
+
value: 'getMany',
|
|
88
|
+
name: 'Get Many',
|
|
89
|
+
description: 'Get many orders',
|
|
90
|
+
registryKey: 'order.getMany',
|
|
91
|
+
fields: (0, common_1.paginationFields)(ORDER_SORT_OPTIONS),
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
resource: 'order',
|
|
95
|
+
value: 'update',
|
|
96
|
+
name: 'Update',
|
|
97
|
+
description: 'Update an order',
|
|
98
|
+
registryKey: 'order.update',
|
|
99
|
+
fields: [(0, common_1.gidField)('orderId', 'Order ID', 'Global order ID in Shopify'), ...orderBaseFields()],
|
|
100
|
+
supportsMetafields: true,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
resource: 'order',
|
|
104
|
+
value: 'delete',
|
|
105
|
+
name: 'Delete',
|
|
106
|
+
description: 'Delete an order',
|
|
107
|
+
registryKey: 'order.delete',
|
|
108
|
+
fields: [(0, common_1.gidField)('orderId', 'Order ID', 'Global order ID in Shopify')],
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
//# sourceMappingURL=order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/order.ts"],"names":[],"mappings":";;;AACA,qCAAwF;AAGxF,MAAM,kBAAkB,GAAG;IAC1B,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;IAC/C,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;CAC/C,CAAC;AAEF,MAAM,cAAc,GAAoB;IACvC,WAAW,EAAE,YAAY;IACzB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;QACZ,cAAc,EAAE,IAAI;KACpB;IACD,OAAO,EAAE,EAAE;IACX,OAAO,EAAE;QACR;YACC,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,MAAM;YACnB,MAAM,EAAE;gBACP;oBACC,WAAW,EAAE,YAAY;oBACzB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,QAAQ;oBACd,O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AAE,iBAAiB;QAC9B,WAAW,EAAE,eAAe;QAC5B,MAAM,EAAE,IAAA,yBAAgB,EAAC,kBAAkB,CAAC;KAC5C;IACD;QACC,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,cAAc;QAC3B,MAAM,EAAE,CAAC,IAAA,iBAAQ,EAAC,SAAS,EAAE,UAAU,EAAE,4BAA4B,CAAC,EAAE,GAAG,eAAe,EAAE,CAAC;QAC7F,kBAAkB,EAAE,IAAI;KACxB;IACD;QACC,QAAQ,EAAE,OAAO;QACjB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,cAAc;QAC3B,MAAM,EAAE,CAAC,IAAA,iBAAQ,EAAC,SAAS,EAAE,UAAU,EAAE,4BAA4B,CAAC,CAAC;KACvE;CACD,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRODUCT_OPERATION_CONFIGS = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
const PRODUCT_SORT_OPTIONS = [
|
|
6
|
+
{ name: 'ID', value: 'ID' },
|
|
7
|
+
{ name: 'Created At', value: 'CREATED_AT' },
|
|
8
|
+
{ name: 'Title', value: 'TITLE' },
|
|
9
|
+
{ name: 'Updated At', value: 'UPDATED_AT' },
|
|
10
|
+
{ name: 'Inventory Total', value: 'INVENTORY_TOTAL' },
|
|
11
|
+
];
|
|
12
|
+
function productCreateFields() {
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'Title',
|
|
16
|
+
name: 'title',
|
|
17
|
+
type: 'string',
|
|
18
|
+
default: '',
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: 'Handle',
|
|
23
|
+
name: 'handle',
|
|
24
|
+
type: 'string',
|
|
25
|
+
default: '',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Description HTML',
|
|
29
|
+
name: 'descriptionHtml',
|
|
30
|
+
type: 'string',
|
|
31
|
+
typeOptions: { rows: 4 },
|
|
32
|
+
default: '',
|
|
33
|
+
},
|
|
34
|
+
...(0, common_1.seoFields)(),
|
|
35
|
+
(0, common_1.templateSuffixTextField)('product'),
|
|
36
|
+
{
|
|
37
|
+
displayName: 'Vendor',
|
|
38
|
+
name: 'vendor',
|
|
39
|
+
type: 'string',
|
|
40
|
+
default: '',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
displayName: 'Product Type',
|
|
44
|
+
name: 'productType',
|
|
45
|
+
type: 'string',
|
|
46
|
+
default: '',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
displayName: 'Status',
|
|
50
|
+
name: 'status',
|
|
51
|
+
type: 'options',
|
|
52
|
+
options: [
|
|
53
|
+
{ name: 'Active', value: 'ACTIVE' },
|
|
54
|
+
{ name: 'Draft', value: 'DRAFT' },
|
|
55
|
+
{ name: 'Archived', value: 'ARCHIVED' },
|
|
56
|
+
],
|
|
57
|
+
default: 'DRAFT',
|
|
58
|
+
},
|
|
59
|
+
common_1.TAGS_FIELD,
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
function productUpdateFields() {
|
|
63
|
+
return [
|
|
64
|
+
(0, common_1.gidField)('productId', 'Product ID', 'Global product ID in Shopify'),
|
|
65
|
+
...productCreateFields().map((field) => ({
|
|
66
|
+
...field,
|
|
67
|
+
required: false,
|
|
68
|
+
})),
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
exports.PRODUCT_OPERATION_CONFIGS = [
|
|
72
|
+
{
|
|
73
|
+
resource: 'product',
|
|
74
|
+
value: 'create',
|
|
75
|
+
name: 'Create',
|
|
76
|
+
description: 'Create a product',
|
|
77
|
+
registryKey: 'product.create',
|
|
78
|
+
fields: productCreateFields(),
|
|
79
|
+
supportsMetafields: true,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
resource: 'product',
|
|
83
|
+
value: 'get',
|
|
84
|
+
name: 'Get',
|
|
85
|
+
description: 'Get a product by ID',
|
|
86
|
+
registryKey: 'product.get',
|
|
87
|
+
fields: [
|
|
88
|
+
(0, common_1.gidField)('productId', 'Product ID', 'Global product ID in Shopify'),
|
|
89
|
+
...(0, common_1.readMetafieldsFields)(),
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
resource: 'product',
|
|
94
|
+
value: 'getMany',
|
|
95
|
+
name: 'Get Many',
|
|
96
|
+
description: 'Get many products',
|
|
97
|
+
registryKey: 'product.getMany',
|
|
98
|
+
fields: (0, common_1.paginationFields)(PRODUCT_SORT_OPTIONS),
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
resource: 'product',
|
|
102
|
+
value: 'update',
|
|
103
|
+
name: 'Update',
|
|
104
|
+
description: 'Update a product',
|
|
105
|
+
registryKey: 'product.update',
|
|
106
|
+
fields: productUpdateFields(),
|
|
107
|
+
supportsMetafields: true,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
resource: 'product',
|
|
111
|
+
value: 'delete',
|
|
112
|
+
name: 'Delete',
|
|
113
|
+
description: 'Delete a product',
|
|
114
|
+
registryKey: 'product.delete',
|
|
115
|
+
fields: [(0, common_1.gidField)('productId', 'Product ID', 'Global product ID in Shopify')],
|
|
116
|
+
},
|
|
117
|
+
];
|
|
118
|
+
//# sourceMappingURL=product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/product.ts"],"names":[],"mappings":";;;AACA,qCAOkB;AAGlB,MAAM,oBAAoB,GAAG;IAC5B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IA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AAS;QACnB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE,gBAAgB;QAC7B,MAAM,EAAE,CAAC,IAAA,iBAAQ,EAAC,WAAW,EAAE,YAAY,EAAE,8BAA8B,CAAC,CAAC;KAC7E;CACD,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PRODUCT_VARIANT_OPERATION_CONFIGS = void 0;
|
|
4
|
+
const common_1 = require("./common");
|
|
5
|
+
const PRODUCT_VARIANT_SORT_OPTIONS = [
|
|
6
|
+
{ name: 'ID', value: 'ID' },
|
|
7
|
+
{ name: 'Position', value: 'POSITION' },
|
|
8
|
+
{ name: 'SKU', value: 'SKU' },
|
|
9
|
+
{ name: 'Updated At', value: 'UPDATED_AT' },
|
|
10
|
+
{ name: 'Inventory Quantity', value: 'INVENTORY_QUANTITY' },
|
|
11
|
+
];
|
|
12
|
+
function productVariantBaseFields() {
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'Title',
|
|
16
|
+
name: 'title',
|
|
17
|
+
type: 'string',
|
|
18
|
+
default: '',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
displayName: 'SKU',
|
|
22
|
+
name: 'sku',
|
|
23
|
+
type: 'string',
|
|
24
|
+
default: '',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
displayName: 'Barcode',
|
|
28
|
+
name: 'barcode',
|
|
29
|
+
type: 'string',
|
|
30
|
+
default: '',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
displayName: 'Price',
|
|
34
|
+
name: 'price',
|
|
35
|
+
type: 'number',
|
|
36
|
+
default: 0,
|
|
37
|
+
typeOptions: {
|
|
38
|
+
numberPrecision: 2,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
displayName: 'Compare At Price',
|
|
43
|
+
name: 'compareAtPrice',
|
|
44
|
+
type: 'number',
|
|
45
|
+
default: 0,
|
|
46
|
+
typeOptions: {
|
|
47
|
+
numberPrecision: 2,
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
displayName: 'Taxable',
|
|
52
|
+
name: 'taxable',
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
default: true,
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
}
|
|
58
|
+
exports.PRODUCT_VARIANT_OPERATION_CONFIGS = [
|
|
59
|
+
{
|
|
60
|
+
resource: 'productVariant',
|
|
61
|
+
value: 'create',
|
|
62
|
+
name: 'Create',
|
|
63
|
+
description: 'Create a product variant',
|
|
64
|
+
registryKey: 'productVariant.create',
|
|
65
|
+
fields: [(0, common_1.gidField)('productId', 'Product ID', 'Global product ID in Shopify'), ...productVariantBaseFields()],
|
|
66
|
+
supportsMetafields: true,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
resource: 'productVariant',
|
|
70
|
+
value: 'get',
|
|
71
|
+
name: 'Get',
|
|
72
|
+
description: 'Get a product variant by ID',
|
|
73
|
+
registryKey: 'productVariant.get',
|
|
74
|
+
fields: [(0, common_1.gidField)('variantId', 'Variant ID', 'Global variant ID in Shopify'), ...(0, common_1.readMetafieldsFields)()],
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
resource: 'productVariant',
|
|
78
|
+
value: 'getMany',
|
|
79
|
+
name: 'Get Many',
|
|
80
|
+
description: 'Get many variants',
|
|
81
|
+
registryKey: 'productVariant.getMany',
|
|
82
|
+
fields: (0, common_1.paginationFields)(PRODUCT_VARIANT_SORT_OPTIONS),
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
resource: 'productVariant',
|
|
86
|
+
value: 'update',
|
|
87
|
+
name: 'Update',
|
|
88
|
+
description: 'Update a product variant',
|
|
89
|
+
registryKey: 'productVariant.update',
|
|
90
|
+
fields: [
|
|
91
|
+
(0, common_1.gidField)('productId', 'Product ID', 'Global product ID in Shopify'),
|
|
92
|
+
(0, common_1.gidField)('variantId', 'Variant ID', 'Global variant ID in Shopify'),
|
|
93
|
+
...productVariantBaseFields(),
|
|
94
|
+
],
|
|
95
|
+
supportsMetafields: true,
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
resource: 'productVariant',
|
|
99
|
+
value: 'delete',
|
|
100
|
+
name: 'Delete',
|
|
101
|
+
description: 'Delete a product variant',
|
|
102
|
+
registryKey: 'productVariant.delete',
|
|
103
|
+
fields: [
|
|
104
|
+
(0, common_1.gidField)('productId', 'Product ID', 'Global product ID in Shopify'),
|
|
105
|
+
(0, common_1.gidField)('variantId', 'Variant ID', 'Global variant ID in Shopify'),
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
];
|
|
109
|
+
//# sourceMappingURL=productVariant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productVariant.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/productVariant.ts"],"names":[],"mappings":";;;AACA,qCAA4E;AAG5E,MAAM,4BAA4B,GAAG;IACpC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IAC3B,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IACvC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IAC7B,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;CAC3D,CAAC;AAEF,SAAS,wBAAwB;IAChC,OAAO;QACN;YACC,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE;SACX;QACD;YACC,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE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,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,wBAAwB;QACrC,MAAM,EAAE,IAAA,yBAAgB,EAAC,4BAA4B,CAAC;KACtD;IACD;QACC,QAAQ,EAAE,gBAAgB;QAC1B,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,0BAA0B;QACvC,WAAW,EAAE,uBAAuB;QACpC,MAAM,EAAE;YACP,IAAA,iBAAQ,EAAC,WAAW,EAAE,YAAY,EAAE,8BAA8B,CAAC;YACnE,IAAA,iBAAQ,EAAC,WAAW,EAAE,YAAY,EAAE,8BAA8B,CAAC;YACnE,GAAG,wBAAwB,EAAE;SAC7B;QACD,kBAAkB,EAAE,IAAI;KACxB;IACD;QACC,QAAQ,EAAE,gBAAgB;QAC1B,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,0BAA0B;QACvC,WAAW,EAAE,uBAAuB;QACpC,MAAM,EAAE;YACP,IAAA,iBAAQ,EAAC,WAAW,EAAE,YAAY,EAAE,8BAA8B,CAAC;YACnE,IAAA,iBAAQ,EAAC,WAAW,EAAE,YAAY,EAAE,8BAA8B,CAAC;SACnE;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SERVICE_OPERATION_CONFIGS = void 0;
|
|
4
|
+
exports.SERVICE_OPERATION_CONFIGS = [
|
|
5
|
+
{
|
|
6
|
+
resource: 'service',
|
|
7
|
+
value: 'listDefinitionTypes',
|
|
8
|
+
name: 'List Metafield Definition Types',
|
|
9
|
+
description: 'List metafield types and their supported validations',
|
|
10
|
+
registryKey: 'service.listDefinitionTypes',
|
|
11
|
+
fields: [],
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/service.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAA8B;IACnE;QACC,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,qBAAqB;QAC5B,IAAI,EAAE,iCAAiC;QACvC,WAAW,EAAE,sDAAsD;QACnE,WAAW,EAAE,6BAA6B;QAC1C,MAAM,EAAE,EAAE;KACV;CACD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { INodeProperties } from 'n8n-workflow';
|
|
2
|
+
import type { ShopifyResourceValue } from '../resources';
|
|
3
|
+
export type ShopifyOperationValue = 'create' | 'get' | 'getMany' | 'update' | 'delete' | 'set' | 'list' | 'listDefinitionTypes';
|
|
4
|
+
export type ShopifyOperationKey = 'product.create' | 'product.get' | 'product.getMany' | 'product.update' | 'product.delete' | 'productVariant.create' | 'productVariant.get' | 'productVariant.getMany' | 'productVariant.update' | 'productVariant.delete' | 'collection.create' | 'collection.get' | 'collection.getMany' | 'collection.update' | 'collection.delete' | 'customer.create' | 'customer.get' | 'customer.getMany' | 'customer.update' | 'customer.delete' | 'order.create' | 'order.get' | 'order.getMany' | 'order.update' | 'order.delete' | 'draftOrder.create' | 'draftOrder.get' | 'draftOrder.getMany' | 'draftOrder.update' | 'draftOrder.delete' | 'metaobject.create' | 'metaobject.get' | 'metaobject.getMany' | 'metaobject.update' | 'metaobject.delete' | 'metafieldValue.set' | 'metafieldValue.get' | 'metafieldValue.getMany' | 'metafieldValue.delete' | 'metafieldDefinition.list' | 'metafieldDefinition.get' | 'metafieldDefinition.create' | 'metafieldDefinition.update' | 'metafieldDefinition.delete' | 'service.listDefinitionTypes';
|
|
5
|
+
export interface IShopifyOperationConfig {
|
|
6
|
+
resource: ShopifyResourceValue;
|
|
7
|
+
value: ShopifyOperationValue;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
registryKey: ShopifyOperationKey;
|
|
11
|
+
fields: INodeProperties[];
|
|
12
|
+
supportsMetafields?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ShopifyResourceValue = 'product' | 'productVariant' | 'collection' | 'customer' | 'order' | 'draftOrder' | 'metaobject' | 'metafieldValue' | 'metafieldDefinition' | 'service';
|
|
2
|
+
export type ShopifyMetafieldOwnerType = 'PRODUCT' | 'PRODUCTVARIANT' | 'COLLECTION' | 'CUSTOMER' | 'ORDER' | 'DRAFTORDER';
|
|
3
|
+
export interface IShopifyResourceDefinition {
|
|
4
|
+
value: ShopifyResourceValue;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
ownerType?: ShopifyMetafieldOwnerType;
|
|
8
|
+
}
|
|
9
|
+
export declare const SHOPIFY_RESOURCE_DEFINITIONS: IShopifyResourceDefinition[];
|