@general-dexterity/n8n-nodes-qonto 0.1.0 → 0.2.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 (85) hide show
  1. package/README.md +144 -16
  2. package/dist/credentials/QontoApiKey.credentials.js.map +1 -1
  3. package/dist/credentials/QontoOAuth2Api.credentials.js +5 -4
  4. package/dist/credentials/QontoOAuth2Api.credentials.js.map +1 -1
  5. package/dist/nodes/Qonto/Qonto.node.d.ts +8 -1
  6. package/dist/nodes/Qonto/Qonto.node.js +53 -207
  7. package/dist/nodes/Qonto/Qonto.node.js.map +1 -1
  8. package/dist/nodes/Qonto/resources/Attachment.resource.d.ts +11 -0
  9. package/dist/nodes/Qonto/resources/Attachment.resource.js +61 -0
  10. package/dist/nodes/Qonto/resources/Attachment.resource.js.map +1 -0
  11. package/dist/nodes/Qonto/resources/Beneficiary.resource.d.ts +8 -0
  12. package/dist/nodes/Qonto/resources/Beneficiary.resource.js +50 -0
  13. package/dist/nodes/Qonto/resources/Beneficiary.resource.js.map +1 -0
  14. package/dist/nodes/Qonto/resources/BusinessAccount.resource.d.ts +6 -0
  15. package/dist/nodes/Qonto/resources/BusinessAccount.resource.js +26 -0
  16. package/dist/nodes/Qonto/resources/BusinessAccount.resource.js.map +1 -0
  17. package/dist/nodes/Qonto/resources/Card.resource.d.ts +6 -0
  18. package/dist/nodes/Qonto/resources/Card.resource.js +26 -0
  19. package/dist/nodes/Qonto/resources/Card.resource.js.map +1 -0
  20. package/dist/nodes/Qonto/resources/Client.resource.d.ts +8 -0
  21. package/dist/nodes/Qonto/resources/Client.resource.js +40 -0
  22. package/dist/nodes/Qonto/resources/Client.resource.js.map +1 -0
  23. package/dist/nodes/Qonto/resources/ClientInvoice.resource.d.ts +8 -0
  24. package/dist/nodes/Qonto/resources/ClientInvoice.resource.js +37 -0
  25. package/dist/nodes/Qonto/resources/ClientInvoice.resource.js.map +1 -0
  26. package/dist/nodes/Qonto/resources/CreditNote.resource.d.ts +8 -0
  27. package/dist/nodes/Qonto/resources/CreditNote.resource.js +35 -0
  28. package/dist/nodes/Qonto/resources/CreditNote.resource.js.map +1 -0
  29. package/dist/nodes/Qonto/resources/ExternalTransfer.resource.d.ts +8 -0
  30. package/dist/nodes/Qonto/resources/ExternalTransfer.resource.js +45 -0
  31. package/dist/nodes/Qonto/resources/ExternalTransfer.resource.js.map +1 -0
  32. package/dist/nodes/Qonto/resources/InsuranceContract.resource.d.ts +6 -0
  33. package/dist/nodes/Qonto/resources/InsuranceContract.resource.js +26 -0
  34. package/dist/nodes/Qonto/resources/InsuranceContract.resource.js.map +1 -0
  35. package/dist/nodes/Qonto/resources/InternalTransfer.resource.d.ts +6 -0
  36. package/dist/nodes/Qonto/resources/InternalTransfer.resource.js +26 -0
  37. package/dist/nodes/Qonto/resources/InternalTransfer.resource.js.map +1 -0
  38. package/dist/nodes/Qonto/resources/Label.resource.d.ts +6 -0
  39. package/dist/nodes/Qonto/resources/Label.resource.js +26 -0
  40. package/dist/nodes/Qonto/resources/Label.resource.js.map +1 -0
  41. package/dist/nodes/Qonto/resources/Membership.resource.d.ts +8 -0
  42. package/dist/nodes/Qonto/resources/Membership.resource.js +41 -0
  43. package/dist/nodes/Qonto/resources/Membership.resource.js.map +1 -0
  44. package/dist/nodes/Qonto/resources/Organization.resource.d.ts +8 -0
  45. package/dist/nodes/Qonto/resources/Organization.resource.js +31 -0
  46. package/dist/nodes/Qonto/resources/Organization.resource.js.map +1 -0
  47. package/dist/nodes/Qonto/resources/Quote.resource.d.ts +8 -0
  48. package/dist/nodes/Qonto/resources/Quote.resource.js +36 -0
  49. package/dist/nodes/Qonto/resources/Quote.resource.js.map +1 -0
  50. package/dist/nodes/Qonto/resources/Request.resource.d.ts +8 -0
  51. package/dist/nodes/Qonto/resources/Request.resource.js +45 -0
  52. package/dist/nodes/Qonto/resources/Request.resource.js.map +1 -0
  53. package/dist/nodes/Qonto/resources/SepaTransfer.resource.d.ts +9 -0
  54. package/dist/nodes/Qonto/resources/SepaTransfer.resource.js +53 -0
  55. package/dist/nodes/Qonto/resources/SepaTransfer.resource.js.map +1 -0
  56. package/dist/nodes/Qonto/resources/Statement.resource.d.ts +8 -0
  57. package/dist/nodes/Qonto/resources/Statement.resource.js +49 -0
  58. package/dist/nodes/Qonto/resources/Statement.resource.js.map +1 -0
  59. package/dist/nodes/Qonto/resources/SupplierInvoice.resource.d.ts +8 -0
  60. package/dist/nodes/Qonto/resources/SupplierInvoice.resource.js +36 -0
  61. package/dist/nodes/Qonto/resources/SupplierInvoice.resource.js.map +1 -0
  62. package/dist/nodes/Qonto/resources/Team.resource.d.ts +6 -0
  63. package/dist/nodes/Qonto/resources/Team.resource.js +26 -0
  64. package/dist/nodes/Qonto/resources/Team.resource.js.map +1 -0
  65. package/dist/nodes/Qonto/resources/Transaction.resource.d.ts +10 -0
  66. package/dist/nodes/Qonto/resources/Transaction.resource.js +117 -0
  67. package/dist/nodes/Qonto/resources/Transaction.resource.js.map +1 -0
  68. package/dist/nodes/Qonto/resources/index.d.ts +20 -0
  69. package/dist/nodes/Qonto/resources/index.js +44 -0
  70. package/dist/nodes/Qonto/resources/index.js.map +1 -0
  71. package/dist/nodes/Qonto/shared/base.d.ts +20 -0
  72. package/dist/nodes/Qonto/shared/base.js +147 -0
  73. package/dist/nodes/Qonto/shared/base.js.map +1 -0
  74. package/dist/nodes/Qonto/shared/constants.d.ts +35 -0
  75. package/dist/nodes/Qonto/shared/constants.js +504 -0
  76. package/dist/nodes/Qonto/shared/constants.js.map +1 -0
  77. package/dist/nodes/Qonto/shared/types.d.ts +91 -0
  78. package/dist/nodes/Qonto/shared/types.js +77 -0
  79. package/dist/nodes/Qonto/shared/types.js.map +1 -0
  80. package/dist/nodes/Qonto/shared/utils.d.ts +38 -0
  81. package/dist/nodes/Qonto/shared/utils.js +407 -0
  82. package/dist/nodes/Qonto/shared/utils.js.map +1 -0
  83. package/dist/package.json +15 -13
  84. package/dist/tsconfig.tsbuildinfo +1 -1
  85. package/package.json +3 -3
