@celigo/api-specs 0.2.138 → 0.2.140

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.
package/dist/api.yml CHANGED
@@ -45,7 +45,7 @@ tags:
45
45
  - **Builder** — visual configuration with request/response mapping, routing, and transformations
46
46
  - **Script** — custom JavaScript handler function for full control
47
47
 
48
- Each API gets a public URL: `https://api.integrator.io/apis/{version}/{relativeURI}`
48
+ Each API gets a public URL: `https://api.integrator.io/apis/{version}{relativeURI}`
49
49
 
50
50
  ## API schema
51
51
 
@@ -616,7 +616,9 @@ paths:
616
616
  Useful for bootstrapping `bodySchema` in builder-mode APIs from real payload samples.
617
617
  Input must be a non-empty JSON object -- arrays and primitives are rejected.
618
618
  The generated schema is shallow (one level of `properties`); nested objects become
619
- `type: "object"` without further property inference.
619
+ `type: "object"` without further property inference. Fill in or remove those nodes
620
+ before saving the result as a `bodySchema`: the API Builder editor can't render an
621
+ object node that has no properties.
620
622
  requestBody:
621
623
  required: true
622
624
  content:
@@ -1686,6 +1688,10 @@ paths:
1686
1688
 
1687
1689
  Test-run invocations do **not** surface in `GET /v1/apis/{_id}/logs`.
1688
1690
 
1691
+ A test run is not free of outside calls: lookups call their sources live. Imports never
1692
+ send; each returns its saved `mockResponse`, or a placeholder response when none is saved
1693
+ (see `mockResponse` on imports).
1694
+
1689
1695
  Test runs never paginate, whatever `pagination.enabled` says: the captured success
1690
1696
  response carries no `pagination` object, and a `Celigo-Next-Cursor` entry in
1691
1697
  `mockRequest.headers` is not validated — a malformed value does not fail the run.
@@ -1707,19 +1713,24 @@ paths:
1707
1713
  schema:
1708
1714
  type: object
1709
1715
  description: |-
1710
- Optional test request for the run. When the body is empty or
1711
- omitted, the run replays the API's saved
1712
- `builder.request.mockRequest`.
1716
+ Optional test request for the run. The saved
1717
+ `builder.request.mockRequest` is never replayed: when the body is
1718
+ empty, omitted, or has no `mockRequest`, the first step receives
1719
+ an empty record.
1713
1720
  properties:
1714
1721
  mockRequest:
1715
1722
  type: object
1716
1723
  description: |-
1717
- The simulated request to run instead of the saved
1718
- `builder.request.mockRequest`.
1724
+ The simulated request for this run. Send the saved
1725
+ `builder.request.mockRequest` here to test with it.
1719
1726
  properties:
1720
1727
  body:
1721
1728
  type: object
1722
- description: Request body for the simulated call.
1729
+ description: |-
1730
+ Request body for the simulated call. Only the body reaches
1731
+ the record the steps see. Must be a JSON object: an array
1732
+ is refused with 400 "Mock request body should be a plain
1733
+ object."
1723
1734
  pathParams:
1724
1735
  type: object
1725
1736
  description: Path parameter values for the simulated call.
@@ -1731,10 +1742,10 @@ paths:
1731
1742
  description: Request headers for the simulated call.
1732
1743
  additionalProperties: true
1733
1744
  x-celigo-ai-guidance:
1734
- - Send explicit test input under the mockRequest key ({body, pathParams, queryParams, headers}); with no body the run replays the saved builder.request.mockRequest.
1745
+ - Send test input under the mockRequest key ({body, pathParams, queryParams, headers}). A run without mockRequest starts from an empty record; the saved builder.request.mockRequest is not replayed, so send it explicitly to test with it.
1735
1746
  examples:
1736
1747
  default:
1737
- summary: Run with no overrides
1748
+ summary: Run without test input (the first step gets an empty record)
1738
1749
  value: {}
1739
1750
  withMockRequest:
1740
1751
  summary: Run with an explicit test request
@@ -2559,6 +2570,59 @@ components:
2559
2570
  - |-
2560
2571
  In script mode, you provide a custom JavaScript function that receives the request
2561
2572
  object and returns the response. This gives you complete control over the API behavior.
