@epilot/sdk 2.8.10 → 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-OMZ2LWNR.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-H5BH4GQQ.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 -966
  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-HFVQTHYF.cjs +0 -7
  217. package/dist/snapshot-Y6A7QUYS.js +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-CPTXg4xN.d.cts +0 -751
  221. package/dist/snapshot.d-CPTXg4xN.d.ts +0 -751
  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 -654
package/docs/snapshot.md DELETED
@@ -1,654 +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
- "target_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
- "target_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
- "target_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
- "target_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
- exclude_target_ids: ['string']
302
- },
303
- )
304
- ```
305
-
306
- ---
307
-
308
- ### `listSnapshotResources`
309
-
310
- List the resources captured in this snapshot. Returns lightweight
311
- identity fields per resource — payloads are fetched via the
312
- single-resource endpoint when needed.
313
-
314
- `GET /v1/snapshots/{id}/resources`
315
-
316
- ```ts
317
- const { data } = await client.listSnapshotResources({
318
- id: '123e4567-e89b-12d3-a456-426614174000',
319
- })
320
- ```
321
-
322
- <details>
323
- <summary>Response</summary>
324
-
325
- ```json
326
- {
327
- "resources": [
328
- {
329
- "lineage_id": "string",
330
- "target_id": "string",
331
- "type": "string",
332
- "name": "string"
333
- }
334
- ]
335
- }
336
- ```
337
-
338
- </details>
339
-
340
- ---
341
-
342
- ### `getSnapshotResource`
343
-
344
- Fetch one captured resource with its full payload. For UI views
345
- that diff the captured state against the current destination.
346
-
347
- `GET /v1/snapshots/{id}/resources/{lineage_id}`
348
-
349
- ```ts
350
- const { data } = await client.getSnapshotResource({
351
- id: '123e4567-e89b-12d3-a456-426614174000',
352
- lineage_id: 'example',
353
- })
354
- ```
355
-
356
- <details>
357
- <summary>Response</summary>
358
-
359
- ```json
360
- {
361
- "lineage_id": "string",
362
- "target_id": "string",
363
- "type": "string",
364
- "name": "string",
365
- "captured": {}
366
- }
367
- ```
368
-
369
- </details>
370
-
371
- ---
372
-
373
- ### `listDependencies`
374
-
375
- Walk the dependency tree for a set of resources and return the full
376
- transitive closure, topologically sorted.
377
-
378
- `POST /v1/snapshots:list-dependencies`
379
-
380
- ```ts
381
- const { data } = await client.listDependencies(
382
- null,
383
- {
384
- resources: [
385
- {
386
- type: 'string',
387
- id: 'string'
388
- }
389
- ]
390
- },
391
- )
392
- ```
393
-
394
- <details>
395
- <summary>Response</summary>
396
-
397
- ```json
398
- {
399
- "dependencies": [
400
- {
401
- "type": "string",
402
- "id": "string"
403
- }
404
- ]
405
- }
406
- ```
407
-
408
- </details>
409
-
410
- ---
411
-
412
- ## Schemas
413
-
414
- ### `Error`
415
-
416
- ```ts
417
- type Error = {
418
- status: number
419
- error: string
420
- }
421
- ```
422
-
423
- ### `EmptyInventoryError`
424
-
425
- Returned (422) when the org inventory contains no capturable resources
426
- after filtering out sensitive, unsupported, and excluded types. The
427
- `skipped_types` array explains why every type was dropped.
428
-
429
-
430
- ```ts
431
- type EmptyInventoryError = {
432
- message: string
433
- skipped_types: Array<{
434
- type: string
435
- reason: string
436
- }>
437
- }
438
- ```
439
-
440
- ### `ResourceRef`
441
-
442
- ```ts
443
- type ResourceRef = {
444
- type: string
445
- id: string
446
- }
447
- ```
448
-
449
- ### `SnapshotResourceSummary`
450
-
451
- Lightweight identity for a captured resource. Returned by
452
- `listSnapshotResources`; the full payload is fetched separately via
453
- `getSnapshotResource` when needed.
454
-
455
-
456
- ```ts
457
- type SnapshotResourceSummary = {
458
- lineage_id: string
459
- target_id: string
460
- type: string
461
- name?: string
462
- }
463
- ```
464
-
465
- ### `SnapshotResourceList`
466
-
467
- ```ts
468
- type SnapshotResourceList = {
469
- resources: Array<{
470
- lineage_id: string
471
- target_id: string
472
- type: string
473
- name?: string
474
- }>
475
- }
476
- ```
477
-
478
- ### `SnapshotResourceDetail`
479
-
480
- A single captured resource with its full payload. The identity fields
481
- match `SnapshotResourceSummary`; the `captured` payload is the
482
- pre-install state at snapshot time.
483
-
484
-
485
- ```ts
486
- type SnapshotResourceDetail = {
487
- lineage_id: string
488
- target_id: string
489
- type: string
490
- name?: string
491
- captured: Record<string, unknown>
492
- }
493
- ```
494
-
495
- ### `CreateSnapshotRequest`
496
-
497
- ```ts
498
- type CreateSnapshotRequest = {
499
- name: string
500
- description?: string
501
- trigger?: "manual" | "sync" | "blueprint_install" | "scheduled"
502
- blueprint_instance_id?: string
503
- resources: Array<{
504
- type: string
505
- id: string
506
- }>
507
- }
508
- ```
509
-
510
- ### `CreateOrgSnapshotRequest`
511
-
512
- Request body for `captureOrgSnapshot`. All fields optional — an empty body
513
- snapshots the whole org with a default name and the 90-day default TTL.
514
-
515
-
516
- ```ts
517
- type CreateOrgSnapshotRequest = {
518
- name?: string
519
- retention?: {
520
- value: number
521
- unit: "days" | "weeks" | "months"
522
- }
523
- excluded_types?: string[]
524
- }
525
- ```
526
-
527
- ### `CreateSnapshotResponse`
528
-
529
- ```ts
530
- type CreateSnapshotResponse = {
531
- id: string
532
- name: string
533
- status: "creating"
534
- created_at: string // date-time
535
- }
536
- ```
537
-
538
- ### `RestoreSnapshotRequest`
539
-
540
- Apply a captured snapshot to its source org. All filters default to the
541
- open setting (apply everything), which keeps Config Hub's manual-restore
542
- semantics unchanged.
543
-
544
-
545
- ```ts
546
- type RestoreSnapshotRequest = {
547
- preserve_modified?: boolean
548
- exclude_target_ids?: string[]
549
- }
550
- ```
551
-
552
- ### `RestoreSnapshotResponse`
553
-
554
- ```ts
555
- type RestoreSnapshotResponse = {
556
- id: string
557
- status: "restoring"
558
- }
559
- ```
560
-
561
- ### `Snapshot`
562
-
563
- ```ts
564
- type Snapshot = {
565
- id: string
566
- org_id: string
567
- name: string
568
- description?: string
569
- trigger: "manual" | "sync" | "blueprint_install" | "scheduled"
570
- blueprint_instance_id?: string
571
- resource_counts: Record<string, number>
572
- create: {
573
- type: "create" | "restore"
574
- started_at: string // date-time
575
- completed_at?: string // date-time
576
- status: "in_progress" | "completed" | "partial" | "failed"
577
- error?: string
578
- triggered_by: {
579
- name: { ... }
580
- user_id?: { ... }
581
- token_id?: { ... }
582
- }
583
- skipped?: Array<{
584
- target_id: { ... }
585
- reason: { ... }
586
- }>
587
- }
588
- restores: Array<{
589
- type: "create" | "restore"
590
- started_at: string // date-time
591
- completed_at?: string // date-time
592
- status: "in_progress" | "completed" | "partial" | "failed"
593
- error?: string
594
- triggered_by: {
595
- name: { ... }
596
- user_id?: { ... }
597
- token_id?: { ... }
598
- }
599
- skipped?: Array<{
600
- target_id: { ... }
601
- reason: { ... }
602
- }>
603
- }>
604
- matched_count?: number
605
- scope?: "selection" | "org"
606
- expires_at?: string // date-time
607
- capture_summary?: {
608
- total: number
609
- captured: number
610
- skipped: number
611
- failed: number
612
- }
613
- }
614
- ```
615
-
616
- ### `Operation`
617
-
618
- ```ts
619
- type Operation = {
620
- type: "create" | "restore"
621
- started_at: string // date-time
622
- completed_at?: string // date-time
623
- status: "in_progress" | "completed" | "partial" | "failed"
624
- error?: string
625
- triggered_by: {
626
- name: string
627
- user_id?: string
628
- token_id?: string
629
- }
630
- skipped?: Array<{
631
- target_id: string
632
- reason: "modified"
633
- }>
634
- }
635
- ```
636
-
637
- ### `SkippedResource`
638
-
639
- ```ts
640
- type SkippedResource = {
641
- target_id: string
642
- reason: "modified"
643
- }
644
- ```
645
-
646
- ### `CallerIdentity`
647
-
648
- ```ts
649
- type CallerIdentity = {
650
- name: string
651
- user_id?: string
652
- token_id?: string
653
- }
654
- ```