n8n-nodes-formbase 0.9.2 → 0.10.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 (35) hide show
  1. package/README.md +31 -9
  2. package/dist/credentials/FormbaseOAuth2Api.credentials.js +1 -1
  3. package/dist/credentials/FormbaseOAuth2Api.credentials.js.map +1 -1
  4. package/dist/nodes/Formbase/FormFields.d.ts +11 -0
  5. package/dist/nodes/Formbase/FormFields.js +97 -0
  6. package/dist/nodes/Formbase/FormFields.js.map +1 -0
  7. package/dist/nodes/Formbase/Formbase.node.d.ts +12 -5
  8. package/dist/nodes/Formbase/Formbase.node.js +23 -742
  9. package/dist/nodes/Formbase/Formbase.node.js.map +1 -1
  10. package/dist/nodes/Formbase/FormbaseCatalog.d.ts +20 -0
  11. package/dist/nodes/Formbase/FormbaseCatalog.js +20 -0
  12. package/dist/nodes/Formbase/FormbaseCatalog.js.map +1 -1
  13. package/dist/nodes/Formbase/FormbaseMethods.d.ts +15 -0
  14. package/dist/nodes/Formbase/FormbaseMethods.js +68 -0
  15. package/dist/nodes/Formbase/FormbaseMethods.js.map +1 -0
  16. package/dist/nodes/Formbase/FormbaseTrigger.node.d.ts +3 -2
  17. package/dist/nodes/Formbase/FormbaseTrigger.node.js +38 -49
  18. package/dist/nodes/Formbase/FormbaseTrigger.node.js.map +1 -1
  19. package/dist/nodes/Formbase/GenericFunctions.js +2 -2
  20. package/dist/nodes/Formbase/GenericFunctions.js.map +1 -1
  21. package/dist/nodes/Formbase/actions/RequestCreate.d.ts +4 -0
  22. package/dist/nodes/Formbase/actions/RequestCreate.js +142 -0
  23. package/dist/nodes/Formbase/actions/RequestCreate.js.map +1 -0
  24. package/dist/nodes/Formbase/actions/RequestDescription.d.ts +3 -0
  25. package/dist/nodes/Formbase/actions/RequestDescription.js +468 -0
  26. package/dist/nodes/Formbase/actions/RequestDescription.js.map +1 -0
  27. package/dist/nodes/Formbase/actions/RequestOperations.d.ts +7 -0
  28. package/dist/nodes/Formbase/actions/RequestOperations.js +45 -0
  29. package/dist/nodes/Formbase/actions/RequestOperations.js.map +1 -0
  30. package/dist/nodes/Formbase/constants.d.ts +1 -1
  31. package/dist/nodes/Formbase/constants.js +2 -2
  32. package/dist/nodes/Formbase/constants.js.map +1 -1
  33. package/dist/package.json +3 -3
  34. package/examples/formbase-request-wait.json +23 -11
  35. package/package.json +3 -3
