n8n-nodes-base 1.64.0 → 1.65.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 (79) hide show
  1. package/dist/build.tsbuildinfo +1 -1
  2. package/dist/credentials/GoogleBusinessProfileOAuth2Api.credentials.d.ts +8 -0
  3. package/dist/credentials/GoogleBusinessProfileOAuth2Api.credentials.js +28 -0
  4. package/dist/credentials/GoogleBusinessProfileOAuth2Api.credentials.js.map +1 -0
  5. package/dist/known/credentials.json +15 -0
  6. package/dist/known/nodes.json +12 -0
  7. package/dist/nodes/Code/JsCodeValidator.js.map +1 -1
  8. package/dist/nodes/Code/JsTaskRunnerSandbox.js +1 -3
  9. package/dist/nodes/Code/JsTaskRunnerSandbox.js.map +1 -1
  10. package/dist/nodes/Code/errors/WrappedExecutionError.js +0 -3
  11. package/dist/nodes/Code/errors/WrappedExecutionError.js.map +1 -1
  12. package/dist/nodes/DebugHelper/DebugHelper.node.js.map +1 -1
  13. package/dist/nodes/EmailReadImap/v2/EmailReadImapV2.node.js.map +1 -1
  14. package/dist/nodes/Form/Form.node.d.ts +18 -0
  15. package/dist/nodes/Form/Form.node.js +331 -0
  16. package/dist/nodes/Form/Form.node.js.map +1 -0
  17. package/dist/nodes/Form/Form.node.json +18 -0
  18. package/dist/nodes/Form/FormTrigger.node.js +3 -2
  19. package/dist/nodes/Form/FormTrigger.node.js.map +1 -1
  20. package/dist/nodes/Form/interfaces.d.ts +1 -15
  21. package/dist/nodes/Form/interfaces.js.map +1 -1
  22. package/dist/nodes/Form/utils.d.ts +24 -5
  23. package/dist/nodes/Form/utils.js +157 -78
  24. package/dist/nodes/Form/utils.js.map +1 -1
  25. package/dist/nodes/Form/v1/FormTriggerV1.node.d.ts +3 -1
  26. package/dist/nodes/Form/v1/FormTriggerV1.node.js +1 -1
  27. package/dist/nodes/Form/v1/FormTriggerV1.node.js.map +1 -1
  28. package/dist/nodes/Form/v2/FormTriggerV2.node.d.ts +3 -1
  29. package/dist/nodes/Form/v2/FormTriggerV2.node.js +33 -7
  30. package/dist/nodes/Form/v2/FormTriggerV2.node.js.map +1 -1
  31. package/dist/nodes/Github/GenericFunctions.d.ts +1 -0
  32. package/dist/nodes/Github/GenericFunctions.js +11 -0
  33. package/dist/nodes/Github/GenericFunctions.js.map +1 -1
  34. package/dist/nodes/Github/Github.node.d.ts +2 -1
  35. package/dist/nodes/Github/Github.node.js +169 -0
  36. package/dist/nodes/Github/Github.node.js.map +1 -1
  37. package/dist/nodes/Github/SearchFunctions.d.ts +1 -0
  38. package/dist/nodes/Github/SearchFunctions.js +23 -0
  39. package/dist/nodes/Github/SearchFunctions.js.map +1 -1
  40. package/dist/nodes/Google/BusinessProfile/GenericFunctions.d.ts +15 -0
  41. package/dist/nodes/Google/BusinessProfile/GenericFunctions.js +335 -0
  42. package/dist/nodes/Google/BusinessProfile/GenericFunctions.js.map +1 -0
  43. package/dist/nodes/Google/BusinessProfile/GoogleBusinessProfile.node.d.ts +13 -0
  44. package/dist/nodes/Google/BusinessProfile/GoogleBusinessProfile.node.js +79 -0
  45. package/dist/nodes/Google/BusinessProfile/GoogleBusinessProfile.node.js.map +1 -0
  46. package/dist/nodes/Google/BusinessProfile/GoogleBusinessProfile.node.json +19 -0
  47. package/dist/nodes/Google/BusinessProfile/GoogleBusinessProfileTrigger.node.d.ts +12 -0
  48. package/dist/nodes/Google/BusinessProfile/GoogleBusinessProfileTrigger.node.js +166 -0
  49. package/dist/nodes/Google/BusinessProfile/GoogleBusinessProfileTrigger.node.js.map +1 -0
  50. package/dist/nodes/Google/BusinessProfile/GoogleBusinessProfileTrigger.node.json +19 -0
  51. package/dist/nodes/Google/BusinessProfile/Interfaces.d.ts +21 -0
  52. package/dist/nodes/Google/BusinessProfile/Interfaces.js +3 -0
  53. package/dist/nodes/Google/BusinessProfile/Interfaces.js.map +1 -0
  54. package/dist/nodes/Google/BusinessProfile/PostDescription.d.ts +3 -0
  55. package/dist/nodes/Google/BusinessProfile/PostDescription.js +966 -0
  56. package/dist/nodes/Google/BusinessProfile/PostDescription.js.map +1 -0
  57. package/dist/nodes/Google/BusinessProfile/ReviewDescription.d.ts +3 -0
  58. package/dist/nodes/Google/BusinessProfile/ReviewDescription.js +552 -0
  59. package/dist/nodes/Google/BusinessProfile/ReviewDescription.js.map +1 -0
  60. package/dist/nodes/Google/BusinessProfile/googleBusinessProfile.svg +1 -0
  61. package/dist/nodes/Google/Sheet/v2/actions/sheet/append.operation.js +2 -4
  62. package/dist/nodes/Google/Sheet/v2/actions/sheet/append.operation.js.map +1 -1
  63. package/dist/nodes/InvoiceNinja/InvoiceNinja.node.js.map +1 -1
  64. package/dist/nodes/Kafka/Kafka.node.js.map +1 -1
  65. package/dist/nodes/Microsoft/Sql/GenericFunctions.d.ts +2 -1
  66. package/dist/nodes/Microsoft/Sql/GenericFunctions.js +30 -1
  67. package/dist/nodes/Microsoft/Sql/GenericFunctions.js.map +1 -1
  68. package/dist/nodes/Microsoft/Sql/MicrosoftSql.node.js +3 -9
  69. package/dist/nodes/Microsoft/Sql/MicrosoftSql.node.js.map +1 -1
  70. package/dist/nodes/MongoDb/MongoDb.node.js.map +1 -1
  71. package/dist/nodes/Postgres/PostgresTrigger.node.js.map +1 -1
  72. package/dist/nodes/Postgres/v2/transport/index.js +5 -1
  73. package/dist/nodes/Postgres/v2/transport/index.js.map +1 -1
  74. package/dist/nodes/Ssh/Ssh.node.js +36 -38
  75. package/dist/nodes/Ssh/Ssh.node.js.map +1 -1
  76. package/dist/nodes/Transform/RemoveDuplicates/v1/RemoveDuplicatesV1.node.js.map +1 -1
  77. package/dist/types/credentials.json +1 -0
  78. package/dist/types/nodes.json +8 -5
  79. package/package.json +9 -5
