@epilot/sdk 2.8.9 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/README.md +0 -1
  2. package/definitions/access-token-runtime.json +1 -1
  3. package/definitions/access-token.json +1 -155
  4. package/definitions/automation.json +0 -120
  5. package/definitions/blueprint-manifest-runtime.json +1 -1
  6. package/definitions/blueprint-manifest.json +1 -571
  7. package/definitions/focus-pocus-runtime.json +1 -0
  8. package/definitions/focus-pocus.json +757 -0
  9. package/definitions/integration-toolkit.json +30 -5
  10. package/definitions/journey.json +2 -19
  11. package/definitions/targeting.json +4 -5
  12. package/definitions/user-runtime.json +1 -1
  13. package/definitions/user.json +0 -441
  14. package/dist/README-46VYEGGW.js +7 -0
  15. package/dist/README-IVBISSWB.cjs +7 -0
  16. package/dist/{_index-UY46ZN47.js → _index-5FB6F5YY.js} +0 -3
  17. package/dist/{_index-D5TTZP5F.cjs → _index-DB2VV4PQ.cjs} +1 -4
  18. package/dist/access-token-6BJDZSFE.cjs +7 -0
  19. package/dist/access-token-GSQZLDXR.js +7 -0
  20. package/dist/{access-token-runtime-2PSLN2U3.js → access-token-runtime-KCKGT4O7.js} +1 -1
  21. package/dist/{access-token-runtime-B6Z7JLUS.cjs → access-token-runtime-NZWZJPWV.cjs} +2 -2
  22. package/dist/{access-token.d-CegaQmrK.d.cts → access-token.d-CnmUTOlq.d.cts} +5 -165
  23. package/dist/{access-token.d-CegaQmrK.d.ts → access-token.d-CnmUTOlq.d.ts} +5 -165
  24. package/dist/{ai-agents.d-CC5IjXrs.d.ts → ai-agents.d-OkXfr2bz.d.cts} +2 -0
  25. package/dist/{ai-agents.d-CC5IjXrs.d.cts → ai-agents.d-OkXfr2bz.d.ts} +2 -0
  26. package/dist/apis/access-token.cjs +8 -8
  27. package/dist/apis/access-token.d.cts +2 -2
  28. package/dist/apis/access-token.d.ts +2 -2
  29. package/dist/apis/access-token.js +2 -2
  30. package/dist/apis/address-suggestions.cjs +6 -6
  31. package/dist/apis/address-suggestions.js +1 -1
  32. package/dist/apis/address.cjs +6 -6
  33. package/dist/apis/address.js +1 -1
  34. package/dist/apis/ai-agents.cjs +6 -6
  35. package/dist/apis/ai-agents.d.cts +2 -2
  36. package/dist/apis/ai-agents.d.ts +2 -2
  37. package/dist/apis/ai-agents.js +1 -1
  38. package/dist/apis/app.cjs +6 -6
  39. package/dist/apis/app.js +1 -1
  40. package/dist/apis/audit-logs.cjs +6 -6
  41. package/dist/apis/audit-logs.js +1 -1
  42. package/dist/apis/automation.cjs +6 -6
  43. package/dist/apis/automation.d.cts +2 -2
  44. package/dist/apis/automation.d.ts +2 -2
  45. package/dist/apis/automation.js +1 -1
  46. package/dist/apis/billing.cjs +6 -6
  47. package/dist/apis/billing.js +1 -1
  48. package/dist/apis/blueprint-manifest.cjs +8 -8
  49. package/dist/apis/blueprint-manifest.d.cts +2 -2
  50. package/dist/apis/blueprint-manifest.d.ts +2 -2
  51. package/dist/apis/blueprint-manifest.js +2 -2
  52. package/dist/apis/calendar.cjs +6 -6
  53. package/dist/apis/calendar.js +1 -1
  54. package/dist/apis/configuration-hub.cjs +6 -6
  55. package/dist/apis/configuration-hub.js +1 -1
  56. package/dist/apis/consent.cjs +6 -6
  57. package/dist/apis/consent.js +1 -1
  58. package/dist/apis/customer-portal.cjs +6 -6
  59. package/dist/apis/customer-portal.js +1 -1
  60. package/dist/apis/dashboard.cjs +6 -6
  61. package/dist/apis/dashboard.js +1 -1
  62. package/dist/apis/data-governance.cjs +6 -6
  63. package/dist/apis/data-governance.js +1 -1
  64. package/dist/apis/deduplication.cjs +6 -6
  65. package/dist/apis/deduplication.js +1 -1
  66. package/dist/apis/design.cjs +6 -6
  67. package/dist/apis/design.js +1 -1
  68. package/dist/apis/document.cjs +6 -6
  69. package/dist/apis/document.js +1 -1
  70. package/dist/apis/email-settings.cjs +6 -6
  71. package/dist/apis/email-settings.js +1 -1
  72. package/dist/apis/email-template.cjs +6 -6
  73. package/dist/apis/email-template.js +1 -1
  74. package/dist/apis/entity-mapping.cjs +6 -6
  75. package/dist/apis/entity-mapping.js +1 -1
  76. package/dist/apis/entity.cjs +6 -6
  77. package/dist/apis/entity.js +1 -1
  78. package/dist/apis/environments.cjs +6 -6
  79. package/dist/apis/environments.js +1 -1
  80. package/dist/apis/event-catalog.cjs +6 -6
  81. package/dist/apis/event-catalog.js +1 -1
  82. package/dist/apis/file.cjs +6 -6
  83. package/dist/apis/file.js +1 -1
  84. package/dist/apis/iban.cjs +6 -6
  85. package/dist/apis/iban.js +1 -1
  86. package/dist/apis/integration-toolkit.cjs +6 -6
  87. package/dist/apis/integration-toolkit.d.cts +2 -2
  88. package/dist/apis/integration-toolkit.d.ts +2 -2
  89. package/dist/apis/integration-toolkit.js +1 -1
  90. package/dist/apis/journey.cjs +6 -6
  91. package/dist/apis/journey.d.cts +2 -2
  92. package/dist/apis/journey.d.ts +2 -2
  93. package/dist/apis/journey.js +1 -1
  94. package/dist/apis/kanban.cjs +6 -6
  95. package/dist/apis/kanban.js +1 -1
  96. package/dist/apis/message.cjs +6 -6
  97. package/dist/apis/message.js +1 -1
  98. package/dist/apis/metering.cjs +6 -6
  99. package/dist/apis/metering.js +1 -1
  100. package/dist/apis/notes.cjs +6 -6
  101. package/dist/apis/notes.js +1 -1
  102. package/dist/apis/notification.cjs +6 -6
  103. package/dist/apis/notification.js +1 -1
  104. package/dist/apis/organization.cjs +6 -6
  105. package/dist/apis/organization.js +1 -1
  106. package/dist/apis/partner-directory.cjs +6 -6
  107. package/dist/apis/partner-directory.js +1 -1
  108. package/dist/apis/permissions.cjs +6 -6
  109. package/dist/apis/permissions.js +1 -1
  110. package/dist/apis/pricing-tier.cjs +6 -6
  111. package/dist/apis/pricing-tier.js +1 -1
  112. package/dist/apis/pricing.cjs +6 -6
  113. package/dist/apis/pricing.js +1 -1
  114. package/dist/apis/purpose.cjs +6 -6
  115. package/dist/apis/purpose.js +1 -1
  116. package/dist/apis/query.cjs +6 -6
  117. package/dist/apis/query.js +1 -1
  118. package/dist/apis/sandbox.cjs +6 -6
  119. package/dist/apis/sandbox.js +1 -1
  120. package/dist/apis/sharing.cjs +6 -6
  121. package/dist/apis/sharing.js +1 -1
  122. package/dist/apis/submission.cjs +6 -6
  123. package/dist/apis/submission.js +1 -1
  124. package/dist/apis/target.cjs +6 -6
  125. package/dist/apis/target.js +1 -1
  126. package/dist/apis/targeting.cjs +6 -6
  127. package/dist/apis/targeting.d.cts +2 -2
  128. package/dist/apis/targeting.d.ts +2 -2
  129. package/dist/apis/targeting.js +1 -1
  130. package/dist/apis/template-variables.cjs +6 -6
  131. package/dist/apis/template-variables.js +1 -1
  132. package/dist/apis/user.cjs +8 -8
  133. package/dist/apis/user.d.cts +2 -2
  134. package/dist/apis/user.d.ts +2 -2
  135. package/dist/apis/user.js +2 -2
  136. package/dist/apis/validation-rules.cjs +6 -6
  137. package/dist/apis/validation-rules.js +1 -1
  138. package/dist/apis/webhooks.cjs +6 -6
  139. package/dist/apis/webhooks.js +1 -1
  140. package/dist/apis/workflow-definition.cjs +6 -6
  141. package/dist/apis/workflow-definition.js +1 -1
  142. package/dist/apis/workflow.cjs +6 -6
  143. package/dist/apis/workflow.js +1 -1
  144. package/dist/automation-BMO7ZFTN.cjs +7 -0
  145. package/dist/automation-MEZTSUR3.js +7 -0
  146. package/dist/{automation.d-DS_YXDE8.d.cts → automation.d-Du6-uiz5.d.cts} +1 -300
  147. package/dist/{automation.d-DS_YXDE8.d.ts → automation.d-Du6-uiz5.d.ts} +1 -300
  148. package/dist/blueprint-manifest-6DEYW5MW.js +7 -0
  149. package/dist/blueprint-manifest-GCV7H74X.cjs +7 -0
  150. package/dist/{blueprint-manifest-runtime-WU5MWPVT.cjs → blueprint-manifest-runtime-EIDOROIQ.cjs} +2 -2
  151. package/dist/{blueprint-manifest-runtime-2344IUIE.js → blueprint-manifest-runtime-FRLU3ZSF.js} +1 -1
  152. package/dist/{blueprint-manifest.d-2-TORV8o.d.ts → blueprint-manifest.d-B8yDxagC.d.cts} +4 -926
  153. package/dist/{blueprint-manifest.d-2-TORV8o.d.cts → blueprint-manifest.d-B8yDxagC.d.ts} +4 -926
  154. package/dist/chunk-3XKBB5AE.js +14 -0
  155. package/dist/{chunk-UWGWRGGB.js → chunk-4YBWMDFP.js} +1 -1
  156. package/dist/{chunk-4GI6KGKZ.cjs → chunk-CULH5PIN.cjs} +12 -14
  157. package/dist/{chunk-T57MT6J5.cjs → chunk-NGHCQ2FA.cjs} +1 -1
  158. package/dist/{chunk-S5HBBTKM.cjs → chunk-OXJOO2YF.cjs} +1 -1
  159. package/dist/{chunk-VMKT7UQS.js → chunk-RZ4ABDOF.js} +12 -14
  160. package/dist/{chunk-OHHHS4HH.js → chunk-XSE4CFSM.js} +1 -1
  161. package/dist/chunk-Z5TVWG3I.cjs +14 -0
  162. package/dist/index.cjs +16 -24
  163. package/dist/index.d.cts +22 -24
  164. package/dist/index.d.ts +22 -24
  165. package/dist/index.js +6 -14
  166. package/dist/integration-toolkit-334NGEOE.cjs +7 -0
  167. package/dist/integration-toolkit-5VCY6CUN.js +7 -0
  168. package/dist/{integration-toolkit.d-BW9RK5G-.d.cts → integration-toolkit.d-BSA9RRdq.d.cts} +22 -4
  169. package/dist/{integration-toolkit.d-BW9RK5G-.d.ts → integration-toolkit.d-BSA9RRdq.d.ts} +22 -4
  170. package/dist/journey-4DIIPRU4.js +7 -0
  171. package/dist/journey-ATC3Y5AW.cjs +7 -0
  172. package/dist/{journey.d-B1sOeMHw.d.cts → journey.d-BenIUWaO.d.cts} +3 -16
  173. package/dist/{journey.d-B1sOeMHw.d.ts → journey.d-BenIUWaO.d.ts} +3 -16
  174. package/dist/js-yaml-DLCVPJ7G.js +0 -0
  175. package/dist/{targeting-WC62BBZN.cjs → targeting-DAFJBPIZ.cjs} +1 -1
  176. package/dist/{targeting-X4Y2ODBT.js → targeting-TGPCRRI6.js} +1 -1
  177. package/dist/{targeting.d-0rNF7ErD.d.cts → targeting.d-DxHQbn7-.d.cts} +4 -11
  178. package/dist/{targeting.d-0rNF7ErD.d.ts → targeting.d-DxHQbn7-.d.ts} +4 -11
  179. package/dist/user-7ZN2XO7G.cjs +7 -0
  180. package/dist/user-ZK7BK6VY.js +7 -0
  181. package/dist/user-runtime-7O2HLFVQ.cjs +5 -0
  182. package/dist/{user-runtime-6ICV2Y73.js → user-runtime-U4HYUWJU.js} +1 -1
  183. package/dist/{user.d-L-C7_K84.d.cts → user.d-D18fe97W.d.cts} +1 -421
  184. package/dist/{user.d-L-C7_K84.d.ts → user.d-D18fe97W.d.ts} +1 -421
  185. package/docs/access-token.md +3 -111
  186. package/docs/automation.md +37 -180
  187. package/docs/blueprint-manifest.md +95 -421
  188. package/docs/integration-toolkit.md +13 -0
  189. package/docs/journey.md +8 -28
  190. package/docs/targeting.md +3 -6
  191. package/docs/user.md +8 -321
  192. package/package.json +12 -20
  193. package/LICENSE +0 -21
  194. package/definitions/snapshot-runtime.json +0 -1
  195. package/definitions/snapshot.json +0 -973
  196. package/dist/README-NBWAQWQS.js +0 -7
  197. package/dist/README-XCIDDEAE.cjs +0 -7
  198. package/dist/access-token-GD6REL4U.js +0 -7
  199. package/dist/access-token-NQ5BLMOW.cjs +0 -7
  200. package/dist/apis/snapshot.cjs +0 -38
  201. package/dist/apis/snapshot.d.cts +0 -18
  202. package/dist/apis/snapshot.d.ts +0 -18
  203. package/dist/apis/snapshot.js +0 -38
  204. package/dist/automation-S6NFS5KU.cjs +0 -7
  205. package/dist/automation-W75XZG7B.js +0 -7
  206. package/dist/blueprint-manifest-WHYSBU66.cjs +0 -7
  207. package/dist/blueprint-manifest-WZVBTKUL.js +0 -7
  208. package/dist/chunk-54QNWEPZ.js +0 -14
  209. package/dist/chunk-NFIYEMMM.js +0 -14
  210. package/dist/chunk-OWXEZ56F.cjs +0 -14
  211. package/dist/chunk-YXJ4PBFQ.cjs +0 -14
  212. package/dist/integration-toolkit-27Z3VZBZ.cjs +0 -7
  213. package/dist/integration-toolkit-NRLZZFVS.js +0 -7
  214. package/dist/journey-LHVSSVTG.cjs +0 -7
  215. package/dist/journey-NXL264XW.js +0 -7
  216. package/dist/snapshot-6CCO4NYL.js +0 -7
  217. package/dist/snapshot-GWB56VPP.cjs +0 -7
  218. package/dist/snapshot-runtime-6DV42FVY.cjs +0 -5
  219. package/dist/snapshot-runtime-IW57MINC.js +0 -5
  220. package/dist/snapshot.d-D5z6-hzE.d.cts +0 -761
  221. package/dist/snapshot.d-D5z6-hzE.d.ts +0 -761
  222. package/dist/user-3SLAEEVD.cjs +0 -7
  223. package/dist/user-PRUYBXQV.js +0 -7
  224. package/dist/user-runtime-Y3227ETX.cjs +0 -5
  225. package/docs/snapshot.md +0 -656
