@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,935 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.warehouseDescription = exports.warehouseStockMovementFields = exports.warehouseStockMovementOperations = exports.warehouseStockFields = exports.warehouseStockOperations = exports.warehouseFields = exports.warehouseOperations = exports.movementFilterMovementTypePreSend = exports.movementFilterEntryDateToPreSend = exports.movementFilterEntryDateFromPreSend = exports.movementFilterWarehouseIdPreSend = exports.movementFilterArticleIdPreSend = exports.warehouseStockFilterArticleIdPreSend = exports.warehouseStockFilterWarehouseIdPreSend = exports.warehouseFilterNamePreSend = void 0;
4
+ exports.stripEmptyFilterPreSend = stripEmptyFilterPreSend;
5
+ const SharedFields_1 = require("../SharedFields");
6
+ const GenericFunctions_1 = require("../GenericFunctions");
7
+ async function stripEmptyFilterPreSend(requestOptions) {
8
+ if (!requestOptions.qs || typeof requestOptions.qs !== 'object') {
9
+ return requestOptions;
10
+ }
11
+ const cleanQs = {};
12
+ for (const [key, value] of Object.entries(requestOptions.qs)) {
13
+ if (value !== undefined && value !== null && value !== '' && value !== 'undefined') {
14
+ cleanQs[key] = value;
15
+ }
16
+ }
17
+ return { ...requestOptions, qs: cleanQs };
18
+ }
19
+ function makeFilterPreSend(paramName, qsKey) {
20
+ return async function (requestOptions) {
21
+ var _a, _b;
22
+ const value = (_a = this.getNodeParameter(paramName, '')) !== null && _a !== void 0 ? _a : '';
23
+ if (!value) {
24
+ return requestOptions;
25
+ }
26
+ return {
27
+ ...requestOptions,
28
+ qs: {
29
+ ...((_b = requestOptions.qs) !== null && _b !== void 0 ? _b : {}),
30
+ [qsKey]: value,
31
+ },
32
+ };
33
+ };
34
+ }
35
+ exports.warehouseFilterNamePreSend = makeFilterPreSend('filterName', 'name-eq');
36
+ exports.warehouseStockFilterWarehouseIdPreSend = makeFilterPreSend('filterWarehouseId', 'warehouseId-eq');
37
+ exports.warehouseStockFilterArticleIdPreSend = makeFilterPreSend('filterArticleId', 'articleId-eq');
38
+ exports.movementFilterArticleIdPreSend = makeFilterPreSend('filterArticleId', 'articleId-eq');
39
+ exports.movementFilterWarehouseIdPreSend = makeFilterPreSend('filterWarehouseId', 'warehouseId-eq');
40
+ exports.movementFilterEntryDateFromPreSend = makeFilterPreSend('filterEntryDateFrom', 'entryDate-ge');
41
+ exports.movementFilterEntryDateToPreSend = makeFilterPreSend('filterEntryDateTo', 'entryDate-le');
42
+ exports.movementFilterMovementTypePreSend = makeFilterPreSend('filterMovementType', 'stockMovementType-eq');
43
+ exports.warehouseOperations = [
44
+ {
45
+ displayName: 'Operation',
46
+ name: 'operation',
47
+ type: 'options',
48
+ noDataExpression: true,
49
+ displayOptions: {
50
+ show: {
51
+ resource: ['warehouse'],
52
+ },
53
+ },
54
+ options: [
55
+ {
56
+ name: 'Create',
57
+ value: 'create',
58
+ description: 'Create a new warehouse',
59
+ action: 'Create a warehouse',
60
+ routing: {
61
+ request: {
62
+ method: 'POST',
63
+ url: '/warehouse',
64
+ },
65
+ },
66
+ },
67
+ {
68
+ name: 'Delete',
69
+ value: 'delete',
70
+ description: 'Delete a warehouse by ID',
71
+ action: 'Delete a warehouse',
72
+ routing: {
73
+ request: {
74
+ method: 'DELETE',
75
+ url: '=/warehouse/id/{{$parameter["warehouseId"]}}',
76
+ },
77
+ output: {
78
+ postReceive: [
79
+ {
80
+ type: 'set',
81
+ properties: {
82
+ value: '={{ { "deleted": true, "id": $parameter["warehouseId"] } }}',
83
+ },
84
+ },
85
+ ],
86
+ },
87
+ },
88
+ },
89
+ {
90
+ name: 'Get',
91
+ value: 'get',
92
+ description: 'Get a warehouse by ID',
93
+ action: 'Get a warehouse',
94
+ routing: {
95
+ request: {
96
+ method: 'GET',
97
+ url: '=/warehouse/id/{{$parameter["warehouseId"]}}',
98
+ },
99
+ output: {
100
+ postReceive: [GenericFunctions_1.simplifyPostReceive],
101
+ },
102
+ },
103
+ },
104
+ {
105
+ name: 'Get Many',
106
+ value: 'list',
107
+ description: 'Get many warehouses',
108
+ action: 'Get many warehouses',
109
+ routing: {
110
+ request: {
111
+ method: 'GET',
112
+ url: '/warehouse',
113
+ },
114
+ ...SharedFields_1.listPaginationRouting,
115
+ output: {
116
+ postReceive: [
117
+ {
118
+ type: 'rootProperty',
119
+ properties: {
120
+ property: 'result',
121
+ },
122
+ },
123
+ GenericFunctions_1.mergeAdditionalProperties,
124
+ GenericFunctions_1.simplifyPostReceive,
125
+ ],
126
+ },
127
+ },
128
+ },
129
+ {
130
+ name: 'Update',
131
+ value: 'update',
132
+ description: 'Update a warehouse by ID',
133
+ action: 'Update a warehouse',
134
+ routing: {
135
+ request: {
136
+ method: 'PUT',
137
+ url: '=/warehouse/id/{{$parameter["warehouseId"]}}',
138
+ qs: {
139
+ ignoreMissingProperties: true,
140
+ },
141
+ },
142
+ },
143
+ },
144
+ ],
145
+ default: 'list',
146
+ },
147
+ ];
148
+ exports.warehouseFields = [
149
+ {
150
+ displayName: 'Warehouse',
151
+ name: 'warehouseId',
152
+ type: 'resourceLocator',
153
+ default: { mode: 'list', value: '' },
154
+ required: true,
155
+ description: 'The warehouse to operate on',
156
+ displayOptions: {
157
+ show: {
158
+ resource: ['warehouse'],
159
+ operation: ['get', 'update', 'delete'],
160
+ },
161
+ },
162
+ modes: [
163
+ {
164
+ displayName: 'From List',
165
+ name: 'list',
166
+ type: 'list',
167
+ typeOptions: {
168
+ searchListMethod: 'searchWarehouses',
169
+ searchable: true,
170
+ },
171
+ },
172
+ {
173
+ displayName: 'ID',
174
+ name: 'id',
175
+ type: 'string',
176
+ placeholder: 'e.g. 1234567890',
177
+ validation: [
178
+ {
179
+ type: 'regex',
180
+ properties: {
181
+ regex: '^[0-9]+$',
182
+ errorMessage: 'Warehouse ID must be numeric',
183
+ },
184
+ },
185
+ ],
186
+ },
187
+ {
188
+ displayName: 'URL',
189
+ name: 'url',
190
+ type: 'string',
191
+ placeholder: 'e.g. https://tenant.weclapp.com/webapp/api/v2/warehouse/id/1234567890',
192
+ extractValue: {
193
+ type: 'regex',
194
+ regex: '/warehouse/id/([0-9]+)',
195
+ },
196
+ validation: [
197
+ {
198
+ type: 'regex',
199
+ properties: {
200
+ regex: '/warehouse/id/[0-9]+',
201
+ errorMessage: 'URL must contain /warehouse/id/{id}',
202
+ },
203
+ },
204
+ ],
205
+ },
206
+ ],
207
+ },
208
+ {
209
+ displayName: 'Name',
210
+ name: 'name',
211
+ type: 'string',
212
+ required: true,
213
+ default: '',
214
+ description: 'Name of the warehouse',
215
+ displayOptions: {
216
+ show: {
217
+ resource: ['warehouse'],
218
+ operation: ['create'],
219
+ },
220
+ },
221
+ routing: {
222
+ send: {
223
+ type: 'body',
224
+ property: 'name',
225
+ },
226
+ },
227
+ },
228
+ {
229
+ displayName: 'Additional Fields',
230
+ name: 'warehouseBodyFields',
231
+ type: 'collection',
232
+ placeholder: 'Add Field',
233
+ default: {},
234
+ displayOptions: {
235
+ show: {
236
+ resource: ['warehouse'],
237
+ operation: ['create', 'update'],
238
+ },
239
+ },
240
+ options: [
241
+ {
242
+ displayName: 'Active',
243
+ name: 'active',
244
+ type: 'boolean',
245
+ default: true,
246
+ description: 'Whether the warehouse is active',
247
+ routing: {
248
+ send: {
249
+ type: 'body',
250
+ property: 'active',
251
+ },
252
+ },
253
+ },
254
+ {
255
+ displayName: 'Name',
256
+ name: 'name',
257
+ type: 'string',
258
+ default: '',
259
+ description: 'Name of the warehouse',
260
+ routing: {
261
+ send: {
262
+ type: 'body',
263
+ property: 'name',
264
+ },
265
+ },
266
+ },
267
+ {
268
+ displayName: 'Short Name',
269
+ name: 'shortName',
270
+ type: 'string',
271
+ default: '',
272
+ description: 'Short name / abbreviation for the warehouse',
273
+ routing: {
274
+ send: {
275
+ type: 'body',
276
+ property: 'shortName',
277
+ },
278
+ },
279
+ },
280
+ {
281
+ displayName: 'Standard',
282
+ name: 'standard',
283
+ type: 'boolean',
284
+ default: false,
285
+ description: 'Whether this is the standard (default) warehouse',
286
+ routing: {
287
+ send: {
288
+ type: 'body',
289
+ property: 'standard',
290
+ },
291
+ },
292
+ },
293
+ ],
294
+ },
295
+ {
296
+ ...SharedFields_1.limitField,
297
+ displayOptions: {
298
+ show: {
299
+ resource: ['warehouse'],
300
+ operation: ['list'],
301
+ },
302
+ },
303
+ },
304
+ {
305
+ displayName: 'Filter by Name',
306
+ name: 'filterName',
307
+ type: 'string',
308
+ default: '',
309
+ description: 'Filter warehouses by exact name',
310
+ displayOptions: {
311
+ show: {
312
+ resource: ['warehouse'],
313
+ operation: ['list'],
314
+ },
315
+ },
316
+ routing: {
317
+ send: {
318
+ preSend: [exports.warehouseFilterNamePreSend],
319
+ },
320
+ },
321
+ },
322
+ {
323
+ ...SharedFields_1.filtersCollection,
324
+ displayOptions: {
325
+ show: {
326
+ resource: ['warehouse'],
327
+ operation: ['list'],
328
+ },
329
+ },
330
+ },
331
+ {
332
+ ...SharedFields_1.simplifyField,
333
+ displayOptions: {
334
+ show: {
335
+ resource: ['warehouse'],
336
+ operation: ['get', 'list'],
337
+ },
338
+ },
339
+ },
340
+ {
341
+ ...SharedFields_1.additionalFields,
342
+ displayOptions: {
343
+ show: {
344
+ resource: ['warehouse'],
345
+ operation: ['get', 'list'],
346
+ },
347
+ },
348
+ },
349
+ ];
350
+ exports.warehouseStockOperations = [
351
+ {
352
+ displayName: 'Operation',
353
+ name: 'operation',
354
+ type: 'options',
355
+ noDataExpression: true,
356
+ displayOptions: {
357
+ show: {
358
+ resource: ['warehouseStock'],
359
+ },
360
+ },
361
+ options: [
362
+ {
363
+ name: 'Get',
364
+ value: 'get',
365
+ description: 'Get a warehouse stock record by ID',
366
+ action: 'Get warehouse stock',
367
+ routing: {
368
+ request: {
369
+ method: 'GET',
370
+ url: '=/warehouseStock/id/{{$parameter["stockId"]}}',
371
+ },
372
+ output: {
373
+ postReceive: [GenericFunctions_1.simplifyPostReceive],
374
+ },
375
+ },
376
+ },
377
+ {
378
+ name: 'Get Many',
379
+ value: 'list',
380
+ description: 'Get many warehouse stock levels',
381
+ action: 'Get many warehouse stock',
382
+ routing: {
383
+ request: {
384
+ method: 'GET',
385
+ url: '/warehouseStock',
386
+ },
387
+ ...SharedFields_1.listPaginationRouting,
388
+ output: {
389
+ postReceive: [
390
+ {
391
+ type: 'rootProperty',
392
+ properties: {
393
+ property: 'result',
394
+ },
395
+ },
396
+ GenericFunctions_1.mergeAdditionalProperties,
397
+ GenericFunctions_1.simplifyPostReceive,
398
+ ],
399
+ },
400
+ },
401
+ },
402
+ ],
403
+ default: 'list',
404
+ },
405
+ ];
406
+ exports.warehouseStockFields = [
407
+ {
408
+ displayName: 'Stock ID',
409
+ name: 'stockId',
410
+ type: 'string',
411
+ required: true,
412
+ default: '',
413
+ description: 'The ID of the warehouse stock record',
414
+ displayOptions: {
415
+ show: {
416
+ resource: ['warehouseStock'],
417
+ operation: ['get'],
418
+ },
419
+ },
420
+ },
421
+ {
422
+ ...SharedFields_1.limitField,
423
+ displayOptions: {
424
+ show: {
425
+ resource: ['warehouseStock'],
426
+ operation: ['list'],
427
+ },
428
+ },
429
+ },
430
+ {
431
+ displayName: 'Filter by Warehouse',
432
+ name: 'filterWarehouseId',
433
+ type: 'string',
434
+ default: '',
435
+ description: 'Return stock for this warehouse ID only',
436
+ displayOptions: {
437
+ show: {
438
+ resource: ['warehouseStock'],
439
+ operation: ['list'],
440
+ },
441
+ },
442
+ routing: {
443
+ send: {
444
+ preSend: [exports.warehouseStockFilterWarehouseIdPreSend],
445
+ },
446
+ },
447
+ },
448
+ {
449
+ displayName: 'Filter by Article',
450
+ name: 'filterArticleId',
451
+ type: 'string',
452
+ default: '',
453
+ description: 'Return stock for this article ID only',
454
+ displayOptions: {
455
+ show: {
456
+ resource: ['warehouseStock'],
457
+ operation: ['list'],
458
+ },
459
+ },
460
+ routing: {
461
+ send: {
462
+ preSend: [exports.warehouseStockFilterArticleIdPreSend],
463
+ },
464
+ },
465
+ },
466
+ {
467
+ ...SharedFields_1.filtersCollection,
468
+ displayOptions: {
469
+ show: {
470
+ resource: ['warehouseStock'],
471
+ operation: ['list'],
472
+ },
473
+ },
474
+ },
475
+ {
476
+ ...SharedFields_1.simplifyField,
477
+ displayOptions: {
478
+ show: {
479
+ resource: ['warehouseStock'],
480
+ operation: ['get', 'list'],
481
+ },
482
+ },
483
+ },
484
+ {
485
+ ...SharedFields_1.additionalFields,
486
+ displayOptions: {
487
+ show: {
488
+ resource: ['warehouseStock'],
489
+ operation: ['get', 'list'],
490
+ },
491
+ },
492
+ },
493
+ ];
494
+ exports.warehouseStockMovementOperations = [
495
+ {
496
+ displayName: 'Operation',
497
+ name: 'operation',
498
+ type: 'options',
499
+ noDataExpression: true,
500
+ displayOptions: {
501
+ show: {
502
+ resource: ['warehouseStockMovement'],
503
+ },
504
+ },
505
+ options: [
506
+ {
507
+ name: 'Book Incoming Movement',
508
+ value: 'bookIncomingMovement',
509
+ description: 'Book an incoming stock movement (goods receipt)',
510
+ action: 'Book incoming movement',
511
+ routing: {
512
+ request: {
513
+ method: 'POST',
514
+ url: '/warehouseStockMovement/bookIncomingMovement',
515
+ },
516
+ output: {
517
+ postReceive: [
518
+ {
519
+ type: 'rootProperty',
520
+ properties: {
521
+ property: 'result',
522
+ },
523
+ },
524
+ ],
525
+ },
526
+ },
527
+ },
528
+ {
529
+ name: 'Book Outgoing Movement',
530
+ value: 'bookOutgoingMovement',
531
+ description: 'Book an outgoing stock movement (goods issue)',
532
+ action: 'Book outgoing movement',
533
+ routing: {
534
+ request: {
535
+ method: 'POST',
536
+ url: '/warehouseStockMovement/bookOutgoingMovement',
537
+ },
538
+ output: {
539
+ postReceive: [
540
+ {
541
+ type: 'rootProperty',
542
+ properties: {
543
+ property: 'result',
544
+ },
545
+ },
546
+ ],
547
+ },
548
+ },
549
+ },
550
+ {
551
+ name: 'Get',
552
+ value: 'get',
553
+ description: 'Get a stock movement by ID',
554
+ action: 'Get a warehouse stock movement',
555
+ routing: {
556
+ request: {
557
+ method: 'GET',
558
+ url: '=/warehouseStockMovement/id/{{$parameter["movementId"]}}',
559
+ },
560
+ output: {
561
+ postReceive: [GenericFunctions_1.simplifyPostReceive],
562
+ },
563
+ },
564
+ },
565
+ {
566
+ name: 'Get Many',
567
+ value: 'list',
568
+ description: 'Get many warehouse stock movements',
569
+ action: 'Get many warehouse stock movements',
570
+ routing: {
571
+ request: {
572
+ method: 'GET',
573
+ url: '/warehouseStockMovement',
574
+ },
575
+ ...SharedFields_1.listPaginationRouting,
576
+ output: {
577
+ postReceive: [
578
+ {
579
+ type: 'rootProperty',
580
+ properties: {
581
+ property: 'result',
582
+ },
583
+ },
584
+ GenericFunctions_1.mergeAdditionalProperties,
585
+ GenericFunctions_1.simplifyPostReceive,
586
+ ],
587
+ },
588
+ },
589
+ },
590
+ ],
591
+ default: 'list',
592
+ },
593
+ ];
594
+ exports.warehouseStockMovementFields = [
595
+ {
596
+ displayName: 'Movement ID',
597
+ name: 'movementId',
598
+ type: 'string',
599
+ required: true,
600
+ default: '',
601
+ description: 'The ID of the warehouse stock movement',
602
+ displayOptions: {
603
+ show: {
604
+ resource: ['warehouseStockMovement'],
605
+ operation: ['get'],
606
+ },
607
+ },
608
+ },
609
+ {
610
+ displayName: 'Article ID',
611
+ name: 'articleId',
612
+ type: 'string',
613
+ required: true,
614
+ default: '',
615
+ description: 'The ID of the article to book',
616
+ displayOptions: {
617
+ show: {
618
+ resource: ['warehouseStockMovement'],
619
+ operation: ['bookIncomingMovement'],
620
+ },
621
+ },
622
+ routing: {
623
+ send: {
624
+ type: 'body',
625
+ property: 'articleId',
626
+ },
627
+ },
628
+ },
629
+ {
630
+ displayName: 'Quantity',
631
+ name: 'quantity',
632
+ type: 'string',
633
+ required: true,
634
+ default: '',
635
+ description: 'Quantity to book in (decimal string, e.g. "10.000")',
636
+ displayOptions: {
637
+ show: {
638
+ resource: ['warehouseStockMovement'],
639
+ operation: ['bookIncomingMovement'],
640
+ },
641
+ },
642
+ routing: {
643
+ send: {
644
+ type: 'body',
645
+ property: 'quantity',
646
+ },
647
+ },
648
+ },
649
+ {
650
+ displayName: 'Additional Fields',
651
+ name: 'incomingAdditionalFields',
652
+ type: 'collection',
653
+ placeholder: 'Add Field',
654
+ default: {},
655
+ displayOptions: {
656
+ show: {
657
+ resource: ['warehouseStockMovement'],
658
+ operation: ['bookIncomingMovement'],
659
+ },
660
+ },
661
+ options: [
662
+ {
663
+ displayName: 'Batch Number',
664
+ name: 'batchNumber',
665
+ type: 'string',
666
+ default: '',
667
+ description: 'Batch or lot number for the stock movement',
668
+ routing: {
669
+ send: {
670
+ type: 'body',
671
+ property: 'batchNumber',
672
+ },
673
+ },
674
+ },
675
+ {
676
+ displayName: 'Movement Note',
677
+ name: 'movementNote',
678
+ type: 'string',
679
+ default: '',
680
+ description: 'Free-text note attached to this movement',
681
+ routing: {
682
+ send: {
683
+ type: 'body',
684
+ property: 'movementNote',
685
+ },
686
+ },
687
+ },
688
+ {
689
+ displayName: 'Target Storage Place ID',
690
+ name: 'targetStoragePlaceId',
691
+ type: 'string',
692
+ default: '',
693
+ description: 'Storage place (bin/location) to receive goods into. The warehouse is inferred from the storage place.',
694
+ routing: {
695
+ send: {
696
+ type: 'body',
697
+ property: 'targetStoragePlaceId',
698
+ },
699
+ },
700
+ },
701
+ ],
702
+ },
703
+ {
704
+ displayName: 'Article ID',
705
+ name: 'articleId',
706
+ type: 'string',
707
+ required: true,
708
+ default: '',
709
+ description: 'The ID of the article to book out',
710
+ displayOptions: {
711
+ show: {
712
+ resource: ['warehouseStockMovement'],
713
+ operation: ['bookOutgoingMovement'],
714
+ },
715
+ },
716
+ routing: {
717
+ send: {
718
+ type: 'body',
719
+ property: 'articleId',
720
+ },
721
+ },
722
+ },
723
+ {
724
+ displayName: 'Quantity',
725
+ name: 'quantity',
726
+ type: 'string',
727
+ required: true,
728
+ default: '',
729
+ description: 'Quantity to book out (decimal string, e.g. "10.000")',
730
+ displayOptions: {
731
+ show: {
732
+ resource: ['warehouseStockMovement'],
733
+ operation: ['bookOutgoingMovement'],
734
+ },
735
+ },
736
+ routing: {
737
+ send: {
738
+ type: 'body',
739
+ property: 'quantity',
740
+ },
741
+ },
742
+ },
743
+ {
744
+ displayName: 'Additional Fields',
745
+ name: 'outgoingAdditionalFields',
746
+ type: 'collection',
747
+ placeholder: 'Add Field',
748
+ default: {},
749
+ displayOptions: {
750
+ show: {
751
+ resource: ['warehouseStockMovement'],
752
+ operation: ['bookOutgoingMovement'],
753
+ },
754
+ },
755
+ options: [
756
+ {
757
+ displayName: 'Batch Number',
758
+ name: 'batchNumber',
759
+ type: 'string',
760
+ default: '',
761
+ description: 'Batch or lot number for the stock movement',
762
+ routing: {
763
+ send: {
764
+ type: 'body',
765
+ property: 'batchNumber',
766
+ },
767
+ },
768
+ },
769
+ {
770
+ displayName: 'Movement Note',
771
+ name: 'movementNote',
772
+ type: 'string',
773
+ default: '',
774
+ description: 'Free-text note attached to this movement',
775
+ routing: {
776
+ send: {
777
+ type: 'body',
778
+ property: 'movementNote',
779
+ },
780
+ },
781
+ },
782
+ {
783
+ displayName: 'Source Storage Place ID',
784
+ name: 'sourceStoragePlaceId',
785
+ type: 'string',
786
+ default: '',
787
+ description: 'Storage place (bin/location) to issue goods from. The warehouse is inferred from the storage place.',
788
+ routing: {
789
+ send: {
790
+ type: 'body',
791
+ property: 'sourceStoragePlaceId',
792
+ },
793
+ },
794
+ },
795
+ ],
796
+ },
797
+ {
798
+ ...SharedFields_1.limitField,
799
+ displayOptions: {
800
+ show: {
801
+ resource: ['warehouseStockMovement'],
802
+ operation: ['list'],
803
+ },
804
+ },
805
+ },
806
+ {
807
+ displayName: 'Filter by Article',
808
+ name: 'filterArticleId',
809
+ type: 'string',
810
+ default: '',
811
+ description: 'Filter movements by article ID',
812
+ displayOptions: {
813
+ show: {
814
+ resource: ['warehouseStockMovement'],
815
+ operation: ['list'],
816
+ },
817
+ },
818
+ routing: {
819
+ send: {
820
+ preSend: [exports.movementFilterArticleIdPreSend],
821
+ },
822
+ },
823
+ },
824
+ {
825
+ displayName: 'Filter by Warehouse',
826
+ name: 'filterWarehouseId',
827
+ type: 'string',
828
+ default: '',
829
+ description: 'Filter movements by warehouse ID',
830
+ displayOptions: {
831
+ show: {
832
+ resource: ['warehouseStockMovement'],
833
+ operation: ['list'],
834
+ },
835
+ },
836
+ routing: {
837
+ send: {
838
+ preSend: [exports.movementFilterWarehouseIdPreSend],
839
+ },
840
+ },
841
+ },
842
+ {
843
+ displayName: 'Filter by Entry Date (From)',
844
+ name: 'filterEntryDateFrom',
845
+ type: 'string',
846
+ default: '',
847
+ description: 'Filter movements with entry date >= this value (Unix ms timestamp)',
848
+ placeholder: 'e.g. 1704067200000',
849
+ displayOptions: {
850
+ show: {
851
+ resource: ['warehouseStockMovement'],
852
+ operation: ['list'],
853
+ },
854
+ },
855
+ routing: {
856
+ send: {
857
+ preSend: [exports.movementFilterEntryDateFromPreSend],
858
+ },
859
+ },
860
+ },
861
+ {
862
+ displayName: 'Filter by Entry Date (To)',
863
+ name: 'filterEntryDateTo',
864
+ type: 'string',
865
+ default: '',
866
+ description: 'Filter movements with entry date <= this value (Unix ms timestamp)',
867
+ placeholder: 'e.g. 1706745600000',
868
+ displayOptions: {
869
+ show: {
870
+ resource: ['warehouseStockMovement'],
871
+ operation: ['list'],
872
+ },
873
+ },
874
+ routing: {
875
+ send: {
876
+ preSend: [exports.movementFilterEntryDateToPreSend],
877
+ },
878
+ },
879
+ },
880
+ {
881
+ displayName: 'Filter by Movement Type',
882
+ name: 'filterMovementType',
883
+ type: 'string',
884
+ default: '',
885
+ description: 'Filter by stock movement type. Common values: IN, OUT, IN_PURCHASE_ORDER, OUT_PRODUCTION_ORDER, IN_TRANSFER, OUT_TRANSFER.',
886
+ placeholder: 'e.g. IN',
887
+ displayOptions: {
888
+ show: {
889
+ resource: ['warehouseStockMovement'],
890
+ operation: ['list'],
891
+ },
892
+ },
893
+ routing: {
894
+ send: {
895
+ preSend: [exports.movementFilterMovementTypePreSend],
896
+ },
897
+ },
898
+ },
899
+ {
900
+ ...SharedFields_1.filtersCollection,
901
+ displayOptions: {
902
+ show: {
903
+ resource: ['warehouseStockMovement'],
904
+ operation: ['list'],
905
+ },
906
+ },
907
+ },
908
+ {
909
+ ...SharedFields_1.simplifyField,
910
+ displayOptions: {
911
+ show: {
912
+ resource: ['warehouseStockMovement'],
913
+ operation: ['get', 'list'],
914
+ },
915
+ },
916
+ },
917
+ {
918
+ ...SharedFields_1.additionalFields,
919
+ displayOptions: {
920
+ show: {
921
+ resource: ['warehouseStockMovement'],
922
+ operation: ['get', 'list'],
923
+ },
924
+ },
925
+ },
926
+ ];
927
+ exports.warehouseDescription = [
928
+ ...exports.warehouseOperations,
929
+ ...exports.warehouseFields,
930
+ ...exports.warehouseStockOperations,
931
+ ...exports.warehouseStockFields,
932
+ ...exports.warehouseStockMovementOperations,
933
+ ...exports.warehouseStockMovementFields,
934
+ ];
935
+ //# sourceMappingURL=WarehouseDescription.js.map