package/README.md CHANGED
@@ -42,14 +42,105 @@ After installation, restart your n8n instance.
42
42
 
43
43
  ## Operations
44
44
 
45
- This node supports the following operations:
45
+ This node supports operations for 20 different Qonto API resources:
46
+
47
+ ### Attachment
48
+ - **Get Many**: Retrieve attachments for a specific transaction
49
+ - **Get One**: Retrieve a single attachment by ID
50
+
51
+ ### Beneficiary
52
+ - **Get Many**: Retrieve multiple beneficiaries with filtering
53
+ - Filter by trusted status, status (pending/validated/declined), IBAN, and update timestamps
54
+ - **Get One**: Retrieve a single beneficiary by ID
55
+
56
+ ### Business Account
57
+ - **Get Many**: Retrieve all business accounts
58
+ - **Get One**: Retrieve a single business account by ID
59
+
60
+ ### Card
61
+ - **Get Many**: Retrieve all cards (physical and virtual)
62
+ - **Get One**: Retrieve a single card by ID
63
+
64
+ ### Client
65
+ - **Get Many**: Retrieve multiple clients with filtering
66
+ - Filter by tax ID, VAT number, email, or name
67
+ - **Get One**: Retrieve a single client by ID
46
68
 
47
69
  ### Client Invoice
48
- - **Get Many**: Retrieve multiple client invoices with optional filtering and pagination
70
+ - **Get Many**: Retrieve multiple client invoices with filtering and pagination
49
71
  - Filter by status (draft, unpaid, canceled, paid)
