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.
Files changed (139) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +68 -0
  3. package/dist/credentials/ShopifyCustomAdminApi.credentials.d.ts +10 -0
  4. package/dist/credentials/ShopifyCustomAdminApi.credentials.js +65 -0
  5. package/dist/credentials/ShopifyCustomAdminApi.credentials.js.map +1 -0
  6. package/dist/icons/shopify.dark.svg +12 -0
  7. package/dist/icons/shopify.svg +12 -0
  8. package/dist/nodes/ShopifyCustom/ShopifyCustom.node.d.ts +15 -0
  9. package/dist/nodes/ShopifyCustom/ShopifyCustom.node.js +358 -0
  10. package/dist/nodes/ShopifyCustom/ShopifyCustom.node.js.map +1 -0
  11. package/dist/nodes/ShopifyCustom/ShopifyCustom.node.json +18 -0
  12. package/dist/nodes/ShopifyCustom/config/operations/collection.d.ts +2 -0
  13. package/dist/nodes/ShopifyCustom/config/operations/collection.js +306 -0
  14. package/dist/nodes/ShopifyCustom/config/operations/collection.js.map +1 -0
  15. package/dist/nodes/ShopifyCustom/config/operations/common.d.ts +13 -0
  16. package/dist/nodes/ShopifyCustom/config/operations/common.js +222 -0
  17. package/dist/nodes/ShopifyCustom/config/operations/common.js.map +1 -0
  18. package/dist/nodes/ShopifyCustom/config/operations/customer.d.ts +2 -0
  19. package/dist/nodes/ShopifyCustom/config/operations/customer.js +107 -0
  20. package/dist/nodes/ShopifyCustom/config/operations/customer.js.map +1 -0
  21. package/dist/nodes/ShopifyCustom/config/operations/draftOrder.d.ts +2 -0
  22. package/dist/nodes/ShopifyCustom/config/operations/draftOrder.js +118 -0
  23. package/dist/nodes/ShopifyCustom/config/operations/draftOrder.js.map +1 -0
  24. package/dist/nodes/ShopifyCustom/config/operations/index.d.ts +7 -0
  25. package/dist/nodes/ShopifyCustom/config/operations/index.js +48 -0
  26. package/dist/nodes/ShopifyCustom/config/operations/index.js.map +1 -0
  27. package/dist/nodes/ShopifyCustom/config/operations/metafieldDefinition.d.ts +2 -0
  28. package/dist/nodes/ShopifyCustom/config/operations/metafieldDefinition.js +192 -0
  29. package/dist/nodes/ShopifyCustom/config/operations/metafieldDefinition.js.map +1 -0
  30. package/dist/nodes/ShopifyCustom/config/operations/metafieldValue.d.ts +2 -0
  31. package/dist/nodes/ShopifyCustom/config/operations/metafieldValue.js +125 -0
  32. package/dist/nodes/ShopifyCustom/config/operations/metafieldValue.js.map +1 -0
  33. package/dist/nodes/ShopifyCustom/config/operations/metaobject.d.ts +2 -0
  34. package/dist/nodes/ShopifyCustom/config/operations/metaobject.js +198 -0
  35. package/dist/nodes/ShopifyCustom/config/operations/metaobject.js.map +1 -0
  36. package/dist/nodes/ShopifyCustom/config/operations/order.d.ts +2 -0
  37. package/dist/nodes/ShopifyCustom/config/operations/order.js +111 -0
  38. package/dist/nodes/ShopifyCustom/config/operations/order.js.map +1 -0
  39. package/dist/nodes/ShopifyCustom/config/operations/product.d.ts +2 -0
  40. package/dist/nodes/ShopifyCustom/config/operations/product.js +118 -0
  41. package/dist/nodes/ShopifyCustom/config/operations/product.js.map +1 -0
  42. package/dist/nodes/ShopifyCustom/config/operations/productVariant.d.ts +2 -0
  43. package/dist/nodes/ShopifyCustom/config/operations/productVariant.js +109 -0
  44. package/dist/nodes/ShopifyCustom/config/operations/productVariant.js.map +1 -0
  45. package/dist/nodes/ShopifyCustom/config/operations/service.d.ts +2 -0
  46. package/dist/nodes/ShopifyCustom/config/operations/service.js +14 -0
  47. package/dist/nodes/ShopifyCustom/config/operations/service.js.map +1 -0
  48. package/dist/nodes/ShopifyCustom/config/operations/types.d.ts +13 -0
  49. package/dist/nodes/ShopifyCustom/config/operations/types.js +3 -0
  50. package/dist/nodes/ShopifyCustom/config/operations/types.js.map +1 -0
  51. package/dist/nodes/ShopifyCustom/config/resources.d.ts +9 -0
  52. package/dist/nodes/ShopifyCustom/config/resources.js +62 -0
  53. package/dist/nodes/ShopifyCustom/config/resources.js.map +1 -0
  54. package/dist/nodes/ShopifyCustom/shared/collections/ruleConditions.d.ts +17 -0
  55. package/dist/nodes/ShopifyCustom/shared/collections/ruleConditions.js +281 -0
  56. package/dist/nodes/ShopifyCustom/shared/collections/ruleConditions.js.map +1 -0
  57. package/dist/nodes/ShopifyCustom/shared/errors.d.ts +8 -0
  58. package/dist/nodes/ShopifyCustom/shared/errors.js +37 -0
  59. package/dist/nodes/ShopifyCustom/shared/errors.js.map +1 -0
  60. package/dist/nodes/ShopifyCustom/shared/graphql/client.d.ts +26 -0
  61. package/dist/nodes/ShopifyCustom/shared/graphql/client.js +73 -0
  62. package/dist/nodes/ShopifyCustom/shared/graphql/client.js.map +1 -0
  63. package/dist/nodes/ShopifyCustom/shared/graphql/registry.d.ts +17 -0
  64. package/dist/nodes/ShopifyCustom/shared/graphql/registry.js +962 -0
  65. package/dist/nodes/ShopifyCustom/shared/graphql/registry.js.map +1 -0
  66. package/dist/nodes/ShopifyCustom/shared/graphql/templates/collection.d.ts +5 -0
  67. package/dist/nodes/ShopifyCustom/shared/graphql/templates/collection.js +99 -0
  68. package/dist/nodes/ShopifyCustom/shared/graphql/templates/collection.js.map +1 -0
  69. package/dist/nodes/ShopifyCustom/shared/graphql/templates/commonFragments.d.ts +7 -0
  70. package/dist/nodes/ShopifyCustom/shared/graphql/templates/commonFragments.js +69 -0
  71. package/dist/nodes/ShopifyCustom/shared/graphql/templates/commonFragments.js.map +1 -0
  72. package/dist/nodes/ShopifyCustom/shared/graphql/templates/customer.d.ts +5 -0
  73. package/dist/nodes/ShopifyCustom/shared/graphql/templates/customer.js +94 -0
  74. package/dist/nodes/ShopifyCustom/shared/graphql/templates/customer.js.map +1 -0
  75. package/dist/nodes/ShopifyCustom/shared/graphql/templates/draftOrder.d.ts +5 -0
  76. package/dist/nodes/ShopifyCustom/shared/graphql/templates/draftOrder.js +91 -0
  77. package/dist/nodes/ShopifyCustom/shared/graphql/templates/draftOrder.js.map +1 -0
  78. package/dist/nodes/ShopifyCustom/shared/graphql/templates/metafields.d.ts +10 -0
  79. package/dist/nodes/ShopifyCustom/shared/graphql/templates/metafields.js +223 -0
  80. package/dist/nodes/ShopifyCustom/shared/graphql/templates/metafields.js.map +1 -0
  81. package/dist/nodes/ShopifyCustom/shared/graphql/templates/metaobject.d.ts +5 -0
  82. package/dist/nodes/ShopifyCustom/shared/graphql/templates/metaobject.js +92 -0
  83. package/dist/nodes/ShopifyCustom/shared/graphql/templates/metaobject.js.map +1 -0
  84. package/dist/nodes/ShopifyCustom/shared/graphql/templates/order.d.ts +5 -0
  85. package/dist/nodes/ShopifyCustom/shared/graphql/templates/order.js +95 -0
  86. package/dist/nodes/ShopifyCustom/shared/graphql/templates/order.js.map +1 -0
  87. package/dist/nodes/ShopifyCustom/shared/graphql/templates/product.d.ts +5 -0
  88. package/dist/nodes/ShopifyCustom/shared/graphql/templates/product.js +107 -0
  89. package/dist/nodes/ShopifyCustom/shared/graphql/templates/product.js.map +1 -0
  90. package/dist/nodes/ShopifyCustom/shared/graphql/templates/productVariant.d.ts +5 -0
  91. package/dist/nodes/ShopifyCustom/shared/graphql/templates/productVariant.js +99 -0
  92. package/dist/nodes/ShopifyCustom/shared/graphql/templates/productVariant.js.map +1 -0
  93. package/dist/nodes/ShopifyCustom/shared/metafields/definitions.d.ts +24 -0
  94. package/dist/nodes/ShopifyCustom/shared/metafields/definitions.js +65 -0
  95. package/dist/nodes/ShopifyCustom/shared/metafields/definitions.js.map +1 -0
  96. package/dist/nodes/ShopifyCustom/shared/metafields/ownerTypeMap.d.ts +3 -0
  97. package/dist/nodes/ShopifyCustom/shared/metafields/ownerTypeMap.js +19 -0
  98. package/dist/nodes/ShopifyCustom/shared/metafields/ownerTypeMap.js.map +1 -0
  99. package/dist/nodes/ShopifyCustom/shared/metafields/referenceLoaders.d.ts +2 -0
  100. package/dist/nodes/ShopifyCustom/shared/metafields/referenceLoaders.js +122 -0
  101. package/dist/nodes/ShopifyCustom/shared/metafields/referenceLoaders.js.map +1 -0
  102. package/dist/nodes/ShopifyCustom/shared/metafields/types.d.ts +17 -0
  103. package/dist/nodes/ShopifyCustom/shared/metafields/types.js +57 -0
  104. package/dist/nodes/ShopifyCustom/shared/metafields/types.js.map +1 -0
  105. package/dist/nodes/ShopifyCustom/shared/metafields/uiFactory.d.ts +2 -0
  106. package/dist/nodes/ShopifyCustom/shared/metafields/uiFactory.js +395 -0
  107. package/dist/nodes/ShopifyCustom/shared/metafields/uiFactory.js.map +1 -0
  108. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/constants.d.ts +20 -0
  109. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/constants.js +61 -0
  110. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/constants.js.map +1 -0
  111. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/index.d.ts +3 -0
  112. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/index.js +43 -0
  113. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/index.js.map +1 -0
  114. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/list.d.ts +2 -0
  115. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/list.js +103 -0
  116. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/list.js.map +1 -0
  117. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/reference.d.ts +2 -0
  118. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/reference.js +80 -0
  119. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/reference.js.map +1 -0
  120. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/scalar.d.ts +2 -0
  121. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/scalar.js +110 -0
  122. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/scalar.js.map +1 -0
  123. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/structured.d.ts +2 -0
  124. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/structured.js +64 -0
  125. package/dist/nodes/ShopifyCustom/shared/metafields/valueAdapters/structured.js.map +1 -0
  126. package/dist/nodes/ShopifyCustom/shared/metafields/valuePayload.d.ts +3 -0
  127. package/dist/nodes/ShopifyCustom/shared/metafields/valuePayload.js +89 -0
  128. package/dist/nodes/ShopifyCustom/shared/metafields/valuePayload.js.map +1 -0
  129. package/dist/nodes/ShopifyCustom/shared/output/outputMapper.d.ts +3 -0
  130. package/dist/nodes/ShopifyCustom/shared/output/outputMapper.js +82 -0
  131. package/dist/nodes/ShopifyCustom/shared/output/outputMapper.js.map +1 -0
  132. package/dist/nodes/ShopifyCustom/shared/themes/templateSuffixes.d.ts +2 -0
  133. package/dist/nodes/ShopifyCustom/shared/themes/templateSuffixes.js +83 -0
  134. package/dist/nodes/ShopifyCustom/shared/themes/templateSuffixes.js.map +1 -0
  135. package/dist/nodes/ShopifyCustom/shopify.dark.svg +12 -0
  136. package/dist/nodes/ShopifyCustom/shopify.svg +12 -0
  137. package/dist/package.json +62 -0
  138. package/dist/tsconfig.tsbuildinfo +1 -0
  139. package/package.json +62 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/customer.ts"],"names":[],"mappings":";;;AACA,qCAAwF;AAGxF,MAAM,qBAAqB,GAAG;IAC7B,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IAC3B,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACrD,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;CAC3C,CAAC;AAEF,SAAS,kBAAkB,CAAC,QAAiB;IAC5C,OAAO;QACN;YACC,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,QAAQ;YACd,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C,EAAE,GAAG,IAAA,6BAAoB,GAAE,CAAC;KAC3G;IACD;QACC,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,oBAAoB;QACjC,WAAW,EAAE,kBAAkB;QAC/B,MAAM,EAAE,IAAA,yBAAgB,EAAC,qBAAqB,CAAC;KAC/C;IACD;QACC,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,iBAAiB;QAC9B,MAAM,EAAE,CAAC,IAAA,iBAAQ,EAAC,YAAY,EAAE,aAAa,EAAE,+BAA+B,CAAC,EAAE,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC9G,kBAAkB,EAAE,IAAI;KACxB;IACD;QACC,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,iBAAiB;QAC9B,MAAM,EAAE,CAAC,IAAA,iBAAQ,EAAC,YAAY,EAAE,aAAa,EAAE,+BAA+B,CAAC,CAAC;KAChF;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IShopifyOperationConfig } from './types';
