@friggframework/core 2.0.0--canary.700.80ec1cc.0 → 2.0.0--canary.702.047d3c4.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 (130) hide show
  1. package/database/documentdb-utils.js +1 -6
  2. package/errors/index.js +0 -4
  3. package/generated/prisma-mongodb/edge.js +4 -52
  4. package/generated/prisma-mongodb/index-browser.js +1 -49
  5. package/generated/prisma-mongodb/index.d.ts +60 -3506
  6. package/generated/prisma-mongodb/index.js +4 -52
  7. package/generated/prisma-mongodb/package.json +1 -1
  8. package/generated/prisma-mongodb/schema.prisma +0 -65
  9. package/generated/prisma-mongodb/wasm.js +4 -52
  10. package/generated/prisma-postgresql/edge.js +4 -52
  11. package/generated/prisma-postgresql/index-browser.js +1 -49
  12. package/generated/prisma-postgresql/index.d.ts +94 -3824
  13. package/generated/prisma-postgresql/index.js +4 -52
  14. package/generated/prisma-postgresql/package.json +1 -1
  15. package/generated/prisma-postgresql/schema.prisma +0 -63
  16. package/generated/prisma-postgresql/wasm.js +4 -52
  17. package/handlers/WEBHOOKS.md +0 -29
  18. package/handlers/app-definition-loader.js +9 -2
  19. package/handlers/app-handler-helpers.js +2 -5
  20. package/handlers/integration-event-dispatcher.js +3 -7
  21. package/handlers/routers/integration-webhook-routers.js +38 -26
  22. package/index.js +0 -2
  23. package/integrations/integration-base.js +1 -162
  24. package/integrations/integration-router.js +1 -6
  25. package/integrations/repositories/integration-mapping-repository-documentdb.js +0 -50
  26. package/integrations/repositories/integration-mapping-repository-interface.js +0 -15
  27. package/integrations/repositories/integration-mapping-repository-mongo.js +0 -29
  28. package/integrations/repositories/integration-mapping-repository-postgres.js +0 -30
  29. package/integrations/repositories/integration-mapping-repository.js +0 -29
  30. package/integrations/repositories/integration-repository-documentdb.js +2 -6
  31. package/integrations/repositories/integration-repository-interface.js +0 -3
  32. package/integrations/repositories/integration-repository-mongo.js +5 -20
  33. package/integrations/repositories/integration-repository-postgres.js +1 -5
  34. package/integrations/repositories/process-repository-mongo.js +1 -1
  35. package/integrations/use-cases/create-integration.js +4 -14
  36. package/integrations/use-cases/delete-integration-for-user.js +4 -4
  37. package/integrations/use-cases/get-integration-for-user.js +2 -4
  38. package/integrations/use-cases/get-integration-instance.js +4 -4
  39. package/integrations/use-cases/get-integrations-for-user.js +4 -4
  40. package/integrations/use-cases/get-possible-integrations.js +2 -7
  41. package/integrations/use-cases/update-integration.js +4 -4
  42. package/package.json +6 -6
  43. package/prisma-mongodb/schema.prisma +0 -65
  44. package/prisma-postgresql/schema.prisma +0 -63
  45. package/queues/queuer-util.js +2 -9
  46. package/errors/mapping-already-exists-error.js +0 -14
  47. package/handlers/workers/integration-triggers.js +0 -25
  48. package/infrastructure/scheduler/recurrence.js +0 -204
  49. package/integrations/definitions/README.md +0 -278
  50. package/integrations/definitions/canonical.js +0 -11
  51. package/integrations/definitions/capabilities/AUDIT.md +0 -480
  52. package/integrations/definitions/capabilities/acmeerp.capabilities.json +0 -633
  53. package/integrations/definitions/capabilities/asana.capabilities.json +0 -279
  54. package/integrations/definitions/capabilities/calendly.capabilities.json +0 -385
  55. package/integrations/definitions/capabilities/docusign.capabilities.json +0 -314
  56. package/integrations/definitions/capabilities/fathom.capabilities.json +0 -238
  57. package/integrations/definitions/capabilities/github.capabilities.json +0 -585
  58. package/integrations/definitions/capabilities/hubspot.capabilities.json +0 -822
  59. package/integrations/definitions/capabilities/jira.capabilities.json +0 -391
  60. package/integrations/definitions/capabilities/klaviyo.capabilities.json +0 -503
  61. package/integrations/definitions/capabilities/linear.capabilities.json +0 -378
  62. package/integrations/definitions/capabilities/netsuite.capabilities.json +0 -535
  63. package/integrations/definitions/capabilities/notion.capabilities.json +0 -208
  64. package/integrations/definitions/capabilities/phone.capabilities.json +0 -511
  65. package/integrations/definitions/capabilities/pipedrive.capabilities.json +0 -430
  66. package/integrations/definitions/capabilities/quickbooks.capabilities.json +0 -635
  67. package/integrations/definitions/capabilities/salesforce.capabilities.json +0 -568
  68. package/integrations/definitions/capabilities/shopify.capabilities.json +0 -1128
  69. package/integrations/definitions/capabilities/slack.capabilities.json +0 -373
  70. package/integrations/definitions/capabilities/stripe.capabilities.json +0 -630
  71. package/integrations/definitions/capabilities/webflow.capabilities.json +0 -196
  72. package/integrations/definitions/capabilities/zendesk.capabilities.json +0 -422
  73. package/integrations/definitions/compile.js +0 -80
  74. package/integrations/definitions/config-form.js +0 -137
  75. package/integrations/definitions/examples/acme-erp-quickbooks.definition.json +0 -467
  76. package/integrations/definitions/examples/asana-slack.definition.json +0 -219
  77. package/integrations/definitions/examples/calendly-salesforce.definition.json +0 -459
  78. package/integrations/definitions/examples/docusign-salesforce.definition.json +0 -305
  79. package/integrations/definitions/examples/fathom-hubspot-notion.definition.json +0 -575
  80. package/integrations/definitions/examples/github-linear.definition.json +0 -322
  81. package/integrations/definitions/examples/hubspot-slack.definition.json +0 -427
  82. package/integrations/definitions/examples/klaviyo-hubspot.definition.json +0 -336
  83. package/integrations/definitions/examples/phone-hubspot.definition.json +0 -633
  84. package/integrations/definitions/examples/pipedrive-hubspot.definition.json +0 -136
  85. package/integrations/definitions/examples/pipedrive-phone.definition.json +0 -340
  86. package/integrations/definitions/examples/records/phone-hubspot.definition-version.json +0 -652
  87. package/integrations/definitions/examples/records/phone-hubspot.integration.json +0 -86
  88. package/integrations/definitions/examples/records/phone-hubspot.mappings.json +0 -39
  89. package/integrations/definitions/examples/records/phone-hubspot.workflow-run.json +0 -62
  90. package/integrations/definitions/examples/shopify-klaviyo.definition.json +0 -488
  91. package/integrations/definitions/examples/shopify-netsuite.definition.json +0 -622
  92. package/integrations/definitions/examples/stripe-quickbooks.definition.json +0 -476
  93. package/integrations/definitions/examples/webflow-hubspot-slack.definition.json +0 -262
  94. package/integrations/definitions/examples/zendesk-jira.definition.json +0 -604
  95. package/integrations/definitions/expressions.js +0 -229
  96. package/integrations/definitions/index.js +0 -45
  97. package/integrations/definitions/integration-runtime.js +0 -763
  98. package/integrations/definitions/interpreter.js +0 -104
  99. package/integrations/definitions/manifests.js +0 -177
  100. package/integrations/definitions/renderers/common.js +0 -67
  101. package/integrations/definitions/renderers/html.js +0 -129
  102. package/integrations/definitions/renderers/hubspot.js +0 -59
  103. package/integrations/definitions/renderers/preview.js +0 -154
  104. package/integrations/definitions/renderers/slack.js +0 -146
  105. package/integrations/definitions/repositories/definition-version-repository.js +0 -67
  106. package/integrations/definitions/repositories/workflow-run-repository.js +0 -80
  107. package/integrations/definitions/router.js +0 -170
  108. package/integrations/definitions/runtime.js +0 -268
  109. package/integrations/definitions/schema/capability-manifest.v0.1.schema.json +0 -549
  110. package/integrations/definitions/schema/installation.v0.1.schema.json +0 -130
  111. package/integrations/definitions/schema/integration-definition.v0.1.schema.json +0 -909
  112. package/integrations/definitions/schema/records.md +0 -105
  113. package/integrations/definitions/schema-check.js +0 -58
  114. package/integrations/definitions/scripts/check-manifests.js +0 -220
  115. package/integrations/definitions/scripts/validate.js +0 -66
  116. package/integrations/definitions/steps.js +0 -123
  117. package/integrations/definitions/sync-engine.js +0 -297
  118. package/integrations/definitions/tests/helpers-fake-crm.js +0 -49
  119. package/integrations/definitions/transforms.js +0 -91
  120. package/integrations/definitions/use-cases/definition-use-cases.js +0 -245
  121. package/integrations/definitions/validate.js +0 -436
  122. package/integrations/definitions/versioning.js +0 -176
  123. package/integrations/definitions/webhooks.js +0 -119
  124. package/integrations/integration-types.js +0 -64
  125. package/integrations/triggers.js +0 -244
  126. package/integrations/use-cases/run-trigger-tick.js +0 -155
  127. package/integrations/use-cases/run-trigger.js +0 -77
  128. package/prisma-postgresql/migrations/20261018000000_add_data_defined_integrations/migration.sql +0 -66
  129. package/prisma-postgresql/migrations/20261019000000_workflow_run_waits/migration.sql +0 -7
  130. package/prisma-postgresql/migrations/20261019120000_definition_workspace/migration.sql +0 -5