50
72
  - Filter by date range (created from/to)
51
73
  - Sort by creation date (ascending or descending)
52
- - Control pagination with page size and current page
74
+ - **Get One**: Retrieve a single client invoice by ID
75
+
76
+ ### Credit Note
77
+ - **Get Many**: Retrieve multiple credit notes with date filtering
78
+ - **Get One**: Retrieve a single credit note by ID
79
+
80
+ ### External Transfer
81
+ - **Get Many**: Retrieve multiple external transfers with extensive filtering
82
+ - Filter by status, beneficiary IDs, and date ranges
83
+ - **Get One**: Retrieve a single external transfer by ID
84
+
85
+ ### Insurance Contract
86
+ - **Get Many**: Retrieve all insurance contracts
87
+ - **Get One**: Retrieve a single insurance contract by ID
88
+
89
+ ### Internal Transfer
90
+ - **Get Many**: Retrieve all internal transfers
91
+ - **Get One**: Retrieve a single internal transfer by ID
92
+
93
+ ### Label
94
+ - **Get Many**: Retrieve all labels for categorization
95
+ - **Get One**: Retrieve a single label by ID
96
+
97
+ ### Membership
98
+ - **Get Many**: Retrieve all memberships
99
+ - **Get Current**: Retrieve the current user's membership
100
+
101
+ ### Organization
102
+ - **Get**: Retrieve organization details
103
+
104
+ ### Quote
105
+ - **Get Many**: Retrieve multiple quotes with filtering
106
+ - Filter by status (pending_approval/approved/canceled) and creation date
107
+ - **Get One**: Retrieve a single quote by ID
108
+
109
+ ### Request
110
+ - **Get Many**: Retrieve multiple requests with filtering
111
+ - Filter by status, request type, creation and processing dates
112
+ - **Get One**: Retrieve a single request by ID
113
+
114
+ ### SEPA Transfer
115
+ - **Get Many**: Retrieve SEPA transfers
116
+ - **Get One**: Retrieve a single SEPA transfer
117
+ - **Get Recurring Transfers**: List recurring SEPA transfers
118
+ - **Get Single Recurring Transfer**: Get one recurring transfer
119
+ - **Get Bulk Transfers**: List bulk SEPA transfers
120
+ - **Get Single Bulk Transfer**: Get one bulk transfer
121
+ - **Get SEPA Beneficiaries**: List SEPA beneficiaries
122
+ - **Get Single SEPA Beneficiary**: Get one SEPA beneficiary
123
+
124
+ ### Statement
125
+ - **Get Many**: Retrieve multiple statements with filtering
126
+ - Filter by bank account IDs, IBANs, and period ranges
127
+ - **Get One**: Retrieve a single statement by ID
128
+
129
+ ### Supplier Invoice
130
+ - **Get Many**: Retrieve multiple supplier invoices with filtering
131
+ - Filter by status (to_review/pending/scheduled/paid) and creation date
132
+ - **Get One**: Retrieve a single supplier invoice by ID
133
+
134
+ ### Team
135
+ - **Get Many**: Retrieve all teams
136
+ - **Get One**: Retrieve a single team by ID
137
+
138
+ ### Transaction
139
+ - **Get Many**: Retrieve multiple transactions with filtering and bank account selection
140
+ - Required bank account selection
141
+ - Filter by status (completed/pending/declined) and date range
142
+ - Pagination support
143
+ - **Get One**: Retrieve a single transaction by ID
53
144
 
54
145
  ## Credentials
55
146
 
@@ -83,7 +174,12 @@ This node supports the following authentication methods:
83
174
  - **Environment**: Select Production or Sandbox (default: Production)
84
175
  - **Client ID**: Your OAuth application's Client ID
85
176
  - **Client Secret**: Your OAuth application's Client Secret
86
- - **Scopes**: The node will automatically request `organization.read` and `client_invoices.read`
177
+ - **Scopes**: Set the required permissions for your use case. Common scopes include:
178
+ - `organization.read` (organization details)
179
+ - `client_invoices.read` (client invoices)
180
+ - `transactions.read` (transaction data)
181
+ - `beneficiaries.read` (beneficiary data)
182
+ - Additional scopes based on the resources you need
87
183
  7. Complete the OAuth authorization flow when prompted
88
184
 
89
185
  ### Environment Selection
@@ -115,32 +211,58 @@ Both authentication methods support environment selection:
115
211
  2. Select the "Client Invoice" resource
116
212
  3. Choose the "Get Many" operation
117
213
  4. Configure the optional filters:
