@epilot/sdk 2.8.7 → 2.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/definitions/access-token-runtime.json +1 -1
  2. package/definitions/access-token.json +155 -1
  3. package/definitions/app.json +101 -8
  4. package/definitions/automation.json +120 -0
  5. package/definitions/blueprint-manifest-runtime.json +1 -1
  6. package/definitions/blueprint-manifest.json +1651 -357
  7. package/definitions/configuration-hub-runtime.json +1 -1
  8. package/definitions/configuration-hub.json +623 -0
  9. package/definitions/customer-portal-runtime.json +1 -1
  10. package/definitions/customer-portal.json +383 -78
  11. package/definitions/design-runtime.json +1 -1
  12. package/definitions/design.json +52 -12
  13. package/definitions/event-catalog-runtime.json +1 -1
  14. package/definitions/event-catalog.json +168 -12
  15. package/definitions/file-runtime.json +1 -1
  16. package/definitions/file.json +152 -4
  17. package/definitions/integration-toolkit-runtime.json +1 -1
  18. package/definitions/integration-toolkit.json +782 -13
  19. package/definitions/journey-runtime.json +1 -1
  20. package/definitions/journey.json +38 -1
  21. package/definitions/notes-runtime.json +1 -1
  22. package/definitions/notes.json +123 -1
  23. package/definitions/pricing.json +224 -406
  24. package/definitions/snapshot-runtime.json +1 -0
  25. package/definitions/snapshot.json +973 -0
  26. package/definitions/targeting-runtime.json +1 -1
  27. package/definitions/targeting.json +258 -7
  28. package/definitions/user-runtime.json +1 -1
  29. package/definitions/user.json +441 -0
  30. package/definitions/webhooks.json +31 -0
  31. package/dist/{ai-agents.d-OkXfr2bz.d.cts → ai-agents.d-CC5IjXrs.d.cts} +0 -2
  32. package/dist/{ai-agents.d-OkXfr2bz.d.ts → ai-agents.d-CC5IjXrs.d.ts} +0 -2
  33. package/dist/apis/access-token.cjs +6 -6
  34. package/dist/apis/access-token.js +1 -1
  35. package/dist/apis/address-suggestions.cjs +6 -6
  36. package/dist/apis/address-suggestions.js +1 -1
  37. package/dist/apis/address.cjs +6 -6
  38. package/dist/apis/address.js +1 -1
  39. package/dist/apis/ai-agents.cjs +6 -6
  40. package/dist/apis/ai-agents.d.cts +2 -2
  41. package/dist/apis/ai-agents.d.ts +2 -2
  42. package/dist/apis/ai-agents.js +1 -1
  43. package/dist/apis/app.cjs +6 -6
  44. package/dist/apis/app.js +1 -1
  45. package/dist/apis/audit-logs.cjs +6 -6
  46. package/dist/apis/audit-logs.js +1 -1
  47. package/dist/apis/automation.cjs +6 -6
  48. package/dist/apis/automation.js +1 -1
  49. package/dist/apis/billing.cjs +6 -6
  50. package/dist/apis/billing.js +1 -1
  51. package/dist/apis/blueprint-manifest.cjs +6 -6
  52. package/dist/apis/blueprint-manifest.js +1 -1
  53. package/dist/apis/calendar.cjs +6 -6
  54. package/dist/apis/calendar.js +1 -1
  55. package/dist/apis/configuration-hub.cjs +6 -6
  56. package/dist/apis/configuration-hub.js +1 -1
  57. package/dist/apis/consent.cjs +6 -6
  58. package/dist/apis/consent.js +1 -1
  59. package/dist/apis/customer-portal.cjs +6 -6
  60. package/dist/apis/customer-portal.js +1 -1
  61. package/dist/apis/dashboard.cjs +6 -6
  62. package/dist/apis/dashboard.js +1 -1
  63. package/dist/apis/data-governance.cjs +6 -6
  64. package/dist/apis/data-governance.js +1 -1
  65. package/dist/apis/deduplication.cjs +6 -6
  66. package/dist/apis/deduplication.js +1 -1
  67. package/dist/apis/design.cjs +6 -6
  68. package/dist/apis/design.js +1 -1
  69. package/dist/apis/document.cjs +6 -6
  70. package/dist/apis/document.js +1 -1
  71. package/dist/apis/email-settings.cjs +6 -6
  72. package/dist/apis/email-settings.js +1 -1
  73. package/dist/apis/email-template.cjs +6 -6
  74. package/dist/apis/email-template.js +1 -1
  75. package/dist/apis/entity-mapping.cjs +6 -6
  76. package/dist/apis/entity-mapping.js +1 -1
  77. package/dist/apis/entity.cjs +6 -6
  78. package/dist/apis/entity.js +1 -1
  79. package/dist/apis/environments.cjs +6 -6
  80. package/dist/apis/environments.js +1 -1
  81. package/dist/apis/event-catalog.cjs +6 -6
  82. package/dist/apis/event-catalog.js +1 -1
  83. package/dist/apis/file.cjs +6 -6
  84. package/dist/apis/file.js +1 -1
  85. package/dist/apis/iban.cjs +6 -6
  86. package/dist/apis/iban.js +1 -1
  87. package/dist/apis/integration-toolkit.cjs +6 -6
  88. package/dist/apis/integration-toolkit.js +1 -1
  89. package/dist/apis/journey.cjs +6 -6
  90. package/dist/apis/journey.d.cts +2 -2
  91. package/dist/apis/journey.d.ts +2 -2
  92. package/dist/apis/journey.js +1 -1
  93. package/dist/apis/kanban.cjs +6 -6
  94. package/dist/apis/kanban.js +1 -1
  95. package/dist/apis/message.cjs +6 -6
  96. package/dist/apis/message.js +1 -1
  97. package/dist/apis/metering.cjs +6 -6
  98. package/dist/apis/metering.js +1 -1
  99. package/dist/apis/notes.cjs +6 -6
  100. package/dist/apis/notes.js +1 -1
  101. package/dist/apis/notification.cjs +6 -6
  102. package/dist/apis/notification.js +1 -1
  103. package/dist/apis/organization.cjs +6 -6
  104. package/dist/apis/organization.js +1 -1
  105. package/dist/apis/partner-directory.cjs +6 -6
  106. package/dist/apis/partner-directory.js +1 -1
  107. package/dist/apis/permissions.cjs +6 -6
  108. package/dist/apis/permissions.js +1 -1
  109. package/dist/apis/pricing-tier.cjs +6 -6
  110. package/dist/apis/pricing-tier.js +1 -1
  111. package/dist/apis/pricing.cjs +6 -6
  112. package/dist/apis/pricing.js +1 -1
  113. package/dist/apis/purpose.cjs +6 -6
  114. package/dist/apis/purpose.js +1 -1
  115. package/dist/apis/query.cjs +6 -6
  116. package/dist/apis/query.js +1 -1
  117. package/dist/apis/sandbox.cjs +6 -6
  118. package/dist/apis/sandbox.js +1 -1
  119. package/dist/apis/sharing.cjs +6 -6
  120. package/dist/apis/sharing.js +1 -1
  121. package/dist/apis/snapshot.cjs +8 -8
  122. package/dist/apis/snapshot.d.cts +2 -2
  123. package/dist/apis/snapshot.d.ts +2 -2
  124. package/dist/apis/snapshot.js +2 -2
  125. package/dist/apis/submission.cjs +6 -6
  126. package/dist/apis/submission.js +1 -1
  127. package/dist/apis/target.cjs +6 -6
  128. package/dist/apis/target.js +1 -1
  129. package/dist/apis/targeting.cjs +6 -6
  130. package/dist/apis/targeting.js +1 -1
  131. package/dist/apis/template-variables.cjs +6 -6
  132. package/dist/apis/template-variables.js +1 -1
  133. package/dist/apis/user.cjs +6 -6
  134. package/dist/apis/user.js +1 -1
  135. package/dist/apis/validation-rules.cjs +6 -6
  136. package/dist/apis/validation-rules.js +1 -1
  137. package/dist/apis/webhooks.cjs +6 -6
  138. package/dist/apis/webhooks.js +1 -1
  139. package/dist/apis/workflow-definition.cjs +6 -6
  140. package/dist/apis/workflow-definition.js +1 -1
  141. package/dist/apis/workflow.cjs +6 -6
  142. package/dist/apis/workflow.js +1 -1
  143. package/dist/{chunk-7LIGFCRI.cjs → chunk-4GI6KGKZ.cjs} +3 -3
  144. package/dist/chunk-54QNWEPZ.js +14 -0
  145. package/dist/{chunk-CMANJ4LY.js → chunk-VMKT7UQS.js} +3 -3
  146. package/dist/chunk-YXJ4PBFQ.cjs +14 -0
  147. package/dist/index.cjs +10 -10
  148. package/dist/index.d.cts +3 -3
  149. package/dist/index.d.ts +3 -3
  150. package/dist/index.js +2 -2
  151. package/dist/journey-LHVSSVTG.cjs +7 -0
  152. package/dist/journey-NXL264XW.js +7 -0
  153. package/dist/{journey.d-BenIUWaO.d.cts → journey.d-B1sOeMHw.d.cts} +16 -3
  154. package/dist/{journey.d-BenIUWaO.d.ts → journey.d-B1sOeMHw.d.ts} +16 -3
  155. package/dist/snapshot-6CCO4NYL.js +7 -0
  156. package/dist/snapshot-GWB56VPP.cjs +7 -0
  157. package/dist/{snapshot-runtime-5TT575JS.cjs → snapshot-runtime-6DV42FVY.cjs} +2 -2
  158. package/dist/{snapshot-runtime-KWRGOKF4.js → snapshot-runtime-IW57MINC.js} +1 -1
  159. package/dist/{snapshot.d-C-n4wkIu.d.cts → snapshot.d-D5z6-hzE.d.cts} +30 -22
  160. package/dist/{snapshot.d-C-n4wkIu.d.ts → snapshot.d-D5z6-hzE.d.ts} +30 -22
  161. package/docs/journey.md +28 -8
  162. package/docs/snapshot.md +8 -6
  163. package/package.json +1 -1
  164. package/dist/chunk-4SZCKUY2.js +0 -14
  165. package/dist/chunk-ULKFBO7E.cjs +0 -14
  166. package/dist/journey-4DIIPRU4.js +0 -7
  167. package/dist/journey-ATC3Y5AW.cjs +0 -7
  168. package/dist/snapshot-GDJOEFJQ.js +0 -7
  169. package/dist/snapshot-UKV54UQQ.cjs +0 -7
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.0.2",
3
3
  "info": {
4
4
  "title": "Blueprint Manifest API",
5
- "version": "4.6.4",
5
+ "version": "4.7.0",
6
6
  "description": "Service to create and install Blueprint Manifest files"
7
7
  },
