@disruptive-learning/n8n-nodes-gigstack 1.1.1 → 1.1.2
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/dist/credentials/GigstackApi.credentials.d.ts +2 -1
- package/dist/credentials/GigstackApi.credentials.js +30 -17
- package/dist/nodes/Gigstack/GenericFunctions.d.ts +5 -0
- package/dist/nodes/Gigstack/GenericFunctions.js +78 -0
- package/dist/nodes/{Gigstack.node.d.ts → Gigstack/Gigstack.node.d.ts} +1 -1
- package/dist/nodes/Gigstack/Gigstack.node.js +952 -0
- package/dist/nodes/Gigstack/GigstackTrigger.node.d.ts +12 -0
- package/dist/nodes/Gigstack/GigstackTrigger.node.js +207 -0
- package/dist/nodes/Gigstack/descriptions/ClientDescription.d.ts +3 -0
- package/dist/nodes/Gigstack/descriptions/ClientDescription.js +595 -0
- package/dist/nodes/Gigstack/descriptions/InvoiceDescription.d.ts +3 -0
- package/dist/nodes/Gigstack/descriptions/InvoiceDescription.js +503 -0
- package/dist/nodes/Gigstack/descriptions/PaymentDescription.d.ts +3 -0
- package/dist/nodes/Gigstack/descriptions/PaymentDescription.js +454 -0
- package/dist/nodes/Gigstack/descriptions/ReceiptDescription.d.ts +3 -0
- package/dist/nodes/Gigstack/descriptions/ReceiptDescription.js +369 -0
- package/dist/nodes/Gigstack/descriptions/ServiceDescription.d.ts +3 -0
- package/dist/nodes/Gigstack/descriptions/ServiceDescription.js +381 -0
- package/dist/nodes/Gigstack/descriptions/TeamDescription.d.ts +3 -0
- package/dist/nodes/Gigstack/descriptions/TeamDescription.js +599 -0
- package/dist/nodes/Gigstack/descriptions/UserDescription.d.ts +3 -0
- package/dist/nodes/Gigstack/descriptions/UserDescription.js +362 -0
- package/dist/nodes/Gigstack/descriptions/WebhookDescription.d.ts +3 -0
- package/dist/nodes/Gigstack/descriptions/WebhookDescription.js +293 -0
- package/dist/nodes/Gigstack/descriptions/index.d.ts +8 -0
- package/dist/nodes/Gigstack/descriptions/index.js +24 -0
- package/dist/nodes/Gigstack/gigstack.svg +1 -0
- package/package.json +64 -71
- package/LICENSE +0 -21
- package/README.md +0 -81
- package/dist/nodes/Gigstack.node.js +0 -1207
- package/dist/nodes/gigstack.svg +0 -4
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.receiptFields = exports.receiptOperations = void 0;
|
|
4
|
+
exports.receiptOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['receipt'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Cancel',
|
|
18
|
+
value: 'cancel',
|
|
19
|
+
description: 'Cancel a receipt',
|
|
20
|
+
action: 'Cancel a receipt',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Create',
|
|
24
|
+
value: 'create',
|
|
25
|
+
description: 'Create a new receipt',
|
|
26
|
+
action: 'Create a receipt',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Get',
|
|
30
|
+
value: 'get',
|
|
31
|
+
description: 'Get a receipt by ID',
|
|
32
|
+
action: 'Get a receipt',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Get Many',
|
|
36
|
+
value: 'getAll',
|
|
37
|
+
description: 'Get many receipts',
|
|
38
|
+
action: 'Get many receipts',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Stamp',
|
|
42
|
+
value: 'stamp',
|
|
43
|
+
description: 'Stamp a receipt as CFDI invoice',
|
|
44
|
+
action: 'Stamp a receipt',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
default: 'getAll',
|
|
48
|
+
},
|
|
49
|
+
];
|
|
50
|
+
exports.receiptFields = [
|
|
51
|
+
// ----------------------------------
|
|
52
|
+
// receipt: create
|
|
53
|
+
// ----------------------------------
|
|
54
|
+
{
|
|
55
|
+
displayName: 'Client ID',
|
|
56
|
+
name: 'clientId',
|
|
57
|
+
type: 'string',
|
|
58
|
+
required: true,
|
|
59
|
+
default: '',
|
|
60
|
+
displayOptions: {
|
|
61
|
+
show: {
|
|
62
|
+
resource: ['receipt'],
|
|
63
|
+
operation: ['create'],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
description: 'The ID of the client for this receipt',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
displayName: 'Items',
|
|
70
|
+
name: 'items',
|
|
71
|
+
type: 'fixedCollection',
|
|
72
|
+
typeOptions: {
|
|
73
|
+
multipleValues: true,
|
|
74
|
+
minValue: 1,
|
|
75
|
+
},
|
|
76
|
+
required: true,
|
|
77
|
+
default: { itemValues: [{}] },
|
|
78
|
+
displayOptions: {
|
|
79
|
+
show: {
|
|
80
|
+
resource: ['receipt'],
|
|
81
|
+
operation: ['create'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
placeholder: 'Add Item',
|
|
85
|
+
options: [
|
|
86
|
+
{
|
|
87
|
+
name: 'itemValues',
|
|
88
|
+
displayName: 'Item',
|
|
89
|
+
values: [
|
|
90
|
+
{
|
|
91
|
+
displayName: 'Service ID',
|
|
92
|
+
name: 'id',
|
|
93
|
+
type: 'string',
|
|
94
|
+
default: '',
|
|
95
|
+
description: 'ID of the service/product',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
displayName: 'Quantity',
|
|
99
|
+
name: 'quantity',
|
|
100
|
+
type: 'number',
|
|
101
|
+
default: 1,
|
|
102
|
+
description: 'Quantity of items',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
displayName: 'Unit Price (Override)',
|
|
106
|
+
name: 'unit_price',
|
|
107
|
+
type: 'number',
|
|
108
|
+
default: 0,
|
|
109
|
+
typeOptions: {
|
|
110
|
+
numberPrecision: 2,
|
|
111
|
+
},
|
|
112
|
+
description: 'Override price (leave 0 to use service price)',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
description: 'Receipt line items',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
displayName: 'Additional Fields',
|
|
121
|
+
name: 'additionalFields',
|
|
122
|
+
type: 'collection',
|
|
123
|
+
placeholder: 'Add Field',
|
|
124
|
+
default: {},
|
|
125
|
+
displayOptions: {
|
|
126
|
+
show: {
|
|
127
|
+
resource: ['receipt'],
|
|
128
|
+
operation: ['create'],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
options: [
|
|
132
|
+
{
|
|
133
|
+
displayName: 'Currency',
|
|
134
|
+
name: 'currency',
|
|
135
|
+
type: 'options',
|
|
136
|
+
options: [
|
|
137
|
+
{ name: 'MXN - Mexican Peso', value: 'MXN' },
|
|
138
|
+
{ name: 'USD - US Dollar', value: 'USD' },
|
|
139
|
+
],
|
|
140
|
+
default: 'MXN',
|
|
141
|
+
description: 'Receipt currency',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
displayName: 'Periodicity',
|
|
145
|
+
name: 'periodicity',
|
|
146
|
+
type: 'options',
|
|
147
|
+
options: [
|
|
148
|
+
{ name: 'Day', value: 'day' },
|
|
149
|
+
{ name: 'Week', value: 'week' },
|
|
150
|
+
{ name: 'Two Weeks', value: 'fortnight' },
|
|
151
|
+
{ name: 'Month', value: 'month' },
|
|
152
|
+
{ name: 'Two Months', value: 'bimonth' },
|
|
153
|
+
],
|
|
154
|
+
default: 'month',
|
|
155
|
+
description: 'Validity period for stamping the receipt',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
displayName: 'Payment Form',
|
|
159
|
+
name: 'payment_form',
|
|
160
|
+
type: 'options',
|
|
161
|
+
options: [
|
|
162
|
+
{ name: '01 - Efectivo', value: '01' },
|
|
163
|
+
{ name: '03 - Transferencia Electronica', value: '03' },
|
|
164
|
+
{ name: '04 - Tarjeta de Credito', value: '04' },
|
|
165
|
+
{ name: '28 - Tarjeta de Debito', value: '28' },
|
|
166
|
+
{ name: '99 - Por Definir', value: '99' },
|
|
167
|
+
],
|
|
168
|
+
default: '03',
|
|
169
|
+
description: 'SAT payment form code',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
displayName: 'Metadata',
|
|
173
|
+
name: 'metadata',
|
|
174
|
+
type: 'json',
|
|
175
|
+
default: '{}',
|
|
176
|
+
description: 'Additional custom metadata as JSON',
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
// ----------------------------------
|
|
181
|
+
// receipt: get, cancel, stamp
|
|
182
|
+
// ----------------------------------
|
|
183
|
+
{
|
|
184
|
+
displayName: 'Receipt ID',
|
|
185
|
+
name: 'receiptId',
|
|
186
|
+
type: 'string',
|
|
187
|
+
required: true,
|
|
188
|
+
default: '',
|
|
189
|
+
displayOptions: {
|
|
190
|
+
show: {
|
|
191
|
+
resource: ['receipt'],
|
|
192
|
+
operation: ['get', 'cancel', 'stamp'],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
description: 'The ID of the receipt',
|
|
196
|
+
},
|
|
197
|
+
// ----------------------------------
|
|
198
|
+
// receipt: stamp
|
|
199
|
+
// ----------------------------------
|
|
200
|
+
{
|
|
201
|
+
displayName: 'Stamp To',
|
|
202
|
+
name: 'stamp_to',
|
|
203
|
+
type: 'options',
|
|
204
|
+
required: true,
|
|
205
|
+
options: [
|
|
206
|
+
{ name: 'Client - Stamp to Associated Client', value: 'client' },
|
|
207
|
+
{ name: 'General Public National', value: 'general_public_national' },
|
|
208
|
+
{ name: 'General Public Foreign', value: 'general_public_foreign' },
|
|
209
|
+
],
|
|
210
|
+
default: 'client',
|
|
211
|
+
displayOptions: {
|
|
212
|
+
show: {
|
|
213
|
+
resource: ['receipt'],
|
|
214
|
+
operation: ['stamp'],
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
description: 'Who to stamp the receipt to',
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
displayName: 'Stamp Options',
|
|
221
|
+
name: 'stampOptions',
|
|
222
|
+
type: 'collection',
|
|
223
|
+
placeholder: 'Add Option',
|
|
224
|
+
default: {},
|
|
225
|
+
displayOptions: {
|
|
226
|
+
show: {
|
|
227
|
+
resource: ['receipt'],
|
|
228
|
+
operation: ['stamp'],
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
options: [
|
|
232
|
+
{
|
|
233
|
+
displayName: 'Invoice Date',
|
|
234
|
+
name: 'date',
|
|
235
|
+
type: 'dateTime',
|
|
236
|
+
default: '',
|
|
237
|
+
description: 'Custom invoice date (defaults to now)',
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
displayName: 'Override Legal Name',
|
|
241
|
+
name: 'legal_name',
|
|
242
|
+
type: 'string',
|
|
243
|
+
default: '',
|
|
244
|
+
description: 'Override client legal name',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
displayName: 'Override Tax ID',
|
|
248
|
+
name: 'tax_id',
|
|
249
|
+
type: 'string',
|
|
250
|
+
default: '',
|
|
251
|
+
description: 'Override client RFC',
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
displayName: 'Override Tax System',
|
|
255
|
+
name: 'tax_system',
|
|
256
|
+
type: 'string',
|
|
257
|
+
default: '',
|
|
258
|
+
description: 'Override client tax system code',
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
displayName: 'Override Zip Code',
|
|
262
|
+
name: 'zip',
|
|
263
|
+
type: 'string',
|
|
264
|
+
default: '',
|
|
265
|
+
description: 'Override client zip code',
|
|
266
|
+
},
|
|
267
|
+
],
|
|
268
|
+
},
|
|
269
|
+
// ----------------------------------
|
|
270
|
+
// receipt: getAll
|
|
271
|
+
// ----------------------------------
|
|
272
|
+
{
|
|
273
|
+
displayName: 'Return All',
|
|
274
|
+
name: 'returnAll',
|
|
275
|
+
type: 'boolean',
|
|
276
|
+
default: false,
|
|
277
|
+
displayOptions: {
|
|
278
|
+
show: {
|
|
279
|
+
resource: ['receipt'],
|
|
280
|
+
operation: ['getAll'],
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
displayName: 'Limit',
|
|
287
|
+
name: 'limit',
|
|
288
|
+
type: 'number',
|
|
289
|
+
default: 50,
|
|
290
|
+
typeOptions: {
|
|
291
|
+
minValue: 1,
|
|
292
|
+
maxValue: 100,
|
|
293
|
+
},
|
|
294
|
+
displayOptions: {
|
|
295
|
+
show: {
|
|
296
|
+
resource: ['receipt'],
|
|
297
|
+
operation: ['getAll'],
|
|
298
|
+
returnAll: [false],
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
description: 'Max number of results to return',
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
displayName: 'Filters',
|
|
305
|
+
name: 'filters',
|
|
306
|
+
type: 'collection',
|
|
307
|
+
placeholder: 'Add Filter',
|
|
308
|
+
default: {},
|
|
309
|
+
displayOptions: {
|
|
310
|
+
show: {
|
|
311
|
+
resource: ['receipt'],
|
|
312
|
+
operation: ['getAll'],
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
options: [
|
|
316
|
+
{
|
|
317
|
+
displayName: 'Order By',
|
|
318
|
+
name: 'orderBy',
|
|
319
|
+
type: 'options',
|
|
320
|
+
options: [
|
|
321
|
+
{ name: 'Name', value: 'name' },
|
|
322
|
+
{ name: 'Created At', value: 'timestamp' },
|
|
323
|
+
],
|
|
324
|
+
default: 'timestamp',
|
|
325
|
+
description: 'Field to order results by',
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
displayName: 'Sort Direction',
|
|
329
|
+
name: 'sort',
|
|
330
|
+
type: 'options',
|
|
331
|
+
options: [
|
|
332
|
+
{ name: 'Ascending', value: 'asc' },
|
|
333
|
+
{ name: 'Descending', value: 'desc' },
|
|
334
|
+
],
|
|
335
|
+
default: 'desc',
|
|
336
|
+
description: 'Sort direction',
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
displayName: 'Created After',
|
|
340
|
+
name: 'createdAfter',
|
|
341
|
+
type: 'dateTime',
|
|
342
|
+
default: '',
|
|
343
|
+
description: 'Filter receipts created after this date',
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
displayName: 'Created Before',
|
|
347
|
+
name: 'createdBefore',
|
|
348
|
+
type: 'dateTime',
|
|
349
|
+
default: '',
|
|
350
|
+
description: 'Filter receipts created before this date',
|
|
351
|
+
},
|
|
352
|
+
],
|
|
353
|
+
},
|
|
354
|
+
// ----------------------------------
|
|
355
|
+
// receipt: Common - Team
|
|
356
|
+
// ----------------------------------
|
|
357
|
+
{
|
|
358
|
+
displayName: 'Team ID',
|
|
359
|
+
name: 'team',
|
|
360
|
+
type: 'string',
|
|
361
|
+
default: '',
|
|
362
|
+
displayOptions: {
|
|
363
|
+
show: {
|
|
364
|
+
resource: ['receipt'],
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
description: 'Team ID for Gigstack Connect (multi-team access). Leave empty to use default team.',
|
|
368
|
+
},
|
|
369
|
+
];
|