@celigo/api-specs 0.2.1

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 (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -0
  3. package/dist/account.yml +592 -0
  4. package/dist/agent.yml +908 -0
  5. package/dist/ai-agent.yml +5471 -0
  6. package/dist/api.yml +4140 -0
  7. package/dist/apim.yml +1286 -0
  8. package/dist/asynchelper.yml +3391 -0
  9. package/dist/audit.yml +2006 -0
  10. package/dist/connection.yml +8665 -0
  11. package/dist/connector.yml +1406 -0
  12. package/dist/ediprofile.yml +911 -0
  13. package/dist/editransaction.yml +1210 -0
  14. package/dist/enduser.yml +1724 -0
  15. package/dist/environment.yml +568 -0
  16. package/dist/eventreport.yml +692 -0
  17. package/dist/export.yml +17610 -0
  18. package/dist/filedefinition.yml +1396 -0
  19. package/dist/filestorage.yml +3102 -0
  20. package/dist/flow.yml +7928 -0
  21. package/dist/guardrail.yml +2763 -0
  22. package/dist/httpconnector.yml +2277 -0
  23. package/dist/httpconnectorendpoint.yml +722 -0
  24. package/dist/httpconnectorresource.yml +396 -0
  25. package/dist/iclient.yml +4452 -0
  26. package/dist/import.yml +15381 -0
  27. package/dist/integration.yml +4406 -0
  28. package/dist/job.yml +2014 -0
  29. package/dist/lookupcache.yml +1325 -0
  30. package/dist/marketplace.yml +685 -0
  31. package/dist/mcp-oauth-provider.yml +590 -0
  32. package/dist/mcp-server.yml +2656 -0
  33. package/dist/notification.yml +488 -0
  34. package/dist/processor.yml +1253 -0
  35. package/dist/profile.yml +455 -0
  36. package/dist/recyclebin.yml +768 -0
  37. package/dist/script.yml +1128 -0
  38. package/dist/stack.yml +1291 -0
  39. package/dist/state.yml +894 -0
  40. package/dist/subscription.yml +1405 -0
  41. package/dist/sync.yml +4857 -0
  42. package/dist/tag.yml +553 -0
  43. package/dist/template.yml +897 -0
  44. package/dist/tool.yml +33656 -0
  45. package/dist/tradingpartnerconnector.yml +1490 -0
  46. package/dist/user.yml +831 -0
  47. package/package.json +41 -0
  48. package/schemas.json +8420 -0
@@ -0,0 +1,1128 @@
1
+ openapi: 3.2.0
2
+ info:
3
+ version: 1.0.0
4
+ title: Scripts
5
+ description: Manage custom JavaScript scripts used as hooks and transformations in integrations.
6
+ x-celigo-ai-guidance:
7
+ - |-
8
+ API for managing scripts in Celigo.
9
+ Scripts allow users to write custom JavaScript code to extend the functionality of integrations.
10
+ They can be used as hooks, transformations,
11
+ or standalone functions within flows and other resources.
12
+ - |-
13
+ Scripts support the integrator-api module for accessing Celigo resources
14
+ programmatically and run in a secure isolated execution environment.
15
+ servers:
16
+ - url: https://api.integrator.io
17
+ description: Production (US / default region)
18
+ - url: https://api.eu.integrator.io
19
+ description: Production (EU region)
20
+ - url: https://api.au.integrator.io
21
+ description: Production (AU region)
22
+ - url: https://api.ca.integrator.io
23
+ description: Production (CA region)
24
+ security:
25
+ - bearerAuth: []
26
+ tags:
27
+ - name: Scripts
28
+ description: |-
29
+ Scripts are reusable JavaScript functions that extend integration behavior. Use them as hooks in flows, logic in APIs and tools, or prompts in AI agents.
30
+
31
+ ## Script schema
32
+
33
+ {% openapi-schemas spec="script" schemas="Script" grouped="true" %}
34
+ paths:
35
+ /v1/scripts:
36
+ get:
37
+ x-internal: false
38
+ summary: List scripts
39
+ description: Returns all scripts in the account. Response omits `content` to reduce payload size.
40
+ x-celigo-ai-guidance:
41
+ - Retrieves a list of all scripts in the system.
42
+ tags:
43
+ - Scripts
44
+ operationId: listScripts
45
+ parameters:
46
+ - name: limit
47
+ in: query
48
+ required: false
49
+ description: Maximum number of scripts to return per page.
50
+ schema:
51
+ type: integer
52
+ minimum: 1
53
+ maximum: 1000
54
+ default: 1000
55
+ examples:
56
+ - 100
57
+ - $ref: '#/components/parameters/Include'
58
+ - $ref: '#/components/parameters/Exclude'
59
+ responses:
60
+ '200':
61
+ description: Array of script objects.
62
+ x-celigo-ai-guidance:
63
+ - Successfully retrieved list of scripts
64
+ headers:
65
+ Link:
66
+ description: |-
67
+ RFC 5988 pagination links. Includes `<...>; rel="next"` when more
68
+ pages remain; absent on the final page.
69
+ schema:
70
+ type: string
71
+ content:
72
+ application/json:
73
+ schema:
74
+ type: array
75
+ items:
76
+ $ref: '#/components/schemas/Script'
77
+ examples:
78
+ default:
79
+ value:
80
+ - _id: 6356f24327114d57ab843e1f
81
+ name: Add Discounts
82
+ sandbox: false
83
+ postResponseHookToProcessOnChildRecord: false
84
+ createdAt: '2022-10-24T20:14:59.070Z'
85
+ lastModified: '2026-04-18T13:52:49.729Z'
86
+ - _id: 683e20e605d370cc2ec1798c
87
+ name: Order Transform
88
+ description: Transforms order data before import
89
+ sandbox: false
90
+ postResponseHookToProcessOnChildRecord: false
91
+ _sourceId: 6356f24327114d57ab843e1f
92
+ createdAt: '2025-06-02T22:08:38.739Z'
93
+ lastModified: '2025-06-02T22:08:38.819Z'
94
+ '204':
95
+ description: No scripts exist in the account.
96
+ '401':
97
+ $ref: '#/components/responses/401-unauthorized'
98
+ post:
99
+ x-internal: false
100
+ summary: Create a script
101
+ description: Creates a new script.
102
+ x-celigo-ai-guidance:
103
+ - Creates a new script in the system.
104
+ tags:
105
+ - Scripts
106
+ operationId: createScript
107
+ requestBody:
108
+ required: true
109
+ content:
110
+ application/json:
111
+ schema:
112
+ $ref: '#/components/schemas/Request'
113
+ examples:
114
+ minimal:
115
+ summary: Minimal script
116
+ value:
117
+ name: My Hook
118
+ content: |-
119
+ function preSavePage(options) {
120
+ return { data: options.data, errors: options.errors };
121
+ }
122
+ withDescription:
123
+ summary: Script with description
124
+ value:
125
+ name: Order Transform
126
+ description: Adds discount line items to each order
127
+ content: |-
128
+ function preSavePage(options) {
129
+ for (let d of options.data) {
130
+ d.discount = 0;
131
+ }
132
+ return { data: options.data, errors: options.errors };
133
+ }
134
+ description: Script object to create
135
+ responses:
136
+ '201':
137
+ description: Created script.
138
+ x-celigo-ai-guidance:
139
+ - Script created successfully
140
+ content:
141
+ application/json:
142
+ schema:
143
+ $ref: '#/components/schemas/Script'
144
+ examples:
145
+ created:
146
+ summary: Created script
147
+ value:
148
+ _id: 683e20e605d370cc2ec1798c
149
+ name: Order Transform
150
+ sandbox: false
151
+ postResponseHookToProcessOnChildRecord: false
152
+ createdAt: '2025-06-02T22:08:38.739Z'
153
+ lastModified: '2025-06-02T22:08:38.819Z'
154
+ '400':
155
+ $ref: '#/components/responses/400-bad-request'
156
+ '401':
157
+ $ref: '#/components/responses/401-unauthorized'
158
+ '422':
159
+ $ref: '#/components/responses/422-unprocessable-entity'
160
+ /v1/scripts/{_id}:
161
+ get:
162
+ x-internal: false
163
+ summary: Get a script
164
+ description: Returns a single script by ID, including the full `content` field.
165
+ tags:
166
+ - Scripts
167
+ operationId: getScriptById
168
+ parameters:
169
+ - name: _id
170
+ in: path
171
+ description: Script ID.
172
+ required: true
173
+ schema:
174
+ type: string
175
+ format: objectId
176
+ x-celigo-refModel: scripts
177
+ responses:
178
+ '200':
179
+ description: Script object.
180
+ content:
181
+ application/json:
182
+ schema:
183
+ $ref: '#/components/schemas/Script'
184
+ examples:
185
+ default:
186
+ value:
187
+ _id: 6356f24327114d57ab843e1f
188
+ name: Add Discounts
189
+ sandbox: false
190
+ postResponseHookToProcessOnChildRecord: false
191
+ content: |-
192
+ function preSavePage(options) {
193
+ return { data: options.data, errors: options.errors };
194
+ }
195
+ createdAt: '2022-10-24T20:14:59.070Z'
196
+ lastModified: '2026-04-18T13:52:49.729Z'
197
+ '401':
198
+ $ref: '#/components/responses/401-unauthorized'
199
+ '404':
200
+ $ref: '#/components/responses/404-not-found'
201
+ put:
202
+ x-internal: false
203
+ summary: Update a script
204
+ description: Replaces a script's mutable fields.
205
+ tags:
206
+ - Scripts
207
+ operationId: updateScript
208
+ parameters:
209
+ - name: _id
210
+ in: path
211
+ description: Script ID.
212
+ required: true
213
+ schema:
214
+ type: string
215
+ format: objectId
216
+ x-celigo-refModel: scripts
217
+ requestBody:
218
+ required: true
219
+ content:
220
+ application/json:
221
+ schema:
222
+ $ref: '#/components/schemas/Request'
223
+ examples:
224
+ default:
225
+ value:
226
+ name: Add Discounts v2
227
+ content: |-
228
+ function preSavePage(options) {
229
+ return { data: options.data, errors: options.errors };
230
+ }
231
+ responses:
232
+ '200':
233
+ description: Updated script.
234
+ content:
235
+ application/json:
236
+ schema:
237
+ $ref: '#/components/schemas/Script'
238
+ examples:
239
+ default:
240
+ summary: Renamed script
241
+ value:
242
+ _id: 6356f24327114d57ab843e1f
243
+ name: Add Discounts v2
244
+ sandbox: false
245
+ postResponseHookToProcessOnChildRecord: false
246
+ content: |-
247
+ function preSavePage(options) {
248
+ return { data: options.data, errors: options.errors };
249
+ }
250
+ createdAt: '2022-10-24T20:14:59.070Z'
251
+ lastModified: '2026-04-21T09:05:11.342Z'
252
+ '400':
253
+ $ref: '#/components/responses/400-bad-request'
254
+ '401':
255
+ $ref: '#/components/responses/401-unauthorized'
256
+ '404':
257
+ $ref: '#/components/responses/404-not-found'
258
+ patch:
259
+ x-internal: false
260
+ summary: Patch a script
261
+ description: |-
262
+ Partially updates a script using JSON Patch (RFC 6902). Only
263
+ `/debugUntil` is a supported path — all others are rejected with 422.
264
+ Supported operations: `replace`, `add`, `remove`. The value must be an
265
+ ISO-8601 timestamp no more than 1 hour in the future.
266
+ operationId: patchScript
267
+ tags:
268
+ - Scripts
269
+ parameters:
270
+ - name: _id
271
+ in: path
272
+ description: Script ID.
273
+ required: true
274
+ schema:
275
+ type: string
276
+ format: objectId
277
+ x-celigo-refModel: scripts
278
+ requestBody:
279
+ required: true
280
+ content:
281
+ application/json:
282
+ schema:
283
+ type: array
284
+ minItems: 1
285
+ items:
286
+ type: object
287
+ required:
288
+ - op
289
+ - path
290
+ properties:
291
+ op:
292
+ type: string
293
+ enum:
294
+ - replace
295
+ - add
296
+ - remove
297
+ x-enumDescriptions:
298
+ replace: Replaces the value at the specified path.
299
+ add: Sets the value at the specified path.
300
+ remove: Removes the value at the specified path.
301
+ description: The operation to perform.
302
+ path:
303
+ type: string
304
+ enum:
305
+ - /debugUntil
306
+ x-enumDescriptions:
307
+ /debugUntil: Debug logging expiry timestamp (ISO-8601, max 1 hour from now).
308
+ description: JSON Pointer to the field to patch.
309
+ value:
310
+ type: string
311
+ format: date-time
312
+ description: ISO-8601 timestamp. Required for `replace` and `add`, omit for `remove`.
313
+ examples:
314
+ - '2026-05-02T16:00:00.000Z'
315
+ examples:
316
+ enable_debug:
317
+ summary: Enable debug logging for 30 minutes
318
+ value:
319
+ - op: replace
320
+ path: /debugUntil
321
+ value: '2026-05-02T16:00:00.000Z'
322
+ disable_debug:
323
+ summary: Disable debug logging
324
+ value:
325
+ - op: remove
326
+ path: /debugUntil
327
+ responses:
328
+ '204':
329
+ description: Script patched.
330
+ '401':
331
+ $ref: '#/components/responses/401-unauthorized'
332
+ '404':
333
+ $ref: '#/components/responses/404-not-found'
334
+ '422':
335
+ $ref: '#/components/responses/422-unprocessable-entity'
336
+ delete:
337
+ x-internal: false
338
+ summary: Delete a script
339
+ description: Deletes a script. Soft-deleted and retained in the recycle bin for 30 days.
340
+ tags:
341
+ - Scripts
342
+ operationId: deleteScript
343
+ parameters:
344
+ - name: _id
345
+ in: path
346
+ description: Script ID.
347
+ required: true
348
+ schema:
349
+ type: string
350
+ format: objectId
351
+ x-celigo-refModel: scripts
352
+ responses:
353
+ '204':
354
+ description: Script deleted.
355
+ '401':
356
+ $ref: '#/components/responses/401-unauthorized'
357
+ '404':
358
+ $ref: '#/components/responses/404-not-found'
359
+ '422':
360
+ $ref: '#/components/responses/422-dependency-conflict'
361
+ /v1/scripts/{_id}/logs:
362
+ get:
363
+ x-internal: false
364
+ summary: Get debug logs for a script
365
+ description: |-
366
+ Returns console output captured while debug is enabled on the script
367
+ (`debugUntil` set to a future timestamp).
368
+ tags:
369
+ - Scripts
370
+ operationId: getScriptLogs
371
+ parameters:
372
+ - name: _id
373
+ in: path
374
+ description: Script ID.
375
+ required: true
376
+ schema:
377
+ type: string
378
+ format: objectId
379
+ x-celigo-refModel: scripts
380
+ responses:
381
+ '200':
382
+ description: Log entries for the script.
383
+ content:
384
+ application/json:
385
+ schema:
386
+ type: object
387
+ properties:
388
+ logs:
389
+ type: array
390
+ description: Debug log entries. Empty array when no logs exist or debug is not enabled.
391
+ items:
392
+ type: object
393
+ properties:
394
+ time:
395
+ type: string
396
+ description: Timestamp when the log was captured.
397
+ examples:
398
+ - '2026-05-22 01:24:38.697'
399
+ functionType:
400
+ type: string
401
+ description: Hook type that produced the log.
402
+ examples:
403
+ - preSavePage
404
+ _resourceId:
405
+ type: string
406
+ format: objectId
407
+ description: ID of the export or import the script was running on.
408
+ examples:
409
+ - 6843b67b35b64c0bcba2fd69
410
+ logLevel:
411
+ type: string
412
+ description: Severity level of the log entry.
413
+ enum:
414
+ - INFO
415
+ - WARN
416
+ - ERROR
417
+ x-enumDescriptions:
418
+ INFO: Output from `console.log()`.
419
+ WARN: Output from `console.warn()`.
420
+ ERROR: Output from `console.error()`.
421
+ message:
422
+ type: string
423
+ description: Log message content.
424
+ examples:
425
+ - test log message from preSavePage
426
+ examples:
427
+ withLogs:
428
+ summary: Script with debug logs
429
+ value:
430
+ logs:
431
+ - time: '2026-05-22 01:24:38.697'
432
+ functionType: preSavePage
433
+ _resourceId: 6843b67b35b64c0bcba2fd69
434
+ logLevel: WARN
435
+ message: test warning from preSavePage
436
+ - time: '2026-05-22 01:24:38.697'
437
+ functionType: preSavePage
438
+ _resourceId: 6843b67b35b64c0bcba2fd69
439
+ logLevel: INFO
440
+ message: test log message from preSavePage
441
+ empty:
442
+ summary: No logs
443
+ value:
444
+ logs: []
445
+ '401':
446
+ $ref: '#/components/responses/401-unauthorized'
447
+ '404':
448
+ $ref: '#/components/responses/404-not-found'
449
+ delete:
450
+ x-internal: false
451
+ operationId: deleteScriptLogs
452
+ tags:
453
+ - Scripts
454
+ summary: Delete debug logs for a script
455
+ description: |-
456
+ Deletes all debug logs for the specified script. Synchronous and
457
+ idempotent — works even if the script has no logs.
458
+ parameters:
459
+ - name: _id
460
+ in: path
461
+ description: Script ID.
462
+ required: true
463
+ schema:
464
+ type: string
465
+ format: objectId
466
+ x-celigo-refModel: scripts
467
+ responses:
468
+ '204':
469
+ description: Logs deleted.
470
+ '401':
471
+ $ref: '#/components/responses/401-unauthorized'
472
+ '404':
473
+ $ref: '#/components/responses/404-not-found'
474
+ /v1/scripts/{_id}/audit:
475
+ get:
476
+ x-internal: false
477
+ summary: Get audit log for a script
478
+ description: |-
479
+ Returns the change history for a script. Each entry records a mutation
480
+ event with who made the change, when, and which fields were affected.
481
+ tags:
482
+ - Scripts
483
+ operationId: getScriptAudit
484
+ parameters:
485
+ - name: _id
486
+ in: path
487
+ description: Script ID.
488
+ required: true
489
+ schema:
490
+ type: string
491
+ format: objectId
492
+ x-celigo-refModel: scripts
493
+ examples:
494
+ - 6356f24327114d57ab843e1f
495
+ - name: limit
496
+ in: query
497
+ description: Maximum number of audit entries to return per page.
498
+ required: false
499
+ schema:
500
+ type: integer
501
+ minimum: 1
502
+ maximum: 1000
503
+ default: 1000
504
+ examples:
505
+ - 100
506
+ - name: after
507
+ in: query
508
+ required: false
509
+ description: |-
510
+ Opaque pagination cursor for the next page. Take it from the `after` value in the `Link`
511
+ response header's `rel="next"` URL rather than constructing it.
512
+ schema:
513
+ type: string
514
+ examples:
515
+ - W3siJGRhdGUiOiIyMDI2LTA1LTAxVDAwOjAwOjAwLjAwMFoifSwiNjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwIl0
516
+ - name: from
517
+ in: query
518
+ required: false
519
+ description: Only return entries at or after this timestamp.
520
+ schema:
521
+ type: string
522
+ format: date-time
523
+ examples:
524
+ - '2026-05-01T00:00:00.000Z'
525
+ - name: to
526
+ in: query
527
+ required: false
528
+ description: Only return entries at or before this timestamp.
529
+ schema:
530
+ type: string
531
+ format: date-time
532
+ examples:
533
+ - '2026-05-31T23:59:59.999Z'
534
+ - name: action
535
+ in: query
536
+ required: false
537
+ description: Filter by the change type. Maps to the `event` field on each entry.
538
+ schema:
539
+ type: string
540
+ enum:
541
+ - create
542
+ - update
543
+ - delete
544
+ - view
545
+ - restore
546
+ - purge
547
+ - signin
548
+ - signout
549
+ - purgelogs
550
+ examples:
551
+ - update
552
+ x-enumDescriptions:
553
+ create: A resource was created.
554
+ update: A resource was modified.
555
+ delete: A resource was deleted (moved to recycle bin).
556
+ view: A resource was viewed or accessed.
557
+ restore: A resource was restored from the recycle bin.
558
+ purge: A resource was permanently purged from the recycle bin.
559
+ signin: A user signed in to the account.
560
+ signout: A user signed out of the account.
561
+ purgelogs: Execution logs were purged for a resource.
562
+ - name: source
563
+ in: query
564
+ required: false
565
+ description: Filter by how the change was initiated.
566
+ schema:
567
+ type: string
568
+ enum:
569
+ - ui
570
+ - api
571
+ - system
572
+ - connector
573
+ - script
574
+ - sso
575
+ examples:
576
+ - ui
577
+ x-enumDescriptions:
578
+ ui: Change made through the Celigo web UI.
579
+ api: Change made via the REST API.
580
+ system: Change made automatically by the platform.
581
+ connector: Change made by an Integration App (connector) process.
582
+ script: Change made by a custom script execution.
583
+ sso: Change triggered by an SSO authentication event.
584
+ - name: _byUserId
585
+ in: query
586
+ required: false
587
+ description: Filter to changes performed by a single user.
588
+ schema:
589
+ type: string
590
+ format: objectId
591
+ x-celigo-refModel: users
592
+ examples:
593
+ - 624cb0346309dc3a543733a2
594
+ responses:
595
+ '200':
596
+ description: Array of audit entries, newest first.
597
+ headers:
598
+ Link:
599
+ description: |-
600
+ RFC 5988 pagination link. Includes `<...>; rel="next"` with an
601
+ `after` cursor when more entries exist; absent on the final page.
602
+ schema:
603
+ type: string
604
+ content:
605
+ application/json:
606
+ schema:
607
+ type: array
608
+ items:
609
+ type: object
610
+ properties:
611
+ _id:
612
+ type: string
613
+ format: objectId
614
+ description: Unique identifier for this audit entry.
615
+ examples:
616
+ - 69e38cb1a749d34a9732a270
617
+ resourceType:
618
+ type: string
619
+ description: Always `script` for this endpoint.
620
+ _resourceId:
621
+ type: string
622
+ format: objectId
623
+ x-celigo-refModel: scripts
624
+ description: ID of the script this entry belongs to.
625
+ examples:
626
+ - 6356f24327114d57ab843e1f
627
+ event:
628
+ type: string
629
+ description: Type of change that occurred.
630
+ enum:
631
+ - create
632
+ - update
633
+ - delete
634
+ - purge
635
+ - restore
636
+ x-enumDescriptions:
637
+ create: Script was created.
638
+ update: Script was modified.
639
+ delete: Script was soft-deleted (moved to recycle bin).
640
+ purge: Script was permanently purged from the recycle bin.
641
+ restore: Script was restored from the recycle bin.
642
+ source:
643
+ type: string
644
+ description: How the change was initiated.
645
+ enum:
646
+ - api
647
+ - ui
648
+ - system
649
+ x-enumDescriptions:
650
+ api: Change made via the REST API.
651
+ ui: Change made through the Celigo UI.
652
+ system: Change made by an automated platform process.
653
+ time:
654
+ type: string
655
+ format: date-time
656
+ description: When the change occurred.
657
+ examples:
658
+ - '2026-04-18T13:52:49.729Z'
659
+ byUser:
660
+ type: object
661
+ description: User who made the change.
662
+ properties:
663
+ _id:
664
+ type: string
665
+ format: objectId
666
+ x-celigo-refModel: users
667
+ description: User ID.
668
+ examples:
669
+ - 624cb0346309dc3a543733a2
670
+ email:
671
+ type: string
672
+ format: email
673
+ description: User email address.
674
+ examples:
675
+ - user@example.com
676
+ name:
677
+ type: string
678
+ description: User display name.
679
+ examples:
680
+ - Tyler Lamparter
681
+ fieldChanges:
682
+ type: array
683
+ description: Fields that were modified.
684
+ items:
685
+ type: object
686
+ properties:
687
+ fieldPath:
688
+ type: string
689
+ description: Dot-notation path of the changed field.
690
+ examples:
691
+ - debugUntil
692
+ oldValue:
693
+ description: Previous value (absent on create).
694
+ newValue:
695
+ description: New value (absent on delete).
696
+ deletedInfo:
697
+ type: object
698
+ description: Metadata about the deleted resource. Present on `delete` events.
699
+ properties:
700
+ name:
701
+ type: string
702
+ description: Name of the resource at the time of deletion.
703
+ examples:
704
+ - Add Discounts
705
+ examples:
706
+ default:
707
+ value:
708
+ - _id: 69e38cb1a749d34a9732a270
709
+ resourceType: script
710
+ _resourceId: 6356f24327114d57ab843e1f
711
+ source: api
712
+ event: update
713
+ time: '2026-04-18T13:52:49.729Z'
714
+ byUser:
715
+ _id: 624cb0346309dc3a543733a2
716
+ email: user@example.com
717
+ name: Tyler Lamparter
718
+ fieldChanges:
719
+ - fieldPath: debugUntil
720
+ oldValue: '2026-04-18T14:52:43.041Z'
721
+ '204':
722
+ description: No audit entries exist for this script.
723
+ '400':
724
+ $ref: '#/components/responses/400-bad-request'
725
+ '401':
726
+ $ref: '#/components/responses/401-unauthorized'
727
+ '404':
728
+ $ref: '#/components/responses/404-not-found'
729
+ '422':
730
+ $ref: '#/components/responses/422-unprocessable-entity'
731
+ /v1/scripts/{_id}/dependencies:
732
+ get:
733
+ x-internal: false
734
+ operationId: listScriptDependencies
735
+ tags:
736
+ - Scripts
737
+ summary: List dependencies of a script
738
+ description: Returns the set of resources that depend on the specified script.
739
+ parameters:
740
+ - name: _id
741
+ in: path
742
+ required: true
743
+ description: Script ID.
744
+ schema:
745
+ type: string
746
+ format: objectId
747
+ x-celigo-refModel: scripts
748
+ responses:
749
+ '200':
750
+ description: |
751
+ Dependency map. Keys are resource-type strings; values are arrays
752
+ of dependency entries. Returns `{}` when no dependents exist.
753
+ content:
754
+ application/json:
755
+ schema:
756
+ $ref: '#/components/schemas/DependencyResponse'
757
+ examples:
758
+ none:
759
+ summary: No dependents (also returned for a nonexistent ID)
760
+ value: {}
761
+ '401':
762
+ $ref: '#/components/responses/401-unauthorized'
763
+ components:
764
+ securitySchemes:
765
+ bearerAuth:
766
+ type: http
767
+ scheme: bearer
768
+ parameters:
769
+ Include:
770
+ name: include
771
+ in: query
772
+ required: false
773
+ description: |-
774
+ Comma-separated list of fields to project into each returned record.
775
+ Triggers summary projection: the response contains a minimal identity
776
+ set (`_id`, `name`, plus resource-specific fields) with the requested
777
+ fields added on top. Supports dot notation for nested fields.
778
+ Mutually exclusive with `exclude`.
779
+ schema:
780
+ type: string
781
+ example: _integrationId,disabled,lastModified
782
+ Exclude:
783
+ name: exclude
784
+ in: query
785
+ required: false
786
+ description: |-
787
+ Comma-separated list of fields to strip from the default response.
788
+ Unlike `include`, does not trigger summary projection — returns the
789
+ full record with the named fields removed. Protected identity fields
790
+ (e.g. `name`) cannot be stripped. Mutually exclusive with `include`.
791
+ schema:
792
+ type: string
793
+ example: createdAt,lastModified
794
+ schemas:
795
+ Script:
796
+ type: object
797
+ description: Script resource as returned by the API.
798
+ required:
799
+ - _id
800
+ - name
801
+ - createdAt
802
+ - lastModified
803
+ properties:
804
+ _id:
805
+ type: string
806
+ format: objectId
807
+ readOnly: true
808
+ description: Unique identifier for the script.
809
+ examples:
810
+ - 6356f24327114d57ab843e1f
811
+ name:
812
+ type: string
813
+ maxLength: 100
814
+ description: Display name for the script.
815
+ examples:
816
+ - Order Transform Hook
817
+ description:
818
+ type: string
819
+ maxLength: 1024
820
+ description: Free-text explanation of what the script does.
821
+ examples:
822
+ - Adds discount line items to each order before import
823
+ content:
824
+ type: string
825
+ description: |-
826
+ JavaScript source code. Only returned on GET-by-ID, omitted from
827
+ list responses to reduce payload size.
828
+ examples:
829
+ - |-
830
+ function preSavePage(options) {
831
+ return { data: options.data, errors: options.errors };
832
+ }
833
+ postResponseHookToProcessOnChildRecord:
834
+ type: boolean
835
+ default: false
836
+ description: When true, postResponseMap hooks run once per child record in a one-to-many mapping instead of once per parent.
837
+ debugUntil:
838
+ type: string
839
+ format: date-time
840
+ readOnly: true
841
+ description: |-
842
+ Debug logging is active until this timestamp. Absent or in the past
843
+ means debug is off. Can only be set via PATCH — ignored on POST and PUT.
844
+ Maximum 1 hour from the current time.
845
+ examples:
846
+ - '2026-05-22T03:30:00.000Z'
847
+ _sourceId:
848
+ type: string
849
+ format: objectId
850
+ readOnly: true
851
+ x-celigo-refModel: scripts
852
+ description: Source script this was cloned from. Present only on scripts created by cloning.
853
+ examples:
854
+ - 6356f24327114d57ab843e1f
855
+ _templateId:
856
+ type: string
857
+ format: objectId
858
+ readOnly: true
859
+ x-celigo-refModel: templates
860
+ description: The template (`templates` resource) this script was generated from. Present only on scripts created from a template; omitted otherwise.
861
+ examples:
862
+ - 64a1b2c3d4e5f6a7b8c9d0e1
863
+ createdAt:
864
+ type: string
865
+ format: date-time
866
+ readOnly: true
867
+ description: Timestamp when the script was created.
868
+ examples:
869
+ - '2022-10-24T20:14:59.070Z'
870
+ lastModified:
871
+ type: string
872
+ format: date-time
873
+ readOnly: true
874
+ description: Timestamp when the script was last updated.
875
+ examples:
876
+ - '2026-04-18T13:52:49.729Z'
877
+ Request:
878
+ type: object
879
+ description: Fields for creating or updating a script.
880
+ x-celigo-ai-guidance:
881
+ - Fields that can be sent when creating or updating a script
882
+ required:
883
+ - name
884
+ properties:
885
+ name:
886
+ type: string
887
+ minLength: 1
888
+ maxLength: 100
889
+ description: Display name for the script.
890
+ examples:
891
+ - Order Transform Hook
892
+ description:
893
+ type: string
894
+ maxLength: 1024
895
+ description: Free-text explanation of what the script does.
896
+ examples:
897
+ - Adds discount line items to each order before import
898
+ content:
899
+ type: string
900
+ description: |-
901
+ JavaScript source code. Optional on create — the server initializes
902
+ omitted content to an empty string. Omitting it on update leaves the
903
+ stored source unchanged (it is not cleared).
904
+ x-celigo-ai-guidance:
905
+ - JavaScript source code content of the script.
906
+ - Optional. Omitted on create = empty script; omitted on update = existing content preserved.
907
+ examples:
908
+ - |-
909
+ function preSavePage(options) {
910
+ return { data: options.data, errors: options.errors };
911
+ }
912
+ postResponseHookToProcessOnChildRecord:
913
+ type: boolean
914
+ default: false
915
+ description: When true, postResponseMap hooks run once per child record in a one-to-many mapping instead of once per parent.
916
+ x-celigo-ai-guidance:
917
+ - Whether to process hooks on child records.
918
+ _templateId:
919
+ type: string
920
+ format: objectId
921
+ x-celigo-refModel: templates
922
+ description: Optional template identifier used to generate or structure script content.
923
+ Error:
924
+ type: object
925
+ description: Standard error response envelope returned by integrator.io APIs.
926
+ properties:
927
+ errors:
928
+ type: array
929
+ description: List of errors that occurred while processing the request.
930
+ items:
931
+ type: object
932
+ properties:
933
+ code:
934
+ oneOf:
935
+ - type: string
936
+ - type: integer
937
+ description: |-
938
+ Machine-readable error code. Usually a string like
939
+ `invalid_ref`, `missing_required_field`, or `unauthorized`;
940
+ may be an **integer** when the error mirrors an upstream HTTP
941
+ status (e.g. `500`) — most commonly returned by connection-ping
942
+ and adaptor-proxy responses.
943
+ message:
944
+ type: string
945
+ description: Human-readable description of the error.
946
+ field:
947
+ type: string
948
+ description: |-
949
+ Optional pointer to the document field that caused the error.
950
+ Used by structural validation errors (`missing_required_field`,
951
+ `invalid_ref`) to indicate which field is at fault
952
+ (e.g. `_id`, `type`, `http.baseURI`).
953
+ source:
954
+ type: string
955
+ description: |-
956
+ Optional origin layer for the error — e.g. `application` when
957
+ the error came from the remote system the adaptor called,
958
+ `connector` when the adaptor itself rejected the request.
959
+ required:
960
+ - message
961
+ required:
962
+ - errors
963
+ DependencyEntry:
964
+ type: object
965
+ description: A single resource that depends on the queried resource.
966
+ properties:
967
+ id:
968
+ type: string
969
+ description: Unique identifier of the dependent resource.
970
+ examples:
971
+ - 61f92026dd053843b5d72350
972
+ name:
973
+ type: string
974
+ description: Display name of the dependent resource.
975
+ examples:
976
+ - Import Orders to NetSuite
977
+ paths:
978
+ type: array
979
+ description: |-
980
+ Dot-notation paths within the dependent resource that reference
981
+ the target resource. `[*]` denotes array elements.
982
+ items:
983
+ type: string
984
+ examples:
985
+ - - hooks.preSavePage._scriptId
986
+ accessLevel:
987
+ type: string
988
+ description: The caller's access level on the dependent resource.
989
+ examples:
990
+ - manage
991
+ dependencyIds:
992
+ type: object
993
+ description: |-
994
+ Map of resource types to arrays of IDs that this dependent
995
+ resource references on the target. Keys are singular or plural
996
+ resource type strings; values are arrays of ID strings.
997
+ additionalProperties:
998
+ type: array
999
+ items:
1000
+ type: string
1001
+ example:
1002
+ script:
1003
+ - 64ff4b21612a134bd2f45531
1004
+ required:
1005
+ - id
1006
+ - name
1007
+ - paths
1008
+ - accessLevel
1009
+ - dependencyIds
1010
+ DependencyResponse:
1011
+ type: object
1012
+ description: |
1013
+ Map of dependent-resource types to arrays of dependency entries.
1014
+ Keys are plural resource type strings (e.g. `flows`, `imports`,
1015
+ `connections`). An empty object `{}` means no dependents.
1016
+ additionalProperties:
1017
+ type: array
1018
+ items:
1019
+ $ref: '#/components/schemas/DependencyEntry'
1020
+ example:
1021
+ exports:
1022
+ - id: 64ff4b21612a134bd2f45534
1023
+ name: Bank FTP Export
1024
+ paths:
1025
+ - hooks.preSavePage._scriptId
1026
+ accessLevel: manage
1027
+ dependencyIds:
1028
+ script:
1029
+ - 64ff4b21612a134bd2f45531
1030
+ flows:
1031
+ - id: 64ff4b22612a134bd2f45538
1032
+ name: CAMT-053 to Celigo CAM Format
1033
+ paths:
1034
+ - pageGenerators[*]._exportId
1035
+ accessLevel: manage
1036
+ dependencyIds:
1037
+ export:
1038
+ - 64ff4b21612a134bd2f45534
1039
+ responses:
1040
+ 401-unauthorized:
1041
+ description: |-
1042
+ Unauthorized. The request lacks a valid bearer token, or the provided token
1043
+ failed to authenticate.
1044
+
1045
+ Note: the 401 response is produced by the auth middleware **before** the
1046
+ request reaches the endpoint handler, so it does **not** follow the
1047
+ standard `{errors: [...]}` envelope. Instead the body is a bare
1048
+ `{message: string}` object with no `code`, no `errors` array. Callers
1049
+ handling 401s should key off the HTTP status and the `message` string,
1050
+ not try to destructure an `errors[]`.
1051
+ content:
1052
+ application/json:
1053
+ schema:
1054
+ type: object
1055
+ properties:
1056
+ message:
1057
+ type: string
1058
+ description: |-
1059
+ Human-readable description of the auth failure. Known values:
1060
+ - `"Unauthorized"` — no `Authorization` header on the request.
1061
+ - `"Bearer Authentication Failed"` — header present but token
1062
+ is invalid, revoked, or expired.
1063
+ required:
1064
+ - message
1065
+ examples:
1066
+ missing_token:
1067
+ summary: No Authorization header sent
1068
+ value:
1069
+ message: Unauthorized
1070
+ invalid_token:
1071
+ summary: Bearer token invalid or revoked
1072
+ value:
1073
+ message: Bearer Authentication Failed
1074
+ 400-bad-request:
1075
+ description: |
1076
+ Bad request. The server could not understand the request because of malformed syntax or invalid parameters.
1077
+ content:
1078
+ application/json:
1079
+ schema:
1080
+ $ref: '#/components/schemas/Error'
1081
+ examples:
1082
+ default:
1083
+ value:
1084
+ errors:
1085
+ - code: invalid_request
1086
+ message: The request body failed validation.
1087
+ 422-unprocessable-entity:
1088
+ description: |
1089
+ Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.
1090
+ content:
1091
+ application/json:
1092
+ schema:
1093
+ $ref: '#/components/schemas/Error'
1094
+ examples:
1095
+ default:
1096
+ value:
1097
+ errors:
1098
+ - code: unprocessable_entity
1099
+ message: The request could not be processed due to a semantic error.
1100
+ 404-not-found:
1101
+ description: |
1102
+ Not found. The requested resource does not exist or is not visible to the caller.
1103
+ content:
1104
+ application/json:
1105
+ schema:
1106
+ $ref: '#/components/schemas/Error'
1107
+ examples:
1108
+ default:
1109
+ value:
1110
+ errors:
1111
+ - code: not_found
1112
+ message: The requested resource was not found.
1113
+ 422-dependency-conflict:
1114
+ description: |-
1115
+ The resource has dependents that must be deleted first. Each entry
1116
+ in the `errors` array names one blocking resource.
1117
+ content:
1118
+ application/json:
1119
+ schema:
1120
+ $ref: '#/components/schemas/Error'
1121
+ examples:
1122
+ default:
1123
+ value:
1124
+ errors:
1125
+ - code: dependencies_not_deleted
1126
+ message: export 6902d88c10b42b2eaac9b2a1 must be deleted before you can delete connection 6398ddf316be761fb16a6523
1127
+ x-enable-proxy: true
1128
+ x-internal: false