8
8
  "tags": [
@@ -37,6 +37,14 @@
37
37
  {
38
38
  "name": "Marketplace Listing Versions",
39
39
  "description": "Manage versions for marketplace listings"
40
+ },
41
+ {
42
+ "name": "Patches",
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"
40
48
  }
41
49
  ],
42
50
  "security": [
@@ -924,6 +932,14 @@
924
932
  "destination_blueprint_id": {
925
933
  "$ref": "#/components/schemas/BlueprintID"
926
934
  },
935
+ "source_auth_token": {
936
+ "type": "string",
937
+ "description": "Auth token with access to the source org. Required for cross-org auto-verification when the caller's bearer token belongs to the destination org."
938
+ },
939
+ "destination_auth_token": {
940
+ "type": "string",
941
+ "description": "Auth token with access to the destination org. Defaults to the caller's bearer token."
942
+ },
927
943
  "options": {
928
944
  "$ref": "#/components/schemas/BlueprintInstallationJobOptions"
929
945
  },
@@ -1224,13 +1240,13 @@
1224
1240
  }
1225
1241
  }
1226
1242
  },
1227
- "/v2/blueprint-manifest/blueprints/{blueprint_id}:export": {
1243
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches:detect": {
1228
1244
  "post": {
1229
- "operationId": "exportBlueprint",
1230
- "summary": "exportBlueprint",
1231
- "description": "Kick off a new blueprint export job. Returns 202 Accepted with Location header pointing to the job resource.\n",
1245
+ "operationId": "detectPatchChanges",
1246
+ "summary": "detectPatchChanges",
1247
+ "description": "Detect changes between the current state of a blueprint's resources and its tfstate baseline.\nReturns field-level diffs for resources that have been modified since the blueprint was last installed/exported.\n",
1232
1248
  "tags": [
1233
- "Blueprints"
1249
+ "Patches"
1234
1250
  ],
1235
1251
  "parameters": [
1236
1252
  {
@@ -1243,21 +1259,26 @@
1243
1259
  }
1244
1260
  ],
1245
1261
  "requestBody": {
1246
- "required": false,
1247
1262
  "content": {
1248
1263
  "application/json": {
1249
1264
  "schema": {
1250
1265
  "type": "object",
1251
1266
  "properties": {
1252
- "destination_org_id": {
1253
- "type": "string"
1267
+ "source_org_id": {
1268
+ "type": "string",
1269
+ "description": "Organization ID of the source org where changes were made"
1254
1270
  },
1255
- "destination_blueprint_id": {
1256
- "type": "string"
1271
+ "dest_org_id": {
1272
+ "type": "string",
1273
+ "description": "Organization ID of a destination org (used to load tfstate baseline)"
1257
1274
  },
1258
- "validate": {
1259
- "type": "boolean",
1260
- "description": "When true, run terraform validate before creating the export zip. If validation fails, the job will be marked as FAILED with errors."
1275
+ "dest_blueprint_id": {
1276
+ "type": "string",
1277
+ "description": "Blueprint ID in the destination org (used to locate tfstate in S3)"
1278
+ },
1279
+ "rollout_id": {
1280
+ "type": "string",
1281
+ "description": "ID of the mass rollout"
1261
1282
  }
1262
1283
  }
1263
1284
  }
@@ -1265,25 +1286,12 @@
1265
1286
  }
1266
1287
  },
1267
1288
  "responses": {
1268
- "202": {
1269
- "description": "Blueprint export job started",
1270
- "headers": {
1271
- "Location": {
1272
- "description": "URL to poll the job",
1273
- "schema": {
1274
- "type": "string"
1275
- }
1276
- }
1277
- },
1289
+ "200": {
1290
+ "description": "Detected changes",
1278
1291
  "content": {
1279
1292
  "application/json": {
1280
1293
  "schema": {
1281
- "type": "object",
1282
- "properties": {
1283
- "job_id": {
1284
- "$ref": "#/components/schemas/BlueprintJobID"
1285
- }
1286
- }
1294
+ "$ref": "#/components/schemas/DetectChangesResult"
1287
1295
  }
1288
1296
  }
1289
1297
  }
@@ -1291,67 +1299,23 @@
1291
1299
  }
1292
1300
  }
1293
1301
  },
1294
- "/v2/blueprint-manifest/marketplace/slugs": {
1295
- "get": {
1296
- "operationId": "listMarketplaceSlugs",
1297
- "summary": "listMarketplaceSlugs",
1298
- "description": "List all available marketplace blueprint slugs from Webflow CMS.\nReturns cached results when available.\n",
1302
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches": {
1303
+ "post": {
1304
+ "operationId": "createPatch",
1305
+ "summary": "createPatch",
1306
+ "description": "Create a new patch for a blueprint.",
1299
1307
  "tags": [
1300
- "Blueprints"
1308
+ "Patches"
1301
1309
  ],
1302
- "responses": {
1303
- "200": {
1304
- "description": "List of marketplace slugs",
1305
- "content": {
1306
- "application/json": {
1307
- "schema": {
1308
- "type": "object",
1309
- "properties": {
1310
- "results": {
1311
- "type": "array",
1312
- "items": {
1313
- "type": "object",
1314
- "properties": {
1315
- "slug": {
1316
- "type": "string",
1317
- "description": "The installation slug identifier for the blueprint (used for publishing).",
1318
- "example": "wallbox_b2c"
1319
- },
1320
- "marketplace_slug": {
1321
- "type": "string",
1322
- "description": "The marketplace page slug for the Webflow CMS item (used for display).",
1323
- "example": "wallbox-b2c"
1324
- },
1325
- "version": {
1326
- "type": "string",
1327
- "example": "v1.0.0"
1328
- },
1329
- "name": {
1330
- "type": "string",
1331
- "example": "Wallbox B2C"
1332
- },
1333
- "installation_link": {
1334
- "type": "string",
1335
- "example": "https://portal.epilot.cloud/app/blueprints/install/marketplace/wallbox_b2c?s3Ref=https://example.com/blueprint.zip"
1336
- }
1337
- }
1338
- }
1339
- }
1340
- }
1341
- }
1342
- }
1310
+ "parameters": [
1311
+ {
1312
+ "in": "path",
1313
+ "required": true,
1314
+ "name": "blueprint_id",
1315
+ "schema": {
1316
+ "$ref": "#/components/schemas/BlueprintID"
1343
1317
  }
1344
1318
  }
1345
- }
1346
- }
1347
- },
1348
- "/v2/blueprint-manifest/blueprints:publish": {
1349
- "post": {
1350
- "operationId": "publishBlueprint",
1351
- "summary": "publishBlueprint",
1352
- "description": "Publish a blueprint to the marketplace. Exports the blueprint, uploads it to file-api with public access, and updates the Webflow CMS listing.\n",
1353
- "tags": [
1354
- "Blueprints"
1355
1319
  ],
1356
1320
  "requestBody": {
1357
1321
  "required": true,
@@ -1361,23 +1325,35 @@
1361
1325
  "type": "object",
1362
1326
  "required": [
1363
1327
  "blueprint_id",
1364
- "slug"
1328
+ "rollout_id",
1329
+ "source_org_id",
1330
+ "name",
1331
+ "resources"
1365
1332
  ],
1366
1333
  "properties": {
1367
1334
  "blueprint_id": {
1368
1335
  "$ref": "#/components/schemas/BlueprintID"
1369
1336
  },
1370
- "slug": {
1371
- "type": "string",
1372
- "description": "The marketplace installation slug for the Webflow CMS item"
1337
+ "rollout_id": {
1338
+ "type": "string"
1373
1339
  },
1374
- "version": {
1375
- "type": "string",
1376
- "description": "The version string to set on the marketplace CMS item (e.g. \"1.0.0\")"
1340
+ "source_org_id": {
1341
+ "type": "string"
1377
1342
  },
1378
1343
  "name": {
1379
- "type": "string",
1380
- "description": "The display name for the blueprint on the marketplace CMS item"
1344
+ "type": "string"
1345
+ },
1346
+ "description": {
1347
+ "type": "string"
1348
+ },
1349
+ "resources": {
1350
+ "type": "array",
1351
+ "items": {
1352
+ "$ref": "#/components/schemas/PatchResourceDiff"
1353
+ }
1354
+ },
1355
+ "changelog": {
1356
+ "type": "string"
1381
1357
  }
1382
1358
  }
1383
1359
  }
@@ -1385,39 +1361,24 @@
1385
1361
  }
1386
1362
  },
1387
1363
  "responses": {
1388
- "202": {
1389
- "description": "Blueprint publish job started",
1390
- "headers": {
1391
- "Location": {
1392
- "description": "URL to poll the job",
1393
- "schema": {
1394
- "type": "string"
1395
- }
1396
- }
1397
- },
1364
+ "201": {
1365
+ "description": "Patch created",
1398
1366
  "content": {
1399
1367
  "application/json": {
1400
1368
  "schema": {
1401
- "type": "object",
1402
- "properties": {
1403
- "job_id": {
1404
- "$ref": "#/components/schemas/BlueprintJobID"
1405
- }
1406
- }
1369
+ "$ref": "#/components/schemas/BlueprintPatch"
1407
1370
  }
1408
1371
  }
1409
1372
  }
1410
1373
  }
1411
1374
  }
1412
- }
1413
- },
1414
- "/v2/blueprint-manifest/blueprints/{blueprint_id}:format-description": {
1415
- "post": {
1416
- "operationId": "formatBlueprintDescription",
1417
- "summary": "formatBlueprintDescription",
1418
- "description": "Format a blueprint description as markdown using AI.\n",
1375
+ },
1376
+ "get": {
1377
+ "operationId": "listPatches",
1378
+ "summary": "listPatches",
1379
+ "description": "List all patches for a blueprint.",
1419
1380
  "tags": [
1420
- "Blueprints"
1381
+ "Patches"
1421
1382
  ],
1422
1383
  "parameters": [
1423
1384
  {
@@ -1429,36 +1390,22 @@
1429
1390
  }
1430
1391
  }
1431
1392
  ],
1432
- "requestBody": {
1433
- "required": true,
1434
- "content": {
1435
- "application/json": {
1436
- "schema": {
1437
- "type": "object",
1438
- "required": [
1439
- "text"
1440
- ],
1441
- "properties": {
1442
- "text": {
1443
- "type": "string",
1444
- "description": "Plain text to format as markdown"
1445
- }
1446
- }
1447
- }
1448
- }
1449
- }
1450
- },
1451
1393
  "responses": {
1452
1394
  "200": {
1453
- "description": "Successfully formatted description",
1395
+ "description": "List of patches",
1454
1396
  "content": {
1455
1397
  "application/json": {
1456
1398
  "schema": {
1457
1399
  "type": "object",
1458
1400
  "properties": {
1459
- "markdown": {
1460
- "type": "string",
1461
- "description": "AI-formatted markdown content"
1401
+ "total": {
1402
+ "type": "integer"
1403
+ },
1404
+ "results": {
1405
+ "type": "array",
1406
+ "items": {
1407
+ "$ref": "#/components/schemas/BlueprintPatch"
1408
+ }
1462
1409
  }
1463
1410
  }
1464
1411
  }
@@ -1468,13 +1415,13 @@
1468
1415
  }
1469
1416
  }
1470
1417
  },
1471
- "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources": {
1472
- "post": {
1473
- "operationId": "addBlueprintResource",
1474
- "summary": "addBlueprintResource",
1475
- "description": "Add a resource to a Blueprint",
1418
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches/{patch_id}": {
1419
+ "get": {
1420
+ "operationId": "getPatch",
1421
+ "summary": "getPatch",
1422
+ "description": "Get a patch by ID, including per-org execution results.",
1476
1423
  "tags": [
1477
- "Blueprints"
1424
+ "Patches"
1478
1425
  ],
1479
1426
  "parameters": [
1480
1427
  {
@@ -1486,53 +1433,38 @@
1486
1433
  }
1487
1434
  },
1488
1435
  {
1489
- "in": "query",
1490
- "name": "add_dependencies",
1436
+ "in": "path",
1437
+ "required": true,
1438
+ "name": "patch_id",
1491
1439
  "schema": {
1492
- "type": "boolean",
1493
- "default": false,
1494
- "description": "Whether to add this resource dependencies to the blueprint automatically"
1440
+ "type": "string"
1495
1441
  }
1496
1442
  }
1497
1443
  ],
1498
- "requestBody": {
1499
- "content": {
1500
- "application/json": {
1501
- "schema": {
1502
- "$ref": "#/components/schemas/BlueprintResource"
1503
- }
1504
- }
1505
- }
1506
- },
1507
1444
  "responses": {
1508
1445
  "200": {
1509
- "description": "Added Blueprint Resource",
1446
+ "description": "Patch details",
1510
1447
  "content": {
1511
1448
  "application/json": {
1512
1449
  "schema": {
1513
- "type": "object",
1514
- "properties": {
1515
- "resources": {
1516
- "type": "array",
1517
- "items": {
1518
- "$ref": "#/components/schemas/BlueprintResource"
1519
- }
1520
- }
1521
- }
1450
+ "$ref": "#/components/schemas/BlueprintPatchWithResults"
1522
1451
  }
1523
1452
  }
1524
1453
  }
1454
+ },
1455
+ "404": {
1456
+ "description": "Patch not found"
1525
1457
  }
1526
1458
  }
1527
1459
  }
1528
1460
  },
1529
- "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources:syncDependencies": {
1461
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches/{patch_id}:apply": {
1530
1462
  "post": {
1531
- "operationId": "syncDependencies",
1532
- "summary": "syncDependencies",
1533
- "description": "Sync dependencies of all root resources in a Blueprint",
1463
+ "operationId": "applyPatch",
1464
+ "summary": "applyPatch",
1465
+ "description": "Apply a patch to a single destination org.",
1534
1466
  "tags": [
1535
- "Blueprints"
1467
+ "Patches"
1536
1468
  ],
1537
1469
  "parameters": [
1538
1470
  {
@@ -1542,42 +1474,70 @@
1542
1474
  "schema": {
1543
1475
  "$ref": "#/components/schemas/BlueprintID"
1544
1476
  }
1477
+ },
1478
+ {
1479
+ "in": "path",
1480
+ "required": true,
1481
+ "name": "patch_id",
1482
+ "schema": {
1483
+ "type": "string"
1484
+ }
1545
1485
  }
1546
1486
  ],
1547
- "responses": {
1548
- "202": {
1549
- "description": "Dependencies sync job started",
1550
- "headers": {
1551
- "Location": {
1552
- "description": "URL to poll the job",
1553
- "schema": {
1554
- "type": "string"
1555
- }
1556
- }
1557
- },
1558
- "content": {
1559
- "application/json": {
1560
- "schema": {
1561
- "type": "object",
1562
- "properties": {
1563
- "job_id": {
1564
- "$ref": "#/components/schemas/BlueprintJobID"
1565
- }
1487
+ "requestBody": {
1488
+ "required": true,
1489
+ "content": {
1490
+ "application/json": {
1491
+ "schema": {
1492
+ "type": "object",
1493
+ "required": [
1494
+ "org_id",
1495
+ "org_name",
1496
+ "dest_blueprint_id"
1497
+ ],
1498
+ "properties": {
1499
+ "org_id": {
1500
+ "type": "string"
1501
+ },
1502
+ "org_name": {
1503
+ "type": "string"
1504
+ },
1505
+ "dest_blueprint_id": {
1506
+ "type": "string"
1507
+ },
1508
+ "dest_org_id": {
1509
+ "type": "string"
1510
+ },
1511
+ "destination_auth_token": {
1512
+ "type": "string",
1513
+ "description": "Auth token with access to the destination org (e.g. pipeline token)"
1566
1514
  }
1567
1515
  }
1568
1516
  }
1569
1517
  }
1570
1518
  }
1519
+ },
1520
+ "responses": {
1521
+ "200": {
1522
+ "description": "Patch execution result",
1523
+ "content": {
1524
+ "application/json": {
1525
+ "schema": {
1526
+ "$ref": "#/components/schemas/OrgPatchExecution"
1527
+ }
1528
+ }
1529
+ }
1530
+ }
1571
1531
  }
1572
1532
  }
1573
1533
  },
1574
- "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources/bulk": {
1534
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/patches/{patch_id}/orgs/{org_id}:retry": {
1575
1535
  "post": {
1576
- "operationId": "bulkAddBlueprintResources",
1577
- "summary": "bulkAddBlueprintResources",
1578
- "description": "Bulk Add resources in a Blueprint",
1536
+ "operationId": "retryPatchOrg",
1537
+ "summary": "retryPatchOrg",
1538
+ "description": "Retry a failed patch execution for a specific org.",
1579
1539
  "tags": [
1580
- "Blueprints"
1540
+ "Patches"
1581
1541
  ],
1582
1542
  "parameters": [
1583
1543
  {
@@ -1589,12 +1549,19 @@
1589
1549
  }
1590
1550
  },
1591
1551
  {
1592
- "in": "query",
1593
- "name": "add_dependencies",
1552
+ "in": "path",
1553
+ "required": true,
1554
+ "name": "patch_id",
1594
1555
  "schema": {
1595
- "type": "boolean",
1596
- "default": false,
1597
- "description": "Whether to add this resource dependencies to the blueprint automatically"
1556
+ "type": "string"
1557
+ }
1558
+ },
1559
+ {
1560
+ "in": "path",
1561
+ "required": true,
1562
+ "name": "org_id",
1563
+ "schema": {
1564
+ "type": "string"
1598
1565
  }
1599
1566
  }
1600
1567
  ],
@@ -1602,9 +1569,17 @@
1602
1569
  "content": {
1603
1570
  "application/json": {
1604
1571
  "schema": {
1605
- "type": "array",
1606
- "items": {
1607
- "$ref": "#/components/schemas/BlueprintResource"
1572
+ "type": "object",
1573
+ "properties": {
1574
+ "org_name": {
1575
+ "type": "string"
1576
+ },
1577
+ "dest_blueprint_id": {
1578
+ "type": "string"
1579
+ },
1580
+ "destination_auth_token": {
1581
+ "type": "string"
1582
+ }
1608
1583
  }
1609
1584
  }
1610
1585
  }
@@ -1612,29 +1587,23 @@
1612
1587
  },
1613
1588
  "responses": {
1614
1589
  "200": {
1615
- "description": "Bulk updated Blueprint Resources",
1590
+ "description": "Retry execution result",
1616
1591
  "content": {
1617
1592
  "application/json": {
1618
1593
  "schema": {
1619
- "type": "object",
1620
- "properties": {
1621
- "resources": {
1622
- "type": "array",
1623
- "items": {
1624
- "$ref": "#/components/schemas/BlueprintResource"
1625
- }
1626
- }
1627
- }
1594
+ "$ref": "#/components/schemas/OrgPatchExecution"
1628
1595
  }
1629
1596
  }
1630
1597
  }
1631
1598
  }
1632
1599
  }
1633
- },
1634
- "put": {
1635
- "operationId": "bulkUpdateBlueprintResources",
1636
- "summary": "bulkUpdateBlueprintResources",
1637
- "description": "Bulk update resources in a Blueprint",
1600
+ }
1601
+ },
1602
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}:export": {
1603
+ "post": {
1604
+ "operationId": "exportBlueprint",
1605
+ "summary": "exportBlueprint",
1606
+ "description": "Kick off a new blueprint export job. Returns 202 Accepted with Location header pointing to the job resource.\n",
1638
1607
  "tags": [
1639
1608
  "Blueprints"
1640
1609
  ],
@@ -1649,29 +1618,98 @@
1649
1618
  }
1650
1619
  ],
1651
1620
  "requestBody": {
1621
+ "required": false,
1652
1622
  "content": {
1653
1623
  "application/json": {
1654
1624
  "schema": {
1655
- "type": "array",
1656
- "items": {
1657
- "$ref": "#/components/schemas/BlueprintResource"
1625
+ "type": "object",
1626
+ "properties": {
1627
+ "destination_org_id": {
1628
+ "type": "string"
1629
+ },
1630
+ "destination_blueprint_id": {
1631
+ "type": "string"
1632
+ },
1633
+ "validate": {
1634
+ "type": "boolean",
1635
+ "description": "When true, run terraform validate before creating the export zip. If validation fails, the job will be marked as FAILED with errors."
1636
+ }
1658
1637
  }
1659
1638
  }
1660
1639
  }
1661
1640
  }
1662
1641
  },
1642
+ "responses": {
1643
+ "202": {
1644
+ "description": "Blueprint export job started",
1645
+ "headers": {
1646
+ "Location": {
1647
+ "description": "URL to poll the job",
1648
+ "schema": {
1649
+ "type": "string"
1650
+ }
1651
+ }
1652
+ },
1653
+ "content": {
1654
+ "application/json": {
1655
+ "schema": {
1656
+ "type": "object",
1657
+ "properties": {
1658
+ "job_id": {
1659
+ "$ref": "#/components/schemas/BlueprintJobID"
1660
+ }
1661
+ }
1662
+ }
1663
+ }
1664
+ }
1665
+ }
1666
+ }
1667
+ }
1668
+ },
1669
+ "/v2/blueprint-manifest/marketplace/slugs": {
1670
+ "get": {
1671
+ "operationId": "listMarketplaceSlugs",
1672
+ "summary": "listMarketplaceSlugs",
1673
+ "description": "List all available marketplace blueprint slugs from Webflow CMS.\nReturns cached results when available.\n",
1674
+ "tags": [
1675
+ "Blueprints"
1676
+ ],
1663
1677
  "responses": {
1664
1678
  "200": {
1665
- "description": "Bulk updated Blueprint Resources",
1679
+ "description": "List of marketplace slugs",
1666
1680
  "content": {
1667
1681
  "application/json": {
1668
1682
  "schema": {
1669
1683
  "type": "object",
1670
1684
  "properties": {
1671
- "resources": {
1685
+ "results": {
1672
1686
  "type": "array",
1673
1687
  "items": {
1674
- "$ref": "#/components/schemas/BlueprintResource"
1688
+ "type": "object",
1689
+ "properties": {
1690
+ "slug": {
1691
+ "type": "string",
1692
+ "description": "The installation slug identifier for the blueprint (used for publishing).",
1693
+ "example": "wallbox_b2c"
1694
+ },
1695
+ "marketplace_slug": {
1696
+ "type": "string",
1697
+ "description": "The marketplace page slug for the Webflow CMS item (used for display).",
1698
+ "example": "wallbox-b2c"
1699
+ },
1700
+ "version": {
1701
+ "type": "string",
1702
+ "example": "v1.0.0"
1703
+ },
1704
+ "name": {
1705
+ "type": "string",
1706
+ "example": "Wallbox B2C"
1707
+ },
1708
+ "installation_link": {
1709
+ "type": "string",
1710
+ "example": "https://portal.epilot.cloud/app/blueprints/install/marketplace/wallbox_b2c?s3Ref=https://example.com/blueprint.zip"
1711
+ }
1712
+ }
1675
1713
  }
1676
1714
  }
1677
1715
  }
@@ -1680,49 +1718,65 @@
1680
1718
  }
1681
1719
  }
1682
1720
  }
1683
- },
1684
- "delete": {
1685
- "operationId": "bulkDeleteBlueprintResources",
1686
- "summary": "bulkDeleteBlueprintResources",
1687
- "description": "Bulk delete resources in a Blueprint",
1721
+ }
1722
+ },
1723
+ "/v2/blueprint-manifest/blueprints:publish": {
1724
+ "post": {
1725
+ "operationId": "publishBlueprint",
1726
+ "summary": "publishBlueprint",
1727
+ "description": "Publish a blueprint to the marketplace. Exports the blueprint, uploads it to file-api with public access, and updates the Webflow CMS listing.\n",
1688
1728
  "tags": [
1689
1729
  "Blueprints"
1690
1730
  ],
1691
- "parameters": [
1692
- {
1693
- "in": "path",
1694
- "required": true,
1695
- "name": "blueprint_id",
1696
- "schema": {
1697
- "$ref": "#/components/schemas/BlueprintID"
1698
- }
1699
- }
1700
- ],
1701
1731
  "requestBody": {
1732
+ "required": true,
1702
1733
  "content": {
1703
1734
  "application/json": {
1704
1735
  "schema": {
1705
- "type": "array",
1706
- "items": {
1707
- "$ref": "#/components/schemas/BlueprintResourceID"
1736
+ "type": "object",
1737
+ "required": [
1738
+ "blueprint_id",
1739
+ "slug"
1740
+ ],
1741
+ "properties": {
1742
+ "blueprint_id": {
1743
+ "$ref": "#/components/schemas/BlueprintID"
1744
+ },
1745
+ "slug": {
1746
+ "type": "string",
1747
+ "description": "The marketplace installation slug for the Webflow CMS item"
1748
+ },
1749
+ "version": {
1750
+ "type": "string",
1751
+ "description": "The version string to set on the marketplace CMS item (e.g. \"1.0.0\")"
1752
+ },
1753
+ "name": {
1754
+ "type": "string",
1755
+ "description": "The display name for the blueprint on the marketplace CMS item"
1756
+ }
1708
1757
  }
1709
1758
  }
1710
1759
  }
1711
1760
  }
1712
1761
  },
1713
1762
  "responses": {
1714
- "200": {
1715
- "description": "Bulk deleted Blueprint Resources",
1763
+ "202": {
1764
+ "description": "Blueprint publish job started",
1765
+ "headers": {
1766
+ "Location": {
1767
+ "description": "URL to poll the job",
1768
+ "schema": {
1769
+ "type": "string"
1770
+ }
1771
+ }
1772
+ },
1716
1773
  "content": {
1717
1774
  "application/json": {
1718
1775
  "schema": {
1719
1776
  "type": "object",
1720
1777
  "properties": {
1721
- "resources": {
1722
- "type": "array",
1723
- "items": {
1724
- "$ref": "#/components/schemas/BlueprintResource"
1725
- }
1778
+ "job_id": {
1779
+ "$ref": "#/components/schemas/BlueprintJobID"
1726
1780
  }
1727
1781
  }
1728
1782
  }
@@ -1732,11 +1786,11 @@
1732
1786
  }
1733
1787
  }
1734
1788
  },
1735
- "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources/{resource_id}": {
1736
- "put": {
1737
- "operationId": "updateBlueprintResource",
1738
- "summary": "updateBlueprintResource",
1739
- "description": "Update a resource in a Blueprint",
1789
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}:format-description": {
1790
+ "post": {
1791
+ "operationId": "formatBlueprintDescription",
1792
+ "summary": "formatBlueprintDescription",
1793
+ "description": "Format a blueprint description as markdown using AI.\n",
1740
1794
  "tags": [
1741
1795
  "Blueprints"
1742
1796
  ],
@@ -1748,38 +1802,38 @@
1748
1802
  "schema": {
1749
1803
  "$ref": "#/components/schemas/BlueprintID"
1750
1804
  }
1751
- },
1752
- {
1753
- "in": "path",
1754
- "required": true,
1755
- "name": "resource_id",
1756
- "schema": {
1757
- "$ref": "#/components/schemas/BlueprintResourceID"
1758
- }
1759
1805
  }
1760
1806
  ],
1761
1807
  "requestBody": {
1808
+ "required": true,
1762
1809
  "content": {
1763
1810
  "application/json": {
1764
1811
  "schema": {
1765
- "$ref": "#/components/schemas/BlueprintResource"
1766
- }
1767
- }
1768
- }
1812
+ "type": "object",
1813
+ "required": [
1814
+ "text"
1815
+ ],
1816
+ "properties": {
1817
+ "text": {
1818
+ "type": "string",
1819
+ "description": "Plain text to format as markdown"
1820
+ }
1821
+ }
1822
+ }
1823
+ }
1824
+ }
1769
1825
  },
1770
1826
  "responses": {
1771
1827
  "200": {
1772
- "description": "Updated Blueprint Resource",
1828
+ "description": "Successfully formatted description",
1773
1829
  "content": {
1774
1830
  "application/json": {
1775
1831
  "schema": {
1776
1832
  "type": "object",
1777
1833
  "properties": {
1778
- "resources": {
1779
- "type": "array",
1780
- "items": {
1781
- "$ref": "#/components/schemas/BlueprintResource"
1782
- }
1834
+ "markdown": {
1835
+ "type": "string",
1836
+ "description": "AI-formatted markdown content"
1783
1837
  }
1784
1838
  }
1785
1839
  }
@@ -1787,11 +1841,45 @@
1787
1841
  }
1788
1842
  }
1789
1843
  }
1790
- },
1791
- "delete": {
1792
- "operationId": "deleteBlueprintResource",
1793
- "summary": "deleteBlueprintResource",
1794
- "description": "Delete a resource from a Blueprint",
1844
+ }
1845
+ },
1846
+ "/v2/blueprint-manifest/blueprints:suggest-resources": {
1847
+ "post": {
1848
+ "operationId": "suggestBlueprintResources",
1849
+ "summary": "suggestBlueprintResources",
1850
+ "description": "Suggest resources to add to a blueprint based on a natural-language prompt.\n\nWalks anchor resource types in priority order (journey > workflow_definition >\nautomation_flow > schema > entity-backed types) and returns matches per\nanchor using each upstream API's text search. Suggestions are marked\n`is_root: true` so callers can pass `add_dependencies=true` to\nbulkAddBlueprintResources and have transitive dependencies resolved\nserver-side — which means a single matched journey can stand in for its\nfull product/schema/template bundle.\n\nNo side effects on the blueprint — the caller persists the chosen resources\nvia the existing create/bulk-add endpoints.\n",
1851
+ "tags": [
1852
+ "Blueprints"
1853
+ ],
1854
+ "requestBody": {
1855
+ "required": true,
1856
+ "content": {
1857
+ "application/json": {
1858
+ "schema": {
1859
+ "$ref": "#/components/schemas/SuggestBlueprintResourcesRequest"
1860
+ }
1861
+ }
1862
+ }
1863
+ },
1864
+ "responses": {
1865
+ "200": {
1866
+ "description": "Suggested resources",
1867
+ "content": {
1868
+ "application/json": {
1869
+ "schema": {
1870
+ "$ref": "#/components/schemas/SuggestBlueprintResourcesResponse"
1871
+ }
1872
+ }
1873
+ }
1874
+ }
1875
+ }
1876
+ }
1877
+ },
1878
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources": {
1879
+ "post": {
1880
+ "operationId": "addBlueprintResource",
1881
+ "summary": "addBlueprintResource",
1882
+ "description": "Add a resource to a Blueprint",
1795
1883
  "tags": [
1796
1884
  "Blueprints"
1797
1885
  ],
@@ -1805,17 +1893,27 @@
1805
1893
  }
1806
1894
  },
1807
1895
  {
1808
- "in": "path",
1809
- "required": true,
1810
- "name": "resource_id",
1896
+ "in": "query",
1897
+ "name": "add_dependencies",
1811
1898
  "schema": {
1812
- "$ref": "#/components/schemas/BlueprintResourceID"
1899
+ "type": "boolean",
1900
+ "default": false,
1901
+ "description": "Whether to add this resource dependencies to the blueprint automatically"
1813
1902
  }
1814
1903
  }
1815
1904
  ],
1905
+ "requestBody": {
1906
+ "content": {
1907
+ "application/json": {
1908
+ "schema": {
1909
+ "$ref": "#/components/schemas/BlueprintResource"
1910
+ }
1911
+ }
1912
+ }
1913
+ },
1816
1914
  "responses": {
1817
1915
  "200": {
1818
- "description": "Deleted Blueprint Resource",
1916
+ "description": "Added Blueprint Resource",
1819
1917
  "content": {
1820
1918
  "application/json": {
1821
1919
  "schema": {
@@ -1835,31 +1933,42 @@
1835
1933
  }
1836
1934
  }
1837
1935
  },
1838
- "/v2/blueprint-manifest/jobs": {
1839
- "get": {
1840
- "operationId": "listBlueprintJobs",
1841
- "summary": "List Blueprint Jobs",
1842
- "description": "List all blueprint jobs",
1936
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources:syncDependencies": {
1937
+ "post": {
1938
+ "operationId": "syncDependencies",
1939
+ "summary": "syncDependencies",
1940
+ "description": "Sync dependencies of all root resources in a Blueprint",
1843
1941
  "tags": [
1844
- "Jobs"
1942
+ "Blueprints"
1943
+ ],
1944
+ "parameters": [
1945
+ {
1946
+ "in": "path",
1947
+ "required": true,
1948
+ "name": "blueprint_id",
1949
+ "schema": {
1950
+ "$ref": "#/components/schemas/BlueprintID"
1951
+ }
1952
+ }
1845
1953
  ],
1846
1954
  "responses": {
1847
- "200": {
1848
- "description": "Blueprint jobs",
1955
+ "202": {
1956
+ "description": "Dependencies sync job started",
1957
+ "headers": {
1958
+ "Location": {
1959
+ "description": "URL to poll the job",
1960
+ "schema": {
1961
+ "type": "string"
1962
+ }
1963
+ }
1964
+ },
1849
1965
  "content": {
1850
1966
  "application/json": {
1851
1967
  "schema": {
1852
1968
  "type": "object",
1853
1969
  "properties": {
1854
- "total": {
1855
- "type": "integer",
1856
- "example": 1
1857
- },
1858
- "results": {
1859
- "type": "array",
1860
- "items": {
1861
- "$ref": "#/components/schemas/BlueprintJob"
1862
- }
1970
+ "job_id": {
1971
+ "$ref": "#/components/schemas/BlueprintJobID"
1863
1972
  }
1864
1973
  }
1865
1974
  }
@@ -1869,105 +1978,160 @@
1869
1978
  }
1870
1979
  }
1871
1980
  },
1872
- "/v2/blueprint-manifest/jobs/{job_id}": {
1873
- "get": {
1874
- "operationId": "getBlueprintJob",
1875
- "summary": "Get Job",
1876
- "description": "Poll current state of a job.",
1981
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources/bulk": {
1982
+ "post": {
1983
+ "operationId": "bulkAddBlueprintResources",
1984
+ "summary": "bulkAddBlueprintResources",
1985
+ "description": "Bulk Add resources in a Blueprint",
1877
1986
  "tags": [
1878
- "Jobs"
1987
+ "Blueprints"
1879
1988
  ],
1880
1989
  "parameters": [
1881
1990
  {
1882
1991
  "in": "path",
1883
1992
  "required": true,
1884
- "name": "job_id",
1993
+ "name": "blueprint_id",
1885
1994
  "schema": {
1886
- "$ref": "#/components/schemas/BlueprintJobID"
1995
+ "$ref": "#/components/schemas/BlueprintID"
1996
+ }
1997
+ },
1998
+ {
1999
+ "in": "query",
2000
+ "name": "add_dependencies",
2001
+ "schema": {
2002
+ "type": "boolean",
2003
+ "default": false,
2004
+ "description": "Whether to add this resource dependencies to the blueprint automatically"
1887
2005
  }
1888
2006
  }
1889
2007
  ],
2008
+ "requestBody": {
2009
+ "content": {
2010
+ "application/json": {
2011
+ "schema": {
2012
+ "type": "array",
2013
+ "items": {
2014
+ "$ref": "#/components/schemas/BlueprintResource"
2015
+ }
2016
+ }
2017
+ }
2018
+ }
2019
+ },
1890
2020
  "responses": {
1891
2021
  "200": {
1892
- "description": "Job status",
2022
+ "description": "Bulk updated Blueprint Resources",
1893
2023
  "content": {
1894
2024
  "application/json": {
1895
2025
  "schema": {
1896
- "$ref": "#/components/schemas/BlueprintJob"
2026
+ "type": "object",
2027
+ "properties": {
2028
+ "resources": {
2029
+ "type": "array",
2030
+ "items": {
2031
+ "$ref": "#/components/schemas/BlueprintResource"
2032
+ }
2033
+ }
2034
+ }
1897
2035
  }
1898
2036
  }
1899
2037
  }
1900
2038
  }
1901
2039
  }
1902
- }
1903
- },
1904
- "/v2/blueprint-manifest/jobs/{job_id}:continue": {
1905
- "post": {
1906
- "operationId": "continueInstallationJob",
1907
- "summary": "Continue Installation Job",
1908
- "description": "Continue an installation job if it is waiting for user action.",
2040
+ },
2041
+ "put": {
2042
+ "operationId": "bulkUpdateBlueprintResources",
2043
+ "summary": "bulkUpdateBlueprintResources",
2044
+ "description": "Bulk update resources in a Blueprint",
1909
2045
  "tags": [
1910
- "Jobs"
2046
+ "Blueprints"
1911
2047
  ],
1912
2048
  "parameters": [
1913
2049
  {
1914
2050
  "in": "path",
1915
2051
  "required": true,
1916
- "name": "job_id",
2052
+ "name": "blueprint_id",
1917
2053
  "schema": {
1918
- "$ref": "#/components/schemas/BlueprintJobID"
2054
+ "$ref": "#/components/schemas/BlueprintID"
1919
2055
  }
1920
2056
  }
1921
2057
  ],
1922
2058
  "requestBody": {
1923
- "required": false,
1924
2059
  "content": {
1925
2060
  "application/json": {
1926
2061
  "schema": {
1927
- "$ref": "#/components/schemas/BlueprintInstallationJobOptions"
2062
+ "type": "array",
2063
+ "items": {
2064
+ "$ref": "#/components/schemas/BlueprintResource"
2065
+ }
1928
2066
  }
1929
2067
  }
1930
2068
  }
1931
2069
  },
1932
2070
  "responses": {
1933
2071
  "200": {
1934
- "description": "Blueprint installation job continued",
2072
+ "description": "Bulk updated Blueprint Resources",
1935
2073
  "content": {
1936
2074
  "application/json": {
1937
2075
  "schema": {
1938
- "$ref": "#/components/schemas/BlueprintInstallationJob"
2076
+ "type": "object",
2077
+ "properties": {
2078
+ "resources": {
2079
+ "type": "array",
2080
+ "items": {
2081
+ "$ref": "#/components/schemas/BlueprintResource"
2082
+ }
2083
+ }
2084
+ }
1939
2085
  }
1940
2086
  }
1941
2087
  }
1942
2088
  }
1943
2089
  }
1944
- }
1945
- },
1946
- "/v2/blueprint-manifest/jobs/{job_id}:cancel": {
1947
- "post": {
1948
- "operationId": "cancelBlueprintJob",
1949
- "summary": "Cancel Blueprint Job",
1950
- "description": "Cancel a blueprint job if it is still running.",
2090
+ },
2091
+ "delete": {
2092
+ "operationId": "bulkDeleteBlueprintResources",
2093
+ "summary": "bulkDeleteBlueprintResources",
2094
+ "description": "Bulk delete resources in a Blueprint",
1951
2095
  "tags": [
1952
- "Jobs"
2096
+ "Blueprints"
1953
2097
  ],
1954
2098
  "parameters": [
1955
2099
  {
1956
2100
  "in": "path",
1957
2101
  "required": true,
1958
- "name": "job_id",
2102
+ "name": "blueprint_id",
1959
2103
  "schema": {
1960
- "$ref": "#/components/schemas/BlueprintJobID"
2104
+ "$ref": "#/components/schemas/BlueprintID"
1961
2105
  }
1962
2106
  }
1963
2107
  ],
2108
+ "requestBody": {
2109
+ "content": {
2110
+ "application/json": {
2111
+ "schema": {
2112
+ "type": "array",
2113
+ "items": {
2114
+ "$ref": "#/components/schemas/BlueprintResourceID"
2115
+ }
2116
+ }
2117
+ }
2118
+ }
2119
+ },
1964
2120
  "responses": {
1965
2121
  "200": {
1966
- "description": "Blueprint job cancelled",
2122
+ "description": "Bulk deleted Blueprint Resources",
1967
2123
  "content": {
1968
2124
  "application/json": {
1969
2125
  "schema": {
1970
- "$ref": "#/components/schemas/BlueprintJob"
2126
+ "type": "object",
2127
+ "properties": {
2128
+ "resources": {
2129
+ "type": "array",
2130
+ "items": {
2131
+ "$ref": "#/components/schemas/BlueprintResource"
2132
+ }
2133
+ }
2134
+ }
1971
2135
  }
1972
2136
  }
1973
2137
  }
@@ -1975,10 +2139,253 @@
1975
2139
  }
1976
2140
  }
1977
2141
  },
1978
- "/v1/blueprints/{blueprint_id}/marketplace-listing": {
1979
- "post": {
1980
- "operationId": "createMarketplaceListing",
1981
- "summary": "createMarketplaceListing",
2142
+ "/v2/blueprint-manifest/blueprints/{blueprint_id}/resources/{resource_id}": {
2143
+ "put": {
2144
+ "operationId": "updateBlueprintResource",
2145
+ "summary": "updateBlueprintResource",
2146
+ "description": "Update a resource in a Blueprint",
2147
+ "tags": [
2148
+ "Blueprints"
2149
+ ],
2150
+ "parameters": [
2151
+ {
2152
+ "in": "path",
2153
+ "required": true,
2154
+ "name": "blueprint_id",
2155
+ "schema": {
2156
+ "$ref": "#/components/schemas/BlueprintID"
2157
+ }
2158
+ },
2159
+ {
2160
+ "in": "path",
2161
+ "required": true,
2162
+ "name": "resource_id",
2163
+ "schema": {
2164
+ "$ref": "#/components/schemas/BlueprintResourceID"
2165
+ }
2166
+ }
2167
+ ],
2168
+ "requestBody": {
2169
+ "content": {
2170
+ "application/json": {
2171
+ "schema": {
2172
+ "$ref": "#/components/schemas/BlueprintResource"
2173
+ }
2174
+ }
2175
+ }
2176
+ },
2177
+ "responses": {
2178
+ "200": {
2179
+ "description": "Updated Blueprint Resource",
2180
+ "content": {
2181
+ "application/json": {
2182
+ "schema": {
2183
+ "type": "object",
2184
+ "properties": {
2185
+ "resources": {
2186
+ "type": "array",
2187
+ "items": {
2188
+ "$ref": "#/components/schemas/BlueprintResource"
2189
+ }
2190
+ }
2191
+ }
2192
+ }
2193
+ }
2194
+ }
2195
+ }
2196
+ }
2197
+ },
2198
+ "delete": {
2199
+ "operationId": "deleteBlueprintResource",
2200
+ "summary": "deleteBlueprintResource",
2201
+ "description": "Delete a resource from a Blueprint",
2202
+ "tags": [
2203
+ "Blueprints"
2204
+ ],
2205
+ "parameters": [
2206
+ {
2207
+ "in": "path",
2208
+ "required": true,
2209
+ "name": "blueprint_id",
2210
+ "schema": {
2211
+ "$ref": "#/components/schemas/BlueprintID"
2212
+ }
2213
+ },
2214
+ {
2215
+ "in": "path",
2216
+ "required": true,
2217
+ "name": "resource_id",
2218
+ "schema": {
2219
+ "$ref": "#/components/schemas/BlueprintResourceID"
2220
+ }
2221
+ }
2222
+ ],
2223
+ "responses": {
2224
+ "200": {
2225
+ "description": "Deleted Blueprint Resource",
2226
+ "content": {
2227
+ "application/json": {
2228
+ "schema": {
2229
+ "type": "object",
2230
+ "properties": {
2231
+ "resources": {
2232
+ "type": "array",
2233
+ "items": {
2234
+ "$ref": "#/components/schemas/BlueprintResource"
2235
+ }
2236
+ }
2237
+ }
2238
+ }
2239
+ }
2240
+ }
2241
+ }
2242
+ }
2243
+ }
2244
+ },
2245
+ "/v2/blueprint-manifest/jobs": {
2246
+ "get": {
2247
+ "operationId": "listBlueprintJobs",
2248
+ "summary": "List Blueprint Jobs",
2249
+ "description": "List all blueprint jobs",
2250
+ "tags": [
2251
+ "Jobs"
2252
+ ],
2253
+ "responses": {
2254
+ "200": {
2255
+ "description": "Blueprint jobs",
2256
+ "content": {
2257
+ "application/json": {
2258
+ "schema": {
2259
+ "type": "object",
2260
+ "properties": {
2261
+ "total": {
2262
+ "type": "integer",
2263
+ "example": 1
2264
+ },
2265
+ "results": {
2266
+ "type": "array",
2267
+ "items": {
2268
+ "$ref": "#/components/schemas/BlueprintJob"
2269
+ }
2270
+ }
2271
+ }
2272
+ }
2273
+ }
2274
+ }
2275
+ }
2276
+ }
2277
+ }
2278
+ },
2279
+ "/v2/blueprint-manifest/jobs/{job_id}": {
2280
+ "get": {
2281
+ "operationId": "getBlueprintJob",
2282
+ "summary": "Get Job",
2283
+ "description": "Poll current state of a job.",
2284
+ "tags": [
2285
+ "Jobs"
2286
+ ],
2287
+ "parameters": [
2288
+ {
2289
+ "in": "path",
2290
+ "required": true,
2291
+ "name": "job_id",
2292
+ "schema": {
2293
+ "$ref": "#/components/schemas/BlueprintJobID"
2294
+ }
2295
+ }
2296
+ ],
2297
+ "responses": {
2298
+ "200": {
2299
+ "description": "Job status",
2300
+ "content": {
2301
+ "application/json": {
2302
+ "schema": {
2303
+ "$ref": "#/components/schemas/BlueprintJob"
2304
+ }
2305
+ }
2306
+ }
2307
+ }
2308
+ }
2309
+ }
2310
+ },
2311
+ "/v2/blueprint-manifest/jobs/{job_id}:continue": {
2312
+ "post": {
2313
+ "operationId": "continueInstallationJob",
2314
+ "summary": "Continue Installation Job",
2315
+ "description": "Continue an installation job if it is waiting for user action.",
2316
+ "tags": [
2317
+ "Jobs"
2318
+ ],
2319
+ "parameters": [
2320
+ {
2321
+ "in": "path",
2322
+ "required": true,
2323
+ "name": "job_id",
2324
+ "schema": {
2325
+ "$ref": "#/components/schemas/BlueprintJobID"
2326
+ }
2327
+ }
2328
+ ],
2329
+ "requestBody": {
2330
+ "required": false,
2331
+ "content": {
2332
+ "application/json": {
2333
+ "schema": {
2334
+ "$ref": "#/components/schemas/BlueprintInstallationJobOptions"
2335
+ }
2336
+ }
2337
+ }
2338
+ },
2339
+ "responses": {
2340
+ "200": {
2341
+ "description": "Blueprint installation job continued",
2342
+ "content": {
2343
+ "application/json": {
2344
+ "schema": {
2345
+ "$ref": "#/components/schemas/BlueprintInstallationJob"
2346
+ }
2347
+ }
2348
+ }
2349
+ }
2350
+ }
2351
+ }
2352
+ },
2353
+ "/v2/blueprint-manifest/jobs/{job_id}:cancel": {
2354
+ "post": {
2355
+ "operationId": "cancelBlueprintJob",
2356
+ "summary": "Cancel Blueprint Job",
2357
+ "description": "Cancel a blueprint job if it is still running.",
2358
+ "tags": [
2359
+ "Jobs"
2360
+ ],
2361
+ "parameters": [
2362
+ {
2363
+ "in": "path",
2364
+ "required": true,
2365
+ "name": "job_id",
2366
+ "schema": {
2367
+ "$ref": "#/components/schemas/BlueprintJobID"
2368
+ }
2369
+ }
2370
+ ],
2371
+ "responses": {
2372
+ "200": {
2373
+ "description": "Blueprint job cancelled",
2374
+ "content": {
2375
+ "application/json": {
2376
+ "schema": {
2377
+ "$ref": "#/components/schemas/BlueprintJob"
2378
+ }
2379
+ }
2380
+ }
2381
+ }
2382
+ }
2383
+ }
2384
+ },
2385
+ "/v1/blueprints/{blueprint_id}/marketplace-listing": {
2386
+ "post": {
2387
+ "operationId": "createMarketplaceListing",
2388
+ "summary": "createMarketplaceListing",
1982
2389
  "description": "Create a marketplace listing for a blueprint. Returns 409 if one already exists.",
1983
2390
  "tags": [
1984
2391
  "Marketplace Listings"
@@ -2468,12 +2875,27 @@
2468
2875
  "application/json": {
2469
2876
  "schema": {
2470
2877
  "type": "object",
2471
- "properties": {
2472
- "source_org_id": {
2473
- "type": "string"
2878
+ "oneOf": [
2879
+ {
2880
+ "required": [
2881
+ "source_org_id",
2882
+ "source_blueprint_id",
2883
+ "destination_org_id"
2884
+ ]
2474
2885
  },
2475
- "source_blueprint_id": {
2476
- "$ref": "#/components/schemas/BlueprintID"
2886
+ {
2887
+ "required": [
2888
+ "source_blueprint_file",
2889
+ "destination_org_id"
2890
+ ]
2891
+ }
2892
+ ],
2893
+ "properties": {
2894
+ "source_org_id": {
2895
+ "type": "string"
2896
+ },
2897
+ "source_blueprint_id": {
2898
+ "$ref": "#/components/schemas/BlueprintID"
2477
2899
  },
2478
2900
  "source_blueprint_file": {
2479
2901
  "type": "string",
@@ -2527,6 +2949,133 @@
2527
2949
  }
2528
2950
  }
2529
2951
  }
2952
+ },
2953
+ "400": {
2954
+ "description": "Missing required source or destination fields",
2955
+ "content": {
2956
+ "application/json": {
2957
+ "schema": {
2958
+ "type": "object",
2959
+ "properties": {
2960
+ "message": {
2961
+ "type": "string"
2962
+ }
2963
+ }
2964
+ }
2965
+ }
2966
+ }
2967
+ }
2968
+ }
2969
+ }
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."
2530
3079
  }
2531
3080
  }
2532
3081
  }
@@ -2573,10 +3122,184 @@
2573
3122
  }
2574
3123
  }
2575
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
+ }
2576
3248
  }
2577
3249
  },
2578
3250
  "components": {
2579
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
+ },
2580
3303
  "LineageEntry": {
2581
3304
  "type": "object",
2582
3305
  "properties": {
@@ -2597,19 +3320,190 @@
2597
3320
  "type": "string"
2598
3321
  }
2599
3322
  },
2600
- "fidelity": {
3323
+ "fidelity": {
3324
+ "type": "string",
3325
+ "enum": [
3326
+ "full",
3327
+ "partial"
3328
+ ]
3329
+ },
3330
+ "last_synced_at": {
3331
+ "type": "string",
3332
+ "format": "date-time"
3333
+ }
3334
+ }
3335
+ },
3336
+ "PatchFieldDiff": {
3337
+ "type": "object",
3338
+ "properties": {
3339
+ "path": {
3340
+ "type": "string"
3341
+ },
3342
+ "op": {
3343
+ "type": "string",
3344
+ "enum": [
3345
+ "changed",
3346
+ "added",
3347
+ "removed"
3348
+ ]
3349
+ },
3350
+ "baseline_value": {},
3351
+ "current_value": {}
3352
+ }
3353
+ },
3354
+ "PatchResourceDiff": {
3355
+ "type": "object",
3356
+ "properties": {
3357
+ "type": {
3358
+ "type": "string"
3359
+ },
3360
+ "source_id": {
3361
+ "type": "string"
3362
+ },
3363
+ "address": {
3364
+ "type": "string"
3365
+ },
3366
+ "name": {
3367
+ "type": "string"
3368
+ },
3369
+ "changes": {
3370
+ "type": "array",
3371
+ "items": {
3372
+ "$ref": "#/components/schemas/PatchFieldDiff"
3373
+ }
3374
+ }
3375
+ }
3376
+ },
3377
+ "DetectChangesResult": {
3378
+ "type": "object",
3379
+ "properties": {
3380
+ "resources": {
3381
+ "type": "array",
3382
+ "items": {
3383
+ "$ref": "#/components/schemas/PatchResourceDiff"
3384
+ }
3385
+ }
3386
+ }
3387
+ },
3388
+ "BlueprintPatch": {
3389
+ "type": "object",
3390
+ "properties": {
3391
+ "patch_id": {
3392
+ "type": "string"
3393
+ },
3394
+ "version": {
3395
+ "type": "integer"
3396
+ },
3397
+ "blueprint_id": {
3398
+ "$ref": "#/components/schemas/BlueprintID"
3399
+ },
3400
+ "rollout_id": {
3401
+ "type": "string"
3402
+ },
3403
+ "source_org_id": {
3404
+ "type": "string"
3405
+ },
3406
+ "name": {
3407
+ "type": "string"
3408
+ },
3409
+ "description": {
3410
+ "type": "string"
3411
+ },
3412
+ "status": {
3413
+ "type": "string",
3414
+ "enum": [
3415
+ "draft",
3416
+ "ready",
3417
+ "applying",
3418
+ "applied",
3419
+ "partial"
3420
+ ]
3421
+ },
3422
+ "resources": {
3423
+ "type": "array",
3424
+ "items": {
3425
+ "$ref": "#/components/schemas/PatchResourceDiff"
3426
+ }
3427
+ },
3428
+ "changelog": {
3429
+ "type": "string"
3430
+ },
3431
+ "created_by": {
3432
+ "type": "string"
3433
+ },
3434
+ "created_at": {
3435
+ "type": "string",
3436
+ "format": "date-time"
3437
+ },
3438
+ "applied_at": {
3439
+ "type": "string",
3440
+ "format": "date-time"
3441
+ }
3442
+ }
3443
+ },
3444
+ "OrgPatchExecution": {
3445
+ "type": "object",
3446
+ "properties": {
3447
+ "patch_id": {
3448
+ "type": "string"
3449
+ },
3450
+ "version": {
3451
+ "type": "integer"
3452
+ },
3453
+ "org_id": {
3454
+ "type": "string"
3455
+ },
3456
+ "org_name": {
3457
+ "type": "string"
3458
+ },
3459
+ "dest_blueprint_id": {
3460
+ "type": "string"
3461
+ },
3462
+ "status": {
2601
3463
  "type": "string",
2602
3464
  "enum": [
2603
- "full",
2604
- "partial"
3465
+ "pending",
3466
+ "in_progress",
3467
+ "success",
3468
+ "failed"
2605
3469
  ]
2606
3470
  },
2607
- "last_synced_at": {
3471
+ "error": {
3472
+ "type": "string"
3473
+ },
3474
+ "applied_at": {
2608
3475
  "type": "string",
2609
3476
  "format": "date-time"
3477
+ },
3478
+ "retries": {
3479
+ "type": "integer"
3480
+ },
3481
+ "changes_applied": {
3482
+ "type": "array",
3483
+ "items": {
3484
+ "$ref": "#/components/schemas/PatchFieldDiff"
3485
+ }
2610
3486
  }
2611
3487
  }
2612
3488
  },
3489
+ "BlueprintPatchWithResults": {
3490
+ "allOf": [
3491
+ {
3492
+ "$ref": "#/components/schemas/BlueprintPatch"
3493
+ },
3494
+ {
3495
+ "type": "object",
3496
+ "properties": {
3497
+ "org_results": {
3498
+ "type": "array",
3499
+ "items": {
3500
+ "$ref": "#/components/schemas/OrgPatchExecution"
3501
+ }
3502
+ }
3503
+ }
3504
+ }
3505
+ ]
3506
+ },
2613
3507
  "BlueprintID": {
2614
3508
  "type": "string",
2615
3509
  "description": "ID of a blueprint",
@@ -2667,6 +3561,10 @@
2667
3561
  "destination_blueprint_id": {
2668
3562
  "type": "string"
2669
3563
  },
3564
+ "job_id": {
3565
+ "type": "string",
3566
+ "description": "Blueprint installation job that created or updated this deployment record"
3567
+ },
2670
3568
  "triggered_at": {
2671
3569
  "type": "string",
2672
3570
  "format": "date-time"
@@ -2674,6 +3572,114 @@
2674
3572
  "note": {
2675
3573
  "type": "string",
2676
3574
  "description": "User-provided note about this synchronization"
3575
+ },
3576
+ "status": {
3577
+ "type": "string",
3578
+ "description": "Outcome of this deployment",
3579
+ "enum": [
3580
+ "IN_PROGRESS",
3581
+ "SUCCESS",
3582
+ "PARTIAL_SUCCESS",
3583
+ "FAILED"
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
+ ]
2677
3683
  }
2678
3684
  }
2679
3685
  }
@@ -2775,6 +3781,55 @@
2775
3781
  "title"
2776
3782
  ]
2777
3783
  },
3784
+ "SuggestBlueprintResourcesRequest": {
3785
+ "type": "object",
3786
+ "required": [
3787
+ "prompt"
3788
+ ],
3789
+ "properties": {
3790
+ "prompt": {
3791
+ "type": "string",
3792
+ "description": "Natural-language description of what to include.",
3793
+ "example": "everything for the hausanschluss use case"
3794
+ },
3795
+ "blueprint_id": {
3796
+ "allOf": [
3797
+ {
3798
+ "$ref": "#/components/schemas/BlueprintID"
3799
+ }
3800
+ ],
3801
+ "description": "When provided, suggestions are scoped as additions to this existing\nblueprint — resources already in it are excluded from the response.\n"
3802
+ }
3803
+ }
3804
+ },
3805
+ "SuggestBlueprintResourcesResponse": {
3806
+ "type": "object",
3807
+ "required": [
3808
+ "resources"
3809
+ ],
3810
+ "properties": {
3811
+ "resources": {
3812
+ "type": "array",
3813
+ "description": "Suggested resources to add. All marked is_root so the caller can request transitive dependency resolution.",
3814
+ "items": {
3815
+ "$ref": "#/components/schemas/BlueprintResource"
3816
+ }
3817
+ },
3818
+ "suggested_blueprint_name": {
3819
+ "type": "string",
3820
+ "description": "Short title derived from the prompt. Useful when the caller is\ncreating a new blueprint as a result of the suggestion — saves the\nuser from naming it themselves.\n",
3821
+ "example": "Hausanschluss"
3822
+ },
3823
+ "explanation": {
3824
+ "type": "string",
3825
+ "description": "Short human-readable summary of what was matched and why."
3826
+ },
3827
+ "add_dependencies_recommended": {
3828
+ "type": "boolean",
3829
+ "description": "Hint to the caller: persist via bulkAddBlueprintResources with\n?add_dependencies=true so anchor resources (journeys, workflows)\npull their transitive dependencies.\n"
3830
+ }
3831
+ }
3832
+ },
2778
3833
  "BlueprintResource": {
2779
3834
  "type": "object",
2780
3835
  "properties": {
@@ -3217,6 +4272,12 @@
3217
4272
  {
3218
4273
  "type": "object",
3219
4274
  "properties": {
4275
+ "job_type": {
4276
+ "type": "string",
4277
+ "enum": [
4278
+ "export"
4279
+ ]
4280
+ },
3220
4281
  "blueprint_id": {
3221
4282
  "$ref": "#/components/schemas/BlueprintID"
3222
4283
  },
@@ -3244,6 +4305,12 @@
3244
4305
  {
3245
4306
  "type": "object",
3246
4307
  "properties": {
4308
+ "job_type": {
4309
+ "type": "string",
4310
+ "enum": [
4311
+ "install"
4312
+ ]
4313
+ },
3247
4314
  "source_blueprint_id": {
3248
4315
  "$ref": "#/components/schemas/BlueprintID"
3249
4316
  },
@@ -3273,6 +4340,21 @@
3273
4340
  "type": "string",
3274
4341
  "description": "Blueprint slug for marketplace blueprints"
3275
4342
  },
4343
+ "sync_engine": {
4344
+ "type": "string",
4345
+ "enum": [
4346
+ "terraform",
4347
+ "v3"
4348
+ ],
4349
+ "description": "Engine used for this install job"
4350
+ },
4351
+ "resource_progress": {
4352
+ "type": "array",
4353
+ "description": "Per-resource live status. Populated only for V3 installs.",
4354
+ "items": {
4355
+ "$ref": "#/components/schemas/V3ResourceProgressEntry"
4356
+ }
4357
+ },
3276
4358
  "status": {
3277
4359
  "type": "string",
3278
4360
  "enum": [
@@ -3288,6 +4370,181 @@
3288
4370
  }
3289
4371
  ]
3290
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
+ },
4431
+ "V3ResourceProgressEntry": {
4432
+ "type": "object",
4433
+ "required": [
4434
+ "lineage_id",
4435
+ "type",
4436
+ "address",
4437
+ "status"
4438
+ ],
4439
+ "properties": {
4440
+ "lineage_id": {
4441
+ "type": "string"
4442
+ },
4443
+ "type": {
4444
+ "type": "string"
4445
+ },
4446
+ "address": {
4447
+ "type": "string"
4448
+ },
4449
+ "name": {
4450
+ "type": "string"
4451
+ },
4452
+ "status": {
4453
+ "type": "string",
4454
+ "enum": [
4455
+ "pending",
4456
+ "in_progress",
4457
+ "done",
4458
+ "failed",
4459
+ "skipped"
4460
+ ]
4461
+ },
4462
+ "target_id": {
4463
+ "type": "string"
4464
+ },
4465
+ "error_message": {
4466
+ "type": "string"
4467
+ }
4468
+ }
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
+ },
3291
4548
  "BlueprintJob": {
3292
4549
  "oneOf": [
3293
4550
  {
@@ -3296,6 +4553,9 @@
3296
4553
  {
3297
4554
  "$ref": "#/components/schemas/BlueprintInstallationJob"
3298
4555
  },
4556
+ {
4557
+ "$ref": "#/components/schemas/BlueprintRestoreJob"
4558
+ },
3299
4559
  {
3300
4560
  "$ref": "#/components/schemas/BlueprintDependenciesSyncJob"
3301
4561
  },
@@ -3305,7 +4565,18 @@
3305
4565
  {
3306
4566
  "$ref": "#/components/schemas/BlueprintVerificationJob"
3307
4567
  }
3308
- ]
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
+ }
3309
4580
  },
3310
4581
  "BlueprintDependenciesSyncJob": {
3311
4582
  "allOf": [
@@ -3315,6 +4586,12 @@
3315
4586
  {
3316
4587
  "type": "object",
3317
4588
  "properties": {
4589
+ "job_type": {
4590
+ "type": "string",
4591
+ "enum": [
4592
+ "dependencies_sync"
4593
+ ]
4594
+ },
3318
4595
  "blueprint_id": {
3319
4596
  "$ref": "#/components/schemas/BlueprintID"
3320
4597
  },
@@ -3339,6 +4616,12 @@
3339
4616
  {
3340
4617
  "type": "object",
3341
4618
  "properties": {
4619
+ "job_type": {
4620
+ "type": "string",
4621
+ "enum": [
4622
+ "validate"
4623
+ ]
4624
+ },
3342
4625
  "blueprint_id": {
3343
4626
  "$ref": "#/components/schemas/BlueprintID"
3344
4627
  },
@@ -3373,6 +4656,12 @@
3373
4656
  {
3374
4657
  "type": "object",
3375
4658
  "properties": {
4659
+ "job_type": {
4660
+ "type": "string",
4661
+ "enum": [
4662
+ "verification"
4663
+ ]
4664
+ },
3376
4665
  "source_org_id": {
3377
4666
  "type": "string"
3378
4667
  },
@@ -3390,6 +4679,7 @@
3390
4679
  "enum": [
3391
4680
  "IN_PROGRESS",
3392
4681
  "SUCCESS",
4682
+ "PARTIAL_SUCCESS",
3393
4683
  "FAILED"
3394
4684
  ]
3395
4685
  },
@@ -3421,6 +4711,7 @@
3421
4711
  "enum": [
3422
4712
  "IN_PROGRESS",
3423
4713
  "SUCCESS",
4714
+ "PARTIAL_SUCCESS",
3424
4715
  "FAILED"
3425
4716
  ]
3426
4717
  },
@@ -3689,7 +4980,10 @@
3689
4980
  "flow_template",
3690
4981
  "taxonomy",
3691
4982
  "notification_template",
3692
- "environment_variable"
4983
+ "environment_variable",
4984
+ "datasource",
4985
+ "family",
4986
+ "permission"
3693
4987
  ]
3694
4988
  },
3695
4989
  "PlanChanges": {