@wals-pro/n8n-nodes-weclapp 0.3.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 (98) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +206 -0
  3. package/dist/credentials/WeclappApi.credentials.d.ts +10 -0
  4. package/dist/credentials/WeclappApi.credentials.js +56 -0
  5. package/dist/credentials/WeclappApi.credentials.js.map +1 -0
  6. package/dist/credentials/weclapp.dark.svg +19 -0
  7. package/dist/credentials/weclapp.light.svg +19 -0
  8. package/dist/nodes/Weclapp/GenericFunctions.d.ts +19 -0
  9. package/dist/nodes/Weclapp/GenericFunctions.js +287 -0
  10. package/dist/nodes/Weclapp/GenericFunctions.js.map +1 -0
  11. package/dist/nodes/Weclapp/SharedFields.d.ts +24 -0
  12. package/dist/nodes/Weclapp/SharedFields.js +348 -0
  13. package/dist/nodes/Weclapp/SharedFields.js.map +1 -0
  14. package/dist/nodes/Weclapp/Weclapp.node.d.ts +27 -0
  15. package/dist/nodes/Weclapp/Weclapp.node.js +231 -0
  16. package/dist/nodes/Weclapp/Weclapp.node.js.map +1 -0
  17. package/dist/nodes/Weclapp/actions/applyPayment.d.ts +9 -0
  18. package/dist/nodes/Weclapp/actions/applyPayment.js +64 -0
  19. package/dist/nodes/Weclapp/actions/applyPayment.js.map +1 -0
  20. package/dist/nodes/Weclapp/actions/articlePriceSync.d.ts +41 -0
  21. package/dist/nodes/Weclapp/actions/articlePriceSync.js +238 -0
  22. package/dist/nodes/Weclapp/actions/articlePriceSync.js.map +1 -0
  23. package/dist/nodes/Weclapp/actions/documentUpload.d.ts +3 -0
  24. package/dist/nodes/Weclapp/actions/documentUpload.js +90 -0
  25. package/dist/nodes/Weclapp/actions/documentUpload.js.map +1 -0
  26. package/dist/nodes/Weclapp/descriptions/ArticleDescription.d.ts +3 -0
  27. package/dist/nodes/Weclapp/descriptions/ArticleDescription.js +724 -0
  28. package/dist/nodes/Weclapp/descriptions/ArticleDescription.js.map +1 -0
  29. package/dist/nodes/Weclapp/descriptions/BankDescription.d.ts +6 -0
  30. package/dist/nodes/Weclapp/descriptions/BankDescription.js +471 -0
  31. package/dist/nodes/Weclapp/descriptions/BankDescription.js.map +1 -0
  32. package/dist/nodes/Weclapp/descriptions/CustomApiDescription.d.ts +4 -0
  33. package/dist/nodes/Weclapp/descriptions/CustomApiDescription.js +238 -0
  34. package/dist/nodes/Weclapp/descriptions/CustomApiDescription.js.map +1 -0
  35. package/dist/nodes/Weclapp/descriptions/DocumentDescription.d.ts +3 -0
  36. package/dist/nodes/Weclapp/descriptions/DocumentDescription.js +976 -0
  37. package/dist/nodes/Weclapp/descriptions/DocumentDescription.js.map +1 -0
  38. package/dist/nodes/Weclapp/descriptions/PartyDescription.d.ts +4 -0
  39. package/dist/nodes/Weclapp/descriptions/PartyDescription.js +408 -0
  40. package/dist/nodes/Weclapp/descriptions/PartyDescription.js.map +1 -0
  41. package/dist/nodes/Weclapp/descriptions/ProductionOrderDescription.d.ts +4 -0
  42. package/dist/nodes/Weclapp/descriptions/ProductionOrderDescription.js +628 -0
  43. package/dist/nodes/Weclapp/descriptions/ProductionOrderDescription.js.map +1 -0
  44. package/dist/nodes/Weclapp/descriptions/PurchaseInvoiceDescription.d.ts +3 -0
  45. package/dist/nodes/Weclapp/descriptions/PurchaseInvoiceDescription.js +559 -0
  46. package/dist/nodes/Weclapp/descriptions/PurchaseInvoiceDescription.js.map +1 -0
  47. package/dist/nodes/Weclapp/descriptions/PurchaseOrderDescription.d.ts +3 -0
  48. package/dist/nodes/Weclapp/descriptions/PurchaseOrderDescription.js +681 -0
  49. package/dist/nodes/Weclapp/descriptions/PurchaseOrderDescription.js.map +1 -0
  50. package/dist/nodes/Weclapp/descriptions/QuotationDescription.d.ts +3 -0
  51. package/dist/nodes/Weclapp/descriptions/QuotationDescription.js +1069 -0
  52. package/dist/nodes/Weclapp/descriptions/QuotationDescription.js.map +1 -0
  53. package/dist/nodes/Weclapp/descriptions/SalesInvoiceDescription.d.ts +3 -0
  54. package/dist/nodes/Weclapp/descriptions/SalesInvoiceDescription.js +994 -0
  55. package/dist/nodes/Weclapp/descriptions/SalesInvoiceDescription.js.map +1 -0
  56. package/dist/nodes/Weclapp/descriptions/SalesOrderDescription.d.ts +4 -0
  57. package/dist/nodes/Weclapp/descriptions/SalesOrderDescription.js +1122 -0
  58. package/dist/nodes/Weclapp/descriptions/SalesOrderDescription.js.map +1 -0
  59. package/dist/nodes/Weclapp/descriptions/ShipmentDescription.d.ts +3 -0
  60. package/dist/nodes/Weclapp/descriptions/ShipmentDescription.js +502 -0
  61. package/dist/nodes/Weclapp/descriptions/ShipmentDescription.js.map +1 -0
  62. package/dist/nodes/Weclapp/descriptions/TagUnitUserDescription.d.ts +9 -0
  63. package/dist/nodes/Weclapp/descriptions/TagUnitUserDescription.js +664 -0
  64. package/dist/nodes/Weclapp/descriptions/TagUnitUserDescription.js.map +1 -0
  65. package/dist/nodes/Weclapp/descriptions/TicketDescription.d.ts +9 -0
  66. package/dist/nodes/Weclapp/descriptions/TicketDescription.js +745 -0
  67. package/dist/nodes/Weclapp/descriptions/TicketDescription.js.map +1 -0
  68. package/dist/nodes/Weclapp/descriptions/WarehouseDescription.d.ts +35 -0
  69. package/dist/nodes/Weclapp/descriptions/WarehouseDescription.js +935 -0
  70. package/dist/nodes/Weclapp/descriptions/WarehouseDescription.js.map +1 -0
  71. package/dist/nodes/Weclapp/descriptions/WebhookDescription.d.ts +4 -0
  72. package/dist/nodes/Weclapp/descriptions/WebhookDescription.js +411 -0
  73. package/dist/nodes/Weclapp/descriptions/WebhookDescription.js.map +1 -0
  74. package/dist/nodes/Weclapp/descriptions/index.d.ts +3 -0
  75. package/dist/nodes/Weclapp/descriptions/index.js +56 -0
  76. package/dist/nodes/Weclapp/descriptions/index.js.map +1 -0
  77. package/dist/nodes/Weclapp/generated/entityMetadata.d.ts +3 -0
  78. package/dist/nodes/Weclapp/generated/entityMetadata.js +368 -0
  79. package/dist/nodes/Weclapp/generated/entityMetadata.js.map +1 -0
  80. package/dist/nodes/Weclapp/generated/openapiMetadata.d.ts +3 -0
  81. package/dist/nodes/Weclapp/generated/openapiMetadata.js +212 -0
  82. package/dist/nodes/Weclapp/generated/openapiMetadata.js.map +1 -0
  83. package/dist/nodes/Weclapp/methods/customAttributes.d.ts +32 -0
  84. package/dist/nodes/Weclapp/methods/customAttributes.js +156 -0
  85. package/dist/nodes/Weclapp/methods/customAttributes.js.map +1 -0
  86. package/dist/nodes/Weclapp/methods/loadOptions.d.ts +3 -0
  87. package/dist/nodes/Weclapp/methods/loadOptions.js +107 -0
  88. package/dist/nodes/Weclapp/methods/loadOptions.js.map +1 -0
  89. package/dist/nodes/Weclapp/weclapp.dark.svg +19 -0
  90. package/dist/nodes/Weclapp/weclapp.light.svg +19 -0
  91. package/dist/nodes/WeclappTrigger/WeclappTrigger.node.d.ts +12 -0
  92. package/dist/nodes/WeclappTrigger/WeclappTrigger.node.js +198 -0
  93. package/dist/nodes/WeclappTrigger/WeclappTrigger.node.js.map +1 -0
  94. package/dist/nodes/WeclappTrigger/weclapp.dark.svg +19 -0
  95. package/dist/nodes/WeclappTrigger/weclapp.light.svg +19 -0
  96. package/dist/package.json +78 -0
  97. package/dist/tsconfig.tsbuildinfo +1 -0
  98. package/package.json +78 -0
