@limetech/n8n-nodes-lime 2.7.0-dev.1 → 3.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 (196) hide show
  1. package/.devcontainer/devcontainer.json +44 -0
  2. package/.devcontainer/docker-compose.yml +27 -0
  3. package/.gitattributes +34 -0
  4. package/.nvmrc +1 -0
  5. package/CHANGELOG.md +17 -5
  6. package/README.md +40 -47
  7. package/credentials/index.ts +0 -1
  8. package/dist/credentials/index.d.ts +0 -1
  9. package/dist/credentials/index.js +0 -1
  10. package/dist/credentials/index.js.map +1 -1
  11. package/dist/nodes/index.d.ts +0 -1
  12. package/dist/nodes/index.js +0 -1
  13. package/dist/nodes/index.js.map +1 -1
  14. package/dist/nodes/lime-crm/LimeCrmNode.node.d.ts +1 -4
  15. package/dist/nodes/lime-crm/LimeCrmNode.node.js +0 -3
  16. package/dist/nodes/lime-crm/LimeCrmNode.node.js.map +1 -1
  17. package/dist/nodes/lime-crm/methods/getLimetypeProperties.d.ts +0 -2
  18. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js +0 -43
  19. package/dist/nodes/lime-crm/methods/getLimetypeProperties.js.map +1 -1
  20. package/dist/nodes/lime-crm/methods/index.d.ts +2 -2
  21. package/dist/nodes/lime-crm/methods/index.js +1 -4
  22. package/dist/nodes/lime-crm/methods/index.js.map +1 -1
  23. package/dist/nodes/lime-crm/methods/resourceMapping.d.ts +0 -1
  24. package/dist/nodes/lime-crm/methods/resourceMapping.js +0 -46
  25. package/dist/nodes/lime-crm/methods/resourceMapping.js.map +1 -1
  26. package/dist/nodes/lime-crm/models/limetype.d.ts +0 -1
  27. package/dist/nodes/lime-crm/resources/data/index.d.ts +1 -1
  28. package/dist/nodes/lime-crm/resources/data/index.js +0 -20
  29. package/dist/nodes/lime-crm/resources/data/index.js.map +1 -1
  30. package/dist/nodes/lime-crm/resources/data/operations/index.d.ts +0 -4
  31. package/dist/nodes/lime-crm/resources/data/operations/index.js +1 -5
  32. package/dist/nodes/lime-crm/resources/data/operations/index.js.map +1 -1
  33. package/dist/nodes/lime-crm/transport/index.d.ts +0 -1
  34. package/dist/nodes/lime-crm/transport/index.js +1 -6
  35. package/dist/nodes/lime-crm/transport/index.js.map +1 -1
  36. package/dist/nodes/lime-crm/transport/limetypes.js +4 -15
  37. package/dist/nodes/lime-crm/transport/limetypes.js.map +1 -1
  38. package/dist/nodes/lime-forms/LimeFormsTrigger.node.js +3 -3
  39. package/dist/nodes/lime-forms/LimeFormsTrigger.node.js.map +1 -1
  40. package/dist/nodes/lime-forms/assets/lime-crm.svg +1 -0
  41. package/dist/package.json +5 -12
  42. package/dist/tsconfig.tsbuildinfo +1 -1
  43. package/nodes/index.ts +0 -1
  44. package/nodes/lime-crm/LimeCrmNode.node.ts +0 -6
  45. package/nodes/lime-crm/methods/getLimetypeProperties.ts +0 -84
  46. package/nodes/lime-crm/methods/index.ts +0 -3
  47. package/nodes/lime-crm/methods/resourceMapping.ts +0 -76
  48. package/nodes/lime-crm/models/limetype.ts +0 -1
  49. package/nodes/lime-crm/resources/data/index.ts +1 -34
  50. package/nodes/lime-crm/resources/data/operations/index.ts +0 -17
  51. package/nodes/lime-crm/transport/index.ts +0 -8
  52. package/nodes/lime-crm/transport/limetypes.ts +8 -26
  53. package/nodes/lime-forms/LimeFormsTrigger.node.ts +3 -3
  54. package/nodes/lime-forms/assets/lime-crm.svg +1 -0
  55. package/package.json +6 -13
  56. package/credentials/FortnoxApi.credentials.ts +0 -61
  57. package/dist/credentials/FortnoxApi.credentials.d.ts +0 -9
  58. package/dist/credentials/FortnoxApi.credentials.js +0 -57
  59. package/dist/credentials/FortnoxApi.credentials.js.map +0 -1
  60. package/dist/nodes/fortnox/Fortnox.node.d.ts +0 -5
  61. package/dist/nodes/fortnox/Fortnox.node.js +0 -95
  62. package/dist/nodes/fortnox/Fortnox.node.js.map +0 -1
  63. package/dist/nodes/fortnox/Fortnox.node.json +0 -18
  64. package/dist/nodes/fortnox/FortnoxTrigger.node.d.ts +0 -5
  65. package/dist/nodes/fortnox/FortnoxTrigger.node.js +0 -155
  66. package/dist/nodes/fortnox/FortnoxTrigger.node.js.map +0 -1
  67. package/dist/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  68. package/dist/nodes/fortnox/commons.d.ts +0 -25
  69. package/dist/nodes/fortnox/commons.js +0 -44
  70. package/dist/nodes/fortnox/commons.js.map +0 -1
  71. package/dist/nodes/fortnox/fortnoxLogo.svg +0 -15
  72. package/dist/nodes/fortnox/index.d.ts +0 -6
  73. package/dist/nodes/fortnox/index.js +0 -23
  74. package/dist/nodes/fortnox/index.js.map +0 -1
  75. package/dist/nodes/fortnox/model.d.ts +0 -20
  76. package/dist/nodes/fortnox/model.js +0 -3
  77. package/dist/nodes/fortnox/model.js.map +0 -1
  78. package/dist/nodes/fortnox/resources/customers/filterParameters.d.ts +0 -2
  79. package/dist/nodes/fortnox/resources/customers/filterParameters.js +0 -31
  80. package/dist/nodes/fortnox/resources/customers/filterParameters.js.map +0 -1
  81. package/dist/nodes/fortnox/resources/customers/index.d.ts +0 -7
  82. package/dist/nodes/fortnox/resources/customers/index.js +0 -85
  83. package/dist/nodes/fortnox/resources/customers/index.js.map +0 -1
  84. package/dist/nodes/fortnox/resources/customers/model.d.ts +0 -99
  85. package/dist/nodes/fortnox/resources/customers/model.js +0 -3
  86. package/dist/nodes/fortnox/resources/customers/model.js.map +0 -1
  87. package/dist/nodes/fortnox/resources/customers/operations/create.operation.d.ts +0 -10
  88. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js +0 -281
  89. package/dist/nodes/fortnox/resources/customers/operations/create.operation.js.map +0 -1
  90. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.d.ts +0 -9
  91. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js +0 -38
  92. package/dist/nodes/fortnox/resources/customers/operations/delete.operation.js.map +0 -1
  93. package/dist/nodes/fortnox/resources/customers/operations/get.operation.d.ts +0 -10
  94. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js +0 -38
  95. package/dist/nodes/fortnox/resources/customers/operations/get.operation.js.map +0 -1
  96. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.d.ts +0 -10
  97. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js +0 -68
  98. package/dist/nodes/fortnox/resources/customers/operations/getAll.operation.js.map +0 -1
  99. package/dist/nodes/fortnox/resources/customers/operations/index.d.ts +0 -5
  100. package/dist/nodes/fortnox/resources/customers/operations/index.js +0 -42
  101. package/dist/nodes/fortnox/resources/customers/operations/index.js.map +0 -1
  102. package/dist/nodes/fortnox/resources/customers/operations/update.operation.d.ts +0 -10
  103. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js +0 -261
  104. package/dist/nodes/fortnox/resources/customers/operations/update.operation.js.map +0 -1
  105. package/dist/nodes/fortnox/resources/customers/sortParameters.d.ts +0 -2
  106. package/dist/nodes/fortnox/resources/customers/sortParameters.js +0 -30
  107. package/dist/nodes/fortnox/resources/customers/sortParameters.js.map +0 -1
  108. package/dist/nodes/fortnox/resources/invoice/filterParameters.d.ts +0 -2
  109. package/dist/nodes/fortnox/resources/invoice/filterParameters.js +0 -72
  110. package/dist/nodes/fortnox/resources/invoice/filterParameters.js.map +0 -1
  111. package/dist/nodes/fortnox/resources/invoice/index.d.ts +0 -7
  112. package/dist/nodes/fortnox/resources/invoice/index.js +0 -81
  113. package/dist/nodes/fortnox/resources/invoice/index.js.map +0 -1
  114. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.d.ts +0 -2
  115. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js +0 -193
  116. package/dist/nodes/fortnox/resources/invoice/invoiceParameters.js.map +0 -1
  117. package/dist/nodes/fortnox/resources/invoice/model.d.ts +0 -147
  118. package/dist/nodes/fortnox/resources/invoice/model.js +0 -3
  119. package/dist/nodes/fortnox/resources/invoice/model.js.map +0 -1
  120. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.d.ts +0 -10
  121. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js +0 -64
  122. package/dist/nodes/fortnox/resources/invoice/operations/create.operation.js.map +0 -1
  123. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.d.ts +0 -10
  124. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js +0 -37
  125. package/dist/nodes/fortnox/resources/invoice/operations/get.operation.js.map +0 -1
  126. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.d.ts +0 -10
  127. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js +0 -92
  128. package/dist/nodes/fortnox/resources/invoice/operations/getAll.operation.js.map +0 -1
  129. package/dist/nodes/fortnox/resources/invoice/operations/index.d.ts +0 -4
  130. package/dist/nodes/fortnox/resources/invoice/operations/index.js +0 -41
  131. package/dist/nodes/fortnox/resources/invoice/operations/index.js.map +0 -1
  132. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.d.ts +0 -10
  133. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js +0 -64
  134. package/dist/nodes/fortnox/resources/invoice/operations/update.operation.js.map +0 -1
  135. package/dist/nodes/fortnox/transport/errorCodes.d.ts +0 -1
  136. package/dist/nodes/fortnox/transport/errorCodes.js +0 -50
  137. package/dist/nodes/fortnox/transport/errorCodes.js.map +0 -1
  138. package/dist/nodes/fortnox/transport/index.d.ts +0 -3
  139. package/dist/nodes/fortnox/transport/index.js +0 -76
  140. package/dist/nodes/fortnox/transport/index.js.map +0 -1
  141. package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.d.ts +0 -5
  142. package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js +0 -230
  143. package/dist/nodes/lime-crm/resources/data/operations/bulkImportCommons.js.map +0 -1
  144. package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.d.ts +0 -9
  145. package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js +0 -16
  146. package/dist/nodes/lime-crm/resources/data/operations/createManyObjects.operation.js.map +0 -1
  147. package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.d.ts +0 -9
  148. package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js +0 -16
  149. package/dist/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.js.map +0 -1
  150. package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.d.ts +0 -9
  151. package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js +0 -241
  152. package/dist/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.js.map +0 -1
  153. package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.d.ts +0 -9
  154. package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js +0 -16
  155. package/dist/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.js.map +0 -1
  156. package/dist/nodes/lime-crm/transport/bulkimport.d.ts +0 -41
  157. package/dist/nodes/lime-crm/transport/bulkimport.js +0 -86
  158. package/dist/nodes/lime-crm/transport/bulkimport.js.map +0 -1
  159. package/dist/nodes/lime-forms/lime-forms.svg +0 -6
  160. package/docker-compose.yml +0 -0
  161. package/nodes/fortnox/Fortnox.node.json +0 -18
  162. package/nodes/fortnox/Fortnox.node.ts +0 -102
  163. package/nodes/fortnox/FortnoxTrigger.node.json +0 -18
  164. package/nodes/fortnox/FortnoxTrigger.node.ts +0 -196
  165. package/nodes/fortnox/commons.ts +0 -94
  166. package/nodes/fortnox/fortnoxLogo.svg +0 -15
  167. package/nodes/fortnox/index.ts +0 -6
  168. package/nodes/fortnox/model.ts +0 -25
  169. package/nodes/fortnox/resources/customers/filterParameters.ts +0 -47
  170. package/nodes/fortnox/resources/customers/index.ts +0 -53
  171. package/nodes/fortnox/resources/customers/model.ts +0 -107
  172. package/nodes/fortnox/resources/customers/operations/create.operation.ts +0 -307
  173. package/nodes/fortnox/resources/customers/operations/delete.operation.ts +0 -49
  174. package/nodes/fortnox/resources/customers/operations/get.operation.ts +0 -50
  175. package/nodes/fortnox/resources/customers/operations/getAll.operation.ts +0 -79
  176. package/nodes/fortnox/resources/customers/operations/index.ts +0 -5
  177. package/nodes/fortnox/resources/customers/operations/update.operation.ts +0 -288
  178. package/nodes/fortnox/resources/customers/sortParameters.ts +0 -32
  179. package/nodes/fortnox/resources/invoice/filterParameters.ts +0 -88
  180. package/nodes/fortnox/resources/invoice/index.ts +0 -49
  181. package/nodes/fortnox/resources/invoice/invoiceParameters.ts +0 -214
  182. package/nodes/fortnox/resources/invoice/model.ts +0 -156
  183. package/nodes/fortnox/resources/invoice/operations/create.operation.ts +0 -71
  184. package/nodes/fortnox/resources/invoice/operations/get.operation.ts +0 -50
  185. package/nodes/fortnox/resources/invoice/operations/getAll.operation.ts +0 -100
  186. package/nodes/fortnox/resources/invoice/operations/index.ts +0 -4
  187. package/nodes/fortnox/resources/invoice/operations/update.operation.ts +0 -79
  188. package/nodes/fortnox/transport/errorCodes.ts +0 -62
  189. package/nodes/fortnox/transport/index.ts +0 -106
  190. package/nodes/lime-crm/resources/data/operations/bulkImportCommons.ts +0 -323
  191. package/nodes/lime-crm/resources/data/operations/createManyObjects.operation.ts +0 -44
  192. package/nodes/lime-crm/resources/data/operations/createOrUpdateManyObjects.operation.ts +0 -44
  193. package/nodes/lime-crm/resources/data/operations/deprecated-startBulkImport.operation.ts +0 -364
  194. package/nodes/lime-crm/resources/data/operations/updateManyObjects.operation.ts +0 -44
  195. package/nodes/lime-crm/transport/bulkimport.ts +0 -271
  196. package/nodes/lime-forms/lime-forms.svg +0 -6