2
+ export declare const DRAFT_ORDER_OPERATION_CONFIGS: IShopifyOperationConfig[];
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DRAFT_ORDER_OPERATION_CONFIGS = void 0;
4
+ const common_1 = require("./common");
5
+ const DRAFT_ORDER_SORT_OPTIONS = [
6
+ { name: 'ID', value: 'ID' },
7
+ { name: 'Created At', value: 'CREATED_AT' },
8
+ { name: 'Updated At', value: 'UPDATED_AT' },
9
+ { name: 'Number', value: 'NUMBER' },
10
+ ];
11
+ const draftLineItemsField = {
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 draftOrderBaseFields() {
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.DRAFT_ORDER_OPERATION_CONFIGS = [
68
+ {
69
+ resource: 'draftOrder',
70
+ value: 'create',
71
+ name: 'Create',
72
+ description: 'Create a draft order',
73
+ registryKey: 'draftOrder.create',
74
+ fields: [...draftOrderBaseFields(), draftLineItemsField],
75
+ supportsMetafields: true,
76
+ },
77
+ {
78
+ resource: 'draftOrder',
79
+ value: 'get',
80
+ name: 'Get',
81
+ description: 'Get a draft order by ID',
82
+ registryKey: 'draftOrder.get',
83
+ fields: [
84
+ (0, common_1.gidField)('draftOrderId', 'Draft Order ID', 'Global draft order ID in Shopify'),
85
+ ...(0, common_1.readMetafieldsFields)(),
86
+ ],
87
+ },
88
+ {
89
+ resource: 'draftOrder',
90
+ value: 'getMany',
91
+ name: 'Get Many',
92
+ description: 'Get many draft orders',
93
+ registryKey: 'draftOrder.getMany',
94
+ fields: (0, common_1.paginationFields)(DRAFT_ORDER_SORT_OPTIONS),
95
+ },
96
+ {
97
+ resource: 'draftOrder',
98
+ value: 'update',
99
+ name: 'Update',
100
+ description: 'Update a draft order',
101
+ registryKey: 'draftOrder.update',
102
+ fields: [
103
+ (0, common_1.gidField)('draftOrderId', 'Draft Order ID', 'Global draft order ID in Shopify'),
104
+ ...draftOrderBaseFields(),
105
+ draftLineItemsField,
106
+ ],
107
+ supportsMetafields: true,
108
+ },
109
+ {
110
+ resource: 'draftOrder',
111
+ value: 'delete',
112
+ name: 'Delete',
113
+ description: 'Delete a draft order',
114
+ registryKey: 'draftOrder.delete',
115
+ fields: [(0, common_1.gidField)('draftOrderId', 'Draft Order ID', 'Global draft order ID in Shopify')],
116
+ },
117
+ ];
118
+ //# sourceMappingURL=draftOrder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draftOrder.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/draftOrder.ts"],"names":[],"mappings":";;;AACA,qCAAwF;AAGxF,MAAM,wBAAwB,GAAG;IAChC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;IAC3B,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACnC,CAAC;AAEF,MAAM,mBAAmB,GAAoB;IAC5C,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,OAAO,EAAE,EAAE;oBACX,QAA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ACpC,WAAW,EAAE,oBAAoB;QACjC,MAAM,EAAE,IAAA,yBAAgB,EAAC,wBAAwB,CAAC;KAClD;IACD;QACC,QAAQ,EAAE,YAAY;QACtB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE,mBAAmB;QAChC,MAAM,EAAE;YACP,IAAA,iBAAQ,EAAC,cAAc,EAAE,gBAAgB,EAAE,kCAAkC,CAAC;YAC9E,GAAG,oBAAoB,EAAE;YACzB,mBAAmB;SACnB;QACD,kBAAkB,EAAE,IAAI;KACxB;IACD;QACC,QAAQ,EAAE,YAAY;QACtB,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,sBAAsB;QACnC,WAAW,EAAE,mBAAmB;QAChC,MAAM,EAAE,CAAC,IAAA,iBAAQ,EAAC,cAAc,EAAE,gBAAgB,EAAE,kCAAkC,CAAC,CAAC;KACxF;CACD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { INodePropertyOptions } from 'n8n-workflow';
2
+ import type { ShopifyResourceValue } from '../resources';
3
+ import type { IShopifyOperationConfig } from './types';
4
+ export declare const SHOPIFY_OPERATION_CONFIGS: IShopifyOperationConfig[];
5
+ export declare const OPERATION_BY_RESOURCE: Record<ShopifyResourceValue, IShopifyOperationConfig[]>;
6
+ export declare function buildOperationOptions(resource: ShopifyResourceValue): INodePropertyOptions[];
7
+ export declare function getOperationConfig(resource: ShopifyResourceValue, operation: string): IShopifyOperationConfig | undefined;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OPERATION_BY_RESOURCE = exports.SHOPIFY_OPERATION_CONFIGS = void 0;
4
+ exports.buildOperationOptions = buildOperationOptions;
5
+ exports.getOperationConfig = getOperationConfig;
6
+ const collection_1 = require("./collection");
7
+ const customer_1 = require("./customer");
8
+ const draftOrder_1 = require("./draftOrder");
9
+ const metafieldDefinition_1 = require("./metafieldDefinition");
10
+ const metafieldValue_1 = require("./metafieldValue");
11
+ const metaobject_1 = require("./metaobject");
12
+ const order_1 = require("./order");
13
+ const product_1 = require("./product");
14
+ const productVariant_1 = require("./productVariant");
15
+ const service_1 = require("./service");
16
+ exports.SHOPIFY_OPERATION_CONFIGS = [
17
+ ...product_1.PRODUCT_OPERATION_CONFIGS,
18
+ ...productVariant_1.PRODUCT_VARIANT_OPERATION_CONFIGS,
19
+ ...collection_1.COLLECTION_OPERATION_CONFIGS,
20
+ ...customer_1.CUSTOMER_OPERATION_CONFIGS,
21
+ ...order_1.ORDER_OPERATION_CONFIGS,
22
+ ...draftOrder_1.DRAFT_ORDER_OPERATION_CONFIGS,
23
+ ...metaobject_1.METAOBJECT_OPERATION_CONFIGS,
24
+ ...metafieldValue_1.METAFIELD_VALUE_OPERATION_CONFIGS,
25
+ ...metafieldDefinition_1.METAFIELD_DEFINITION_OPERATION_CONFIGS,
26
+ ...service_1.SERVICE_OPERATION_CONFIGS,
27
+ ];
28
+ exports.OPERATION_BY_RESOURCE = exports.SHOPIFY_OPERATION_CONFIGS.reduce((acc, operationConfig) => {
29
+ var _a;
30
+ var _b;
31
+ (_a = acc[_b = operationConfig.resource]) !== null && _a !== void 0 ? _a : (acc[_b] = []);
32
+ acc[operationConfig.resource].push(operationConfig);
33
+ return acc;
34
+ }, {});
35
+ function buildOperationOptions(resource) {
36
+ var _a;
37
+ const operationConfigs = (_a = exports.OPERATION_BY_RESOURCE[resource]) !== null && _a !== void 0 ? _a : [];
38
+ return operationConfigs.map((operationConfig) => ({
39
+ name: operationConfig.name,
40
+ value: operationConfig.value,
41
+ description: operationConfig.description,
42
+ action: `${operationConfig.name} (${resource})`,
43
+ }));
44
+ }
45
+ function getOperationConfig(resource, operation) {
46
+ return exports.SHOPIFY_OPERATION_CONFIGS.find((operationConfig) => operationConfig.resource === resource && operationConfig.value === operation);
47
+ }
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@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SAAgB,kBAAkB,CACjC,QAA8B,EAC9B,SAAiB;IAEjB,OAAO,iCAAyB,CAAC,IAAI,CACpC,CAAC,eAAe,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,KAAK,QAAQ,IAAI,eAAe,CAAC,KAAK,KAAK,SAAS,CACjG,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IShopifyOperationConfig } from './types';
2
+ export declare const METAFIELD_DEFINITION_OPERATION_CONFIGS: IShopifyOperationConfig[];
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.METAFIELD_DEFINITION_OPERATION_CONFIGS = void 0;
4
+ const common_1 = require("./common");
5
+ const OWNER_TYPE_OPTIONS = [
6
+ { name: 'Product', value: 'PRODUCT' },
7
+ { name: 'Product Variant', value: 'PRODUCTVARIANT' },
8
+ { name: 'Collection', value: 'COLLECTION' },
9
+ { name: 'Customer', value: 'CUSTOMER' },
10
+ { name: 'Order', value: 'ORDER' },
11
+ { name: 'Draft Order', value: 'DRAFTORDER' },
12
+ ];
13
+ const validationsField = {
14
+ displayName: 'Validations',
15
+ name: 'validations',
16
+ type: 'fixedCollection',
17
+ typeOptions: {
18
+ multipleValues: true,
19
+ },
20
+ default: {},
21
+ options: [
22
+ {
23
+ name: 'items',
24
+ displayName: 'Validation',
25
+ values: [
26
+ {
27
+ displayName: 'Name',
28
+ name: 'name',
29
+ type: 'string',
30
+ default: '',
31
+ required: true,
32
+ },
33
+ {
34
+ displayName: 'Value',
35
+ name: 'value',
36
+ type: 'string',
37
+ default: '',
38
+ required: true,
39
+ },
40
+ ],
41
+ },
42
+ ],
43
+ };
44
+ exports.METAFIELD_DEFINITION_OPERATION_CONFIGS = [
45
+ {
46
+ resource: 'metafieldDefinition',
47
+ value: 'list',
48
+ name: 'List',
49
+ description: 'List metafield definitions',
50
+ registryKey: 'metafieldDefinition.list',
51
+ fields: [
52
+ {
53
+ displayName: 'Owner Type',
54
+ name: 'ownerType',
55
+ type: 'options',
56
+ options: OWNER_TYPE_OPTIONS,
57
+ default: 'PRODUCT',
58
+ },
59
+ {
60
+ displayName: 'Search Query',
61
+ name: 'query',
62
+ type: 'string',
63
+ default: '',
64
+ },
65
+ {
66
+ displayName: 'Get All',
67
+ name: 'getAll',
68
+ type: 'boolean',
69
+ default: true,
70
+ },
71
+ {
72
+ displayName: 'Limit',
73
+ name: 'limit',
74
+ type: 'number',
75
+ description: 'Max number of results to return',
76
+ default: 50,
77
+ typeOptions: {
78
+ minValue: 1,
79
+ maxValue: 250,
80
+ },
81
+ displayOptions: {
82
+ show: {
83
+ getAll: [false],
84
+ },
85
+ },
86
+ },
87
+ ],
88
+ },
89
+ {
90
+ resource: 'metafieldDefinition',
91
+ value: 'get',
92
+ name: 'Get',
93
+ description: 'Get metafield definition by ID',
94
+ registryKey: 'metafieldDefinition.get',
95
+ fields: [(0, common_1.gidField)('definitionId', 'Definition ID', 'Global definition ID in Shopify')],
96
+ },
97
+ {
98
+ resource: 'metafieldDefinition',
99
+ value: 'create',
100
+ name: 'Create',
101
+ description: 'Create metafield definition',
102
+ registryKey: 'metafieldDefinition.create',
103
+ fields: [
104
+ {
105
+ displayName: 'Owner Type',
106
+ name: 'ownerType',
107
+ type: 'options',
108
+ options: OWNER_TYPE_OPTIONS,
109
+ default: 'PRODUCT',
110
+ },
111
+ {
112
+ displayName: 'Name',
113
+ name: 'name',
114
+ type: 'string',
115
+ default: '',
116
+ required: true,
117
+ },
118
+ {
119
+ displayName: 'Namespace',
120
+ name: 'namespace',
121
+ type: 'string',
122
+ default: '',
123
+ required: true,
124
+ },
125
+ {
126
+ displayName: 'Key',
127
+ name: 'key',
128
+ type: 'string',
129
+ default: '',
130
+ required: true,
131
+ },
132
+ {
133
+ displayName: 'Type Name or ID',
134
+ name: 'definitionType',
135
+ type: 'options',
136
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
137
+ typeOptions: {
138
+ loadOptionsMethod: 'getMetafieldDefinitionTypes',
139
+ },
140
+ default: '',
141
+ required: true,
142
+ },
143
+ {
144
+ displayName: 'Description',
145
+ name: 'description',
146
+ type: 'string',
147
+ default: '',
148
+ },
149
+ validationsField,
150
+ ],
151
+ },
152
+ {
153
+ resource: 'metafieldDefinition',
154
+ value: 'update',
155
+ name: 'Update',
156
+ description: 'Update metafield definition',
157
+ registryKey: 'metafieldDefinition.update',
158
+ fields: [
159
+ (0, common_1.gidField)('definitionId', 'Definition ID', 'Global definition ID in Shopify'),
160
+ {
161
+ displayName: 'Name',
162
+ name: 'name',
163
+ type: 'string',
164
+ default: '',
165
+ },
166
+ {
167
+ displayName: 'Description',
168
+ name: 'description',
169
+ type: 'string',
170
+ default: '',
171
+ },
172
+ validationsField,
173
+ ],
174
+ },
175
+ {
176
+ resource: 'metafieldDefinition',
177
+ value: 'delete',
178
+ name: 'Delete',
179
+ description: 'Delete metafield definition',
180
+ registryKey: 'metafieldDefinition.delete',
181
+ fields: [
182
+ (0, common_1.gidField)('definitionId', 'Definition ID', 'Global definition ID in Shopify'),
183
+ {
184
+ displayName: 'Delete All Associated Metafields',
185
+ name: 'deleteAllAssociatedMetafields',
186
+ type: 'boolean',
187
+ default: false,
188
+ },
189
+ ],
190
+ },
191
+ ];
192
+ //# sourceMappingURL=metafieldDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metafieldDefinition.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/metafieldDefinition.ts"],"names":[],"mappings":";;;AACA,qCAAoC;AAGpC,MAAM,kBAAkB,GAAG;IAC1B,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACrC,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACpD,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UA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 export declare const METAFIELD_VALUE_OPERATION_CONFIGS: IShopifyOperationConfig[];
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.METAFIELD_VALUE_OPERATION_CONFIGS = void 0;
4
+ const common_1 = require("./common");
5
+ const OWNER_TYPE_OPTIONS = [
6
+ { name: 'Product', value: 'PRODUCT' },
7
+ { name: 'Product Variant', value: 'PRODUCTVARIANT' },
8
+ { name: 'Collection', value: 'COLLECTION' },
9
+ { name: 'Customer', value: 'CUSTOMER' },
10
+ { name: 'Order', value: 'ORDER' },
11
+ { name: 'Draft Order', value: 'DRAFTORDER' },
12
+ ];
13
+ exports.METAFIELD_VALUE_OPERATION_CONFIGS = [
14
+ {
15
+ resource: 'metafieldValue',
16
+ value: 'set',
17
+ name: 'Set',
18
+ description: 'Set metafield values',
19
+ registryKey: 'metafieldValue.set',
20
+ fields: [
21
+ {
22
+ displayName: 'Owner Type',
23
+ name: 'ownerType',
24
+ type: 'options',
25
+ options: OWNER_TYPE_OPTIONS,
26
+ default: 'PRODUCT',
27
+ },
28
+ (0, common_1.gidField)('ownerId', 'Owner ID', 'Global owner ID in Shopify'),
29
+ ],
30
+ },
31
+ {
32
+ resource: 'metafieldValue',
33
+ value: 'get',
34
+ name: 'Get',
35
+ description: 'Get one metafield value',
36
+ registryKey: 'metafieldValue.get',
37
+ fields: [
38
+ {
39
+ displayName: 'Owner Type',
40
+ name: 'ownerType',
41
+ type: 'options',
42
+ options: OWNER_TYPE_OPTIONS,
43
+ default: 'PRODUCT',
44
+ },
45
+ (0, common_1.gidField)('ownerId', 'Owner ID', 'Global owner ID in Shopify'),
46
+ {
47
+ displayName: 'Namespace',
48
+ name: 'namespace',
49
+ type: 'string',
50
+ default: '',
51
+ required: true,
52
+ },
53
+ {
54
+ displayName: 'Key',
55
+ name: 'key',
56
+ type: 'string',
57
+ default: '',
58
+ required: true,
59
+ },
60
+ ],
61
+ },
62
+ {
63
+ resource: 'metafieldValue',
64
+ value: 'getMany',
65
+ name: 'Get Many',
66
+ description: 'Get many metafield values from an owner',
67
+ registryKey: 'metafieldValue.getMany',
68
+ fields: [
69
+ {
70
+ displayName: 'Owner Type',
71
+ name: 'ownerType',
72
+ type: 'options',
73
+ options: OWNER_TYPE_OPTIONS,
74
+ default: 'PRODUCT',
75
+ },
76
+ (0, common_1.gidField)('ownerId', 'Owner ID', 'Global owner ID in Shopify'),
77
+ {
78
+ displayName: 'Namespace',
79
+ name: 'namespace',
80
+ type: 'string',
81
+ default: '',
82
+ },
83
+ {
84
+ displayName: 'Get All',
85
+ name: 'getAll',
86
+ type: 'boolean',
87
+ default: true,
88
+ },
89
+ {
90
+ displayName: 'Limit',
91
+ name: 'limit',
92
+ type: 'number',
93
+ description: 'Max number of results to return',
94
+ default: 50,
95
+ typeOptions: {
96
+ minValue: 1,
97
+ maxValue: 250,
98
+ },
99
+ displayOptions: {
100
+ show: {
101
+ getAll: [false],
102
+ },
103
+ },
104
+ },
105
+ ],
106
+ },
107
+ {
108
+ resource: 'metafieldValue',
109
+ value: 'delete',
110
+ name: 'Delete',
111
+ description: 'Delete metafield values',
112
+ registryKey: 'metafieldValue.delete',
113
+ fields: [
114
+ {
115
+ displayName: 'Owner Type',
116
+ name: 'ownerType',
117
+ type: 'options',
118
+ options: OWNER_TYPE_OPTIONS,
119
+ default: 'PRODUCT',
120
+ },
121
+ (0, common_1.gidField)('ownerId', 'Owner ID', 'Global owner ID in Shopify'),
122
+ ],
123
+ },
124
+ ];
125
+ //# sourceMappingURL=metafieldValue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metafieldValue.js","sourceRoot":"","sources":["../../../../../nodes/ShopifyCustom/config/operations/metafieldValue.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAGpC,MAAM,kBAAkB,GAAG;IAC1B,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACrC,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,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AS;aAClB;YACD,IAAA,iBAAQ,EAAC,SAAS,EAAE,UAAU,EAAE,4BAA4B,CAAC;SAC7D;KACD;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { IShopifyOperationConfig } from './types';
2
+ export declare const METAOBJECT_OPERATION_CONFIGS: IShopifyOperationConfig[];