@ipt-solution/n8n-nodes-ipt-restapi2 0.0.0-stage → 0.1.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 (194) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +350 -2
  3. package/dist/credentials/IptRestApi2Api.credentials.d.ts +10 -0
  4. package/dist/credentials/IptRestApi2Api.credentials.js +88 -0
  5. package/dist/credentials/IptRestApi2Api.credentials.js.map +1 -0
  6. package/dist/nodes/IptRestApi2/IptRestApi2.node.d.ts +9 -0
  7. package/dist/nodes/IptRestApi2/IptRestApi2.node.js +120 -0
  8. package/dist/nodes/IptRestApi2/IptRestApi2.node.js.map +1 -0
  9. package/dist/nodes/IptRestApi2/IptRestApi2.node.json +18 -0
  10. package/dist/nodes/IptRestApi2/iptRestApi2.dark.svg +1 -0
  11. package/dist/nodes/IptRestApi2/iptRestApi2.svg +1 -0
  12. package/dist/nodes/IptRestApi2/resources/address/create.d.ts +2 -0
  13. package/dist/nodes/IptRestApi2/resources/address/create.js +8 -0
  14. package/dist/nodes/IptRestApi2/resources/address/create.js.map +1 -0
  15. package/dist/nodes/IptRestApi2/resources/address/delete.d.ts +2 -0
  16. package/dist/nodes/IptRestApi2/resources/address/delete.js +7 -0
  17. package/dist/nodes/IptRestApi2/resources/address/delete.js.map +1 -0
  18. package/dist/nodes/IptRestApi2/resources/address/get.d.ts +6 -0
  19. package/dist/nodes/IptRestApi2/resources/address/get.js +31 -0
  20. package/dist/nodes/IptRestApi2/resources/address/get.js.map +1 -0
  21. package/dist/nodes/IptRestApi2/resources/address/getAll.d.ts +2 -0
  22. package/dist/nodes/IptRestApi2/resources/address/getAll.js +12 -0
  23. package/dist/nodes/IptRestApi2/resources/address/getAll.js.map +1 -0
  24. package/dist/nodes/IptRestApi2/resources/address/index.d.ts +2 -0
  25. package/dist/nodes/IptRestApi2/resources/address/index.js +18 -0
  26. package/dist/nodes/IptRestApi2/resources/address/index.js.map +1 -0
  27. package/dist/nodes/IptRestApi2/resources/address/update.d.ts +2 -0
  28. package/dist/nodes/IptRestApi2/resources/address/update.js +8 -0
  29. package/dist/nodes/IptRestApi2/resources/address/update.js.map +1 -0
  30. package/dist/nodes/IptRestApi2/resources/customer/create.d.ts +2 -0
  31. package/dist/nodes/IptRestApi2/resources/customer/create.js +8 -0
  32. package/dist/nodes/IptRestApi2/resources/customer/create.js.map +1 -0
  33. package/dist/nodes/IptRestApi2/resources/customer/delete.d.ts +2 -0
  34. package/dist/nodes/IptRestApi2/resources/customer/delete.js +7 -0
  35. package/dist/nodes/IptRestApi2/resources/customer/delete.js.map +1 -0
  36. package/dist/nodes/IptRestApi2/resources/customer/get.d.ts +6 -0
  37. package/dist/nodes/IptRestApi2/resources/customer/get.js +31 -0
  38. package/dist/nodes/IptRestApi2/resources/customer/get.js.map +1 -0
  39. package/dist/nodes/IptRestApi2/resources/customer/getAll.d.ts +2 -0
  40. package/dist/nodes/IptRestApi2/resources/customer/getAll.js +12 -0
  41. package/dist/nodes/IptRestApi2/resources/customer/getAll.js.map +1 -0
  42. package/dist/nodes/IptRestApi2/resources/customer/index.d.ts +2 -0
  43. package/dist/nodes/IptRestApi2/resources/customer/index.js +20 -0
  44. package/dist/nodes/IptRestApi2/resources/customer/index.js.map +1 -0
  45. package/dist/nodes/IptRestApi2/resources/customer/update.d.ts +2 -0
  46. package/dist/nodes/IptRestApi2/resources/customer/update.js +8 -0
  47. package/dist/nodes/IptRestApi2/resources/customer/update.js.map +1 -0
  48. package/dist/nodes/IptRestApi2/resources/product/create.d.ts +2 -0
  49. package/dist/nodes/IptRestApi2/resources/product/create.js +8 -0
  50. package/dist/nodes/IptRestApi2/resources/product/create.js.map +1 -0
  51. package/dist/nodes/IptRestApi2/resources/product/delete.d.ts +2 -0
  52. package/dist/nodes/IptRestApi2/resources/product/delete.js +7 -0
  53. package/dist/nodes/IptRestApi2/resources/product/delete.js.map +1 -0
  54. package/dist/nodes/IptRestApi2/resources/product/get.d.ts +6 -0
  55. package/dist/nodes/IptRestApi2/resources/product/get.js +33 -0
  56. package/dist/nodes/IptRestApi2/resources/product/get.js.map +1 -0
  57. package/dist/nodes/IptRestApi2/resources/product/getAll.d.ts +2 -0
  58. package/dist/nodes/IptRestApi2/resources/product/getAll.js +12 -0
  59. package/dist/nodes/IptRestApi2/resources/product/getAll.js.map +1 -0
  60. package/dist/nodes/IptRestApi2/resources/product/index.d.ts +2 -0
  61. package/dist/nodes/IptRestApi2/resources/product/index.js +18 -0
  62. package/dist/nodes/IptRestApi2/resources/product/index.js.map +1 -0
  63. package/dist/nodes/IptRestApi2/resources/product/update.d.ts +2 -0
  64. package/dist/nodes/IptRestApi2/resources/product/update.js +8 -0
  65. package/dist/nodes/IptRestApi2/resources/product/update.js.map +1 -0
  66. package/dist/nodes/IptRestApi2/resources/purchaseOrder/actions.d.ts +3 -0
  67. package/dist/nodes/IptRestApi2/resources/purchaseOrder/actions.js +149 -0
  68. package/dist/nodes/IptRestApi2/resources/purchaseOrder/actions.js.map +1 -0
  69. package/dist/nodes/IptRestApi2/resources/purchaseOrder/create.d.ts +2 -0
  70. package/dist/nodes/IptRestApi2/resources/purchaseOrder/create.js +9 -0
  71. package/dist/nodes/IptRestApi2/resources/purchaseOrder/create.js.map +1 -0
  72. package/dist/nodes/IptRestApi2/resources/purchaseOrder/delete.d.ts +2 -0
  73. package/dist/nodes/IptRestApi2/resources/purchaseOrder/delete.js +7 -0
  74. package/dist/nodes/IptRestApi2/resources/purchaseOrder/delete.js.map +1 -0
  75. package/dist/nodes/IptRestApi2/resources/purchaseOrder/get.d.ts +6 -0
  76. package/dist/nodes/IptRestApi2/resources/purchaseOrder/get.js +38 -0
  77. package/dist/nodes/IptRestApi2/resources/purchaseOrder/get.js.map +1 -0
  78. package/dist/nodes/IptRestApi2/resources/purchaseOrder/getAll.d.ts +2 -0
  79. package/dist/nodes/IptRestApi2/resources/purchaseOrder/getAll.js +12 -0
  80. package/dist/nodes/IptRestApi2/resources/purchaseOrder/getAll.js.map +1 -0
  81. package/dist/nodes/IptRestApi2/resources/purchaseOrder/index.d.ts +2 -0
  82. package/dist/nodes/IptRestApi2/resources/purchaseOrder/index.js +23 -0
  83. package/dist/nodes/IptRestApi2/resources/purchaseOrder/index.js.map +1 -0
  84. package/dist/nodes/IptRestApi2/resources/purchaseOrder/update.d.ts +2 -0
  85. package/dist/nodes/IptRestApi2/resources/purchaseOrder/update.js +8 -0
  86. package/dist/nodes/IptRestApi2/resources/purchaseOrder/update.js.map +1 -0
  87. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/create.d.ts +2 -0
  88. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/create.js +20 -0
  89. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/create.js.map +1 -0
  90. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/delete.d.ts +2 -0
  91. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/delete.js +7 -0
  92. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/delete.js.map +1 -0
  93. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/get.d.ts +6 -0
  94. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/get.js +31 -0
  95. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/get.js.map +1 -0
  96. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/getAll.d.ts +2 -0
  97. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/getAll.js +12 -0
  98. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/getAll.js.map +1 -0
  99. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/index.d.ts +2 -0
  100. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/index.js +20 -0
  101. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/index.js.map +1 -0
  102. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/update.d.ts +2 -0
  103. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/update.js +8 -0
  104. package/dist/nodes/IptRestApi2/resources/purchaseOrderPosition/update.js.map +1 -0
  105. package/dist/nodes/IptRestApi2/resources/salesOrder/actions.d.ts +3 -0
  106. package/dist/nodes/IptRestApi2/resources/salesOrder/actions.js +197 -0
  107. package/dist/nodes/IptRestApi2/resources/salesOrder/actions.js.map +1 -0
  108. package/dist/nodes/IptRestApi2/resources/salesOrder/create.d.ts +2 -0
  109. package/dist/nodes/IptRestApi2/resources/salesOrder/create.js +9 -0
  110. package/dist/nodes/IptRestApi2/resources/salesOrder/create.js.map +1 -0
  111. package/dist/nodes/IptRestApi2/resources/salesOrder/delete.d.ts +2 -0
  112. package/dist/nodes/IptRestApi2/resources/salesOrder/delete.js +7 -0
  113. package/dist/nodes/IptRestApi2/resources/salesOrder/delete.js.map +1 -0
  114. package/dist/nodes/IptRestApi2/resources/salesOrder/get.d.ts +6 -0
  115. package/dist/nodes/IptRestApi2/resources/salesOrder/get.js +38 -0
  116. package/dist/nodes/IptRestApi2/resources/salesOrder/get.js.map +1 -0
  117. package/dist/nodes/IptRestApi2/resources/salesOrder/getAll.d.ts +2 -0
  118. package/dist/nodes/IptRestApi2/resources/salesOrder/getAll.js +12 -0
  119. package/dist/nodes/IptRestApi2/resources/salesOrder/getAll.js.map +1 -0
  120. package/dist/nodes/IptRestApi2/resources/salesOrder/index.d.ts +2 -0
  121. package/dist/nodes/IptRestApi2/resources/salesOrder/index.js +23 -0
  122. package/dist/nodes/IptRestApi2/resources/salesOrder/index.js.map +1 -0
  123. package/dist/nodes/IptRestApi2/resources/salesOrder/update.d.ts +2 -0
  124. package/dist/nodes/IptRestApi2/resources/salesOrder/update.js +8 -0
  125. package/dist/nodes/IptRestApi2/resources/salesOrder/update.js.map +1 -0
  126. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/create.d.ts +2 -0
  127. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/create.js +20 -0
  128. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/create.js.map +1 -0
  129. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/delete.d.ts +2 -0
  130. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/delete.js +7 -0
  131. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/delete.js.map +1 -0
  132. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/get.d.ts +6 -0
  133. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/get.js +31 -0
  134. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/get.js.map +1 -0
  135. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/getAll.d.ts +2 -0
  136. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/getAll.js +12 -0
  137. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/getAll.js.map +1 -0
  138. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/index.d.ts +2 -0
  139. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/index.js +20 -0
  140. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/index.js.map +1 -0
  141. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/update.d.ts +2 -0
  142. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/update.js +8 -0
  143. package/dist/nodes/IptRestApi2/resources/salesOrderPosition/update.js.map +1 -0
  144. package/dist/nodes/IptRestApi2/resources/supplier/create.d.ts +2 -0
  145. package/dist/nodes/IptRestApi2/resources/supplier/create.js +8 -0
  146. package/dist/nodes/IptRestApi2/resources/supplier/create.js.map +1 -0
  147. package/dist/nodes/IptRestApi2/resources/supplier/delete.d.ts +2 -0
  148. package/dist/nodes/IptRestApi2/resources/supplier/delete.js +7 -0
  149. package/dist/nodes/IptRestApi2/resources/supplier/delete.js.map +1 -0
  150. package/dist/nodes/IptRestApi2/resources/supplier/get.d.ts +6 -0
  151. package/dist/nodes/IptRestApi2/resources/supplier/get.js +31 -0
  152. package/dist/nodes/IptRestApi2/resources/supplier/get.js.map +1 -0
  153. package/dist/nodes/IptRestApi2/resources/supplier/getAll.d.ts +2 -0
  154. package/dist/nodes/IptRestApi2/resources/supplier/getAll.js +12 -0
  155. package/dist/nodes/IptRestApi2/resources/supplier/getAll.js.map +1 -0
  156. package/dist/nodes/IptRestApi2/resources/supplier/index.d.ts +2 -0
  157. package/dist/nodes/IptRestApi2/resources/supplier/index.js +20 -0
  158. package/dist/nodes/IptRestApi2/resources/supplier/index.js.map +1 -0
  159. package/dist/nodes/IptRestApi2/resources/supplier/update.d.ts +2 -0
  160. package/dist/nodes/IptRestApi2/resources/supplier/update.js +8 -0
  161. package/dist/nodes/IptRestApi2/resources/supplier/update.js.map +1 -0
  162. package/dist/nodes/IptRestApi2/resources/tableData/getAll.d.ts +2 -0
  163. package/dist/nodes/IptRestApi2/resources/tableData/getAll.js +68 -0
  164. package/dist/nodes/IptRestApi2/resources/tableData/getAll.js.map +1 -0
  165. package/dist/nodes/IptRestApi2/resources/tableData/index.d.ts +2 -0
  166. package/dist/nodes/IptRestApi2/resources/tableData/index.js +43 -0
  167. package/dist/nodes/IptRestApi2/resources/tableData/index.js.map +1 -0
  168. package/dist/nodes/IptRestApi2/shared/actions.d.ts +15 -0
  169. package/dist/nodes/IptRestApi2/shared/actions.js +171 -0
  170. package/dist/nodes/IptRestApi2/shared/actions.js.map +1 -0
  171. package/dist/nodes/IptRestApi2/shared/delete.d.ts +4 -0
  172. package/dist/nodes/IptRestApi2/shared/delete.js +115 -0
  173. package/dist/nodes/IptRestApi2/shared/delete.js.map +1 -0
  174. package/dist/nodes/IptRestApi2/shared/filters.d.ts +3 -0
  175. package/dist/nodes/IptRestApi2/shared/filters.js +116 -0
  176. package/dist/nodes/IptRestApi2/shared/filters.js.map +1 -0
  177. package/dist/nodes/IptRestApi2/shared/operations.d.ts +7 -0
  178. package/dist/nodes/IptRestApi2/shared/operations.js +76 -0
  179. package/dist/nodes/IptRestApi2/shared/operations.js.map +1 -0
  180. package/dist/nodes/IptRestApi2/shared/read.d.ts +16 -0
  181. package/dist/nodes/IptRestApi2/shared/read.js +276 -0
  182. package/dist/nodes/IptRestApi2/shared/read.js.map +1 -0
  183. package/dist/nodes/IptRestApi2/shared/resource.d.ts +11 -0
  184. package/dist/nodes/IptRestApi2/shared/resource.js +21 -0
  185. package/dist/nodes/IptRestApi2/shared/resource.js.map +1 -0
  186. package/dist/nodes/IptRestApi2/shared/response.d.ts +4 -0
  187. package/dist/nodes/IptRestApi2/shared/response.js +45 -0
  188. package/dist/nodes/IptRestApi2/shared/response.js.map +1 -0
  189. package/dist/nodes/IptRestApi2/shared/write.d.ts +6 -0
  190. package/dist/nodes/IptRestApi2/shared/write.js +194 -0
  191. package/dist/nodes/IptRestApi2/shared/write.js.map +1 -0
  192. package/dist/package.json +41 -0
  193. package/dist/tsconfig.tsbuildinfo +1 -0
  194. package/package.json +39 -4
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderActionDescription = exports.purchaseOrderActionOperations = void 0;
4
+ const actions_1 = require("../../shared/actions");
5
+ const resource_1 = require("../../shared/resource");
6
+ const get_1 = require("./get");
7
+ function orderAction(name, value, action, description, apiAction) {
8
+ return (0, actions_1.recordAction)(get_1.purchaseOrderInfo, name, value, action, description, apiAction);
9
+ }
10
+ exports.purchaseOrderActionOperations = [
11
+ orderAction('Change Currency', 'changeCurrency', 'Change the currency of a purchase order in myfactory', 'Switch a purchase order to another currency', 'changecurrency'),
12
+ orderAction('Change Supplier', 'changeSupplier', 'Change the supplier of a purchase order in myfactory', 'Move a purchase order to another supplier. The order keeps its number but gets a new ID.', 'changesupplier'),
13
+ orderAction('Confirm Delivery Dates', 'confirmDeliveryDates', 'Confirm the delivery dates of a purchase order in myfactory', 'Record the order confirmation of the supplier for all positions of a purchase order', 'confirmdeliverydates'),
14
+ orderAction('Copy', 'copy', 'Copy a purchase order in myfactory', 'Create a new purchase order as a copy of an existing one', 'copy'),
15
+ orderAction('Recalculate', 'recalc', 'Recalculate a purchase order in myfactory', 'Recalculate the totals and taxes of a purchase order', 'recalc'),
16
+ orderAction('Refresh Prices', 'refreshPrices', 'Refresh the prices of a purchase order in myfactory', 'Take the current purchase prices for all product positions of a purchase order', 'refreshprices'),
17
+ orderAction('Renumber Positions', 'renumberPositions', 'Renumber the positions of a purchase order in myfactory', 'Number the positions of a purchase order again in their order', 'renumberpositions'),
18
+ orderAction('Set Completed', 'setCompleted', 'Mark a purchase order as completed in myfactory', 'Mark a processed purchase order and its main positions as completed', 'setcompleted'),
19
+ orderAction('Set Printed', 'setPrinted', 'Mark a purchase order as printed in myfactory', 'Mark a processed purchase order as printed without printing or sending it', 'setprinted'),
20
+ (0, actions_1.transformOperation)(get_1.purchaseOrderInfo, 'Transform a purchase order into another order type in myfactory', 'Create the follow-up document of a purchase order, for example a goods receipt from an order'),
21
+ ];
22
+ const resource = get_1.purchaseOrderInfo.resource;
23
+ const orderIdHint = 'OrderID of the purchase order, not the order number. Get it from Purchase Order > Get Many.';
24
+ function sendText(parameter, bodyField) {
25
+ return async function (requestOptions) {
26
+ const raw = this.getNodeParameter(parameter, '');
27
+ const value = typeof raw === 'string' ? raw.trim() : '';
28
+ if (value !== '') {
29
+ requestOptions.body = { ...requestOptions.body, [bodyField]: value };
30
+ }
31
+ return requestOptions;
32
+ };
33
+ }
34
+ exports.purchaseOrderActionDescription = [
35
+ (0, actions_1.actionNotice)(resource, 'changeCurrency', 'Switches the purchase order to another currency and converts the prices of its positions. Use a currency code that is set up in myfactory, because the API does not check the code.'),
36
+ (0, actions_1.actionNotice)(resource, 'changeSupplier', 'myfactory copies the purchase order to the new supplier and deletes the old one. The order keeps its number but gets a new OrderID, and the old OrderID no longer exists. With Change Conditions on (default), the order takes over the currency and price type of the new supplier and the position prices are determined again. myfactory refuses the change for a purchase order it treats as read-only or that already has an external production order.'),
37
+ (0, actions_1.actionNotice)(resource, 'confirmDeliveryDates', 'Records the order confirmation of the supplier for all product and manual positions of the purchase order: each gets the confirmed delivery date, keeps the date requested before and updates the material planning. Optionally sets a confirmation text for every position and the order confirmation date of the purchase order. At least one of the three values is required. A confirmation cannot be withdrawn here.'),
38
+ (0, actions_1.actionNotice)(resource, 'copy', 'Creates a new purchase order as a copy. Without Additional Fields the copy gets the supplier and the order type of the source.'),
39
+ (0, actions_1.actionNotice)(resource, 'recalc', 'Recalculates the totals, taxes and position sums of the purchase order, as after a change to a position.'),
40
+ (0, actions_1.actionNotice)(resource, 'refreshPrices', 'Takes the current purchase prices for all product positions. This also overwrites prices entered by hand, because the positions lose their mark as manual prices. myfactory saves the change without processing the purchase order: a processed purchase order goes to the state in progress (OrderState 2).'),
41
+ (0, actions_1.actionNotice)(resource, 'renumberPositions', 'Numbers the positions again in their order: 1, 2, 3 …, group titles open a level (1, 1.1), text and page break lines get no number. The order of the positions does not change. Needs ipt RestApi2 57.9.0 or later.'),
42
+ (0, actions_1.actionNotice)(resource, 'setCompleted', 'Marks the purchase order and its main positions as completed and removes their material planning entries. Works only for processed or printed purchase orders. Changing OrderCompleted with Update does not do this. Needs ipt RestApi2 31.8.0 or later.'),
43
+ (0, actions_1.actionNotice)(resource, 'setPrinted', 'Marks a processed purchase order as printed and checks off its open entries in print batches. Nothing is printed or sent. A purchase order that is already printed is returned unchanged. Use this for documents that reach the supplier by other means. Changing OrderState with Update does not do this.'),
44
+ (0, actions_1.actionNotice)(resource, 'transform', 'Creates the follow-up document, for example a goods receipt from an order. The new document is saved as processed, so a goods receipt books the stock at once. The target order type must be allowed as a follow-up of the source order type in myfactory, otherwise the error message lists the allowed types. Fails if the source purchase order is locked for transforming, already has an unprocessed follow-up document or has no positions left to take over. Needs ipt RestApi2 57.18.0 or later.'),
45
+ {
46
+ ...(0, resource_1.idProperty)(get_1.purchaseOrderInfo, {
47
+ operation: [
48
+ 'changeCurrency',
49
+ 'changeSupplier',
50
+ 'confirmDeliveryDates',
51
+ 'copy',
52
+ 'recalc',
53
+ 'refreshPrices',
54
+ 'renumberPositions',
55
+ 'setCompleted',
56
+ 'setPrinted',
57
+ ],
58
+ }),
59
+ hint: orderIdHint,
60
+ },
61
+ ...(0, actions_1.changeCurrencyProperties)(get_1.purchaseOrderInfo),
62
+ {
63
+ displayName: 'New Supplier ID',
64
+ name: 'newSupplierId',
65
+ type: 'number',
66
+ required: true,
67
+ displayOptions: (0, actions_1.showFor)(resource, 'changeSupplier'),
68
+ default: 0,
69
+ description: 'ID of the new supplier (field SupplierID)',
70
+ routing: { send: { type: 'body', property: 'supplierId' } },
71
+ },
72
+ {
73
+ displayName: 'Additional Fields',
74
+ name: 'additionalFields',
75
+ type: 'collection',
76
+ placeholder: 'Add Field',
77
+ displayOptions: (0, actions_1.showFor)(resource, 'changeSupplier'),
78
+ default: {},
79
+ options: [
80
+ {
81
+ ...(0, actions_1.bodySwitch)('Change Conditions', 'changeConditions', 'Whether to take over the currency and price type of the new supplier and determine the position prices again. Off keeps the currency, prices and payment condition of the order.'),
82
+ default: true,
83
+ },
84
+ {
85
+ ...(0, actions_1.bodySwitch)('Keep Documents', 'keepDocuments', 'Whether to keep the documents linked to the purchase order'),
86
+ default: true,
87
+ },
88
+ (0, actions_1.bodySwitch)('Refresh Texts', 'refreshOrderTexts', 'Whether to take the texts of the order and its positions again instead of keeping them'),
89
+ ],
90
+ },
91
+ {
92
+ displayName: 'Confirmed Delivery Date',
93
+ name: 'confirmedDeliveryDate',
94
+ type: 'string',
95
+ displayOptions: (0, actions_1.showFor)(resource, 'confirmDeliveryDates'),
96
+ default: '',
97
+ placeholder: '2026-10-01',
98
+ description: 'Delivery date the supplier confirmed, for every product and manual position. Write it as 2026-10-01 or 01.10.2026. Leave empty to set only the confirmation text or the order confirmation date.',
99
+ routing: { send: { preSend: [sendText('confirmedDeliveryDate', 'date')] } },
100
+ },
101
+ {
102
+ displayName: 'Additional Fields',
103
+ name: 'additionalFields',
104
+ type: 'collection',
105
+ placeholder: 'Add Field',
106
+ displayOptions: (0, actions_1.showFor)(resource, 'confirmDeliveryDates'),
107
+ default: {},
108
+ options: [
109
+ {
110
+ displayName: 'Confirmation Text',
111
+ name: 'text',
112
+ type: 'string',
113
+ default: '',
114
+ description: 'Note of the supplier on the confirmation, for every product and manual position. Up to 100 characters.',
115
+ routing: { send: { preSend: [sendText('additionalFields.text', 'text')] } },
116
+ },
117
+ {
118
+ displayName: 'Order Confirmation Date',
119
+ name: 'orderConfirmationDate',
120
+ type: 'string',
121
+ default: '',
122
+ placeholder: '2026-09-28',
123
+ description: 'Date of the order confirmation, stored on the purchase order. Write it as 2026-09-28 or 28.09.2026.',
124
+ routing: {
125
+ send: {
126
+ preSend: [sendText('additionalFields.orderConfirmationDate', 'orderConfirmationDate')],
127
+ },
128
+ },
129
+ },
130
+ ],
131
+ },
132
+ {
133
+ displayName: 'Additional Fields',
134
+ name: 'additionalFields',
135
+ type: 'collection',
136
+ placeholder: 'Add Field',
137
+ displayOptions: (0, actions_1.showFor)(resource, 'copy'),
138
+ default: {},
139
+ options: [
140
+ (0, actions_1.bodySwitch)('Change Conditions', 'changeConditions', 'Whether to take over the current currency and price type of the supplier and determine the position prices again'),
141
+ (0, actions_1.bodyNumber)('Order Type', 'orderType', 'Number of the purchase order type of the copy'),
142
+ (0, actions_1.bodySwitch)('Refresh Order Texts', 'refreshOrderTexts', 'Whether to take the header and footer texts again instead of copying them'),
143
+ (0, actions_1.bodySwitch)('Refresh Position Texts', 'refreshPosTexts', 'Whether to take the texts of the positions from the products again'),
144
+ (0, actions_1.bodyNumber)('Supplier ID', 'supplierId', 'ID of the supplier of the copy'),
145
+ ],
146
+ },
147
+ ...(0, actions_1.transformProperties)(get_1.purchaseOrderInfo, orderIdHint, 'Number of the purchase order type of the new document, for example of a goods receipt or a purchase invoice. The numbers are set up in your myfactory installation. The type must be a follow-up type of the source order type in myfactory. If it is not, the error message of the API lists the allowed types.'),
148
+ ];
149
+ //# sourceMappingURL=actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrder/actions.ts"],"names":[],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;YACtF,IAAA,oBAAU,EACT,qBAAqB,EACrB,mBAAmB,EACnB,2EAA2E,CAC3E;YACD,IAAA,oBAAU,EACT,wBAAwB,EACxB,iBAAiB,EACjB,oEAAoE,CACpE;YACD,IAAA,oBAAU,EAAC,aAAa,EAAE,YAAY,EAAE,gCAAgC,CAAC;SACzE;KACD;IAGD,GAAG,IAAA,6BAAmB,EACrB,uBAAiB,EACjB,WAAW,EACX,kTAAkT,CAClT;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderCreateDescription: INodeProperties[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderCreateDescription = void 0;
4
+ const write_1 = require("../../shared/write");
5
+ exports.purchaseOrderCreateDescription = [
6
+ (0, write_1.returnPositionsProperty)('purchaseOrder'),
7
+ ...(0, write_1.createDataProperty)('purchaseOrder', 'Fields of the new purchase order as a JSON object. OrderType is required: the number of the purchase order type in myfactory, for example of an order or a goods receipt. The supplier is required as SupplierID or SupplierNumber. Positions go into the array Positions, each with ProductNumber or ProductID and Quantity. myfactory saves the purchase order as processed.', '{"OrderType": 1, "SupplierNumber": "70001", "Positions": [{"ProductNumber": "1000", "Quantity": 10}]}'),
8
+ ];
9
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrder/create.ts"],"names":[],"mappings":";;;AACA,8CAAiF;AAMpE,QAAA,8BAA8B,GAAsB;IAChE,IAAA,+BAAuB,EAAC,eAAe,CAAC;IACxC,GAAG,IAAA,0BAAkB,EACpB,eAAe,EACf,gXAAgX,EAChX,uGAAuG,CACvG;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderDeleteDescription: INodeProperties[];
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderDeleteDescription = void 0;
4
+ const delete_1 = require("../../shared/delete");
5
+ const get_1 = require("./get");
6
+ exports.purchaseOrderDeleteDescription = (0, delete_1.deleteProperties)(get_1.purchaseOrderInfo, 'Deleting a purchase order is permanent. For order types with a financial effect, such as purchase invoices, myfactory also deletes the open item and the accounting transfer entry. myfactory refuses to delete a processed purchase order if its number range does not allow deleting or the user lacks the delete right. The API then reports only "Order could not be deleted" (status 409).');
7
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrder/delete.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AACvD,+BAA0C;AAI7B,QAAA,8BAA8B,GAAsB,IAAA,yBAAgB,EAChF,uBAAiB,EACjB,iYAAiY,CACjY,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { INodeProperties, INodePropertyOptions } from 'n8n-workflow';
2
+ import type { ResourceInfo } from '../../shared/resource';
3
+ export declare const purchaseOrderInfo: ResourceInfo;
4
+ export declare const purchaseOrderGetManyIncludes: INodePropertyOptions[];
5
+ export declare const purchaseOrderSimplifiedFields: string[];
6
+ export declare const purchaseOrderGetDescription: INodeProperties[];
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderGetDescription = exports.purchaseOrderSimplifiedFields = exports.purchaseOrderGetManyIncludes = exports.purchaseOrderInfo = void 0;
4
+ const read_1 = require("../../shared/read");
5
+ exports.purchaseOrderInfo = {
6
+ resource: 'purchaseOrder',
7
+ path: '/purchaseorders',
8
+ label: 'purchase order',
9
+ labelPlural: 'purchase orders',
10
+ idParameter: 'purchaseOrderId',
11
+ idDisplayName: 'Purchase Order ID',
12
+ idField: 'OrderID',
13
+ };
14
+ const purchaseOrderGetIncludes = [
15
+ { name: 'Attributes', value: 'attributes' },
16
+ { name: 'History', value: 'history' },
17
+ ];
18
+ exports.purchaseOrderGetManyIncludes = [
19
+ { name: 'Attributes', value: 'attributes' },
20
+ { name: 'History', value: 'history' },
21
+ { name: 'Payments', value: 'payments' },
22
+ { name: 'Positions', value: 'positions' },
23
+ { name: 'Taxes', value: 'taxes' },
24
+ ];
25
+ exports.purchaseOrderSimplifiedFields = [
26
+ 'OrderID',
27
+ 'OrderNumber',
28
+ 'OrderType',
29
+ 'OrderTypeDesc',
30
+ 'BookingDate',
31
+ 'DeliveryDate',
32
+ 'SupplierNumber',
33
+ 'Name1',
34
+ 'OrderSum',
35
+ 'CurrUnit',
36
+ ];
37
+ exports.purchaseOrderGetDescription = (0, read_1.getProperties)(exports.purchaseOrderInfo, exports.purchaseOrderSimplifiedFields, purchaseOrderGetIncludes);
38
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrder/get.ts"],"names":[],"mappings":";;;AACA,4CAAkD;AAIrC,QAAA,iBAAiB,GAAiB;IAC9C,QAAQ,EAAE,eAAe;IACzB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,iBAAiB;IAC9B,aAAa,EAAE,mBAAmB;IAClC,OAAO,EAAE,SAAS;CAClB,CAAC;AAIF,MAAM,wBAAwB,GAA2B;IACxD,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CACrC,CAAC;AAGW,QAAA,4BAA4B,GAA2B;IACnE,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACrC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;IACvC,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IACzC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;CACjC,CAAC;AAIW,QAAA,6BAA6B,GAAG;IAC5C,SAAS;IACT,aAAa;IACb,WAAW;IACX,eAAe;IACf,aAAa;IACb,cAAc;IACd,gBAAgB;IAChB,OAAO;IACP,UAAU;IACV,UAAU;CACV,CAAC;AAEW,QAAA,2BAA2B,GAAsB,IAAA,oBAAa,EAC1E,yBAAiB,EACjB,qCAA6B,EAC7B,wBAAwB,CACxB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderGetManyDescription: INodeProperties[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderGetManyDescription = void 0;
4
+ const read_1 = require("../../shared/read");
5
+ const get_1 = require("./get");
6
+ exports.purchaseOrderGetManyDescription = (0, read_1.getManyProperties)(get_1.purchaseOrderInfo, get_1.purchaseOrderSimplifiedFields, get_1.purchaseOrderGetManyIncludes, {
7
+ fields: 'OrderID,OrderNumber,OrderSum',
8
+ sort: '-BookingDate,OrderNumber',
9
+ filterField: 'SupplierID',
10
+ clause: "BookingDate$GT$$EQ$'20261001' AND BookingDate$LT$'20261101'",
11
+ });
12
+ //# sourceMappingURL=getAll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrder/getAll.ts"],"names":[],"mappings":";;;AACA,4CAAsD;AACtD,+BAIe;AAEF,QAAA,+BAA+B,GAAsB,IAAA,wBAAiB,EAClF,uBAAiB,EACjB,mCAA6B,EAC7B,kCAA4B,EAC5B;IACC,MAAM,EAAE,8BAA8B;IACtC,IAAI,EAAE,0BAA0B;IAChC,WAAW,EAAE,YAAY;IACzB,MAAM,EAAE,6DAA6D;CACrE,CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderDescription: INodeProperties[];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderDescription = void 0;
4
+ const operations_1 = require("../../shared/operations");
5
+ const actions_1 = require("./actions");
6
+ const create_1 = require("./create");
7
+ const delete_1 = require("./delete");
8
+ const get_1 = require("./get");
9
+ const getAll_1 = require("./getAll");
10
+ const update_1 = require("./update");
11
+ exports.purchaseOrderDescription = [
12
+ (0, operations_1.operationProperty)(get_1.purchaseOrderInfo, {
13
+ createDescription: 'Create a new purchase order with its positions',
14
+ getDescription: 'Get the data of a single purchase order with its positions',
15
+ }, actions_1.purchaseOrderActionOperations),
16
+ ...create_1.purchaseOrderCreateDescription,
17
+ ...delete_1.purchaseOrderDeleteDescription,
18
+ ...get_1.purchaseOrderGetDescription,
19
+ ...getAll_1.purchaseOrderGetManyDescription,
20
+ ...update_1.purchaseOrderUpdateDescription,
21
+ ...actions_1.purchaseOrderActionDescription,
22
+ ];
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrder/index.ts"],"names":[],"mappings":";;;AACA,wDAA4D;AAC5D,uCAA0F;AAC1F,qCAA0D;AAC1D,qCAA0D;AAC1D,+BAAuE;AACvE,qCAA2D;AAC3D,qCAA0D;AAE7C,QAAA,wBAAwB,GAAsB;IAC1D,IAAA,8BAAiB,EAChB,uBAAiB,EACjB;QACC,iBAAiB,EAAE,gDAAgD;QACnE,cAAc,EAAE,4DAA4D;KAC5E,EACD,uCAA6B,CAC7B;IACD,GAAG,uCAA8B;IACjC,GAAG,uCAA8B;IACjC,GAAG,iCAA2B;IAC9B,GAAG,wCAA+B;IAClC,GAAG,uCAA8B;IACjC,GAAG,wCAA8B;CACjC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderUpdateDescription: INodeProperties[];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderUpdateDescription = void 0;
4
+ const write_1 = require("../../shared/write");
5
+ exports.purchaseOrderUpdateDescription = [
6
+ ...(0, write_1.updateDataProperty)('purchaseOrder', '{"ReferenceText": "Order 4711", "Positions": [{"OrderPosID": 5678, "Quantity": 3}]}', 'Positions in the array Positions change existing positions and need their OrderPosID. Positions without OrderPosID are ignored.'),
7
+ ];
8
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrder/update.ts"],"names":[],"mappings":";;;AACA,8CAAwD;AAI3C,QAAA,8BAA8B,GAAsB;IAChE,GAAG,IAAA,0BAAkB,EACpB,eAAe,EACf,qFAAqF,EACrF,iIAAiI,CACjI;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderPositionCreateDescription: INodeProperties[];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderPositionCreateDescription = void 0;
4
+ const write_1 = require("../../shared/write");
5
+ exports.purchaseOrderPositionCreateDescription = [
6
+ {
7
+ displayName: 'myfactory adds the position and recalculates the purchase order, but does not number the positions again. Use the purchase order action Renumber Positions for that.',
8
+ name: 'purchaseOrderPositionCreateNotice',
9
+ type: 'notice',
10
+ displayOptions: {
11
+ show: {
12
+ resource: ['purchaseOrderPosition'],
13
+ operation: ['create'],
14
+ },
15
+ },
16
+ default: '',
17
+ },
18
+ ...(0, write_1.createDataProperty)('purchaseOrderPosition', 'Fields of the new position as a JSON object. OrderID is required: the ID of the purchase order. PosType: 1 product (default, needs ProductID or ProductNumber), 2 manual position (send Name1, Quantity, Unit and Price), 4 text (Name1 up to 100 characters, long text in PosText), 5 subtotal, 6 page break, 7 group title. Other values are rejected. PosIndex inserts the position before the position at that place (0 is the first), without it the position is appended. For a product position, a sent Price or Discount wins over the price lists and the position is marked as a manual price (PriceManual 0 turns this off). The purchase order action Refresh Prices overwrites it. Without PosNumber the new position gets the number of its predecessor plus one. myfactory recalculates the purchase order.', '{"OrderID": 1234, "ProductNumber": "1000", "Quantity": 10}'),
19
+ ];
20
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrderPosition/create.ts"],"names":[],"mappings":";;;AACA,8CAAwD;AAI3C,QAAA,sCAAsC,GAAsB;IACxE;QACC,WAAW,EACV,sKAAsK;QACvK,IAAI,EAAE,mCAAmC;QACzC,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,uBAAuB,CAAC;gBACnC,SAAS,EAAE,CAAC,QAAQ,CAAC;aACrB;SACD;QACD,OAAO,EAAE,EAAE;KACX;IACD,GAAG,IAAA,0BAAkB,EACpB,uBAAuB,EACvB,4xBAA4xB,EAC5xB,4DAA4D,CAC5D;CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderPositionDeleteDescription: INodeProperties[];
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderPositionDeleteDescription = void 0;
4
+ const delete_1 = require("../../shared/delete");
5
+ const get_1 = require("./get");
6
+ exports.purchaseOrderPositionDeleteDescription = (0, delete_1.deleteProperties)(get_1.purchaseOrderPositionInfo, 'Deleting a position is permanent. myfactory removes it from the purchase order and recalculates the order. The API does not check whether the purchase order is already processed.');
7
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delete.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrderPosition/delete.ts"],"names":[],"mappings":";;;AACA,gDAAuD;AACvD,+BAAkD;AAGrC,QAAA,sCAAsC,GAAsB,IAAA,yBAAgB,EACxF,+BAAyB,EACzB,oLAAoL,CACpL,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { INodeProperties, INodePropertyOptions } from 'n8n-workflow';
2
+ import type { ResourceInfo } from '../../shared/resource';
3
+ export declare const purchaseOrderPositionInfo: ResourceInfo;
4
+ export declare const purchaseOrderPositionSimplifiedFields: string[];
5
+ export declare const purchaseOrderPositionIncludes: INodePropertyOptions[];
6
+ export declare const purchaseOrderPositionGetDescription: INodeProperties[];
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderPositionGetDescription = exports.purchaseOrderPositionIncludes = exports.purchaseOrderPositionSimplifiedFields = exports.purchaseOrderPositionInfo = void 0;
4
+ const read_1 = require("../../shared/read");
5
+ exports.purchaseOrderPositionInfo = {
6
+ resource: 'purchaseOrderPosition',
7
+ path: '/purchaseorderpositions',
8
+ label: 'purchase order position',
9
+ labelPlural: 'purchase order positions',
10
+ idParameter: 'purchaseOrderPosId',
11
+ idDisplayName: 'Purchase Order Position ID',
12
+ idField: 'OrderPosID',
13
+ };
14
+ exports.purchaseOrderPositionSimplifiedFields = [
15
+ 'OrderPosID',
16
+ 'OrderID',
17
+ 'PosNumber',
18
+ 'ProductNumber',
19
+ 'Name1',
20
+ 'Quantity',
21
+ 'Unit',
22
+ 'Price',
23
+ 'Turnover',
24
+ 'DeliveryDate',
25
+ ];
26
+ exports.purchaseOrderPositionIncludes = [
27
+ { name: 'Attributes', value: 'attributes' },
28
+ { name: 'History', value: 'history' },
29
+ ];
30
+ exports.purchaseOrderPositionGetDescription = (0, read_1.getProperties)(exports.purchaseOrderPositionInfo, exports.purchaseOrderPositionSimplifiedFields, exports.purchaseOrderPositionIncludes);
31
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrderPosition/get.ts"],"names":[],"mappings":";;;AACA,4CAAkD;AAIrC,QAAA,yBAAyB,GAAiB;IACtD,QAAQ,EAAE,uBAAuB;IACjC,IAAI,EAAE,yBAAyB;IAC/B,KAAK,EAAE,yBAAyB;IAChC,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,oBAAoB;IACjC,aAAa,EAAE,4BAA4B;IAC3C,OAAO,EAAE,YAAY;CACrB,CAAC;AAGW,QAAA,qCAAqC,GAAG;IACpD,YAAY;IACZ,SAAS;IACT,WAAW;IACX,eAAe;IACf,OAAO;IACP,UAAU;IACV,MAAM;IACN,OAAO;IACP,UAAU;IACV,cAAc;CACd,CAAC;AAGW,QAAA,6BAA6B,GAA2B;IACpE,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC3C,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CACrC,CAAC;AAEW,QAAA,mCAAmC,GAAsB,IAAA,oBAAa,EAClF,iCAAyB,EACzB,6CAAqC,EACrC,qCAA6B,CAC7B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderPositionGetManyDescription: INodeProperties[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderPositionGetManyDescription = void 0;
4
+ const read_1 = require("../../shared/read");
5
+ const get_1 = require("./get");
6
+ exports.purchaseOrderPositionGetManyDescription = (0, read_1.getManyProperties)(get_1.purchaseOrderPositionInfo, get_1.purchaseOrderPositionSimplifiedFields, get_1.purchaseOrderPositionIncludes, {
7
+ fields: 'OrderPosID,OrderID,ProductNumber,Quantity',
8
+ sort: 'OrderID,PosNumber',
9
+ filterField: 'OrderID',
10
+ clause: "ProductNumber$EQ$'1000'",
11
+ });
12
+ //# sourceMappingURL=getAll.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAll.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrderPosition/getAll.ts"],"names":[],"mappings":";;;AACA,4CAAsD;AACtD,+BAIe;AAGF,QAAA,uCAAuC,GAAsB,IAAA,wBAAiB,EAC1F,+BAAyB,EACzB,2CAAqC,EACrC,mCAA6B,EAC7B;IACC,MAAM,EAAE,2CAA2C;IACnD,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,SAAS;IACtB,MAAM,EAAE,yBAAyB;CACjC,CACD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderPositionDescription: INodeProperties[];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderPositionDescription = void 0;
4
+ const operations_1 = require("../../shared/operations");
5
+ const create_1 = require("./create");
6
+ const delete_1 = require("./delete");
7
+ const get_1 = require("./get");
8
+ const getAll_1 = require("./getAll");
9
+ const update_1 = require("./update");
10
+ exports.purchaseOrderPositionDescription = [
11
+ (0, operations_1.operationProperty)(get_1.purchaseOrderPositionInfo, {
12
+ createDescription: 'Add a position to a purchase order',
13
+ }),
14
+ ...create_1.purchaseOrderPositionCreateDescription,
15
+ ...delete_1.purchaseOrderPositionDeleteDescription,
16
+ ...get_1.purchaseOrderPositionGetDescription,
17
+ ...getAll_1.purchaseOrderPositionGetManyDescription,
18
+ ...update_1.purchaseOrderPositionUpdateDescription,
19
+ ];
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrderPosition/index.ts"],"names":[],"mappings":";;;AACA,wDAA4D;AAC5D,qCAAkE;AAClE,qCAAkE;AAClE,+BAAuF;AACvF,qCAAmE;AACnE,qCAAkE;AAErD,QAAA,gCAAgC,GAAsB;IAClE,IAAA,8BAAiB,EAAC,+BAAyB,EAAE;QAC5C,iBAAiB,EAAE,oCAAoC;KACvD,CAAC;IACF,GAAG,+CAAsC;IACzC,GAAG,+CAAsC;IACzC,GAAG,yCAAmC;IACtC,GAAG,gDAAuC;IAC1C,GAAG,+CAAsC;CACzC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const purchaseOrderPositionUpdateDescription: INodeProperties[];
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.purchaseOrderPositionUpdateDescription = void 0;
4
+ const write_1 = require("../../shared/write");
5
+ exports.purchaseOrderPositionUpdateDescription = [
6
+ ...(0, write_1.updateDataProperty)('purchaseOrderPosition', '{"Quantity": 12, "DeliveryDate": "2026-10-15"}', 'OrderID and PosType cannot be changed. PosIndex moves the position to that place in the purchase order (0 is the first), the position numbers stay the same. The fields DeliveryRequestDate, DeliveryReminderDate, DeliveryDateConfirmationText and CountDeliveryDateChange are ignored, use the purchase order action Confirm Delivery Dates. myfactory recalculates the purchase order.'),
7
+ ];
8
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../../nodes/IptRestApi2/resources/purchaseOrderPosition/update.ts"],"names":[],"mappings":";;;AACA,8CAAwD;AAK3C,QAAA,sCAAsC,GAAsB;IACxE,GAAG,IAAA,0BAAkB,EACpB,uBAAuB,EACvB,gDAAgD,EAChD,2XAA2X,CAC3X;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type INodeProperties, type INodePropertyOptions } from 'n8n-workflow';
2
+ export declare const salesOrderActionOperations: INodePropertyOptions[];
3
+ export declare const salesOrderActionDescription: INodeProperties[];