package/docs/snapshot.md DELETED
@@ -1,656 +0,0 @@
1
- # Snapshot API
2
-
3
- - **Base URL:** `https://snapshot.sls.epilot.io`
4
- - **Full API Docs:** [https://docs.epilot.io/api/snapshot](https://docs.epilot.io/api/snapshot)
5
-
6
- ## Usage
7
-
8
- ```ts
9
- import { epilot } from '@epilot/sdk'
10
-
11
- epilot.authorize(() => '<token>')
12
- const { data } = await epilot.snapshot.createSnapshot(...)
13
- ```
14
-
15
- ### Tree-shakeable import
16
-
17
- ```ts
18
- import { getClient, authorize } from '@epilot/sdk/snapshot'
19
-
20
- const snapshotClient = getClient()
21
- authorize(snapshotClient, () => '<token>')
22
- const { data } = await snapshotClient.createSnapshot(...)
23
- ```
24
-
25
- ## Operations
26
-
27
- **Snapshots**
28
- - [`createSnapshot`](#createsnapshot)
29
- - [`listSnapshots`](#listsnapshots)
30
- - [`captureOrgSnapshot`](#captureorgsnapshot)
31
- - [`getSnapshot`](#getsnapshot)
32
- - [`deleteSnapshot`](#deletesnapshot)
33
- - [`restoreSnapshot`](#restoresnapshot)
34
- - [`listSnapshotResources`](#listsnapshotresources)
35
- - [`getSnapshotResource`](#getsnapshotresource)
36
- - [`listDependencies`](#listdependencies)
37
-
38
- **Schemas**
39
- - [`Error`](#error)
40
- - [`EmptyInventoryError`](#emptyinventoryerror)
41
- - [`ResourceRef`](#resourceref)
42
- - [`SnapshotResourceSummary`](#snapshotresourcesummary)
43
- - [`SnapshotResourceList`](#snapshotresourcelist)
44
- - [`SnapshotResourceDetail`](#snapshotresourcedetail)
45
- - [`CreateSnapshotRequest`](#createsnapshotrequest)
46
- - [`CreateOrgSnapshotRequest`](#createorgsnapshotrequest)
47
- - [`CreateSnapshotResponse`](#createsnapshotresponse)
48
- - [`RestoreSnapshotRequest`](#restoresnapshotrequest)
49
- - [`RestoreSnapshotResponse`](#restoresnapshotresponse)
50
- - [`Snapshot`](#snapshot)
51
- - [`Operation`](#operation)
52
- - [`SkippedResource`](#skippedresource)
53
- - [`CallerIdentity`](#calleridentity)
54
-
55
- ### `createSnapshot`
56
-
57
- Create a new snapshot of the given resources. Async — returns immediately
58
- with a snapshot ID; client polls `getSnapshot` until `create.status`
59
- moves from `in_progress` to `completed` or `failed`.
60
-
61
- `POST /v1/snapshots`
62
-
63
- ```ts
64
- const { data } = await client.createSnapshot(
65
- null,
66
- {
67
- name: 'string',
68
- description: 'string',
69
- trigger: 'manual',
70
- blueprint_instance_id: 'string',
71
- resources: [
72
- {
73
- type: 'string',
74
- id: 'string'
75
- }
76
- ]
77
- },
78
- )
79
- ```
80
-
81
- ---
82
-
83
- ### `listSnapshots`
84
-
85
- List snapshots for the caller's organization, newest first.
86
-
87
- `GET /v1/snapshots`
88
-
89
- ```ts
90
- const { data } = await client.listSnapshots({
91
- cursor: 'example',
92
- size: 1,
93
- resource: ['...'],
94
- trigger: 'example',
95
- })
96
- ```
97
-
98
- <details>
99
- <summary>Response</summary>
100
-
101
- ```json
102
- {
103
- "page_size": 0,
104
- "cursor": "string",
105
- "results": [
106
- {
107
- "id": "string",
108
- "org_id": "string",
109
- "name": "string",
110
- "description": "string",
111
- "trigger": "manual",
112
- "blueprint_instance_id": "string",
113
- "resource_counts": {},
114
- "create": {
115
- "type": "create",
116
- "started_at": "1970-01-01T00:00:00.000Z",
117
- "completed_at": "1970-01-01T00:00:00.000Z",
118
- "status": "in_progress",
119
- "error": "string",
120
- "triggered_by": {
121
- "name": "string",
122
- "user_id": "string",
123
- "token_id": "string"
124
- },
125
- "skipped": [
126
- {
127
- "lineage_id": "string",
128
- "reason": "modified"
129
- }
130
- ]
131
- },
132
- "restores": [
133
- {
134
- "type": "create",
135
- "started_at": "1970-01-01T00:00:00.000Z",
136
- "completed_at": "1970-01-01T00:00:00.000Z",
137
- "status": "in_progress",
138
- "error": "string",
139
- "triggered_by": {
140
- "name": "string",
141
- "user_id": "string",
142
- "token_id": "string"
143
- },
144
- "skipped": [
145
- {
146
- "lineage_id": "string",
147
- "reason": "modified"
148
- }
149
- ]
150
- }
151
- ],
152
- "matched_count": 0,
153
- "scope": "selection",
154
- "expires_at": "1970-01-01T00:00:00.000Z",
155
- "capture_summary": {
156
- "total": 0,
157
- "captured": 0,
158
- "skipped": 0,
159
- "failed": 0
160
- }
161
- }
162
- ]
163
- }
164
- ```
165
-
166
- </details>
167
-
168
- ---
169
-
170
- ### `captureOrgSnapshot`
171
-
172
- Snapshot the caller's whole organization now. Fetches a fresh inventory
173
- of the org's configuration resources from configuration-hub-api, persists
174
- it as an inventory artifact, and starts a `scope: "org
175
-
176
- `POST /v1/snapshots:capture-org`
177
-
178
- ```ts
179
- const { data } = await client.captureOrgSnapshot(
180
- null,
181
- {
182
- name: 'string',
183
- retention: {
184
- value: 1,
185
- unit: 'days'
186
- },
187
- excluded_types: ['string']
188
- },
189
- )
190
- ```
191
-
192
- ---
193
-
194
- ### `getSnapshot`
195
-
196
- Fetch a snapshot's metadata. Poll this endpoint to track create/restore progress.
197
-
198
- `GET /v1/snapshots/{id}`
199
-
200
- ```ts
201
- const { data } = await client.getSnapshot({
202
- id: '123e4567-e89b-12d3-a456-426614174000',
203
- })
204
- ```
205
-
206
- <details>
207
- <summary>Response</summary>
208
-
209
- ```json
210
- {
211
- "id": "string",
212
- "org_id": "string",
213
- "name": "string",
214
- "description": "string",
215
- "trigger": "manual",
216
- "blueprint_instance_id": "string",
217
- "resource_counts": {},
218
- "create": {
219
- "type": "create",
220
- "started_at": "1970-01-01T00:00:00.000Z",
221
- "completed_at": "1970-01-01T00:00:00.000Z",
222
- "status": "in_progress",
223
- "error": "string",
224
- "triggered_by": {
225
- "name": "string",
226
- "user_id": "string",
227
- "token_id": "string"
228
- },
229
- "skipped": [
230
- {
231
- "lineage_id": "string",
232
- "reason": "modified"
233
- }
234
- ]
235
- },
236
- "restores": [
237
- {
238
- "type": "create",
239
- "started_at": "1970-01-01T00:00:00.000Z",
240
- "completed_at": "1970-01-01T00:00:00.000Z",
241
- "status": "in_progress",
242
- "error": "string",
243
- "triggered_by": {
244
- "name": "string",
245
- "user_id": "string",
246
- "token_id": "string"
247
- },
248
- "skipped": [
249
- {
250
- "lineage_id": "string",
251
- "reason": "modified"
252
- }
253
- ]
254
- }
255
- ],
256
- "matched_count": 0,
257
- "scope": "selection",
258
- "expires_at": "1970-01-01T00:00:00.000Z",
259
- "capture_summary": {
260
- "total": 0,
261
- "captured": 0,
262
- "skipped": 0,
263
- "failed": 0
264
- }
265
- }
266
- ```
267
-
268
- </details>
269
-
270
- ---
271
-
272
- ### `deleteSnapshot`
273
-
274
- Delete a snapshot's metadata and S3 manifest.
275
-
276
- `DELETE /v1/snapshots/{id}`
277
-
278
- ```ts
279
- const { data } = await client.deleteSnapshot({
280
- id: '123e4567-e89b-12d3-a456-426614174000',
281
- })
282
- ```
283
-
284
- ---
285
-
286
- ### `restoreSnapshot`
287
-
288
- Restore a snapshot to the org. Async — returns immediately; client polls
289
- `getSnapshot` until the latest entry in `restores` moves from
290
- `in_progress` to one of `completed | partial | failed`.
291
-
292
- `POST /v1/snapshots/{id}:restore`
293
-
294
- ```ts
295
- const { data } = await client.restoreSnapshot(
296
- {
297
- id: '123e4567-e89b-12d3-a456-426614174000',
298
- },
299
- {
300
- preserve_modified: false,
301
- preserve_co_owned: false,
302
- exclude_target_ids: ['string']
303
- },
304
- )
305
- ```
306
-
307
- ---
308
-
309
- ### `listSnapshotResources`
310
-
311
- List the resources captured in this snapshot. Returns lightweight
312
- identity fields per resource — payloads are fetched via the
313
- single-resource endpoint when needed.
314
-
315
- `GET /v1/snapshots/{id}/resources`
316
-
317
- ```ts
318
- const { data } = await client.listSnapshotResources({
319
- id: '123e4567-e89b-12d3-a456-426614174000',
320
- })
321
- ```
322
-
323
- <details>
324
- <summary>Response</summary>
325
-
326
- ```json
327
- {
328
- "resources": [
329
- {
330
- "lineage_id": "string",
331
- "target_id": "string",
332
- "type": "string",
333
- "name": "string"
334
- }
335
- ]
336
- }
337
- ```
338
-
339
- </details>
340
-
341
- ---
342
-
343
- ### `getSnapshotResource`
344
-
345
- Fetch one captured resource with its full payload. For UI views
346
- that diff the captured state against the current destination.
347
-
348
- `GET /v1/snapshots/{id}/resources/{lineage_id}`
349
-
350
- ```ts
351
- const { data } = await client.getSnapshotResource({
352
- id: '123e4567-e89b-12d3-a456-426614174000',
353
- lineage_id: 'example',
354
- })
355
- ```
356
-
357
- <details>
358
- <summary>Response</summary>
359
-
360
- ```json
361
- {
362
- "lineage_id": "string",
363
- "target_id": "string",
364
- "type": "string",
365
- "name": "string",
366
- "captured": {}
367
- }
368
- ```
369
-
370
- </details>
371
-
372
- ---
373
-
374
- ### `listDependencies`
375
-
376
- Walk the dependency tree for a set of resources and return the full
377
- transitive closure, topologically sorted.
378
-
379
- `POST /v1/snapshots:list-dependencies`
380
-
381
- ```ts
382
- const { data } = await client.listDependencies(
383
- null,
384
- {
385
- resources: [
386
- {
387
- type: 'string',
388
- id: 'string'
389
- }
390
- ]
391
- },
392
- )
393
- ```
394
-
395
- <details>
396
- <summary>Response</summary>
397
-
398
- ```json
399
- {
400
- "dependencies": [
401
- {
402
- "type": "string",
403
- "id": "string"
404
- }
405
- ]
406
- }
407
- ```
408
-
409
- </details>
410
-
411
- ---
412
-
413
- ## Schemas
414
-
415
- ### `Error`
416
-
417
- ```ts
418
- type Error = {
419
- status: number
420
- error: string
421
- }
422
- ```
423
-
424
- ### `EmptyInventoryError`
425
-
426
- Returned (422) when the org inventory contains no capturable resources
427
- after filtering out sensitive, unsupported, and excluded types. The
428
- `skipped_types` array explains why every type was dropped.
429
-
430
-
431
- ```ts
432
- type EmptyInventoryError = {
433
- message: string
434
- skipped_types: Array<{
435
- type: string
436
- reason: string
437
- }>
438
- }
439
- ```
440
-
441
- ### `ResourceRef`
442
-
443
- ```ts
444
- type ResourceRef = {
445
- type: string
446
- id: string
447
- }
448
- ```
449
-
450
- ### `SnapshotResourceSummary`
451
-
452
- Lightweight identity for a captured resource. Returned by
453
- `listSnapshotResources`; the full payload is fetched separately via
454
- `getSnapshotResource` when needed.
455
-
456
-
457
- ```ts
458
- type SnapshotResourceSummary = {
459
- lineage_id: string
460
- target_id: string
461
- type: string
462
- name?: string
463
- }
464
- ```
465
-
466
- ### `SnapshotResourceList`
467
-
468
- ```ts
469
- type SnapshotResourceList = {
470
- resources: Array<{
471
- lineage_id: string
472
- target_id: string
473
- type: string
474
- name?: string
475
- }>
476
- }
477
- ```
478
-
479
- ### `SnapshotResourceDetail`
480
-
481
- A single captured resource with its full payload. The identity fields
482
- match `SnapshotResourceSummary`; the `captured` payload is the
483
- pre-install state at snapshot time.
484
-
485
-
486
- ```ts
487
- type SnapshotResourceDetail = {
488
- lineage_id: string
489
- target_id: string
490
- type: string
491
- name?: string
492
- captured: Record<string, unknown>
493
- }
494
- ```
495
-
496
- ### `CreateSnapshotRequest`
497
-
498
- ```ts
499
- type CreateSnapshotRequest = {
500
- name: string
501
- description?: string
502
- trigger?: "manual" | "sync" | "blueprint_install" | "scheduled"
503
- blueprint_instance_id?: string
504
- resources: Array<{
505
- type: string
506
- id: string
507
- }>
508
- }
509
- ```
510
-
511
- ### `CreateOrgSnapshotRequest`
512
-
513
- Request body for `captureOrgSnapshot`. All fields optional — an empty body
514
- snapshots the whole org with a default name and the 90-day default TTL.
515
-
516
-
517
- ```ts
518
- type CreateOrgSnapshotRequest = {
519
- name?: string
520
- retention?: {
521
- value: number
522
- unit: "days" | "weeks" | "months"
523
- }
524
- excluded_types?: string[]
525
- }
526
- ```
527
-
528
- ### `CreateSnapshotResponse`
529
-
530
- ```ts
531
- type CreateSnapshotResponse = {
532
- id: string
533
- name: string
534
- status: "creating"
535
- created_at: string // date-time
536
- }
537
- ```
538
-
539
- ### `RestoreSnapshotRequest`
540
-
541
- Skipped resources surface under `Operation.skipped`. All filters default
542
- to the open setting (apply everything), which keeps Config Hub's manual-
543
- restore semantics unchanged.
544
-
545
-
546
- ```ts
547
- type RestoreSnapshotRequest = {
548
- preserve_modified?: boolean
549
- preserve_co_owned?: boolean
550
- exclude_target_ids?: string[]
551
- }
552
- ```
553
-
554
- ### `RestoreSnapshotResponse`
555
-
556
- ```ts
557
- type RestoreSnapshotResponse = {
558
- id: string
559
- status: "restoring"
560
- }
561
- ```
562
-
563
- ### `Snapshot`
564
-
565
- ```ts
566
- type Snapshot = {
567
- id: string
568
- org_id: string
569
- name: string
570
- description?: string
571
- trigger: "manual" | "sync" | "blueprint_install" | "scheduled"
572
- blueprint_instance_id?: string
573
- resource_counts: Record<string, number>
574
- create: {
575
- type: "create" | "restore"
576
- started_at: string // date-time
577
- completed_at?: string // date-time
578
- status: "in_progress" | "completed" | "partial" | "failed"
579
- error?: string
580
- triggered_by: {
581
- name: { ... }
582
- user_id?: { ... }
583
- token_id?: { ... }
584
- }
585
- skipped?: Array<{
586
- lineage_id: { ... }
587
- reason: { ... }
588
- }>
589
- }
590
- restores: Array<{
591
- type: "create" | "restore"
592
- started_at: string // date-time
593
- completed_at?: string // date-time
594
- status: "in_progress" | "completed" | "partial" | "failed"
595
- error?: string
596
- triggered_by: {
597
- name: { ... }
598
- user_id?: { ... }
599
- token_id?: { ... }
600
- }
601
- skipped?: Array<{
602
- lineage_id: { ... }
603
- reason: { ... }
604
- }>
605
- }>
606
- matched_count?: number
607
- scope?: "selection" | "org"
608
- expires_at?: string // date-time
609
- capture_summary?: {
610
- total: number
611
- captured: number
612
- skipped: number
613
- failed: number
614
- }
615
- }
616
- ```
617
-
618
- ### `Operation`
619
-
620
- ```ts
621
- type Operation = {
622
- type: "create" | "restore"
623
- started_at: string // date-time
624
- completed_at?: string // date-time
625
- status: "in_progress" | "completed" | "partial" | "failed"
626
- error?: string
627
- triggered_by: {
628
- name: string
629
- user_id?: string
630
- token_id?: string
631
- }
632
- skipped?: Array<{
633
- lineage_id: string
634
- reason: "modified" | "co_owned"
635
- }>
636
- }
637
- ```
638
-
639
- ### `SkippedResource`
640
-
641
- ```ts
642
- type SkippedResource = {
643
- lineage_id: string
644
- reason: "modified" | "co_owned"
645
- }
646
- ```
647
-
648
- ### `CallerIdentity`
649
-
650
- ```ts
651
- type CallerIdentity = {
652
- name: string
653
- user_id?: string
654
- token_id?: string
655
- }
656
- ```