@epilot/cli 0.1.47 → 0.1.48
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/README.md +1 -1
- package/definitions/blueprint-manifest.json +571 -1
- package/definitions/snapshot.json +55 -3
- package/dist/bin/epilot.js +6 -6
- package/dist/{chunk-VOOQ4GMS.js → chunk-E4R3KIU4.js} +8 -2
- package/dist/{completion-EKYW2Z3F.js → completion-3LINP6M5.js} +1 -1
- package/dist/{upgrade-FCRZPJWQ.js → upgrade-H2OEXSPS.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,6 +41,10 @@
|
|
|
41
41
|
{
|
|
42
42
|
"name": "Patches",
|
|
43
43
|
"description": "Manage blueprint patches for mass rollouts"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "Uniqueness Criteria",
|
|
47
|
+
"description": "Configure per-org field sets used to match existing resources during install"
|
|
44
48
|
}
|
|
45
49
|
],
|
|
46
50
|
"security": [
|
|
@@ -2964,6 +2968,118 @@
|
|
|
2964
2968
|
}
|
|
2965
2969
|
}
|
|
2966
2970
|
},
|
|
2971
|
+
"/v3/blueprint-manifest/blueprints/{blueprint_id}/deployments/{job_id}:restore": {
|
|
2972
|
+
"post": {
|
|
2973
|
+
"operationId": "restoreBlueprintDeploymentV3",
|
|
2974
|
+
"summary": "Restore a specific deployment by job_id",
|
|
2975
|
+
"description": "Roll a deployment back to its pre-install state. Two phases:\n\n 1. Upsert — re-applies the captured payloads via snapshot-api's\n `:restore` (server-side; runs config-engine.apply with captured\n target ids pre-seeded). Skipped for pure-create deployments\n whose snapshot was empty.\n 2. Delete sweep — for lineage rows of this blueprint instance not\n present in the snapshot's captured set, deletes the live\n resource via the type's adapter. Co-ownership / drift /\n no-delete-capability skip the entry with the corresponding\n reason.\n\nResolves `(blueprint_id, job_id)` to the entry in\n`Blueprint.deployments[]` and reads its `snapshot_id` and\n`destination_blueprint_id` — the caller never needs to handle\nsnapshot ids directly.\n\nAsync — returns 202 with a job id. Poll the job to track progress.\nThe per-instance lock (`installation_status === 'IN_PROGRESS'`)\nrejects concurrent installs or restores with 409.\n",
|
|
2976
|
+
"tags": [
|
|
2977
|
+
"Blueprints"
|
|
2978
|
+
],
|
|
2979
|
+
"parameters": [
|
|
2980
|
+
{
|
|
2981
|
+
"in": "path",
|
|
2982
|
+
"name": "blueprint_id",
|
|
2983
|
+
"required": true,
|
|
2984
|
+
"schema": {
|
|
2985
|
+
"$ref": "#/components/schemas/BlueprintID"
|
|
2986
|
+
}
|
|
2987
|
+
},
|
|
2988
|
+
{
|
|
2989
|
+
"in": "path",
|
|
2990
|
+
"name": "job_id",
|
|
2991
|
+
"required": true,
|
|
2992
|
+
"schema": {
|
|
2993
|
+
"$ref": "#/components/schemas/BlueprintJobID"
|
|
2994
|
+
}
|
|
2995
|
+
}
|
|
2996
|
+
],
|
|
2997
|
+
"responses": {
|
|
2998
|
+
"202": {
|
|
2999
|
+
"description": "Restore job started",
|
|
3000
|
+
"headers": {
|
|
3001
|
+
"Location": {
|
|
3002
|
+
"description": "URL to poll the job",
|
|
3003
|
+
"schema": {
|
|
3004
|
+
"type": "string"
|
|
3005
|
+
}
|
|
3006
|
+
}
|
|
3007
|
+
},
|
|
3008
|
+
"content": {
|
|
3009
|
+
"application/json": {
|
|
3010
|
+
"schema": {
|
|
3011
|
+
"type": "object",
|
|
3012
|
+
"properties": {
|
|
3013
|
+
"job_id": {
|
|
3014
|
+
"$ref": "#/components/schemas/BlueprintJobID"
|
|
3015
|
+
},
|
|
3016
|
+
"blueprint_instance_id": {
|
|
3017
|
+
"$ref": "#/components/schemas/BlueprintID"
|
|
3018
|
+
},
|
|
3019
|
+
"snapshot_id": {
|
|
3020
|
+
"type": "string"
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
}
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
},
|
|
3027
|
+
"400": {
|
|
3028
|
+
"description": "Deployment has no snapshot, or the snapshot is not in a `completed` state."
|
|
3029
|
+
},
|
|
3030
|
+
"404": {
|
|
3031
|
+
"description": "Blueprint not found, or no deployment with the given job_id on this blueprint."
|
|
3032
|
+
},
|
|
3033
|
+
"409": {
|
|
3034
|
+
"description": "Another install or restore is in flight for this blueprint instance."
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
}
|
|
3038
|
+
},
|
|
3039
|
+
"/v3/blueprint-manifest/blueprints/{blueprint_id}/deployments/{job_id}/restore-preview": {
|
|
3040
|
+
"get": {
|
|
3041
|
+
"operationId": "getRestorePreview",
|
|
3042
|
+
"summary": "Predicted outcome of reverting a deployment",
|
|
3043
|
+
"description": "Computes what would happen if the user triggered a restore on this\ndeployment, without performing any writes. The forecast uses the\nsnapshot's captured resources (when present) plus the current lineage\nstate plus per-adapter gates (co-ownership, no-delete-capability,\nheuristic-match, drift when wired).\n\nIdempotent and side-effect free. Safe to call repeatedly. The result\nmay shift between calls if operators edit destination resources or\nanother blueprint adopts a shared resource in the meantime.\n",
|
|
3044
|
+
"tags": [
|
|
3045
|
+
"Blueprints"
|
|
3046
|
+
],
|
|
3047
|
+
"parameters": [
|
|
3048
|
+
{
|
|
3049
|
+
"in": "path",
|
|
3050
|
+
"name": "blueprint_id",
|
|
3051
|
+
"required": true,
|
|
3052
|
+
"schema": {
|
|
3053
|
+
"$ref": "#/components/schemas/BlueprintID"
|
|
3054
|
+
}
|
|
3055
|
+
},
|
|
3056
|
+
{
|
|
3057
|
+
"in": "path",
|
|
3058
|
+
"name": "job_id",
|
|
3059
|
+
"required": true,
|
|
3060
|
+
"description": "The install job whose deployment is being previewed.",
|
|
3061
|
+
"schema": {
|
|
3062
|
+
"$ref": "#/components/schemas/BlueprintJobID"
|
|
3063
|
+
}
|
|
3064
|
+
}
|
|
3065
|
+
],
|
|
3066
|
+
"responses": {
|
|
3067
|
+
"200": {
|
|
3068
|
+
"description": "Predicted outcome. `failed`-action items are absent here — the\npreview can't forecast errors.\n",
|
|
3069
|
+
"content": {
|
|
3070
|
+
"application/json": {
|
|
3071
|
+
"schema": {
|
|
3072
|
+
"$ref": "#/components/schemas/RestoreOutcome"
|
|
3073
|
+
}
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
},
|
|
3077
|
+
"404": {
|
|
3078
|
+
"description": "Blueprint or deployment not found."
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
},
|
|
2967
3083
|
"/v3/blueprint-manifest/blueprints/{blueprint_id}/lineage": {
|
|
2968
3084
|
"get": {
|
|
2969
3085
|
"operationId": "getBlueprintLineageV3",
|
|
@@ -3006,10 +3122,184 @@
|
|
|
3006
3122
|
}
|
|
3007
3123
|
}
|
|
3008
3124
|
}
|
|
3125
|
+
},
|
|
3126
|
+
"/v1/blueprint-manifest/uniqueness-criteria": {
|
|
3127
|
+
"get": {
|
|
3128
|
+
"operationId": "listUniquenessCriteria",
|
|
3129
|
+
"summary": "listUniquenessCriteria",
|
|
3130
|
+
"description": "List all custom uniqueness criteria configured for the caller's organization.\nThese overrides are applied during install (V2 and V3) when matching incoming\nresources against existing ones in the destination org, replacing the default\nper-resource-type field set with the caller's chosen fields (AND-combined).\n",
|
|
3131
|
+
"tags": [
|
|
3132
|
+
"Uniqueness Criteria"
|
|
3133
|
+
],
|
|
3134
|
+
"responses": {
|
|
3135
|
+
"200": {
|
|
3136
|
+
"description": "All configured criteria for the org",
|
|
3137
|
+
"content": {
|
|
3138
|
+
"application/json": {
|
|
3139
|
+
"schema": {
|
|
3140
|
+
"type": "object",
|
|
3141
|
+
"properties": {
|
|
3142
|
+
"results": {
|
|
3143
|
+
"type": "array",
|
|
3144
|
+
"items": {
|
|
3145
|
+
"$ref": "#/components/schemas/UniquenessCriteria"
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
}
|
|
3152
|
+
}
|
|
3153
|
+
}
|
|
3154
|
+
}
|
|
3155
|
+
},
|
|
3156
|
+
"/v1/blueprint-manifest/uniqueness-criteria/{resource_type}": {
|
|
3157
|
+
"parameters": [
|
|
3158
|
+
{
|
|
3159
|
+
"in": "path",
|
|
3160
|
+
"required": true,
|
|
3161
|
+
"name": "resource_type",
|
|
3162
|
+
"schema": {
|
|
3163
|
+
"$ref": "#/components/schemas/UniquenessCriteriaResourceType"
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
],
|
|
3167
|
+
"get": {
|
|
3168
|
+
"operationId": "getUniquenessCriteria",
|
|
3169
|
+
"summary": "getUniquenessCriteria",
|
|
3170
|
+
"description": "Get the configured uniqueness criteria for a specific resource type, if any.",
|
|
3171
|
+
"tags": [
|
|
3172
|
+
"Uniqueness Criteria"
|
|
3173
|
+
],
|
|
3174
|
+
"responses": {
|
|
3175
|
+
"200": {
|
|
3176
|
+
"description": "Configured criteria for the resource type",
|
|
3177
|
+
"content": {
|
|
3178
|
+
"application/json": {
|
|
3179
|
+
"schema": {
|
|
3180
|
+
"$ref": "#/components/schemas/UniquenessCriteria"
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
}
|
|
3184
|
+
},
|
|
3185
|
+
"404": {
|
|
3186
|
+
"description": "No custom criteria configured (defaults will be used)"
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
},
|
|
3190
|
+
"put": {
|
|
3191
|
+
"operationId": "putUniquenessCriteria",
|
|
3192
|
+
"summary": "putUniquenessCriteria",
|
|
3193
|
+
"description": "Set or replace the uniqueness criteria for a resource type. The provided fields\nmust be valid attributes on the resource's schema (the UI typically loads the\nschema to populate options). All listed fields are AND-combined during matching.\n",
|
|
3194
|
+
"tags": [
|
|
3195
|
+
"Uniqueness Criteria"
|
|
3196
|
+
],
|
|
3197
|
+
"requestBody": {
|
|
3198
|
+
"required": true,
|
|
3199
|
+
"content": {
|
|
3200
|
+
"application/json": {
|
|
3201
|
+
"schema": {
|
|
3202
|
+
"type": "object",
|
|
3203
|
+
"required": [
|
|
3204
|
+
"fields"
|
|
3205
|
+
],
|
|
3206
|
+
"properties": {
|
|
3207
|
+
"fields": {
|
|
3208
|
+
"type": "array",
|
|
3209
|
+
"minItems": 1,
|
|
3210
|
+
"items": {
|
|
3211
|
+
"type": "string"
|
|
3212
|
+
}
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
}
|
|
3218
|
+
},
|
|
3219
|
+
"responses": {
|
|
3220
|
+
"200": {
|
|
3221
|
+
"description": "Stored criteria",
|
|
3222
|
+
"content": {
|
|
3223
|
+
"application/json": {
|
|
3224
|
+
"schema": {
|
|
3225
|
+
"$ref": "#/components/schemas/UniquenessCriteria"
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
},
|
|
3230
|
+
"400": {
|
|
3231
|
+
"description": "Invalid resource type or field list"
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
},
|
|
3235
|
+
"delete": {
|
|
3236
|
+
"operationId": "deleteUniquenessCriteria",
|
|
3237
|
+
"summary": "deleteUniquenessCriteria",
|
|
3238
|
+
"description": "Remove the custom criteria for a resource type, reverting to the default fields.",
|
|
3239
|
+
"tags": [
|
|
3240
|
+
"Uniqueness Criteria"
|
|
3241
|
+
],
|
|
3242
|
+
"responses": {
|
|
3243
|
+
"204": {
|
|
3244
|
+
"description": "Criteria deleted (defaults will be used)"
|
|
3245
|
+
}
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3009
3248
|
}
|
|
3010
3249
|
},
|
|
3011
3250
|
"components": {
|
|
3012
3251
|
"schemas": {
|
|
3252
|
+
"UniquenessCriteriaResourceType": {
|
|
3253
|
+
"type": "string",
|
|
3254
|
+
"description": "Resource type for which custom uniqueness criteria can be configured.",
|
|
3255
|
+
"enum": [
|
|
3256
|
+
"emailtemplate",
|
|
3257
|
+
"product",
|
|
3258
|
+
"price",
|
|
3259
|
+
"tax",
|
|
3260
|
+
"coupon",
|
|
3261
|
+
"product_recommendation",
|
|
3262
|
+
"file",
|
|
3263
|
+
"document_template",
|
|
3264
|
+
"schema",
|
|
3265
|
+
"taxonomy",
|
|
3266
|
+
"notification_template",
|
|
3267
|
+
"family",
|
|
3268
|
+
"permission",
|
|
3269
|
+
"journey"
|
|
3270
|
+
]
|
|
3271
|
+
},
|
|
3272
|
+
"UniquenessCriteria": {
|
|
3273
|
+
"type": "object",
|
|
3274
|
+
"required": [
|
|
3275
|
+
"org_id",
|
|
3276
|
+
"resource_type",
|
|
3277
|
+
"fields",
|
|
3278
|
+
"updated_at"
|
|
3279
|
+
],
|
|
3280
|
+
"properties": {
|
|
3281
|
+
"org_id": {
|
|
3282
|
+
"type": "string"
|
|
3283
|
+
},
|
|
3284
|
+
"resource_type": {
|
|
3285
|
+
"$ref": "#/components/schemas/UniquenessCriteriaResourceType"
|
|
3286
|
+
},
|
|
3287
|
+
"fields": {
|
|
3288
|
+
"type": "array",
|
|
3289
|
+
"minItems": 1,
|
|
3290
|
+
"items": {
|
|
3291
|
+
"type": "string"
|
|
3292
|
+
}
|
|
3293
|
+
},
|
|
3294
|
+
"updated_at": {
|
|
3295
|
+
"type": "string",
|
|
3296
|
+
"format": "date-time"
|
|
3297
|
+
},
|
|
3298
|
+
"updated_by": {
|
|
3299
|
+
"type": "string"
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
},
|
|
3013
3303
|
"LineageEntry": {
|
|
3014
3304
|
"type": "object",
|
|
3015
3305
|
"properties": {
|
|
@@ -3292,6 +3582,104 @@
|
|
|
3292
3582
|
"PARTIAL_SUCCESS",
|
|
3293
3583
|
"FAILED"
|
|
3294
3584
|
]
|
|
3585
|
+
},
|
|
3586
|
+
"restore_details": {
|
|
3587
|
+
"type": "object",
|
|
3588
|
+
"description": "Restore lifecycle metadata for this deployment.",
|
|
3589
|
+
"properties": {
|
|
3590
|
+
"has_revertible_changes": {
|
|
3591
|
+
"type": "boolean",
|
|
3592
|
+
"description": "Whether this sync changed destination resources in a way that can\nbe reverted. `false` means the sync completed without create,\nupdate, internal-update, or delete impacts, so there is no revert\naction to offer.\n"
|
|
3593
|
+
},
|
|
3594
|
+
"resource_impact_summary": {
|
|
3595
|
+
"type": "object",
|
|
3596
|
+
"description": "Counts of resource impact values from the V3 apply result.",
|
|
3597
|
+
"properties": {
|
|
3598
|
+
"create": {
|
|
3599
|
+
"type": "integer",
|
|
3600
|
+
"minimum": 0
|
|
3601
|
+
},
|
|
3602
|
+
"update": {
|
|
3603
|
+
"type": "integer",
|
|
3604
|
+
"minimum": 0
|
|
3605
|
+
},
|
|
3606
|
+
"internal_update": {
|
|
3607
|
+
"type": "integer",
|
|
3608
|
+
"minimum": 0
|
|
3609
|
+
},
|
|
3610
|
+
"delete": {
|
|
3611
|
+
"type": "integer",
|
|
3612
|
+
"minimum": 0
|
|
3613
|
+
},
|
|
3614
|
+
"no_op": {
|
|
3615
|
+
"type": "integer",
|
|
3616
|
+
"minimum": 0
|
|
3617
|
+
},
|
|
3618
|
+
"ignored": {
|
|
3619
|
+
"type": "integer",
|
|
3620
|
+
"minimum": 0
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
},
|
|
3624
|
+
"last_restore_job_id": {
|
|
3625
|
+
"type": "string",
|
|
3626
|
+
"description": "BlueprintInstallationJob id of the most recent restore that ran\nagainst this deployment. Used by the FE to keep the restore-status\nbadge visible across page reloads. Frontends poll this job to\nrender the latest restore outcome.\n"
|
|
3627
|
+
},
|
|
3628
|
+
"last_restore_at": {
|
|
3629
|
+
"type": "string",
|
|
3630
|
+
"format": "date-time",
|
|
3631
|
+
"description": "Timestamp of the most recent restore that ran against this\ndeployment. Stamped when the restore sweep finishes. Used by the\nFE to show when a sync was reverted.\n"
|
|
3632
|
+
},
|
|
3633
|
+
"last_restored_by": {
|
|
3634
|
+
"type": "object",
|
|
3635
|
+
"description": "Identity of the caller who triggered the most recent restore.\nStamped when the restore sweep finishes. Used by the FE to show\nwho reverted a sync.\n",
|
|
3636
|
+
"properties": {
|
|
3637
|
+
"name": {
|
|
3638
|
+
"type": "string",
|
|
3639
|
+
"description": "Display name (email or token name) of the restorer."
|
|
3640
|
+
},
|
|
3641
|
+
"user_id": {
|
|
3642
|
+
"type": "string",
|
|
3643
|
+
"description": "User id of the restorer, when triggered by a user."
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3646
|
+
},
|
|
3647
|
+
"status": {
|
|
3648
|
+
"type": "string",
|
|
3649
|
+
"description": "Computed server-side from `(job_id, restore_details.last_restore_job_id, installation_status)`.\n`available` when the deployment is restorable but has no prior\nrestore (including pure-create deployments without `snapshot_id`,\nreverted via sweep-only);\n`in_progress` while an install or restore is running on this\nblueprint instance;\n`restored` / `partially_restored` / `restore_failed` reflect the\nterminal status of the job referenced by `last_restore_job_id`;\n`unavailable` means there is no revert action, for example\nmalformed deployment rows missing `job_id` or no-change syncs.\n",
|
|
3650
|
+
"enum": [
|
|
3651
|
+
"available",
|
|
3652
|
+
"in_progress",
|
|
3653
|
+
"restored",
|
|
3654
|
+
"partially_restored",
|
|
3655
|
+
"restore_failed",
|
|
3656
|
+
"unavailable"
|
|
3657
|
+
]
|
|
3658
|
+
}
|
|
3659
|
+
}
|
|
3660
|
+
},
|
|
3661
|
+
"has_revertible_changes": {
|
|
3662
|
+
"type": "boolean",
|
|
3663
|
+
"deprecated": true,
|
|
3664
|
+
"description": "Deprecated. Use `restore_details.has_revertible_changes`.\n"
|
|
3665
|
+
},
|
|
3666
|
+
"last_restore_job_id": {
|
|
3667
|
+
"type": "string",
|
|
3668
|
+
"deprecated": true,
|
|
3669
|
+
"description": "Deprecated. Use `restore_details.last_restore_job_id`.\n"
|
|
3670
|
+
},
|
|
3671
|
+
"restore_status": {
|
|
3672
|
+
"type": "string",
|
|
3673
|
+
"deprecated": true,
|
|
3674
|
+
"description": "Deprecated. Use `restore_details.status`.\n",
|
|
3675
|
+
"enum": [
|
|
3676
|
+
"available",
|
|
3677
|
+
"in_progress",
|
|
3678
|
+
"restored",
|
|
3679
|
+
"partially_restored",
|
|
3680
|
+
"restore_failed",
|
|
3681
|
+
"unavailable"
|
|
3682
|
+
]
|
|
3295
3683
|
}
|
|
3296
3684
|
}
|
|
3297
3685
|
}
|
|
@@ -3884,6 +4272,12 @@
|
|
|
3884
4272
|
{
|
|
3885
4273
|
"type": "object",
|
|
3886
4274
|
"properties": {
|
|
4275
|
+
"job_type": {
|
|
4276
|
+
"type": "string",
|
|
4277
|
+
"enum": [
|
|
4278
|
+
"export"
|
|
4279
|
+
]
|
|
4280
|
+
},
|
|
3887
4281
|
"blueprint_id": {
|
|
3888
4282
|
"$ref": "#/components/schemas/BlueprintID"
|
|
3889
4283
|
},
|
|
@@ -3911,6 +4305,12 @@
|
|
|
3911
4305
|
{
|
|
3912
4306
|
"type": "object",
|
|
3913
4307
|
"properties": {
|
|
4308
|
+
"job_type": {
|
|
4309
|
+
"type": "string",
|
|
4310
|
+
"enum": [
|
|
4311
|
+
"install"
|
|
4312
|
+
]
|
|
4313
|
+
},
|
|
3914
4314
|
"source_blueprint_id": {
|
|
3915
4315
|
"$ref": "#/components/schemas/BlueprintID"
|
|
3916
4316
|
},
|
|
@@ -3970,6 +4370,64 @@
|
|
|
3970
4370
|
}
|
|
3971
4371
|
]
|
|
3972
4372
|
},
|
|
4373
|
+
"BlueprintRestoreJob": {
|
|
4374
|
+
"allOf": [
|
|
4375
|
+
{
|
|
4376
|
+
"$ref": "#/components/schemas/CommonBlueprintJobFields"
|
|
4377
|
+
},
|
|
4378
|
+
{
|
|
4379
|
+
"type": "object",
|
|
4380
|
+
"properties": {
|
|
4381
|
+
"job_type": {
|
|
4382
|
+
"type": "string",
|
|
4383
|
+
"enum": [
|
|
4384
|
+
"restore"
|
|
4385
|
+
]
|
|
4386
|
+
},
|
|
4387
|
+
"destination_blueprint_id": {
|
|
4388
|
+
"$ref": "#/components/schemas/BlueprintID"
|
|
4389
|
+
},
|
|
4390
|
+
"destination_org_id": {
|
|
4391
|
+
"type": "string"
|
|
4392
|
+
},
|
|
4393
|
+
"install_job_id": {
|
|
4394
|
+
"type": "string",
|
|
4395
|
+
"nullable": true,
|
|
4396
|
+
"description": "The install job whose deployment is being reverted. Maps back\nto the entry in `Blueprint.deployments[]`.\n"
|
|
4397
|
+
},
|
|
4398
|
+
"snapshot_id": {
|
|
4399
|
+
"type": "string",
|
|
4400
|
+
"nullable": true,
|
|
4401
|
+
"description": "The snapshot driving Phase 1 of the restore. Null for sweep-only\nrestores (pure-create deployments with no captured manifest).\n"
|
|
4402
|
+
},
|
|
4403
|
+
"sync_engine": {
|
|
4404
|
+
"type": "string",
|
|
4405
|
+
"enum": [
|
|
4406
|
+
"v3"
|
|
4407
|
+
]
|
|
4408
|
+
},
|
|
4409
|
+
"status": {
|
|
4410
|
+
"type": "string",
|
|
4411
|
+
"enum": [
|
|
4412
|
+
"IN_PROGRESS",
|
|
4413
|
+
"SUCCESS",
|
|
4414
|
+
"PARTIAL_SUCCESS",
|
|
4415
|
+
"FAILED"
|
|
4416
|
+
]
|
|
4417
|
+
},
|
|
4418
|
+
"restore_result": {
|
|
4419
|
+
"nullable": true,
|
|
4420
|
+
"description": "Absent while the job is still IN_PROGRESS.",
|
|
4421
|
+
"allOf": [
|
|
4422
|
+
{
|
|
4423
|
+
"$ref": "#/components/schemas/RestoreOutcome"
|
|
4424
|
+
}
|
|
4425
|
+
]
|
|
4426
|
+
}
|
|
4427
|
+
}
|
|
4428
|
+
}
|
|
4429
|
+
]
|
|
4430
|
+
},
|
|
3973
4431
|
"V3ResourceProgressEntry": {
|
|
3974
4432
|
"type": "object",
|
|
3975
4433
|
"required": [
|
|
@@ -4009,6 +4467,84 @@
|
|
|
4009
4467
|
}
|
|
4010
4468
|
}
|
|
4011
4469
|
},
|
|
4470
|
+
"RestoreOutcomeItem": {
|
|
4471
|
+
"type": "object",
|
|
4472
|
+
"required": [
|
|
4473
|
+
"lineage_id",
|
|
4474
|
+
"type",
|
|
4475
|
+
"action"
|
|
4476
|
+
],
|
|
4477
|
+
"properties": {
|
|
4478
|
+
"lineage_id": {
|
|
4479
|
+
"type": "string"
|
|
4480
|
+
},
|
|
4481
|
+
"type": {
|
|
4482
|
+
"type": "string"
|
|
4483
|
+
},
|
|
4484
|
+
"name": {
|
|
4485
|
+
"type": "string",
|
|
4486
|
+
"nullable": true
|
|
4487
|
+
},
|
|
4488
|
+
"target_id": {
|
|
4489
|
+
"type": "string",
|
|
4490
|
+
"nullable": true
|
|
4491
|
+
},
|
|
4492
|
+
"action": {
|
|
4493
|
+
"type": "string",
|
|
4494
|
+
"description": "On `restore-preview`: the action the restore would take.\nOn `restore_result`: the action that was applied.\n`failed` only appears on `restore_result`.\n",
|
|
4495
|
+
"enum": [
|
|
4496
|
+
"restore",
|
|
4497
|
+
"delete",
|
|
4498
|
+
"skip",
|
|
4499
|
+
"failed"
|
|
4500
|
+
]
|
|
4501
|
+
},
|
|
4502
|
+
"reason": {
|
|
4503
|
+
"type": "string",
|
|
4504
|
+
"nullable": true,
|
|
4505
|
+
"description": "Only set when `action == skip`.",
|
|
4506
|
+
"enum": [
|
|
4507
|
+
"modified",
|
|
4508
|
+
"co_owned",
|
|
4509
|
+
"delete_unsupported",
|
|
4510
|
+
"heuristic_match"
|
|
4511
|
+
]
|
|
4512
|
+
},
|
|
4513
|
+
"last_synced_at": {
|
|
4514
|
+
"type": "string",
|
|
4515
|
+
"format": "date-time",
|
|
4516
|
+
"nullable": true,
|
|
4517
|
+
"description": "Only set when `reason == modified`. From the lineage row's last install write."
|
|
4518
|
+
},
|
|
4519
|
+
"current_updated_at": {
|
|
4520
|
+
"type": "string",
|
|
4521
|
+
"format": "date-time",
|
|
4522
|
+
"nullable": true,
|
|
4523
|
+
"description": "Only set when `reason == modified`. From the destination resource's current state."
|
|
4524
|
+
},
|
|
4525
|
+
"error_message": {
|
|
4526
|
+
"type": "string",
|
|
4527
|
+
"nullable": true,
|
|
4528
|
+
"description": "Only set when `action == failed`."
|
|
4529
|
+
}
|
|
4530
|
+
}
|
|
4531
|
+
},
|
|
4532
|
+
"RestoreOutcome": {
|
|
4533
|
+
"type": "object",
|
|
4534
|
+
"properties": {
|
|
4535
|
+
"snapshot_id": {
|
|
4536
|
+
"type": "string",
|
|
4537
|
+
"nullable": true,
|
|
4538
|
+
"description": "The snapshot driving Phase 1 of the restore. Null/absent for\nsweep-only restores (pure-create deployments with no captured\nmanifest).\n"
|
|
4539
|
+
},
|
|
4540
|
+
"resources": {
|
|
4541
|
+
"type": "array",
|
|
4542
|
+
"items": {
|
|
4543
|
+
"$ref": "#/components/schemas/RestoreOutcomeItem"
|
|
4544
|
+
}
|
|
4545
|
+
}
|
|
4546
|
+
}
|
|
4547
|
+
},
|
|
4012
4548
|
"BlueprintJob": {
|
|
4013
4549
|
"oneOf": [
|
|
4014
4550
|
{
|
|
@@ -4017,6 +4553,9 @@
|
|
|
4017
4553
|
{
|
|
4018
4554
|
"$ref": "#/components/schemas/BlueprintInstallationJob"
|
|
4019
4555
|
},
|
|
4556
|
+
{
|
|
4557
|
+
"$ref": "#/components/schemas/BlueprintRestoreJob"
|
|
4558
|
+
},
|
|
4020
4559
|
{
|
|
4021
4560
|
"$ref": "#/components/schemas/BlueprintDependenciesSyncJob"
|
|
4022
4561
|
},
|
|
@@ -4026,7 +4565,18 @@
|
|
|
4026
4565
|
{
|
|
4027
4566
|
"$ref": "#/components/schemas/BlueprintVerificationJob"
|
|
4028
4567
|
}
|
|
4029
|
-
]
|
|
4568
|
+
],
|
|
4569
|
+
"discriminator": {
|
|
4570
|
+
"propertyName": "job_type",
|
|
4571
|
+
"mapping": {
|
|
4572
|
+
"export": "#/components/schemas/BlueprintExportJob",
|
|
4573
|
+
"install": "#/components/schemas/BlueprintInstallationJob",
|
|
4574
|
+
"restore": "#/components/schemas/BlueprintRestoreJob",
|
|
4575
|
+
"dependencies_sync": "#/components/schemas/BlueprintDependenciesSyncJob",
|
|
4576
|
+
"validate": "#/components/schemas/BlueprintValidateJob",
|
|
4577
|
+
"verification": "#/components/schemas/BlueprintVerificationJob"
|
|
4578
|
+
}
|
|
4579
|
+
}
|
|
4030
4580
|
},
|
|
4031
4581
|
"BlueprintDependenciesSyncJob": {
|
|
4032
4582
|
"allOf": [
|
|
@@ -4036,6 +4586,12 @@
|
|
|
4036
4586
|
{
|
|
4037
4587
|
"type": "object",
|
|
4038
4588
|
"properties": {
|
|
4589
|
+
"job_type": {
|
|
4590
|
+
"type": "string",
|
|
4591
|
+
"enum": [
|
|
4592
|
+
"dependencies_sync"
|
|
4593
|
+
]
|
|
4594
|
+
},
|
|
4039
4595
|
"blueprint_id": {
|
|
4040
4596
|
"$ref": "#/components/schemas/BlueprintID"
|
|
4041
4597
|
},
|
|
@@ -4060,6 +4616,12 @@
|
|
|
4060
4616
|
{
|
|
4061
4617
|
"type": "object",
|
|
4062
4618
|
"properties": {
|
|
4619
|
+
"job_type": {
|
|
4620
|
+
"type": "string",
|
|
4621
|
+
"enum": [
|
|
4622
|
+
"validate"
|
|
4623
|
+
]
|
|
4624
|
+
},
|
|
4063
4625
|
"blueprint_id": {
|
|
4064
4626
|
"$ref": "#/components/schemas/BlueprintID"
|
|
4065
4627
|
},
|
|
@@ -4094,6 +4656,12 @@
|
|
|
4094
4656
|
{
|
|
4095
4657
|
"type": "object",
|
|
4096
4658
|
"properties": {
|
|
4659
|
+
"job_type": {
|
|
4660
|
+
"type": "string",
|
|
4661
|
+
"enum": [
|
|
4662
|
+
"verification"
|
|
4663
|
+
]
|
|
4664
|
+
},
|
|
4097
4665
|
"source_org_id": {
|
|
4098
4666
|
"type": "string"
|
|
4099
4667
|
},
|
|
@@ -4111,6 +4679,7 @@
|
|
|
4111
4679
|
"enum": [
|
|
4112
4680
|
"IN_PROGRESS",
|
|
4113
4681
|
"SUCCESS",
|
|
4682
|
+
"PARTIAL_SUCCESS",
|
|
4114
4683
|
"FAILED"
|
|
4115
4684
|
]
|
|
4116
4685
|
},
|
|
@@ -4142,6 +4711,7 @@
|
|
|
4142
4711
|
"enum": [
|
|
4143
4712
|
"IN_PROGRESS",
|
|
4144
4713
|
"SUCCESS",
|
|
4714
|
+
"PARTIAL_SUCCESS",
|
|
4145
4715
|
"FAILED"
|
|
4146
4716
|
]
|
|
4147
4717
|
},
|
|
@@ -98,7 +98,6 @@
|
|
|
98
98
|
"description": "Filter to snapshots containing one or more resources. Format\n`<type>:<id>`. Split on the first colon — the `<id>` half may\ncontain colons (e.g., role acl ids like `role:acl:internal:foo`).\nRepeat the param for multiple resources — results are OR-unioned.\nMaximum 50 pairs per request.\n",
|
|
99
99
|
"schema": {
|
|
100
100
|
"type": "array",
|
|
101
|
-
"maxItems": 50,
|
|
102
101
|
"items": {
|
|
103
102
|
"type": "string",
|
|
104
103
|
"pattern": "^[^:]+:.+$"
|
|
@@ -214,10 +213,20 @@
|
|
|
214
213
|
"post": {
|
|
215
214
|
"operationId": "restoreSnapshot",
|
|
216
215
|
"summary": "restoreSnapshot",
|
|
217
|
-
"description": "Restore a snapshot to the org. Async — returns immediately; client polls\n`getSnapshot` until the latest entry in `restores` moves from\n`in_progress` to `completed
|
|
216
|
+
"description": "Restore a snapshot to the org. Async — returns immediately; client polls\n`getSnapshot` until the latest entry in `restores` moves from\n`in_progress` to one of `completed | partial | failed`.\n\nv1: full restore only. Cherry-pick (`resources?` body filter) is an open\nquestion — see RFC OQ #1.\n",
|
|
218
217
|
"tags": [
|
|
219
218
|
"Snapshots"
|
|
220
219
|
],
|
|
220
|
+
"requestBody": {
|
|
221
|
+
"required": false,
|
|
222
|
+
"content": {
|
|
223
|
+
"application/json": {
|
|
224
|
+
"schema": {
|
|
225
|
+
"$ref": "#/components/schemas/RestoreSnapshotRequest"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
},
|
|
221
230
|
"responses": {
|
|
222
231
|
"202": {
|
|
223
232
|
"description": "Restore started",
|
|
@@ -596,6 +605,20 @@
|
|
|
596
605
|
}
|
|
597
606
|
}
|
|
598
607
|
},
|
|
608
|
+
"RestoreSnapshotRequest": {
|
|
609
|
+
"type": "object",
|
|
610
|
+
"properties": {
|
|
611
|
+
"mode": {
|
|
612
|
+
"type": "string",
|
|
613
|
+
"enum": [
|
|
614
|
+
"overwrite",
|
|
615
|
+
"preserve_edits"
|
|
616
|
+
],
|
|
617
|
+
"default": "overwrite",
|
|
618
|
+
"description": "How to handle destination resources whose content has been modified\nsince the snapshot was captured:\n\n- `overwrite` (default) — apply every captured payload regardless\n of current destination state. Matches the manual-restore\n semantics Config Hub relies on.\n- `preserve_edits` — for each captured resource, compare the live\n destination payload's fingerprint against the install-time\n fingerprint on lineage. If modified, skip and surface the\n entry under `Operation.skipped`. Also skips co-owned resources\n (lineage row carrying ≥2 distinct blueprint_instance_ids).\n Used by blueprint-manifest-api when reverting a blueprint\n install so user edits and other blueprints' contributions\n survive.\n"
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
},
|
|
599
622
|
"RestoreSnapshotResponse": {
|
|
600
623
|
"type": "object",
|
|
601
624
|
"required": [
|
|
@@ -701,14 +724,43 @@
|
|
|
701
724
|
"enum": [
|
|
702
725
|
"in_progress",
|
|
703
726
|
"completed",
|
|
727
|
+
"partial",
|
|
704
728
|
"failed"
|
|
705
|
-
]
|
|
729
|
+
],
|
|
730
|
+
"description": "`partial` indicates the operation completed but skipped at least\none resource — see `skipped`. Only populated by restores triggered\nwith `mode: 'preserve_edits'`.\n"
|
|
706
731
|
},
|
|
707
732
|
"error": {
|
|
708
733
|
"type": "string"
|
|
709
734
|
},
|
|
710
735
|
"triggered_by": {
|
|
711
736
|
"$ref": "#/components/schemas/CallerIdentity"
|
|
737
|
+
},
|
|
738
|
+
"skipped": {
|
|
739
|
+
"type": "array",
|
|
740
|
+
"description": "Per-resource skips, populated only for restores triggered with\n`mode: 'preserve_edits'`. Empty / absent for Config Hub's\ndefault overwrite-mode restores.\n",
|
|
741
|
+
"items": {
|
|
742
|
+
"$ref": "#/components/schemas/SkippedResource"
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
"SkippedResource": {
|
|
748
|
+
"type": "object",
|
|
749
|
+
"required": [
|
|
750
|
+
"lineage_id",
|
|
751
|
+
"reason"
|
|
752
|
+
],
|
|
753
|
+
"properties": {
|
|
754
|
+
"lineage_id": {
|
|
755
|
+
"type": "string"
|
|
756
|
+
},
|
|
757
|
+
"reason": {
|
|
758
|
+
"type": "string",
|
|
759
|
+
"enum": [
|
|
760
|
+
"modified",
|
|
761
|
+
"co_owned"
|
|
762
|
+
],
|
|
763
|
+
"description": "- `modified` — current destination payload's fingerprint differs\n from the install-time fingerprint on the lineage row.\n- `co_owned` — lineage row has ≥2 distinct\n `blueprint_instance_ids`; restoring would unilaterally affect\n another blueprint instance's contribution.\n"
|
|
712
764
|
}
|
|
713
765
|
}
|
|
714
766
|
},
|
package/dist/bin/epilot.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
API_LIST
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-E4R3KIU4.js";
|
|
5
5
|
|
|
6
6
|
// bin/epilot.ts
|
|
7
7
|
import { runMain } from "citty";
|
|
@@ -11,7 +11,7 @@ import { defineCommand } from "citty";
|
|
|
11
11
|
var main = defineCommand({
|
|
12
12
|
meta: {
|
|
13
13
|
name: "epilot",
|
|
14
|
-
version: "0.1.
|
|
14
|
+
version: "0.1.48",
|
|
15
15
|
description: "CLI for epilot APIs"
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
@@ -30,8 +30,8 @@ var main = defineCommand({
|
|
|
30
30
|
auth: () => import("../auth-CN5EFFDE.js").then((m) => m.default),
|
|
31
31
|
profile: () => import("../profile-OZJL5ZPT.js").then((m) => m.default),
|
|
32
32
|
config: () => import("../config-DGZIMLZK.js").then((m) => m.default),
|
|
33
|
-
completion: () => import("../completion-
|
|
34
|
-
upgrade: () => import("../upgrade-
|
|
33
|
+
completion: () => import("../completion-3LINP6M5.js").then((m) => m.default),
|
|
34
|
+
upgrade: () => import("../upgrade-H2OEXSPS.js").then((m) => m.default),
|
|
35
35
|
"access-token": () => import("../access-token-WWE6BDJH.js").then((m) => m.default),
|
|
36
36
|
address: () => import("../address-EH3C4CVB.js").then((m) => m.default),
|
|
37
37
|
"address-suggestions": () => import("../address-suggestions-RRSLOBFW.js").then((m) => m.default),
|
|
@@ -134,13 +134,13 @@ process.stderr.on("error", (err) => {
|
|
|
134
134
|
if (err.code === "EPIPE") process.exit(0);
|
|
135
135
|
throw err;
|
|
136
136
|
});
|
|
137
|
-
var VERSION = true ? "0.1.
|
|
137
|
+
var VERSION = true ? "0.1.48" : (await null).default.version;
|
|
138
138
|
var reorderedArgv = hoistFlagsAfterSubcommand(process.argv.slice(2));
|
|
139
139
|
process.argv = [process.argv[0], process.argv[1], ...reorderedArgv];
|
|
140
140
|
var args = process.argv.slice(2);
|
|
141
141
|
var completionsIdx = args.indexOf("--_completions");
|
|
142
142
|
if (completionsIdx >= 0) {
|
|
143
|
-
const { handleCompletions } = await import("../completion-
|
|
143
|
+
const { handleCompletions } = await import("../completion-3LINP6M5.js");
|
|
144
144
|
handleCompletions(args[completionsIdx + 1], args[completionsIdx + 2]);
|
|
145
145
|
process.exit(0);
|
|
146
146
|
}
|
|
@@ -155,7 +155,7 @@ var API_LIST = [
|
|
|
155
155
|
kebabName: "blueprint-manifest",
|
|
156
156
|
title: "Blueprint Manifest API",
|
|
157
157
|
serverUrl: "https://blueprint-manifest.sls.epilot.io",
|
|
158
|
-
operationCount:
|
|
158
|
+
operationCount: 61,
|
|
159
159
|
operationIds: [
|
|
160
160
|
"getJob",
|
|
161
161
|
"createExport",
|
|
@@ -211,7 +211,13 @@ var API_LIST = [
|
|
|
211
211
|
"updateMarketplaceListingVersion",
|
|
212
212
|
"publishMarketplaceListingVersion",
|
|
213
213
|
"installBlueprintV3",
|
|
214
|
-
"
|
|
214
|
+
"restoreBlueprintDeploymentV3",
|
|
215
|
+
"getRestorePreview",
|
|
216
|
+
"getBlueprintLineageV3",
|
|
217
|
+
"listUniquenessCriteria",
|
|
218
|
+
"getUniquenessCriteria",
|
|
219
|
+
"putUniquenessCriteria",
|
|
220
|
+
"deleteUniquenessCriteria"
|
|
215
221
|
]
|
|
216
222
|
},
|
|
217
223
|
{
|
|
@@ -72,7 +72,7 @@ ${GREEN}${BOLD}Upgraded to @epilot/cli@${latest}${RESET}
|
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
var getCurrentVersion = () => {
|
|
75
|
-
if (true) return "0.1.
|
|
75
|
+
if (true) return "0.1.48";
|
|
76
76
|
try {
|
|
77
77
|
const output = execSync("npm ls -g @epilot/cli --depth=0 --json 2>/dev/null", {
|
|
78
78
|
encoding: "utf-8",
|