@@ -0,0 +1,468 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.requestProperties = void 0;
4
+ const REQUEST_ID_OPERATIONS = ['cancel', 'get', 'remind', 'replayCallback'];
5
+ const EXPRESSION_HINT = 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>';
6
+ const V1 = { '@version': [1] };
7
+ const V2 = { '@version': [{ _cnd: { gte: 2 } }] };
8
+ function showFor(operations, extra = {}) {
9
+ return { show: { resource: ['request'], operation: operations, ...extra } };
10
+ }
11
+ function formIdProperties(operations, extra = {}) {
12
+ return [
13
+ {
14
+ displayName: 'Form Name or ID',
15
+ name: 'formId',
16
+ type: 'options',
17
+ typeOptions: { loadOptionsMethod: 'getForms' },
18
+ displayOptions: showFor(operations, { ...extra, ...V1 }),
19
+ default: '',
20
+ required: true,
21
+ description: 'Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>',
22
+ },
23
+ {
24
+ displayName: 'Form',
25
+ name: 'formId',
26
+ type: 'resourceLocator',
27
+ displayOptions: showFor(operations, { ...extra, ...V2 }),
28
+ default: { mode: 'list', value: '' },
29
+ required: true,
30
+ description: 'The form of the credential\'s workspace. A request needs a published one.',
31
+ modes: [
32
+ {
33
+ displayName: 'From List',
34
+ name: 'list',
35
+ type: 'list',
36
+ placeholder: 'Select a form...',
37
+ typeOptions: { searchListMethod: 'searchForms', searchable: true },
38
+ },
39
+ {
40
+ displayName: 'ID',
41
+ name: 'id',
42
+ type: 'string',
43
+ placeholder: 'e.g. j57d3kq9y8x2m1n0p4r6s5t7v9w8',
44
+ },
45
+ ],
46
+ },
47
+ ];
48
+ }
49
+ function keyValueCollection(name) {
50
+ const isPrefill = name === 'prefill';
51
+ return {
52
+ displayName: isPrefill ? 'Prefill' : 'Context',
53
+ name,
54
+ type: 'fixedCollection',
55
+ placeholder: isPrefill ? 'Add Answer' : 'Add Context Value',
56
+ typeOptions: { multipleValues: true },
57
+ displayOptions: showFor(['create'], V1),
58
+ default: {},
59
+ description: isPrefill
60
+ ? 'Initial answers the recipient sees, keyed by field key'
61
+ : 'Hidden-field values the recipient never sees or edits, keyed by field key and echoed in every callback',
62
+ options: [
63
+ {
64
+ name: 'values',
65
+ displayName: isPrefill ? 'Answer' : 'Context Value',
66
+ values: [
67
+ {
68
+ displayName: 'Field Name or ID',
69
+ name: 'key',
70
+ type: 'options',
71
+ typeOptions: {
72
+ loadOptionsMethod: isPrefill ? 'getPrefillKeys' : 'getContextKeys',
73
+ loadOptionsDependsOn: ['formId'],
74
+ },
75
+ default: '',
76
+ description: EXPRESSION_HINT,
77
+ },
78
+ {
79
+ displayName: 'Value',
80
+ name: 'value',
81
+ type: 'string',
82
+ default: '',
83
+ description: 'Sent as text, or as the value it decodes to when Parse as JSON is on',
84
+ },
85
+ {
86
+ displayName: 'Parse as JSON',
87
+ name: 'json',
88
+ type: 'boolean',
89
+ default: false,
90
+ description: isPrefill
91
+ ? 'Whether to decode the value as JSON: a number, true or false, a list of option keys, a matrix object or the rows of a repeating group'
92
+ : 'Whether to decode the value as JSON instead of sending it as text',
93
+ },
94
+ ],
95
+ },
96
+ ],
97
+ };
98
+ }
99
+ const operationProperty = {
100
+ displayName: 'Operation',
101
+ name: 'operation',
102
+ type: 'options',
103
+ noDataExpression: true,
104
+ displayOptions: { show: { resource: ['request'] } },
105
+ options: [
106
+ {
107
+ name: 'Cancel',
108
+ value: 'cancel',
109
+ action: 'Cancel a request',
110
+ description: 'Withdraw a pending request so its link stops working',
111
+ },
112
+ {
113
+ name: 'Create',
114
+ value: 'create',
115
+ action: 'Create a request',
116
+ description: 'Ask one recipient to complete a published form',
117
+ },
118
+ {
119
+ name: 'Get',
120
+ value: 'get',
121
+ action: 'Get a request',
122
+ description: 'Read a request, with its answers once it is completed',
123
+ },
124
+ {
125
+ name: 'Get Many',
126
+ value: 'getAll',
127
+ action: 'Get many requests',
128
+ description: 'List the requests of a form or of the workspace',
129
+ },
130
+ {
131
+ name: 'Remind',
132
+ value: 'remind',
133
+ action: 'Remind a request recipient',
134
+ description: 'Email the recipient a reminder now, outside the reminder schedule',
135
+ },
136
+ {
137
+ name: 'Replay Callback',
138
+ value: 'replayCallback',
139
+ action: 'Replay a request callback',
140
+ description: 'Send the callback of a completed, expired or canceled request again',
141
+ },
142
+ ],
143
+ default: 'create',
144
+ };
145
+ const createProperties = [
146
+ ...formIdProperties(['create']),
147
+ {
148
+ displayName: 'Recipient Email',
149
+ name: 'recipientEmail',
150
+ type: 'string',
151
+ placeholder: 'name@email.com',
152
+ displayOptions: showFor(['create']),
153
+ default: '',
154
+ description: 'Who the request is for. Needed to send the invitation email and reminders.',
155
+ },
156
+ keyValueCollection('prefill'),
157
+ keyValueCollection('context'),
158
+ {
159
+ displayName: 'Fields',
160
+ name: 'fields',
161
+ type: 'resourceMapper',
162
+ noDataExpression: true,
163
+ displayOptions: showFor(['create'], V2),
164
+ default: { mappingMode: 'defineBelow', value: null },
165
+ description: 'Initial answers the recipient sees, and context values they never see, keyed by field key. Map Automatically sends every input field named after a field key of the form.',
166
+ typeOptions: {
167
+ loadOptionsDependsOn: ['formId.value'],
168
+ resourceMapper: {
169
+ resourceMapperMethod: 'getMappingFields',
170
+ mode: 'add',
171
+ valuesLabel: 'Values to Send',
172
+ fieldWords: { singular: 'field', plural: 'fields' },
173
+ addAllFields: true,
174
+ multiKeyMatch: false,
175
+ supportAutoMap: true,
176
+ noFieldsError: 'This form has no field a request can fill in. Publish the form first, or pick another one.',
177
+ },
178
+ },
179
+ },
180
+ {
181
+ displayName: 'Read-Only Field Names or IDs',
182
+ name: 'readonly',
183
+ type: 'multiOptions',
184
+ typeOptions: { loadOptionsMethod: 'getPrefillKeys', loadOptionsDependsOn: ['formId'] },
185
+ displayOptions: showFor(['create']),
186
+ default: [],
187
+ description: 'Prefilled fields the recipient may see but not change. Choose from the list, or specify IDs using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
188
+ },
189
+ {
190
+ displayName: 'Documents',
191
+ name: 'documents',
192
+ type: 'fixedCollection',
193
+ placeholder: 'Add Document',
194
+ typeOptions: { multipleValues: true },
195
+ displayOptions: showFor(['create']),
196
+ default: {},
197
+ description: "Files from the input item the recipient gets in the form's Documents block, below the documents the form already has. PDF or image, up to 25 MB each.",
198
+ options: [
199
+ {
200
+ name: 'values',
201
+ displayName: 'Document',
202
+ values: [
203
+ {
204
+ displayName: 'Input Binary Field',
205
+ name: 'binaryProperty',
206
+ type: 'string',
207
+ default: 'data',
208
+ required: true,
209
+ hint: 'The name of the input binary field containing the file',
210
+ },
211
+ {
212
+ displayName: 'Name',
213
+ name: 'name',
214
+ type: 'string',
215
+ default: '',
216
+ description: 'The name the recipient sees. Defaults to the file name.',
217
+ },
218
+ {
219
+ displayName: 'Documents Block Name or ID',
220
+ name: 'field',
221
+ type: 'options',
222
+ typeOptions: { loadOptionsMethod: 'getDocumentsKeys', loadOptionsDependsOn: ['formId'] },
223
+ default: '',
224
+ description: 'The Documents block the file goes into. Leave empty when the form has one. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
225
+ },
226
+ ],
227
+ },
228
+ ],
229
+ },
230
+ {
231
+ displayName: 'Wait for the Outcome',
232
+ name: 'waitForOutcome',
233
+ type: 'boolean',
234
+ displayOptions: showFor(['create']),
235
+ default: false,
236
+ description: 'Whether to point the request callback at this execution\'s resume URL. Follow this node with a Wait node set to "On Webhook Call": the workflow resumes with the request event when the request is completed, expires or is canceled.',
237
+ },
238
+ {
239
+ displayName: 'Additional Fields',
240
+ name: 'additionalFields',
241
+ type: 'collection',
242
+ placeholder: 'Add Field',
243
+ displayOptions: showFor(['create']),
244
+ default: {},
245
+ options: [
246
+ {
247
+ displayName: 'Callback URL',
248
+ name: 'callbackUrl',
249
+ type: 'string',
250
+ default: '',
251
+ description: 'An HTTPS URL of your own that receives the signed request callback. Leave empty when Wait for the Outcome is on.',
252
+ },
253
+ {
254
+ displayName: 'Delivery',
255
+ name: 'delivery',
256
+ type: 'options',
257
+ options: [
258
+ {
259
+ name: 'Email the Invitation',
260
+ value: 'email',
261
+ description: 'Sends the recipient the link by email; needs a recipient email',
262
+ },
263
+ {
264
+ name: 'None',
265
+ value: 'none',
266
+ description: 'You deliver the returned link yourself',
267
+ },
268
+ ],
269
+ default: 'none',
270
+ },
271
+ {
272
+ displayName: 'Expires At',
273
+ name: 'expiresAt',
274
+ type: 'dateTime',
275
+ default: '',
276
+ description: 'When the link stops working. Defaults to 30 days, at most 365.',
277
+ },
278
+ {
279
+ displayName: 'External ID',
280
+ name: 'externalId',
281
+ type: 'string',
282
+ default: '',
283
+ description: 'Your ID for this request, such as the run or ticket it belongs to. Also used as the idempotency key, so a retried run reuses the request instead of creating a second one.',
284
+ },
285
+ {
286
+ displayName: 'Language',
287
+ name: 'language',
288
+ type: 'string',
289
+ default: '',
290
+ placeholder: 'en',
291
+ description: 'Language the form opens in and the invitation is written in; must be published for the form',
292
+ },
293
+ {
294
+ displayName: 'Metadata',
295
+ name: 'metadata',
296
+ type: 'json',
297
+ default: '{}',
298
+ description: 'JSON object for your own bookkeeping. Never shown to the recipient, echoed in every callback.',
299
+ },
300
+ {
301
+ displayName: 'Recipient Name',
302
+ name: 'recipientName',
303
+ type: 'string',
304
+ default: '',
305
+ },
306
+ {
307
+ displayName: 'Reminders',
308
+ name: 'reminders',
309
+ type: 'string',
310
+ default: '',
311
+ placeholder: '2d, 5d',
312
+ description: "Idle offsets after which to remind the recipient, comma-separated, at most five. Leave empty to send no reminders; remove the field to inherit the form's schedule.",
313
+ },
314
+ {
315
+ displayName: 'Test Mode',
316
+ name: 'test',
317
+ type: 'boolean',
318
+ default: false,
319
+ description: 'Whether to create a test request: nothing is emailed, the callback carries test: true, and nothing counts against the quota',
320
+ },
321
+ ],
322
+ },
323
+ ];
324
+ const requestIdProperties = [
325
+ {
326
+ displayName: 'Request ID',
327
+ name: 'requestId',
328
+ type: 'string',
329
+ displayOptions: showFor(REQUEST_ID_OPERATIONS, V1),
330
+ default: '',
331
+ required: true,
332
+ description: 'The ID formbase returned when the request was created',
333
+ },
334
+ {
335
+ displayName: 'Request',
336
+ name: 'requestId',
337
+ type: 'resourceLocator',
338
+ displayOptions: showFor(REQUEST_ID_OPERATIONS, V2),
339
+ default: { mode: 'id', value: '' },
340
+ required: true,
341
+ description: 'The request: usually the ID an earlier Create node returned, or one of the newest requests of the workspace',
342
+ modes: [
343
+ {
344
+ displayName: 'By ID',
345
+ name: 'id',
346
+ type: 'string',
347
+ placeholder: 'e.g. {{ $json.id }}',
348
+ },
349
+ {
350
+ displayName: 'From List',
351
+ name: 'list',
352
+ type: 'list',
353
+ placeholder: 'Select a request...',
354
+ typeOptions: { searchListMethod: 'searchRequests' },
355
+ },
356
+ ],
357
+ },
358
+ {
359
+ displayName: 'Reason',
360
+ name: 'reason',
361
+ type: 'string',
362
+ displayOptions: showFor(['cancel']),
363
+ default: '',
364
+ description: 'Why the request is withdrawn; echoed in the request.canceled callback',
365
+ },
366
+ ];
367
+ const getAllProperties = [
368
+ {
369
+ displayName: 'Return All',
370
+ name: 'returnAll',
371
+ type: 'boolean',
372
+ displayOptions: showFor(['getAll']),
373
+ default: false,
374
+ description: 'Whether to return all results or only up to a given limit',
375
+ },
376
+ {
377
+ displayName: 'Limit',
378
+ name: 'limit',
379
+ type: 'number',
380
+ typeOptions: { minValue: 1 },
381
+ displayOptions: showFor(['getAll'], { returnAll: [false] }),
382
+ default: 50,
383
+ description: 'Max number of results to return',
384
+ },
385
+ {
386
+ displayName: 'Scope',
387
+ name: 'scope',
388
+ type: 'options',
389
+ displayOptions: showFor(['getAll']),
390
+ options: [
391
+ {
392
+ name: 'Form',
393
+ value: 'form',
394
+ description: 'The requests of one form',
395
+ },
396
+ {
397
+ name: 'Workspace',
398
+ value: 'workspace',
399
+ description: 'Every request of the connected workspace',
400
+ },
401
+ ],
402
+ default: 'form',
403
+ },
404
+ ...formIdProperties(['getAll'], { scope: ['form'] }),
405
+ {
406
+ displayName: 'Filters',
407
+ name: 'filters',
408
+ type: 'collection',
409
+ placeholder: 'Add Filter',
410
+ displayOptions: showFor(['getAll']),
411
+ default: {},
412
+ options: [
413
+ {
414
+ displayName: 'External ID',
415
+ name: 'externalId',
416
+ type: 'string',
417
+ default: '',
418
+ description: 'Only the requests created with this external ID',
419
+ },
420
+ {
421
+ displayName: 'Include Test Requests',
422
+ name: 'includeTest',
423
+ type: 'boolean',
424
+ default: false,
425
+ description: 'Whether to include requests created in test mode',
426
+ },
427
+ {
428
+ displayName: 'Outcome',
429
+ name: 'outcome',
430
+ type: 'options',
431
+ options: [
432
+ { name: 'Approve', value: 'approve' },
433
+ { name: 'Changes', value: 'changes' },
434
+ { name: 'Decline', value: 'decline' },
435
+ ],
436
+ default: 'approve',
437
+ description: 'Only completed requests with this verdict from the decision question; takes precedence over Status',
438
+ },
439
+ {
440
+ displayName: 'Status',
441
+ name: 'status',
442
+ type: 'options',
443
+ options: [
444
+ { name: 'Canceled', value: 'canceled' },
445
+ { name: 'Completed', value: 'completed' },
446
+ { name: 'Expired', value: 'expired' },
447
+ { name: 'Pending', value: 'pending' },
448
+ ],
449
+ default: 'pending',
450
+ },
451
+ ],
452
+ },
453
+ ];
454
+ exports.requestProperties = [
455
+ {
456
+ displayName: 'Resource',
457
+ name: 'resource',
458
+ type: 'options',
459
+ noDataExpression: true,
460
+ options: [{ name: 'Request', value: 'request' }],
461
+ default: 'request',
462
+ },
463
+ operationProperty,
464
+ ...createProperties,
465
+ ...requestIdProperties,
466
+ ...getAllProperties,
467
+ ];
468
+ //# sourceMappingURL=RequestDescription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KACF;CACF,CAAA;AAEY,QAAA,iBAAiB,GAAsB;IAClD;QACE,WAAW,EAAE,UAAU;QACvB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;QAChD,OAAO,EAAE,SAAS;KACnB;IACD,iBAAiB;IACjB,GAAG,gBAAgB;IACnB,GAAG,mBAAmB;IACtB,GAAG,gBAAgB;CACpB,CAAA"}
@@ -0,0 +1,7 @@
1
+ import type { IDataObject, IExecuteFunctions } from 'n8n-workflow';
2
+ import { type FieldLookup } from './RequestCreate';
3
+ import type { RequestOperation } from './RequestDescription';
4
+ type OperationRunner = (context: IExecuteFunctions, itemIndex: number, fieldsOf: FieldLookup) => Promise<IDataObject | IDataObject[]>;
5
+ export declare const REQUEST_OPERATIONS: Record<RequestOperation, OperationRunner>;
6
+ export declare function isRequestOperation(operation: string): operation is RequestOperation;
7
+ export {};
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REQUEST_OPERATIONS = void 0;
4
+ exports.isRequestOperation = isRequestOperation;
5
+ const FormbaseCatalog_1 = require("../FormbaseCatalog");
6
+ const GenericFunctions_1 = require("../GenericFunctions");
7
+ const RequestCreate_1 = require("./RequestCreate");
8
+ function readRequestId(context, itemIndex) {
9
+ return context.getNodeParameter('requestId', itemIndex, '', { extractValue: true });
10
+ }
11
+ async function listRequests(context, itemIndex) {
12
+ const returnAll = context.getNodeParameter('returnAll', itemIndex);
13
+ const max = returnAll ? Number.POSITIVE_INFINITY : context.getNodeParameter('limit', itemIndex);
14
+ const scope = context.getNodeParameter('scope', itemIndex);
15
+ const filters = context.getNodeParameter('filters', itemIndex, {});
16
+ const scopeParams = scope === 'form'
17
+ ? { formId: context.getNodeParameter('formId', itemIndex, '', { extractValue: true }) }
18
+ : { workspaceId: (await (0, FormbaseCatalog_1.readWorkspace)(context)).id };
19
+ return (0, FormbaseCatalog_1.collectPages)(context, 'requests.list', {
20
+ ...scopeParams,
21
+ ...(filters.status ? { status: filters.status } : {}),
22
+ ...(filters.outcome ? { outcome: filters.outcome } : {}),
23
+ ...(filters.externalId ? { externalId: filters.externalId } : {}),
24
+ ...(filters.includeTest ? { includeTest: true } : {}),
25
+ }, max);
26
+ }
27
+ exports.REQUEST_OPERATIONS = {
28
+ create: async (context, itemIndex, fieldsOf) => (0, GenericFunctions_1.formbaseApiRequest)(context, 'requests.create', await (0, RequestCreate_1.buildCreateParams)(context, itemIndex, fieldsOf)),
29
+ get: async (context, itemIndex) => (0, GenericFunctions_1.formbaseApiRequest)(context, 'requests.get', { requestId: readRequestId(context, itemIndex) }),
30
+ getAll: listRequests,
31
+ remind: async (context, itemIndex) => (0, GenericFunctions_1.formbaseApiRequest)(context, 'requests.remind', { requestId: readRequestId(context, itemIndex) }),
32
+ replayCallback: async (context, itemIndex) => (0, GenericFunctions_1.formbaseApiRequest)(context, 'requests.replayCallback', { requestId: readRequestId(context, itemIndex) }),
33
+ cancel: async (context, itemIndex) => {
34
+ const reason = context.getNodeParameter('reason', itemIndex, '');
35
+ return (0, GenericFunctions_1.formbaseApiRequest)(context, 'requests.cancel', {
36
+ requestId: readRequestId(context, itemIndex),
37
+ ...(reason ? { reason } : {}),
38
+ });
39
+ },
40
+ };
41
+ const REQUEST_OPERATION_NAMES = new Set(Object.keys(exports.REQUEST_OPERATIONS));
42
+ function isRequestOperation(operation) {
43
+ return REQUEST_OPERATION_NAMES.has(operation);
44
+ }
45
+ //# sourceMappingURL=RequestOperations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestOperations.js","sourceRoot":"","sources":["../../../../nodes/Formbase/actions/RequestOperations.ts"],"names":[],"mappings":";;;AAmEA,gDAEC;AAnED,wDAAgE;AAChE,0DAAwD;AACxD,mDAAqE;AAYrE,SAAS,aAAa,CAAC,OAA0B,EAA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AO,EAAE,iBAAiB,EAAE;YACjE,SAAS,EAAE,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC;YAC5C,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9B,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,0BAAkB,CAAC,CAAC,CAAA;AAG7F,SAAgB,kBAAkB,CAAC,SAAiB;IAClD,OAAO,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AAC/C,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export declare const DEFAULT_FORMBASE_API_URL = "https://api.formbase.so";
2
2
  export declare const FORMBASE_API_PATH = "/api/v1";