@@ -0,0 +1,681 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderFields = exports.purchaseOrderOperations = void 0;
4
+ const SharedFields_1 = require("../SharedFields");
5
+ const GenericFunctions_1 = require("../GenericFunctions");
6
+ exports.purchaseOrderOperations = [
7
+ {
8
+ displayName: 'Operation',
9
+ name: 'operation',
10
+ type: 'options',
11
+ noDataExpression: true,
12
+ displayOptions: {
13
+ show: {
14
+ resource: ['purchaseOrder'],
15
+ },
16
+ },
17
+ options: [
18
+ {
19
+ name: 'Cancel Dropshipping Shipments',
20
+ value: 'cancelDropshippingShipments',
21
+ description: 'Cancel one or more dropshipping shipments and their corresponding incoming goods',
22
+ action: 'Cancel dropshipping shipments for a purchase order',
23
+ routing: {
24
+ request: {
25
+ method: 'POST',
26
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/cancelDropshippingShipments',
27
+ },
28
+ output: {
29
+ postReceive: [
30
+ {
31
+ type: 'rootProperty',
32
+ properties: { property: 'result' },
33
+ },
34
+ ],
35
+ },
36
+ },
37
+ },
38
+ {
39
+ name: 'Create',
40
+ value: 'create',
41
+ description: 'Create a new purchase order',
42
+ action: 'Create a purchase order',
43
+ routing: {
44
+ request: {
45
+ method: 'POST',
46
+ url: '/purchaseOrder',
47
+ },
48
+ },
49
+ },
50
+ {
51
+ name: 'Create Cancellation Slip PDF',
52
+ value: 'createCancellationSlipPdf',
53
+ description: 'Trigger generation of a cancellation slip PDF for the purchase order',
54
+ action: 'Create cancellation slip PDF for a purchase order',
55
+ routing: {
56
+ request: {
57
+ method: 'POST',
58
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/createCancellationSlipPdf',
59
+ },
60
+ output: {
61
+ postReceive: [
62
+ {
63
+ type: 'set',
64
+ properties: {
65
+ value: '={{ { "success": true, "id": $parameter["purchaseOrderId"] } }}',
66
+ },
67
+ },
68
+ ],
69
+ },
70
+ },
71
+ },
72
+ {
73
+ name: 'Create Dropshipping Delivery Note PDF',
74
+ value: 'createDropshippingDeliveryNotePdf',
75
+ description: 'Create and return a dropshipping delivery note PDF as binary data',
76
+ action: 'Create dropshipping delivery note PDF for a purchase order',
77
+ routing: {
78
+ request: {
79
+ method: 'POST',
80
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/createDropshippingDeliveryNotePdf',
81
+ encoding: 'arraybuffer',
82
+ returnFullResponse: true,
83
+ },
84
+ output: {
85
+ postReceive: [
86
+ {
87
+ type: 'binaryData',
88
+ properties: { destinationProperty: 'data' },
89
+ },
90
+ ],
91
+ },
92
+ },
93
+ },
94
+ {
95
+ name: 'Create Incoming Goods',
96
+ value: 'createIncomingGoods',
97
+ description: 'Create incoming goods from this purchase order',
98
+ action: 'Create incoming goods for a purchase order',
99
+ routing: {
100
+ request: {
101
+ method: 'POST',
102
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/createIncomingGoods',
103
+ },
104
+ output: {
105
+ postReceive: [
106
+ {
107
+ type: 'rootProperty',
108
+ properties: { property: 'result' },
109
+ },
110
+ ],
111
+ },
112
+ },
113
+ },
114
+ {
115
+ name: 'Create Purchase Invoice',
116
+ value: 'createPurchaseInvoice',
117
+ description: 'Create a purchase invoice from this purchase order',
118
+ action: 'Create purchase invoice for a purchase order',
119
+ routing: {
120
+ request: {
121
+ method: 'POST',
122
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/createPurchaseInvoice',
123
+ },
124
+ output: {
125
+ postReceive: [
126
+ {
127
+ type: 'rootProperty',
128
+ properties: { property: 'result' },
129
+ },
130
+ ],
131
+ },
132
+ },
133
+ },
134
+ {
135
+ name: 'Create Supplier Return',
136
+ value: 'createSupplierReturn',
137
+ description: 'Create a supplier return shipment from this purchase order',
138
+ action: 'Create supplier return for a purchase order',
139
+ routing: {
140
+ request: {
141
+ method: 'POST',
142
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/createSupplierReturn',
143
+ },
144
+ output: {
145
+ postReceive: [
146
+ {
147
+ type: 'rootProperty',
148
+ properties: { property: 'result' },
149
+ },
150
+ ],
151
+ },
152
+ },
153
+ },
154
+ {
155
+ name: 'Delete',
156
+ value: 'delete',
157
+ description: 'Delete a purchase order by ID',
158
+ action: 'Delete a purchase order',
159
+ routing: {
160
+ request: {
161
+ method: 'DELETE',
162
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}',
163
+ },
164
+ output: {
165
+ postReceive: [
166
+ {
167
+ type: 'set',
168
+ properties: {
169
+ value: '={{ { "deleted": true, "id": $parameter["purchaseOrderId"] } }}',
170
+ },
171
+ },
172
+ ],
173
+ },
174
+ },
175
+ },
176
+ {
177
+ name: 'Download Latest Cancellation Slip PDF',
178
+ value: 'downloadLatestCancellationSlipPdf',
179
+ description: 'Download the latest cancellation slip PDF as binary data',
180
+ action: 'Download latest cancellation slip PDF for a purchase order',
181
+ routing: {
182
+ request: {
183
+ method: 'GET',
184
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/downloadLatestCancellationSlipPdf',
185
+ encoding: 'arraybuffer',
186
+ returnFullResponse: true,
187
+ },
188
+ output: {
189
+ postReceive: [
190
+ {
191
+ type: 'binaryData',
192
+ properties: { destinationProperty: 'data' },
193
+ },
194
+ ],
195
+ },
196
+ },
197
+ },
198
+ {
199
+ name: 'Download Latest Dropshipping Delivery Note PDF',
200
+ value: 'downloadLatestDropshippingDeliveryNotePdf',
201
+ description: 'Download the latest dropshipping delivery note PDF as binary data',
202
+ action: 'Download latest dropshipping delivery note PDF for a purchase order',
203
+ routing: {
204
+ request: {
205
+ method: 'GET',
206
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/downloadLatestDropshippingDeliveryNotePdf',
207
+ encoding: 'arraybuffer',
208
+ returnFullResponse: true,
209
+ },
210
+ output: {
211
+ postReceive: [
212
+ {
213
+ type: 'binaryData',
214
+ properties: { destinationProperty: 'data' },
215
+ },
216
+ ],
217
+ },
218
+ },
219
+ },
220
+ {
221
+ name: 'Download Latest Purchase Order PDF',
222
+ value: 'downloadLatestPurchaseOrderPdf',
223
+ description: 'Download the latest purchase order PDF as binary data',
224
+ action: 'Download latest purchase order PDF',
225
+ routing: {
226
+ request: {
227
+ method: 'GET',
228
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/downloadLatestPurchaseOrderPdf',
229
+ encoding: 'arraybuffer',
230
+ returnFullResponse: true,
231
+ },
232
+ output: {
233
+ postReceive: [
234
+ {
235
+ type: 'binaryData',
236
+ properties: { destinationProperty: 'data' },
237
+ },
238
+ ],
239
+ },
240
+ },
241
+ },
242
+ {
243
+ name: 'Get',
244
+ value: 'get',
245
+ description: 'Retrieve a specific purchase order by ID',
246
+ action: 'Get a purchase order',
247
+ routing: {
248
+ request: {
249
+ method: 'GET',
250
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}',
251
+ },
252
+ output: {
253
+ postReceive: [GenericFunctions_1.simplifyPostReceive],
254
+ },
255
+ },
256
+ },
257
+ {
258
+ name: 'Get Many',
259
+ value: 'list',
260
+ description: 'Retrieve a list of purchase orders',
261
+ action: 'Get many purchase orders',
262
+ routing: {
263
+ ...SharedFields_1.listPaginationRouting,
264
+ request: {
265
+ method: 'GET',
266
+ url: '/purchaseOrder',
267
+ },
268
+ output: {
269
+ postReceive: [
270
+ {
271
+ type: 'rootProperty',
272
+ properties: { property: 'result' },
273
+ },
274
+ GenericFunctions_1.mergeAdditionalProperties,
275
+ GenericFunctions_1.simplifyPostReceive,
276
+ ],
277
+ },
278
+ },
279
+ },
280
+ {
281
+ name: 'Print Label',
282
+ value: 'printLabel',
283
+ description: 'Print a label for purchase order items and return as binary data',
284
+ action: 'Print label for a purchase order',
285
+ routing: {
286
+ request: {
287
+ method: 'POST',
288
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/printLabel',
289
+ encoding: 'arraybuffer',
290
+ returnFullResponse: true,
291
+ },
292
+ output: {
293
+ postReceive: [
294
+ {
295
+ type: 'binaryData',
296
+ properties: { destinationProperty: 'data' },
297
+ },
298
+ ],
299
+ },
300
+ },
301
+ },
302
+ {
303
+ name: 'Process Dropshipping',
304
+ value: 'processDropshipping',
305
+ description: 'Process a dropshipping purchase order — creates incoming goods and shipment',
306
+ action: 'Process dropshipping for a purchase order',
307
+ routing: {
308
+ request: {
309
+ method: 'POST',
310
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}/processDropshipping',
311
+ },
312
+ output: {
313
+ postReceive: [
314
+ {
315
+ type: 'rootProperty',
316
+ properties: { property: 'result' },
317
+ },
318
+ ],
319
+ },
320
+ },
321
+ },
322
+ {
323
+ name: 'Update',
324
+ value: 'update',
325
+ description: 'Update an existing purchase order (PUT with ignoreMissingProperties=true)',
326
+ action: 'Update a purchase order',
327
+ routing: {
328
+ request: {
329
+ method: 'PUT',
330
+ url: '=/purchaseOrder/id/{{$parameter["purchaseOrderId"]}}',
331
+ qs: {
332
+ ignoreMissingProperties: true,
333
+ },
334
+ },
335
+ },
336
+ },
337
+ ],
338
+ default: 'list',
339
+ },
340
+ ];
341
+ exports.purchaseOrderFields = [
342
+ {
343
+ displayName: 'Purchase Order',
344
+ name: 'purchaseOrderId',
345
+ type: 'resourceLocator',
346
+ default: { mode: 'list', value: '' },
347
+ required: true,
348
+ description: 'The purchase order to operate on',
349
+ displayOptions: {
350
+ show: {
351
+ resource: ['purchaseOrder'],
352
+ operation: [
353
+ 'cancelDropshippingShipments',
354
+ 'createCancellationSlipPdf',
355
+ 'createDropshippingDeliveryNotePdf',
356
+ 'createIncomingGoods',
357
+ 'createPurchaseInvoice',
358
+ 'createSupplierReturn',
359
+ 'delete',
360
+ 'downloadLatestCancellationSlipPdf',
361
+ 'downloadLatestDropshippingDeliveryNotePdf',
362
+ 'downloadLatestPurchaseOrderPdf',
363
+ 'get',
364
+ 'printLabel',
365
+ 'processDropshipping',
366
+ 'update',
367
+ ],
368
+ },
369
+ },
370
+ modes: [
371
+ {
372
+ displayName: 'From List',
373
+ name: 'list',
374
+ type: 'list',
375
+ typeOptions: {
376
+ searchListMethod: 'searchPurchaseOrders',
377
+ searchable: true,
378
+ },
379
+ },
380
+ {
381
+ displayName: 'By ID',
382
+ name: 'id',
383
+ type: 'string',
384
+ placeholder: 'e.g. 1234567890',
385
+ validation: [
386
+ {
387
+ type: 'regex',
388
+ properties: {
389
+ regex: '^[0-9]+$',
390
+ errorMessage: 'Purchase Order ID must be numeric',
391
+ },
392
+ },
393
+ ],
394
+ },
395
+ {
396
+ displayName: 'By URL',
397
+ name: 'url',
398
+ type: 'string',
399
+ placeholder: 'e.g. https://tenant.weclapp.com/webapp/api/v2/purchaseOrder/id/1234567890',
400
+ extractValue: {
401
+ type: 'regex',
402
+ regex: '/purchaseOrder/id/([0-9]+)',
403
+ },
404
+ validation: [
405
+ {
406
+ type: 'regex',
407
+ properties: {
408
+ regex: '/purchaseOrder/id/[0-9]+',
409
+ errorMessage: 'URL must contain /purchaseOrder/id/{id}',
410
+ },
411
+ },
412
+ ],
413
+ },
414
+ ],
415
+ },
416
+ {
417
+ ...SharedFields_1.limitField,
418
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['list'] } },
419
+ },
420
+ {
421
+ displayName: 'Filter by Currency ID',
422
+ name: 'recordCurrencyIdFilter',
423
+ type: 'string',
424
+ default: '',
425
+ description: 'Filter by currency ID (recordCurrencyId-eq)',
426
+ placeholder: 'e.g. EUR',
427
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['list'] } },
428
+ routing: {
429
+ request: {
430
+ qs: {
431
+ 'recordCurrencyId-eq': '={{$value || undefined}}',
432
+ },
433
+ },
434
+ },
435
+ },
436
+ {
437
+ displayName: 'Filter by Order Date (From)',
438
+ name: 'orderDateFrom',
439
+ type: 'dateTime',
440
+ default: '',
441
+ description: 'Return orders with orderDate greater than or equal to this date (orderDate-ge)',
442
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['list'] } },
443
+ routing: {
444
+ request: {
445
+ qs: {
446
+ 'orderDate-ge': '={{$value ? new Date($value).getTime() : undefined}}',
447
+ },
448
+ },
449
+ },
450
+ },
451
+ {
452
+ displayName: 'Filter by Order Date (To)',
453
+ name: 'orderDateTo',
454
+ type: 'dateTime',
455
+ default: '',
456
+ description: 'Return orders with orderDate less than or equal to this date (orderDate-le)',
457
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['list'] } },
458
+ routing: {
459
+ request: {
460
+ qs: {
461
+ 'orderDate-le': '={{$value ? new Date($value).getTime() : undefined}}',
462
+ },
463
+ },
464
+ },
465
+ },
466
+ {
467
+ displayName: 'Filter by Order Number',
468
+ name: 'orderNumberFilter',
469
+ type: 'string',
470
+ default: '',
471
+ description: 'Filter by exact order number (orderNumber-eq)',
472
+ placeholder: 'e.g. PO-2024-001',
473
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['list'] } },
474
+ routing: {
475
+ request: {
476
+ qs: {
477
+ 'orderNumber-eq': '={{$value || undefined}}',
478
+ },
479
+ },
480
+ },
481
+ },
482
+ {
483
+ displayName: 'Filter by Supplier ID',
484
+ name: 'supplierIdFilter',
485
+ type: 'string',
486
+ default: '',
487
+ description: 'Filter by supplier party ID (supplierId-eq)',
488
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['list'] } },
489
+ routing: {
490
+ request: {
491
+ qs: {
492
+ 'supplierId-eq': '={{$value || undefined}}',
493
+ },
494
+ },
495
+ },
496
+ },
497
+ {
498
+ displayName: 'Filter by Status',
499
+ name: 'statusFilter',
500
+ type: 'options',
501
+ default: '',
502
+ description: 'Filter by purchase order status',
503
+ options: [
504
+ { name: '(All)', value: '' },
505
+ { name: 'Cancelled', value: 'CANCELLED' },
506
+ { name: 'Closed', value: 'CLOSED' },
507
+ { name: 'Confirmed', value: 'CONFIRMED' },
508
+ { name: 'Order Documents Printed', value: 'ORDER_DOCUMENTS_PRINTED' },
509
+ { name: 'Order Entry Completed', value: 'ORDER_ENTRY_COMPLETED' },
510
+ { name: 'Order Entry In Progress', value: 'ORDER_ENTRY_IN_PROGRESS' },
511
+ ],
512
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['list'] } },
513
+ routing: {
514
+ request: {
515
+ qs: {
516
+ 'status-eq': '={{$value || undefined}}',
517
+ },
518
+ },
519
+ },
520
+ },
521
+ {
522
+ ...SharedFields_1.filtersCollection,
523
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['list'] } },
524
+ },
525
+ {
526
+ ...SharedFields_1.simplifyField,
527
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['get', 'list'] } },
528
+ },
529
+ {
530
+ ...SharedFields_1.additionalFields,
531
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['get', 'list'] } },
532
+ },
533
+ {
534
+ displayName: 'Purchase Order Data',
535
+ name: 'purchaseOrderData',
536
+ type: 'json',
537
+ required: true,
538
+ default: '{}',
539
+ description: 'JSON body for the new purchase order. Include at minimum supplierId and purchase order items.',
540
+ placeholder: '{"supplierId": "123", "purchaseOrderItems": [{"articleId": "456", "quantity": "10"}]}',
541
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['create'] } },
542
+ routing: {
543
+ request: {
544
+ body: '={{JSON.parse($value)}}',
545
+ },
546
+ },
547
+ },
548
+ {
549
+ displayName: 'Update Fields',
550
+ name: 'updateFields',
551
+ type: 'json',
552
+ required: true,
553
+ default: '{}',
554
+ description: 'JSON fields to update on the purchase order. Uses PUT with ignoreMissingProperties=true so only provided fields are changed.',
555
+ placeholder: '{"status": "CONFIRMED"}',
556
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['update'] } },
557
+ routing: {
558
+ request: {
559
+ body: '={{JSON.parse($value)}}',
560
+ },
561
+ },
562
+ },
563
+ {
564
+ displayName: 'Shipment IDs',
565
+ name: 'shipmentIds',
566
+ type: 'string',
567
+ required: true,
568
+ default: '',
569
+ description: 'Comma-separated list of shipment IDs to cancel',
570
+ placeholder: 'e.g. 111,222,333',
571
+ displayOptions: {
572
+ show: { resource: ['purchaseOrder'], operation: ['cancelDropshippingShipments'] },
573
+ },
574
+ routing: {
575
+ request: {
576
+ body: '={{ { shipmentIds: $value.split(",").map(s => s.trim()).filter(s => s) } }}',
577
+ },
578
+ },
579
+ },
580
+ {
581
+ displayName: 'Additional Purchase Order IDs',
582
+ name: 'additionalPurchaseOrderIds',
583
+ type: 'string',
584
+ default: '',
585
+ description: 'Optional comma-separated list of additional purchase order IDs to combine into one incoming goods record',
586
+ displayOptions: {
587
+ show: { resource: ['purchaseOrder'], operation: ['createIncomingGoods'] },
588
+ },
589
+ routing: {
590
+ request: {
591
+ body: '={{ $value ? { additionalPurchaseOrderIds: $value.split(",").map(s => s.trim()).filter(s => s) } : {} }}',
592
+ },
593
+ },
594
+ },
595
+ {
596
+ displayName: 'Invoice Date',
597
+ name: 'invoiceDate',
598
+ type: 'dateTime',
599
+ default: '',
600
+ description: 'Date of the supplier invoice (defaults to today if not set)',
601
+ displayOptions: {
602
+ show: { resource: ['purchaseOrder'], operation: ['createPurchaseInvoice'] },
603
+ },
604
+ },
605
+ {
606
+ displayName: 'Invoice Number',
607
+ name: 'invoiceNumber',
608
+ type: 'string',
609
+ default: '',
610
+ description: 'Invoice number assigned by the supplier',
611
+ displayOptions: {
612
+ show: { resource: ['purchaseOrder'], operation: ['createPurchaseInvoice'] },
613
+ },
614
+ },
615
+ {
616
+ displayName: 'Invoice Type',
617
+ name: 'invoiceType',
618
+ type: 'options',
619
+ default: 'STANDARD_INVOICE',
620
+ description: 'Type of purchase invoice to create',
621
+ options: [
622
+ { name: 'Advance Payment Invoice', value: 'ADVANCE_PAYMENT_INVOICE' },
623
+ { name: 'Credit Advice', value: 'CREDIT_ADVICE' },
624
+ { name: 'Credit Note', value: 'CREDIT_NOTE' },
625
+ { name: 'Final Invoice', value: 'FINAL_INVOICE' },
626
+ { name: 'Part Payment Invoice', value: 'PART_PAYMENT_INVOICE' },
627
+ { name: 'Prepayment Invoice', value: 'PREPAYMENT_INVOICE' },
628
+ { name: 'Standard Invoice', value: 'STANDARD_INVOICE' },
629
+ ],
630
+ displayOptions: {
631
+ show: { resource: ['purchaseOrder'], operation: ['createPurchaseInvoice'] },
632
+ },
633
+ routing: {
634
+ request: {
635
+ body: '={{ { invoiceNumber: $parameter["invoiceNumber"] || undefined, invoiceDate: $parameter["invoiceDate"] ? new Date($parameter["invoiceDate"]).getTime() : undefined, invoiceType: $value } }}',
636
+ },
637
+ },
638
+ },
639
+ {
640
+ displayName: 'Label Quantity Setting',
641
+ name: 'itemLabelQuantityPrintSetting',
642
+ type: 'options',
643
+ required: true,
644
+ default: 'ONLY_ONE_LABEL_PER_ITEM',
645
+ description: 'Controls how many labels are printed per item',
646
+ options: [
647
+ { name: 'Item Quantity', value: 'ITEM_QUANTITY' },
648
+ { name: 'One Label per Booking Record', value: 'ONLY_ONE_LABEL_PER_BOOKING_RECORD' },
649
+ { name: 'One Label per Item', value: 'ONLY_ONE_LABEL_PER_ITEM' },
650
+ ],
651
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['printLabel'] } },
652
+ routing: {
653
+ request: {
654
+ body: '={{ { itemLabelQuantityPrintSetting: $value, purchaseOrderItemIds: $parameter["purchaseOrderItemIds"] ? $parameter["purchaseOrderItemIds"].split(",").map(s => s.trim()).filter(s => s) : undefined } }}',
655
+ },
656
+ },
657
+ },
658
+ {
659
+ displayName: 'Purchase Order Item IDs',
660
+ name: 'purchaseOrderItemIds',
661
+ type: 'string',
662
+ default: '',
663
+ description: 'Optional comma-separated list of purchase order item IDs to print labels for (prints labels for all items if not set)',
664
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['printLabel'] } },
665
+ },
666
+ {
667
+ displayName: 'Process Options',
668
+ name: 'processDropshippingOptions',
669
+ type: 'json',
670
+ default: '{}',
671
+ description: 'Optional JSON body for processDropshipping. Can include processPurchaseOrderItems (array of {purchaseOrderItemId, quantity}) and shipmentParameters ({deliveryDate, deliveryNoteNumber, shippingDate}).',
672
+ placeholder: '{"processPurchaseOrderItems": [{"purchaseOrderItemId": "123", "quantity": "5"}]}',
673
+ displayOptions: { show: { resource: ['purchaseOrder'], operation: ['processDropshipping'] } },
674
+ routing: {
675
+ request: {
676
+ body: '={{JSON.parse($value)}}',
677
+ },
678
+ },
679
+ },
680
+ ];
681
+ //# sourceMappingURL=PurchaseOrderDescription.js.map