2573
+ items:
2574
+ type: object
2575
+ required:
2576
+ - dataType
2577
+ properties:
2578
+ generate:
2579
+ type: string
2580
+ description: Record field the row writes.
2581
+ examples:
2582
+ - customerId
2583
+ extract:
2584
+ type: string
2585
+ description: JSONPath into the request body that the value is read from.
2586
+ examples:
2587
+ - $.id
2588
+ dataType:
2589
+ type: string
2590
+ enum:
2591
+ - string
2592
+ - number
2593
+ - boolean
2594
+ - object
2595
+ - stringarray
2596
+ - numberarray
2597
+ - booleanarray
2598
+ - objectarray
2599
+ x-enumDescriptions:
2600
+ string: Single string value
2601
+ number: Single numeric value
2602
+ boolean: Single boolean value
2603
+ object: Nested object value
2604
+ stringarray: Array of strings
2605
+ numberarray: Array of numbers
2606
+ booleanarray: Array of booleans
2607
+ objectarray: Array of objects
2608
+ description: Data type the row writes.
2609
+ examples:
2610
+ - string
2611
+ sourceDataType:
2612
+ type: string
2613
+ description: Data type of the extracted value.
2614
+ examples:
2615
+ - string
2616
+ status:
2617
+ type: string
2618
+ description: Row status; `Active` rows run.
2619
+ examples:
2620
+ - Active
2621
+ mappings:
2622
+ type: array
2623
+ description: Child rows of an `object` row, with the same shape as this row.
2624
+ items:
2625
+ $ref: '#/components/schemas/items'
2562
2626
  ApiRequest:
2563
2627
  type: object
2564
2628
  description: Request configuration for a builder-mode API endpoint.
@@ -2581,15 +2645,20 @@ components:
2581
2645
  maxLength: 131072
2582
2646
  pattern: ^\/[a-zA-Z0-9:_*\/\-\.]*$
2583
2647
  description: |-
2584
- URI path relative to the version. Full endpoint becomes
2585
- `/{version}{relativeURI}`. Use colon notation for path params: `/customers/:id`.
2648
+ URI path relative to the version. Callers reach the API at
2649
+ `https://api.integrator.io/apis/{version}{relativeURI}` (on the account's regional
2650
+ host outside the US), with the account's API token. Use colon notation for path
2651
+ params: `/customers/:id`.
2586
2652
  examples:
2587
2653
  - /customers/:id
2588
2654
  - /orders
2589
2655
  - /products/:productId/variants/:variantId
2590
2656
  x-celigo-ai-guidance:
2591
2657
  - |-
2592
- Full endpoint URL will be: `/{version}{relativeURI}`
2658
+ The public endpoint is `https://api.integrator.io/apis/{version}{relativeURI}`, for
2659
+ example `/apis/v1/customers/:id`; `relativeURI` already starts with `/`, so add no
2660
+ slash after the version. Without the `/apis` prefix the request goes to the
2661
+ platform's own API and answers `resource_not_found`.
2593
2662
  Can include path parameters using colon notation: `/customers/:id`
2594
2663
  First path segment must be alphanumeric, dash, or underscore only.
2595
2664
  method:
@@ -2722,7 +2791,10 @@ components:
2722
2791
  the empty map never survives the round-trip.
2723
2792
  mockRequest:
2724
2793
  type: object
2725
- description: Mock request data for testing the API without live calls.
2794
+ description: |-
2795
+ Sample request saved with the API for testing. `POST /v1/apis/{_id}/test/run` doesn't
2796
+ read it; send it as that call's `mockRequest`. A test run still makes outside calls:
2797
+ its lookups call their sources live.
2726
2798
  properties:
2727
2799
  body:
2728
2800
  type: object
@@ -2739,12 +2811,104 @@ components:
2739
2811
  additionalProperties: false
2740
2812
  x-celigo-ai-guidance:
2741
2813
  - |-
2742
- Provides sample data to test the API without making actual calls.
2743
- Can include body, headers, pathParams, and queryParams.
2814
+ Saving a mockRequest doesn't make test runs use it: a test run without its own
2815
+ mockRequest starts from an empty record. A test run isn't free of outside calls
2816
+ either: lookups run live, and only imports are kept from sending (each returns its
2817
+ mockResponse or a placeholder). Can include body, headers, pathParams, and
2818
+ queryParams.
2744
2819
  transform:
2745
2820
  type: object