3
3
  export declare const FORMBASE_API_RESOURCE_URL = "https://api.formbase.so/api/v1";
4
- export declare const FORMBASE_OAUTH2_CREDENTIAL_NAME = "formbaseOAuth2Api";
4
+ export declare const FORMBASE_CREDENTIAL_TYPE = "formbaseOAuth2Api";
5
5
  export declare const FORMBASE_WEBHOOK_EVENTS: {
6
6
  readonly submissionCreated: "submission_created";
7
7
  readonly submissionUpdated: "submission_updated";
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FORMBASE_IDLE_WINDOW_OPTIONS = exports.FORMBASE_WEBHOOK_EVENTS = exports.FORMBASE_OAUTH2_CREDENTIAL_NAME = exports.FORMBASE_API_RESOURCE_URL = exports.FORMBASE_API_PATH = exports.DEFAULT_FORMBASE_API_URL = void 0;
3
+ exports.FORMBASE_IDLE_WINDOW_OPTIONS = exports.FORMBASE_WEBHOOK_EVENTS = exports.FORMBASE_CREDENTIAL_TYPE = exports.FORMBASE_API_RESOURCE_URL = exports.FORMBASE_API_PATH = exports.DEFAULT_FORMBASE_API_URL = void 0;
4
4
  exports.isFormbaseIdleWindow = isFormbaseIdleWindow;
5
5
  exports.DEFAULT_FORMBASE_API_URL = 'https://api.formbase.so';
6
6
  exports.FORMBASE_API_PATH = '/api/v1';
7
7
  exports.FORMBASE_API_RESOURCE_URL = `${exports.DEFAULT_FORMBASE_API_URL}${exports.FORMBASE_API_PATH}`;
8
- exports.FORMBASE_OAUTH2_CREDENTIAL_NAME = 'formbaseOAuth2Api';
8
+ exports.FORMBASE_CREDENTIAL_TYPE = 'formbaseOAuth2Api';
9
9
  exports.FORMBASE_WEBHOOK_EVENTS = {
10
10
  submissionCreated: 'submission_created',
11
11
  submissionUpdated: 'submission_updated',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../nodes/Formbase/constants.ts"],"names":[],"mappings":";;;AAiCA,oDAEC;AAnCY,QAAA,wBAAwB,GAAG,yBAAyB,CAAA;AAEpD,QAAA,iBAAiB,GAAG,SAAS,CAAA;AAE7B,QAAA,yBAAyB,GAAG,GAAG,gCAAwB,GAAG,yBAAiB,EAAE,CAAA;AAE7E,QAAA,+BAA+B,GAAG,mBAAmB,CAAA;AAErD,QAAA,uBAAuB,GAAG;IACrC,iBAAiB,EAAE,oBAAoB;IACvC,iBAAiB,EAAE,oBAAoB;IACvC,mBAAmB,EAAE,sBAAsB;IAC3C,gBAAgB,EAAE,mBAAmB;IACrC,cAAc,EAAE,iBAAiB;IACjC,eAAe,EAAE,kBAAkB;CAC3B,CAAA;AAKG,QAAA,4BAA4B,GAAG;IAC1C,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE;IAClC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;IAC9B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;IAC/B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE;CACvB,CAAA;AAIV,MAAM,2BAA2B,GAAwB,IAAI,GAAG,CAC9D,oCAA4B,CAAC,GAAG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,KAAK,CAAC,CAAA;AAC5E,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-formbase",
3
- "version": "0.9.2",
3
+ "version": "0.10.0",
4
4
  "description": "n8n community nodes for formbase — create requests, pause a workflow until a customer completes one, and trigger on completed, expired or canceled requests and on form submissions. Collect and verify customer information for workflows and AI agents.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package",
@@ -53,12 +53,12 @@
53
53
  ]
54
54
  },