@@ -1,909 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://friggframework.org/schemas/integration-definition/v0.1.json",
4
- "title": "Frigg integration definition v0.1",
5
- "description": "An integration as data: what it connects, what it keeps in sync, which workflows it runs and which UI it shows. One document per published version; immutable once published (ADR-063).",
6
- "type": "object",
7
- "required": [
8
- "schemaVersion",
9
- "id",
10
- "version",
11
- "display",
12
- "modules"
13
- ],
14
- "additionalProperties": false,
15
- "properties": {
16
- "$schema": {
17
- "type": "string"
18
- },
19
- "schemaVersion": {
20
- "const": "0.1"
21
- },
22
- "id": {
23
- "type": "string",
24
- "pattern": "^[a-z][a-z0-9-]*$"
25
- },
26
- "version": {
27
- "type": "string",
28
- "pattern": "^\\d+\\.\\d+\\.\\d+(-[\\w.]+)?$"
29
- },
30
- "display": {
31
- "type": "object",
32
- "required": [
33
- "label"
34
- ],
35
- "properties": {
36
- "label": {
37
- "type": "string"
38
- },
39
- "description": {
40
- "type": "string"
41
- },
42
- "category": {
43
- "type": "string"
44
- },
45
- "tags": {
46
- "type": "array",
47
- "items": {
48
- "type": "string"
49
- }
50
- }
51
- }
52
- },
53
- "modules": {
54
- "type": "object",
55
- "minProperties": 1,
56
- "additionalProperties": {
57
- "type": "object",
58
- "required": [
59
- "module"
60
- ],
61
- "properties": {
62
- "module": {
63
- "type": "string",
64
- "description": "Capability manifest name."
65
- },
66
- "version": {
67
- "type": "string"
68
- }
69
- }
70
- }
71
- },
72
- "settings": {
73
- "type": "object",
74
- "additionalProperties": {
75
- "$ref": "#/$defs/setting"
76
- }
77
- },
78
- "syncs": {
79
- "type": "array",
80
- "items": {
81
- "type": "object",
82
- "required": [
83
- "id",
84
- "label",
85
- "source",
86
- "target",
87
- "direction",
88
- "identity",
89
- "mapping"
90
- ],
91
- "additionalProperties": false,
92
- "properties": {
93
- "id": {
94
- "type": "string",
95
- "pattern": "^[a-z][a-z0-9-]*$"
96
- },
97
- "label": {
98
- "type": "string"
99
- },
100
- "description": {
101
- "type": "string"
102
- },
103
- "source": {
104
- "type": "string",
105
- "pattern": "^[a-zA-Z]\\w*\\.[a-zA-Z]\\w*$",
106
- "description": "<moduleKey>.<object>"
107
- },
108
- "target": {
109
- "type": "string",
110
- "pattern": "^[a-zA-Z]\\w*\\.[a-zA-Z]\\w*$"
111
- },
112
- "direction": {
113
- "enum": [
114
- "one_way",
115
- "two_way"
116
- ]
117
- },
118
- "identity": {
119
- "type": "object",
120
- "required": [
121
- "match"
122
- ],
123
- "properties": {
124
- "match": {
125
- "type": "array",
126
- "minItems": 1,
127
- "items": {
128
- "type": "object",
129
- "required": [
130
- "key",
131
- "source",
132
- "target"
133
- ],
134
- "properties": {
135
- "source": {
136
- "type": "string"
137
- },
138
- "target": {
139
- "type": "string"
140
- },
141
- "transform": {
142
- "enum": [
143
- "none",
144
- "trim",
145
- "lowercase",
146
- "uppercase",
147
- "number",
148
- "boolean",
149
- "to_iso_date",
150
- "to_e164_phone",
151
- "split_full_name",
152
- "join",
153
- "map_values",
154
- "default",
155
- "units_to_cents",
156
- "cents_to_units",
157
- "from_unix_seconds",
158
- "to_unix_seconds"
159
- ]
160
- },
161
- "key": {
162
- "type": "string",
163
- "pattern": "^[a-z][a-zA-Z0-9]*$",
164
- "description": "Name of the identity key (email, phone). links.find { key: { phone } } looks records up by it."
165
- }
166
- }
167
- }
168
- },
169
- "onAmbiguous": {
170
- "enum": [
171
- "skip",
172
- "first",
173
- "create"
174
- ],
175
- "default": "skip"
176
- }
177
- }
178
- },
179
- "mapping": {
180
- "type": "array",
181
- "items": {
182
- "$ref": "#/$defs/mappingRow"
183
- }
184
- },
185
- "filter": {
186
- "type": "string",
187
- "description": "Only records matching this condition are synced ($.record)."
188
- },
189
- "backfill": {
190
- "type": "object",
191
- "properties": {
192
- "trigger": {
193
- "enum": [
194
- "userAction",
195
- "onInstall",
196
- "none"
197
- ]
198
- },
199
- "pageSize": {
200
- "type": "integer",
201
- "minimum": 1,
202
- "maximum": 500
203
- }
204
- }
205
- },
206
- "ongoing": {
207
- "type": "object",
208
- "required": [
209
- "mode"
210
- ],
211
- "properties": {
212
- "mode": {
213
- "enum": [
214
- "webhook",
215
- "poll",
216
- "none"
217
- ]
218
- },
219
- "every": {
220
- "type": "string",
221
- "pattern": "^\\d+\\s*(m|h|d)$",
222
- "description": "Poll interval (default 15m)."
223
- },
224
- "configurable": {
225
- "$ref": "#/$defs/scheduleConfigurable"
226
- }
227
- }
228
- },
229
- "default": {
230
- "enum": [
231
- "on",
232
- "off"
233
- ],
234
- "default": "on"
235
- },
236
- "args": {
237
- "type": "object",
238
- "description": "Extra arguments for every call to a side's module, by module key: { \"github\": { \"owner\": \"$.install.owner\", \"repo\": \"$.install.repo\" } }. Values read only $.install.",
239
- "additionalProperties": {
240
- "type": "object"
241
- }
242
- }
243
- }
244
- }
245
- },
246
- "links": {
247
- "type": "array",
248
- "description": "Link sets: records on two modules known to be the same thing, with no sync behind them. links.find / links.upsert take { link: <id> }.",
249
- "items": {
250
- "type": "object",
251
- "required": [
252
- "id",
253
- "between"
254
- ],
255
- "additionalProperties": false,
256
- "properties": {
257
- "id": {
258
- "type": "string",
259
- "pattern": "^[a-z][a-z0-9-]*$"
260
- },
261
- "label": {
262
- "type": "string"
263
- },
264
- "description": {
265
- "type": "string"
266
- },
267
- "between": {
268
- "type": "array",
269
- "minItems": 2,
270
- "maxItems": 2,
271
- "items": {
272
- "type": "string",
273
- "pattern": "^[a-zA-Z]\\w*\\.[a-zA-Z]\\w*$"
274
- },
275
- "description": "Two <moduleKey>.<object> on different modules."
276
- },
277
- "identity": {
278
- "type": "object",
279
- "required": [
280
- "match"
281
- ],
282
- "additionalProperties": false,
283
- "properties": {
284
- "match": {
285
- "type": "array",
286
- "items": {
287
- "type": "object",
288
- "required": [
289
- "key"
290
- ],
291
- "additionalProperties": false,
292
- "properties": {
293
- "key": {
294
- "type": "string",
295
- "pattern": "^[a-z][a-zA-Z0-9]*$"
296
- },
297
- "transform": {
298
- "enum": [
299
- "none",
300
- "trim",
301
- "lowercase",
302
- "uppercase",
303
- "number",
304
- "boolean",
305
- "to_iso_date",
306
- "to_e164_phone",
307
- "split_full_name",
308
- "join",
309
- "map_values",
310
- "default",
311
- "units_to_cents",
312
- "cents_to_units",
313
- "from_unix_seconds",
314
- "to_unix_seconds"
315
- ]
316
- }
317
- }
318
- }
319
- }
320
- }
321
- }
322
- }
323
- }
324
- },
325
- "workflows": {
326
- "type": "array",
327
- "items": {
328
- "type": "object",
329
- "required": [
330
- "id",
331
- "label",
332
- "trigger",
333
- "steps"
334
- ],
335
- "additionalProperties": false,
336
- "properties": {
337
- "id": {
338
- "type": "string",
339
- "pattern": "^[a-z][a-z0-9-]*$"
340
- },
341
- "label": {
342
- "type": "string"
343
- },
344
- "description": {
345
- "type": "string"
346
- },
347
- "purpose": {
348
- "enum": [
349
- "notify",
350
- "write",
351
- "enrich",
352
- "maintain",
353
- "respond"
354
- ],
355
- "description": "What the workflow is for. Shown in the UI; not executed."
356
- },
357
- "default": {
358
- "enum": [
359
- "on",
360
- "off"
361
- ],
362
- "default": "on"
363
- },
364
- "settings": {
365
- "type": "object",
366
- "additionalProperties": {
367
- "$ref": "#/$defs/setting"
368
- }
369
- },
370
- "trigger": {
371
- "$ref": "#/$defs/trigger"
372
- },
373
- "steps": {
374
- "type": "array",
375
- "minItems": 1,
376
- "items": {
377
- "$ref": "#/$defs/step"
378
- }
379
- },
380
- "retry": {
381
- "type": "object",
382
- "properties": {
383
- "max": {
384
- "type": "integer",
385
- "minimum": 0,
386
- "maximum": 10
387
- },
388
- "backoff": {
389
- "enum": [
390
- "fixed",
391
- "exponential"
392
- ]
393
- }
394
- }
395
- }
396
- }
397
- }
398
- },
399
- "queries": {
400
- "type": "array",
401
- "items": {
402
- "type": "object",
403
- "required": [
404
- "id",
405
- "steps",
406
- "returns"
407
- ],
408
- "additionalProperties": false,
409
- "properties": {
410
- "id": {
411
- "type": "string",
412
- "pattern": "^[a-z][a-z0-9-]*$"
413
- },
414
- "description": {
415
- "type": "string"
416
- },
417
- "steps": {
418
- "type": "array",
419
- "items": {
420
- "$ref": "#/$defs/step"
421
- }
422
- },
423
- "returns": {
424
- "description": "Expression for the query result."
425
- }
426
- }
427
- }
428
- },
429
- "ui": {
430
- "type": "array",
431
- "items": {
432
- "type": "object",
433
- "required": [
434
- "id",
435
- "label",
436
- "host",
437
- "placement",
438
- "data",
439
- "view"
440
- ],
441
- "additionalProperties": false,
442
- "properties": {
443
- "id": {
444
- "type": "string",
445
- "pattern": "^[a-z][a-z0-9-]*$"
446
- },
447
- "label": {
448
- "type": "string"
449
- },
450
- "host": {
451
- "type": "string",
452
- "description": "Module key of the app that shows it."
453
- },
454
- "placement": {
455
- "type": "string",
456
- "description": "One of the host manifest's ui.placements."
457
- },
458
- "objects": {
459
- "type": "array",
460
- "items": {
461
- "type": "string"
462
- }
463
- },
464
- "data": {
465
- "type": "object",
466
- "required": [
467
- "query"
468
- ],
469
- "properties": {
470
- "query": {
471
- "type": "string"
472
- },
473
- "with": {
474
- "type": "object"
475
- }
476
- }
477
- },
478
- "view": {
479
- "$ref": "#/$defs/view"
480
- },
481
- "default": {
482
- "enum": [
483
- "on",
484
- "off"
485
- ],
486
- "default": "on"
487
- }
488
- }
489
- }
490
- },
491
- "templates": {
492
- "type": "object",
493
- "additionalProperties": {
494
- "type": "string"
495
- }
496
- },
497
- "lifecycle": {
498
- "type": "object",
499
- "additionalProperties": false,
500
- "properties": {
501
- "onInstall": {
502
- "type": "array",
503
- "items": {
504
- "$ref": "#/$defs/step"
505
- }
506
- },
507
- "onUninstall": {
508
- "type": "array",
509
- "items": {
510
- "$ref": "#/$defs/step"
511
- }
512
- }
513
- }
514
- }
515
- },
516
- "$defs": {
517
- "step": {
518
- "type": "object",
519
- "required": [
520
- "use"
521
- ],
522
- "additionalProperties": false,
523
- "properties": {
524
- "id": {
525
- "type": "string",
526
- "pattern": "^[a-zA-Z][\\w-]*$"
527
- },
528
- "use": {
529
- "type": "string",
530
- "description": "A built-in (links.find, links.upsert, map, merge, template, set, stop, foreach, branch, code, and the pausing steps delay and approval, which only a workflow's top level may use) or <moduleKey>.<object>.<verb> declared by that module's capability manifest."
531
- },
532
- "with": {
533
- "type": "object",
534
- "description": "Arguments. Values may be expressions."
535
- },
536
- "when": {
537
- "type": "string",
538
- "description": "Condition; the step is skipped when false."
539
- },
540
- "onError": {
541
- "enum": [
542
- "fail",
543
- "continue",
544
- "stop"
545
- ],
546
- "default": "fail"
547
- },
548
- "do": {
549
- "type": "array",
550
- "items": {
551
- "$ref": "#/$defs/step"
552
- },
553
- "description": "foreach: steps run per item."
554
- },
555
- "cases": {
556
- "type": "array",
557
- "items": {
558
- "type": "object",
559
- "required": [
560
- "when",
561
- "do"
562
- ],
563
- "properties": {
564
- "when": {
565
- "type": "string"
566
- },
567
- "do": {
568
- "type": "array",
569
- "items": {
570
- "$ref": "#/$defs/step"
571
- }
572
- }
573
- }
574
- }
575
- },
576
- "else": {
577
- "type": "array",
578
- "items": {
579
- "$ref": "#/$defs/step"
580
- }
581
- }
582
- }
583
- },
584
- "setting": {
585
- "type": "object",
586
- "required": [
587
- "type",
588
- "label"
589
- ],
590
- "additionalProperties": false,
591
- "properties": {
592
- "type": {
593
- "enum": [
594
- "string",
595
- "text",
596
- "number",
597
- "boolean",
598
- "enum",
599
- "option",
600
- "duration"
601
- ]
602
- },
603
- "label": {
604
- "type": "string"
605
- },
606
- "help": {
607
- "type": "string"
608
- },
609
- "required": {
610
- "type": "boolean"
611
- },
612
- "default": {},
613
- "enum": {
614
- "type": "array",
615
- "items": {
616
- "type": "string"
617
- }
618
- },
619
- "options": {
620
- "description": "option settings: \"<moduleKey>.<list>\" from the module manifest, or { source, with } when the list takes inputs read from other settings ($.settings.workspace; a workflow setting may also read $.install.<integration setting>).",
621
- "oneOf": [
622
- {
623
- "type": "string",
624
- "pattern": "^[a-zA-Z]\\w*\\.[a-zA-Z]\\w*$"
625
- },
626
- {
627
- "type": "object",
628
- "required": [
629
- "source"
630
- ],
631
- "additionalProperties": false,
632
- "properties": {
633
- "source": {
634
- "type": "string",
635
- "pattern": "^[a-zA-Z]\\w*\\.[a-zA-Z]\\w*$"
636
- },
637
- "with": {
638
- "type": "object",
639
- "additionalProperties": {
640
- "type": "string"
641
- }
642
- }
643
- }
644
- }
645
- ]
646
- }
647
- }
648
- },
649
- "trigger": {
650
- "oneOf": [
651
- {
652
- "type": "object",
653
- "required": [
654
- "type",
655
- "module",
656
- "topic"
657
- ],
658
- "additionalProperties": false,
659
- "properties": {
660
- "type": {
661
- "const": "webhook"
662
- },
663
- "module": {
664
- "type": "string"
665
- },
666
- "topic": {
667
- "type": "string"
668
- },
669
- "filter": {
670
- "type": "string"
671
- }
672
- }
673
- },
674
- {
675
- "type": "object",
676
- "required": [
677
- "type"
678
- ],
679
- "additionalProperties": false,
680
- "properties": {
681
- "type": {
682
- "const": "schedule"
683
- },
684
- "cron": {
685
- "type": "string",
686
- "description": "Five-field cron (minute hour day-of-month month day-of-week). Restrict day of month or day of week, not both."
687
- },
688
- "timezone": {
689
- "type": "string",
690
- "description": "IANA time zone for cron (default UTC)."
691
- },
692
- "every": {
693
- "type": "string",
694
- "pattern": "^\\d+\\s*(m|h|d)$",
695
- "description": "Fixed interval (15m, 2h, 1d). Give cron or every."
696
- },
697
- "configurable": {
698
- "$ref": "#/$defs/scheduleConfigurable"
699
- }
700
- },
701
- "oneOf": [
702
- {
703
- "required": [
704
- "cron"
705
- ],
706
- "not": {
707
- "required": [
708
- "every"
709
- ]
710
- }
711
- },
712
- {
713
- "required": [
714
- "every"
715
- ],
716
- "not": {
717
- "required": [
718
- "cron"
719
- ]
720
- }
721
- }
722
- ]
723
- },
724
- {
725
- "type": "object",
726
- "required": [
727
- "type",
728
- "label"
729
- ],
730
- "additionalProperties": false,
731
- "properties": {
732
- "type": {
733
- "const": "userAction"
734
- },
735
- "label": {
736
- "type": "string"
737
- },
738
- "from": {
739
- "type": "string",
740
- "description": "A UI surface id when the action is a button on that surface."
741
- }
742
- }
743
- },
744
- {
745
- "type": "object",
746
- "required": [
747
- "type",
748
- "sync",
749
- "on"
750
- ],
751
- "additionalProperties": false,
752
- "properties": {
753
- "type": {
754
- "const": "syncRecord"
755
- },
756
- "sync": {
757
- "type": "string"
758
- },
759
- "on": {
760
- "type": "array",
761
- "items": {
762
- "enum": [
763
- "created",
764
- "updated",
765
- "linked"
766
- ]
767
- }
768
- },
769
- "filter": {
770
- "type": "string"
771
- }
772
- }
773
- }
774
- ]
775
- },
776
- "view": {
777
- "type": "object",
778
- "required": [
779
- "component"
780
- ],
781
- "additionalProperties": false,
782
- "properties": {
783
- "component": {
784
- "enum": [
785
- "Stack",
786
- "Heading",
787
- "Text",
788
- "KeyValue",
789
- "List",
790
- "Table",
791
- "Badge",
792
- "Button",
793
- "Empty",
794
- "Divider"
795
- ]
796
- },
797
- "props": {
798
- "type": "object"
799
- },
800
- "children": {
801
- "type": "array",
802
- "items": {
803
- "$ref": "#/$defs/view"
804
- }
805
- },
806
- "when": {
807
- "type": "string"
808
- }
809
- }
810
- },
811
- "mappingRow": {
812
- "type": "object",
813
- "required": [
814
- "target"
815
- ],
816
- "additionalProperties": false,
817
- "properties": {
818
- "source": {
819
- "type": "string"
820
- },
821
- "target": {
822
- "type": "string"
823
- },
824
- "transform": {
825
- "enum": [
826
- "none",
827
- "trim",
828
- "lowercase",
829
- "uppercase",
830
- "number",
831
- "boolean",
832
- "to_iso_date",
833
- "to_e164_phone",
834
- "split_full_name",
835
- "join",
836
- "map_values",
837
- "default",
838
- "units_to_cents",
839
- "cents_to_units",
840
- "from_unix_seconds",
841
- "to_unix_seconds"
842
- ]
843
- },
844
- "options": {
845
- "type": "object"
846
- },
847
- "master": {
848
- "enum": [
849
- "source",
850
- "target",
851
- "newest"
852
- ],
853
- "default": "source"
854
- },
855
- "direction": {
856
- "enum": [
857
- "both",
858
- "to_target",
859
- "to_source"
860
- ],
861
- "default": "both"
862
- },
863
- "value": {
864
- "description": "A fixed value written to target instead of reading source (QuickBooks Line[0].DetailType)."
865
- }
866
- },
867
- "oneOf": [
868
- {
869
- "required": [
870
- "source"
871
- ],
872
- "not": {
873
- "required": [
874
- "value"
875
- ]
876
- }
877
- },
878
- {
879
- "required": [
880
- "value"
881
- ],
882
- "not": {
883
- "required": [
884
- "source"
885
- ]
886
- }
887
- }
888
- ]
889
- },
890
- "scheduleConfigurable": {
891
- "description": "Lets each installation choose its own timing. true: any valid timing. { min }: never more often than this (15m, 2h, 1d).",
892
- "oneOf": [
893
- {
894
- "type": "boolean"
895
- },
896
- {
897
- "type": "object",
898
- "additionalProperties": false,
899
- "properties": {
900
- "min": {
901
- "type": "string",
902
- "pattern": "^\\d+\\s*(m|h|d)$"
903
- }
904
- }
905
- }
906
- ]
907
- }
908
- }
909
- }