@limetech/n8n-nodes-lime 0.3.0 → 0.3.1

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 (188) hide show
  1. package/dist/credentials/FortnoxApi.credentials.d.ts +9 -0
  2. package/dist/credentials/FortnoxApi.credentials.js +57 -0
  3. package/dist/credentials/FortnoxApi.credentials.js.map +1 -0
  4. package/dist/credentials/LimeCrmApi.credentials.js +3 -2
  5. package/dist/credentials/LimeCrmApi.credentials.js.map +1 -1
  6. package/dist/nodes/fortnox/Fortnox.node.d.ts +5 -0
  7. package/dist/nodes/fortnox/Fortnox.node.js +95 -0
  8. package/dist/nodes/fortnox/Fortnox.node.js.map +1 -0
  9. package/dist/nodes/fortnox/Fortnox.node.json +18 -0
  10. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +5 -0
  11. package/dist/nodes/fortnox/FortnoxTrigger.node.js +155 -0
  12. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +1 -0
  13. package/dist/nodes/fortnox/FortnoxTrigger.node.json +18 -0
  14. package/dist/nodes/fortnox/commons.d.ts +25 -0
  15. package/dist/nodes/fortnox/commons.js +44 -0
  16. package/dist/nodes/fortnox/commons.js.map +1 -0
  17. package/dist/nodes/fortnox/model.d.ts +20 -0
  18. package/dist/nodes/fortnox/model.js +3 -0
  19. package/dist/nodes/fortnox/model.js.map +1 -0
  20. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +2 -0
  21. package/dist/nodes/fortnox/resources/customers/filterParameters.js +31 -0
  22. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +1 -0
  23. package/dist/nodes/fortnox/resources/customers/index.d.ts +20 -0
  24. package/dist/nodes/fortnox/resources/customers/index.js +77 -0
  25. package/dist/nodes/fortnox/resources/customers/index.js.map +1 -0
  26. package/dist/nodes/fortnox/resources/customers/model.d.ts +99 -0
  27. package/dist/nodes/fortnox/resources/customers/model.js +3 -0
  28. package/dist/nodes/fortnox/resources/customers/model.js.map +1 -0
  29. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +12 -0
  30. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +283 -0
  31. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +1 -0
  32. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +10 -0
  33. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +36 -0
  34. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +1 -0
  35. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +11 -0
  36. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +36 -0
  37. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +1 -0
  38. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +11 -0
  39. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +68 -0
  40. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +1 -0
  41. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +12 -0
  42. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +267 -0
  43. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +1 -0
  44. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +2 -0
  45. package/dist/nodes/fortnox/resources/customers/sortParameters.js +30 -0
  46. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +1 -0
  47. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +2 -0
  48. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +72 -0
  49. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +1 -0
  50. package/dist/nodes/fortnox/resources/invoice/index.d.ts +20 -0
  51. package/dist/nodes/fortnox/resources/invoice/index.js +71 -0
  52. package/dist/nodes/fortnox/resources/invoice/index.js.map +1 -0
  53. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +2 -0
  54. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +193 -0
  55. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +1 -0
  56. package/dist/nodes/fortnox/resources/invoice/model.d.ts +150 -0
  57. package/dist/nodes/fortnox/resources/invoice/model.js +3 -0
  58. package/dist/nodes/fortnox/resources/invoice/model.js.map +1 -0
  59. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +11 -0
  60. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +64 -0
  61. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +1 -0
  62. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +11 -0
  63. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +35 -0
  64. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +1 -0
  65. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +11 -0
  66. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +92 -0
  67. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +1 -0
  68. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +11 -0
  69. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +62 -0
  70. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +1 -0
  71. package/dist/nodes/fortnox/transport/errorCodes.d.ts +1 -0
  72. package/dist/nodes/fortnox/transport/errorCodes.js +51 -0
  73. package/dist/nodes/fortnox/transport/errorCodes.js.map +1 -0
  74. package/dist/nodes/fortnox/transport/index.d.ts +4 -0
  75. package/dist/nodes/fortnox/transport/index.js +72 -0
  76. package/dist/nodes/fortnox/transport/index.js.map +1 -0
  77. package/dist/nodes/lime-crm/LimeCrm.node.json +18 -0
  78. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +14 -0
  79. package/dist/nodes/lime-crm/LimeCrmNode.node.js +113 -0
  80. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -0
  81. package/dist/nodes/lime-crm/LimeCrmTrigger.node.d.ts +18 -0
  82. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js +200 -0
  83. package/dist/nodes/lime-crm/LimeCrmTrigger.node.js.map +1 -0
  84. package/dist/nodes/lime-crm/commons/constants.d.ts +4 -0
  85. package/dist/nodes/lime-crm/commons/constants.js +8 -0
  86. package/dist/nodes/lime-crm/commons/constants.js.map +1 -0
  87. package/dist/nodes/lime-crm/commons/index.d.ts +3 -0
  88. package/dist/nodes/lime-crm/commons/index.js +11 -0
  89. package/dist/nodes/lime-crm/commons/index.js.map +1 -0
  90. package/dist/nodes/lime-crm/commons/limetype.d.ts +10 -0
  91. package/dist/nodes/lime-crm/commons/limetype.js +3 -0
  92. package/dist/nodes/lime-crm/commons/limetype.js.map +1 -0
  93. package/dist/nodes/lime-crm/commons/task.d.ts +14 -0
  94. package/dist/nodes/lime-crm/commons/task.js +49 -0
  95. package/dist/nodes/lime-crm/commons/task.js.map +1 -0
  96. package/dist/nodes/lime-crm/commons/webhook.d.ts +16 -0
  97. package/dist/nodes/lime-crm/commons/webhook.js +30 -0
  98. package/dist/nodes/lime-crm/commons/webhook.js.map +1 -0
  99. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.d.ts +5 -0
  100. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js +12 -0
  101. package/dist/nodes/lime-crm/methods/getEntitiesForErpSystem.js.map +1 -0
  102. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.d.ts +2 -0
  103. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js +21 -0
  104. package/dist/nodes/lime-crm/methods/getLimeTypeProperties.js.map +1 -0
  105. package/dist/nodes/lime-crm/methods/getLimeTypes.d.ts +2 -0
  106. package/dist/nodes/lime-crm/methods/getLimeTypes.js +21 -0
  107. package/dist/nodes/lime-crm/methods/getLimeTypes.js.map +1 -0
  108. package/dist/nodes/lime-crm/methods/index.d.ts +3 -0
  109. package/dist/nodes/lime-crm/methods/index.js +10 -0
  110. package/dist/nodes/lime-crm/methods/index.js.map +1 -0
  111. package/dist/nodes/lime-crm/resources/erpConnector/index.d.ts +23 -0
  112. package/dist/nodes/lime-crm/resources/erpConnector/index.js +57 -0
  113. package/dist/nodes/lime-crm/resources/erpConnector/index.js.map +1 -0
  114. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.d.ts +26 -0
  115. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js +65 -0
  116. package/dist/nodes/lime-crm/resources/erpConnector/operations/createOrUpdateObjects.operation.js.map +1 -0
  117. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.d.ts +9 -0
  118. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js +220 -0
  119. package/dist/nodes/lime-crm/resources/erpConnector/operations/transform.operation.js.map +1 -0
  120. package/dist/nodes/lime-crm/resources/erpConnector/transform.d.ts +15 -0
  121. package/dist/nodes/lime-crm/resources/erpConnector/transform.js +12 -0
  122. package/dist/nodes/lime-crm/resources/erpConnector/transform.js.map +1 -0
  123. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.d.ts +4 -0
  124. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js +7 -0
  125. package/dist/nodes/lime-crm/resources/erpConnector/transformers/baseTransformer.js.map +1 -0
  126. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.d.ts +37 -0
  127. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js +124 -0
  128. package/dist/nodes/lime-crm/resources/erpConnector/transformers/fortnox.js.map +1 -0
  129. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.d.ts +1 -0
  130. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js +6 -0
  131. package/dist/nodes/lime-crm/resources/erpConnector/transformers/index.js.map +1 -0
  132. package/dist/nodes/lime-crm/resources/limeObject/index.d.ts +14 -0
  133. package/dist/nodes/lime-crm/resources/limeObject/index.js +78 -0
  134. package/dist/nodes/lime-crm/resources/limeObject/index.js.map +1 -0
  135. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.d.ts +9 -0
  136. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js +139 -0
  137. package/dist/nodes/lime-crm/resources/limeObject/operations/create.operation.js.map +1 -0
  138. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.d.ts +9 -0
  139. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js +51 -0
  140. package/dist/nodes/lime-crm/resources/limeObject/operations/delete.operation.js.map +1 -0
  141. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.d.ts +9 -0
  142. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js +51 -0
  143. package/dist/nodes/lime-crm/resources/limeObject/operations/get.operation.js.map +1 -0
  144. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.d.ts +9 -0
  145. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js +86 -0
  146. package/dist/nodes/lime-crm/resources/limeObject/operations/search.operation.js.map +1 -0
  147. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.d.ts +9 -0
  148. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js +149 -0
  149. package/dist/nodes/lime-crm/resources/limeObject/operations/update.operation.js.map +1 -0
  150. package/dist/nodes/lime-crm/resources/limeType/index.d.ts +20 -0
  151. package/dist/nodes/lime-crm/resources/limeType/index.js +71 -0
  152. package/dist/nodes/lime-crm/resources/limeType/index.js.map +1 -0
  153. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.d.ts +11 -0
  154. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js +36 -0
  155. package/dist/nodes/lime-crm/resources/limeType/operations/getProperties.operation.js.map +1 -0
  156. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.d.ts +9 -0
  157. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js +36 -0
  158. package/dist/nodes/lime-crm/resources/limeType/operations/getType.operation.js.map +1 -0
  159. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.d.ts +10 -0
  160. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js +15 -0
  161. package/dist/nodes/lime-crm/resources/limeType/operations/listTypes.operation.js.map +1 -0
  162. package/dist/nodes/lime-crm/transport/commons.d.ts +5 -0
  163. package/dist/nodes/lime-crm/transport/commons.js +33 -0
  164. package/dist/nodes/lime-crm/transport/commons.js.map +1 -0
  165. package/dist/nodes/lime-crm/transport/erpConnector.d.ts +9 -0
  166. package/dist/nodes/lime-crm/transport/erpConnector.js +12 -0
  167. package/dist/nodes/lime-crm/transport/erpConnector.js.map +1 -0
  168. package/dist/nodes/lime-crm/transport/index.d.ts +5 -0
  169. package/dist/nodes/lime-crm/transport/index.js +22 -0
  170. package/dist/nodes/lime-crm/transport/index.js.map +1 -0
  171. package/dist/nodes/lime-crm/transport/limeobjects.d.ts +7 -0
  172. package/dist/nodes/lime-crm/transport/limeobjects.js +49 -0
  173. package/dist/nodes/lime-crm/transport/limeobjects.js.map +1 -0
  174. package/dist/nodes/lime-crm/transport/limetypes.d.ts +6 -0
  175. package/dist/nodes/lime-crm/transport/limetypes.js +40 -0
  176. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -0
  177. package/dist/nodes/lime-crm/transport/task.d.ts +13 -0
  178. package/dist/nodes/lime-crm/transport/task.js +14 -0
  179. package/dist/nodes/lime-crm/transport/task.js.map +1 -0
  180. package/dist/nodes/lime-crm/transport/webhooks.d.ts +15 -0
  181. package/dist/nodes/lime-crm/transport/webhooks.js +33 -0
  182. package/dist/nodes/lime-crm/transport/webhooks.js.map +1 -0
  183. package/dist/nodes/nodeResponse.d.ts +12 -0
  184. package/dist/nodes/nodeResponse.js +3 -0
  185. package/dist/nodes/nodeResponse.js.map +1 -0
  186. package/dist/package.json +36 -16
  187. package/dist/tsconfig.tsbuildinfo +1 -1
  188. package/package.json +1 -1
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.invoiceParameters = void 0;
4
+ const commons_1 = require("../../commons");
5
+ const optionParametersDefinitions = [
6
+ {
7
+ displayName: 'Invoice Type',
8
+ name: 'InvoiceType',
9
+ parameters: [
10
+ ['Invoice', 'INVOICE'],
11
+ ['Agreement Invoice', 'AGREEMENTINVOICE'],
12
+ ['Intrest Invoice', 'INTRESTINVOICE'],
13
+ ['Summery Invoice', 'SUMMARYINVOICE'],
14
+ ['Cash Invoice', 'CASHINVOICE'],
15
+ ],
16
+ },
17
+ {
18
+ displayName: 'Language',
19
+ name: 'Language',
20
+ parameters: [
21
+ ['Svenska', 'SV'],
22
+ ['English', 'EN'],
23
+ ],
24
+ },
25
+ {
26
+ displayName: 'Tax Reduction Type',
27
+ name: 'TaxReductionType',
28
+ parameters: [
29
+ ['None', 'none'],
30
+ ['Rot', 'rot'],
31
+ ['Rut', 'rut'],
32
+ ['Green', 'green'],
33
+ ],
34
+ },
35
+ ];
36
+ const collectionParametersDefinitions = [
37
+ {
38
+ displayName: 'EDI Information',
39
+ name: 'EDIInformation',
40
+ parameters: [
41
+ [
42
+ 'EDI Global Location Number',
43
+ 'EDIGlobalLocationNumber',
44
+ 'string',
45
+ '',
46
+ {},
47
+ ],
48
+ [
49
+ 'EDI Global Location Number Delivery',
50
+ 'EDIGlobalLocationNumberDelivery',
51
+ 'string',
52
+ '',
53
+ {},
54
+ ],
55
+ ['EDI Invoice Extra1', 'EDIInvoiceExtra1', 'string', '', {}],
56
+ ['EDI Invoice Extra2', 'EDIInvoiceExtra2', 'string', '', {}],
57
+ [
58
+ 'EDI Our Electronic Reference',
59
+ 'EDIOurElectronicReference',
60
+ 'string',
61
+ '',
62
+ {},
63
+ ],
64
+ [
65
+ 'EDI Your Electronic Reference',
66
+ 'EDIYourElectronicReference',
67
+ 'string',
68
+ '',
69
+ {},
70
+ ],
71
+ ],
72
+ multipleValues: false,
73
+ },
74
+ {
75
+ displayName: 'Email Information',
76
+ name: 'EmailInformation',
77
+ parameters: [
78
+ ['Email Address BCC', 'EmailAddressBCC', 'string', '', {}],
79
+ ['Email Address CC', 'EmailAddressCC', 'string', '', {}],
80
+ ['Email Address From', 'EmailAddressFrom', 'string', '', {}],
81
+ ['Email Address To', 'EmailAddressTo', 'string', '', {}],
82
+ ['Email Body', 'EmailBody', 'string', '', {}],
83
+ ['Email Subject', 'EmailSubject', 'string', '', {}],
84
+ ],
85
+ multipleValues: false,
86
+ },
87
+ {
88
+ displayName: 'Invoice Rows',
89
+ name: 'InvoiceRows',
90
+ parameters: [
91
+ ['Account Number', 'AccountNumber', 'number', 0, {}],
92
+ ['Article Number', 'ArticleNumber', 'string', '', {}],
93
+ ['Cost Center', 'CostCenter', 'string', '', {}],
94
+ ['Delivered Quantity', 'DeliveredQuantity', 'string', '', {}],
95
+ ['Description', 'Description', 'string', '', {}],
96
+ ['Discount', 'Discount', 'number', 0, { numberPrecision: 2 }],
97
+ ['Discount Type', 'DiscountType', 'string', '', {}],
98
+ ['House Work', 'HouseWork', 'boolean', false, {}],
99
+ [
100
+ 'House Work Hours To Report',
101
+ 'HouseWorkHoursToReport',
102
+ 'number',
103
+ 0,
104
+ {},
105
+ ],
106
+ ['House Work Type', 'HouseWorkType', 'string', '', {}],
107
+ ['Price', 'Price', 'number', 0, { numberPrecision: 2 }],
108
+ ['Project', 'Project', 'string', '', {}],
109
+ ['Row ID', 'RowId', 'number', 0, {}],
110
+ ['Stock Point Code', 'StockPointCode', 'string', '', {}],
111
+ ['Unit', 'Unit', 'string', '', {}],
112
+ ['VAT', 'VAT', 'number', 0, {}],
113
+ ['VAT Code', 'VATCode', 'string', '', {}],
114
+ ],
115
+ multipleValues: true,
116
+ },
117
+ {
118
+ displayName: 'Labels',
119
+ name: 'Labels',
120
+ parameters: [['Label ID', 'Id', 'number', 0, {}]],
121
+ multipleValues: true,
122
+ },
123
+ ];
124
+ const parametersDefinitions = [
125
+ ['Address1', 'Address1', 'string', '', {}],
126
+ ['Address2', 'Address2', 'string', '', {}],
127
+ [
128
+ 'Administration Fee',
129
+ 'AdministrationFee',
130
+ 'number',
131
+ 0,
132
+ { numberPrecision: 2 },
133
+ ],
134
+ ['City', 'City', 'string', '', {}],
135
+ ['Comments', 'Comments', 'string', '', {}],
136
+ ['Cost Center', 'CostCenter', 'string', '', {}],
137
+ ['Country', 'Country', 'string', '', {}],
138
+ ['Credit Invoice Reference', 'CreditInvoiceReference', 'string', '', {}],
139
+ ['Currency', 'Currency', 'string', '', {}],
140
+ ['Currency Rate', 'CurrencyRate', 'number', 0, { numberPrecision: 2 }],
141
+ ['Currency Unit', 'CurrencyUnit', 'number', 0, {}],
142
+ ['Customer Name', 'CustomerName', 'string', '', {}],
143
+ ['Delivery Address1', 'DeliveryAddress1', 'string', '', {}],
144
+ ['Delivery Address2', 'DeliveryAddress2', 'string', '', {}],
145
+ ['Delivery City', 'DeliveryCity', 'string', '', {}],
146
+ ['Delivery Country', 'DeliveryCountry', 'string', '', {}],
147
+ ['Delivery Date', 'DeliveryDate', 'string', '', {}],
148
+ ['Delivery Name', 'DeliveryName', 'string', '', {}],
149
+ ['Delivery Zip Code', 'DeliveryZipCode', 'string', '', {}],
150
+ ['Document Number', 'DocumentNumber', 'string', '', {}],
151
+ ['Due Date', 'DueDate', 'string', '', {}],
152
+ ['EU Quarterly Report', 'EuQuarterlyReport', 'boolean', false, {}],
153
+ [
154
+ 'External Invoice Reference1',
155
+ 'ExternalInvoiceReference1',
156
+ 'string',
157
+ '',
158
+ {},
159
+ ],
160
+ [
161
+ 'External Invoice Reference2',
162
+ 'ExternalInvoiceReference2',
163
+ 'string',
164
+ '',
165
+ {},
166
+ ],
167
+ ['Freight', 'Freight', 'number', 0, { numberPrecision: 2 }],
168
+ ['Invoice Date', 'InvoiceDate', 'string', '', {}],
169
+ ['Not Completed', 'NotCompleted', 'boolean', false, {}],
170
+ ['OCR', 'OCR', 'string', '', {}],
171
+ ['Our Reference', 'OurReference', 'string', '', {}],
172
+ ['Outbound Date', 'OutboundDate', 'string', '', {}],
173
+ ['Payment Way', 'PaymentWay', 'string', '', {}],
174
+ ['Phone1', 'Phone1', 'string', '', {}],
175
+ ['Phone2', 'Phone2', 'string', '', {}],
176
+ ['Price List', 'PriceList', 'string', '', {}],
177
+ ['Print Template', 'PrintTemplate', 'string', '', {}],
178
+ ['Project', 'Project', 'string', '', {}],
179
+ ['Remarks', 'Remarks', 'string', '', {}],
180
+ ['Terms Of Delivery', 'TermsOfDelivery', 'string', '', {}],
181
+ ['Terms Of Payment', 'TermsOfPayment', 'string', '', {}],
182
+ ['VAT Included', 'VatIncluded', 'boolean', false, {}],
183
+ ['Way Of Delivery', 'WayOfDelivery', 'string', '', {}],
184
+ ['Your Order Number', 'YourOrderNumber', 'string', '', {}],
185
+ ['Your Reference', 'YourReference', 'string', '', {}],
186
+ ['Zip Code', 'ZipCode', 'string', '', {}],
187
+ ];
188
+ exports.invoiceParameters = [
189
+ ...parametersDefinitions.map(([displayName, name, parameterType, defaultValue, typeOptions]) => (0, commons_1.createParameter)(displayName, name, parameterType, defaultValue, typeOptions)),
190
+ ...collectionParametersDefinitions.map((collection) => (0, commons_1.createCollectionParameter)(collection)),
191
+ ...optionParametersDefinitions.map((option) => (0, commons_1.createOptionParameter)(option)),
192
+ ];
193
+ //# sourceMappingURL=invoiceParameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoiceParameters.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/invoice/invoiceParameters.ts"],"names":[],"mappings":";;;AACA,2CAOuB;AAEvB,MAAM,2BAA2B,GAAgC;IAC7D;QACI,WAAW,EAAE,cAAc;QAC3B,IAAI,EAAE,aAAa;QACnB,UAAU,EAAE;YACR,CAAC,SAAS,EAAE,SAAS,CAAC;YACtB,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;YACzC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;YACrC,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;YACrC,CAAC,cAAc,EAAE,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E,EAAE,CAAC;IAC1D,CAAC,kBAAkB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACxD,CAAC,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC;IACrD,CAAC,iBAAiB,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACtD,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IAC1D,CAAC,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;IACrD,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;CAC5C,CAAC;AAEW,QAAA,iBAAiB,GAAsB;IAChD,GAAG,qBAAqB,CAAC,GAAG,CACxB,CAAC,CAAC,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,CAAC,EAAE,EAAE,CAC9D,IAAA,yBAAe,EACX,WAAW,EACX,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,WAAW,CACd,CACR;IACD,GAAG,+BAA+B,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAClD,IAAA,mCAAyB,EAAC,UAAU,CAAC,CACxC;IACD,GAAG,2BAA2B,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAC1C,IAAA,+BAAqB,EAAC,MAAM,CAAC,CAChC;CACJ,CAAC"}
@@ -0,0 +1,150 @@
1
+ import { ResponseModel } from '../../model';
2
+ export interface InvoiceBase {
3
+ '@url': string;
4
+ Balance: number;
5
+ Booked: boolean;
6
+ Cancelled: boolean;
7
+ CostCenter: string;
8
+ Currency: string;
9
+ CurrencyRate: string;
10
+ CurrencyUnit: number;
11
+ CustomerName: string;
12
+ CustomerNumber: string;
13
+ DocumentNumber: string;
14
+ DueDate: string;
15
+ ExternalInvoiceReference1: string;
16
+ ExternalInvoiceReference2: string;
17
+ InvoiceDate: string;
18
+ InvoiceType: string;
19
+ NoxFinans: boolean;
20
+ OCR: string;
21
+ VoucherNumber: number | string | null;
22
+ VoucherSeries: string | null;
23
+ VoucherYear: number | string | null;
24
+ WayOfDelivery: string;
25
+ TermsOfPayment: string;
26
+ Project: string;
27
+ Sent: boolean;
28
+ Total: number;
29
+ FinalPayDate: string | null;
30
+ }
31
+ export interface EDIInformation {
32
+ EDIGlobalLocationNumber: string | null;
33
+ EDIGlobalLocationNumberDelivery: string | null;
34
+ EDIInvoiceExtra1: string | null;
35
+ EDIInvoiceExtra2: string | null;
36
+ EDIOurElectronicReference: string | null;
37
+ EDIYourElectronicReference: string | null;
38
+ EDIStatus: string;
39
+ }
40
+ export interface EmailInformation {
41
+ EmailAddressFrom: string | null;
42
+ EmailAddressTo: string | null;
43
+ EmailAddressCC: string | null;
44
+ EmailAddressBCC: string | null;
45
+ EmailSubject: string;
46
+ EmailBody: string;
47
+ }
48
+ export interface InvoiceRow {
49
+ AccountNumber: number;
50
+ ArticleNumber: string;
51
+ ContributionPercent: string;
52
+ ContributionValue: string;
53
+ Cost: number;
54
+ CostCenter: string;
55
+ DeliveredQuantity: string;
56
+ Description: string;
57
+ Discount: number;
58
+ DiscountType: string;
59
+ HouseWork: boolean;
60
+ HouseWorkHoursToReport: number | null;
61
+ HouseWorkType: string | null;
62
+ Price: number;
63
+ PriceExcludingVAT: number;
64
+ Project: string;
65
+ RowId: number;
66
+ StockPointCode: string | null;
67
+ Total: number;
68
+ TotalExcludingVAT: number;
69
+ Unit: string;
70
+ VAT: number;
71
+ }
72
+ export interface Label {
73
+ Id: string;
74
+ }
75
+ export interface Invoice extends InvoiceBase {
76
+ '@urlTaxReductionList': string;
77
+ AccountingMethod: string;
78
+ Address1: string;
79
+ Address2: string;
80
+ AdministrationFee: number;
81
+ AdministrationFeeVAT: number;
82
+ BasisTaxReduction: number;
83
+ City: string;
84
+ Comments: string;
85
+ ContractReference: string;
86
+ ContributionPercent: number;
87
+ ContributionValue: string;
88
+ Country: string;
89
+ Credit: string;
90
+ CreditInvoiceReference: string;
91
+ DeliveryAddress1: string;
92
+ DeliveryAddress2: string;
93
+ DeliveryCity: string;
94
+ DeliveryCountry: string;
95
+ DeliveryDate: string | null;
96
+ DeliveryName: string;
97
+ DeliveryZipCode: string;
98
+ EDIInformation: EDIInformation;
99
+ EUQuarterlyReport: boolean;
100
+ EmailInformation: EmailInformation;
101
+ Freight: number;
102
+ FreightVAT: number;
103
+ Gross: number;
104
+ HouseWork: boolean;
105
+ InvoicePeriodEnd: string;
106
+ InvoicePeriodStart: string;
107
+ InvoiceReference: string;
108
+ InvoiceRows: InvoiceRow[];
109
+ Labels: Label[];
110
+ Language: string;
111
+ LastRemindDate: string | null;
112
+ Net: number;
113
+ NotCompleted: boolean;
114
+ OfferReference: string;
115
+ OrderReference: string;
116
+ OrganisationNumber: string;
117
+ OurReference: string;
118
+ OutboundDate: string;
119
+ PaymentWay: string;
120
+ Phone1: string;
121
+ Phone2: string;
122
+ PriceList: string;
123
+ PrintTemplate: string;
124
+ Remarks: string;
125
+ Reminders: number;
126
+ RoundOff: number;
127
+ TaxReduction: string | null;
128
+ TaxReductionType: string;
129
+ TermsOfDelivery: string;
130
+ TimeBasisReference: string | null;
131
+ TotalToPay: number;
132
+ TotalVAT: number;
133
+ VATIncluded: boolean;
134
+ WarehouseReady: boolean;
135
+ YourOrderNumber: string;
136
+ YourReference: string;
137
+ ZipCode: string;
138
+ }
139
+ export interface CreateInvoiceResponse {
140
+ Invoice: Invoice;
141
+ }
142
+ export interface UpdateInvoiceResponse {
143
+ Invoice: Invoice;
144
+ }
145
+ export interface GetInvoiceResponse extends ResponseModel {
146
+ Invoice: InvoiceBase;
147
+ }
148
+ export interface GetAllInvoicesResponse extends ResponseModel {
149
+ Invoices: InvoiceBase[];
150
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/invoice/model.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { CreateInvoiceResponse } from '../model';
3
+ import { NodeResponse } from '../../../../nodeResponse';
4
+ export declare const description: {
5
+ name: string;
6
+ value: string;
7
+ description: string;
8
+ action: string;
9
+ };
10
+ export declare const properties: INodeProperties[];
11
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<CreateInvoiceResponse>>;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.properties = exports.description = void 0;
4
+ const transport_1 = require("../../../transport");
5
+ const invoiceParameters_1 = require("../invoiceParameters");
6
+ exports.description = {
7
+ name: 'Create',
8
+ value: 'create',
9
+ description: 'Create an invoice',
10
+ action: 'Create a document',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'Customer Number',
15
+ name: 'customerNumber',
16
+ type: 'string',
17
+ required: true,
18
+ default: '',
19
+ displayOptions: {
20
+ show: {
21
+ resource: ['invoice'],
22
+ operation: ['create'],
23
+ },
24
+ },
25
+ },
26
+ {
27
+ displayName: 'Add Parameters',
28
+ name: 'createParameters',
29
+ type: 'collection',
30
+ placeholder: 'Add Parameter',
31
+ default: {},
32
+ displayOptions: {
33
+ show: {
34
+ resource: ['invoice'],
35
+ operation: ['create'],
36
+ },
37
+ },
38
+ options: invoiceParameters_1.invoiceParameters,
39
+ },
40
+ ];
41
+ async function execute(i) {
42
+ const customerNumber = this.getNodeParameter('customerNumber', i, {});
43
+ const createParameters = this.getNodeParameter('createParameters', i, {});
44
+ const body = {
45
+ Invoice: {
46
+ CustomerNumber: customerNumber,
47
+ },
48
+ };
49
+ if (createParameters) {
50
+ for (const [key, value] of Object.entries(createParameters)) {
51
+ if (value !== '' && value !== undefined && value !== null) {
52
+ body['Invoice'][key] = value;
53
+ }
54
+ }
55
+ }
56
+ const endpoint = 'invoices';
57
+ return await (0, transport_1.apiRequest)(this, {
58
+ method: 'POST',
59
+ endpoint: endpoint,
60
+ body: body,
61
+ });
62
+ }
63
+ exports.execute = execute;
64
+ //# sourceMappingURL=create.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/invoice/operations/create.operation.ts"],"names":[],"mappings":";;;AACA,kDAAgD;AAEhD,4DAAyD;AAG5C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,mBAAmB;IAChC,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;KACJ;IACD;QACI,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,OAAO,EAAE,qCAAiB;KAC7B;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAEzB,CAAS;IAET,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACtE,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAE1E,MAAM,IAAI,GAAgB;QACtB,OAAO,EAAE;YACL,cAAc,EAAE,cAAc;SACjC;KACJ,CAAC;IAEF,IAAI,gBAAgB,EAAE,CAAC;QACnB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC1D,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACvD,IAAI,CAAC,SAAS,CAAiB,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAClD,CAAC;QACL,CAAC;IACL,CAAC;IAED,MAAM,QAAQ,GAAG,UAAU,CAAC;IAE5B,OAAO,MAAM,IAAA,sBAAU,EAAwB,IAAI,EAAE;QACjD,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC;AA5BD,0BA4BC"}
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { GetInvoiceResponse } from '../model';
3
+ import { NodeResponse } from '../../../../nodeResponse';
4
+ export declare const description: {
5
+ name: string;
6
+ value: string;
7
+ description: string;
8
+ action: string;
9
+ };
10
+ export declare const properties: INodeProperties[];
11
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<GetInvoiceResponse>>;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.properties = exports.description = void 0;
4
+ const transport_1 = require("../../../transport");
5
+ exports.description = {
6
+ name: 'Get',
7
+ value: 'get',
8
+ description: 'Retrieve the invoice',
9
+ action: 'Get single document',
10
+ };
11
+ exports.properties = [
12
+ {
13
+ displayName: 'Document Number',
14
+ name: 'documentNumber',
15
+ type: 'string',
16
+ required: true,
17
+ default: '',
18
+ displayOptions: {
19
+ show: {
20
+ resource: ['invoice'],
21
+ operation: ['get'],
22
+ },
23
+ },
24
+ },
25
+ ];
26
+ async function execute(i) {
27
+ const documentNumber = this.getNodeParameter('documentNumber', i, '');
28
+ const endpoint = `invoices/${encodeURIComponent(documentNumber)}`;
29
+ return await (0, transport_1.apiRequest)(this, {
30
+ method: 'GET',
31
+ endpoint: endpoint,
32
+ });
33
+ }
34
+ exports.execute = execute;
35
+ //# sourceMappingURL=get.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/invoice/operations/get.operation.ts"],"names":[],"mappings":";;;AACA,kDAAgD;AAInC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,sBAAsB;IACnC,MAAM,EAAE,qBAAqB;CAChC,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,KAAK,CAAC;aACrB;SACJ;KACJ;CACJ,CAAC;AAEK,KAAK,UAAU,OAAO,CAEzB,CAAS;IAET,MAAM,cAAc,GAAG,IAAI,CAAC,gBAAgB,CACxC,gBAAgB,EAChB,CAAC,EACD,EAAE,CACK,CAAC;IAEZ,MAAM,QAAQ,GAAG,YAAY,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;IAElE,OAAO,MAAM,IAAA,sBAAU,EAAqB,IAAI,EAAE;QAC9C,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,QAAQ;KACrB,CAAC,CAAC;AACP,CAAC;AAhBD,0BAgBC"}
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { GetAllInvoicesResponse } from '../model';
3
+ import { NodeResponse } from '../../../../nodeResponse';
4
+ export declare const description: {
5
+ name: string;
6
+ value: string;
7
+ description: string;
8
+ action: string;
9
+ };
10
+ export declare const properties: INodeProperties[];
11
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<GetAllInvoicesResponse>>;
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.execute = exports.properties = exports.description = void 0;
4
+ const transport_1 = require("../../../transport");
5
+ const filterParameters_1 = require("../filterParameters");
6
+ exports.description = {
7
+ name: 'Get Many',
8
+ value: 'getAll',
9
+ description: 'Retrieve a list of invoices',
10
+ action: 'Get list of documents',
11
+ };
12
+ exports.properties = [
13
+ {
14
+ displayName: 'Filter By',
15
+ name: 'filterParameters',
16
+ type: 'collection',
17
+ placeholder: 'Add Parameter',
18
+ default: {},
19
+ displayOptions: {
20
+ show: {
21
+ resource: ['invoice'],
22
+ operation: ['getAll'],
23
+ },
24
+ },
25
+ options: filterParameters_1.filterParameters,
26
+ },
27
+ {
28
+ displayName: 'Sort By',
29
+ name: 'sortParameters',
30
+ type: 'options',
31
+ default: '',
32
+ displayOptions: {
33
+ show: {
34
+ resource: ['invoice'],
35
+ operation: ['getAll'],
36
+ },
37
+ },
38
+ options: [
39
+ {
40
+ name: '',
41
+ value: '',
42
+ },
43
+ {
44
+ name: 'Customer Name',
45
+ value: 'customername',
46
+ },
47
+ {
48
+ name: 'Customer Number',
49
+ value: 'customernumber',
50
+ },
51
+ {
52
+ name: 'Document Number',
53
+ value: 'documentnumber',
54
+ },
55
+ {
56
+ name: 'Invoice Date',
57
+ value: 'invoicedate',
58
+ },
59
+ {
60
+ name: 'OCR',
61
+ value: 'ocr',
62
+ },
63
+ {
64
+ name: 'Total',
65
+ value: 'total',
66
+ },
67
+ ],
68
+ },
69
+ ];
70
+ async function execute(i) {
71
+ const filterParameters = this.getNodeParameter('filterParameters', i, {});
72
+ const sortParameters = this.getNodeParameter('sortParameters', i, '');
73
+ const qs = {};
74
+ if (filterParameters) {
75
+ for (const [key, value] of Object.entries(filterParameters)) {
76
+ if (value !== '' && value !== undefined && value !== null) {
77
+ qs[key] = value;
78
+ }
79
+ }
80
+ }
81
+ if (sortParameters) {
82
+ qs['sortby'] = sortParameters;
83
+ }
84
+ const endpoint = 'invoices';
85
+ return await (0, transport_1.apiRequest)(this, {
86
+ method: 'GET',
87
+ endpoint: endpoint,
88
+ qs,
89
+ });
90
+ }
91
+ exports.execute = execute;
92
+ //# sourceMappingURL=getAll.operation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/invoice/operations/getAll.operation.ts"],"names":[],"mappings":";;;AACA,kDAAgD;AAChD,0DAAuD;AAI1C,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,6BAA6B;IAC1C,MAAM,EAAE,uBAAuB;CAClC,CAAC;AAEW,QAAA,UAAU,GAAsB;IACzC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,OAAO,EAAE,mCAAgB;KAC5B;IACD;QACI,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,SAAS,CAAC;gBACrB,SA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AAM,IAAA,sBAAU,EAAyB,IAAI,EAAE;QAClD,MAAM,EAAE,KAAK;QACb,QAAQ,EAAE,QAAQ;QAClB,EAAE;KACL,CAAC,CAAC;AACP,CAAC;AA5BD,0BA4BC"}
@@ -0,0 +1,11 @@
1
+ import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
+ import { CreateInvoiceResponse } from '../model';
3
+ import { NodeResponse } from '../../../../nodeResponse';
4
+ export declare const description: {
5
+ name: string;
6
+ value: string;
7
+ description: string;
8
+ action: string;
9
+ };
10
+ export declare const properties: INodeProperties[];
11
+ export declare function execute(this: IExecuteFunctions, i: number): Promise<NodeResponse<CreateInvoiceResponse>>;