@epilot/sdk 2.11.4 → 2.11.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/snapshot-runtime.json +1 -1
- package/definitions/snapshot.json +214 -46
- 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 +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- 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/{chunk-O4C7IU7J.cjs → chunk-6CTW57LR.cjs} +2 -2
- package/dist/{chunk-PCK46M32.js → chunk-IINIFIYG.js} +2 -2
- package/dist/{chunk-54QNWEPZ.js → chunk-UXY7SWNP.js} +1 -1
- package/dist/{chunk-YXJ4PBFQ.cjs → chunk-VDMPIKAN.cjs} +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/snapshot-5XHTEB2U.js +7 -0
- package/dist/snapshot-NKK6BNQB.cjs +7 -0
- package/dist/{snapshot-runtime-6DV42FVY.cjs → snapshot-runtime-AQJSSXRV.cjs} +2 -2
- package/dist/{snapshot-runtime-IW57MINC.js → snapshot-runtime-AY7YYSFQ.js} +1 -1
- package/dist/{snapshot.d-CqefmvuB.d.cts → snapshot.d-DT0zg2CS.d.cts} +258 -39
- package/dist/{snapshot.d-CqefmvuB.d.ts → snapshot.d-DT0zg2CS.d.ts} +258 -39
- package/docs/snapshot.md +179 -21
- package/package.json +1 -1
- package/dist/snapshot-2HFERXRQ.js +0 -7
- package/dist/snapshot-UHCQAT4R.cjs +0 -7
|
@@ -8,13 +8,6 @@ declare namespace Components {
|
|
|
8
8
|
export type BadRequest = Schemas.Error;
|
|
9
9
|
export type NotFound = Schemas.Error;
|
|
10
10
|
export type Unauthorized = Schemas.Error;
|
|
11
|
-
export type UnprocessableEntity = /**
|
|
12
|
-
* Returned (422) when the org inventory contains no capturable resources
|
|
13
|
-
* after filtering out sensitive, unsupported, and excluded types. The
|
|
14
|
-
* `skipped_types` array explains why every type was dropped.
|
|
15
|
-
*
|
|
16
|
-
*/
|
|
17
|
-
Schemas.EmptyInventoryError;
|
|
18
11
|
}
|
|
19
12
|
namespace Schemas {
|
|
20
13
|
export interface CallerIdentity {
|
|
@@ -83,23 +76,6 @@ declare namespace Components {
|
|
|
83
76
|
status: "creating";
|
|
84
77
|
created_at: string; // date-time
|
|
85
78
|
}
|
|
86
|
-
/**
|
|
87
|
-
* Returned (422) when the org inventory contains no capturable resources
|
|
88
|
-
* after filtering out sensitive, unsupported, and excluded types. The
|
|
89
|
-
* `skipped_types` array explains why every type was dropped.
|
|
90
|
-
*
|
|
91
|
-
*/
|
|
92
|
-
export interface EmptyInventoryError {
|
|
93
|
-
/**
|
|
94
|
-
* example:
|
|
95
|
-
* No capturable resources in the org inventory
|
|
96
|
-
*/
|
|
97
|
-
message: string;
|
|
98
|
-
skipped_types: {
|
|
99
|
-
type: string;
|
|
100
|
-
reason: string;
|
|
101
|
-
}[];
|
|
102
|
-
}
|
|
103
79
|
export interface Error {
|
|
104
80
|
status: number;
|
|
105
81
|
error: string;
|
|
@@ -118,6 +94,89 @@ declare namespace Components {
|
|
|
118
94
|
error?: string;
|
|
119
95
|
triggered_by: CallerIdentity;
|
|
120
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Enrollment record for a scheduled org snapshot. One row per org.
|
|
99
|
+
* This table — not EventBridge — is the source of truth; the EventBridge
|
|
100
|
+
* schedule entry is the materialization of this row (reconciled on write
|
|
101
|
+
* by Task 6).
|
|
102
|
+
*
|
|
103
|
+
*/
|
|
104
|
+
export interface OrgSnapshotSchedule {
|
|
105
|
+
org_id: string;
|
|
106
|
+
enabled: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Validated 6-field EventBridge cron. Default `cron(0 2 * * ? *)`.
|
|
109
|
+
* example:
|
|
110
|
+
* cron(0 2 * * ? *)
|
|
111
|
+
*/
|
|
112
|
+
cron_expression: string;
|
|
113
|
+
/**
|
|
114
|
+
* IANA timezone. Default `Europe/Berlin`.
|
|
115
|
+
*/
|
|
116
|
+
timezone: string;
|
|
117
|
+
retention: /**
|
|
118
|
+
* Flat retention window for a scheduled snapshot.
|
|
119
|
+
* Converted to a `ttl` epoch at capture time. Capped at ~24 months.
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
RetentionConfig;
|
|
123
|
+
excluded_types?: string[];
|
|
124
|
+
/**
|
|
125
|
+
* Name of the EventBridge Scheduler entry this row owns.
|
|
126
|
+
* Set at enrollment time as `org-snapshot-{orgId}`.
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
129
|
+
schedule_name: string;
|
|
130
|
+
last_started_at?: string; // date-time
|
|
131
|
+
last_completed_at?: string; // date-time
|
|
132
|
+
last_status?: "completed" | "partial" | "failed";
|
|
133
|
+
created_by: string;
|
|
134
|
+
created_at: string; // date-time
|
|
135
|
+
updated_at: string; // date-time
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Body for `putOrgSnapshotSchedule`. All fields optional; unset fields
|
|
139
|
+
* receive defaults on first create and are left unchanged on updates
|
|
140
|
+
* (except `updated_at`).
|
|
141
|
+
*
|
|
142
|
+
*/
|
|
143
|
+
export interface PutOrgSnapshotScheduleRequest {
|
|
144
|
+
/**
|
|
145
|
+
* Whether the schedule is active.
|
|
146
|
+
*/
|
|
147
|
+
enabled?: boolean;
|
|
148
|
+
/**
|
|
149
|
+
* 6-field EventBridge cron expression, e.g. `cron(0 2 * * ? *)`.
|
|
150
|
+
* Validated server-side: minute + hour must be concrete single integers
|
|
151
|
+
* (no `*`, lists, ranges, or steps) to cap cadence at ≤ once/day.
|
|
152
|
+
* Exactly one of day-of-month / day-of-week must be `?`.
|
|
153
|
+
*
|
|
154
|
+
* example:
|
|
155
|
+
* cron(0 2 * * ? *)
|
|
156
|
+
*/
|
|
157
|
+
cron_expression?: string;
|
|
158
|
+
/**
|
|
159
|
+
* IANA timezone string passed to EventBridge `ScheduleExpressionTimezone`,
|
|
160
|
+
* e.g. `Europe/Berlin`. AWS handles DST natively.
|
|
161
|
+
*
|
|
162
|
+
* example:
|
|
163
|
+
* Europe/Berlin
|
|
164
|
+
*/
|
|
165
|
+
timezone?: string;
|
|
166
|
+
retention?: /**
|
|
167
|
+
* Flat retention window for a scheduled snapshot.
|
|
168
|
+
* Converted to a `ttl` epoch at capture time. Capped at ~24 months.
|
|
169
|
+
*
|
|
170
|
+
*/
|
|
171
|
+
RetentionConfig;
|
|
172
|
+
/**
|
|
173
|
+
* Resource types to exclude from the scheduled capture, in addition
|
|
174
|
+
* to the always-excluded sensitive types (`access_token`,
|
|
175
|
+
* `environment_variable`).
|
|
176
|
+
*
|
|
177
|
+
*/
|
|
178
|
+
excluded_types?: string[];
|
|
179
|
+
}
|
|
121
180
|
export interface ResourceRef {
|
|
122
181
|
/**
|
|
123
182
|
* Resource type (e.g., custom_variable, journey, automation_flow)
|
|
@@ -146,6 +205,18 @@ declare namespace Components {
|
|
|
146
205
|
id: string;
|
|
147
206
|
status: "restoring";
|
|
148
207
|
}
|
|
208
|
+
/**
|
|
209
|
+
* Flat retention window for a scheduled snapshot.
|
|
210
|
+
* Converted to a `ttl` epoch at capture time. Capped at ~24 months.
|
|
211
|
+
*
|
|
212
|
+
*/
|
|
213
|
+
export interface RetentionConfig {
|
|
214
|
+
/**
|
|
215
|
+
* Numeric quantity of retention (e.g. 90 for "90 days").
|
|
216
|
+
*/
|
|
217
|
+
value: number;
|
|
218
|
+
unit: "days" | "weeks" | "months";
|
|
219
|
+
}
|
|
149
220
|
export interface Snapshot {
|
|
150
221
|
id: string;
|
|
151
222
|
org_id: string;
|
|
@@ -284,7 +355,6 @@ declare namespace Paths {
|
|
|
284
355
|
namespace Responses {
|
|
285
356
|
export type $202 = Components.Schemas.CreateSnapshotResponse;
|
|
286
357
|
export type $401 = Components.Responses.Unauthorized;
|
|
287
|
-
export type $422 = Components.Responses.UnprocessableEntity;
|
|
288
358
|
}
|
|
289
359
|
}
|
|
290
360
|
namespace CreateSnapshot {
|
|
@@ -295,6 +365,14 @@ declare namespace Paths {
|
|
|
295
365
|
export type $401 = Components.Responses.Unauthorized;
|
|
296
366
|
}
|
|
297
367
|
}
|
|
368
|
+
namespace DeleteOrgSnapshotSchedule {
|
|
369
|
+
namespace Responses {
|
|
370
|
+
export interface $204 {
|
|
371
|
+
}
|
|
372
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
373
|
+
export type $404 = Components.Responses.NotFound;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
298
376
|
namespace DeleteSnapshot {
|
|
299
377
|
namespace Responses {
|
|
300
378
|
export interface $204 {
|
|
@@ -303,6 +381,20 @@ declare namespace Paths {
|
|
|
303
381
|
export type $404 = Components.Responses.NotFound;
|
|
304
382
|
}
|
|
305
383
|
}
|
|
384
|
+
namespace GetOrgSnapshotSchedule {
|
|
385
|
+
namespace Responses {
|
|
386
|
+
export type $200 = /**
|
|
387
|
+
* Enrollment record for a scheduled org snapshot. One row per org.
|
|
388
|
+
* This table — not EventBridge — is the source of truth; the EventBridge
|
|
389
|
+
* schedule entry is the materialization of this row (reconciled on write
|
|
390
|
+
* by Task 6).
|
|
391
|
+
*
|
|
392
|
+
*/
|
|
393
|
+
Components.Schemas.OrgSnapshotSchedule;
|
|
394
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
395
|
+
export type $404 = Components.Responses.NotFound;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
306
398
|
namespace GetSnapshot {
|
|
307
399
|
namespace Responses {
|
|
308
400
|
export type $200 = Components.Schemas.Snapshot;
|
|
@@ -370,6 +462,27 @@ declare namespace Paths {
|
|
|
370
462
|
export type $401 = Components.Responses.Unauthorized;
|
|
371
463
|
}
|
|
372
464
|
}
|
|
465
|
+
namespace PutOrgSnapshotSchedule {
|
|
466
|
+
export type RequestBody = /**
|
|
467
|
+
* Body for `putOrgSnapshotSchedule`. All fields optional; unset fields
|
|
468
|
+
* receive defaults on first create and are left unchanged on updates
|
|
469
|
+
* (except `updated_at`).
|
|
470
|
+
*
|
|
471
|
+
*/
|
|
472
|
+
Components.Schemas.PutOrgSnapshotScheduleRequest;
|
|
473
|
+
namespace Responses {
|
|
474
|
+
export type $200 = /**
|
|
475
|
+
* Enrollment record for a scheduled org snapshot. One row per org.
|
|
476
|
+
* This table — not EventBridge — is the source of truth; the EventBridge
|
|
477
|
+
* schedule entry is the materialization of this row (reconciled on write
|
|
478
|
+
* by Task 6).
|
|
479
|
+
*
|
|
480
|
+
*/
|
|
481
|
+
Components.Schemas.OrgSnapshotSchedule;
|
|
482
|
+
export type $400 = Components.Responses.BadRequest;
|
|
483
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
373
486
|
namespace RestoreSnapshot {
|
|
374
487
|
export type RequestBody = /**
|
|
375
488
|
* Apply a captured snapshot to its source org. snapshot-api applies the
|
|
@@ -457,12 +570,14 @@ interface OperationMethods {
|
|
|
457
570
|
/**
|
|
458
571
|
* captureOrgSnapshot - captureOrgSnapshot
|
|
459
572
|
*
|
|
460
|
-
* Snapshot the caller's whole organization now.
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* `
|
|
573
|
+
* Snapshot the caller's whole organization now. Creates a `scope: "org"`
|
|
574
|
+
* snapshot row and starts a chunked capture Step Function, then returns
|
|
575
|
+
* immediately. The capture asynchronously fetches a fresh inventory of the
|
|
576
|
+
* org's configuration resources from configuration-hub-api, persists it as
|
|
577
|
+
* an inventory artifact, and captures each resource. Client polls
|
|
578
|
+
* `getSnapshot` and watches `capture_summary` fill in until `create.status`
|
|
579
|
+
* moves from `in_progress` to `completed` or `failed`. An org with no
|
|
580
|
+
* capturable resources finalizes as a completed 0-resource snapshot.
|
|
466
581
|
*
|
|
467
582
|
* Sensitive types (`access_token`, `environment_variable`), types with no
|
|
468
583
|
* engine adapter, and any `excluded_types` are dropped from the capture and
|
|
@@ -539,6 +654,55 @@ interface OperationMethods {
|
|
|
539
654
|
data?: any,
|
|
540
655
|
config?: AxiosRequestConfig
|
|
541
656
|
): OperationResponse<Paths.GetSnapshotResource.Responses.$200>
|
|
657
|
+
/**
|
|
658
|
+
* getOrgSnapshotSchedule - getOrgSnapshotSchedule
|
|
659
|
+
*
|
|
660
|
+
* Return the scheduled-snapshot enrollment config for the caller's org.
|
|
661
|
+
* Returns 404 when the org has not yet enrolled.
|
|
662
|
+
*
|
|
663
|
+
*/
|
|
664
|
+
'getOrgSnapshotSchedule'(
|
|
665
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
666
|
+
data?: any,
|
|
667
|
+
config?: AxiosRequestConfig
|
|
668
|
+
): OperationResponse<Paths.GetOrgSnapshotSchedule.Responses.$200>
|
|
669
|
+
/**
|
|
670
|
+
* putOrgSnapshotSchedule - putOrgSnapshotSchedule
|
|
671
|
+
*
|
|
672
|
+
* Create or update the scheduled-snapshot enrollment config for the
|
|
673
|
+
* caller's org (upsert). The cron expression and retention window are
|
|
674
|
+
* validated server-side; invalid values are rejected with 400.
|
|
675
|
+
*
|
|
676
|
+
* Defaults applied when a field is omitted on first create:
|
|
677
|
+
* - `cron_expression`: `cron(0 2 * * ? *)` (daily at 02:00)
|
|
678
|
+
* - `timezone`: `Europe/Berlin`
|
|
679
|
+
* - `retention`: `{ value: 90, unit: "days" }`
|
|
680
|
+
* - `enabled`: `true`
|
|
681
|
+
*
|
|
682
|
+
* **Note:** this call persists the row only. EventBridge schedule
|
|
683
|
+
* materialization is performed by a subsequent reconcile step (Task 6).
|
|
684
|
+
* The row is the authoritative source of truth for the UI.
|
|
685
|
+
*
|
|
686
|
+
*/
|
|
687
|
+
'putOrgSnapshotSchedule'(
|
|
688
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
689
|
+
data?: Paths.PutOrgSnapshotSchedule.RequestBody,
|
|
690
|
+
config?: AxiosRequestConfig
|
|
691
|
+
): OperationResponse<Paths.PutOrgSnapshotSchedule.Responses.$200>
|
|
692
|
+
/**
|
|
693
|
+
* deleteOrgSnapshotSchedule - deleteOrgSnapshotSchedule
|
|
694
|
+
*
|
|
695
|
+
* Remove the scheduled-snapshot enrollment for the caller's org.
|
|
696
|
+
* Returns 404 when no schedule exists.
|
|
697
|
+
* The corresponding EventBridge schedule is removed by a reconcile
|
|
698
|
+
* step (Task 6).
|
|
699
|
+
*
|
|
700
|
+
*/
|
|
701
|
+
'deleteOrgSnapshotSchedule'(
|
|
702
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
703
|
+
data?: any,
|
|
704
|
+
config?: AxiosRequestConfig
|
|
705
|
+
): OperationResponse<Paths.DeleteOrgSnapshotSchedule.Responses.$204>
|
|
542
706
|
/**
|
|
543
707
|
* listDependencies - listDependencies
|
|
544
708
|
*
|
|
@@ -593,12 +757,14 @@ interface PathsDictionary {
|
|
|
593
757
|
/**
|
|
594
758
|
* captureOrgSnapshot - captureOrgSnapshot
|
|
595
759
|
*
|
|
596
|
-
* Snapshot the caller's whole organization now.
|
|
597
|
-
*
|
|
598
|
-
*
|
|
599
|
-
*
|
|
600
|
-
*
|
|
601
|
-
* `
|
|
760
|
+
* Snapshot the caller's whole organization now. Creates a `scope: "org"`
|
|
761
|
+
* snapshot row and starts a chunked capture Step Function, then returns
|
|
762
|
+
* immediately. The capture asynchronously fetches a fresh inventory of the
|
|
763
|
+
* org's configuration resources from configuration-hub-api, persists it as
|
|
764
|
+
* an inventory artifact, and captures each resource. Client polls
|
|
765
|
+
* `getSnapshot` and watches `capture_summary` fill in until `create.status`
|
|
766
|
+
* moves from `in_progress` to `completed` or `failed`. An org with no
|
|
767
|
+
* capturable resources finalizes as a completed 0-resource snapshot.
|
|
602
768
|
*
|
|
603
769
|
* Sensitive types (`access_token`, `environment_variable`), types with no
|
|
604
770
|
* engine adapter, and any `excluded_types` are dropped from the capture and
|
|
@@ -684,6 +850,57 @@ interface PathsDictionary {
|
|
|
684
850
|
config?: AxiosRequestConfig
|
|
685
851
|
): OperationResponse<Paths.GetSnapshotResource.Responses.$200>
|
|
686
852
|
}
|
|
853
|
+
['/v1/org-snapshot-schedule']: {
|
|
854
|
+
/**
|
|
855
|
+
* getOrgSnapshotSchedule - getOrgSnapshotSchedule
|
|
856
|
+
*
|
|
857
|
+
* Return the scheduled-snapshot enrollment config for the caller's org.
|
|
858
|
+
* Returns 404 when the org has not yet enrolled.
|
|
859
|
+
*
|
|
860
|
+
*/
|
|
861
|
+
'get'(
|
|
862
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
863
|
+
data?: any,
|
|
864
|
+
config?: AxiosRequestConfig
|
|
865
|
+
): OperationResponse<Paths.GetOrgSnapshotSchedule.Responses.$200>
|
|
866
|
+
/**
|
|
867
|
+
* putOrgSnapshotSchedule - putOrgSnapshotSchedule
|
|
868
|
+
*
|
|
869
|
+
* Create or update the scheduled-snapshot enrollment config for the
|
|
870
|
+
* caller's org (upsert). The cron expression and retention window are
|
|
871
|
+
* validated server-side; invalid values are rejected with 400.
|
|
872
|
+
*
|
|
873
|
+
* Defaults applied when a field is omitted on first create:
|
|
874
|
+
* - `cron_expression`: `cron(0 2 * * ? *)` (daily at 02:00)
|
|
875
|
+
* - `timezone`: `Europe/Berlin`
|
|
876
|
+
* - `retention`: `{ value: 90, unit: "days" }`
|
|
877
|
+
* - `enabled`: `true`
|
|
878
|
+
*
|
|
879
|
+
* **Note:** this call persists the row only. EventBridge schedule
|
|
880
|
+
* materialization is performed by a subsequent reconcile step (Task 6).
|
|
881
|
+
* The row is the authoritative source of truth for the UI.
|
|
882
|
+
*
|
|
883
|
+
*/
|
|
884
|
+
'put'(
|
|
885
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
886
|
+
data?: Paths.PutOrgSnapshotSchedule.RequestBody,
|
|
887
|
+
config?: AxiosRequestConfig
|
|
888
|
+
): OperationResponse<Paths.PutOrgSnapshotSchedule.Responses.$200>
|
|
889
|
+
/**
|
|
890
|
+
* deleteOrgSnapshotSchedule - deleteOrgSnapshotSchedule
|
|
891
|
+
*
|
|
892
|
+
* Remove the scheduled-snapshot enrollment for the caller's org.
|
|
893
|
+
* Returns 404 when no schedule exists.
|
|
894
|
+
* The corresponding EventBridge schedule is removed by a reconcile
|
|
895
|
+
* step (Task 6).
|
|
896
|
+
*
|
|
897
|
+
*/
|
|
898
|
+
'delete'(
|
|
899
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
900
|
+
data?: any,
|
|
901
|
+
config?: AxiosRequestConfig
|
|
902
|
+
): OperationResponse<Paths.DeleteOrgSnapshotSchedule.Responses.$204>
|
|
903
|
+
}
|
|
687
904
|
['/v1/snapshots:list-dependencies']: {
|
|
688
905
|
/**
|
|
689
906
|
* listDependencies - listDependencies
|
|
@@ -710,15 +927,17 @@ type CallerIdentity = Components.Schemas.CallerIdentity;
|
|
|
710
927
|
type CreateOrgSnapshotRequest = Components.Schemas.CreateOrgSnapshotRequest;
|
|
711
928
|
type CreateSnapshotRequest = Components.Schemas.CreateSnapshotRequest;
|
|
712
929
|
type CreateSnapshotResponse = Components.Schemas.CreateSnapshotResponse;
|
|
713
|
-
type EmptyInventoryError = Components.Schemas.EmptyInventoryError;
|
|
714
930
|
type Error = Components.Schemas.Error;
|
|
715
931
|
type Operation = Components.Schemas.Operation;
|
|
932
|
+
type OrgSnapshotSchedule = Components.Schemas.OrgSnapshotSchedule;
|
|
933
|
+
type PutOrgSnapshotScheduleRequest = Components.Schemas.PutOrgSnapshotScheduleRequest;
|
|
716
934
|
type ResourceRef = Components.Schemas.ResourceRef;
|
|
717
935
|
type RestoreSnapshotRequest = Components.Schemas.RestoreSnapshotRequest;
|
|
718
936
|
type RestoreSnapshotResponse = Components.Schemas.RestoreSnapshotResponse;
|
|
937
|
+
type RetentionConfig = Components.Schemas.RetentionConfig;
|
|
719
938
|
type Snapshot = Components.Schemas.Snapshot;
|
|
720
939
|
type SnapshotResourceDetail = Components.Schemas.SnapshotResourceDetail;
|
|
721
940
|
type SnapshotResourceList = Components.Schemas.SnapshotResourceList;
|
|
722
941
|
type SnapshotResourceSummary = Components.Schemas.SnapshotResourceSummary;
|
|
723
942
|
|
|
724
|
-
export { type Client as C, type
|
|
943
|
+
export { type Client as C, type Error as E, type OperationMethods as O, Paths as P, type ResourceRef as R, type Snapshot as S, Components as a, type PathsDictionary as b, type CallerIdentity as c, type CreateOrgSnapshotRequest as d, type CreateSnapshotRequest as e, type CreateSnapshotResponse as f, type Operation as g, type OrgSnapshotSchedule as h, type PutOrgSnapshotScheduleRequest as i, type RestoreSnapshotRequest as j, type RestoreSnapshotResponse as k, type RetentionConfig as l, type SnapshotResourceDetail as m, type SnapshotResourceList as n, type SnapshotResourceSummary as o };
|
package/docs/snapshot.md
CHANGED
|
@@ -35,9 +35,13 @@ const { data } = await snapshotClient.createSnapshot(...)
|
|
|
35
35
|
- [`getSnapshotResource`](#getsnapshotresource)
|
|
36
36
|
- [`listDependencies`](#listdependencies)
|
|
37
37
|
|
|
38
|
+
**ScheduledSnapshots**
|
|
39
|
+
- [`getOrgSnapshotSchedule`](#getorgsnapshotschedule)
|
|
40
|
+
- [`putOrgSnapshotSchedule`](#putorgsnapshotschedule)
|
|
41
|
+
- [`deleteOrgSnapshotSchedule`](#deleteorgsnapshotschedule)
|
|
42
|
+
|
|
38
43
|
**Schemas**
|
|
39
44
|
- [`Error`](#error)
|
|
40
|
-
- [`EmptyInventoryError`](#emptyinventoryerror)
|
|
41
45
|
- [`ResourceRef`](#resourceref)
|
|
42
46
|
- [`SnapshotResourceSummary`](#snapshotresourcesummary)
|
|
43
47
|
- [`SnapshotResourceList`](#snapshotresourcelist)
|
|
@@ -50,6 +54,9 @@ const { data } = await snapshotClient.createSnapshot(...)
|
|
|
50
54
|
- [`Snapshot`](#snapshot)
|
|
51
55
|
- [`Operation`](#operation)
|
|
52
56
|
- [`CallerIdentity`](#calleridentity)
|
|
57
|
+
- [`RetentionConfig`](#retentionconfig)
|
|
58
|
+
- [`PutOrgSnapshotScheduleRequest`](#putorgsnapshotschedulerequest)
|
|
59
|
+
- [`OrgSnapshotSchedule`](#orgsnapshotschedule)
|
|
53
60
|
|
|
54
61
|
### `createSnapshot`
|
|
55
62
|
|
|
@@ -156,9 +163,9 @@ const { data } = await client.listSnapshots({
|
|
|
156
163
|
|
|
157
164
|
### `captureOrgSnapshot`
|
|
158
165
|
|
|
159
|
-
Snapshot the caller's whole organization now.
|
|
160
|
-
|
|
161
|
-
|
|
166
|
+
Snapshot the caller's whole organization now. Creates a `scope: "org"`
|
|
167
|
+
snapshot row and starts a chunked capture Step Function, then returns
|
|
168
|
+
immediately. The capture asynchronously fetches a fresh inv
|
|
162
169
|
|
|
163
170
|
`POST /v1/snapshots:capture-org`
|
|
164
171
|
|
|
@@ -344,6 +351,112 @@ const { data } = await client.getSnapshotResource({
|
|
|
344
351
|
|
|
345
352
|
---
|
|
346
353
|
|
|
354
|
+
### `getOrgSnapshotSchedule`
|
|
355
|
+
|
|
356
|
+
Return the scheduled-snapshot enrollment config for the caller's org.
|
|
357
|
+
Returns 404 when the org has not yet enrolled.
|
|
358
|
+
|
|
359
|
+
`GET /v1/org-snapshot-schedule`
|
|
360
|
+
|
|
361
|
+
```ts
|
|
362
|
+
const { data } = await client.getOrgSnapshotSchedule()
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
<details>
|
|
366
|
+
<summary>Response</summary>
|
|
367
|
+
|
|
368
|
+
```json
|
|
369
|
+
{
|
|
370
|
+
"org_id": "string",
|
|
371
|
+
"enabled": true,
|
|
372
|
+
"cron_expression": "cron(0 2 * * ? *)",
|
|
373
|
+
"timezone": "string",
|
|
374
|
+
"retention": {
|
|
375
|
+
"value": 1,
|
|
376
|
+
"unit": "days"
|
|
377
|
+
},
|
|
378
|
+
"excluded_types": ["string"],
|
|
379
|
+
"schedule_name": "string",
|
|
380
|
+
"last_started_at": "1970-01-01T00:00:00.000Z",
|
|
381
|
+
"last_completed_at": "1970-01-01T00:00:00.000Z",
|
|
382
|
+
"last_status": "completed",
|
|
383
|
+
"created_by": "string",
|
|
384
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
385
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
386
|
+
}
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
</details>
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
393
|
+
### `putOrgSnapshotSchedule`
|
|
394
|
+
|
|
395
|
+
Create or update the scheduled-snapshot enrollment config for the
|
|
396
|
+
caller's org (upsert). The cron expression and retention window are
|
|
397
|
+
validated server-side; invalid values are rejected with 400.
|
|
398
|
+
|
|
399
|
+
`PUT /v1/org-snapshot-schedule`
|
|
400
|
+
|
|
401
|
+
```ts
|
|
402
|
+
const { data } = await client.putOrgSnapshotSchedule(
|
|
403
|
+
null,
|
|
404
|
+
{
|
|
405
|
+
enabled: true,
|
|
406
|
+
cron_expression: 'cron(0 2 * * ? *)',
|
|
407
|
+
timezone: 'Europe/Berlin',
|
|
408
|
+
retention: {
|
|
409
|
+
value: 1,
|
|
410
|
+
unit: 'days'
|
|
411
|
+
},
|
|
412
|
+
excluded_types: ['string']
|
|
413
|
+
},
|
|
414
|
+
)
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
<details>
|
|
418
|
+
<summary>Response</summary>
|
|
419
|
+
|
|
420
|
+
```json
|
|
421
|
+
{
|
|
422
|
+
"org_id": "string",
|
|
423
|
+
"enabled": true,
|
|
424
|
+
"cron_expression": "cron(0 2 * * ? *)",
|
|
425
|
+
"timezone": "string",
|
|
426
|
+
"retention": {
|
|
427
|
+
"value": 1,
|
|
428
|
+
"unit": "days"
|
|
429
|
+
},
|
|
430
|
+
"excluded_types": ["string"],
|
|
431
|
+
"schedule_name": "string",
|
|
432
|
+
"last_started_at": "1970-01-01T00:00:00.000Z",
|
|
433
|
+
"last_completed_at": "1970-01-01T00:00:00.000Z",
|
|
434
|
+
"last_status": "completed",
|
|
435
|
+
"created_by": "string",
|
|
436
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
437
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
438
|
+
}
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
</details>
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
### `deleteOrgSnapshotSchedule`
|
|
446
|
+
|
|
447
|
+
Remove the scheduled-snapshot enrollment for the caller's org.
|
|
448
|
+
Returns 404 when no schedule exists.
|
|
449
|
+
The corresponding EventBridge schedule is removed by a reconcile
|
|
450
|
+
step (Task 6).
|
|
451
|
+
|
|
452
|
+
`DELETE /v1/org-snapshot-schedule`
|
|
453
|
+
|
|
454
|
+
```ts
|
|
455
|
+
const { data } = await client.deleteOrgSnapshotSchedule()
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
---
|
|
459
|
+
|
|
347
460
|
### `listDependencies`
|
|
348
461
|
|
|
349
462
|
Walk the dependency tree for a set of resources and return the full
|
|
@@ -394,23 +507,6 @@ type Error = {
|
|
|
394
507
|
}
|
|
395
508
|
```
|
|
396
509
|
|
|
397
|
-
### `EmptyInventoryError`
|
|
398
|
-
|
|
399
|
-
Returned (422) when the org inventory contains no capturable resources
|
|
400
|
-
after filtering out sensitive, unsupported, and excluded types. The
|
|
401
|
-
`skipped_types` array explains why every type was dropped.
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
```ts
|
|
405
|
-
type EmptyInventoryError = {
|
|
406
|
-
message: string
|
|
407
|
-
skipped_types: Array<{
|
|
408
|
-
type: string
|
|
409
|
-
reason: string
|
|
410
|
-
}>
|
|
411
|
-
}
|
|
412
|
-
```
|
|
413
|
-
|
|
414
510
|
### `ResourceRef`
|
|
415
511
|
|
|
416
512
|
```ts
|
|
@@ -605,3 +701,65 @@ type CallerIdentity = {
|
|
|
605
701
|
token_id?: string
|
|
606
702
|
}
|
|
607
703
|
```
|
|
704
|
+
|
|
705
|
+
### `RetentionConfig`
|
|
706
|
+
|
|
707
|
+
Flat retention window for a scheduled snapshot.
|
|
708
|
+
Converted to a `ttl` epoch at capture time. Capped at ~24 months.
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
```ts
|
|
712
|
+
type RetentionConfig = {
|
|
713
|
+
value: number
|
|
714
|
+
unit: "days" | "weeks" | "months"
|
|
715
|
+
}
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
### `PutOrgSnapshotScheduleRequest`
|
|
719
|
+
|
|
720
|
+
Body for `putOrgSnapshotSchedule`. All fields optional; unset fields
|
|
721
|
+
receive defaults on first create and are left unchanged on updates
|
|
722
|
+
(except `updated_at`).
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
```ts
|
|
726
|
+
type PutOrgSnapshotScheduleRequest = {
|
|
727
|
+
enabled?: boolean
|
|
728
|
+
cron_expression?: string
|
|
729
|
+
timezone?: string
|
|
730
|
+
retention?: {
|
|
731
|
+
value: number
|
|
732
|
+
unit: "days" | "weeks" | "months"
|
|
733
|
+
}
|
|
734
|
+
excluded_types?: string[]
|
|
735
|
+
}
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
### `OrgSnapshotSchedule`
|
|
739
|
+
|
|
740
|
+
Enrollment record for a scheduled org snapshot. One row per org.
|
|
741
|
+
This table — not EventBridge — is the source of truth; the EventBridge
|
|
742
|
+
schedule entry is the materialization of this row (reconciled on write
|
|
743
|
+
by Task 6).
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
```ts
|
|
747
|
+
type OrgSnapshotSchedule = {
|
|
748
|
+
org_id: string
|
|
749
|
+
enabled: boolean
|
|
750
|
+
cron_expression: string
|
|
751
|
+
timezone: string
|
|
752
|
+
retention: {
|
|
753
|
+
value: number
|
|
754
|
+
unit: "days" | "weeks" | "months"
|
|
755
|
+
}
|
|
756
|
+
excluded_types?: string[]
|
|
757
|
+
schedule_name: string
|
|
758
|
+
last_started_at?: string // date-time
|
|
759
|
+
last_completed_at?: string // date-time
|
|
760
|
+
last_status?: "completed" | "partial" | "failed"
|
|
761
|
+
created_by: string
|
|
762
|
+
created_at: string // date-time
|
|
763
|
+
updated_at: string // date-time
|
|
764
|
+
}
|
|
765
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/snapshot.json
|
|
4
|
-
var snapshot_default = '# Snapshot API\n\n- **Base URL:** `https://snapshot.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/snapshot](https://docs.epilot.io/api/snapshot)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.snapshot.createSnapshot(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/snapshot\'\n\nconst snapshotClient = getClient()\nauthorize(snapshotClient, () => \'<token>\')\nconst { data } = await snapshotClient.createSnapshot(...)\n```\n\n## Operations\n\n**Snapshots**\n- [`createSnapshot`](#createsnapshot)\n- [`listSnapshots`](#listsnapshots)\n- [`captureOrgSnapshot`](#captureorgsnapshot)\n- [`getSnapshot`](#getsnapshot)\n- [`deleteSnapshot`](#deletesnapshot)\n- [`restoreSnapshot`](#restoresnapshot)\n- [`listSnapshotResources`](#listsnapshotresources)\n- [`getSnapshotResource`](#getsnapshotresource)\n- [`listDependencies`](#listdependencies)\n\n**Schemas**\n- [`Error`](#error)\n- [`EmptyInventoryError`](#emptyinventoryerror)\n- [`ResourceRef`](#resourceref)\n- [`SnapshotResourceSummary`](#snapshotresourcesummary)\n- [`SnapshotResourceList`](#snapshotresourcelist)\n- [`SnapshotResourceDetail`](#snapshotresourcedetail)\n- [`CreateSnapshotRequest`](#createsnapshotrequest)\n- [`CreateOrgSnapshotRequest`](#createorgsnapshotrequest)\n- [`CreateSnapshotResponse`](#createsnapshotresponse)\n- [`RestoreSnapshotRequest`](#restoresnapshotrequest)\n- [`RestoreSnapshotResponse`](#restoresnapshotresponse)\n- [`Snapshot`](#snapshot)\n- [`Operation`](#operation)\n- [`CallerIdentity`](#calleridentity)\n\n### `createSnapshot`\n\nCreate a new snapshot of the given resources. Async \u2014 returns immediately\nwith a snapshot ID; client polls `getSnapshot` until `create.status`\nmoves from `in_progress` to `completed` or `failed`.\n\n`POST /v1/snapshots`\n\n```ts\nconst { data } = await client.createSnapshot(\n null,\n {\n name: \'string\',\n description: \'string\',\n trigger: \'manual\',\n blueprint_instance_id: \'string\',\n resources: [\n {\n type: \'string\',\n id: \'string\'\n }\n ]\n },\n)\n```\n\n---\n\n### `listSnapshots`\n\nList snapshots for the caller\'s organization, newest first.\n\n`GET /v1/snapshots`\n\n```ts\nconst { data } = await client.listSnapshots({\n cursor: \'example\',\n size: 1,\n resource: [\'...\'],\n trigger: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "page_size": 0,\n "cursor": "string",\n "results": [\n {\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": "manual",\n "blueprint_instance_id": "string",\n "resource_counts": {},\n "create": {\n "type": "create",\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status": "in_progress",\n "error": "string",\n "triggered_by": {\n "name": "string",\n "user_id": "string",\n "token_id": "string"\n }\n },\n "restores": [\n {\n "type": "create",\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status": "in_progress",\n "error": "string",\n "triggered_by": {\n "name": "string",\n "user_id": "string",\n "token_id": "string"\n }\n }\n ],\n "matched_count": 0,\n "scope": "selection",\n "expires_at": "1970-01-01T00:00:00.000Z",\n "capture_summary": {\n "total": 0,\n "captured": 0,\n "skipped": 0,\n "failed": 0\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `captureOrgSnapshot`\n\nSnapshot 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\n\n`POST /v1/snapshots:capture-org`\n\n```ts\nconst { data } = await client.captureOrgSnapshot(\n null,\n {\n name: \'string\',\n retention: {\n value: 1,\n unit: \'days\'\n },\n excluded_types: [\'string\']\n },\n)\n```\n\n---\n\n### `getSnapshot`\n\nFetch a snapshot\'s metadata. Poll this endpoint to track create/restore progress.\n\n`GET /v1/snapshots/{id}`\n\n```ts\nconst { data } = await client.getSnapshot({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "org_id": "string",\n "name": "string",\n "description": "string",\n "trigger": "manual",\n "blueprint_instance_id": "string",\n "resource_counts": {},\n "create": {\n "type": "create",\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status": "in_progress",\n "error": "string",\n "triggered_by": {\n "name": "string",\n "user_id": "string",\n "token_id": "string"\n }\n },\n "restores": [\n {\n "type": "create",\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "status": "in_progress",\n "error": "string",\n "triggered_by": {\n "name": "string",\n "user_id": "string",\n "token_id": "string"\n }\n }\n ],\n "matched_count": 0,\n "scope": "selection",\n "expires_at": "1970-01-01T00:00:00.000Z",\n "capture_summary": {\n "total": 0,\n "captured": 0,\n "skipped": 0,\n "failed": 0\n }\n}\n```\n\n</details>\n\n---\n\n### `deleteSnapshot`\n\nDelete a snapshot\'s metadata and S3 manifest.\n\n`DELETE /v1/snapshots/{id}`\n\n```ts\nconst { data } = await client.deleteSnapshot({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n---\n\n### `restoreSnapshot`\n\nRestore a snapshot to the org. Async \u2014 returns immediately; client polls\n`getSnapshot` until the latest entry in `restores` moves from\n`in_progress` to one of `completed | partial | failed`.\n\n`POST /v1/snapshots/{id}:restore`\n\n```ts\nconst { data } = await client.restoreSnapshot(\n {\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n },\n {\n exclude_target_ids: [\'string\']\n },\n)\n```\n\n---\n\n### `listSnapshotResources`\n\nList the resources captured in this snapshot. Returns lightweight\nidentity fields per resource \u2014 payloads are fetched via the\nsingle-resource endpoint when needed.\n\n`GET /v1/snapshots/{id}/resources`\n\n```ts\nconst { data } = await client.listSnapshotResources({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "resources": [\n {\n "lineage_id": "string",\n "target_id": "string",\n "type": "string",\n "name": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getSnapshotResource`\n\nFetch one captured resource with its full payload. For UI views\nthat diff the captured state against the current destination.\n\n`GET /v1/snapshots/{id}/resources/{lineage_id}`\n\n```ts\nconst { data } = await client.getSnapshotResource({\n id: \'123e4567-e89b-12d3-a456-426614174000\',\n lineage_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "lineage_id": "string",\n "target_id": "string",\n "type": "string",\n "name": "string",\n "captured": {}\n}\n```\n\n</details>\n\n---\n\n### `listDependencies`\n\nWalk the dependency tree for a set of resources and return the full\ntransitive closure, topologically sorted.\n\n`POST /v1/snapshots:list-dependencies`\n\n```ts\nconst { data } = await client.listDependencies(\n null,\n {\n resources: [\n {\n type: \'string\',\n id: \'string\'\n }\n ]\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "dependencies": [\n {\n "type": "string",\n "id": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `Error`\n\n```ts\ntype Error = {\n status: number\n error: string\n}\n```\n\n### `EmptyInventoryError`\n\nReturned (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\n\n```ts\ntype EmptyInventoryError = {\n message: string\n skipped_types: Array<{\n type: string\n reason: string\n }>\n}\n```\n\n### `ResourceRef`\n\n```ts\ntype ResourceRef = {\n type: string\n id: string\n}\n```\n\n### `SnapshotResourceSummary`\n\nLightweight identity for a captured resource. Returned by\n`listSnapshotResources`; the full payload is fetched separately via\n`getSnapshotResource` when needed.\n\n\n```ts\ntype SnapshotResourceSummary = {\n lineage_id: string\n target_id: string\n type: string\n name?: string\n}\n```\n\n### `SnapshotResourceList`\n\n```ts\ntype SnapshotResourceList = {\n resources: Array<{\n lineage_id: string\n target_id: string\n type: string\n name?: string\n }>\n}\n```\n\n### `SnapshotResourceDetail`\n\nA single captured resource with its full payload. The identity fields\nmatch `SnapshotResourceSummary`; the `captured` payload is the\npre-install state at snapshot time.\n\n\n```ts\ntype SnapshotResourceDetail = {\n lineage_id: string\n target_id: string\n type: string\n name?: string\n captured: Record<string, unknown>\n}\n```\n\n### `CreateSnapshotRequest`\n\n```ts\ntype CreateSnapshotRequest = {\n name: string\n description?: string\n trigger?: "manual" | "sync" | "blueprint_install" | "scheduled"\n blueprint_instance_id?: string\n resources: Array<{\n type: string\n id: string\n }>\n}\n```\n\n### `CreateOrgSnapshotRequest`\n\nRequest body for `captureOrgSnapshot`. All fields optional \u2014 an empty body\nsnapshots the whole org with a default name and the 90-day default TTL.\n\n\n```ts\ntype CreateOrgSnapshotRequest = {\n name?: string\n retention?: {\n value: number\n unit: "days" | "weeks" | "months"\n }\n excluded_types?: string[]\n}\n```\n\n### `CreateSnapshotResponse`\n\n```ts\ntype CreateSnapshotResponse = {\n id: string\n name: string\n status: "creating"\n created_at: string // date-time\n}\n```\n\n### `RestoreSnapshotRequest`\n\nApply a captured snapshot to its source org. snapshot-api applies the\nmanifest verbatim minus any target ids the caller pre-decided to skip.\nDrift detection (skip modified-since-install) is the caller\'s\nresponsibility \u2014 blueprint-manifest-api owns that logic for blueprint\nrestores; Config Hub\'s manu\n\n```ts\ntype RestoreSnapshotRequest = {\n exclude_target_ids?: string[]\n}\n```\n\n### `RestoreSnapshotResponse`\n\n```ts\ntype RestoreSnapshotResponse = {\n id: string\n status: "restoring"\n}\n```\n\n### `Snapshot`\n\n```ts\ntype Snapshot = {\n id: string\n org_id: string\n name: string\n description?: string\n trigger: "manual" | "sync" | "blueprint_install" | "scheduled"\n blueprint_instance_id?: string\n resource_counts: Record<string, number>\n create: {\n type: "create" | "restore"\n started_at: string // date-time\n completed_at?: string // date-time\n status: "in_progress" | "completed" | "partial" | "failed"\n error?: string\n triggered_by: {\n name: { ... }\n user_id?: { ... }\n token_id?: { ... }\n }\n }\n restores: Array<{\n type: "create" | "restore"\n started_at: string // date-time\n completed_at?: string // date-time\n status: "in_progress" | "completed" | "partial" | "failed"\n error?: string\n triggered_by: {\n name: { ... }\n user_id?: { ... }\n token_id?: { ... }\n }\n }>\n matched_count?: number\n scope?: "selection" | "org"\n expires_at?: string // date-time\n capture_summary?: {\n total: number\n captured: number\n skipped: number\n failed: number\n }\n}\n```\n\n### `Operation`\n\n```ts\ntype Operation = {\n type: "create" | "restore"\n started_at: string // date-time\n completed_at?: string // date-time\n status: "in_progress" | "completed" | "partial" | "failed"\n error?: string\n triggered_by: {\n name: string\n user_id?: string\n token_id?: string\n }\n}\n```\n\n### `CallerIdentity`\n\n```ts\ntype CallerIdentity = {\n name: string\n user_id?: string\n token_id?: string\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
snapshot_default as default
|
|
7
|
-
};
|