118
- - **Status**: Select one or more invoice statuses to filter by
214
+ - **Status**: Select invoice status to filter by
119
215
  - **Created From**: Set a start date for the date range filter
120
216
  - **Created To**: Set an end date for the date range filter
121
- - **Sort Order**: Choose ascending or descending by creation date
122
- 5. Configure pagination options:
123
- - **Page Size**: Number of invoices per page (default: 10)
124
- - **Current Page**: Which page to retrieve (default: 1)
217
+ 5. Configure pagination:
218
+ - **Return All**: Toggle to get all results or limit to specific number
219
+ - **Limit**: Number of invoices per request (if Return All is false)
125
220
  6. Execute the node
126
221
 
222
+ ### Example: Get Transactions
223
+
224
+ 1. Add the Qonto node to your workflow
225
+ 2. Select the "Transaction" resource
226
+ 3. Choose the "Get Many" operation
227
+ 4. **Select Bank Account**: Choose which bank account to retrieve transactions from
228
+ 5. Configure optional filters:
229
+ - **Status**: Filter by transaction status (completed/pending/declined)
230
+ - **Date From/To**: Set date range for filtering
231
+ 6. Configure pagination and sorting options
232
+ 7. Execute the node
233
+
234
+ ### Example: Get Organization Details
235
+
236
+ 1. Add the Qonto node to your workflow
237
+ 2. Select the "Organization" resource
238
+ 3. Choose the "Get" operation (only operation available)
239
+ 4. Execute the node to retrieve organization information
240
+
127
241
  ### Tips and Best Practices
128
242
 
129
- - Use pagination when dealing with large numbers of invoices to avoid timeouts
130
- - The API returns a maximum of 100 invoices per page
131
- - Date filters use ISO 8601 format (YYYY-MM-DD)
132
- - Status filters can be combined to retrieve invoices in multiple states
243
+ - **Pagination**: Use "Return All" for complete datasets or set appropriate limits to avoid timeouts
244
+ - **Bank Account Selection**: Transaction operations require selecting a specific bank account first
245
+ - **Date Filtering**: All date filters use ISO 8601 format (YYYY-MM-DD)
246
+ - **Resource Selection**: Choose the most specific resource for your needs (e.g., use Client Invoice instead of generic data)
247
+ - **Filtering**: Use filters to reduce API calls and improve performance
248
+ - **Rate Limits**: The API has rate limits; use pagination and avoid excessive concurrent requests
133
249
 
134
250
  ### Common Issues
135
251
 
136
252
  **Error: "Authentication failed"**
137
- - Solution: Verify your API credentials are correct and have the necessary permissions
253
+ - Solution: Verify your API credentials are correct and have the necessary permissions for the selected resource
254
+
255
+ **Error: "Unknown resource"**
256
+ - Solution: Ensure you're using a supported resource name and the node version supports it
257
+
258
+ **Error: "Bank account required"**
259
+ - Solution: Select a bank account when using Transaction operations
138
260
 
139
261
  **Error: "Invalid date format"**
140
262
  - Solution: Ensure dates are in YYYY-MM-DD format
141
263
 
142
- **Error: "Page not found"**
143
- - Solution: Check that the current page number doesn't exceed the total number of pages
264
+ **Error: "Resource not found"**
265
+ - Solution: Check that the ID exists and you have permission to access the resource
144
266
 
145
267
  ## Resources
146
268
 
@@ -152,6 +274,12 @@ Both authentication methods support environment selection:
152
274
 
153
275
  ## Version History
154
276
 
277
+ ### 0.2.0 (Major Expansion)
278
+ - Added support for 19 additional Qonto API resources
279
+ - Complete architecture refactoring for better maintainability
280
+ - Enhanced OAuth2 configuration and security
281
+ - Improved error handling and pagination across all resources
282
+
155
283
  ### 0.1.0 (Initial Release)
156
284
  - Initial release with Client Invoice operations
157
285
  - Support for API Key and OAuth2 authentication