2746
- description: Optional transformation applied to the incoming request before processing.
2821
+ description: |-
2822
+ Optional transformation applied to the incoming request before processing. The
2823
+ expression form (`type: "expression"` with Transformation 2.0 rules in `expression`)
2824
+ saves and runs. In a test run its rules see only the request body, not `pathParams`,
2825
+ `queryParams` or headers.
2747
2826
  properties:
2827
+ type:
2828
+ type: string
2829
+ description: Selects the transform form; `expression` runs the rules in `expression`.
2830
+ examples:
2831
+ - expression
2832
+ expression:
2833
+ type: object
2834
+ description: Transformation 2.0 rules applied to the request body.
2835
+ properties:
2836
+ version:
2837
+ type: string
2838
+ description: Rule format; `"2"` selects the rules in `rulesTwoDotZero`.
2839
+ examples:
2840
+ - '2'
2841
+ rulesTwoDotZero:
2842
+ type: object
2843
+ description: The rules applied to the request body.
2844
+ properties:
2845
+ mode:
2846
+ type: string
2847
+ enum:
2848
+ - create
2849
+ - modify
2850
+ x-enumDescriptions:
2851
+ create: Builds a new record from the mappings, dropping unmapped fields.
2852
+ modify: Edits the incoming record, keeping unmapped fields.
2853
+ description: How the mappings apply to the record; `modify` keeps the body's own fields beside the mapped ones.
2854
+ examples:
2855
+ - modify
2856
+ mappings:
2857
+ type: array
2858
+ description: Mapper 2.0 rows that write fields onto the record.
2859
+ items:
2860
+ type: object
2861
+ required:
2862
+ - dataType
2863
+ properties:
2864
+ generate:
2865
+ type: string
2866
+ description: Record field the row writes.
2867
+ examples:
2868
+ - customerId
2869
+ extract:
2870
+ type: string
2871
+ description: JSONPath into the request body that the value is read from.
2872
+ examples:
2873
+ - $.id
2874
+ dataType:
2875
+ type: string
2876
+ enum:
2877
+ - string
2878
+ - number
2879
+ - boolean
2880
+ - object
2881
+ - stringarray
2882
+ - numberarray
2883
+ - booleanarray
2884
+ - objectarray
2885
+ x-enumDescriptions:
2886
+ string: Single string value
2887
+ number: Single numeric value
2888
+ boolean: Single boolean value
2889
+ object: Nested object value
2890
+ stringarray: Array of strings
2891
+ numberarray: Array of numbers
2892
+ booleanarray: Array of booleans
2893
+ objectarray: Array of objects
2894
+ description: Data type the row writes.
2895
+ examples:
2896
+ - string
2897
+ sourceDataType:
2898
+ type: string
2899
+ description: Data type of the extracted value.
2900
+ examples:
2901
+ - string
2902
+ status:
2903
+ type: string
2904
+ description: Row status; `Active` rows run.
2905
+ examples:
2906
+ - Active
2907
+ mappings:
2908
+ type: array
2909
+ description: Child rows of an `object` row, with the same shape as this row.
2910
+ items:
2911
+ $ref: '#/components/schemas/items'
2748
2912
  _scriptId:
2749
2913
  type: string
2750
2914
  format: objectId
@@ -2926,6 +3090,13 @@ components:
2926
3090
  hooks:
2927
3091
  type: object
2928
3092
  description: Custom scripts for processing
3093
+ proceedOnFailure:
3094
+ type: boolean
3095
+ description: |-
3096
+ When true, the next step still runs after this step fails, and the request
3097
+ can still end in the `success` response (`context.success` stays true).
3098
+ When false, a failure stops the branch and the API returns its `fail`
3099
+ response.
2929
3100
  x-celigo-ai-guidance:
2930
3101
  - |-
2931
3102
  Each branch has its own criteria and processing steps. Requests are
@@ -2992,6 +3163,75 @@ components:
2992
3163
  The response router determines which response configuration to use based on
2993
3164
  the processing results. This allows you to return different responses based
2994
3165
  on different conditions or outcomes.