55
55
  "devDependencies": {
56
- "@n8n/node-cli": "^0.39.3",
56
+ "@n8n/node-cli": "^0.49.1",
57
57
  "@types/node": "^22.0.0",
58
58
  "eslint": "9.39.4",
59
59
  "prettier": "3.8.3",
60
60
  "typescript": "5.9.3",
61
- "vitest": "4.1.10"
61
+ "vitest": "^5.0.2"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "n8n-workflow": "*"
@@ -13,19 +13,31 @@
13
13
  "parameters": {
14
14
  "resource": "request",
15
15
  "operation": "create",
16
- "formId": "",
16
+ "formId": {
17
+ "__rl": true,
18
+ "mode": "list",
19
+ "value": ""
20
+ },
17
21
  "recipientEmail": "ada@acme.com",
18
- "prefill": {
19
- "values": [
22
+ "fields": {
23
+ "mappingMode": "defineBelow",
24
+ "value": {
25
+ "company_name": "Acme"
26
+ },
27
+ "matchingColumns": [],
28
+ "schema": [
20
29
  {
21
- "key": "company_name",
22
- "value": "Acme",
23
- "json": false
30
+ "id": "company_name",
31
+ "displayName": "Company (company_name)",
32
+ "required": false,
33
+ "defaultMatch": false,
34
+ "canBeUsedToMatch": false,
35
+ "display": true,
36
+ "type": "string"
24
37
  }
25
- ]
26
- },
27
- "context": {
28
- "values": []
38
+ ],
39
+ "attemptToConvertTypes": false,
40
+ "convertFieldsToString": false
29
41
  },
30
42
  "readonly": ["company_name"],
31
43
  "waitForOutcome": true,
@@ -36,7 +48,7 @@
36
48
  }
37
49
  },
38
50
  "type": "n8n-nodes-formbase.formbase",
39
- "typeVersion": 1,
51
+ "typeVersion": 2,
40
52
  "position": [240, 0],
41
53
  "id": "b7d2f3a4-8c1e-4a5b-9d6f-0e2c4a6b8d21",
42
54
  "name": "Create request"