@epilot/sdk 2.8.4 → 2.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/definitions/snapshot-runtime.json +1 -1
- package/definitions/snapshot.json +175 -11
- 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-4SZCKUY2.js +14 -0
- package/dist/{chunk-TP3MI5V5.js → chunk-5FXMXMNX.js} +2 -2
- package/dist/chunk-ULKFBO7E.cjs +14 -0
- package/dist/{chunk-M432U2EN.cjs → chunk-XRIEGQXL.cjs} +2 -2
- 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-GDJOEFJQ.js +7 -0
- package/dist/snapshot-UKV54UQQ.cjs +7 -0
- package/dist/{snapshot-runtime-XUQIDON7.cjs → snapshot-runtime-5TT575JS.cjs} +2 -2
- package/dist/{snapshot-runtime-EXWPPYJI.js → snapshot-runtime-KWRGOKF4.js} +1 -1
- package/dist/{snapshot.d-BX0xhQlH.d.cts → snapshot.d-C-n4wkIu.d.cts} +185 -20
- package/dist/{snapshot.d-BX0xhQlH.d.ts → snapshot.d-C-n4wkIu.d.ts} +185 -20
- package/docs/snapshot.md +99 -6
- package/package.json +1 -1
- package/dist/chunk-DFYZ3LS2.cjs +0 -14
- package/dist/chunk-GUYARNLI.js +0 -14
- package/dist/snapshot-CTKT2ILE.cjs +0 -7
- package/dist/snapshot-XYFMWDVA.js +0 -7
|
@@ -8,6 +8,13 @@ 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;
|
|
11
18
|
}
|
|
12
19
|
namespace Schemas {
|
|
13
20
|
export interface CallerIdentity {
|
|
@@ -15,15 +22,43 @@ declare namespace Components {
|
|
|
15
22
|
user_id?: string;
|
|
16
23
|
token_id?: string;
|
|
17
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Request body for `captureOrgSnapshot`. All fields optional — an empty body
|
|
27
|
+
* snapshots the whole org with a default name and the 90-day default TTL.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export interface CreateOrgSnapshotRequest {
|
|
31
|
+
/**
|
|
32
|
+
* Snapshot name. Defaults to "Org snapshot — <ISO timestamp>".
|
|
33
|
+
*/
|
|
34
|
+
name?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Retention window. Converted to an absolute `expires_at` at creation
|
|
37
|
+
* time. Omit for the default 90-day TTL.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
retention?: {
|
|
41
|
+
value: number;
|
|
42
|
+
unit: "days" | "weeks" | "months";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Resource types to exclude from the capture, in addition to the
|
|
46
|
+
* always-excluded sensitive types (`access_token`,
|
|
47
|
+
* `environment_variable`).
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
excluded_types?: string[];
|
|
51
|
+
}
|
|
18
52
|
export interface CreateSnapshotRequest {
|
|
19
53
|
name: string;
|
|
20
54
|
description?: string;
|
|
21
55
|
/**
|
|
22
|
-
* What initiated this snapshot. `scheduled`
|
|
23
|
-
*
|
|
56
|
+
* What initiated this snapshot. `scheduled` is used for automatic
|
|
57
|
+
* nightly backups triggered by an org's EventBridge schedule
|
|
58
|
+
* (RFC — Scheduled org snapshots).
|
|
24
59
|
*
|
|
25
60
|
*/
|
|
26
|
-
trigger?: "manual" | "sync" | "blueprint_install";
|
|
61
|
+
trigger?: "manual" | "sync" | "blueprint_install" | "scheduled";
|
|
27
62
|
/**
|
|
28
63
|
* Required iff `trigger === 'blueprint_install'`; forbidden otherwise.
|
|
29
64
|
* Identifies the destination blueprint instance whose install this
|
|
@@ -48,6 +83,23 @@ declare namespace Components {
|
|
|
48
83
|
status: "creating";
|
|
49
84
|
created_at: string; // date-time
|
|
50
85
|
}
|
|
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
|
+
}
|
|
51
103
|
export interface Error {
|
|
52
104
|
status: number;
|
|
53
105
|
error: string;
|
|
@@ -80,25 +132,30 @@ declare namespace Components {
|
|
|
80
132
|
type: string;
|
|
81
133
|
id: string;
|
|
82
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Both flags default to `false`, which restores every captured resource —
|
|
137
|
+
* Config Hub's manual-restore semantics. blueprint-manifest-api sets
|
|
138
|
+
* both `true` when reverting a blueprint install so user edits and
|
|
139
|
+
* cross-blueprint contributions survive. Each flag is independent so a
|
|
140
|
+
* caller can preserve edits without preserving co-ownership (or vice
|
|
141
|
+
* versa). Skipped resources surface under `Operation.skipped`.
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
83
144
|
export interface RestoreSnapshotRequest {
|
|
84
145
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
146
|
+
* When `true`, skip captured resources whose live destination payload
|
|
147
|
+
* has diverged from the install-time fingerprint stored on lineage.
|
|
148
|
+
* Surfaces under `Operation.skipped` with `reason: 'modified'`.
|
|
87
149
|
*
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* entry under `Operation.skipped`. Also skips co-owned resources
|
|
95
|
-
* (lineage row carrying ≥2 distinct blueprint_instance_ids).
|
|
96
|
-
* Used by blueprint-manifest-api when reverting a blueprint
|
|
97
|
-
* install so user edits and other blueprints' contributions
|
|
98
|
-
* survive.
|
|
150
|
+
*/
|
|
151
|
+
preserve_modified?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* When `true`, skip captured resources whose lineage row carries
|
|
154
|
+
* another blueprint instance's id (co-ownership ≥2). Surfaces under
|
|
155
|
+
* `Operation.skipped` with `reason: 'co_owned'`.
|
|
99
156
|
*
|
|
100
157
|
*/
|
|
101
|
-
|
|
158
|
+
preserve_co_owned?: boolean;
|
|
102
159
|
}
|
|
103
160
|
export interface RestoreSnapshotResponse {
|
|
104
161
|
id: string;
|
|
@@ -121,7 +178,7 @@ declare namespace Components {
|
|
|
121
178
|
org_id: string;
|
|
122
179
|
name: string;
|
|
123
180
|
description?: string;
|
|
124
|
-
trigger: "manual" | "sync" | "blueprint_install";
|
|
181
|
+
trigger: "manual" | "sync" | "blueprint_install" | "scheduled";
|
|
125
182
|
/**
|
|
126
183
|
* Set iff `trigger === 'blueprint_install'`. The destination blueprint
|
|
127
184
|
* instance this snapshot covers.
|
|
@@ -145,6 +202,48 @@ declare namespace Components {
|
|
|
145
202
|
*
|
|
146
203
|
*/
|
|
147
204
|
matched_count?: number;
|
|
205
|
+
/**
|
|
206
|
+
* Capture scope. `selection` (default for manual/sync/blueprint_install)
|
|
207
|
+
* means only the explicitly listed resources were snapshotted.
|
|
208
|
+
* `org` means a full org inventory was discovered and captured
|
|
209
|
+
* (scheduled snapshots set this automatically).
|
|
210
|
+
*
|
|
211
|
+
*/
|
|
212
|
+
scope?: "selection" | "org";
|
|
213
|
+
/**
|
|
214
|
+
* ISO-8601 timestamp after which this snapshot will be deleted.
|
|
215
|
+
* Derived from the org's retention setting at capture time for
|
|
216
|
+
* scheduled snapshots; not set for manual snapshots (which use
|
|
217
|
+
* a hardcoded 90-day TTL written directly as a DynamoDB `ttl` epoch).
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
expires_at?: string; // date-time
|
|
221
|
+
/**
|
|
222
|
+
* Per-snapshot coverage report set by the capture worker on completion.
|
|
223
|
+
* Records how many resources were attempted, captured, skipped
|
|
224
|
+
* (unsupported type or explicitly excluded), and failed.
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
227
|
+
capture_summary?: {
|
|
228
|
+
/**
|
|
229
|
+
* Total resources in the inventory that were attempted.
|
|
230
|
+
*/
|
|
231
|
+
total: number;
|
|
232
|
+
/**
|
|
233
|
+
* Resources successfully fetched and written to the manifest.
|
|
234
|
+
*/
|
|
235
|
+
captured: number;
|
|
236
|
+
/**
|
|
237
|
+
* Resources skipped — type not supported by config-engine or
|
|
238
|
+
* excluded from capture (e.g. access_token, environment_variable).
|
|
239
|
+
*
|
|
240
|
+
*/
|
|
241
|
+
skipped: number;
|
|
242
|
+
/**
|
|
243
|
+
* Resources where the fetch call returned an error.
|
|
244
|
+
*/
|
|
245
|
+
failed: number;
|
|
246
|
+
};
|
|
148
247
|
}
|
|
149
248
|
/**
|
|
150
249
|
* A single captured resource with its full payload. The identity fields
|
|
@@ -204,6 +303,19 @@ declare namespace Components {
|
|
|
204
303
|
}
|
|
205
304
|
}
|
|
206
305
|
declare namespace Paths {
|
|
306
|
+
namespace CaptureOrgSnapshot {
|
|
307
|
+
export type RequestBody = /**
|
|
308
|
+
* Request body for `captureOrgSnapshot`. All fields optional — an empty body
|
|
309
|
+
* snapshots the whole org with a default name and the 90-day default TTL.
|
|
310
|
+
*
|
|
311
|
+
*/
|
|
312
|
+
Components.Schemas.CreateOrgSnapshotRequest;
|
|
313
|
+
namespace Responses {
|
|
314
|
+
export type $202 = Components.Schemas.CreateSnapshotResponse;
|
|
315
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
316
|
+
export type $422 = Components.Responses.UnprocessableEntity;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
207
319
|
namespace CreateSnapshot {
|
|
208
320
|
export type RequestBody = Components.Schemas.CreateSnapshotRequest;
|
|
209
321
|
namespace Responses {
|
|
@@ -286,7 +398,16 @@ declare namespace Paths {
|
|
|
286
398
|
}
|
|
287
399
|
}
|
|
288
400
|
namespace RestoreSnapshot {
|
|
289
|
-
export type RequestBody =
|
|
401
|
+
export type RequestBody = /**
|
|
402
|
+
* Both flags default to `false`, which restores every captured resource —
|
|
403
|
+
* Config Hub's manual-restore semantics. blueprint-manifest-api sets
|
|
404
|
+
* both `true` when reverting a blueprint install so user edits and
|
|
405
|
+
* cross-blueprint contributions survive. Each flag is independent so a
|
|
406
|
+
* caller can preserve edits without preserving co-ownership (or vice
|
|
407
|
+
* versa). Skipped resources surface under `Operation.skipped`.
|
|
408
|
+
*
|
|
409
|
+
*/
|
|
410
|
+
Components.Schemas.RestoreSnapshotRequest;
|
|
290
411
|
namespace Responses {
|
|
291
412
|
export type $202 = Components.Schemas.RestoreSnapshotResponse;
|
|
292
413
|
export type $401 = Components.Responses.Unauthorized;
|
|
@@ -361,6 +482,26 @@ interface OperationMethods {
|
|
|
361
482
|
data?: Paths.CreateSnapshot.RequestBody,
|
|
362
483
|
config?: AxiosRequestConfig
|
|
363
484
|
): OperationResponse<Paths.CreateSnapshot.Responses.$202>
|
|
485
|
+
/**
|
|
486
|
+
* captureOrgSnapshot - captureOrgSnapshot
|
|
487
|
+
*
|
|
488
|
+
* Snapshot the caller's whole organization now. Fetches a fresh inventory
|
|
489
|
+
* of the org's configuration resources from configuration-hub-api, persists
|
|
490
|
+
* it as an inventory artifact, and starts a `scope: "org"` chunked capture.
|
|
491
|
+
* Async — returns immediately with a snapshot ID; client polls `getSnapshot`
|
|
492
|
+
* and watches `capture_summary` fill in until `create.status` moves from
|
|
493
|
+
* `in_progress` to `completed` or `failed`.
|
|
494
|
+
*
|
|
495
|
+
* Sensitive types (`access_token`, `environment_variable`), types with no
|
|
496
|
+
* engine adapter, and any `excluded_types` are dropped from the capture and
|
|
497
|
+
* recorded in the snapshot's coverage report.
|
|
498
|
+
*
|
|
499
|
+
*/
|
|
500
|
+
'captureOrgSnapshot'(
|
|
501
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
502
|
+
data?: Paths.CaptureOrgSnapshot.RequestBody,
|
|
503
|
+
config?: AxiosRequestConfig
|
|
504
|
+
): OperationResponse<Paths.CaptureOrgSnapshot.Responses.$202>
|
|
364
505
|
/**
|
|
365
506
|
* getSnapshot - getSnapshot
|
|
366
507
|
*
|
|
@@ -476,6 +617,28 @@ interface PathsDictionary {
|
|
|
476
617
|
config?: AxiosRequestConfig
|
|
477
618
|
): OperationResponse<Paths.ListSnapshots.Responses.$200>
|
|
478
619
|
}
|
|
620
|
+
['/v1/snapshots:capture-org']: {
|
|
621
|
+
/**
|
|
622
|
+
* captureOrgSnapshot - captureOrgSnapshot
|
|
623
|
+
*
|
|
624
|
+
* Snapshot the caller's whole organization now. Fetches a fresh inventory
|
|
625
|
+
* of the org's configuration resources from configuration-hub-api, persists
|
|
626
|
+
* it as an inventory artifact, and starts a `scope: "org"` chunked capture.
|
|
627
|
+
* Async — returns immediately with a snapshot ID; client polls `getSnapshot`
|
|
628
|
+
* and watches `capture_summary` fill in until `create.status` moves from
|
|
629
|
+
* `in_progress` to `completed` or `failed`.
|
|
630
|
+
*
|
|
631
|
+
* Sensitive types (`access_token`, `environment_variable`), types with no
|
|
632
|
+
* engine adapter, and any `excluded_types` are dropped from the capture and
|
|
633
|
+
* recorded in the snapshot's coverage report.
|
|
634
|
+
*
|
|
635
|
+
*/
|
|
636
|
+
'post'(
|
|
637
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
638
|
+
data?: Paths.CaptureOrgSnapshot.RequestBody,
|
|
639
|
+
config?: AxiosRequestConfig
|
|
640
|
+
): OperationResponse<Paths.CaptureOrgSnapshot.Responses.$202>
|
|
641
|
+
}
|
|
479
642
|
['/v1/snapshots/{id}']: {
|
|
480
643
|
/**
|
|
481
644
|
* getSnapshot - getSnapshot
|
|
@@ -572,8 +735,10 @@ type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
|
572
735
|
|
|
573
736
|
|
|
574
737
|
type CallerIdentity = Components.Schemas.CallerIdentity;
|
|
738
|
+
type CreateOrgSnapshotRequest = Components.Schemas.CreateOrgSnapshotRequest;
|
|
575
739
|
type CreateSnapshotRequest = Components.Schemas.CreateSnapshotRequest;
|
|
576
740
|
type CreateSnapshotResponse = Components.Schemas.CreateSnapshotResponse;
|
|
741
|
+
type EmptyInventoryError = Components.Schemas.EmptyInventoryError;
|
|
577
742
|
type Error = Components.Schemas.Error;
|
|
578
743
|
type Operation = Components.Schemas.Operation;
|
|
579
744
|
type ResourceRef = Components.Schemas.ResourceRef;
|
|
@@ -585,4 +750,4 @@ type SnapshotResourceDetail = Components.Schemas.SnapshotResourceDetail;
|
|
|
585
750
|
type SnapshotResourceList = Components.Schemas.SnapshotResourceList;
|
|
586
751
|
type SnapshotResourceSummary = Components.Schemas.SnapshotResourceSummary;
|
|
587
752
|
|
|
588
|
-
export { type Client as C, type
|
|
753
|
+
export { type Client as C, type EmptyInventoryError as E, type OperationMethods as O, Paths as P, type ResourceRef as R, type SkippedResource 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 Error as g, type Operation as h, type RestoreSnapshotRequest as i, type RestoreSnapshotResponse as j, type Snapshot as k, type SnapshotResourceDetail as l, type SnapshotResourceList as m, type SnapshotResourceSummary as n };
|
|
@@ -8,6 +8,13 @@ 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;
|
|
11
18
|
}
|
|
12
19
|
namespace Schemas {
|
|
13
20
|
export interface CallerIdentity {
|
|
@@ -15,15 +22,43 @@ declare namespace Components {
|
|
|
15
22
|
user_id?: string;
|
|
16
23
|
token_id?: string;
|
|
17
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Request body for `captureOrgSnapshot`. All fields optional — an empty body
|
|
27
|
+
* snapshots the whole org with a default name and the 90-day default TTL.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
export interface CreateOrgSnapshotRequest {
|
|
31
|
+
/**
|
|
32
|
+
* Snapshot name. Defaults to "Org snapshot — <ISO timestamp>".
|
|
33
|
+
*/
|
|
34
|
+
name?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Retention window. Converted to an absolute `expires_at` at creation
|
|
37
|
+
* time. Omit for the default 90-day TTL.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
retention?: {
|
|
41
|
+
value: number;
|
|
42
|
+
unit: "days" | "weeks" | "months";
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Resource types to exclude from the capture, in addition to the
|
|
46
|
+
* always-excluded sensitive types (`access_token`,
|
|
47
|
+
* `environment_variable`).
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
excluded_types?: string[];
|
|
51
|
+
}
|
|
18
52
|
export interface CreateSnapshotRequest {
|
|
19
53
|
name: string;
|
|
20
54
|
description?: string;
|
|
21
55
|
/**
|
|
22
|
-
* What initiated this snapshot. `scheduled`
|
|
23
|
-
*
|
|
56
|
+
* What initiated this snapshot. `scheduled` is used for automatic
|
|
57
|
+
* nightly backups triggered by an org's EventBridge schedule
|
|
58
|
+
* (RFC — Scheduled org snapshots).
|
|
24
59
|
*
|
|
25
60
|
*/
|
|
26
|
-
trigger?: "manual" | "sync" | "blueprint_install";
|
|
61
|
+
trigger?: "manual" | "sync" | "blueprint_install" | "scheduled";
|
|
27
62
|
/**
|
|
28
63
|
* Required iff `trigger === 'blueprint_install'`; forbidden otherwise.
|
|
29
64
|
* Identifies the destination blueprint instance whose install this
|
|
@@ -48,6 +83,23 @@ declare namespace Components {
|
|
|
48
83
|
status: "creating";
|
|
49
84
|
created_at: string; // date-time
|
|
50
85
|
}
|
|
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
|
+
}
|
|
51
103
|
export interface Error {
|
|
52
104
|
status: number;
|
|
53
105
|
error: string;
|
|
@@ -80,25 +132,30 @@ declare namespace Components {
|
|
|
80
132
|
type: string;
|
|
81
133
|
id: string;
|
|
82
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Both flags default to `false`, which restores every captured resource —
|
|
137
|
+
* Config Hub's manual-restore semantics. blueprint-manifest-api sets
|
|
138
|
+
* both `true` when reverting a blueprint install so user edits and
|
|
139
|
+
* cross-blueprint contributions survive. Each flag is independent so a
|
|
140
|
+
* caller can preserve edits without preserving co-ownership (or vice
|
|
141
|
+
* versa). Skipped resources surface under `Operation.skipped`.
|
|
142
|
+
*
|
|
143
|
+
*/
|
|
83
144
|
export interface RestoreSnapshotRequest {
|
|
84
145
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
146
|
+
* When `true`, skip captured resources whose live destination payload
|
|
147
|
+
* has diverged from the install-time fingerprint stored on lineage.
|
|
148
|
+
* Surfaces under `Operation.skipped` with `reason: 'modified'`.
|
|
87
149
|
*
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* entry under `Operation.skipped`. Also skips co-owned resources
|
|
95
|
-
* (lineage row carrying ≥2 distinct blueprint_instance_ids).
|
|
96
|
-
* Used by blueprint-manifest-api when reverting a blueprint
|
|
97
|
-
* install so user edits and other blueprints' contributions
|
|
98
|
-
* survive.
|
|
150
|
+
*/
|
|
151
|
+
preserve_modified?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* When `true`, skip captured resources whose lineage row carries
|
|
154
|
+
* another blueprint instance's id (co-ownership ≥2). Surfaces under
|
|
155
|
+
* `Operation.skipped` with `reason: 'co_owned'`.
|
|
99
156
|
*
|
|
100
157
|
*/
|
|
101
|
-
|
|
158
|
+
preserve_co_owned?: boolean;
|
|
102
159
|
}
|
|
103
160
|
export interface RestoreSnapshotResponse {
|
|
104
161
|
id: string;
|
|
@@ -121,7 +178,7 @@ declare namespace Components {
|
|
|
121
178
|
org_id: string;
|
|
122
179
|
name: string;
|
|
123
180
|
description?: string;
|
|
124
|
-
trigger: "manual" | "sync" | "blueprint_install";
|
|
181
|
+
trigger: "manual" | "sync" | "blueprint_install" | "scheduled";
|
|
125
182
|
/**
|
|
126
183
|
* Set iff `trigger === 'blueprint_install'`. The destination blueprint
|
|
127
184
|
* instance this snapshot covers.
|
|
@@ -145,6 +202,48 @@ declare namespace Components {
|
|
|
145
202
|
*
|
|
146
203
|
*/
|
|
147
204
|
matched_count?: number;
|
|
205
|
+
/**
|
|
206
|
+
* Capture scope. `selection` (default for manual/sync/blueprint_install)
|
|
207
|
+
* means only the explicitly listed resources were snapshotted.
|
|
208
|
+
* `org` means a full org inventory was discovered and captured
|
|
209
|
+
* (scheduled snapshots set this automatically).
|
|
210
|
+
*
|
|
211
|
+
*/
|
|
212
|
+
scope?: "selection" | "org";
|
|
213
|
+
/**
|
|
214
|
+
* ISO-8601 timestamp after which this snapshot will be deleted.
|
|
215
|
+
* Derived from the org's retention setting at capture time for
|
|
216
|
+
* scheduled snapshots; not set for manual snapshots (which use
|
|
217
|
+
* a hardcoded 90-day TTL written directly as a DynamoDB `ttl` epoch).
|
|
218
|
+
*
|
|
219
|
+
*/
|
|
220
|
+
expires_at?: string; // date-time
|
|
221
|
+
/**
|
|
222
|
+
* Per-snapshot coverage report set by the capture worker on completion.
|
|
223
|
+
* Records how many resources were attempted, captured, skipped
|
|
224
|
+
* (unsupported type or explicitly excluded), and failed.
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
227
|
+
capture_summary?: {
|
|
228
|
+
/**
|
|
229
|
+
* Total resources in the inventory that were attempted.
|
|
230
|
+
*/
|
|
231
|
+
total: number;
|
|
232
|
+
/**
|
|
233
|
+
* Resources successfully fetched and written to the manifest.
|
|
234
|
+
*/
|
|
235
|
+
captured: number;
|
|
236
|
+
/**
|
|
237
|
+
* Resources skipped — type not supported by config-engine or
|
|
238
|
+
* excluded from capture (e.g. access_token, environment_variable).
|
|
239
|
+
*
|
|
240
|
+
*/
|
|
241
|
+
skipped: number;
|
|
242
|
+
/**
|
|
243
|
+
* Resources where the fetch call returned an error.
|
|
244
|
+
*/
|
|
245
|
+
failed: number;
|
|
246
|
+
};
|
|
148
247
|
}
|
|
149
248
|
/**
|
|
150
249
|
* A single captured resource with its full payload. The identity fields
|
|
@@ -204,6 +303,19 @@ declare namespace Components {
|
|
|
204
303
|
}
|
|
205
304
|
}
|
|
206
305
|
declare namespace Paths {
|
|
306
|
+
namespace CaptureOrgSnapshot {
|
|
307
|
+
export type RequestBody = /**
|
|
308
|
+
* Request body for `captureOrgSnapshot`. All fields optional — an empty body
|
|
309
|
+
* snapshots the whole org with a default name and the 90-day default TTL.
|
|
310
|
+
*
|
|
311
|
+
*/
|
|
312
|
+
Components.Schemas.CreateOrgSnapshotRequest;
|
|
313
|
+
namespace Responses {
|
|
314
|
+
export type $202 = Components.Schemas.CreateSnapshotResponse;
|
|
315
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
316
|
+
export type $422 = Components.Responses.UnprocessableEntity;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
207
319
|
namespace CreateSnapshot {
|
|
208
320
|
export type RequestBody = Components.Schemas.CreateSnapshotRequest;
|
|
209
321
|
namespace Responses {
|
|
@@ -286,7 +398,16 @@ declare namespace Paths {
|
|
|
286
398
|
}
|
|
287
399
|
}
|
|
288
400
|
namespace RestoreSnapshot {
|
|
289
|
-
export type RequestBody =
|
|
401
|
+
export type RequestBody = /**
|
|
402
|
+
* Both flags default to `false`, which restores every captured resource —
|
|
403
|
+
* Config Hub's manual-restore semantics. blueprint-manifest-api sets
|
|
404
|
+
* both `true` when reverting a blueprint install so user edits and
|
|
405
|
+
* cross-blueprint contributions survive. Each flag is independent so a
|
|
406
|
+
* caller can preserve edits without preserving co-ownership (or vice
|
|
407
|
+
* versa). Skipped resources surface under `Operation.skipped`.
|
|
408
|
+
*
|
|
409
|
+
*/
|
|
410
|
+
Components.Schemas.RestoreSnapshotRequest;
|
|
290
411
|
namespace Responses {
|
|
291
412
|
export type $202 = Components.Schemas.RestoreSnapshotResponse;
|
|
292
413
|
export type $401 = Components.Responses.Unauthorized;
|
|
@@ -361,6 +482,26 @@ interface OperationMethods {
|
|
|
361
482
|
data?: Paths.CreateSnapshot.RequestBody,
|
|
362
483
|
config?: AxiosRequestConfig
|
|
363
484
|
): OperationResponse<Paths.CreateSnapshot.Responses.$202>
|
|
485
|
+
/**
|
|
486
|
+
* captureOrgSnapshot - captureOrgSnapshot
|
|
487
|
+
*
|
|
488
|
+
* Snapshot the caller's whole organization now. Fetches a fresh inventory
|
|
489
|
+
* of the org's configuration resources from configuration-hub-api, persists
|
|
490
|
+
* it as an inventory artifact, and starts a `scope: "org"` chunked capture.
|
|
491
|
+
* Async — returns immediately with a snapshot ID; client polls `getSnapshot`
|
|
492
|
+
* and watches `capture_summary` fill in until `create.status` moves from
|
|
493
|
+
* `in_progress` to `completed` or `failed`.
|
|
494
|
+
*
|
|
495
|
+
* Sensitive types (`access_token`, `environment_variable`), types with no
|
|
496
|
+
* engine adapter, and any `excluded_types` are dropped from the capture and
|
|
497
|
+
* recorded in the snapshot's coverage report.
|
|
498
|
+
*
|
|
499
|
+
*/
|
|
500
|
+
'captureOrgSnapshot'(
|
|
501
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
502
|
+
data?: Paths.CaptureOrgSnapshot.RequestBody,
|
|
503
|
+
config?: AxiosRequestConfig
|
|
504
|
+
): OperationResponse<Paths.CaptureOrgSnapshot.Responses.$202>
|
|
364
505
|
/**
|
|
365
506
|
* getSnapshot - getSnapshot
|
|
366
507
|
*
|
|
@@ -476,6 +617,28 @@ interface PathsDictionary {
|
|
|
476
617
|
config?: AxiosRequestConfig
|
|
477
618
|
): OperationResponse<Paths.ListSnapshots.Responses.$200>
|
|
478
619
|
}
|
|
620
|
+
['/v1/snapshots:capture-org']: {
|
|
621
|
+
/**
|
|
622
|
+
* captureOrgSnapshot - captureOrgSnapshot
|
|
623
|
+
*
|
|
624
|
+
* Snapshot the caller's whole organization now. Fetches a fresh inventory
|
|
625
|
+
* of the org's configuration resources from configuration-hub-api, persists
|
|
626
|
+
* it as an inventory artifact, and starts a `scope: "org"` chunked capture.
|
|
627
|
+
* Async — returns immediately with a snapshot ID; client polls `getSnapshot`
|
|
628
|
+
* and watches `capture_summary` fill in until `create.status` moves from
|
|
629
|
+
* `in_progress` to `completed` or `failed`.
|
|
630
|
+
*
|
|
631
|
+
* Sensitive types (`access_token`, `environment_variable`), types with no
|
|
632
|
+
* engine adapter, and any `excluded_types` are dropped from the capture and
|
|
633
|
+
* recorded in the snapshot's coverage report.
|
|
634
|
+
*
|
|
635
|
+
*/
|
|
636
|
+
'post'(
|
|
637
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
638
|
+
data?: Paths.CaptureOrgSnapshot.RequestBody,
|
|
639
|
+
config?: AxiosRequestConfig
|
|
640
|
+
): OperationResponse<Paths.CaptureOrgSnapshot.Responses.$202>
|
|
641
|
+
}
|
|
479
642
|
['/v1/snapshots/{id}']: {
|
|
480
643
|
/**
|
|
481
644
|
* getSnapshot - getSnapshot
|
|
@@ -572,8 +735,10 @@ type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
|
572
735
|
|
|
573
736
|
|
|
574
737
|
type CallerIdentity = Components.Schemas.CallerIdentity;
|
|
738
|
+
type CreateOrgSnapshotRequest = Components.Schemas.CreateOrgSnapshotRequest;
|
|
575
739
|
type CreateSnapshotRequest = Components.Schemas.CreateSnapshotRequest;
|
|
576
740
|
type CreateSnapshotResponse = Components.Schemas.CreateSnapshotResponse;
|
|
741
|
+
type EmptyInventoryError = Components.Schemas.EmptyInventoryError;
|
|
577
742
|
type Error = Components.Schemas.Error;
|
|
578
743
|
type Operation = Components.Schemas.Operation;
|
|
579
744
|
type ResourceRef = Components.Schemas.ResourceRef;
|
|
@@ -585,4 +750,4 @@ type SnapshotResourceDetail = Components.Schemas.SnapshotResourceDetail;
|
|
|
585
750
|
type SnapshotResourceList = Components.Schemas.SnapshotResourceList;
|
|
586
751
|
type SnapshotResourceSummary = Components.Schemas.SnapshotResourceSummary;
|
|
587
752
|
|
|
588
|
-
export { type Client as C, type
|
|
753
|
+
export { type Client as C, type EmptyInventoryError as E, type OperationMethods as O, Paths as P, type ResourceRef as R, type SkippedResource 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 Error as g, type Operation as h, type RestoreSnapshotRequest as i, type RestoreSnapshotResponse as j, type Snapshot as k, type SnapshotResourceDetail as l, type SnapshotResourceList as m, type SnapshotResourceSummary as n };
|