@epilot/sdk 2.8.3 → 2.8.5
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/definitions/blueprint-manifest-runtime.json +1 -1
- package/definitions/blueprint-manifest.json +571 -1
- package/definitions/snapshot-runtime.json +1 -1
- package/definitions/snapshot.json +222 -6
- package/dist/README-NBWAQWQS.js +7 -0
- package/dist/README-XCIDDEAE.cjs +7 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +8 -8
- package/dist/apis/blueprint-manifest.d.cts +2 -2
- package/dist/apis/blueprint-manifest.d.ts +2 -2
- package/dist/apis/blueprint-manifest.js +2 -2
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +8 -8
- package/dist/apis/snapshot.d.cts +2 -2
- package/dist/apis/snapshot.d.ts +2 -2
- package/dist/apis/snapshot.js +2 -2
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/blueprint-manifest-WHYSBU66.cjs +7 -0
- package/dist/blueprint-manifest-WZVBTKUL.js +7 -0
- package/dist/{blueprint-manifest-runtime-FRLU3ZSF.js → blueprint-manifest-runtime-2344IUIE.js} +1 -1
- package/dist/{blueprint-manifest-runtime-EIDOROIQ.cjs → blueprint-manifest-runtime-WU5MWPVT.cjs} +2 -2
- package/dist/{blueprint-manifest.d-B8yDxagC.d.cts → blueprint-manifest.d-2-TORV8o.d.cts} +926 -4
- package/dist/{blueprint-manifest.d-B8yDxagC.d.ts → blueprint-manifest.d-2-TORV8o.d.ts} +926 -4
- package/dist/chunk-4SZCKUY2.js +14 -0
- package/dist/{chunk-76M3RIDP.js → chunk-5FXMXMNX.js} +5 -5
- package/dist/{chunk-NGHCQ2FA.cjs → chunk-T57MT6J5.cjs} +1 -1
- package/dist/chunk-ULKFBO7E.cjs +14 -0
- package/dist/{chunk-4YBWMDFP.js → chunk-UWGWRGGB.js} +1 -1
- package/dist/{chunk-FBQ4WDTG.cjs → chunk-XRIEGQXL.cjs} +5 -5
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/snapshot-GDJOEFJQ.js +7 -0
- package/dist/snapshot-UKV54UQQ.cjs +7 -0
- package/dist/{snapshot-runtime-NWQYU5UK.cjs → snapshot-runtime-5TT575JS.cjs} +2 -2
- package/dist/{snapshot-runtime-ALPJLXVW.js → snapshot-runtime-KWRGOKF4.js} +1 -1
- package/dist/{snapshot.d-DvoJ2n-v.d.cts → snapshot.d-C-n4wkIu.d.cts} +224 -62
- package/dist/{snapshot.d-DvoJ2n-v.d.ts → snapshot.d-C-n4wkIu.d.ts} +224 -62
- package/docs/blueprint-manifest.md +421 -95
- package/docs/snapshot.md +168 -15
- package/package.json +1 -1
- package/dist/README-46VYEGGW.js +0 -7
- package/dist/README-IVBISSWB.cjs +0 -7
- package/dist/blueprint-manifest-6DEYW5MW.js +0 -7
- package/dist/blueprint-manifest-GCV7H74X.cjs +0 -7
- package/dist/chunk-BJGLY4Z2.js +0 -14
- package/dist/chunk-K2QVMO5M.cjs +0 -14
- package/dist/snapshot-427N6KCO.js +0 -7
- package/dist/snapshot-NEMUND3M.cjs +0 -7
|
@@ -98,7 +98,6 @@
|
|
|
98
98
|
"description": "Filter to snapshots containing one or more resources. Format\n`<type>:<id>`. Split on the first colon — the `<id>` half may\ncontain colons (e.g., role acl ids like `role:acl:internal:foo`).\nRepeat the param for multiple resources — results are OR-unioned.\nMaximum 50 pairs per request.\n",
|
|
99
99
|
"schema": {
|
|
100
100
|
"type": "array",
|
|
101
|
-
"maxItems": 50,
|
|
102
101
|
"items": {
|
|
103
102
|
"type": "string",
|
|
104
103
|
"pattern": "^[^:]+:.+$"
|
|
@@ -143,6 +142,44 @@
|
|
|
143
142
|
}
|
|
144
143
|
}
|
|
145
144
|
},
|
|
145
|
+
"/v1/snapshots:capture-org": {
|
|
146
|
+
"post": {
|
|
147
|
+
"operationId": "captureOrgSnapshot",
|
|
148
|
+
"summary": "captureOrgSnapshot",
|
|
149
|
+
"description": "Snapshot the caller's whole organization now. Fetches a fresh inventory\nof the org's configuration resources from configuration-hub-api, persists\nit as an inventory artifact, and starts a `scope: \"org\"` chunked capture.\nAsync — returns immediately with a snapshot ID; client polls `getSnapshot`\nand watches `capture_summary` fill in until `create.status` moves from\n`in_progress` to `completed` or `failed`.\n\nSensitive types (`access_token`, `environment_variable`), types with no\nengine adapter, and any `excluded_types` are dropped from the capture and\nrecorded in the snapshot's coverage report.\n",
|
|
150
|
+
"tags": [
|
|
151
|
+
"Snapshots"
|
|
152
|
+
],
|
|
153
|
+
"requestBody": {
|
|
154
|
+
"required": false,
|
|
155
|
+
"content": {
|
|
156
|
+
"application/json": {
|
|
157
|
+
"schema": {
|
|
158
|
+
"$ref": "#/components/schemas/CreateOrgSnapshotRequest"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"responses": {
|
|
164
|
+
"202": {
|
|
165
|
+
"description": "Org snapshot creation started",
|
|
166
|
+
"content": {
|
|
167
|
+
"application/json": {
|
|
168
|
+
"schema": {
|
|
169
|
+
"$ref": "#/components/schemas/CreateSnapshotResponse"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"401": {
|
|
175
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
176
|
+
},
|
|
177
|
+
"422": {
|
|
178
|
+
"$ref": "#/components/responses/UnprocessableEntity"
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
146
183
|
"/v1/snapshots/{id}": {
|
|
147
184
|
"parameters": [
|
|
148
185
|
{
|
|
@@ -214,10 +251,20 @@
|
|
|
214
251
|
"post": {
|
|
215
252
|
"operationId": "restoreSnapshot",
|
|
216
253
|
"summary": "restoreSnapshot",
|
|
217
|
-
"description": "Restore a snapshot to the org. Async — returns immediately; client polls\n`getSnapshot` until the latest entry in `restores` moves from\n`in_progress` to `completed
|
|
254
|
+
"description": "Restore a snapshot to the org. Async — returns immediately; client polls\n`getSnapshot` until the latest entry in `restores` moves from\n`in_progress` to one of `completed | partial | failed`.\n\nv1: full restore only. Cherry-pick (`resources?` body filter) is an open\nquestion — see RFC OQ #1.\n",
|
|
218
255
|
"tags": [
|
|
219
256
|
"Snapshots"
|
|
220
257
|
],
|
|
258
|
+
"requestBody": {
|
|
259
|
+
"required": false,
|
|
260
|
+
"content": {
|
|
261
|
+
"application/json": {
|
|
262
|
+
"schema": {
|
|
263
|
+
"$ref": "#/components/schemas/RestoreSnapshotRequest"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
221
268
|
"responses": {
|
|
222
269
|
"202": {
|
|
223
270
|
"description": "Restore started",
|
|
@@ -428,6 +475,16 @@
|
|
|
428
475
|
}
|
|
429
476
|
}
|
|
430
477
|
}
|
|
478
|
+
},
|
|
479
|
+
"UnprocessableEntity": {
|
|
480
|
+
"description": "Unprocessable entity",
|
|
481
|
+
"content": {
|
|
482
|
+
"application/json": {
|
|
483
|
+
"schema": {
|
|
484
|
+
"$ref": "#/components/schemas/EmptyInventoryError"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
431
488
|
}
|
|
432
489
|
},
|
|
433
490
|
"schemas": {
|
|
@@ -446,6 +503,38 @@
|
|
|
446
503
|
}
|
|
447
504
|
}
|
|
448
505
|
},
|
|
506
|
+
"EmptyInventoryError": {
|
|
507
|
+
"type": "object",
|
|
508
|
+
"required": [
|
|
509
|
+
"message",
|
|
510
|
+
"skipped_types"
|
|
511
|
+
],
|
|
512
|
+
"description": "Returned (422) when the org inventory contains no capturable resources\nafter filtering out sensitive, unsupported, and excluded types. The\n`skipped_types` array explains why every type was dropped.\n",
|
|
513
|
+
"properties": {
|
|
514
|
+
"message": {
|
|
515
|
+
"type": "string",
|
|
516
|
+
"example": "No capturable resources in the org inventory"
|
|
517
|
+
},
|
|
518
|
+
"skipped_types": {
|
|
519
|
+
"type": "array",
|
|
520
|
+
"items": {
|
|
521
|
+
"type": "object",
|
|
522
|
+
"required": [
|
|
523
|
+
"type",
|
|
524
|
+
"reason"
|
|
525
|
+
],
|
|
526
|
+
"properties": {
|
|
527
|
+
"type": {
|
|
528
|
+
"type": "string"
|
|
529
|
+
},
|
|
530
|
+
"reason": {
|
|
531
|
+
"type": "string"
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
},
|
|
449
538
|
"ResourceRef": {
|
|
450
539
|
"type": "object",
|
|
451
540
|
"required": [
|
|
@@ -551,10 +640,11 @@
|
|
|
551
640
|
"enum": [
|
|
552
641
|
"manual",
|
|
553
642
|
"sync",
|
|
554
|
-
"blueprint_install"
|
|
643
|
+
"blueprint_install",
|
|
644
|
+
"scheduled"
|
|
555
645
|
],
|
|
556
646
|
"default": "manual",
|
|
557
|
-
"description": "What initiated this snapshot. `scheduled`
|
|
647
|
+
"description": "What initiated this snapshot. `scheduled` is used for automatic\nnightly backups triggered by an org's EventBridge schedule\n(RFC — Scheduled org snapshots).\n"
|
|
558
648
|
},
|
|
559
649
|
"blueprint_instance_id": {
|
|
560
650
|
"type": "string",
|
|
@@ -569,6 +659,45 @@
|
|
|
569
659
|
}
|
|
570
660
|
}
|
|
571
661
|
},
|
|
662
|
+
"CreateOrgSnapshotRequest": {
|
|
663
|
+
"type": "object",
|
|
664
|
+
"description": "Request body for `captureOrgSnapshot`. All fields optional — an empty body\nsnapshots the whole org with a default name and the 90-day default TTL.\n",
|
|
665
|
+
"properties": {
|
|
666
|
+
"name": {
|
|
667
|
+
"type": "string",
|
|
668
|
+
"description": "Snapshot name. Defaults to \"Org snapshot — <ISO timestamp>\"."
|
|
669
|
+
},
|
|
670
|
+
"retention": {
|
|
671
|
+
"type": "object",
|
|
672
|
+
"description": "Retention window. Converted to an absolute `expires_at` at creation\ntime. Omit for the default 90-day TTL.\n",
|
|
673
|
+
"required": [
|
|
674
|
+
"value",
|
|
675
|
+
"unit"
|
|
676
|
+
],
|
|
677
|
+
"properties": {
|
|
678
|
+
"value": {
|
|
679
|
+
"type": "integer",
|
|
680
|
+
"minimum": 1
|
|
681
|
+
},
|
|
682
|
+
"unit": {
|
|
683
|
+
"type": "string",
|
|
684
|
+
"enum": [
|
|
685
|
+
"days",
|
|
686
|
+
"weeks",
|
|
687
|
+
"months"
|
|
688
|
+
]
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
"excluded_types": {
|
|
693
|
+
"type": "array",
|
|
694
|
+
"description": "Resource types to exclude from the capture, in addition to the\nalways-excluded sensitive types (`access_token`,\n`environment_variable`).\n",
|
|
695
|
+
"items": {
|
|
696
|
+
"type": "string"
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
},
|
|
572
701
|
"CreateSnapshotResponse": {
|
|
573
702
|
"type": "object",
|
|
574
703
|
"required": [
|
|
@@ -596,6 +725,22 @@
|
|
|
596
725
|
}
|
|
597
726
|
}
|
|
598
727
|
},
|
|
728
|
+
"RestoreSnapshotRequest": {
|
|
729
|
+
"type": "object",
|
|
730
|
+
"description": "Both flags default to `false`, which restores every captured resource —\nConfig Hub's manual-restore semantics. blueprint-manifest-api sets\nboth `true` when reverting a blueprint install so user edits and\ncross-blueprint contributions survive. Each flag is independent so a\ncaller can preserve edits without preserving co-ownership (or vice\nversa). Skipped resources surface under `Operation.skipped`.\n",
|
|
731
|
+
"properties": {
|
|
732
|
+
"preserve_modified": {
|
|
733
|
+
"type": "boolean",
|
|
734
|
+
"default": false,
|
|
735
|
+
"description": "When `true`, skip captured resources whose live destination payload\nhas diverged from the install-time fingerprint stored on lineage.\nSurfaces under `Operation.skipped` with `reason: 'modified'`.\n"
|
|
736
|
+
},
|
|
737
|
+
"preserve_co_owned": {
|
|
738
|
+
"type": "boolean",
|
|
739
|
+
"default": false,
|
|
740
|
+
"description": "When `true`, skip captured resources whose lineage row carries\nanother blueprint instance's id (co-ownership ≥2). Surfaces under\n`Operation.skipped` with `reason: 'co_owned'`.\n"
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
},
|
|
599
744
|
"RestoreSnapshotResponse": {
|
|
600
745
|
"type": "object",
|
|
601
746
|
"required": [
|
|
@@ -643,7 +788,8 @@
|
|
|
643
788
|
"enum": [
|
|
644
789
|
"manual",
|
|
645
790
|
"sync",
|
|
646
|
-
"blueprint_install"
|
|
791
|
+
"blueprint_install",
|
|
792
|
+
"scheduled"
|
|
647
793
|
]
|
|
648
794
|
},
|
|
649
795
|
"blueprint_instance_id": {
|
|
@@ -669,6 +815,47 @@
|
|
|
669
815
|
"matched_count": {
|
|
670
816
|
"type": "integer",
|
|
671
817
|
"description": "Number of `resource` filter pairs from the request that are\ncontained in this snapshot. Present only on `listSnapshots`\nresponses where the caller passed at least one `resource`\nfilter — absent on `getSnapshot` and on unfiltered list calls.\nDrives the coverage badge in Config Hub's snapshot picker.\n"
|
|
818
|
+
},
|
|
819
|
+
"scope": {
|
|
820
|
+
"type": "string",
|
|
821
|
+
"enum": [
|
|
822
|
+
"selection",
|
|
823
|
+
"org"
|
|
824
|
+
],
|
|
825
|
+
"description": "Capture scope. `selection` (default for manual/sync/blueprint_install)\nmeans only the explicitly listed resources were snapshotted.\n`org` means a full org inventory was discovered and captured\n(scheduled snapshots set this automatically).\n"
|
|
826
|
+
},
|
|
827
|
+
"expires_at": {
|
|
828
|
+
"type": "string",
|
|
829
|
+
"format": "date-time",
|
|
830
|
+
"description": "ISO-8601 timestamp after which this snapshot will be deleted.\nDerived from the org's retention setting at capture time for\nscheduled snapshots; not set for manual snapshots (which use\na hardcoded 90-day TTL written directly as a DynamoDB `ttl` epoch).\n"
|
|
831
|
+
},
|
|
832
|
+
"capture_summary": {
|
|
833
|
+
"type": "object",
|
|
834
|
+
"description": "Per-snapshot coverage report set by the capture worker on completion.\nRecords how many resources were attempted, captured, skipped\n(unsupported type or explicitly excluded), and failed.\n",
|
|
835
|
+
"required": [
|
|
836
|
+
"total",
|
|
837
|
+
"captured",
|
|
838
|
+
"skipped",
|
|
839
|
+
"failed"
|
|
840
|
+
],
|
|
841
|
+
"properties": {
|
|
842
|
+
"total": {
|
|
843
|
+
"type": "integer",
|
|
844
|
+
"description": "Total resources in the inventory that were attempted."
|
|
845
|
+
},
|
|
846
|
+
"captured": {
|
|
847
|
+
"type": "integer",
|
|
848
|
+
"description": "Resources successfully fetched and written to the manifest."
|
|
849
|
+
},
|
|
850
|
+
"skipped": {
|
|
851
|
+
"type": "integer",
|
|
852
|
+
"description": "Resources skipped — type not supported by config-engine or\nexcluded from capture (e.g. access_token, environment_variable).\n"
|
|
853
|
+
},
|
|
854
|
+
"failed": {
|
|
855
|
+
"type": "integer",
|
|
856
|
+
"description": "Resources where the fetch call returned an error."
|
|
857
|
+
}
|
|
858
|
+
}
|
|
672
859
|
}
|
|
673
860
|
}
|
|
674
861
|
},
|
|
@@ -701,14 +888,43 @@
|
|
|
701
888
|
"enum": [
|
|
702
889
|
"in_progress",
|
|
703
890
|
"completed",
|
|
891
|
+
"partial",
|
|
704
892
|
"failed"
|
|
705
|
-
]
|
|
893
|
+
],
|
|
894
|
+
"description": "`partial` indicates the operation completed but skipped at least\none resource — see `skipped`. Only populated by restores triggered\nwith `mode: 'preserve_edits'`.\n"
|
|
706
895
|
},
|
|
707
896
|
"error": {
|
|
708
897
|
"type": "string"
|
|
709
898
|
},
|
|
710
899
|
"triggered_by": {
|
|
711
900
|
"$ref": "#/components/schemas/CallerIdentity"
|
|
901
|
+
},
|
|
902
|
+
"skipped": {
|
|
903
|
+
"type": "array",
|
|
904
|
+
"description": "Per-resource skips, populated only for restores triggered with\n`mode: 'preserve_edits'`. Empty / absent for Config Hub's\ndefault overwrite-mode restores.\n",
|
|
905
|
+
"items": {
|
|
906
|
+
"$ref": "#/components/schemas/SkippedResource"
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
},
|
|
911
|
+
"SkippedResource": {
|
|
912
|
+
"type": "object",
|
|
913
|
+
"required": [
|
|
914
|
+
"lineage_id",
|
|
915
|
+
"reason"
|
|
916
|
+
],
|
|
917
|
+
"properties": {
|
|
918
|
+
"lineage_id": {
|
|
919
|
+
"type": "string"
|
|
920
|
+
},
|
|
921
|
+
"reason": {
|
|
922
|
+
"type": "string",
|
|
923
|
+
"enum": [
|
|
924
|
+
"modified",
|
|
925
|
+
"co_owned"
|
|
926
|
+
],
|
|
927
|
+
"description": "- `modified` — current destination payload's fingerprint differs\n from the install-time fingerprint on the lineage row.\n- `co_owned` — lineage row has ≥2 distinct\n `blueprint_instance_ids`; restoring would unilaterally affect\n another blueprint instance's contribution.\n"
|
|
712
928
|
}
|
|
713
929
|
}
|
|
714
930
|
},
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/README.json
|
|
4
|
+
var README_default = "<h1 align=\"center\"><img alt=\"epilot\" src=\"https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png\" width=\"200\"><br>@epilot/sdk</h1>\n\n<p align=\"center\">\n <a href=\"https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI\"><img src=\"https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg\" alt=\"CI\"></a>\n <a href=\"https://www.npmjs.com/package/@epilot/sdk\"><img src=\"https://img.shields.io/npm/v/@epilot/sdk.svg\" alt=\"npm version\"></a>\n <a href=\"https://github.com/epilot-dev/sdk-js/blob/main/\"><img src=\"http://img.shields.io/:license-mit-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">JavaScript/TypeScript SDK for epilot APIs. Full types, tree-shakeable imports, and lazy-loaded OpenAPI specs.</p>\n\n## Install\n\n```bash\nnpm i @epilot/sdk axios openapi-client-axios\n```\n\n## Quick Start\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-bearer-token>')\n\nconst { data: entity } = await epilot.entity.createEntity(\n { slug: 'contact' },\n { first_name: 'John', last_name: 'Doe' },\n)\n\nconst { data: file } = await epilot.file.getFile({ id: 'file-123' })\n\nconst { data: executions } = await epilot.workflow.getExecutions()\n```\n\nAPI clients are built on [openapi-client-axios](https://openapistack.co/docs/openapi-client-axios/intro/), which generates fully typed operation methods on top of regular [axios](https://axios-http.com/docs/intro) instances. All standard axios features (interceptors, defaults, config) work as expected. Each operation is forwarded to a lazy singleton \u2014 the spec is loaded and the client initialized on first use, then cached.\n\nFull API documentation: [https://docs.epilot.io/api](https://docs.epilot.io/api)\n\n## API Reference\n\n<!-- api-reference-table -->\n| API | Import | Docs |\n| --- | ------ | ---- |\n| `epilot.accessToken` | `@epilot/sdk/access-token` | [docs](./docs/access-token.md) |\n| `epilot.address` | `@epilot/sdk/address` | [docs](./docs/address.md) |\n| `epilot.addressSuggestions` | `@epilot/sdk/address-suggestions` | [docs](./docs/address-suggestions.md) |\n| `epilot.aiAgents` | `@epilot/sdk/ai-agents` | [docs](./docs/ai-agents.md) |\n| `epilot.app` | `@epilot/sdk/app` | [docs](./docs/app.md) |\n| `epilot.auditLogs` | `@epilot/sdk/audit-logs` | [docs](./docs/audit-logs.md) |\n| `epilot.automation` | `@epilot/sdk/automation` | [docs](./docs/automation.md) |\n| `epilot.billing` | `@epilot/sdk/billing` | [docs](./docs/billing.md) |\n| `epilot.blueprintManifest` | `@epilot/sdk/blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |\n| `epilot.calendar` | `@epilot/sdk/calendar` | [docs](./docs/calendar.md) |\n| `epilot.configurationHub` | `@epilot/sdk/configuration-hub` | [docs](./docs/configuration-hub.md) |\n| `epilot.consent` | `@epilot/sdk/consent` | [docs](./docs/consent.md) |\n| `epilot.customerPortal` | `@epilot/sdk/customer-portal` | [docs](./docs/customer-portal.md) |\n| `epilot.dashboard` | `@epilot/sdk/dashboard` | [docs](./docs/dashboard.md) |\n| `epilot.dataGovernance` | `@epilot/sdk/data-governance` | [docs](./docs/data-governance.md) |\n| `epilot.deduplication` | `@epilot/sdk/deduplication` | [docs](./docs/deduplication.md) |\n| `epilot.design` | `@epilot/sdk/design` | [docs](./docs/design.md) |\n| `epilot.document` | `@epilot/sdk/document` | [docs](./docs/document.md) |\n| `epilot.emailSettings` | `@epilot/sdk/email-settings` | [docs](./docs/email-settings.md) |\n| `epilot.emailTemplate` | `@epilot/sdk/email-template` | [docs](./docs/email-template.md) |\n| `epilot.entity` | `@epilot/sdk/entity` | [docs](./docs/entity.md) |\n| `epilot.entityMapping` | `@epilot/sdk/entity-mapping` | [docs](./docs/entity-mapping.md) |\n| `epilot.environments` | `@epilot/sdk/environments` | [docs](./docs/environments.md) |\n| `epilot.eventCatalog` | `@epilot/sdk/event-catalog` | [docs](./docs/event-catalog.md) |\n| `epilot.file` | `@epilot/sdk/file` | [docs](./docs/file.md) |\n| `epilot.iban` | `@epilot/sdk/iban` | [docs](./docs/iban.md) |\n| `epilot.integrationToolkit` | `@epilot/sdk/integration-toolkit` | [docs](./docs/integration-toolkit.md) |\n| `epilot.journey` | `@epilot/sdk/journey` | [docs](./docs/journey.md) |\n| `epilot.kanban` | `@epilot/sdk/kanban` | [docs](./docs/kanban.md) |\n| `epilot.message` | `@epilot/sdk/message` | [docs](./docs/message.md) |\n| `epilot.metering` | `@epilot/sdk/metering` | [docs](./docs/metering.md) |\n| `epilot.notes` | `@epilot/sdk/notes` | [docs](./docs/notes.md) |\n| `epilot.notification` | `@epilot/sdk/notification` | [docs](./docs/notification.md) |\n| `epilot.organization` | `@epilot/sdk/organization` | [docs](./docs/organization.md) |\n| `epilot.partnerDirectory` | `@epilot/sdk/partner-directory` | [docs](./docs/partner-directory.md) |\n| `epilot.permissions` | `@epilot/sdk/permissions` | [docs](./docs/permissions.md) |\n| `epilot.pricing` | `@epilot/sdk/pricing` | [docs](./docs/pricing.md) |\n| `epilot.pricingTier` | `@epilot/sdk/pricing-tier` | [docs](./docs/pricing-tier.md) |\n| `epilot.purpose` | `@epilot/sdk/purpose` | [docs](./docs/purpose.md) |\n| `epilot.query` | `@epilot/sdk/query` | [docs](./docs/query.md) |\n| `epilot.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.md) |\n| `epilot.sharing` | `@epilot/sdk/sharing` | [docs](./docs/sharing.md) |\n| `epilot.snapshot` | `@epilot/sdk/snapshot` | [docs](./docs/snapshot.md) |\n| `epilot.submission` | `@epilot/sdk/submission` | [docs](./docs/submission.md) |\n| `epilot.targeting` | `@epilot/sdk/targeting` | [docs](./docs/targeting.md) |\n| `epilot.templateVariables` | `@epilot/sdk/template-variables` | [docs](./docs/template-variables.md) |\n| `epilot.user` | `@epilot/sdk/user` | [docs](./docs/user.md) |\n| `epilot.validationRules` | `@epilot/sdk/validation-rules` | [docs](./docs/validation-rules.md) |\n| `epilot.webhooks` | `@epilot/sdk/webhooks` | [docs](./docs/webhooks.md) |\n| `epilot.workflow` | `@epilot/sdk/workflow` | [docs](./docs/workflow.md) |\n| `epilot.workflowDefinition` | `@epilot/sdk/workflow-definition` | [docs](./docs/workflow-definition.md) |\n<!-- /api-reference-table -->\n\n## OpenAPI Spec\n\nRetrieve the full OpenAPI specification for any API at runtime. The spec is lazy-loaded on first call and cached.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Via API handle\nconst entitySpec = await epilot.entity.openapi()\nconsole.log(entitySpec.info.title) // \"Entity API\"\nconsole.log(entitySpec.paths) // all paths with full schemas\n\n// Via top-level method\nconst spec = await epilot.openapi('entity')\n```\n\nFor tree-shakeable imports:\n\n```ts\nimport { openapi } from '@epilot/sdk/entity'\n\nconst spec = await openapi()\n```\n\n## Explicit Client Access\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\n\n// Get the cached singleton client\nconst entityClient = epilot.entity.getClient()\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Create a fresh (non-singleton) client instance\nconst freshClient = epilot.entity.createClient()\nauthorize(freshClient, () => '<my-token>')\n```\n\n## Tree-Shakeable Imports\n\nImport only what you need. Other APIs never touch your bundle.\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Or use the handle for direct operation forwarding\nimport { entity } from '@epilot/sdk/entity'\nconst { data } = await entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n## Types\n\nEach API subpath re-exports all schema types generated from the OpenAPI spec. Import them directly:\n\n```ts\nimport type { Entity, EntitySchema, RelationAttribute } from '@epilot/sdk/entity'\nimport type { FileItem } from '@epilot/sdk/file'\nimport type { AutomationFlow } from '@epilot/sdk/automation'\n```\n\nThe `Client`, `OperationMethods`, and `PathsDictionary` types are also available for typing client instances:\n\n```ts\nimport type { Client } from '@epilot/sdk/entity'\n\nconst entityClient: Client = epilot.entity.getClient()\n```\n\n## Headers\n\n### Global Headers\n\nSet default headers applied to all clients. Useful for `x-epilot-org-id`, `x-epilot-user-id`, etc.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.headers({\n 'x-epilot-org-id': 'org-123',\n 'x-epilot-user-id': 'user-456',\n})\n\nconst { data } = await epilot.entity.searchEntities(...)\n```\n\n### Standard Axios Headers\n\nUse standard axios `defaults.headers.common` on individual clients:\n\n```ts\nconst entityClient = epilot.entity.getClient()\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Auth Patterns\n\n`authorize()` accepts a string or a function. The function form is preferred \u2014 it is called on every request, so tokens stay fresh.\n\n```ts\nimport { authorize } from '@epilot/sdk'\nimport { getClient } from '@epilot/sdk/entity'\n\n// Per-client \u2014 function predicate (recommended)\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\n// Per-client \u2014 async function (e.g. OAuth / session)\nauthorize(entityClient, async () => {\n return await getTokenFromSession()\n})\n\n// Per-client \u2014 static string (sets default header once)\nauthorize(entityClient, 'my-static-api-token')\n```\n\n```ts\n// Global \u2014 applies to all clients resolved from the SDK\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.authorize(async () => await getTokenFromSession())\nepilot.authorize('my-static-api-token')\n```\n\n## Fresh Client Instance\n\n```ts\nimport { createClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = createClient()\nauthorize(entityClient, () => '<my-token>')\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Multiple SDK Instances\n\n```ts\nimport { createSDK } from '@epilot/sdk'\n\nconst sdk1 = createSDK()\nsdk1.authorize(() => '<token-for-org-1>')\nsdk1.headers({ 'x-epilot-org-id': 'org-1' })\n\nconst sdk2 = createSDK()\nsdk2.authorize(() => '<token-for-org-2>')\nsdk2.headers({ 'x-epilot-org-id': 'org-2' })\n```\n\n\n## Interceptors\n\nUse axios interceptors for custom request/response processing. Since clients are axios instances, you can use `client.interceptors` directly:\n\n```ts\nentityClient.interceptors.response.use((response) => {\n console.debug(`${response.config.method?.toUpperCase()} ${response.config.url}`, {\n status: response.status,\n data: response.data,\n })\n return response\n})\n```\n\nOr register global interceptors applied to all clients:\n\n```ts\nepilot.interceptors.request((config) => {\n config.headers['x-correlation-id'] = generateTraceId()\n return config\n})\n```\n\n## Auto-Retry (429 Too Many Requests)\n\nThe SDK automatically retries requests that receive a `429 Too Many Requests` response. It respects the `Retry-After` header (in seconds) to determine how long to wait before retrying.\n\nEnabled by default with up to 3 retries.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Customize retry behavior\nepilot.retry({ maxRetries: 5, defaultDelayMs: 2000 })\n\n// Disable retries\nepilot.retry({ maxRetries: 0 })\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `maxRetries` | `3` | Maximum number of retries. Set to `0` to disable. |\n| `defaultDelayMs` | `1000` | Fallback delay in ms when `Retry-After` header is missing. |\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyRetryInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyRetryInterceptor({ client: entityClient, config: { maxRetries: 3 } })\n```\n\n## Large Response Handling (413 Payload Too Large)\n\nepilot APIs use a [large response middleware](https://github.com/epilot-dev/aws-lambda-utility-middlewares) to work around the AWS Lambda 6MB response limit. When a response exceeds ~5.1MB, the API uploads the payload to S3 and returns a presigned URL instead.\n\nThe SDK handles this transparently \u2014 it sends the opt-in `Accept` header and automatically fetches the full payload from S3 when a large response URL is returned. Enabled by default.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Disable large response handling\nepilot.largeResponse({ enabled: false })\n```\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyLargeResponseInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyLargeResponseInterceptor({ client: entityClient, config: { enabled: true } })\n```\n\n## Overrides & Custom APIs\n\nOverride built-in API specs or register custom APIs via `.epilot/sdk-overrides.json`. This is useful for testing new versions of an API spec or getting the latest types without waiting for an SDK release.\n\n```json\n{\n \"entity\": \"./specs/entity-openapi.json\",\n \"myNewApi\": \"./specs/my-new-api-openapi.json\"\n}\n```\n\n```ts\n// Built-in API with overridden spec\nconst { data } = await epilot.entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n### Override Commands\n\n```bash\n# Apply all overrides from .epilot/sdk-overrides.json\nnpx epilot-sdk override\n\n# Override a single API\nnpx epilot-sdk override entity ./my-local-entity-spec.yaml\n\n# Regenerate types after spec changes\nnpx epilot-sdk typegen\n```\n\n<details>\n<summary>Migration from <code>@epilot/*-client</code></summary>\n\nDrop-in replacement \u2014 just change the import path:\n\n```ts\n// Before\nimport { getClient, createClient, authorize } from '@epilot/entity-client'\nimport type { Client, Entity } from '@epilot/entity-client'\n\n// After\nimport { getClient, createClient, authorize } from '@epilot/sdk/entity'\nimport type { Client, Entity } from '@epilot/sdk/entity'\n```\n\n</details>\n\n<details>\n<summary>Client Lifecycle</summary>\n\nWhen you call `authorize()`, `headers()`, `retry()`, `largeResponse()`, or `interceptors`, the SDK invalidates all cached client instances. The next operation call creates a fresh client with the updated configuration.\n\n**Operation methods are always up to date** \u2014 calls like `epilot.entity.getEntity(...)` re-resolve the client on every invocation, so they always use the latest config.\n\n**Direct `getClient()` references can go stale** \u2014 if you hold a reference and then change config, your reference still points to the old client:\n\n```ts\nconst entityClient = epilot.entity.getClient()\n\nepilot.authorize('new-token') // invalidates all cached clients\n\n// entityClient still has the old token\n// epilot.entity.getEntity(...) will use a new client with the new token\n```\n\nIf you need a long-lived reference that survives config changes, call `getClient()` again after changing config, or use operation methods directly.\n\n</details>\n";
|
|
5
|
+
export {
|
|
6
|
+
README_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/README.json
|
|
4
|
+
var README_default = "<h1 align=\"center\"><img alt=\"epilot\" src=\"https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png\" width=\"200\"><br>@epilot/sdk</h1>\n\n<p align=\"center\">\n <a href=\"https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI\"><img src=\"https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg\" alt=\"CI\"></a>\n <a href=\"https://www.npmjs.com/package/@epilot/sdk\"><img src=\"https://img.shields.io/npm/v/@epilot/sdk.svg\" alt=\"npm version\"></a>\n <a href=\"https://github.com/epilot-dev/sdk-js/blob/main/\"><img src=\"http://img.shields.io/:license-mit-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">JavaScript/TypeScript SDK for epilot APIs. Full types, tree-shakeable imports, and lazy-loaded OpenAPI specs.</p>\n\n## Install\n\n```bash\nnpm i @epilot/sdk axios openapi-client-axios\n```\n\n## Quick Start\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-bearer-token>')\n\nconst { data: entity } = await epilot.entity.createEntity(\n { slug: 'contact' },\n { first_name: 'John', last_name: 'Doe' },\n)\n\nconst { data: file } = await epilot.file.getFile({ id: 'file-123' })\n\nconst { data: executions } = await epilot.workflow.getExecutions()\n```\n\nAPI clients are built on [openapi-client-axios](https://openapistack.co/docs/openapi-client-axios/intro/), which generates fully typed operation methods on top of regular [axios](https://axios-http.com/docs/intro) instances. All standard axios features (interceptors, defaults, config) work as expected. Each operation is forwarded to a lazy singleton \u2014 the spec is loaded and the client initialized on first use, then cached.\n\nFull API documentation: [https://docs.epilot.io/api](https://docs.epilot.io/api)\n\n## API Reference\n\n<!-- api-reference-table -->\n| API | Import | Docs |\n| --- | ------ | ---- |\n| `epilot.accessToken` | `@epilot/sdk/access-token` | [docs](./docs/access-token.md) |\n| `epilot.address` | `@epilot/sdk/address` | [docs](./docs/address.md) |\n| `epilot.addressSuggestions` | `@epilot/sdk/address-suggestions` | [docs](./docs/address-suggestions.md) |\n| `epilot.aiAgents` | `@epilot/sdk/ai-agents` | [docs](./docs/ai-agents.md) |\n| `epilot.app` | `@epilot/sdk/app` | [docs](./docs/app.md) |\n| `epilot.auditLogs` | `@epilot/sdk/audit-logs` | [docs](./docs/audit-logs.md) |\n| `epilot.automation` | `@epilot/sdk/automation` | [docs](./docs/automation.md) |\n| `epilot.billing` | `@epilot/sdk/billing` | [docs](./docs/billing.md) |\n| `epilot.blueprintManifest` | `@epilot/sdk/blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |\n| `epilot.calendar` | `@epilot/sdk/calendar` | [docs](./docs/calendar.md) |\n| `epilot.configurationHub` | `@epilot/sdk/configuration-hub` | [docs](./docs/configuration-hub.md) |\n| `epilot.consent` | `@epilot/sdk/consent` | [docs](./docs/consent.md) |\n| `epilot.customerPortal` | `@epilot/sdk/customer-portal` | [docs](./docs/customer-portal.md) |\n| `epilot.dashboard` | `@epilot/sdk/dashboard` | [docs](./docs/dashboard.md) |\n| `epilot.dataGovernance` | `@epilot/sdk/data-governance` | [docs](./docs/data-governance.md) |\n| `epilot.deduplication` | `@epilot/sdk/deduplication` | [docs](./docs/deduplication.md) |\n| `epilot.design` | `@epilot/sdk/design` | [docs](./docs/design.md) |\n| `epilot.document` | `@epilot/sdk/document` | [docs](./docs/document.md) |\n| `epilot.emailSettings` | `@epilot/sdk/email-settings` | [docs](./docs/email-settings.md) |\n| `epilot.emailTemplate` | `@epilot/sdk/email-template` | [docs](./docs/email-template.md) |\n| `epilot.entity` | `@epilot/sdk/entity` | [docs](./docs/entity.md) |\n| `epilot.entityMapping` | `@epilot/sdk/entity-mapping` | [docs](./docs/entity-mapping.md) |\n| `epilot.environments` | `@epilot/sdk/environments` | [docs](./docs/environments.md) |\n| `epilot.eventCatalog` | `@epilot/sdk/event-catalog` | [docs](./docs/event-catalog.md) |\n| `epilot.file` | `@epilot/sdk/file` | [docs](./docs/file.md) |\n| `epilot.iban` | `@epilot/sdk/iban` | [docs](./docs/iban.md) |\n| `epilot.integrationToolkit` | `@epilot/sdk/integration-toolkit` | [docs](./docs/integration-toolkit.md) |\n| `epilot.journey` | `@epilot/sdk/journey` | [docs](./docs/journey.md) |\n| `epilot.kanban` | `@epilot/sdk/kanban` | [docs](./docs/kanban.md) |\n| `epilot.message` | `@epilot/sdk/message` | [docs](./docs/message.md) |\n| `epilot.metering` | `@epilot/sdk/metering` | [docs](./docs/metering.md) |\n| `epilot.notes` | `@epilot/sdk/notes` | [docs](./docs/notes.md) |\n| `epilot.notification` | `@epilot/sdk/notification` | [docs](./docs/notification.md) |\n| `epilot.organization` | `@epilot/sdk/organization` | [docs](./docs/organization.md) |\n| `epilot.partnerDirectory` | `@epilot/sdk/partner-directory` | [docs](./docs/partner-directory.md) |\n| `epilot.permissions` | `@epilot/sdk/permissions` | [docs](./docs/permissions.md) |\n| `epilot.pricing` | `@epilot/sdk/pricing` | [docs](./docs/pricing.md) |\n| `epilot.pricingTier` | `@epilot/sdk/pricing-tier` | [docs](./docs/pricing-tier.md) |\n| `epilot.purpose` | `@epilot/sdk/purpose` | [docs](./docs/purpose.md) |\n| `epilot.query` | `@epilot/sdk/query` | [docs](./docs/query.md) |\n| `epilot.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.md) |\n| `epilot.sharing` | `@epilot/sdk/sharing` | [docs](./docs/sharing.md) |\n| `epilot.snapshot` | `@epilot/sdk/snapshot` | [docs](./docs/snapshot.md) |\n| `epilot.submission` | `@epilot/sdk/submission` | [docs](./docs/submission.md) |\n| `epilot.targeting` | `@epilot/sdk/targeting` | [docs](./docs/targeting.md) |\n| `epilot.templateVariables` | `@epilot/sdk/template-variables` | [docs](./docs/template-variables.md) |\n| `epilot.user` | `@epilot/sdk/user` | [docs](./docs/user.md) |\n| `epilot.validationRules` | `@epilot/sdk/validation-rules` | [docs](./docs/validation-rules.md) |\n| `epilot.webhooks` | `@epilot/sdk/webhooks` | [docs](./docs/webhooks.md) |\n| `epilot.workflow` | `@epilot/sdk/workflow` | [docs](./docs/workflow.md) |\n| `epilot.workflowDefinition` | `@epilot/sdk/workflow-definition` | [docs](./docs/workflow-definition.md) |\n<!-- /api-reference-table -->\n\n## OpenAPI Spec\n\nRetrieve the full OpenAPI specification for any API at runtime. The spec is lazy-loaded on first call and cached.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Via API handle\nconst entitySpec = await epilot.entity.openapi()\nconsole.log(entitySpec.info.title) // \"Entity API\"\nconsole.log(entitySpec.paths) // all paths with full schemas\n\n// Via top-level method\nconst spec = await epilot.openapi('entity')\n```\n\nFor tree-shakeable imports:\n\n```ts\nimport { openapi } from '@epilot/sdk/entity'\n\nconst spec = await openapi()\n```\n\n## Explicit Client Access\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\n\n// Get the cached singleton client\nconst entityClient = epilot.entity.getClient()\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Create a fresh (non-singleton) client instance\nconst freshClient = epilot.entity.createClient()\nauthorize(freshClient, () => '<my-token>')\n```\n\n## Tree-Shakeable Imports\n\nImport only what you need. Other APIs never touch your bundle.\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Or use the handle for direct operation forwarding\nimport { entity } from '@epilot/sdk/entity'\nconst { data } = await entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n## Types\n\nEach API subpath re-exports all schema types generated from the OpenAPI spec. Import them directly:\n\n```ts\nimport type { Entity, EntitySchema, RelationAttribute } from '@epilot/sdk/entity'\nimport type { FileItem } from '@epilot/sdk/file'\nimport type { AutomationFlow } from '@epilot/sdk/automation'\n```\n\nThe `Client`, `OperationMethods`, and `PathsDictionary` types are also available for typing client instances:\n\n```ts\nimport type { Client } from '@epilot/sdk/entity'\n\nconst entityClient: Client = epilot.entity.getClient()\n```\n\n## Headers\n\n### Global Headers\n\nSet default headers applied to all clients. Useful for `x-epilot-org-id`, `x-epilot-user-id`, etc.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.headers({\n 'x-epilot-org-id': 'org-123',\n 'x-epilot-user-id': 'user-456',\n})\n\nconst { data } = await epilot.entity.searchEntities(...)\n```\n\n### Standard Axios Headers\n\nUse standard axios `defaults.headers.common` on individual clients:\n\n```ts\nconst entityClient = epilot.entity.getClient()\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Auth Patterns\n\n`authorize()` accepts a string or a function. The function form is preferred \u2014 it is called on every request, so tokens stay fresh.\n\n```ts\nimport { authorize } from '@epilot/sdk'\nimport { getClient } from '@epilot/sdk/entity'\n\n// Per-client \u2014 function predicate (recommended)\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\n// Per-client \u2014 async function (e.g. OAuth / session)\nauthorize(entityClient, async () => {\n return await getTokenFromSession()\n})\n\n// Per-client \u2014 static string (sets default header once)\nauthorize(entityClient, 'my-static-api-token')\n```\n\n```ts\n// Global \u2014 applies to all clients resolved from the SDK\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.authorize(async () => await getTokenFromSession())\nepilot.authorize('my-static-api-token')\n```\n\n## Fresh Client Instance\n\n```ts\nimport { createClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = createClient()\nauthorize(entityClient, () => '<my-token>')\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Multiple SDK Instances\n\n```ts\nimport { createSDK } from '@epilot/sdk'\n\nconst sdk1 = createSDK()\nsdk1.authorize(() => '<token-for-org-1>')\nsdk1.headers({ 'x-epilot-org-id': 'org-1' })\n\nconst sdk2 = createSDK()\nsdk2.authorize(() => '<token-for-org-2>')\nsdk2.headers({ 'x-epilot-org-id': 'org-2' })\n```\n\n\n## Interceptors\n\nUse axios interceptors for custom request/response processing. Since clients are axios instances, you can use `client.interceptors` directly:\n\n```ts\nentityClient.interceptors.response.use((response) => {\n console.debug(`${response.config.method?.toUpperCase()} ${response.config.url}`, {\n status: response.status,\n data: response.data,\n })\n return response\n})\n```\n\nOr register global interceptors applied to all clients:\n\n```ts\nepilot.interceptors.request((config) => {\n config.headers['x-correlation-id'] = generateTraceId()\n return config\n})\n```\n\n## Auto-Retry (429 Too Many Requests)\n\nThe SDK automatically retries requests that receive a `429 Too Many Requests` response. It respects the `Retry-After` header (in seconds) to determine how long to wait before retrying.\n\nEnabled by default with up to 3 retries.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Customize retry behavior\nepilot.retry({ maxRetries: 5, defaultDelayMs: 2000 })\n\n// Disable retries\nepilot.retry({ maxRetries: 0 })\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `maxRetries` | `3` | Maximum number of retries. Set to `0` to disable. |\n| `defaultDelayMs` | `1000` | Fallback delay in ms when `Retry-After` header is missing. |\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyRetryInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyRetryInterceptor({ client: entityClient, config: { maxRetries: 3 } })\n```\n\n## Large Response Handling (413 Payload Too Large)\n\nepilot APIs use a [large response middleware](https://github.com/epilot-dev/aws-lambda-utility-middlewares) to work around the AWS Lambda 6MB response limit. When a response exceeds ~5.1MB, the API uploads the payload to S3 and returns a presigned URL instead.\n\nThe SDK handles this transparently \u2014 it sends the opt-in `Accept` header and automatically fetches the full payload from S3 when a large response URL is returned. Enabled by default.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Disable large response handling\nepilot.largeResponse({ enabled: false })\n```\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyLargeResponseInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyLargeResponseInterceptor({ client: entityClient, config: { enabled: true } })\n```\n\n## Overrides & Custom APIs\n\nOverride built-in API specs or register custom APIs via `.epilot/sdk-overrides.json`. This is useful for testing new versions of an API spec or getting the latest types without waiting for an SDK release.\n\n```json\n{\n \"entity\": \"./specs/entity-openapi.json\",\n \"myNewApi\": \"./specs/my-new-api-openapi.json\"\n}\n```\n\n```ts\n// Built-in API with overridden spec\nconst { data } = await epilot.entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n### Override Commands\n\n```bash\n# Apply all overrides from .epilot/sdk-overrides.json\nnpx epilot-sdk override\n\n# Override a single API\nnpx epilot-sdk override entity ./my-local-entity-spec.yaml\n\n# Regenerate types after spec changes\nnpx epilot-sdk typegen\n```\n\n<details>\n<summary>Migration from <code>@epilot/*-client</code></summary>\n\nDrop-in replacement \u2014 just change the import path:\n\n```ts\n// Before\nimport { getClient, createClient, authorize } from '@epilot/entity-client'\nimport type { Client, Entity } from '@epilot/entity-client'\n\n// After\nimport { getClient, createClient, authorize } from '@epilot/sdk/entity'\nimport type { Client, Entity } from '@epilot/sdk/entity'\n```\n\n</details>\n\n<details>\n<summary>Client Lifecycle</summary>\n\nWhen you call `authorize()`, `headers()`, `retry()`, `largeResponse()`, or `interceptors`, the SDK invalidates all cached client instances. The next operation call creates a fresh client with the updated configuration.\n\n**Operation methods are always up to date** \u2014 calls like `epilot.entity.getEntity(...)` re-resolve the client on every invocation, so they always use the latest config.\n\n**Direct `getClient()` references can go stale** \u2014 if you hold a reference and then change config, your reference still points to the old client:\n\n```ts\nconst entityClient = epilot.entity.getClient()\n\nepilot.authorize('new-token') // invalidates all cached clients\n\n// entityClient still has the old token\n// epilot.entity.getEntity(...) will use a new client with the new token\n```\n\nIf you need a long-lived reference that survives config changes, call `getClient()` again after changing config, or use operation methods directly.\n\n</details>\n";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = README_default;
|
|
@@ -6,25 +6,25 @@ var _chunkS5HBBTKMcjs = require('../chunk-S5HBBTKM.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkXRIEGQXLcjs = require('../chunk-XRIEGQXL.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/access-token.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
14
|
const mod = _chunkS5HBBTKMcjs.require_access_token_runtime.call(void 0, );
|
|
15
|
-
return
|
|
15
|
+
return _chunkXRIEGQXLcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: def, apiName: "accessToken" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkXRIEGQXLcjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "accessToken" }),
|
|
28
28
|
apiName: "accessToken"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var accessToken = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.accessToken = accessToken; exports.authorize =
|
|
38
|
+
exports.accessToken = accessToken; exports.authorize = _chunkXRIEGQXLcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
|
|
@@ -6,25 +6,25 @@ var _chunkLKRBFBFNcjs = require('../chunk-LKRBFBFN.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkXRIEGQXLcjs = require('../chunk-XRIEGQXL.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/address-suggestions.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
14
|
const mod = _chunkLKRBFBFNcjs.require_address_suggestions_runtime.call(void 0, );
|
|
15
|
-
return
|
|
15
|
+
return _chunkXRIEGQXLcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: def, apiName: "addressSuggestions" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkXRIEGQXLcjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "addressSuggestions" }),
|
|
28
28
|
apiName: "addressSuggestions"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var addressSuggestions = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.addressSuggestions = addressSuggestions; exports.authorize =
|
|
38
|
+
exports.addressSuggestions = addressSuggestions; exports.authorize = _chunkXRIEGQXLcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
|
package/dist/apis/address.cjs
CHANGED
|
@@ -6,25 +6,25 @@ var _chunkT67ZXTVGcjs = require('../chunk-T67ZXTVG.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkXRIEGQXLcjs = require('../chunk-XRIEGQXL.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/address.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
14
|
const mod = _chunkT67ZXTVGcjs.require_address_runtime.call(void 0, );
|
|
15
|
-
return
|
|
15
|
+
return _chunkXRIEGQXLcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: def, apiName: "address" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkXRIEGQXLcjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "address" }),
|
|
28
28
|
apiName: "address"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var address = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.address = address; exports.authorize =
|
|
38
|
+
exports.address = address; exports.authorize = _chunkXRIEGQXLcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
|
package/dist/apis/address.js
CHANGED
package/dist/apis/ai-agents.cjs
CHANGED
|
@@ -6,25 +6,25 @@ var _chunkFARDEGPHcjs = require('../chunk-FARDEGPH.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkXRIEGQXLcjs = require('../chunk-XRIEGQXL.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/ai-agents.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
14
|
const mod = _chunkFARDEGPHcjs.require_ai_agents_runtime.call(void 0, );
|
|
15
|
-
return
|
|
15
|
+
return _chunkXRIEGQXLcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: def, apiName: "aiAgents" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkXRIEGQXLcjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "aiAgents" }),
|
|
28
28
|
apiName: "aiAgents"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var aiAgents = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.aiAgents = aiAgents; exports.authorize =
|
|
38
|
+
exports.aiAgents = aiAgents; exports.authorize = _chunkXRIEGQXLcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
|
package/dist/apis/ai-agents.js
CHANGED
package/dist/apis/app.cjs
CHANGED
|
@@ -6,25 +6,25 @@ var _chunkKMVJYNLBcjs = require('../chunk-KMVJYNLB.cjs');
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkXRIEGQXLcjs = require('../chunk-XRIEGQXL.cjs');
|
|
10
10
|
require('../chunk-NJK5F5TF.cjs');
|
|
11
11
|
|
|
12
12
|
// src/apis/app.ts
|
|
13
13
|
var loadDefinition = () => {
|
|
14
14
|
const mod = _chunkKMVJYNLBcjs.require_app_runtime.call(void 0, );
|
|
15
|
-
return
|
|
15
|
+
return _chunkXRIEGQXLcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
|
|
16
16
|
};
|
|
17
17
|
var _instance = null;
|
|
18
18
|
var resolve = () => {
|
|
19
19
|
if (!_instance) {
|
|
20
20
|
const def = loadDefinition();
|
|
21
|
-
_instance =
|
|
21
|
+
_instance = _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: def, apiName: "app" });
|
|
22
22
|
}
|
|
23
23
|
return _instance;
|
|
24
24
|
};
|
|
25
|
-
var _handle =
|
|
25
|
+
var _handle = _chunkXRIEGQXLcjs.createApiHandle.call(void 0, {
|
|
26
26
|
resolveClient: resolve,
|
|
27
|
-
createClient: () =>
|
|
27
|
+
createClient: () => _chunkXRIEGQXLcjs.createApiClient.call(void 0, { definition: loadDefinition(), apiName: "app" }),
|
|
28
28
|
apiName: "app"
|
|
29
29
|
});
|
|
30
30
|
var getClient = _handle.getClient;
|
|
@@ -35,4 +35,4 @@ var app = _handle;
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
exports.app = app; exports.authorize =
|
|
38
|
+
exports.app = app; exports.authorize = _chunkXRIEGQXLcjs.authorize; exports.createClient = createClient; exports.getClient = getClient;
|