@@ -1,99 +0,0 @@
1
- import { ResponseModel } from '../../model';
2
- export interface CustomerBase {
3
- '@url': string;
4
- Address1: string | null;
5
- Address2: string | null;
6
- City: string | null;
7
- CustomerNumber: number;
8
- Email: string | null;
9
- Name: string;
10
- OrganisationNumber: string;
11
- Phone: string | null;
12
- ZipCode: number | string | null;
13
- }
14
- export type DeliveryType = 'PRINT' | 'EMAIL' | 'PRINTSERVICE';
15
- export interface DefaultDeliveryTypes {
16
- Invoice: DeliveryType;
17
- Order: DeliveryType;
18
- Offer: DeliveryType;
19
- }
20
- export interface DefaultTemplates {
21
- Order: string | null;
22
- Offer: string | null;
23
- Invoice: string | null;
24
- CashInvoice: string | null;
25
- }
26
- export interface CustomerDetails {
27
- Address1: string | null;
28
- Address2: string | null;
29
- City: string | null;
30
- Country: string | null;
31
- Comments: string | null;
32
- Currency: string;
33
- CostCenter: string | null;
34
- CountryCode: string | null;
35
- Active: boolean;
36
- CustomerNumber: string;
37
- DefaultDeliveryTypes: DefaultDeliveryTypes;
38
- DefaultTemplates: DefaultTemplates;
39
- DeliveryAddress1: string | null;
40
- DeliveryAddress2: string | null;
41
- DeliveryCity: string | null;
42
- DeliveryCountry: string | null;
43
- DeliveryCountryCode: string | null;
44
- DeliveryFax: string | null;
45
- DeliveryName: string | null;
46
- DeliveryPhone1: string | null;
47
- DeliveryPhone2: string | null;
48
- DeliveryZipCode: string | null;
49
- Email: string | null;
50
- EmailInvoice: string | null;
51
- EmailInvoiceBCC: string | null;
52
- EmailInvoiceCC: string | null;
53
- EmailOffer: string | null;
54
- EmailOfferBCC: string | null;
55
- EmailOfferCC: string | null;
56
- EmailOrder: string | null;
57
- EmailOrderBCC: string | null;
58
- EmailOrderCC: string | null;
59
- ExternalReference: string | null;
60
- Fax: string | null;
61
- GLN: string | null;
62
- GLNDelivery: string | null;
63
- InvoiceAdministrationFee: number | null;
64
- InvoiceDiscount: number | null;
65
- InvoiceFreight: number | null;
66
- InvoiceRemark: string | null;
67
- Name: string;
68
- OrganisationNumber: string;
69
- OurReference: string | null;
70
- Phone1: string | null;
71
- Phone2: string | null;
72
- PriceList: string | null;
73
- Project: string | null;
74
- SalesAccount: string | null;
75
- ShowPriceVATIncluded: boolean;
76
- TermsOfDelivery: string | null;
77
- TermsOfPayment: string | null;
78
- Type: 'PRIVATE' | 'COMPANY';
79
- VATNumber: string | null;
80
- VATType: 'SEVAT' | 'SEREVERSEDVAT' | 'EUREVERSEDVAT' | 'EUVAT' | 'EXPORT';
81
- VisitingAddress: string | null;
82
- VisitingCity: string | null;
83
- VisitingCountry: string | null;
84
- VisitingCountryCode: string | null;
85
- VisitingZipCode: string | null;
86
- WayOfDelivery: string | null;
87
- WWW: string | null;
88
- YourReference: string | null;
89
- ZipCode: string | null;
90
- }
91
- export interface Customer extends CustomerDetails {
92
- '@url': string;
93
- }
94
- export interface CustomersResponse extends ResponseModel {
95
- Customers: CustomerBase[];
96
- }
97
- export interface CustomerResponse {
98
- Customer: Customer;
99
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../../nodes/fortnox/resources/customers/model.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
- import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
- import { CustomerResponse } from '../model';
3
- export declare const description: {
4
- name: string;
5
- value: string;
6
- description: string;
7
- action: string;
8
- };
9
- export declare const properties: INodeProperties[];
10
- export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomerResponse>;
@@ -1,281 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.properties = exports.description = void 0;
4
- exports.execute = execute;
5
- const n8n_workflow_1 = require("n8n-workflow");
6
- const transport_1 = require("../../../transport");
7
- const currency_codes_1 = require("currency-codes");
8
- exports.description = {
9
- name: 'Create Customer',
10
- value: 'create',
11
- description: 'Create a new customer',
12
- action: 'Create a customer',
13
- };
14
- const createProperties = [
15
- {
16
- displayName: 'Address 1',
17
- name: 'Address1',
18
- type: 'string',
19
- default: '',
20
- description: "Customer's primary address",
21
- },
22
- {
23
- displayName: 'Address 2',
24
- name: 'Address2',
25
- type: 'string',
26
- default: '',
27
- description: "Customer's secondary address",
28
- },
29
- {
30
- displayName: 'City',
31
- name: 'City',
32
- type: 'string',
33
- default: '',
34
- description: "Customer's city",
35
- },
36
- {
37
- displayName: 'Comments',
38
- name: 'Comments',
39
- type: 'string',
40
- default: '',
41
- description: 'Comments about the customer',
42
- },
43
- {
44
- displayName: 'Cost Center',
45
- name: 'CostCenter',
46
- type: 'string',
47
- default: '',
48
- description: "Customer's cost center",
49
- },
50
- {
51
- displayName: 'Country',
52
- name: 'Country',
53
- type: 'string',
54
- default: '',
55
- description: "Customer's country",
56
- },
57
- {
58
- displayName: 'Country Code',
59
- name: 'CountryCode',
60
- type: 'string',
61
- default: '',
62
- description: "Customer's country code",
63
- },
64
- {
65
- displayName: 'Email',
66
- name: 'Email',
67
- type: 'string',
68
- default: '',
69
- description: "Customer's email address",
70
- },
71
- {
72
- displayName: 'External Reference',
73
- name: 'ExternalReference',
74
- type: 'string',
75
- default: '',
76
- description: 'External reference for the customer',
77
- },
78
- {
79
- displayName: 'Fax',
80
- name: 'Fax',
81
- type: 'string',
82
- default: '',
83
- description: "Customer's fax number",
84
- },
85
- {
86
- displayName: 'GLN',
87
- name: 'GLN',
88
- type: 'string',
89
- default: '',
90
- description: 'Global Location Number',
91
- },
92
- {
93
- displayName: 'Organisation Number',
94
- name: 'OrganisationNumber',
95
- type: 'string',
96
- default: '',
97
- description: "Customer's organisation number",
98
- },
99
- {
100
- displayName: 'Phone 1',
101
- name: 'Phone1',
102
- type: 'string',
103
- default: '',
104
- description: "Customer's primary phone number",
105
- },
106
- {
107
- displayName: 'Phone 2',
108
- name: 'Phone2',
109
- type: 'string',
110
- default: '',
111
- description: "Customer's secondary phone number",
112
- },
113
- {
114
- displayName: 'VAT Number',
115
- name: 'VATNumber',
116
- type: 'string',
117
- default: '',
118
- description: "Customer's VAT number",
119
- },
120
- {
121
- displayName: 'Website',
122
- name: 'WWW',
123
- type: 'string',
124
- default: '',
125
- description: "Customer's website URL",
126
- },
127
- {
128
- displayName: 'ZIP Code',
129
- name: 'ZipCode',
130
- type: 'string',
131
- default: '',
132
- description: "Customer's ZIP/postal code",
133
- },
134
- ];
135
- exports.properties = [
136
- {
137
- displayName: 'Name',
138
- name: 'Name',
139
- type: 'string',
140
- required: true,
141
- default: '',
142
- description: 'Customer name',
143
- displayOptions: {
144
- show: {
145
- resource: ['customer'],
146
- operation: ['create'],
147
- },
148
- },
149
- },
150
- {
151
- displayName: 'Active',
152
- name: 'Active',
153
- type: 'boolean',
154
- required: true,
155
- default: true,
156
- description: 'Whether the customer is active',
157
- displayOptions: {
158
- show: {
159
- resource: ['customer'],
160
- operation: ['create'],
161
- },
162
- },
163
- },
164
- {
165
- displayName: 'Currency',
166
- name: 'Currency',
167
- type: 'string',
168
- required: true,
169
- default: 'SEK',
170
- description: 'Currency',
171
- displayOptions: {
172
- show: {
173
- resource: ['customer'],
174
- operation: ['create'],
175
- },
176
- },
177
- },
178
- {
179
- displayName: 'Type',
180
- name: 'Type',
181
- type: 'options',
182
- required: true,
183
- options: [
184
- {
185
- name: 'Private',
186
- value: 'PRIVATE',
187
- },
188
- {
189
- name: 'Company',
190
- value: 'COMPANY',
191
- },
192
- ],
193
- default: 'COMPANY',
194
- description: 'Type of customer',
195
- displayOptions: {
196
- show: {
197
- resource: ['customer'],
198
- operation: ['create'],
199
- },
200
- },
201
- },
202
- {
203
- displayName: 'VAT Type',
204
- name: 'VATType',
205
- type: 'options',
206
- required: true,
207
- options: [
208
- {
209
- name: 'SE VAT',
210
- value: 'SEVAT',
211
- },
212
- {
213
- name: 'SE Reversed VAT',
214
- value: 'SEREVERSEDVAT',
215
- },
216
- {
217
- name: 'EU Reversed VAT',
218
- value: 'EUREVERSEDVAT',
219
- },
220
- {
221
- name: 'EU VAT',
222
- value: 'EUVAT',
223
- },
224
- {
225
- name: 'Export',
226
- value: 'EXPORT',
227
- },
228
- ],
229
- default: 'SEVAT',
230
- description: 'Type of VAT applied',
231
- displayOptions: {
232
- show: {
233
- resource: ['customer'],
234
- operation: ['create'],
235
- },
236
- },
237
- },
238
- {
239
- displayName: 'Additional Fields',
240
- name: 'additionalFields',
241
- type: 'collection',
242
- placeholder: 'Add Field',
243
- default: {},
244
- displayOptions: {
245
- show: {
246
- resource: ['customer'],
247
- operation: ['create'],
248
- },
249
- },
250
- options: [...createProperties],
251
- },
252
- ];
253
- async function execute(i) {
254
- const name = this.getNodeParameter('Name', i);
255
- let currency = this.getNodeParameter('Currency', i);
256
- currency = currency.toUpperCase();
257
- const active = this.getNodeParameter('Active', i);
258
- const type = this.getNodeParameter('Type', i);
259
- const vatType = this.getNodeParameter('VATType', i);
260
- const additionalFields = this.getNodeParameter('additionalFields', i, {});
261
- if ((0, currency_codes_1.code)(currency) === undefined) {
262
- throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Invalid currency code: ${currency}. Use ISO 4217 currency code.`);
263
- }
264
- const body = {
265
- Customer: {
266
- Name: name,
267
- Currency: currency,
268
- Active: active,
269
- Type: type,
270
- VATType: vatType,
271
- ...additionalFields,
272
- },
273
- };
274
- const endpoint = `/customers`;
275
- return await (0, transport_1.apiRequest)(this, {
276
- method: 'POST',
277
- endpoint: endpoint,
278
- body: body,
279
- });
280
- }
281
- //# sourceMappingURL=create.operation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/create.operation.ts"],"names":[],"mappings":";;;AAoQA,0BA8CC;AAlTD,+CAKsB;AACtB,kDAAgD;AAChD,mDAAsD;AAGzC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,uBAAuB;IACpC,MAAM,EAAE,mBAAmB;CAC9B,CAAC;AAEF,MAAM,gBAAgB,GAAsB;IACxC;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,4BAA4B;KAC5C;IACD;QACI,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,UAAU;QAChB,I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QACvC,MAAM,IAAI,iCAAkB,CACxB,IAAI,CAAC,OAAO,EAAE,EACd,0BAA0B,QAAQ,+BAA+B,CACpE,CAAC;IACN,CAAC;IAED,MAAM,IAAI,GAAG;QACT,QAAQ,EAAE;YACN,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,QAAQ;YAClB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,OAAO;YAChB,GAAG,gBAAgB;SACtB;KACJ,CAAC;IAEF,MAAM,QAAQ,GAAG,YAAY,CAAC;IAE9B,OAAO,MAAM,IAAA,sBAAU,EAAmB,IAAI,EAAE;QAC5C,MAAM,EAAE,MAAM;QACd,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;KACb,CAAC,CAAC;AACP,CAAC"}
@@ -1,9 +0,0 @@
1
- import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
- export declare const description: {
3
- name: string;
4
- value: string;
5
- description: string;
6
- action: string;
7
- };
8
- export declare const properties: INodeProperties[];
9
- export declare function execute(this: IExecuteFunctions, i: number): Promise<null>;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.properties = exports.description = void 0;
4
- exports.execute = execute;
5
- const transport_1 = require("../../../transport");
6
- exports.description = {
7
- name: 'Delete Customer',
8
- value: 'delete',
9
- description: 'Delete a single company by customer number',
10
- action: 'Delete a customer',
11
- };
12
- exports.properties = [
13
- {
14
- displayName: 'Customer Number',
15
- name: 'customerNumber',
16
- type: 'string',
17
- required: true,
18
- default: '',
19
- description: 'Unique identifier for customer',
20
- displayOptions: {
21
- show: {
22
- resource: ['customer'],
23
- operation: ['delete'],
24
- },
25
- },
26
- },
27
- ];
28
- async function execute(i) {
29
- const customerNumber = this.getNodeParameter('customerNumber', i, '');
30
- const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
31
- return await (0, transport_1.apiRequest)(this, {
32
- method: 'DELETE',
33
- endpoint,
34
- }, {
35
- id: customerNumber,
36
- });
37
- }
38
- //# sourceMappingURL=delete.operation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delete.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/delete.operation.ts"],"names":[],"mappings":";;;AA2BA,0BAqBC;AA/CD,kDAAgD;AAEnC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,4CAA4C;IACzD,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,WAAW,EAAE,gCAAgC;QAC7C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;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,cAAc,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;IACpE,OAAO,MAAM,IAAA,sBAAU,EACnB,IAAI,EACJ;QACI,MAAM,EAAE,QAAQ;QAChB,QAAQ;KACX,EACD;QACI,EAAE,EAAE,cAAc;KACrB,CACJ,CAAC;AACN,CAAC"}
@@ -1,10 +0,0 @@
1
- import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
- import { CustomerResponse } from '../model';
3
- export declare const description: {
4
- name: string;
5
- value: string;
6
- description: string;
7
- action: string;
8
- };
9
- export declare const properties: INodeProperties[];
10
- export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomerResponse>;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.properties = exports.description = void 0;
4
- exports.execute = execute;
5
- const transport_1 = require("../../../transport");
6
- exports.description = {
7
- name: 'Get Customer',
8
- value: 'get',
9
- description: 'Get a single company by customer number',
10
- action: 'Get a customer',
11
- };
12
- exports.properties = [
13
- {
14
- displayName: 'Customer Number',
15
- name: 'customerNumber',
16
- type: 'string',
17
- required: true,
18
- default: '',
19
- description: 'Unique identifier for customer',
20
- displayOptions: {
21
- show: {
22
- resource: ['customer'],
23
- operation: ['get'],
24
- },
25
- },
26
- },
27
- ];
28
- async function execute(i) {
29
- const customerNumber = this.getNodeParameter('customerNumber', i, '');
30
- const endpoint = `/customers/${encodeURIComponent(customerNumber)}`;
31
- return await (0, transport_1.apiRequest)(this, {
32
- method: 'GET',
33
- endpoint,
34
- }, {
35
- id: customerNumber,
36
- });
37
- }
38
- //# sourceMappingURL=get.operation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/get.operation.ts"],"names":[],"mappings":";;;AA4BA,0BAqBC;AAhDD,kDAAgD;AAGnC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,cAAc;IACpB,KAAK,EAAE,KAAK;IACZ,WAAW,EAAE,yCAAyC;IACtD,MAAM,EAAE,gBAAgB;CAC3B,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,WAAW,EAAE,gCAAgC;QAC7C,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,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,cAAc,kBAAkB,CAAC,cAAc,CAAC,EAAE,CAAC;IACpE,OAAO,MAAM,IAAA,sBAAU,EACnB,IAAI,EACJ;QACI,MAAM,EAAE,KAAK;QACb,QAAQ;KACX,EACD;QACI,EAAE,EAAE,cAAc;KACrB,CACJ,CAAC;AACN,CAAC"}
@@ -1,10 +0,0 @@
1
- import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
- import { CustomersResponse } from '../model';
3
- export declare const description: {
4
- name: string;
5
- value: string;
6
- description: string;
7
- action: string;
8
- };
9
- export declare const properties: INodeProperties[];
10
- export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomersResponse>;
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.properties = exports.description = void 0;
4
- exports.execute = execute;
5
- const transport_1 = require("../../../transport");
6
- const filterParameters_1 = require("../filterParameters");
7
- const sortParameters_1 = require("../sortParameters");
8
- exports.description = {
9
- name: 'Get All Customers',
10
- value: 'getAll',
11
- description: 'Get all customers',
12
- action: 'Get all customers',
13
- };
14
- exports.properties = [
15
- {
16
- displayName: 'Filter by',
17
- name: 'filterParameters',
18
- type: 'collection',
19
- placeholder: 'Add Parameter',
20
- default: {},
21
- displayOptions: {
22
- show: {
23
- resource: ['customer'],
24
- operation: ['getAll'],
25
- },
26
- },
27
- options: filterParameters_1.filterParameters,
28
- },
29
- {
30
- displayName: 'Sort by',
31
- name: 'sortParameters',
32
- type: 'collection',
33
- placeholder: 'Add Parameter',
34
- default: {},
35
- displayOptions: {
36
- show: {
37
- resource: ['customer'],
38
- operation: ['getAll'],
39
- },
40
- },
41
- options: sortParameters_1.sortParameters,
42
- },
43
- ];
44
- async function execute(i) {
45
- const filterParameters = this.getNodeParameter('filterParameters', i, {});
46
- const sortParameters = this.getNodeParameter('sortParameters', i, {});
47
- const qs = {};
48
- if (filterParameters) {
49
- for (const [key, value] of Object.entries(filterParameters)) {
50
- if (value !== '' && value !== undefined && value !== null) {
51
- qs[key] = value;
52
- }
53
- }
54
- }
55
- if (sortParameters && Object.keys(sortParameters).length > 0) {
56
- qs['sortby'] = Object.entries(sortParameters)
57
- .filter(([, value]) => value)
58
- .map(([, value]) => `${value}`)
59
- .join('');
60
- }
61
- const endpoint = `/customers`;
62
- return await (0, transport_1.apiRequest)(this, {
63
- method: 'GET',
64
- endpoint: endpoint,
65
- qs: qs,
66
- });
67
- }
68
- //# sourceMappingURL=getAll.operation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getAll.operation.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/getAll.operation.ts"],"names":[],"mappings":";;;AA4CA,0BAkCC;AA7ED,kDAAgD;AAChD,0DAAuD;AACvD,sDAAmD;AAGtC,QAAA,WAAW,GAAG;IACvB,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,mBAAmB;IAChC,MAAM,EAAE,mBAAmB;CAC9B,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,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,QAAQ,CAAC;aACxB;SACJ;QACD,OAAO,EAAE,mCAAgB;KAC5B;IACD;QACI,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,eAAe;QAC5B,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACZ,IAAI,EAAE;gBACF,QAAQ,EAAE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AAE,EAAE;KACT,CAAC,CAAC;AACP,CAAC"}
@@ -1,5 +0,0 @@
1
- export * as createSingleCustomer from './create.operation';
2
- export * as deleteSingleCustomer from './delete.operation';
3
- export * as getSingleCustomer from './get.operation';
4
- export * as getManyCustomers from './getAll.operation';
5
- export * as updateSingleCustomer from './update.operation';
@@ -1,42 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.updateSingleCustomer = exports.getManyCustomers = exports.getSingleCustomer = exports.deleteSingleCustomer = exports.createSingleCustomer = void 0;
37
- exports.createSingleCustomer = __importStar(require("./create.operation"));
38
- exports.deleteSingleCustomer = __importStar(require("./delete.operation"));
39
- exports.getSingleCustomer = __importStar(require("./get.operation"));
40
- exports.getManyCustomers = __importStar(require("./getAll.operation"));
41
- exports.updateSingleCustomer = __importStar(require("./update.operation"));
42
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../nodes/fortnox/resources/customers/operations/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAA2D;AAC3D,2EAA2D;AAC3D,qEAAqD;AACrD,uEAAuD;AACvD,2EAA2D"}
@@ -1,10 +0,0 @@
1
- import { IExecuteFunctions, INodeProperties } from 'n8n-workflow';
2
- import { CustomerResponse } from '../model';
3
- export declare const description: {
4
- name: string;
5
- value: string;
6
- description: string;
7
- action: string;
8
- };
9
- export declare const properties: INodeProperties[];
10
- export declare function execute(this: IExecuteFunctions, i: number): Promise<CustomerResponse>;