@@ -0,0 +1,966 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.postFields = exports.postOperations = void 0;
4
+ const GenericFunctions_1 = require("./GenericFunctions");
5
+ exports.postOperations = [
6
+ {
7
+ displayName: 'Operation',
8
+ name: 'operation',
9
+ type: 'options',
10
+ default: 'create',
11
+ noDataExpression: true,
12
+ displayOptions: { show: { resource: ['post'] } },
13
+ options: [
14
+ {
15
+ name: 'Create',
16
+ value: 'create',
17
+ action: 'Create post',
18
+ description: 'Create a new post on Google Business Profile',
19
+ routing: {
20
+ send: { preSend: [GenericFunctions_1.handleDatesPresend] },
21
+ request: {
22
+ method: 'POST',
23
+ url: '=/{{$parameter["account"]}}/{{$parameter["location"]}}/localPosts',
24
+ },
25
+ },
26
+ },
27
+ {
28
+ name: 'Delete',
29
+ value: 'delete',
30
+ action: 'Delete post',
31
+ description: 'Delete an existing post',
32
+ routing: {
33
+ request: {
34
+ method: 'DELETE',
35
+ url: '=/{{$parameter["post"]}}',
36
+ ignoreHttpStatusErrors: true,
37
+ },
38
+ output: {
39
+ postReceive: [GenericFunctions_1.handleErrorsDeletePost],
40
+ },
41
+ },
42
+ },
43
+ {
44
+ name: 'Get',
45
+ value: 'get',
46
+ action: 'Get post',
47
+ description: 'Retrieve details of a specific post',
48
+ routing: {
49
+ request: {
50
+ method: 'GET',
51
+ url: '=/{{$parameter["post"]}}',
52
+ ignoreHttpStatusErrors: true,
53
+ },
54
+ output: {
55
+ postReceive: [GenericFunctions_1.handleErrorsGetPost],
56
+ },
57
+ },
58
+ },
59
+ {
60
+ name: 'Get Many',
61
+ value: 'getAll',
62
+ action: 'Get many posts',
63
+ description: 'Retrieve multiple posts',
64
+ routing: {
65
+ send: { paginate: true },
66
+ operations: { pagination: GenericFunctions_1.handlePagination },
67
+ request: {
68
+ method: 'GET',
69
+ url: '=/{{$parameter["account"]}}/{{$parameter["location"]}}/localPosts',
70
+ qs: {
71
+ pageSize: '={{ $parameter["limit"] ? ($parameter["limit"] < 100 ? $parameter["limit"] : 100) : 100 }}',
72
+ },
73
+ },
74
+ },
75
+ },
76
+ {
77
+ name: 'Update',
78
+ value: 'update',
79
+ action: 'Update a post',
80
+ description: 'Update an existing post',
81
+ routing: {
82
+ send: {
83
+ preSend: [GenericFunctions_1.handleDatesPresend, GenericFunctions_1.addUpdateMaskPresend],
84
+ },
85
+ request: {
86
+ method: 'PATCH',
87
+ url: '=/{{$parameter["post"]}}',
88
+ ignoreHttpStatusErrors: true,
89
+ },
90
+ output: {
91
+ postReceive: [GenericFunctions_1.handleErrorsUpdatePost],
92
+ },
93
+ },
94
+ },
95
+ ],
96
+ },
97
+ ];
98
+ exports.postFields = [
99
+ {
100
+ displayName: 'Account',
101
+ name: 'account',
102
+ required: true,
103
+ type: 'resourceLocator',
104
+ default: { mode: 'list', value: '' },
105
+ description: 'The Google Business Profile account',
106
+ displayOptions: { show: { resource: ['post'], operation: ['create'] } },
107
+ modes: [
108
+ {
109
+ displayName: 'From list',
110
+ name: 'list',
111
+ type: 'list',
112
+ typeOptions: {
113
+ searchListMethod: 'searchAccounts',
114
+ searchable: true,
115
+ },
116
+ },
117
+ {
118
+ displayName: 'By name',
119
+ name: 'name',
120
+ type: 'string',
121
+ hint: 'Enter the account name',
122
+ validation: [
123
+ {
124
+ type: 'regex',
125
+ properties: {
126
+ regex: 'accounts/[0-9]+',
127
+ errorMessage: 'The name must start with "accounts/"',
128
+ },
129
+ },
130
+ ],
131
+ placeholder: 'e.g. accounts/0123456789',
132
+ },
133
+ ],
134
+ },
135
+ {
136
+ displayName: 'Location',
137
+ name: 'location',
138
+ required: true,
139
+ type: 'resourceLocator',
140
+ default: { mode: 'list', value: '' },
141
+ description: 'The specific location or business associated with the account',
142
+ displayOptions: { show: { resource: ['post'], operation: ['create'] } },
143
+ modes: [
144
+ {
145
+ displayName: 'From list',
146
+ name: 'list',
147
+ type: 'list',
148
+ typeOptions: {
149
+ searchListMethod: 'searchLocations',
150
+ searchable: true,
151
+ },
152
+ },
153
+ {
154
+ displayName: 'By name',
155
+ name: 'name',
156
+ type: 'string',
157
+ hint: 'Enter the location name',
158
+ validation: [
159
+ {
160
+ type: 'regex',
161
+ properties: {
162
+ regex: 'locations/[0-9]+',
163
+ errorMessage: 'The name must start with "locations/"',
164
+ },
165
+ },
166
+ ],
167
+ placeholder: 'e.g. locations/0123456789',
168
+ },
169
+ ],
170
+ },
171
+ {
172
+ displayName: 'Post Type',
173
+ name: 'postType',
174
+ required: true,
175
+ type: 'options',
176
+ default: 'STANDARD',
177
+ description: 'The type of post to create (standard, event, offer, or alert)',
178
+ displayOptions: { show: { resource: ['post'], operation: ['create'] } },
179
+ routing: { send: { type: 'body', property: 'topicType' } },
180
+ options: [
181
+ {
182
+ name: 'Standard',
183
+ value: 'STANDARD',
184
+ },
185
+ {
186
+ name: 'Event',
187
+ value: 'EVENT',
188
+ },
189
+ {
190
+ name: 'Offer',
191
+ value: 'OFFER',
192
+ },
193
+ {
194
+ name: 'Alert',
195
+ value: 'ALERT',
196
+ },
197
+ ],
198
+ },
199
+ {
200
+ displayName: 'Summary',
201
+ name: 'summary',
202
+ required: true,
203
+ type: 'string',
204
+ default: '',
205
+ description: 'The main text of the post',
206
+ displayOptions: { show: { resource: ['post'], operation: ['create'] } },
207
+ routing: { send: { type: 'body', property: 'summary' } },
208
+ },
209
+ {
210
+ displayName: 'Title',
211
+ name: 'title',
212
+ required: true,
213
+ type: 'string',
214
+ default: '',
215
+ description: 'E.g. Sales this week.',
216
+ displayOptions: { show: { resource: ['post'], operation: ['create'], postType: ['EVENT'] } },
217
+ routing: { send: { type: 'body', property: 'event.title' } },
218
+ },
219
+ {
220
+ displayName: 'Start Date and Time',
221
+ name: 'startDateTime',
222
+ required: true,
223
+ type: 'dateTime',
224
+ default: '',
225
+ description: 'The start date and time of the event',
226
+ displayOptions: { show: { resource: ['post'], operation: ['create'], postType: ['EVENT'] } },
227
+ },
228
+ {
229
+ displayName: 'End Date and Time',
230
+ name: 'endDateTime',
231
+ required: true,
232
+ type: 'dateTime',
233
+ default: '',
234
+ description: 'The end date and time of the event',
235
+ displayOptions: { show: { resource: ['post'], operation: ['create'], postType: ['EVENT'] } },
236
+ },
237
+ {
238
+ displayName: 'Title',
239
+ name: 'title',
240
+ required: true,
241
+ type: 'string',
242
+ default: '',
243
+ description: 'E.g. 20% off in store or online.',
244
+ displayOptions: { show: { resource: ['post'], operation: ['create'], postType: ['OFFER'] } },
245
+ routing: { send: { type: 'body', property: 'event.title' } },
246
+ },
247
+ {
248
+ displayName: 'Start Date',
249
+ name: 'startDate',
250
+ required: true,
251
+ type: 'string',
252
+ default: '',
253
+ placeholder: 'YYYY-MM-DD',
254
+ description: 'The start date of the offer',
255
+ displayOptions: { show: { resource: ['post'], operation: ['create'], postType: ['OFFER'] } },
256
+ },
257
+ {
258
+ displayName: 'End Date',
259
+ name: 'endDate',
260
+ required: true,
261
+ type: 'string',
262
+ default: '',
263
+ placeholder: 'YYYY-MM-DD',
264
+ description: 'The end date of the offer',
265
+ displayOptions: { show: { resource: ['post'], operation: ['create'], postType: ['OFFER'] } },
266
+ },
267
+ {
268
+ displayName: 'Alert Type',
269
+ name: 'alertType',
270
+ required: true,
271
+ type: 'options',
272
+ default: 'COVID_19',
273
+ description: 'The sub-type of the alert',
274
+ displayOptions: { show: { resource: ['post'], operation: ['create'], postType: ['ALERT'] } },
275
+ routing: {
276
+ send: { type: 'body', property: 'alertType' },
277
+ },
278
+ options: [
279
+ {
280
+ name: 'Covid 19',
281
+ value: 'COVID_19',
282
+ description: 'This alert is related to the 2019 Coronavirus Disease pandemic',
283
+ },
284
+ ],
285
+ },
286
+ {
287
+ displayName: 'Options',
288
+ name: 'additionalOptions',
289
+ type: 'collection',
290
+ default: {},
291
+ placeholder: 'Add Option',
292
+ displayOptions: { show: { resource: ['post'], operation: ['create'] } },
293
+ options: [
294
+ {
295
+ displayName: 'Language',
296
+ name: 'languageCode',
297
+ type: 'string',
298
+ default: '',
299
+ placeholder: 'e.g. en',
300
+ description: 'The language code of the post content. <a href="https://cloud.google.com/translate/docs/languages" target="_blank">More info</a>.',
301
+ routing: { send: { type: 'body', property: 'languageCode' } },
302
+ },
303
+ {
304
+ displayName: 'Call to Action Type',
305
+ name: 'callToActionType',
306
+ type: 'options',
307
+ default: 'ACTION_TYPE_UNSPECIFIED',
308
+ description: 'The type of call to action',
309
+ displayOptions: { show: { '/postType': ['STANDARD', 'EVENT', 'ALERT'] } },
310
+ routing: {
311
+ send: { type: 'body', property: 'callToAction.actionType' },
312
+ },
313
+ options: [
314
+ {
315
+ name: 'Action Type Unspecified',
316
+ value: 'ACTION_TYPE_UNSPECIFIED',
317
+ description: 'Type unspecified',
318
+ },
319
+ {
320
+ name: 'Book',
321
+ value: 'BOOK',
322
+ description: 'This post wants a user to book an appointment/table/etc',
323
+ },
324
+ {
325
+ name: 'Call',
326
+ value: 'CALL',
327
+ description: 'This post wants a user to call the business',
328
+ },
329
+ {
330
+ name: 'Learn More',
331
+ value: 'LEARN_MORE',
332
+ description: 'This post wants a user to learn more (at their website)',
333
+ },
334
+ {
335
+ name: 'Order',
336
+ value: 'ORDER',
337
+ description: 'This post wants a user to order something',
338
+ },
339
+ {
340
+ name: 'Shop',
341
+ value: 'SHOP',
342
+ description: 'This post wants a user to browse a product catalog',
343
+ },
344
+ {
345
+ name: 'Sign Up',
346
+ value: 'SIGN_UP',
347
+ description: 'This post wants a user to register/sign up/join something',
348
+ },
349
+ ],
350
+ },
351
+ {
352
+ displayName: 'Call to Action Url',
353
+ name: 'url',
354
+ type: 'string',
355
+ default: '',
356
+ description: 'The URL that users are sent to when clicking through the promotion',
357
+ displayOptions: { show: { '/postType': ['STANDARD', 'EVENT', 'ALERT'] } },
358
+ routing: {
359
+ send: { type: 'body', property: 'callToAction.url' },
360
+ },
361
+ },
362
+ {
363
+ displayName: 'Coupon Code',
364
+ name: 'couponCode',
365
+ type: 'string',
366
+ default: '',
367
+ description: 'The coupon code for the offer',
368
+ displayOptions: { show: { '/postType': ['OFFER'] } },
369
+ routing: {
370
+ send: { type: 'body', property: 'offer.couponCode' },
371
+ },
372
+ },
373
+ {
374
+ displayName: 'Redeem Online Url',
375
+ name: 'redeemOnlineUrl',
376
+ type: 'string',
377
+ default: '',
378
+ description: 'Link to redeem the offer',
379
+ displayOptions: { show: { '/postType': ['OFFER'] } },
380
+ routing: {
381
+ send: { type: 'body', property: 'offer.redeemOnlineUrl' },
382
+ },
383
+ },
384
+ {
385
+ displayName: 'Terms and Conditions',
386
+ name: 'termsConditions',
387
+ type: 'string',
388
+ default: '',
389
+ description: 'The terms and conditions of the offer',
390
+ displayOptions: { show: { '/postType': ['OFFER'] } },
391
+ routing: {
392
+ send: { type: 'body', property: 'offer.termsConditions' },
393
+ },
394
+ },
395
+ ],
396
+ },
397
+ {
398
+ displayName: 'Account',
399
+ name: 'account',
400
+ required: true,
401
+ type: 'resourceLocator',
402
+ default: { mode: 'list', value: '' },
403
+ description: 'The Google Business Profile account',
404
+ displayOptions: { show: { resource: ['post'], operation: ['delete'] } },
405
+ modes: [
406
+ {
407
+ displayName: 'From list',
408
+ name: 'list',
409
+ type: 'list',
410
+ typeOptions: {
411
+ searchListMethod: 'searchAccounts',
412
+ searchable: true,
413
+ },
414
+ },
415
+ {
416
+ displayName: 'By name',
417
+ name: 'name',
418
+ type: 'string',
419
+ hint: 'Enter the account name',
420
+ validation: [
421
+ {
422
+ type: 'regex',
423
+ properties: {
424
+ regex: 'accounts/[0-9]+',
425
+ errorMessage: 'The name must start with "accounts/"',
426
+ },
427
+ },
428
+ ],
429
+ placeholder: 'e.g. accounts/0123456789',
430
+ },
431
+ ],
432
+ },
433
+ {
434
+ displayName: 'Location',
435
+ name: 'location',
436
+ required: true,
437
+ type: 'resourceLocator',
438
+ default: { mode: 'list', value: '' },
439
+ description: 'The specific location or business associated with the account',
440
+ displayOptions: { show: { resource: ['post'], operation: ['delete'] } },
441
+ modes: [
442
+ {
443
+ displayName: 'From list',
444
+ name: 'list',
445
+ type: 'list',
446
+ typeOptions: {
447
+ searchListMethod: 'searchLocations',
448
+ searchable: true,
449
+ },
450
+ },
451
+ {
452
+ displayName: 'By name',
453
+ name: 'name',
454
+ type: 'string',
455
+ hint: 'Enter the location name',
456
+ validation: [
457
+ {
458
+ type: 'regex',
459
+ properties: {
460
+ regex: 'locations/[0-9]+',
461
+ errorMessage: 'The name must start with "locations/"',
462
+ },
463
+ },
464
+ ],
465
+ placeholder: 'e.g. locations/0123456789',
466
+ },
467
+ ],
468
+ },
469
+ {
470
+ displayName: 'Post',
471
+ name: 'post',
472
+ type: 'resourceLocator',
473
+ default: { mode: 'list', value: '' },
474
+ description: 'Select the post to retrieve its details',
475
+ displayOptions: { show: { resource: ['post'], operation: ['delete'] } },
476
+ modes: [
477
+ {
478
+ displayName: 'From list',
479
+ name: 'list',
480
+ type: 'list',
481
+ typeOptions: {
482
+ searchListMethod: 'searchPosts',
483
+ searchable: true,
484
+ },
485
+ },
486
+ {
487
+ displayName: 'By name',
488
+ name: 'name',
489
+ type: 'string',
490
+ validation: [
491
+ {
492
+ type: 'regex',
493
+ properties: {
494
+ regex: 'accounts/[0-9]+/locations/[0-9]+/localPosts/[0-9]+',
495
+ errorMessage: 'The name must be in the format "accounts/123/locations/123/localPosts/123"',
496
+ },
497
+ },
498
+ ],
499
+ placeholder: 'e.g. accounts/123/locations/123/localPosts/123',
500
+ },
501
+ ],
502
+ },
503
+ {
504
+ displayName: 'Account',
505
+ name: 'account',
506
+ required: true,
507
+ type: 'resourceLocator',
508
+ default: { mode: 'list', value: '' },
509
+ description: 'The Google Business Profile account',
510
+ displayOptions: { show: { resource: ['post'], operation: ['get'] } },
511
+ modes: [
512
+ {
513
+ displayName: 'From list',
514
+ name: 'list',
515
+ type: 'list',
516
+ typeOptions: {
517
+ searchListMethod: 'searchAccounts',
518
+ searchable: true,
519
+ },
520
+ },
521
+ {
522
+ displayName: 'By name',
523
+ name: 'name',
524
+ type: 'string',
525
+ hint: 'Enter the account name',
526
+ validation: [
527
+ {
528
+ type: 'regex',
529
+ properties: {
530
+ regex: 'accounts/[0-9]+',
531
+ errorMessage: 'The name must start with "accounts/"',
532
+ },
533
+ },
534
+ ],
535
+ placeholder: 'e.g. accounts/0123456789',
536
+ },
537
+ ],
538
+ },
539
+ {
540
+ displayName: 'Location',
541
+ name: 'location',
542
+ required: true,
543
+ type: 'resourceLocator',
544
+ default: { mode: 'list', value: '' },
545
+ description: 'The specific location or business associated with the account',
546
+ displayOptions: { show: { resource: ['post'], operation: ['get'] } },
547
+ modes: [
548
+ {
549
+ displayName: 'From list',
550
+ name: 'list',
551
+ type: 'list',
552
+ typeOptions: {
553
+ searchListMethod: 'searchLocations',
554
+ searchable: true,
555
+ },
556
+ },
557
+ {
558
+ displayName: 'By name',
559
+ name: 'name',
560
+ type: 'string',
561
+ hint: 'Enter the location name',
562
+ validation: [
563
+ {
564
+ type: 'regex',
565
+ properties: {
566
+ regex: 'locations/[0-9]+',
567
+ errorMessage: 'The name must start with "locations/"',
568
+ },
569
+ },
570
+ ],
571
+ placeholder: 'e.g. locations/0123456789',
572
+ },
573
+ ],
574
+ },
575
+ {
576
+ displayName: 'Post',
577
+ name: 'post',
578
+ type: 'resourceLocator',
579
+ default: { mode: 'list', value: '' },
580
+ description: 'Select the post to retrieve its details',
581
+ displayOptions: { show: { resource: ['post'], operation: ['get'] } },
582
+ modes: [
583
+ {
584
+ displayName: 'From list',
585
+ name: 'list',
586
+ type: 'list',
587
+ typeOptions: {
588
+ searchListMethod: 'searchPosts',
589
+ searchable: true,
590
+ },
591
+ },
592
+ {
593
+ displayName: 'By name',
594
+ name: 'name',
595
+ type: 'string',
596
+ validation: [
597
+ {
598
+ type: 'regex',
599
+ properties: {
600
+ regex: 'accounts/[0-9]+/locations/[0-9]+/localPosts/[0-9]+',
601
+ errorMessage: 'The name must be in the format "accounts/123/locations/123/localPosts/123"',
602
+ },
603
+ },
604
+ ],
605
+ placeholder: 'e.g. accounts/123/locations/123/localPosts/123',
606
+ },
607
+ ],
608
+ },
609
+ {
610
+ displayName: 'Account',
611
+ name: 'account',
612
+ required: true,
613
+ type: 'resourceLocator',
614
+ default: { mode: 'list', value: '' },
615
+ description: 'The Google Business Profile account',
616
+ displayOptions: { show: { resource: ['post'], operation: ['getAll'] } },
617
+ modes: [
618
+ {
619
+ displayName: 'From list',
620
+ name: 'list',
621
+ type: 'list',
622
+ typeOptions: {
623
+ searchListMethod: 'searchAccounts',
624
+ searchable: true,
625
+ },
626
+ },
627
+ {
628
+ displayName: 'By name',
629
+ name: 'name',
630
+ type: 'string',
631
+ hint: 'Enter the account name',
632
+ validation: [
633
+ {
634
+ type: 'regex',
635
+ properties: {
636
+ regex: 'accounts/[0-9]+',
637
+ errorMessage: 'The name must start with "accounts/"',
638
+ },
639
+ },
640
+ ],
641
+ placeholder: 'e.g. accounts/0123456789',
642
+ },
643
+ ],
644
+ },
645
+ {
646
+ displayName: 'Location',
647
+ name: 'location',
648
+ required: true,
649
+ type: 'resourceLocator',
650
+ default: { mode: 'list', value: '' },
651
+ description: 'The specific location or business associated with the account',
652
+ displayOptions: { show: { resource: ['post'], operation: ['getAll'] } },
653
+ modes: [
654
+ {
655
+ displayName: 'From list',
656
+ name: 'list',
657
+ type: 'list',
658
+ typeOptions: {
659
+ searchListMethod: 'searchLocations',
660
+ searchable: true,
661
+ },
662
+ },
663
+ {
664
+ displayName: 'By name',
665
+ name: 'name',
666
+ type: 'string',
667
+ hint: 'Enter the location name',
668
+ validation: [
669
+ {
670
+ type: 'regex',
671
+ properties: {
672
+ regex: 'locations/[0-9]+',
673
+ errorMessage: 'The name must start with "locations/"',
674
+ },
675
+ },
676
+ ],
677
+ placeholder: 'e.g. locations/0123456789',
678
+ },
679
+ ],
680
+ },
681
+ {
682
+ displayName: 'Return All',
683
+ name: 'returnAll',
684
+ default: false,
685
+ description: 'Whether to return all results or only up to a given limit',
686
+ displayOptions: { show: { resource: ['post'], operation: ['getAll'] } },
687
+ type: 'boolean',
688
+ },
689
+ {
690
+ displayName: 'Limit',
691
+ name: 'limit',
692
+ type: 'number',
693
+ typeOptions: {
694
+ minValue: 1,
695
+ },
696
+ default: 20,
697
+ description: 'Max number of results to return',
698
+ displayOptions: { show: { resource: ['post'], operation: ['getAll'], returnAll: [false] } },
699
+ },
700
+ {
701
+ displayName: 'Account',
702
+ name: 'account',
703
+ required: true,
704
+ type: 'resourceLocator',
705
+ default: { mode: 'list', value: '' },
706
+ description: 'The Google Business Profile account',
707
+ displayOptions: { show: { resource: ['post'], operation: ['update'] } },
708
+ modes: [
709
+ {
710
+ displayName: 'From list',
711
+ name: 'list',
712
+ type: 'list',
713
+ typeOptions: {
714
+ searchListMethod: 'searchAccounts',
715
+ searchable: true,
716
+ },
717
+ },
718
+ {
719
+ displayName: 'By name',
720
+ name: 'name',
721
+ type: 'string',
722
+ hint: 'Enter the account name',
723
+ validation: [
724
+ {
725
+ type: 'regex',
726
+ properties: {
727
+ regex: 'accounts/[0-9]+',
728
+ errorMessage: 'The name must start with "accounts/"',
729
+ },
730
+ },
731
+ ],
732
+ placeholder: 'e.g. accounts/0123456789',
733
+ },
734
+ ],
735
+ },
736
+ {
737
+ displayName: 'Location',
738
+ name: 'location',
739
+ required: true,
740
+ type: 'resourceLocator',
741
+ default: { mode: 'list', value: '' },
742
+ description: 'The specific location or business associated with the account',
743
+ displayOptions: { show: { resource: ['post'], operation: ['update'] } },
744
+ modes: [
745
+ {
746
+ displayName: 'From list',
747
+ name: 'list',
748
+ type: 'list',
749
+ typeOptions: {
750
+ searchListMethod: 'searchLocations',
751
+ searchable: true,
752
+ },
753
+ },
754
+ {
755
+ displayName: 'By name',
756
+ name: 'name',
757
+ type: 'string',
758
+ hint: 'Enter the location name',
759
+ validation: [
760
+ {
761
+ type: 'regex',
762
+ properties: {
763
+ regex: 'locations/[0-9]+',
764
+ errorMessage: 'The name must start with "locations/"',
765
+ },
766
+ },
767
+ ],
768
+ placeholder: 'e.g. locations/0123456789',
769
+ },
770
+ ],
771
+ },
772
+ {
773
+ displayName: 'Post',
774
+ name: 'post',
775
+ type: 'resourceLocator',
776
+ default: { mode: 'list', value: '' },
777
+ description: 'Select the post to retrieve its details',
778
+ displayOptions: { show: { resource: ['post'], operation: ['update'] } },
779
+ modes: [
780
+ {
781
+ displayName: 'From list',
782
+ name: 'list',
783
+ type: 'list',
784
+ typeOptions: {
785
+ searchListMethod: 'searchPosts',
786
+ searchable: true,
787
+ },
788
+ },
789
+ {
790
+ displayName: 'By name',
791
+ name: 'name',
792
+ type: 'string',
793
+ validation: [
794
+ {
795
+ type: 'regex',
796
+ properties: {
797
+ regex: 'accounts/[0-9]+/locations/[0-9]+/localPosts/[0-9]+',
798
+ errorMessage: 'The name must be in the format "accounts/123/locations/123/localPosts/123"',
799
+ },
800
+ },
801
+ ],
802
+ placeholder: 'e.g. accounts/123/locations/123/localPosts/123',
803
+ },
804
+ ],
805
+ },
806
+ {
807
+ displayName: "Make sure that the updated options are supported by the post type. <a target='_blank' href='https://developers.google.com/my-business/reference/rest/v4/accounts.locations.localPosts#resource:-localpost'>More info</a>.",
808
+ name: 'notice',
809
+ type: 'notice',
810
+ default: '',
811
+ displayOptions: { show: { resource: ['post'], operation: ['update'] } },
812
+ },
813
+ {
814
+ displayName: 'Options',
815
+ name: 'additionalOptions',
816
+ type: 'collection',
817
+ default: {},
818
+ placeholder: 'Add Option',
819
+ displayOptions: { show: { resource: ['post'], operation: ['update'] } },
820
+ options: [
821
+ {
822
+ displayName: 'Summary',
823
+ name: 'summary',
824
+ type: 'string',
825
+ default: '',
826
+ description: 'The main text of the post',
827
+ routing: { send: { type: 'body', property: 'summary' } },
828
+ },
829
+ {
830
+ displayName: 'Language',
831
+ name: 'languageCode',
832
+ type: 'string',
833
+ default: '',
834
+ placeholder: 'e.g. en',
835
+ description: 'The language code of the post content. <a href="https://cloud.google.com/translate/docs/languages" target="_blank">More info</a>.',
836
+ routing: { send: { type: 'body', property: 'languageCode' } },
837
+ },
838
+ {
839
+ displayName: 'Call to Action Type',
840
+ name: 'callToActionType',
841
+ type: 'options',
842
+ default: 'ACTION_TYPE_UNSPECIFIED',
843
+ description: 'The type of call to action',
844
+ routing: {
845
+ send: { type: 'body', property: 'callToAction.actionType' },
846
+ },
847
+ options: [
848
+ {
849
+ name: 'Action Type Unspecified',
850
+ value: 'ACTION_TYPE_UNSPECIFIED',
851
+ description: 'Type unspecified',
852
+ },
853
+ {
854
+ name: 'Book',
855
+ value: 'BOOK',
856
+ description: 'This post wants a user to book an appointment/table/etc',
857
+ },
858
+ {
859
+ name: 'Get Offer',
860
+ value: 'GET_OFFER',
861
+ description: 'Deprecated. Use OFFER in LocalPostTopicType to create a post with offer content.',
862
+ },
863
+ {
864
+ name: 'Learn More',
865
+ value: 'LEARN_MORE',
866
+ description: 'This post wants a user to learn more (at their website)',
867
+ },
868
+ {
869
+ name: 'Order',
870
+ value: 'ORDER',
871
+ description: 'This post wants a user to order something',
872
+ },
873
+ {
874
+ name: 'Shop',
875
+ value: 'SHOP',
876
+ description: 'This post wants a user to browse a product catalog',
877
+ },
878
+ {
879
+ name: 'Sign Up',
880
+ value: 'SIGN_UP',
881
+ description: 'This post wants a user to register/sign up/join something',
882
+ },
883
+ ],
884
+ },
885
+ {
886
+ displayName: 'Call to Action Url',
887
+ name: 'url',
888
+ type: 'string',
889
+ default: '',
890
+ description: 'The URL that users are sent to when clicking through the promotion',
891
+ routing: {
892
+ send: { type: 'body', property: 'callToAction.url' },
893
+ },
894
+ },
895
+ {
896
+ displayName: 'Start Date and Time',
897
+ name: 'startDateTime',
898
+ type: 'dateTime',
899
+ default: '',
900
+ description: 'The start date and time of the event',
901
+ },
902
+ {
903
+ displayName: 'End Date and Time',
904
+ name: 'endDateTime',
905
+ type: 'dateTime',
906
+ default: '',
907
+ description: 'The end date and time of the event',
908
+ },
909
+ {
910
+ displayName: 'Title',
911
+ name: 'title',
912
+ type: 'string',
913
+ default: '',
914
+ description: 'E.g. 20% off in store or online.',
915
+ routing: { send: { type: 'body', property: 'event.title' } },
916
+ },
917
+ {
918
+ displayName: 'Start Date',
919
+ name: 'startDate',
920
+ type: 'string',
921
+ default: '',
922
+ placeholder: 'YYYY-MM-DD',
923
+ description: 'The start date of the offer',
924
+ },
925
+ {
926
+ displayName: 'End Date',
927
+ name: 'endDate',
928
+ type: 'string',
929
+ default: '',
930
+ placeholder: 'YYYY-MM-DD',
931
+ description: 'The end date of the offer',
932
+ },
933
+ {
934
+ displayName: 'Coupon Code',
935
+ name: 'couponCode',
936
+ type: 'string',
937
+ default: '',
938
+ description: 'The coupon code for the offer',
939
+ routing: {
940
+ send: { type: 'body', property: 'offer.couponCode' },
941
+ },
942
+ },
943
+ {
944
+ displayName: 'Redeem Online Url',
945
+ name: 'redeemOnlineUrl',
946
+ type: 'string',
947
+ default: '',
948
+ description: 'Link to redeem the offer',
949
+ routing: {
950
+ send: { type: 'body', property: 'offer.redeemOnlineUrl' },
951
+ },
952
+ },
953
+ {
954
+ displayName: 'Terms and Conditions',
955
+ name: 'termsConditions',
956
+ type: 'string',
957
+ default: '',
958
+ description: 'The terms and conditions of the offer',
959
+ routing: {
960
+ send: { type: 'body', property: 'offer.termsConditions' },
961
+ },
962
+ },
963
+ ],
964
+ },
965
+ ];
966
+ //# sourceMappingURL=PostDescription.js.map