n8n-nodes-synca 1.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 (62) hide show
  1. package/dist/credentials/SyncaApi.credentials.d.ts +9 -0
  2. package/dist/credentials/SyncaApi.credentials.js +51 -0
  3. package/dist/credentials/SyncaApi.credentials.js.map +1 -0
  4. package/dist/nodes/Cashcow/SyncaCashcow.node.d.ts +10 -0
  5. package/dist/nodes/Cashcow/SyncaCashcow.node.js +185 -0
  6. package/dist/nodes/Cashcow/SyncaCashcow.node.js.map +1 -0
  7. package/dist/nodes/Cashcow/constants/cashcow-check-order-tracking.constant.d.ts +30 -0
  8. package/dist/nodes/Cashcow/constants/cashcow-check-order-tracking.constant.js +37 -0
  9. package/dist/nodes/Cashcow/constants/cashcow-check-order-tracking.constant.js.map +1 -0
  10. package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.d.ts +117 -0
  11. package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.js +290 -0
  12. package/dist/nodes/Cashcow/constants/cashcow-create-or-update-product.constant.js.map +1 -0
  13. package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.d.ts +189 -0
  14. package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.js +420 -0
  15. package/dist/nodes/Cashcow/constants/cashcow-create-order.constant.js.map +1 -0
  16. package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.d.ts +46 -0
  17. package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.js +166 -0
  18. package/dist/nodes/Cashcow/constants/cashcow-get-store-mailbox.constant.js.map +1 -0
  19. package/dist/nodes/Cashcow/icon copy 2.svg +53 -0
  20. package/dist/nodes/Cashcow/icon copy.svg +65 -0
  21. package/dist/nodes/Cashcow/icon.svg +1 -0
  22. package/dist/nodes/Cashcow/last-icon.svg +38 -0
  23. package/dist/nodes/Mirakl/SyncaMirakl.node.d.ts +0 -0
  24. package/dist/nodes/Mirakl/SyncaMirakl.node.js +2 -0
  25. package/dist/nodes/Mirakl/SyncaMirakl.node.js.map +1 -0
  26. package/dist/nodes/OLD_SyncaPriority.node.d.ts +10 -0
  27. package/dist/nodes/OLD_SyncaPriority.node.js +389 -0
  28. package/dist/nodes/OLD_SyncaPriority.node.js.map +1 -0
  29. package/dist/nodes/Priority/SyncaPriority.node.d.ts +18 -0
  30. package/dist/nodes/Priority/SyncaPriority.node.js +313 -0
  31. package/dist/nodes/Priority/SyncaPriority.node.js.map +1 -0
  32. package/dist/nodes/Priority/constants/methods.d.ts +15 -0
  33. package/dist/nodes/Priority/constants/methods.js +299 -0
  34. package/dist/nodes/Priority/constants/methods.js.map +1 -0
  35. package/dist/nodes/Priority/constants/priority-agents.constant.d.ts +39 -0
  36. package/dist/nodes/Priority/constants/priority-agents.constant.js +114 -0
  37. package/dist/nodes/Priority/constants/priority-agents.constant.js.map +1 -0
  38. package/dist/nodes/Priority/constants/priority-generic.constant.d.ts +158 -0
  39. package/dist/nodes/Priority/constants/priority-generic.constant.js +219 -0
  40. package/dist/nodes/Priority/constants/priority-generic.constant.js.map +1 -0
  41. package/dist/nodes/Priority/constants/priority-procedure.constant.d.ts +129 -0
  42. package/dist/nodes/Priority/constants/priority-procedure.constant.js +178 -0
  43. package/dist/nodes/Priority/constants/priority-procedure.constant.js.map +1 -0
  44. package/dist/nodes/Priority/constants/priority-products.constant.d.ts +158 -0
  45. package/dist/nodes/Priority/constants/priority-products.constant.js +209 -0
  46. package/dist/nodes/Priority/constants/priority-products.constant.js.map +1 -0
  47. package/dist/nodes/Priority/constants/priority-purchase-orders.constant.d.ts +158 -0
  48. package/dist/nodes/Priority/constants/priority-purchase-orders.constant.js +218 -0
  49. package/dist/nodes/Priority/constants/priority-purchase-orders.constant.js.map +1 -0
  50. package/dist/nodes/Priority/constants/priority-sales.constant.d.ts +158 -0
  51. package/dist/nodes/Priority/constants/priority-sales.constant.js +383 -0
  52. package/dist/nodes/Priority/constants/priority-sales.constant.js.map +1 -0
  53. package/dist/nodes/Priority/icon.png +0 -0
  54. package/dist/nodes/Priority/icon.svg +1 -0
  55. package/dist/nodes/Superpharm/SyncaSuperpharm.node.d.ts +10 -0
  56. package/dist/nodes/Superpharm/SyncaSuperpharm.node.js +1072 -0
  57. package/dist/nodes/Superpharm/SyncaSuperpharm.node.js.map +1 -0
  58. package/dist/nodes/Superpharm/icon.svg +1 -0
  59. package/dist/nodes/Superpharm/old-icon.svg +22 -0
  60. package/dist/package.json +55 -0
  61. package/dist/tsconfig.tsbuildinfo +1 -0
  62. package/package.json +55 -0