3166
+ items-2:
3167
+ type: object
3168
+ required:
3169
+ - dataType
3170
+ properties:
3171
+ generate:
3172
+ type: string
3173
+ description: |-
3174
+ Name of the response-body field this row writes. A dot doesn't nest:
3175
+ `customer.id` makes one key named `customer.id`. To nest, use an `object` row
3176
+ with child `mappings`.
3177
+ examples:
3178
+ - customerId
3179
+ dataType:
3180
+ type: string
3181
+ enum:
3182
+ - string
3183
+ - number
3184
+ - boolean
3185
+ - object
3186
+ - stringarray
3187
+ - numberarray
3188
+ - booleanarray
3189
+ - objectarray
3190
+ x-lowercase: true
3191
+ x-enumDescriptions:
3192
+ string: Single string value
3193
+ number: Single numeric value
3194
+ boolean: Single boolean value
3195
+ object: Nested object value
3196
+ stringarray: Array of strings
3197
+ numberarray: Array of numbers
3198
+ booleanarray: Array of booleans
3199
+ objectarray: Array of objects
3200
+ description: Data type of the value this mapping writes into the response body.
3201
+ examples:
3202
+ - string
3203
+ x-celigo-ai-guidance:
3204
+ - |-
3205
+ Validator-enforced on every mapping entry: writes fail with
3206
+ `422` ("Path 'dataType' is required."), repeated once per
3207
+ entry that omits it.
3208
+ extract:
3209
+ type: string
3210
+ description: |-
3211
+ Where the value comes from, as a JSONPath into the record (`$.id`). A bare string
3212
+ such as `id` or `record.id` is written as that literal text, not read from the
3213
+ record.
3214
+ examples:
3215
+ - $.id
3216
+ mappings:
3217
+ type: array
3218
+ description: |-
3219
+ Child rows of an `object` row, with the same shape as this row. Each writes one
3220
+ field inside the object this row generates.
3221
+ items:
3222
+ $ref: '#/components/schemas/items-2'
3223
+ hardCodedValue:
3224
+ type: string
3225
+ description: |-
3226
+ Static value written to the target field instead of extracting
3227
+ from input data.
3228
+ x-celigo-ai-guidance:
3229
+ - |-
3230
+ The field name is exactly `hardCodedValue` (capital C). The
3231
+ server does not reject unknown mapping keys: a mapping sent
3232
+ with `hardcodedValue` saves successfully with the value
3233
+ silently dropped — no error, and the target field is then
3234
+ simply absent from the API's responses.
2995
3235
  ApiResponse:
2996
3236
  type: object
2997
3237
  description: |-
@@ -3173,7 +3413,9 @@ components:
3173
3413
  additionalProperties: true
3174
3414
  mappings:
3175
3415
  type: array
3176
- description: Field mappings to transform processing results into the response body.
3416
+ description: |-
3417
+ Mapper 2.0 rows that build the response body from the record the steps produced,
3418
+ under the same rules as the shared Mapper 2.0 schema an import's `mappings` use.
3177
3419
  items:
3178
3420
  type: object
3179
3421
  required:
@@ -3181,9 +3423,12 @@ components:
3181
3423
  properties:
3182
3424
  generate:
3183
3425
  type: string
3184
- description: Target field path in the response
3426
+ description: |-
3427
+ Name of the response-body field this row writes. A dot doesn't nest:
3428
+ `customer.id` makes one key named `customer.id`. To nest, use an `object` row
3429
+ with child `mappings`.
3185
3430
  examples:
3186
- - data.customerId
3431
+ - customerId
3187
3432
  dataType:
3188
3433
  type: string
3189
3434
  enum:
@@ -3195,7 +3440,6 @@ components:
3195
3440
  - numberarray
3196
3441
  - booleanarray
3197
3442
  - objectarray
3198
- - arrayarray
3199
3443
  x-lowercase: true
3200
3444
  x-enumDescriptions:
3201
3445
  string: Single string value
@@ -3206,7 +3450,6 @@ components:
3206
3450
  numberarray: Array of numbers
3207
3451
  booleanarray: Array of booleans
3208
3452
  objectarray: Array of objects
3209
- arrayarray: Array of arrays
3210
3453
  description: Data type of the value this mapping writes into the response body.
3211
3454
  examples:
3212
3455
  - string
@@ -3217,9 +3460,19 @@ components:
3217
3460
  entry that omits it.
3218
3461
  extract:
3219
3462
  type: string
3220
- description: Source field path from input data
3463
+ description: |-
3464
+ Where the value comes from, as a JSONPath into the record (`$.id`). A bare string
3465
+ such as `id` or `record.id` is written as that literal text, not read from the
3466
+ record.
3221
3467
  examples:
3222
- - record.id
3468
+ - $.id
3469
+ mappings:
3470
+ type: array
3471
+ description: |-
3472
+ Child rows of an `object` row, with the same shape as this row. Each writes one
3473
+ field inside the object this row generates.
3474
+ items:
3475
+ $ref: '#/components/schemas/items-2'
3223
3476
  hardCodedValue:
3224
3477
  type: string
3225
3478
  description: |-
@@ -3435,7 +3688,7 @@ components:
3435
3688
  type: string
3436
3689
  default: v1
3437
3690
  pattern: ^[a-zA-Z0-9\-_\.]+$
3438
- description: Version segment of the public URL (`/{version}/{relativeURI}`).
3691
+ description: Version segment of the public URL (`/apis/{version}{relativeURI}`).
3439
3692
  examples:
3440
3693
  - v1
3441
3694
  - v2
@@ -3483,16 +3736,17 @@ components:
3483
3736
  - accountLevel
3484
3737
  - noLogging
3485
3738
  x-enumDescriptions:
3486
- basic: Log request metadata (method, URI, status, timing) only.
3739
+ basic: Log request metadata and the trace view's step list, with the least per-record payload.
3487
3740
  standard: Log request metadata plus headers and summary step information.
3488
3741
  detailed: Full capture including per-step trace logs, viewable in the run-history trace view.
3489
3742
  accountLevel: Defer to the account's logging settings.
3490
3743
  noLogging: Disable request logging entirely — no run-history entries are produced.
3491
3744
  description: |-
3492
- Which logging level applies to requests handled by this API. Only
3493
- `detailed` (or a temporary debug window) produces the per-step
3494
- trace data used by `GET /v1/apis/{_id}/requests/{executionId}`.
3495
- Payload-capturing modes (`standard`, `detailed`) require payload
3745
+ Which logging level applies to requests handled by this API. Every
3746
+ mode that logs records the step list that
3747
+ `GET /v1/apis/{_id}/requests/{executionId}` returns, `basic` included;
3748
+ the level decides how much per-record payload the log-data query can
3749
+ return. Payload-capturing modes (`standard`, `detailed`) require payload
3496
3750
  storage to be enabled for the account — without it, changing the
3497
3751
  mode fails with `422` (code `payload_storage_required`).
3498
3752
  debugUntil:
@@ -3835,7 +4089,7 @@ components:
3835
4089
  `/v1/exports/{_exportId}/invoke`, `/v1/imports/{_importId}/invoke`,
3836
4090
  `/v1/connections/{_connectionId}/import` for virtual imports,
3837
4091
  `/v1/apis/{_apiId}/request` for script-mode APIs, and
3838
- `/apis/v1/<relativeURI>` for builder-mode APIs.
4092
+ `/apis/{version}{relativeURI}` (such as `/apis/v1/orders`) for builder-mode APIs.
3839
4093
  examples:
3840
4094
  - /v1/exports/6878f4a43bc01652c09cdccc/invoke
3841
4095
  metadata:
@@ -4278,7 +4532,7 @@ components:
4278
4532
  description: |-
4279
4533
  Identifier of this request execution (20-character lowercase hex).
4280
4534
  Pass it to `GET /v1/apis/{_id}/requests/{executionId}` to open the
4281
- trace view when `logMode` is `detailed` or `debug`.
4535
+ trace view, which every `logMode` records.
4282
4536
  examples:
4283
4537
  - a1b2c3d4e5f678901234
4284
4538
  time:
@@ -4384,7 +4638,10 @@ components:
4384
4638
  Identifies what ran: the API's own id for the request-parsing step, the
4385
4639
  export or import id for a lookup or import step, the response `id`
4386
4640
  (for example `success`) for the response step, or `<toolId>_input` /
4387
- `<toolId>_output` for the boundaries of a nested Tool step.
4641
+ `<toolId>_output` for the boundaries of a nested Tool step. A response
4642
+ step whose `id` was named by the user can't be read through the
4643
+ log-data query, which rejects that id with 400 `invalid_exp_or_imp_id`
4644
+ at every stage; read the step's outcome from this trace.
4388
4645
  examples:
4389
4646
  - 67ee026136f4d1eeb529ad63
4390
4647
  - success