@@ -1 +1 @@
1
- {"version":3,"file":"QontoApiKey.credentials.js","sourceRoot":"","sources":["../../credentials/QontoApiKey.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACE,SAAI,GAAG,wBAAwB,CAAC;QAChC,gBAAW,GAAG,eAAe,CAAC;QAE9B,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,SAAS;qBACjB;iBACF;gBACD,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,kCAAkC;aAChD;YACD,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YACpF;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;aACf;SACF,CAAC;QAEF,iBAAY,GAAkB;YAC5B,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,aAAa,EAAE,oDAAoD;iBACpE;aACF;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EAAE,uHAAuH;gBAChI,GAAG,EAAE,kBAAkB;aACxB;SACF,CAAC;IACJ,CAAC;CAAA;AAhDD,kCAgDC"}
1
+ {"version":3,"file":"QontoApiKey.credentials.js","sourceRoot":"","sources":["../../credentials/QontoApiKey.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,WAAW;IAAxB;QACE,SAAI,GAAG,wBAAwB,CAAC;QAChC,gBAAW,GAAG,eAAe,CAAC;QAE9B,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,SAAS;qBACjB;iBACF;gBACD,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,kCAAkC;aAChD;YACD,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YACpF;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,QAAQ,EAAE,IAAI;aACf;SACF,CAAC;QAEF,iBAAY,GAAkB;YAC5B,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACV,OAAO,EAAE;oBACP,aAAa,EAAE,oDAAoD;iBACpE;aACF;SACF,CAAC;QAEF,SAAI,GAA2B;YAC7B,OAAO,EAAE;gBACP,OAAO,EACL,uHAAuH;gBACzH,GAAG,EAAE,kBAAkB;aACxB;SACF,CAAC;IACJ,CAAC;CAAA;AAjDD,kCAiDC"}
@@ -46,9 +46,10 @@ class QontoOAuth2Api {
46
46
  {
47
47
  displayName: 'Scope',
48
48
  name: 'scope',
49
- type: 'hidden',
50
- default: 'organization.read client_invoices.read',
51
- description: 'Scopes separated by space. Leave empty for default permissions.',
49
+ type: 'string',
50
+ default: 'organization.read membership.read client.read team.read insurance_contract.read supplier_invoice.read client_invoices.read card.read',
51
+ description: 'OAuth scopes separated by space. Includes all read permissions for available resources.',
52
+ placeholder: 'organization.read client_invoices.read',
52
53
  },
53
54
  {
54
55
  displayName: 'Auth URI Query Parameters',
@@ -60,7 +61,7 @@ class QontoOAuth2Api {
60
61
  displayName: 'Authentication',
61
62
  name: 'authentication',
62
63
  type: 'hidden',
63
- default: 'body',
64
+ default: 'header',
64
65
  },
65
66
  ];
66
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"QontoOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/QontoOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAKA,MAAa,cAAc;IAA3B;QACE,SAAI,GAAG,gBAAgB,CAAC;QACxB,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAExB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GAAG,mFAAmF,CAAC;QAEvG,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,SAAS;qBACjB;iBACF;gBACD,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,kCAAkC;aAChD;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC7B;YACD;gBACE,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,8HAA8H;aACxI;YACD;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,gIAAgI;aAC1I;YACD;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,wCAAwC;gBACjD,WAAW,EAAE,iEAAiE;aAC/E;YACD;gBACE,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,MAAM;aAChB;SACF,CAAC;IAGJ,CAAC;CAAA;AAjED,wCAiEC"}
1
+ {"version":3,"file":"QontoOAuth2Api.credentials.js","sourceRoot":"","sources":["../../credentials/QontoOAuth2Api.credentials.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAc;IAA3B;QACE,SAAI,GAAG,gBAAgB,CAAC;QACxB,YAAO,GAAG,CAAC,WAAW,CAAC,CAAC;QAExB,gBAAW,GAAG,kBAAkB,CAAC;QACjC,qBAAgB,GACd,mFAAmF,CAAC;QAEtF,eAAU,GAAsB;YAC9B;gBACE,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,YAAY;wBAClB,KAAK,EAAE,YAAY;qBACpB;oBACD;wBACE,IAAI,EAAE,SAAS;wBACf,KAAK,EAAE,SAAS;qBACjB;iBACF;gBACD,OAAO,EAAE,YAAY;gBACrB,WAAW,EAAE,kCAAkC;aAChD;YACD;gBACE,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,mBAAmB;aAC7B;YACD;gBACE,WAAW,EAAE,mBAAmB;gBAChC,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EACL,8HAA8H;aACjI;YACD;gBACE,WAAW,EAAE,kBAAkB;gBAC/B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EACL,gIAAgI;aACnI;YACD;gBACE,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,QAAQ;gBACd,OAAO,EACL,sIAAsI;gBACxI,WAAW,EACT,yFAAyF;gBAC3F,WAAW,EAAE,wCAAwC;aACtD;YACD;gBACE,WAAW,EAAE,2BAA2B;gBACxC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;aACZ;YACD;gBACE,WAAW,EAAE,gBAAgB;gBAC7B,IAAI,EAAE,gBAAgB;gBACtB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,QAAQ;aAClB;SACF,CAAC;IACJ,CAAC;CAAA;AArED,wCAqEC"}
@@ -1,5 +1,12 @@
1
- import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
1
+ import { IExecuteFunctions, ILoadOptionsFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
2
2
  export declare class Qonto implements INodeType {
3
3
  description: INodeTypeDescription;
4
+ private static resources;
5
+ private getResourceProperties;
6
+ methods: {
7
+ loadOptions: {
8
+ getBankAccounts(this: ILoadOptionsFunctions): Promise<any>;
9
+ };
10
+ };
4
11
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;
5
12
  }
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Qonto = void 0;
4
+ const resources_1 = require("./resources");
5
+ const constants_1 = require("./shared/constants");
4
6
  class Qonto {
5
7
  constructor() {
6
8
  this.description = {
@@ -39,6 +41,10 @@ class Qonto {
39
41
  ],
40
42
  requestDefaults: {
41
43
  baseURL: '={{$credentials.environment === "sandbox" ? "https://thirdparty-sandbox.qonto.com" : "https://thirdparty.qonto.com"}}',
44
+ timeout: 30000,
45
+ headers: {
46
+ 'User-Agent': 'n8n-nodes-qonto/1.0',
47
+ },
42
48
  },
43
49
  properties: [
44
50
  {
@@ -62,226 +68,44 @@ class Qonto {
62
68
  name: 'resource',
63
69
  type: 'options',
64
70
  noDataExpression: true,
65
- options: [
66
- {
67
- name: 'Client Invoice',
68
- value: 'clientInvoice',
69
- },
70
- ],
71
+ options: Object.values(constants_1.RESOURCE_CONFIGS).map((config) => ({
72
+ name: config.name,
73
+ value: config.value,
74
+ })),
71
75
  default: 'clientInvoice',
72
76
  },
73
- {
74
- displayName: 'Operation',
75
- name: 'operation',
76
- type: 'options',
77
- noDataExpression: true,
78
- displayOptions: {
79
- show: {
80
- resource: ['clientInvoice'],
81
- },
82
- },
83
- options: [
84
- {
85
- name: 'Get Many',
86
- value: 'getMany',
87
- description: 'Get many client invoices',
88
- action: 'Get many client invoices',
89
- },
90
- ],
91
- default: 'getMany',
92
- },
93
- {
94
- displayName: 'Return All',
95
- name: 'returnAll',
96
- type: 'boolean',
97
- displayOptions: {
98
- show: {
99
- resource: ['clientInvoice'],
100
- operation: ['getMany'],
101
- },
102
- },
103
- default: false,
104
- description: 'Whether to return all results or only up to a given limit',
105
- },
106
- {
107
- displayName: 'Limit',
108
- name: 'limit',
109
- type: 'number',
110
- displayOptions: {
111
- show: {
112
- resource: ['clientInvoice'],
113
- operation: ['getMany'],
114
- returnAll: [false],
115
- },
116
- },
117
- typeOptions: {
118
- minValue: 1,
119
- maxValue: 100,
120
- },
121
- default: 50,
122
- description: 'Max number of results to return',
123
- },
124
- {
125
- displayName: 'Filters',
126
- name: 'filters',
127
- type: 'collection',
128
- placeholder: 'Add Filter',
129
- default: {},
130
- displayOptions: {
131
- show: {
132
- resource: ['clientInvoice'],
133
- operation: ['getMany'],
134
- },
135
- },
136
- options: [
137
- {
138
- displayName: 'Status',
139
- name: 'status',
140
- type: 'options',
141
- default: '',
142
- options: [
143
- {
144
- name: 'Draft',
145
- value: 'draft',
146
- },
147
- {
148
- name: 'Unpaid',
149
- value: 'unpaid',
150
- },
151
- {
152
- name: 'Canceled',
153
- value: 'canceled',
154
- },
155
- {
156
- name: 'Paid',
157
- value: 'paid',
158
- },
159
- ],
160
- description: 'Filter invoices by status',
161
- },
162
- {
163
- displayName: 'Created From',
164
- name: 'createdFrom',
165
- type: 'dateTime',
166
- default: '',
167
- description: 'Minimum creation date',
168
- },
169
- {
170
- displayName: 'Created To',
171
- name: 'createdTo',
172
- type: 'dateTime',
173
- default: '',
174
- description: 'Maximum creation date',
175
- },
176
- ],
177
- },
178
- {
179
- displayName: 'Options',
180
- name: 'options',
181
- type: 'collection',
182
- placeholder: 'Add Option',
183
- default: {},
184
- displayOptions: {
185
- show: {
186
- resource: ['clientInvoice'],
187
- operation: ['getMany'],
188
- },
189
- },
190
- options: [
191
- {
192
- displayName: 'Sort By',
193
- name: 'sortBy',
194
- type: 'options',
195
- default: 'created_at:desc',
196
- options: [
197
- {
198
- name: 'Created At (Ascending)',
199
- value: 'created_at:asc',
200
- },
201
- {
202
- name: 'Created At (Descending)',
203
- value: 'created_at:desc',
204
- },
205
- ],
206
- description: 'Sort invoices by creation date',
207
- },
208
- ],
209
- },
77
+ ...this.getResourceProperties(),
210
78
  ],
211
79
  };
80
+ this.methods = {
81
+ loadOptions: {
82
+ async getBankAccounts() {
83
+ return resources_1.TransactionResource.getBankAccounts(this);
84
+ },
85
+ },
86
+ };
87
+ }
88
+ getResourceProperties() {
89
+ const properties = [];
90
+ Object.values(Qonto.resources).forEach((resource) => {
91
+ properties.push(...resource.getProperties());
92
+ });
93
+ return properties;
212
94
  }
213
95
  async execute() {
214
96
  const items = this.getInputData();
215
97
  const returnData = [];
216
98
  const resource = this.getNodeParameter('resource', 0);
217
- const operation = this.getNodeParameter('operation', 0);
218
- const authentication = this.getNodeParameter('authentication', 0);
219
- const credentials = await this.getCredentials(authentication === 'apiKey' ? 'qontoApiKeyCredentials' : 'qontoOAuth2Api');
220
- const baseURL = credentials.environment === 'sandbox'
221
- ? 'https://thirdparty-sandbox.qonto.com'
222
- : 'https://thirdparty.qonto.com';
99
+ const resourceInstance = Qonto.resources[resource];
100
+ if (!resourceInstance) {
101
+ throw new Error(`Unknown resource: ${resource}`);
102
+ }
223
103
  for (let i = 0; i < items.length; i++) {
224
104
  try {
225
- if (resource === 'clientInvoice') {
226
- if (operation === 'getMany') {
227
- const returnAll = this.getNodeParameter('returnAll', i);
228
- const filters = this.getNodeParameter('filters', i);
229
- const options = this.getNodeParameter('options', i);
230
- const qs = {};
231
- if (filters.status) {
232
- qs['filter[status]'] = filters.status;
233
- }
234
- if (filters.createdFrom) {
235
- qs['filter[created_at_from]'] = filters.createdFrom;
236
- }
237
- if (filters.createdTo) {
238
- qs['filter[created_at_to]'] = filters.createdTo;
239
- }
240
- if (options.sortBy) {
241
- qs.sort_by = options.sortBy;
242
- }
243
- if (returnAll) {
244
- qs.per_page = 100;
245
- qs.page = 1;
246
- const responseData = await this.helpers.requestWithAuthenticationPaginated.call(this, {
247
- method: 'GET',
248
- uri: `${baseURL}/v2/client_invoices`,
249
- qs,
250
- json: true,
251
- }, 0, {
252
- requestInterval: 1000,
253
- continue: '={{ !!$response.body?.meta?.next_page }}',
254
- request: {
255
- qs: {
256
- page: '={{ $response.body.meta.next_page }}',
257
- },
258
- },
259
- }, this.getNodeParameter('authentication', 0) === 'apiKey'
260
- ? 'qontoApiKeyCredentials'
261
- : 'qontoOAuth2Api');
262
- for (const response of responseData) {
263
- returnData.push(...this.helpers.returnJsonArray(response.body.client_invoices));
264
- }
265
- }
266
- else {
267
- const limit = this.getNodeParameter('limit', i);
268
- qs.per_page = limit;
269
- qs.page = 1;
270
- const response = await this.helpers.requestWithAuthentication.call(this, this.getNodeParameter('authentication', 0) === 'apiKey'
271
- ? 'qontoApiKeyCredentials'
272
- : 'qontoOAuth2Api', {
273
- method: 'GET',
274
- url: `${baseURL}/v2/client_invoices`,
275
- qs,
276
- json: true,
277
- });
278
- returnData.push(...this.helpers.returnJsonArray(response.client_invoices));
279
- }
280
- }
281
- }
105
+ const result = await resourceInstance.execute(this, i);
106
+ returnData.push(...result);
282
107
  }
283
108
  catch (error) {
284
- console.error(error);
285
109
  if (this.continueOnFail()) {
286
110
  returnData.push({ json: { error: error.message } });
287
111
  continue;
@@ -293,4 +117,26 @@ class Qonto {
293
117
  }
294
118
  }
295
119
  exports.Qonto = Qonto;
120
+ Qonto.resources = {
121
+ attachment: new resources_1.AttachmentResource(),
122
+ beneficiary: new resources_1.BeneficiaryResource(),
123
+ businessAccount: new resources_1.BusinessAccountResource(),
124
+ card: new resources_1.CardResource(),
125
+ client: new resources_1.ClientResource(),
126
+ clientInvoice: new resources_1.ClientInvoiceResource(),
127
+ creditNote: new resources_1.CreditNoteResource(),
128
+ externalTransfer: new resources_1.ExternalTransferResource(),
129
+ insuranceContract: new resources_1.InsuranceContractResource(),
130
+ internalTransfer: new resources_1.InternalTransferResource(),
131
+ label: new resources_1.LabelResource(),
132
+ membership: new resources_1.MembershipResource(),
133
+ organization: new resources_1.OrganizationResource(),
134
+ quote: new resources_1.QuoteResource(),
135
+ request: new resources_1.RequestResource(),
136
+ sepaTransfer: new resources_1.SepaTransferResource(),
137
+ statement: new resources_1.StatementResource(),
138
+ supplierInvoice: new resources_1.SupplierInvoiceResource(),
139
+ team: new resources_1.TeamResource(),
140
+ transaction: new resources_1.TransactionResource(),
141
+ };
296
142
  //# sourceMappingURL=Qonto.node.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Qonto.node.js","sourceRoot":"","sources":["../../../nodes/Qonto/Qonto.node.ts"],"names":[],"mappings":";;;AAQA,MAAa,KAAK;IAAlB;QACE,gBAAW,GAAyB;YAClC,WAAW,EAAE,OAAO;YACpB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,gBAAgB;YACtB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,yBAAyB;YACtC,QAAQ,EAAE;gBACR,IAAI,EAAE,OAAO;aACd;YACD,YAAY,EAAE,IAAI;YAClB,MAAM,EAAE,QAAyB;YACjC,OAAO,EAAE,QAAyB;YAClC,WAAW,EAAE;gBACX;oBACE,IAAI,EAAE,wBAAwB;oBAC9B,QAAQ,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YACd,CAAC;QACH,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACtB,CAAC;;AA5IH,sBA6IC;AAlEgB,eAAS,GAAiC;IACvD,UAAU,EAAE,IAAI,8BAAkB,EAAE;IACpC,WAAW,EAAE,IAAI,+BAAmB,EAAE;IACtC,eAAe,EAAE,IAAI,mCAAuB,EAAE;IAC9C,IAAI,EAAE,IAAI,wBAAY,EAAE;IACxB,MAAM,EAAE,IAAI,0BAAc,EAAE;IAC5B,aAAa,EAAE,IAAI,iCAAqB,EAAE;IAC1C,UAAU,EAAE,IAAI,8BAAkB,EAAE;IACpC,gBAAgB,EAAE,IAAI,oCAAwB,EAAE;IAChD,iBAAiB,EAAE,IAAI,qCAAyB,EAAE;IAClD,gBAAgB,EAAE,IAAI,oCAAwB,EAAE;IAChD,KAAK,EAAE,IAAI,yBAAa,EAAE;IAC1B,UAAU,EAAE,IAAI,8BAAkB,EAAE;IACpC,YAAY,EAAE,IAAI,gCAAoB,EAAE;IACxC,KAAK,EAAE,IAAI,yBAAa,EAAE;IAC1B,OAAO,EAAE,IAAI,2BAAe,EAAE;IAC9B,YAAY,EAAE,IAAI,gCAAoB,EAAE;IACxC,SAAS,EAAE,IAAI,6BAAiB,EAAE;IAClC,eAAe,EAAE,IAAI,mCAAuB,EAAE;IAC9C,IAAI,EAAE,IAAI,wBAAY,EAAE;IACxB,WAAW,EAAE,IAAI,+BAAmB,EAAE;CACvC,AArBuB,CAqBtB"}
@@ -0,0 +1,11 @@
1
+ import { INodeProperties } from 'n8n-workflow';
2
+ import { BaseResource } from '../shared/base';
3
+ export declare class AttachmentResource extends BaseResource {
4
+ constructor();
5
+ getProperties(): INodeProperties[];
6
+ protected getEndpoint(operation: string, id?: string): {
7
+ endpoint: string;
8
+ dataKey: string;
9
+ };
10
+ protected executeGetMany(executeFunctions: any, i: number): Promise<any[]>;
11
+ }