@@ -0,0 +1,9 @@
1
+ import { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class SyncaApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SyncaApi = void 0;
4
+ class SyncaApi {
5
+ constructor() {
6
+ this.name = 'customSyncaApiCredentials';
7
+ this.displayName = 'Custom API Credentials';
8
+ this.documentationUrl = 'https://your-api-docs.com';
9
+ this.properties = [
10
+ {
11
+ displayName: 'API Token',
12
+ name: 'apiToken',
13
+ type: 'string',
14
+ typeOptions: {
15
+ password: true,
16
+ },
17
+ default: '',
18
+ required: true,
19
+ description: 'The API token for authentication',
20
+ },
21
+ {
22
+ displayName: 'Base URL',
23
+ name: 'baseUrl',
24
+ type: 'string',
25
+ default: 'http://87.71.191.82',
26
+ description: 'Base URL of your Synca instance',
27
+ },
28
+ ];
29
+ this.authenticate = {
30
+ type: 'generic',
31
+ properties: {
32
+ headers: {
33
+ 'X-API-Token': '={{$credentials.apiToken}}',
34
+ },
35
+ },
36
+ };
37
+ this.test = {
38
+ request: {
39
+ skipSslCertificateValidation: true,
40
+ headers: {
41
+ 'X-API-Token': '={{$credentials.apiToken}}',
42
+ },
43
+ baseURL: '={{$credentials.baseUrl}}',
44
+ url: '/v1/invoke/health-check',
45
+ method: 'GET',
46
+ },
47
+ };
48
+ }
49
+ }
50
+ exports.SyncaApi = SyncaApi;
51
+ //# sourceMappingURL=SyncaApi.credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SyncaApi.credentials.js","sourceRoot":"","sources":["../../credentials/SyncaApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,QAAQ;IAArB;QACC,SAAI,GAAG,2BAA2B,CAAC;QACnC,gBAAW,GAAG,wBAAwB,CAAC;QACvC,qBAAgB,GAAG,2BAA2B,CAAC;QAC/C,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;oBACZ,QAAQ,EAAE,IAAI;iBACd;gBACD,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,kCAAkC;aAC/C;YACK;gBACA,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,qBAAqB;gBAC9B,WAAW,EAAE,iCAAiC;aAC/C;SACL,CAAC;QAGF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,4BAA4B;iBAC3C;aACD;SACD,CAAC;QAEC,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACb,4BAA4B,EAAE,IAAI;gBAC5B,OAAO,EAAE;oBACP,aAAa,EAAE,4BAA4B;iBAC5C;gBACD,OAAO,EAAE,2BAA2B;gBACpC,GAAG,EAAE,yBAAyB;gBAC9B,MAAM,EAAE,KAAK;aACd;SACF,CAAC;IACN,CAAC;CAAA;AA9CD,4BA8CC"}
@@ -0,0 +1,10 @@
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
2
+ export declare class SyncaCashcow implements INodeType {
3
+ description: INodeTypeDescription;
4
+ methods: {
5
+ loadOptions: {
6
+ getCredentials(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
7
+ };
8
+ };
9
+ execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
10
+ }
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SyncaCashcow = void 0;
4
+ const cashcow_create_order_constant_1 = require("./constants/cashcow-create-order.constant");
5
+ const cashcow_create_or_update_product_constant_1 = require("./constants/cashcow-create-or-update-product.constant");
6
+ const cashcow_check_order_tracking_constant_1 = require("./constants/cashcow-check-order-tracking.constant");
7
+ const cashcow_get_store_mailbox_constant_1 = require("./constants/cashcow-get-store-mailbox.constant");
8
+ class SyncaCashcow {
9
+ constructor() {
10
+ this.description = {
11
+ usableAsTool: true,
12
+ displayName: 'Synca Cashcow',
13
+ name: 'customSyncaCashcow',
14
+ icon: { light: 'file:icon.svg', dark: 'file:icon.svg' },
15
+ group: ['transform'],
16
+ version: 1,
17
+ description: 'Invoke Cashcow actions via the Synca backend',
18
+ defaults: { name: 'Synca Cashcow' },
19
+ inputs: ["main"],
20
+ outputs: ["main"],
21
+ credentials: [{ name: 'customSyncaApiCredentials', required: true }],
22
+ properties: [
23
+ {
24
+ displayName: 'Credentials',
25
+ name: 'credentials',
26
+ type: 'options',
27
+ typeOptions: { loadOptionsMethod: 'getCredentials' },
28
+ default: '',
29
+ required: true,
30
+ },
31
+ {
32
+ displayName: 'Resource',
33
+ name: 'resource',
34
+ type: 'options',
35
+ options: [
36
+ { name: 'Account', value: 'account' },
37
+ { name: 'Store', value: 'store' },
38
+ { name: 'Product', value: 'product' },
39
+ ],
40
+ default: 'account',
41
+ },
42
+ {
43
+ displayName: 'Operation',
44
+ name: 'operation',
45
+ type: 'options',
46
+ displayOptions: { show: { resource: ['account'] } },
47
+ options: [{ name: 'Get Info', value: 'get_account_info' }],
48
+ default: 'get_account_info',
49
+ },
50
+ {
51
+ displayName: 'Operation',
52
+ name: 'operation',
53
+ type: 'options',
54
+ displayOptions: { show: { resource: ['store'] } },
55
+ options: [
56
+ { name: 'List Orders', value: 'list_orders' },
57
+ { name: 'Create Order', value: 'create_order' },
58
+ { name: 'Check Order Tracking', value: 'check_order_tracking' },
59
+ { name: 'Get Store Mailbox', value: 'get_store_mailbox' },
60
+ ],
61
+ default: 'list_orders',
62
+ },
63
+ {
64
+ displayName: 'Operation',
65
+ name: 'operation',
66
+ type: 'options',
67
+ displayOptions: { show: { resource: ['product'] } },
68
+ options: [
69
+ { name: 'Create / Update', value: 'create_or_update_product' },
70
+ { name: 'Exists?', value: 'product_exists' },
71
+ { name: 'Get Quantity', value: 'get_product_qty' },
72
+ ],
73
+ default: 'create_or_update_product',
74
+ },
75
+ ...cashcow_create_order_constant_1.CashcowCreateOrder.declare,
76
+ {
77
+ displayName: 'Order Status IDs',
78
+ name: 'order_status',
79
+ type: 'string',
80
+ default: '',
81
+ description: 'Comma-separated status IDs (see Cashcow docs)',
82
+ displayOptions: { show: { resource: ['store'], operation: ['list_orders'] } },
83
+ },
84
+ ...cashcow_create_or_update_product_constant_1.CashcowCreateOrUpdateProduct.decalre,
85
+ {
86
+ displayName: 'SKU',
87
+ name: 'sku',
88
+ type: 'string',
89
+ default: '',
90
+ displayOptions: { show: { resource: ['product'], operation: ['product_exists'] } },
91
+ },
92
+ {
93
+ displayName: 'Product IDs',
94
+ name: 'product_ids',
95
+ type: 'string',
96
+ default: '',
97
+ description: 'Comma-separated list',
98
+ displayOptions: { show: { resource: ['product'], operation: ['get_product_qty'] } },
99
+ },
100
+ ...cashcow_check_order_tracking_constant_1.CashcowCheckOrderTracking.declare,
101
+ ...cashcow_get_store_mailbox_constant_1.CashcowGetStoreMailbox.declare,
102
+ ],
103
+ };
104
+ this.methods = {
105
+ loadOptions: {
106
+ async getCredentials() {
107
+ try {
108
+ const { apiToken, baseUrl } = await this.getCredentials('customSyncaApiCredentials');
109
+ const res = await this.helpers.httpRequest({
110
+ method: 'GET',
111
+ url: `${baseUrl}/v1/invoke/get-credentials`,
112
+ headers: { 'x-api-token': apiToken },
113
+ });
114
+ return Array.isArray(res)
115
+ ? res.map((c) => ({ name: c.name || c.id, value: c.id }))
116
+ : [];
117
+ }
118
+ catch {
119
+ return [{ name: 'Default', value: 'default' }];
120
+ }
121
+ },
122
+ },
123
+ };
124
+ }
125
+ async execute() {
126
+ const items = this.getInputData();
127
+ const out = [];
128
+ const { apiToken, baseUrl } = await this.getCredentials('customSyncaApiCredentials');
129
+ for (let i = 0; i < items.length; i++) {
130
+ try {
131
+ const credentialId = this.getNodeParameter('credentials', i);
132
+ const operation = this.getNodeParameter('operation', i);
133
+ let params = {};
134
+ if (operation === 'create_or_update_product') {
135
+ params = cashcow_create_or_update_product_constant_1.CashcowCreateOrUpdateProduct.process(params, i, this.getNodeParameter);
136
+ }
137
+ else if (operation === 'create_order') {
138
+ params = cashcow_create_order_constant_1.CashcowCreateOrder.process(params, i, this.getNodeParameter);
139
+ }
140
+ else if (operation === 'check_order_tracking') {
141
+ params = cashcow_check_order_tracking_constant_1.CashcowCheckOrderTracking.process(params, i, this.getNodeParameter);
142
+ }
143
+ else if (operation === 'get_store_mailbox') {
144
+ params = cashcow_get_store_mailbox_constant_1.CashcowGetStoreMailbox.process(params, i, this.getNodeParameter);
145
+ }
146
+ else {
147
+ for (const p of [
148
+ 'store_id', 'cart', 'is_confirm_payment', 'order_status',
149
+ 'product', 'sku', 'product_ids',
150
+ 'order_id', 'email_address',
151
+ 'page', 'page_size', 'message_type', 'date_from', 'date_to',
152
+ 'read_status', 'customer_id', 'search_query', 'order_by',
153
+ ]) {
154
+ try {
155
+ const val = this.getNodeParameter(p, i, undefined);
156
+ if (val !== undefined)
157
+ params[p] = val;
158
+ }
159
+ catch {
160
+ }
161
+ }
162
+ }
163
+ const req = {
164
+ method: 'POST',
165
+ url: `${baseUrl}/v1/invoke/${credentialId}/${operation}`,
166
+ headers: { 'x-api-token': apiToken, 'Content-Type': 'application/json' },
167
+ body: params,
168
+ json: true,
169
+ };
170
+ const response = await this.helpers.httpRequest(req);
171
+ out.push({ json: response, pairedItem: { item: i } });
172
+ }
173
+ catch (err) {
174
+ if (this.continueOnFail()) {
175
+ out.push({ json: { error: err.message }, pairedItem: { item: i } });
176
+ continue;
177
+ }
178
+ throw err;
179
+ }
180
+ }
181
+ return [out];
182
+ }
183
+ }
184
+ exports.SyncaCashcow = SyncaCashcow;
185
+ //# sourceMappingURL=SyncaCashcow.node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SyncaCashcow.node.js","sourceRoot":"","sources":["../../../nodes/Cashcow/SyncaCashcow.node.ts"],"names":[],"mappings":";;;AAUA,6FAA+E;AAC/E,qHAAqG;AACrG,6GAA8F;AAC9F,uGAAwF;AAOxF,MAAa,YAAY;IAAzB;QACE,gBAAW,GAAyB;YAClC,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,eAAe;YAC5B,IAAI,EAAE,oBAAoB;YAC1B,IAAI,EAAE,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,eAAe,EAAE;YACvD,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE;YACnC,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,2BAA2B,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YACpE,UAAU,EAAE;gBAIV;oBACE,WAAW,EAAE,aAAa;oBAC1B,IAAI,EAAE,aAAa;oBACnB,IAAI,EAAE,SAAS;oBACf,WAAW,EAAE,EAAE,iBAAiB,EAAE,gBAAgB,EAAE;oBACpD,OA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BAoBD,MAAM,GAAG,GAAwB;oBAC/B,MAAM,EAAE,MAAM;oBACd,GAAG,EAAE,GAAG,OAAO,cAAc,YAAY,IAAI,SAAS,EAAE;oBACxD,OAAO,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,kBAAkB,EAAE;oBACxE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI;iBACX,CAAC;gBAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;gBACrD,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;aACvD;YAAC,OAAO,GAAG,EAAE;gBACZ,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE;oBACzB,GAAG,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAG,GAAW,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC7E,SAAS;iBACV;gBACD,MAAM,GAAG,CAAC;aACX;SACF;QACD,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;CACF;AAlOD,oCAkOC"}
@@ -0,0 +1,30 @@
1
+ export declare const CashcowCheckOrderTracking: {
2
+ declare: ({
3
+ displayName: string;
4
+ name: string;
5
+ type: string;
6
+ required: boolean;
7
+ default: number;
8
+ description: string;
9
+ displayOptions: {
10
+ show: {
11
+ resource: string[];
12
+ operation: string[];
13
+ };
14
+ };
15
+ } | {
16
+ displayName: string;
17
+ name: string;
18
+ type: string;
19
+ required: boolean;
20
+ default: string;
21
+ description: string;
22
+ displayOptions: {
23
+ show: {
24
+ resource: string[];
25
+ operation: string[];
26
+ };
27
+ };
28
+ })[];
29
+ process: (params: any, i: number, getNodeParameter: (parameterName: string, itemIndex: number, fallbackValue?: any) => string | number | boolean | object) => any;
30
+ };
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CashcowCheckOrderTracking = void 0;
4
+ exports.CashcowCheckOrderTracking = {
5
+ declare: [
6
+ {
7
+ displayName: 'Order ID',
8
+ name: 'order_id',
9
+ type: 'number',
10
+ required: true,
11
+ default: 0,
12
+ description: 'Order ID to track',
13
+ displayOptions: { show: { resource: ['store'], operation: ['check_order_tracking'] } },
14
+ },
15
+ {
16
+ displayName: 'Customer Email',
17
+ name: 'email_address',
18
+ type: 'string',
19
+ required: true,
20
+ default: '',
21
+ description: 'Customer email address associated with the order',
22
+ displayOptions: { show: { resource: ['store'], operation: ['check_order_tracking'] } },
23
+ },
24
+ ],
25
+ process: (params, i, getNodeParameter) => {
26
+ const orderId = getNodeParameter('order_id', i);
27
+ const emailAddress = getNodeParameter('email_address', i);
28
+ if (!orderId)
29
+ throw new Error('Order ID is required');
30
+ if (!emailAddress || emailAddress.trim() === '')
31
+ throw new Error('Customer email is required');
32
+ params.order_id = orderId;
33
+ params.email_address = emailAddress.trim();
34
+ return params;
35
+ }
36
+ };
37
+ //# sourceMappingURL=cashcow-check-order-tracking.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cashcow-check-order-tracking.constant.js","sourceRoot":"","sources":["../../../../nodes/Cashcow/constants/cashcow-check-order-tracking.constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG;IACrC,OAAO,EAAE;QACL;YACI,WAAW,EAAE,UAAU;YACvB,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,mBAAmB;YAChC,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,sBAAsB,CAAC,EAAE,EAAE;SACzF;QACD;YACI,WAAW,EAAE,gBAAgB;YAC7B,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,kDAAkD;YAC/D,cAAc,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,sBAAsB,CAAC,EAAE,EAAE;SACzF;KACJ;IACD,OAAO,EAAE,CAAC,MAAW,EAAE,CAAS,EAAE,gBAAuH,EAAE,EAAE;QAEzJ,MAAM,OAAO,GAAG,gBAAgB,CAAC,UAAU,EAAE,CAAC,CAAW,CAAC;QAC1D,MAAM,YAAY,GAAG,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAW,CAAC;QAEpE,IAAI,CAAC,OAAO;YAAE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACtD,IAAI,CAAC,YAAY,IAAI,YAAY,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QAE/F,MAAM,CAAC,QAAQ,GAAG,OAAO,CAAC;QAC1B,MAAM,CAAC,aAAa,GAAG,YAAY,CAAC,IAAI,EAAE,CAAC;QAE3C,OAAO,MAAM,CAAC;IAClB,CAAC;CACJ,CAAC"}
@@ -0,0 +1,117 @@
1
+ export declare const CashcowCreateOrUpdateProduct: {
2
+ decalre: ({
3
+ displayName: string;
4
+ name: string;
5
+ type: string;
6
+ required: boolean;
7
+ default: string;
8
+ description: string;
9
+ displayOptions: {
10
+ show: {
11
+ resource: string[];
12
+ operation: string[];
13
+ };
14
+ };
15
+ options?: undefined;
16
+ typeOptions?: undefined;
17
+ } | {
18
+ displayName: string;
19
+ name: string;
20
+ type: string;
21
+ required: boolean;
22
+ default: string;
23
+ options: {
24
+ name: string;
25
+ value: string;
26
+ }[];
27
+ description: string;
28
+ displayOptions: {
29
+ show: {
30
+ resource: string[];
31
+ operation: string[];
32
+ };
33
+ };
34
+ typeOptions?: undefined;
35
+ } | {
36
+ displayName: string;
37
+ name: string;
38
+ type: string;
39
+ default: boolean;
40
+ description: string;
41
+ displayOptions: {
42
+ show: {
43
+ resource: string[];
44
+ operation: string[];
45
+ };
46
+ };
47
+ required?: undefined;
48
+ options?: undefined;
49
+ typeOptions?: undefined;
50
+ } | {
51
+ displayName: string;
52
+ name: string;
53
+ type: string;
54
+ default: string;
55
+ description: string;
56
+ displayOptions: {
57
+ show: {
58
+ resource: string[];
59
+ operation: string[];
60
+ };
61
+ };
62
+ required?: undefined;
63
+ options?: undefined;
64
+ typeOptions?: undefined;
65
+ } | {
66
+ displayName: string;
67
+ name: string;
68
+ type: string;
69
+ typeOptions: {
70
+ rows: number;
71
+ };
72
+ default: string;
73
+ description: string;
74
+ displayOptions: {
75
+ show: {
76
+ resource: string[];
77
+ operation: string[];
78
+ };
79
+ };
80
+ required?: undefined;
81
+ options?: undefined;
82
+ } | {
83
+ displayName: string;
84
+ name: string;
85
+ type: string;
86
+ default: number;
87
+ description: string;
88
+ displayOptions: {
89
+ show: {
90
+ resource: string[];
91
+ operation: string[];
92
+ };
93
+ };
94
+ required?: undefined;
95
+ options?: undefined;
96
+ typeOptions?: undefined;
97
+ } | {
98
+ displayName: string;
99
+ name: string;
100
+ type: string;
101
+ default: number;
102
+ options: {
103
+ name: string;
104
+ value: number;
105
+ }[];
106
+ description: string;
107
+ displayOptions: {
108
+ show: {
109
+ resource: string[];
110
+ operation: string[];
111
+ };
112
+ };
113
+ required?: undefined;
114
+ typeOptions?: undefined;
115
+ })[];
116
+ process: (params: any, i: number, getNodeParameter: (parameterName: string, itemIndex: number, fallbackValue?: any) => string | number | boolean | object) => any;
117
+ };