@epilot/sdk 2.19.3 → 2.19.4

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 (222) hide show
  1. package/definitions/access-token-runtime.json +1 -0
  2. package/definitions/access-token.json +835 -0
  3. package/definitions/address-runtime.json +1 -0
  4. package/definitions/address-suggestions-runtime.json +1 -0
  5. package/definitions/address-suggestions.json +582 -0
  6. package/definitions/address.json +578 -0
  7. package/definitions/ai-agents-runtime.json +1 -0
  8. package/definitions/ai-agents.json +2863 -0
  9. package/definitions/app-runtime.json +1 -0
  10. package/definitions/app.json +5743 -0
  11. package/definitions/audit-logs-runtime.json +1 -0
  12. package/definitions/audit-logs.json +305 -0
  13. package/definitions/automation-runtime.json +1 -0
  14. package/definitions/automation.json +5557 -0
  15. package/definitions/billing-runtime.json +1 -0
  16. package/definitions/billing.json +2386 -0
  17. package/definitions/blueprint-manifest-runtime.json +1 -0
  18. package/definitions/blueprint-manifest.json +7718 -0
  19. package/definitions/calendar-runtime.json +1 -0
  20. package/definitions/calendar.json +2904 -0
  21. package/definitions/configuration-hub-runtime.json +1 -0
  22. package/definitions/configuration-hub.json +2250 -0
  23. package/definitions/consent-runtime.json +1 -0
  24. package/definitions/consent.json +344 -0
  25. package/definitions/customer-portal-runtime.json +1 -0
  26. package/definitions/customer-portal.json +19919 -0
  27. package/definitions/dashboard-runtime.json +1 -0
  28. package/definitions/dashboard.json +1355 -0
  29. package/definitions/data-governance-runtime.json +1 -0
  30. package/definitions/data-governance.json +1126 -0
  31. package/definitions/deduplication-runtime.json +1 -0
  32. package/definitions/deduplication.json +782 -0
  33. package/definitions/design-runtime.json +1 -0
  34. package/definitions/design.json +1827 -0
  35. package/definitions/document-runtime.json +1 -0
  36. package/definitions/document.json +758 -0
  37. package/definitions/email-settings-runtime.json +1 -0
  38. package/definitions/email-settings.json +3736 -0
  39. package/definitions/email-template-runtime.json +1 -0
  40. package/definitions/email-template.json +1441 -0
  41. package/definitions/entity-mapping-runtime.json +1 -0
  42. package/definitions/entity-mapping.json +1642 -0
  43. package/definitions/entity-runtime.json +1 -0
  44. package/definitions/entity.json +11517 -0
  45. package/definitions/environments-runtime.json +1 -0
  46. package/definitions/environments.json +539 -0
  47. package/definitions/event-catalog-runtime.json +1 -0
  48. package/definitions/event-catalog.json +1524 -0
  49. package/definitions/file-runtime.json +1 -0
  50. package/definitions/file.json +3905 -0
  51. package/definitions/iban-runtime.json +1 -0
  52. package/definitions/iban.json +132 -0
  53. package/definitions/integration-toolkit-runtime.json +1 -0
  54. package/definitions/integration-toolkit.json +12769 -0
  55. package/definitions/journey-runtime.json +1 -0
  56. package/definitions/journey.json +2640 -0
  57. package/definitions/kanban-runtime.json +1 -0
  58. package/definitions/kanban.json +1506 -0
  59. package/definitions/message-runtime.json +1 -0
  60. package/definitions/message.json +3667 -0
  61. package/definitions/metering-runtime.json +1 -0
  62. package/definitions/metering.json +3132 -0
  63. package/definitions/notes-runtime.json +1 -0
  64. package/definitions/notes.json +1698 -0
  65. package/definitions/notification-runtime.json +1 -0
  66. package/definitions/notification.json +1439 -0
  67. package/definitions/organization-runtime.json +1 -0
  68. package/definitions/organization.json +1192 -0
  69. package/definitions/partner-directory-runtime.json +1 -0
  70. package/definitions/partner-directory.json +2284 -0
  71. package/definitions/permissions-runtime.json +1 -0
  72. package/definitions/permissions.json +1598 -0
  73. package/definitions/pricing-runtime.json +1 -0
  74. package/definitions/pricing-tier-runtime.json +1 -0
  75. package/definitions/pricing-tier.json +105 -0
  76. package/definitions/pricing.json +11569 -0
  77. package/definitions/purpose-runtime.json +1 -0
  78. package/definitions/purpose.json +524 -0
  79. package/definitions/query-runtime.json +1 -0
  80. package/definitions/query.json +3178 -0
  81. package/definitions/sandbox-runtime.json +1 -0
  82. package/definitions/sandbox.json +453 -0
  83. package/definitions/sharing-runtime.json +1 -0
  84. package/definitions/sharing.json +956 -0
  85. package/definitions/snapshot-runtime.json +1 -0
  86. package/definitions/snapshot.json +1103 -0
  87. package/definitions/submission-runtime.json +1 -0
  88. package/definitions/submission.json +313 -0
  89. package/definitions/targeting-runtime.json +1 -0
  90. package/definitions/targeting.json +2222 -0
  91. package/definitions/template-variables-runtime.json +1 -0
  92. package/definitions/template-variables.json +1416 -0
  93. package/definitions/user-runtime.json +1 -0
  94. package/definitions/user.json +3051 -0
  95. package/definitions/validation-rules-runtime.json +1 -0
  96. package/definitions/validation-rules.json +2365 -0
  97. package/definitions/webhooks-runtime.json +1 -0
  98. package/definitions/webhooks.json +1875 -0
  99. package/definitions/workflow-definition-runtime.json +1 -0
  100. package/definitions/workflow-definition.json +3592 -0
  101. package/definitions/workflow-runtime.json +1 -0
  102. package/definitions/workflow.json +4669 -0
  103. package/dist/apis/access-token.cjs +6 -6
  104. package/dist/apis/access-token.js +1 -1
  105. package/dist/apis/address-suggestions.cjs +6 -6
  106. package/dist/apis/address-suggestions.js +1 -1
  107. package/dist/apis/address.cjs +6 -6
  108. package/dist/apis/address.js +1 -1
  109. package/dist/apis/ai-agents.cjs +6 -6
  110. package/dist/apis/ai-agents.js +1 -1
  111. package/dist/apis/app.cjs +6 -6
  112. package/dist/apis/app.js +1 -1
  113. package/dist/apis/audit-logs.cjs +6 -6
  114. package/dist/apis/audit-logs.js +1 -1
  115. package/dist/apis/automation.cjs +6 -6
  116. package/dist/apis/automation.js +1 -1
  117. package/dist/apis/billing.cjs +6 -6
  118. package/dist/apis/billing.js +1 -1
  119. package/dist/apis/blueprint-manifest.cjs +6 -6
  120. package/dist/apis/blueprint-manifest.js +1 -1
  121. package/dist/apis/calendar.cjs +6 -6
  122. package/dist/apis/calendar.js +1 -1
  123. package/dist/apis/configuration-hub.cjs +6 -6
  124. package/dist/apis/configuration-hub.js +1 -1
  125. package/dist/apis/consent.cjs +6 -6
  126. package/dist/apis/consent.js +1 -1
  127. package/dist/apis/customer-portal.cjs +6 -6
  128. package/dist/apis/customer-portal.js +1 -1
  129. package/dist/apis/dashboard.cjs +6 -6
  130. package/dist/apis/dashboard.js +1 -1
  131. package/dist/apis/data-governance.cjs +6 -6
  132. package/dist/apis/data-governance.js +1 -1
  133. package/dist/apis/deduplication.cjs +6 -6
  134. package/dist/apis/deduplication.js +1 -1
  135. package/dist/apis/design.cjs +6 -6
  136. package/dist/apis/design.js +1 -1
  137. package/dist/apis/document.cjs +6 -6
  138. package/dist/apis/document.js +1 -1
  139. package/dist/apis/email-settings.cjs +6 -6
  140. package/dist/apis/email-settings.js +1 -1
  141. package/dist/apis/email-template.cjs +6 -6
  142. package/dist/apis/email-template.js +1 -1
  143. package/dist/apis/entity-mapping.cjs +6 -6
  144. package/dist/apis/entity-mapping.js +1 -1
  145. package/dist/apis/entity.cjs +6 -6
  146. package/dist/apis/entity.js +1 -1
  147. package/dist/apis/environments.cjs +6 -6
  148. package/dist/apis/environments.js +1 -1
  149. package/dist/apis/event-catalog.cjs +6 -6
  150. package/dist/apis/event-catalog.js +1 -1
  151. package/dist/apis/file.cjs +6 -6
  152. package/dist/apis/file.js +1 -1
  153. package/dist/apis/iban.cjs +6 -6
  154. package/dist/apis/iban.js +1 -1
  155. package/dist/apis/integration-toolkit.cjs +6 -6
  156. package/dist/apis/integration-toolkit.js +1 -1
  157. package/dist/apis/journey.cjs +6 -6
  158. package/dist/apis/journey.js +1 -1
  159. package/dist/apis/kanban.cjs +6 -6
  160. package/dist/apis/kanban.js +1 -1
  161. package/dist/apis/message.cjs +6 -6
  162. package/dist/apis/message.js +1 -1
  163. package/dist/apis/metering.cjs +6 -6
  164. package/dist/apis/metering.js +1 -1
  165. package/dist/apis/notes.cjs +6 -6
  166. package/dist/apis/notes.js +1 -1
  167. package/dist/apis/notification.cjs +6 -6
  168. package/dist/apis/notification.js +1 -1
  169. package/dist/apis/organization.cjs +6 -6
  170. package/dist/apis/organization.js +1 -1
  171. package/dist/apis/partner-directory.cjs +6 -6
  172. package/dist/apis/partner-directory.js +1 -1
  173. package/dist/apis/permissions.cjs +6 -6
  174. package/dist/apis/permissions.js +1 -1
  175. package/dist/apis/pricing-tier.cjs +6 -6
  176. package/dist/apis/pricing-tier.js +1 -1
  177. package/dist/apis/pricing.cjs +6 -6
  178. package/dist/apis/pricing.js +1 -1
  179. package/dist/apis/purpose.cjs +6 -6
  180. package/dist/apis/purpose.js +1 -1
  181. package/dist/apis/query.cjs +6 -6
  182. package/dist/apis/query.js +1 -1
  183. package/dist/apis/sandbox.cjs +6 -6
  184. package/dist/apis/sandbox.js +1 -1
  185. package/dist/apis/sharing.cjs +6 -6
  186. package/dist/apis/sharing.js +1 -1
  187. package/dist/apis/snapshot.cjs +6 -6
  188. package/dist/apis/snapshot.js +1 -1
  189. package/dist/apis/submission.cjs +6 -6
  190. package/dist/apis/submission.js +1 -1
  191. package/dist/apis/target.cjs +6 -6
  192. package/dist/apis/target.js +1 -1
  193. package/dist/apis/targeting.cjs +6 -6
  194. package/dist/apis/targeting.d.cts +2 -2
  195. package/dist/apis/targeting.d.ts +2 -2
  196. package/dist/apis/targeting.js +1 -1
  197. package/dist/apis/template-variables.cjs +6 -6
  198. package/dist/apis/template-variables.js +1 -1
  199. package/dist/apis/user.cjs +6 -6
  200. package/dist/apis/user.js +1 -1
  201. package/dist/apis/validation-rules.cjs +6 -6
  202. package/dist/apis/validation-rules.js +1 -1
  203. package/dist/apis/webhooks.cjs +6 -6
  204. package/dist/apis/webhooks.js +1 -1
  205. package/dist/apis/workflow-definition.cjs +6 -6
  206. package/dist/apis/workflow-definition.js +1 -1
  207. package/dist/apis/workflow.cjs +6 -6
  208. package/dist/apis/workflow.js +1 -1
  209. package/dist/{chunk-QWWGJOYR.cjs → chunk-AD5FK5LK.cjs} +1 -1
  210. package/dist/{chunk-UC3IKFHD.js → chunk-PHOP6DMJ.js} +1 -1
  211. package/dist/index.cjs +8 -8
  212. package/dist/index.d.cts +1 -1
  213. package/dist/index.d.ts +1 -1
  214. package/dist/index.js +1 -1
  215. package/dist/targeting-5U4XGOXY.cjs +7 -0
  216. package/dist/targeting-R3G32HI4.js +7 -0
  217. package/dist/{targeting.d-16SvPyj4.d.cts → targeting.d-KcawmWBB.d.cts} +8 -0
  218. package/dist/{targeting.d-16SvPyj4.d.ts → targeting.d-KcawmWBB.d.ts} +8 -0
  219. package/docs/targeting.md +9 -1
  220. package/package.json +1 -1
  221. package/dist/targeting-BTVCLYFW.cjs +0 -7
  222. package/dist/targeting-NWYDE3E7.js +0 -7
@@ -0,0 +1,2250 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Configuration Hub API",
5
+ "description": "Lightweight index API for exploring epilot organization configurations.\n\nProvides a unified tree view across all config types. Returns summary metadata only —\nthe frontend calls individual epilot APIs directly (via @epilot/sdk) for full config payloads.\n\n## Source APIs per resource type\n\nEach resource type maps to a specific epilot API. The frontend should use the corresponding\n@epilot/sdk client to fetch full config details (e.g., for the side panel JSON view).\n\n| Resource Type | Source API | SDK Client |\n|---|---|---|\n| `journey` | journey.sls.epilot.io | `@epilot/sdk/journey` |\n| `automation_flow` | automation.sls.epilot.io | `@epilot/sdk/automation` |\n| `workflow_definition` | workflow-definition.sls.epilot.io | `@epilot/sdk/workflow-definition` |\n| `closing_reason` | workflow-definition.sls.epilot.io | `@epilot/sdk/workflow-definition` |\n| `flow_template` | workflow-definition.sls.epilot.io | `@epilot/sdk/workflow-definition` |\n| `schema` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `taxonomy` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `taxonomy_classification` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `emailtemplate` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `product` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `price` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `tax` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `coupon` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `file` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `document_template` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `webhook` | webhooks.sls.epilot.io | `@epilot/sdk/webhooks` |\n| `saved_view` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `dashboard` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `kanban` | kanban.sls.epilot.io | `@epilot/sdk/kanban` |\n| `role` | permissions.sls.epilot.io | `@epilot/sdk/permissions` |\n| `usergroup` | user.sls.epilot.io | `@epilot/sdk/user` |\n| `validation_rule` | entity.sls.epilot.io | `@epilot/sdk/validation-rules` |\n| `integration` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `app` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `designbuilder` | design-builder-api.sls.epilot.io | `@epilot/sdk/design` |\n| `notification_template` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `custom_variable` | entity.sls.epilot.io | `@epilot/sdk/template-variables` |\n| `environment_variable` | environments.sls.epilot.io | `@epilot/sdk/environments` |\n| `entity_mapping` | entity-mapping.sls.epilot.io | `@epilot/sdk/entity-mapping` |\n| `portal_config` | customer-portal.sls.epilot.io | `@epilot/sdk/customer-portal` |\n| `target` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `product_recommendation` | entity.sls.epilot.io | `@epilot/sdk/entity` |\n| `access_token` | access-token.sls.epilot.io | `@epilot/sdk/access-token` |\n",
6
+ "version": "0.2.0"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://configuration-hub.sls.epilot.io"
11
+ },
12
+ {
13
+ "url": "https://configuration-hub.dev.sls.epilot.io",
14
+ "description": "Dev"
15
+ }
16
+ ],
17
+ "security": [
18
+ {
19
+ "EpilotAuth": []
20
+ }
21
+ ],
22
+ "tags": [
23
+ {
24
+ "name": "Configs",
25
+ "description": "Configuration tree index"
26
+ },
27
+ {
28
+ "name": "Sync",
29
+ "description": "Cross-org configuration sync jobs"
30
+ },
31
+ {
32
+ "name": "Delete",
33
+ "description": "Bulk-delete jobs for configuration resources"
34
+ },
35
+ {
36
+ "name": "Compare",
37
+ "description": "Cross-org configuration comparison, match suggestions, and lineage operations"
38
+ }
39
+ ],
40
+ "paths": {
41
+ "/v1/configs/types": {
42
+ "get": {
43
+ "operationId": "listConfigTypes",
44
+ "summary": "listConfigTypes",
45
+ "description": "Returns the static list of available configuration types with display metadata.\nThis is a cheap call — no fan-out to downstream APIs. Returns all known types\nwith labels and icons. The frontend should then call `listConfigs` separately\nfor each type it wants to load.\n",
46
+ "tags": [
47
+ "Configs"
48
+ ],
49
+ "responses": {
50
+ "200": {
51
+ "description": "Available config types",
52
+ "content": {
53
+ "application/json": {
54
+ "schema": {
55
+ "type": "object",
56
+ "properties": {
57
+ "results": {
58
+ "type": "array",
59
+ "items": {
60
+ "$ref": "#/components/schemas/ConfigTypeInfo"
61
+ }
62
+ }
63
+ },
64
+ "required": [
65
+ "results"
66
+ ]
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "/v1/configs/{type}": {
75
+ "get": {
76
+ "operationId": "listConfigs",
77
+ "summary": "listConfigs",
78
+ "description": "List configs of a given type with pagination. Returns summary metadata only\n(not full payloads). The frontend calls this per type folder when expanding.\n\nSupports offset-based pagination via `from` and `size` parameters.\n",
79
+ "tags": [
80
+ "Configs"
81
+ ],
82
+ "parameters": [
83
+ {
84
+ "$ref": "#/components/parameters/ConfigType"
85
+ },
86
+ {
87
+ "$ref": "#/components/parameters/CursorParam"
88
+ },
89
+ {
90
+ "$ref": "#/components/parameters/SizeParam"
91
+ },
92
+ {
93
+ "name": "q",
94
+ "in": "query",
95
+ "description": "Search query to filter configs by name/title",
96
+ "schema": {
97
+ "type": "string"
98
+ }
99
+ },
100
+ {
101
+ "name": "updated_after",
102
+ "in": "query",
103
+ "description": "Filter configs updated after this date (ISO 8601)",
104
+ "schema": {
105
+ "type": "string",
106
+ "format": "date-time"
107
+ }
108
+ },
109
+ {
110
+ "name": "updated_before",
111
+ "in": "query",
112
+ "description": "Filter configs updated before this date (ISO 8601)",
113
+ "schema": {
114
+ "type": "string",
115
+ "format": "date-time"
116
+ }
117
+ },
118
+ {
119
+ "name": "purposes",
120
+ "in": "query",
121
+ "description": "Filter by purpose classification IDs (comma-separated)",
122
+ "schema": {
123
+ "type": "string"
124
+ }
125
+ },
126
+ {
127
+ "name": "blueprint_ids",
128
+ "in": "query",
129
+ "description": "Filter by installed-blueprint IDs (comma-separated). Only configs installed by one of the listed blueprints are returned.",
130
+ "schema": {
131
+ "type": "string"
132
+ }
133
+ },
134
+ {
135
+ "name": "sort",
136
+ "in": "query",
137
+ "description": "Sort order. `updated_at` (default) sorts by most recently modified.\n`usage` sorts by the type-specific usage metric descending\n(submissions for journeys, executions for automations, entities for schemas, etc.).\n`name` sorts alphabetically by title (A–Z, case-insensitive).\n",
138
+ "schema": {
139
+ "type": "string",
140
+ "enum": [
141
+ "updated_at",
142
+ "usage",
143
+ "name"
144
+ ],
145
+ "default": "updated_at"
146
+ }
147
+ },
148
+ {
149
+ "name": "active_only",
150
+ "in": "query",
151
+ "description": "If true, filter out configs that are explicitly inactive (active=false).\nConfigs with no `active` field are always included.\n",
152
+ "schema": {
153
+ "type": "boolean"
154
+ }
155
+ }
156
+ ],
157
+ "responses": {
158
+ "200": {
159
+ "description": "Paginated config list",
160
+ "content": {
161
+ "application/json": {
162
+ "schema": {
163
+ "$ref": "#/components/schemas/ConfigListResponse"
164
+ }
165
+ }
166
+ }
167
+ },
168
+ "400": {
169
+ "description": "Invalid config type",
170
+ "content": {
171
+ "application/json": {
172
+ "schema": {
173
+ "$ref": "#/components/schemas/ErrorResponse"
174
+ }
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "/v1/configs/{type}/{id}/dependencies": {
182
+ "get": {
183
+ "operationId": "getConfigDependencies",
184
+ "summary": "getConfigDependencies",
185
+ "description": "Get configs that are referenced by the given config.\nUsed to render children when expanding a config node in the tree.\n\nResolves dependencies by fetching the config payload server-side and scanning\nfor references (UUIDs, source IDs, slug-based references).\n",
186
+ "tags": [
187
+ "Configs"
188
+ ],
189
+ "parameters": [
190
+ {
191
+ "$ref": "#/components/parameters/ConfigType"
192
+ },
193
+ {
194
+ "$ref": "#/components/parameters/ConfigId"
195
+ },
196
+ {
197
+ "$ref": "#/components/parameters/CursorParam"
198
+ },
199
+ {
200
+ "$ref": "#/components/parameters/SizeParam"
201
+ }
202
+ ],
203
+ "responses": {
204
+ "200": {
205
+ "description": "Paginated list of referenced configs",
206
+ "content": {
207
+ "application/json": {
208
+ "schema": {
209
+ "$ref": "#/components/schemas/ConfigDependenciesResponse"
210
+ }
211
+ }
212
+ }
213
+ },
214
+ "404": {
215
+ "description": "Config not found",
216
+ "content": {
217
+ "application/json": {
218
+ "schema": {
219
+ "$ref": "#/components/schemas/ErrorResponse"
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
225
+ }
226
+ },
227
+ "/v1/configs/{type}/{id}/used_by": {
228
+ "get": {
229
+ "operationId": "getConfigUsedBy",
230
+ "summary": "getConfigUsedBy",
231
+ "description": "Get configs that reference the given config (reverse dependencies).\nScans the indexed config items for references to this config's ID or aliases.\n",
232
+ "tags": [
233
+ "Configs"
234
+ ],
235
+ "parameters": [
236
+ {
237
+ "$ref": "#/components/parameters/ConfigType"
238
+ },
239
+ {
240
+ "$ref": "#/components/parameters/ConfigId"
241
+ }
242
+ ],
243
+ "responses": {
244
+ "200": {
245
+ "description": "List of configs that reference this config",
246
+ "content": {
247
+ "application/json": {
248
+ "schema": {
249
+ "$ref": "#/components/schemas/ConfigDependenciesResponse"
250
+ }
251
+ }
252
+ }
253
+ }
254
+ }
255
+ }
256
+ },
257
+ "/v1/configs/index": {
258
+ "get": {
259
+ "operationId": "getIndex",
260
+ "summary": "getIndex",
261
+ "description": "Return the current index build state for the caller's organization.\nClients poll this to decide whether to show a \"building\" indicator\nand when to refetch data.\n",
262
+ "tags": [
263
+ "Configs"
264
+ ],
265
+ "responses": {
266
+ "200": {
267
+ "description": "Current index status",
268
+ "content": {
269
+ "application/json": {
270
+ "schema": {
271
+ "$ref": "#/components/schemas/IndexStatusResponse"
272
+ }
273
+ }
274
+ }
275
+ }
276
+ }
277
+ }
278
+ },
279
+ "/v1/configs/compare": {
280
+ "post": {
281
+ "operationId": "compareConfigs",
282
+ "summary": "compareConfigs",
283
+ "description": "Compare the caller org's configs of a single type against another\n(source) org, side by side. Rows are paired via the lineage registry in\nboth sync directions (caller imported from source, or source imported\nfrom caller); configs without a counterpart come back as `only_current`\nor `only_source`.\n\n`source_auth_token` must be a valid token for `source_org_id` — the\nfrontend mints one via the pipeline pairing, mirroring `createSyncJob`'s\n`target_auth_token`. The token is verified against `source_org_id`\nbefore any source-org data is read.\n\nPOST because the request carries a token; the operation reads only.\n",
284
+ "tags": [
285
+ "Compare"
286
+ ],
287
+ "requestBody": {
288
+ "required": true,
289
+ "content": {
290
+ "application/json": {
291
+ "schema": {
292
+ "$ref": "#/components/schemas/CompareRequest"
293
+ }
294
+ }
295
+ }
296
+ },
297
+ "responses": {
298
+ "200": {
299
+ "description": "Side-by-side comparison rows for the requested type",
300
+ "content": {
301
+ "application/json": {
302
+ "schema": {
303
+ "$ref": "#/components/schemas/CompareResponse"
304
+ }
305
+ }
306
+ }
307
+ },
308
+ "400": {
309
+ "description": "Unknown type or comparing an org with itself",
310
+ "content": {
311
+ "application/json": {
312
+ "schema": {
313
+ "$ref": "#/components/schemas/ErrorResponse"
314
+ }
315
+ }
316
+ }
317
+ },
318
+ "403": {
319
+ "description": "source_auth_token does not belong to source_org_id",
320
+ "content": {
321
+ "application/json": {
322
+ "schema": {
323
+ "$ref": "#/components/schemas/ErrorResponse"
324
+ }
325
+ }
326
+ }
327
+ }
328
+ }
329
+ }
330
+ },
331
+ "/v1/configs/compare/suggestions": {
332
+ "post": {
333
+ "operationId": "suggestMatches",
334
+ "summary": "suggestMatches",
335
+ "description": "Run the sync-grade heuristic match (`lookupByHeuristic` — name / slug /\nunique key) for a batch of source-org configs that have no lineage\nentry, and return candidate counterparts in the caller's org.\n\nSuggestions are ephemeral — nothing is persisted. The client offers\neach candidate to the user, and a confirmed pair is written via\n`confirmLineage`. Batches are capped at 25 ids; the client pages\nthrough unmatched rows across successive calls.\n",
336
+ "tags": [
337
+ "Compare"
338
+ ],
339
+ "requestBody": {
340
+ "required": true,
341
+ "content": {
342
+ "application/json": {
343
+ "schema": {
344
+ "$ref": "#/components/schemas/SuggestMatchesRequest"
345
+ }
346
+ }
347
+ }
348
+ },
349
+ "responses": {
350
+ "200": {
351
+ "description": "Heuristic match candidates per source id",
352
+ "content": {
353
+ "application/json": {
354
+ "schema": {
355
+ "$ref": "#/components/schemas/SuggestMatchesResponse"
356
+ }
357
+ }
358
+ }
359
+ },
360
+ "400": {
361
+ "description": "Unknown type or type without heuristic support",
362
+ "content": {
363
+ "application/json": {
364
+ "schema": {
365
+ "$ref": "#/components/schemas/ErrorResponse"
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ }
372
+ },
373
+ "/v1/configs/lineage": {
374
+ "post": {
375
+ "operationId": "confirmLineage",
376
+ "summary": "confirmLineage",
377
+ "description": "Persist a lineage entry pairing a source-org config with a config in\nthe caller's org — used to confirm a heuristic suggestion from the\nCompare view. Writes to the caller org's lineage partition (caller as\nsync target), so subsequent syncs PATCH the confirmed target instead of\ncreating a duplicate. Conflicts (an existing entry pointing at a\ndifferent target) return 409 so the client can refresh.\n",
378
+ "tags": [
379
+ "Compare"
380
+ ],
381
+ "requestBody": {
382
+ "required": true,
383
+ "content": {
384
+ "application/json": {
385
+ "schema": {
386
+ "$ref": "#/components/schemas/ConfirmLineageRequest"
387
+ }
388
+ }
389
+ }
390
+ },
391
+ "responses": {
392
+ "201": {
393
+ "description": "Lineage entry persisted",
394
+ "content": {
395
+ "application/json": {
396
+ "schema": {
397
+ "$ref": "#/components/schemas/LineageEntryResponse"
398
+ }
399
+ }
400
+ }
401
+ },
402
+ "400": {
403
+ "description": "Unknown type or target config not found in caller org",
404
+ "content": {
405
+ "application/json": {
406
+ "schema": {
407
+ "$ref": "#/components/schemas/ErrorResponse"
408
+ }
409
+ }
410
+ }
411
+ },
412
+ "409": {
413
+ "description": "A lineage entry for this source config already points at a different target",
414
+ "content": {
415
+ "application/json": {
416
+ "schema": {
417
+ "$ref": "#/components/schemas/ErrorResponse"
418
+ }
419
+ }
420
+ }
421
+ }
422
+ }
423
+ },
424
+ "delete": {
425
+ "operationId": "breakLineage",
426
+ "summary": "breakLineage",
427
+ "description": "Delete a lineage entry from the caller org's partition (caller as sync\ntarget), identified by `type` + `source_id`. Used to break a wrong or\nstale match from the Compare view. Note: a future sync can re-match the\nsame pair heuristically — the entry is deleted, not blocklisted. To\nbreak a match recorded in the OTHER direction, call this operation\nauthenticated as the other org (pipeline token).\n",
428
+ "tags": [
429
+ "Compare"
430
+ ],
431
+ "parameters": [
432
+ {
433
+ "name": "type",
434
+ "in": "query",
435
+ "required": true,
436
+ "description": "Configuration resource type of the lineage entry",
437
+ "schema": {
438
+ "$ref": "#/components/schemas/ResourceType"
439
+ }
440
+ },
441
+ {
442
+ "name": "source_id",
443
+ "in": "query",
444
+ "required": true,
445
+ "description": "Source-org config id the lineage entry is keyed by",
446
+ "schema": {
447
+ "type": "string"
448
+ }
449
+ }
450
+ ],
451
+ "responses": {
452
+ "200": {
453
+ "description": "Lineage entry deleted",
454
+ "content": {
455
+ "application/json": {
456
+ "schema": {
457
+ "$ref": "#/components/schemas/BreakLineageResponse"
458
+ }
459
+ }
460
+ }
461
+ },
462
+ "404": {
463
+ "description": "No lineage entry found for this type + source_id",
464
+ "content": {
465
+ "application/json": {
466
+ "schema": {
467
+ "$ref": "#/components/schemas/ErrorResponse"
468
+ }
469
+ }
470
+ }
471
+ }
472
+ }
473
+ }
474
+ },
475
+ "/v1/configs/sync-jobs": {
476
+ "post": {
477
+ "operationId": "createSyncJob",
478
+ "summary": "createSyncJob",
479
+ "description": "Create a new cross-org sync job. The job is enqueued for asynchronous execution\nby the worker Lambda; the response returns the persisted job header with status\n`pending`.\n\nSee `docs/sync/INTERFACES.md` for the locked request/response contract.\n",
480
+ "tags": [
481
+ "Sync"
482
+ ],
483
+ "requestBody": {
484
+ "required": true,
485
+ "content": {
486
+ "application/json": {
487
+ "schema": {
488
+ "$ref": "#/components/schemas/SyncJobRequest"
489
+ }
490
+ }
491
+ }
492
+ },
493
+ "responses": {
494
+ "201": {
495
+ "description": "Sync job accepted",
496
+ "content": {
497
+ "application/json": {
498
+ "schema": {
499
+ "$ref": "#/components/schemas/SyncJob"
500
+ }
501
+ }
502
+ }
503
+ },
504
+ "400": {
505
+ "description": "Invalid request body",
506
+ "content": {
507
+ "application/json": {
508
+ "schema": {
509
+ "$ref": "#/components/schemas/ErrorResponse"
510
+ }
511
+ }
512
+ }
513
+ }
514
+ }
515
+ },
516
+ "get": {
517
+ "operationId": "listSyncJobs",
518
+ "summary": "listSyncJobs",
519
+ "description": "List sync jobs scoped to the caller's organization, paginated with an opaque\ncursor. Defaults to most-recent first.\n",
520
+ "tags": [
521
+ "Sync"
522
+ ],
523
+ "parameters": [
524
+ {
525
+ "$ref": "#/components/parameters/CursorParam"
526
+ },
527
+ {
528
+ "$ref": "#/components/parameters/SizeParam"
529
+ },
530
+ {
531
+ "name": "status",
532
+ "in": "query",
533
+ "description": "Filter jobs by status",
534
+ "schema": {
535
+ "$ref": "#/components/schemas/SyncJobStatus"
536
+ }
537
+ }
538
+ ],
539
+ "responses": {
540
+ "200": {
541
+ "description": "Paginated sync jobs",
542
+ "content": {
543
+ "application/json": {
544
+ "schema": {
545
+ "$ref": "#/components/schemas/SyncJobListResponse"
546
+ }
547
+ }
548
+ }
549
+ }
550
+ }
551
+ }
552
+ },
553
+ "/v1/configs/sync-jobs/{id}": {
554
+ "get": {
555
+ "operationId": "getSyncJob",
556
+ "summary": "getSyncJob",
557
+ "description": "Fetch a single sync job by ID. Returns the job header, counts summary,\ncurrent phase pointer, and the latest activity events. Frontend polls this\nendpoint with a ramping interval.\n",
558
+ "tags": [
559
+ "Sync"
560
+ ],
561
+ "parameters": [
562
+ {
563
+ "$ref": "#/components/parameters/SyncJobId"
564
+ }
565
+ ],
566
+ "responses": {
567
+ "200": {
568
+ "description": "Sync job detail",
569
+ "content": {
570
+ "application/json": {
571
+ "schema": {
572
+ "$ref": "#/components/schemas/SyncJob"
573
+ }
574
+ }
575
+ }
576
+ },
577
+ "404": {
578
+ "description": "Sync job not found",
579
+ "content": {
580
+ "application/json": {
581
+ "schema": {
582
+ "$ref": "#/components/schemas/ErrorResponse"
583
+ }
584
+ }
585
+ }
586
+ }
587
+ }
588
+ }
589
+ },
590
+ "/v1/configs/sync-jobs/{id}/retry": {
591
+ "post": {
592
+ "operationId": "retrySyncJob",
593
+ "summary": "retrySyncJob",
594
+ "description": "Retry the unresolved resources from a prior sync job: `failed` rows, plus\nrows the original run left at `pending`/`in_progress` because it stopped\nearly. Creates a new job whose scope is that `(type, source_id)` set and\nenqueues it for execution. Optionally accepts inline payload overrides.\n",
595
+ "tags": [
596
+ "Sync"
597
+ ],
598
+ "parameters": [
599
+ {
600
+ "$ref": "#/components/parameters/SyncJobId"
601
+ }
602
+ ],
603
+ "requestBody": {
604
+ "required": false,
605
+ "content": {
606
+ "application/json": {
607
+ "schema": {
608
+ "$ref": "#/components/schemas/SyncJobRetryRequest"
609
+ }
610
+ }
611
+ }
612
+ },
613
+ "responses": {
614
+ "201": {
615
+ "description": "Retry job accepted",
616
+ "content": {
617
+ "application/json": {
618
+ "schema": {
619
+ "$ref": "#/components/schemas/SyncJob"
620
+ }
621
+ }
622
+ }
623
+ },
624
+ "404": {
625
+ "description": "Sync job not found",
626
+ "content": {
627
+ "application/json": {
628
+ "schema": {
629
+ "$ref": "#/components/schemas/ErrorResponse"
630
+ }
631
+ }
632
+ }
633
+ }
634
+ }
635
+ }
636
+ },
637
+ "/v1/configs/sync-jobs/{id}/cancel": {
638
+ "post": {
639
+ "operationId": "cancelSyncJob",
640
+ "summary": "cancelSyncJob",
641
+ "description": "Cancel a running sync job. Marks the job `cancelled` with a `finished_at`\nso it stops being reported as in-flight, and the worker stops at its next\nbatch boundary — phases re-read the job status and abort rather than\noverwrite a cancellation with their own outcome.\n\nResources already written to the target are NOT rolled back; cancelling\nstops further work. Jobs already in a terminal state are rejected with\n409.\n",
642
+ "tags": [
643
+ "Sync"
644
+ ],
645
+ "parameters": [
646
+ {
647
+ "$ref": "#/components/parameters/SyncJobId"
648
+ }
649
+ ],
650
+ "responses": {
651
+ "200": {
652
+ "description": "Job cancelled",
653
+ "content": {
654
+ "application/json": {
655
+ "schema": {
656
+ "$ref": "#/components/schemas/SyncJob"
657
+ }
658
+ }
659
+ }
660
+ },
661
+ "404": {
662
+ "description": "Sync job not found",
663
+ "content": {
664
+ "application/json": {
665
+ "schema": {
666
+ "$ref": "#/components/schemas/ErrorResponse"
667
+ }
668
+ }
669
+ }
670
+ },
671
+ "409": {
672
+ "description": "Job already finished",
673
+ "content": {
674
+ "application/json": {
675
+ "schema": {
676
+ "$ref": "#/components/schemas/ErrorResponse"
677
+ }
678
+ }
679
+ }
680
+ }
681
+ }
682
+ }
683
+ },
684
+ "/v1/configs/sync-jobs/{id}/resources": {
685
+ "get": {
686
+ "operationId": "listSyncJobResources",
687
+ "summary": "listSyncJobResources",
688
+ "description": "List the per-resource rows for a sync job. Supports filtering by status\n(e.g. `failed`) and cursor pagination. Used by the failures table and the\ndry-run plan view in the frontend.\n",
689
+ "tags": [
690
+ "Sync"
691
+ ],
692
+ "parameters": [
693
+ {
694
+ "$ref": "#/components/parameters/SyncJobId"
695
+ },
696
+ {
697
+ "$ref": "#/components/parameters/CursorParam"
698
+ },
699
+ {
700
+ "$ref": "#/components/parameters/SizeParam"
701
+ },
702
+ {
703
+ "name": "status",
704
+ "in": "query",
705
+ "description": "Filter resources by status",
706
+ "schema": {
707
+ "$ref": "#/components/schemas/SyncJobResourceStatus"
708
+ }
709
+ }
710
+ ],
711
+ "responses": {
712
+ "200": {
713
+ "description": "Paginated sync job resources",
714
+ "content": {
715
+ "application/json": {
716
+ "schema": {
717
+ "$ref": "#/components/schemas/SyncJobResourceListResponse"
718
+ }
719
+ }
720
+ }
721
+ },
722
+ "404": {
723
+ "description": "Sync job not found",
724
+ "content": {
725
+ "application/json": {
726
+ "schema": {
727
+ "$ref": "#/components/schemas/ErrorResponse"
728
+ }
729
+ }
730
+ }
731
+ }
732
+ }
733
+ }
734
+ },
735
+ "/v1/configs/delete-jobs": {
736
+ "post": {
737
+ "operationId": "createDeleteJob",
738
+ "summary": "createDeleteJob",
739
+ "description": "Create a bulk-delete job for the caller's organization. The selected\nresources are deleted asynchronously by a worker Lambda; the response\nreturns the persisted job header with status `pending`.\n\nRaw delete — no dependency checks are performed. On completion the\nworker auto-triggers an index rebuild so the config list reflects the\ndeletions.\n",
740
+ "tags": [
741
+ "Delete"
742
+ ],
743
+ "requestBody": {
744
+ "required": true,
745
+ "content": {
746
+ "application/json": {
747
+ "schema": {
748
+ "$ref": "#/components/schemas/DeleteJobRequest"
749
+ }
750
+ }
751
+ }
752
+ },
753
+ "responses": {
754
+ "201": {
755
+ "description": "Delete job accepted",
756
+ "content": {
757
+ "application/json": {
758
+ "schema": {
759
+ "$ref": "#/components/schemas/DeleteJob"
760
+ }
761
+ }
762
+ }
763
+ },
764
+ "400": {
765
+ "description": "Invalid request body",
766
+ "content": {
767
+ "application/json": {
768
+ "schema": {
769
+ "$ref": "#/components/schemas/ErrorResponse"
770
+ }
771
+ }
772
+ }
773
+ }
774
+ }
775
+ },
776
+ "get": {
777
+ "operationId": "listDeleteJobs",
778
+ "summary": "listDeleteJobs",
779
+ "description": "List bulk-delete jobs scoped to the caller's organization, paginated\nwith an opaque cursor. Most-recent first.\n",
780
+ "tags": [
781
+ "Delete"
782
+ ],
783
+ "parameters": [
784
+ {
785
+ "$ref": "#/components/parameters/CursorParam"
786
+ },
787
+ {
788
+ "$ref": "#/components/parameters/SizeParam"
789
+ }
790
+ ],
791
+ "responses": {
792
+ "200": {
793
+ "description": "Paginated delete jobs",
794
+ "content": {
795
+ "application/json": {
796
+ "schema": {
797
+ "$ref": "#/components/schemas/DeleteJobListResponse"
798
+ }
799
+ }
800
+ }
801
+ }
802
+ }
803
+ }
804
+ },
805
+ "/v1/configs/delete-jobs/{id}": {
806
+ "get": {
807
+ "operationId": "getDeleteJob",
808
+ "summary": "getDeleteJob",
809
+ "description": "Fetch a single bulk-delete job by ID. Returns the job header and counts\nsummary. Frontend polls this endpoint while the job runs.\n",
810
+ "tags": [
811
+ "Delete"
812
+ ],
813
+ "parameters": [
814
+ {
815
+ "$ref": "#/components/parameters/DeleteJobId"
816
+ }
817
+ ],
818
+ "responses": {
819
+ "200": {
820
+ "description": "Delete job detail",
821
+ "content": {
822
+ "application/json": {
823
+ "schema": {
824
+ "$ref": "#/components/schemas/DeleteJob"
825
+ }
826
+ }
827
+ }
828
+ },
829
+ "404": {
830
+ "description": "Delete job not found",
831
+ "content": {
832
+ "application/json": {
833
+ "schema": {
834
+ "$ref": "#/components/schemas/ErrorResponse"
835
+ }
836
+ }
837
+ }
838
+ }
839
+ }
840
+ }
841
+ },
842
+ "/v1/configs/delete-jobs/{id}/resources": {
843
+ "get": {
844
+ "operationId": "listDeleteJobResources",
845
+ "summary": "listDeleteJobResources",
846
+ "description": "List the per-resource rows for a delete job, cursor-paginated. Used by\nthe failures view in the frontend.\n",
847
+ "tags": [
848
+ "Delete"
849
+ ],
850
+ "parameters": [
851
+ {
852
+ "$ref": "#/components/parameters/DeleteJobId"
853
+ },
854
+ {
855
+ "$ref": "#/components/parameters/CursorParam"
856
+ },
857
+ {
858
+ "$ref": "#/components/parameters/SizeParam"
859
+ }
860
+ ],
861
+ "responses": {
862
+ "200": {
863
+ "description": "Paginated delete job resources",
864
+ "content": {
865
+ "application/json": {
866
+ "schema": {
867
+ "$ref": "#/components/schemas/DeleteJobResourceListResponse"
868
+ }
869
+ }
870
+ }
871
+ },
872
+ "404": {
873
+ "description": "Delete job not found",
874
+ "content": {
875
+ "application/json": {
876
+ "schema": {
877
+ "$ref": "#/components/schemas/ErrorResponse"
878
+ }
879
+ }
880
+ }
881
+ }
882
+ }
883
+ }
884
+ },
885
+ "/v1/configs/index:rebuild": {
886
+ "post": {
887
+ "operationId": "rebuildIndex",
888
+ "summary": "rebuildIndex",
889
+ "description": "Rebuild the configuration index for the caller's organization.\nFire-and-forget: invokes the async worker and returns immediately.\nA new rebuild will cancel any in-flight build (see `build_token`).\n",
890
+ "tags": [
891
+ "Configs"
892
+ ],
893
+ "responses": {
894
+ "200": {
895
+ "description": "Index build status",
896
+ "content": {
897
+ "application/json": {
898
+ "schema": {
899
+ "$ref": "#/components/schemas/IndexRebuildResponse"
900
+ }
901
+ }
902
+ }
903
+ }
904
+ }
905
+ }
906
+ },
907
+ "/v1/configs/inventory": {
908
+ "get": {
909
+ "operationId": "getConfigInventory",
910
+ "summary": "getConfigInventory",
911
+ "description": "Returns a fresh inventory of an org's configuration resources — `{ type, id }` identities only,\nno full payloads. Calls every adapter's `list()` live (bypasses the 7-day DynamoDB index).\nIntended for snapshot-api to consume when taking a full-org snapshot.\n",
912
+ "tags": [
913
+ "Configs"
914
+ ],
915
+ "parameters": [
916
+ {
917
+ "name": "include_dependency_only",
918
+ "in": "query",
919
+ "description": "When true (default), include dependency-only types (e.g. `entity_mapping`)\nin the inventory in addition to the top-level registered types.\n",
920
+ "schema": {
921
+ "type": "boolean",
922
+ "default": true
923
+ }
924
+ }
925
+ ],
926
+ "responses": {
927
+ "200": {
928
+ "description": "Fresh inventory of all org configuration resources",
929
+ "content": {
930
+ "application/json": {
931
+ "schema": {
932
+ "$ref": "#/components/schemas/ConfigInventoryResponse"
933
+ }
934
+ }
935
+ }
936
+ }
937
+ }
938
+ }
939
+ }
940
+ },
941
+ "components": {
942
+ "securitySchemes": {
943
+ "EpilotAuth": {
944
+ "type": "http",
945
+ "scheme": "bearer",
946
+ "description": "epilot JWT auth token"
947
+ }
948
+ },
949
+ "parameters": {
950
+ "ConfigType": {
951
+ "name": "type",
952
+ "in": "path",
953
+ "required": true,
954
+ "description": "Configuration resource type",
955
+ "schema": {
956
+ "$ref": "#/components/schemas/ResourceType"
957
+ }
958
+ },
959
+ "ConfigId": {
960
+ "name": "id",
961
+ "in": "path",
962
+ "required": true,
963
+ "description": "Configuration resource ID",
964
+ "schema": {
965
+ "type": "string"
966
+ }
967
+ },
968
+ "CursorParam": {
969
+ "name": "cursor",
970
+ "in": "query",
971
+ "description": "Opaque cursor for fetching the next page. Omit for the first page.",
972
+ "schema": {
973
+ "type": "string"
974
+ }
975
+ },
976
+ "SizeParam": {
977
+ "name": "size",
978
+ "in": "query",
979
+ "description": "Number of items per page",
980
+ "schema": {
981
+ "type": "integer",
982
+ "default": 25,
983
+ "minimum": 1,
984
+ "maximum": 100
985
+ }
986
+ },
987
+ "SyncJobId": {
988
+ "name": "id",
989
+ "in": "path",
990
+ "required": true,
991
+ "description": "Sync job ID",
992
+ "schema": {
993
+ "type": "string"
994
+ }
995
+ },
996
+ "DeleteJobId": {
997
+ "name": "id",
998
+ "in": "path",
999
+ "required": true,
1000
+ "description": "Delete job ID",
1001
+ "schema": {
1002
+ "type": "string"
1003
+ }
1004
+ }
1005
+ },
1006
+ "schemas": {
1007
+ "ResourceType": {
1008
+ "type": "string",
1009
+ "description": "Configuration resource type identifier.\nMatches blueprint-manifest-api V3 naming conventions.\n",
1010
+ "enum": [
1011
+ "journey",
1012
+ "automation_flow",
1013
+ "workflow_definition",
1014
+ "closing_reason",
1015
+ "flow_template",
1016
+ "schema",
1017
+ "emailtemplate",
1018
+ "product",
1019
+ "price",
1020
+ "tax",
1021
+ "coupon",
1022
+ "file",
1023
+ "document_template",
1024
+ "webhook",
1025
+ "saved_view",
1026
+ "dashboard",
1027
+ "kanban",
1028
+ "role",
1029
+ "usergroup",
1030
+ "validation_rule",
1031
+ "integration",
1032
+ "app",
1033
+ "designbuilder",
1034
+ "notification_template",
1035
+ "custom_variable",
1036
+ "environment_variable",
1037
+ "taxonomy",
1038
+ "taxonomy_classification",
1039
+ "entity_mapping",
1040
+ "portal_config",
1041
+ "target",
1042
+ "product_recommendation",
1043
+ "access_token"
1044
+ ]
1045
+ },
1046
+ "ConfigTypeInfo": {
1047
+ "type": "object",
1048
+ "description": "Static metadata for a config type folder in the tree.\nNo downstream API calls — just type + label + icon + source API info.\n",
1049
+ "properties": {
1050
+ "type": {
1051
+ "$ref": "#/components/schemas/ResourceType"
1052
+ },
1053
+ "label": {
1054
+ "type": "string",
1055
+ "description": "Display label",
1056
+ "example": "Journeys"
1057
+ },
1058
+ "icon": {
1059
+ "type": "string",
1060
+ "description": "Frontend icon name",
1061
+ "example": "Route"
1062
+ },
1063
+ "source_api": {
1064
+ "type": "string",
1065
+ "description": "Base URL of the epilot API that owns this resource type",
1066
+ "example": "https://journey.sls.epilot.io"
1067
+ },
1068
+ "sdk_client": {
1069
+ "type": "string",
1070
+ "description": "@epilot/sdk subpath for fetching full config payloads",
1071
+ "example": "@epilot/sdk/journey"
1072
+ },
1073
+ "deletable": {
1074
+ "type": "boolean",
1075
+ "description": "Whether resources of this type can be deleted via the bulk-delete API",
1076
+ "example": true
1077
+ }
1078
+ },
1079
+ "required": [
1080
+ "type",
1081
+ "label",
1082
+ "icon",
1083
+ "source_api",
1084
+ "sdk_client",
1085
+ "deletable"
1086
+ ]
1087
+ },
1088
+ "ConfigNode": {
1089
+ "type": "object",
1090
+ "description": "Summary metadata for a single configuration item in the tree",
1091
+ "properties": {
1092
+ "type": {
1093
+ "$ref": "#/components/schemas/ResourceType"
1094
+ },
1095
+ "id": {
1096
+ "type": "string",
1097
+ "description": "Unique identifier"
1098
+ },
1099
+ "title": {
1100
+ "type": "string",
1101
+ "description": "Display name"
1102
+ },
1103
+ "updated_at": {
1104
+ "type": "string",
1105
+ "format": "date-time",
1106
+ "description": "Last modified timestamp"
1107
+ },
1108
+ "updated_by": {
1109
+ "type": "string",
1110
+ "description": "User who last modified this config"
1111
+ },
1112
+ "tags": {
1113
+ "type": "array",
1114
+ "items": {
1115
+ "type": "string"
1116
+ },
1117
+ "description": "Tags / labels"
1118
+ },
1119
+ "aliases": {
1120
+ "type": "array",
1121
+ "items": {
1122
+ "type": "string"
1123
+ },
1124
+ "description": "Alternative identifiers (short IDs, slugs, variable keys) used in cross-references"
1125
+ },
1126
+ "purposes": {
1127
+ "type": "array",
1128
+ "items": {
1129
+ "type": "string"
1130
+ },
1131
+ "description": "Business purposes"
1132
+ },
1133
+ "link": {
1134
+ "type": "string",
1135
+ "format": "uri",
1136
+ "description": "Direct link to open this config in epilot"
1137
+ },
1138
+ "active": {
1139
+ "type": "boolean",
1140
+ "description": "Whether this config is currently active/enabled (omitted when not applicable)"
1141
+ },
1142
+ "blueprints": {
1143
+ "type": "array",
1144
+ "description": "Installed blueprints that produced this config (tagged during the rebuild lineage pass)",
1145
+ "items": {
1146
+ "type": "object",
1147
+ "properties": {
1148
+ "id": {
1149
+ "type": "string"
1150
+ },
1151
+ "title": {
1152
+ "type": "string"
1153
+ }
1154
+ },
1155
+ "required": [
1156
+ "id",
1157
+ "title"
1158
+ ]
1159
+ }
1160
+ },
1161
+ "metadata": {
1162
+ "type": "object",
1163
+ "description": "Type-specific metadata (e.g., submission count for journeys)",
1164
+ "additionalProperties": true
1165
+ }
1166
+ },
1167
+ "required": [
1168
+ "type",
1169
+ "id",
1170
+ "title"
1171
+ ]
1172
+ },
1173
+ "ConfigListResponse": {
1174
+ "type": "object",
1175
+ "description": "Cursor-paginated list of configs for a specific type",
1176
+ "properties": {
1177
+ "type": {
1178
+ "$ref": "#/components/schemas/ResourceType"
1179
+ },
1180
+ "label": {
1181
+ "type": "string"
1182
+ },
1183
+ "icon": {
1184
+ "type": "string"
1185
+ },
1186
+ "total": {
1187
+ "type": "integer",
1188
+ "description": "Total number of configs of this type (if known)"
1189
+ },
1190
+ "next_cursor": {
1191
+ "type": "string",
1192
+ "description": "Cursor for fetching the next page. Absent when no more pages."
1193
+ },
1194
+ "results": {
1195
+ "type": "array",
1196
+ "items": {
1197
+ "$ref": "#/components/schemas/ConfigNode"
1198
+ }
1199
+ }
1200
+ },
1201
+ "required": [
1202
+ "type",
1203
+ "label",
1204
+ "icon",
1205
+ "results"
1206
+ ]
1207
+ },
1208
+ "ConfigDependenciesResponse": {
1209
+ "type": "object",
1210
+ "description": "Cursor-paginated list of configs referenced by a given config",
1211
+ "properties": {
1212
+ "total": {
1213
+ "type": "integer",
1214
+ "description": "Total number of dependencies found (if known)"
1215
+ },
1216
+ "next_cursor": {
1217
+ "type": "string",
1218
+ "description": "Cursor for fetching the next page. Absent when no more pages."
1219
+ },
1220
+ "results": {
1221
+ "type": "array",
1222
+ "items": {
1223
+ "$ref": "#/components/schemas/ConfigNode"
1224
+ }
1225
+ }
1226
+ },
1227
+ "required": [
1228
+ "results"
1229
+ ]
1230
+ },
1231
+ "IndexRebuildResponse": {
1232
+ "type": "object",
1233
+ "description": "Result of an index rebuild operation",
1234
+ "properties": {
1235
+ "status": {
1236
+ "type": "string",
1237
+ "enum": [
1238
+ "ready",
1239
+ "building",
1240
+ "failed",
1241
+ "already_building"
1242
+ ]
1243
+ },
1244
+ "last_built_at": {
1245
+ "type": "string",
1246
+ "format": "date-time"
1247
+ },
1248
+ "total_items": {
1249
+ "type": "integer"
1250
+ },
1251
+ "build_duration_ms": {
1252
+ "type": "integer"
1253
+ },
1254
+ "failed_types": {
1255
+ "type": "array",
1256
+ "items": {
1257
+ "type": "string"
1258
+ }
1259
+ }
1260
+ },
1261
+ "required": [
1262
+ "status"
1263
+ ]
1264
+ },
1265
+ "IndexStatusResponse": {
1266
+ "type": "object",
1267
+ "description": "Current index build state",
1268
+ "properties": {
1269
+ "status": {
1270
+ "type": "string",
1271
+ "enum": [
1272
+ "missing",
1273
+ "building",
1274
+ "ready",
1275
+ "failed"
1276
+ ]
1277
+ },
1278
+ "org_id": {
1279
+ "type": "string",
1280
+ "description": "Organization the index (and the authenticated token) belongs to.\nEchoed so callers holding a token for another org can resolve and\nverify its identity.\n"
1281
+ },
1282
+ "last_built_at": {
1283
+ "type": "string",
1284
+ "format": "date-time"
1285
+ },
1286
+ "total_items": {
1287
+ "type": "integer"
1288
+ },
1289
+ "build_duration_ms": {
1290
+ "type": "integer"
1291
+ }
1292
+ },
1293
+ "required": [
1294
+ "status"
1295
+ ]
1296
+ },
1297
+ "CompareRequest": {
1298
+ "type": "object",
1299
+ "description": "Request body for a per-type cross-org comparison",
1300
+ "properties": {
1301
+ "source_org_id": {
1302
+ "type": "string",
1303
+ "description": "Organization to compare the caller's org against"
1304
+ },
1305
+ "source_auth_token": {
1306
+ "type": "string",
1307
+ "description": "Auth token belonging to `source_org_id` (e.g. a pipeline token).\nVerified before any source-org data is read. Never logged.\n"
1308
+ },
1309
+ "type": {
1310
+ "$ref": "#/components/schemas/ResourceType"
1311
+ }
1312
+ },
1313
+ "required": [
1314
+ "source_org_id",
1315
+ "source_auth_token",
1316
+ "type"
1317
+ ]
1318
+ },
1319
+ "CompareLineage": {
1320
+ "type": "object",
1321
+ "description": "Provenance of a lineage-backed match",
1322
+ "properties": {
1323
+ "direction": {
1324
+ "type": "string",
1325
+ "enum": [
1326
+ "pull",
1327
+ "push"
1328
+ ],
1329
+ "description": "`pull` — the caller org imported this config from the source org\n(entry lives in the caller's lineage partition). `push` — the\nsource org imported it from the caller (entry lives in the source\norg's partition).\n"
1330
+ },
1331
+ "last_synced_at": {
1332
+ "type": "string",
1333
+ "format": "date-time"
1334
+ },
1335
+ "last_sync_job_id": {
1336
+ "type": "string"
1337
+ },
1338
+ "origin": {
1339
+ "type": "string",
1340
+ "description": "`manual_confirm` when the entry was created by confirming a\nheuristic suggestion in the Compare view; absent for sync-written\nentries.\n"
1341
+ }
1342
+ },
1343
+ "required": [
1344
+ "direction"
1345
+ ]
1346
+ },
1347
+ "CompareRow": {
1348
+ "type": "object",
1349
+ "description": "One row of the side-by-side comparison. `matched` rows carry both\nconfigs plus lineage provenance; one-sided rows carry only the side\nthe config exists on.\n",
1350
+ "properties": {
1351
+ "match_status": {
1352
+ "type": "string",
1353
+ "enum": [
1354
+ "matched",
1355
+ "only_current",
1356
+ "only_source"
1357
+ ]
1358
+ },
1359
+ "current": {
1360
+ "$ref": "#/components/schemas/ConfigNode"
1361
+ },
1362
+ "source": {
1363
+ "$ref": "#/components/schemas/ConfigNode"
1364
+ },
1365
+ "lineage": {
1366
+ "$ref": "#/components/schemas/CompareLineage"
1367
+ }
1368
+ },
1369
+ "required": [
1370
+ "match_status"
1371
+ ]
1372
+ },
1373
+ "CompareCounts": {
1374
+ "type": "object",
1375
+ "description": "Row counts per match status",
1376
+ "properties": {
1377
+ "matched": {
1378
+ "type": "integer"
1379
+ },
1380
+ "only_current": {
1381
+ "type": "integer"
1382
+ },
1383
+ "only_source": {
1384
+ "type": "integer"
1385
+ }
1386
+ },
1387
+ "required": [
1388
+ "matched",
1389
+ "only_current",
1390
+ "only_source"
1391
+ ]
1392
+ },
1393
+ "CompareResponse": {
1394
+ "type": "object",
1395
+ "description": "Side-by-side comparison of one config type across two orgs",
1396
+ "properties": {
1397
+ "type": {
1398
+ "$ref": "#/components/schemas/ResourceType"
1399
+ },
1400
+ "label": {
1401
+ "type": "string"
1402
+ },
1403
+ "icon": {
1404
+ "type": "string"
1405
+ },
1406
+ "rows": {
1407
+ "type": "array",
1408
+ "items": {
1409
+ "$ref": "#/components/schemas/CompareRow"
1410
+ }
1411
+ },
1412
+ "counts": {
1413
+ "$ref": "#/components/schemas/CompareCounts"
1414
+ }
1415
+ },
1416
+ "required": [
1417
+ "type",
1418
+ "label",
1419
+ "icon",
1420
+ "rows",
1421
+ "counts"
1422
+ ]
1423
+ },
1424
+ "SuggestMatchesRequest": {
1425
+ "type": "object",
1426
+ "description": "Request body for batched heuristic match suggestions",
1427
+ "properties": {
1428
+ "source_org_id": {
1429
+ "type": "string"
1430
+ },
1431
+ "source_auth_token": {
1432
+ "type": "string",
1433
+ "description": "Auth token belonging to `source_org_id`. Never logged."
1434
+ },
1435
+ "type": {
1436
+ "$ref": "#/components/schemas/ResourceType"
1437
+ },
1438
+ "source_ids": {
1439
+ "type": "array",
1440
+ "description": "Source-org config ids to find caller-org candidates for",
1441
+ "items": {
1442
+ "type": "string"
1443
+ },
1444
+ "minItems": 1,
1445
+ "maxItems": 25
1446
+ }
1447
+ },
1448
+ "required": [
1449
+ "source_org_id",
1450
+ "source_auth_token",
1451
+ "type",
1452
+ "source_ids"
1453
+ ]
1454
+ },
1455
+ "MatchSuggestion": {
1456
+ "type": "object",
1457
+ "description": "Heuristic candidate for one source config (null candidate = no match)",
1458
+ "properties": {
1459
+ "source_id": {
1460
+ "type": "string"
1461
+ },
1462
+ "candidate": {
1463
+ "type": "object",
1464
+ "nullable": true,
1465
+ "properties": {
1466
+ "id": {
1467
+ "type": "string"
1468
+ },
1469
+ "title": {
1470
+ "type": "string"
1471
+ }
1472
+ },
1473
+ "required": [
1474
+ "id"
1475
+ ]
1476
+ }
1477
+ },
1478
+ "required": [
1479
+ "source_id"
1480
+ ]
1481
+ },
1482
+ "SuggestMatchesResponse": {
1483
+ "type": "object",
1484
+ "properties": {
1485
+ "type": {
1486
+ "$ref": "#/components/schemas/ResourceType"
1487
+ },
1488
+ "suggestions": {
1489
+ "type": "array",
1490
+ "items": {
1491
+ "$ref": "#/components/schemas/MatchSuggestion"
1492
+ }
1493
+ }
1494
+ },
1495
+ "required": [
1496
+ "type",
1497
+ "suggestions"
1498
+ ]
1499
+ },
1500
+ "ConfirmLineageRequest": {
1501
+ "type": "object",
1502
+ "description": "Persist a source→target lineage pairing (caller org as target)",
1503
+ "properties": {
1504
+ "type": {
1505
+ "$ref": "#/components/schemas/ResourceType"
1506
+ },
1507
+ "source_org_id": {
1508
+ "type": "string"
1509
+ },
1510
+ "source_id": {
1511
+ "type": "string",
1512
+ "description": "Config id in the source org"
1513
+ },
1514
+ "target_id": {
1515
+ "type": "string",
1516
+ "description": "Config id in the caller's org to pair it with"
1517
+ }
1518
+ },
1519
+ "required": [
1520
+ "type",
1521
+ "source_org_id",
1522
+ "source_id",
1523
+ "target_id"
1524
+ ]
1525
+ },
1526
+ "LineageEntryResponse": {
1527
+ "type": "object",
1528
+ "description": "A persisted lineage entry",
1529
+ "properties": {
1530
+ "type": {
1531
+ "$ref": "#/components/schemas/ResourceType"
1532
+ },
1533
+ "target_org_id": {
1534
+ "type": "string"
1535
+ },
1536
+ "source_org_id": {
1537
+ "type": "string"
1538
+ },
1539
+ "source_id": {
1540
+ "type": "string"
1541
+ },
1542
+ "target_id": {
1543
+ "type": "string"
1544
+ },
1545
+ "last_synced_at": {
1546
+ "type": "string",
1547
+ "format": "date-time"
1548
+ },
1549
+ "origin": {
1550
+ "type": "string"
1551
+ }
1552
+ },
1553
+ "required": [
1554
+ "type",
1555
+ "target_org_id",
1556
+ "source_org_id",
1557
+ "source_id",
1558
+ "target_id"
1559
+ ]
1560
+ },
1561
+ "BreakLineageResponse": {
1562
+ "type": "object",
1563
+ "properties": {
1564
+ "deleted": {
1565
+ "type": "boolean"
1566
+ }
1567
+ },
1568
+ "required": [
1569
+ "deleted"
1570
+ ]
1571
+ },
1572
+ "ErrorResponse": {
1573
+ "type": "object",
1574
+ "properties": {
1575
+ "status": {
1576
+ "type": "integer"
1577
+ },
1578
+ "error": {
1579
+ "type": "string"
1580
+ }
1581
+ },
1582
+ "required": [
1583
+ "status",
1584
+ "error"
1585
+ ]
1586
+ },
1587
+ "SyncJobStatus": {
1588
+ "type": "string",
1589
+ "description": "Lifecycle status of a sync job. See `docs/sync/INTERFACES.md` for state\ntransitions.\n",
1590
+ "enum": [
1591
+ "pending",
1592
+ "in_progress",
1593
+ "succeeded",
1594
+ "partial",
1595
+ "failed",
1596
+ "cancelled"
1597
+ ]
1598
+ },
1599
+ "SyncDirection": {
1600
+ "type": "string",
1601
+ "description": "Direction of the sync, derived from the source/target pane selection in the\nconfiguration hub UI.\n",
1602
+ "enum": [
1603
+ "push",
1604
+ "pull"
1605
+ ]
1606
+ },
1607
+ "SyncPhase": {
1608
+ "type": "string",
1609
+ "description": "Three-phase orchestrator phase. `phase_0` fetches source payloads,\n`phase_a` creates/matches with topological batches, `phase_a5` resolves\nderived references, `phase_b` patches with the full ID map, `finalize`\nruns cycle-breaking finalizers.\n",
1610
+ "enum": [
1611
+ "phase_0",
1612
+ "phase_a",
1613
+ "phase_a5",
1614
+ "phase_b",
1615
+ "finalize"
1616
+ ]
1617
+ },
1618
+ "SyncJobResourceStatus": {
1619
+ "type": "string",
1620
+ "description": "Per-resource status. `would_*` values are produced by dry-run jobs.\n",
1621
+ "enum": [
1622
+ "pending",
1623
+ "in_progress",
1624
+ "created",
1625
+ "patched",
1626
+ "skipped",
1627
+ "would_create",
1628
+ "would_patch",
1629
+ "would_skip_unchanged",
1630
+ "would_match_heuristic",
1631
+ "failed"
1632
+ ]
1633
+ },
1634
+ "SyncJobRequest": {
1635
+ "type": "object",
1636
+ "description": "Request body for `createSyncJob`. `target_auth_token` is the destination\norg's auth token and MUST NOT be persisted or logged — it is `writeOnly`.\n",
1637
+ "required": [
1638
+ "source_org_id",
1639
+ "target_org_id",
1640
+ "target_auth_token",
1641
+ "resources"
1642
+ ],
1643
+ "properties": {
1644
+ "source_org_id": {
1645
+ "type": "string",
1646
+ "description": "Org ID the resources are sourced from."
1647
+ },
1648
+ "target_org_id": {
1649
+ "type": "string",
1650
+ "description": "Org ID the resources are written into."
1651
+ },
1652
+ "target_auth_token": {
1653
+ "type": "string",
1654
+ "writeOnly": true,
1655
+ "description": "Destination-org auth token forwarded to adapter writes. Never returned\nin responses and never logged.\n"
1656
+ },
1657
+ "name": {
1658
+ "type": "string",
1659
+ "description": "Optional human-friendly job name shown in the history list."
1660
+ },
1661
+ "dry_run": {
1662
+ "type": "boolean",
1663
+ "default": false,
1664
+ "description": "If true, the orchestrator runs Phase 0 + a planning pass and writes\n`would_*` resource rows but performs no destination writes.\n"
1665
+ },
1666
+ "include_dependencies": {
1667
+ "type": "boolean",
1668
+ "default": true,
1669
+ "description": "If true, the orchestrator expands the resource set by following\ndependency edges discovered during Phase 0.\n"
1670
+ },
1671
+ "resources": {
1672
+ "type": "array",
1673
+ "description": "Initial resource selection. Dependencies may be added.",
1674
+ "items": {
1675
+ "type": "object",
1676
+ "required": [
1677
+ "type",
1678
+ "id"
1679
+ ],
1680
+ "properties": {
1681
+ "type": {
1682
+ "type": "string",
1683
+ "description": "Resource type identifier"
1684
+ },
1685
+ "id": {
1686
+ "type": "string",
1687
+ "description": "Source-org resource ID"
1688
+ }
1689
+ }
1690
+ }
1691
+ }
1692
+ }
1693
+ },
1694
+ "SyncJobRetryRequest": {
1695
+ "type": "object",
1696
+ "description": "Optional body for `retrySyncJob`. Defaults to retrying every unresolved\nresource of the original job (failed, pending or in_progress).\n",
1697
+ "properties": {
1698
+ "payload_overrides": {
1699
+ "type": "object",
1700
+ "description": "Map of `<type>:<source_id>` → partial payload patch. Applied on top of\nthe originally fetched payload before re-running Phase A.\n",
1701
+ "additionalProperties": true
1702
+ }
1703
+ }
1704
+ },
1705
+ "SyncJobCounts": {
1706
+ "type": "object",
1707
+ "description": "Aggregate counters by resource status.",
1708
+ "properties": {
1709
+ "total": {
1710
+ "type": "integer"
1711
+ },
1712
+ "pending": {
1713
+ "type": "integer"
1714
+ },
1715
+ "in_progress": {
1716
+ "type": "integer"
1717
+ },
1718
+ "succeeded": {
1719
+ "type": "integer"
1720
+ },
1721
+ "failed": {
1722
+ "type": "integer"
1723
+ },
1724
+ "skipped_unchanged": {
1725
+ "type": "integer"
1726
+ }
1727
+ },
1728
+ "required": [
1729
+ "total",
1730
+ "pending",
1731
+ "in_progress",
1732
+ "succeeded",
1733
+ "failed",
1734
+ "skipped_unchanged"
1735
+ ]
1736
+ },
1737
+ "SyncJobEvent": {
1738
+ "type": "object",
1739
+ "description": "Activity-log entry surfaced to the frontend. Backed by the op-log rows in\nthe index table (`SYNC#<jobId>#OP#<seq>`).\n",
1740
+ "properties": {
1741
+ "seq": {
1742
+ "type": "integer",
1743
+ "description": "Monotonic sequence number assigned at write time."
1744
+ },
1745
+ "ts": {
1746
+ "type": "string",
1747
+ "format": "date-time"
1748
+ },
1749
+ "phase": {
1750
+ "$ref": "#/components/schemas/SyncPhase"
1751
+ },
1752
+ "type": {
1753
+ "type": "string",
1754
+ "description": "Resource type"
1755
+ },
1756
+ "source_id": {
1757
+ "type": "string"
1758
+ },
1759
+ "target_id": {
1760
+ "type": "string"
1761
+ },
1762
+ "status": {
1763
+ "$ref": "#/components/schemas/SyncJobResourceStatus"
1764
+ },
1765
+ "message": {
1766
+ "type": "string"
1767
+ },
1768
+ "error": {
1769
+ "type": "string"
1770
+ }
1771
+ },
1772
+ "required": [
1773
+ "seq",
1774
+ "ts",
1775
+ "status"
1776
+ ]
1777
+ },
1778
+ "SyncJobBatch": {
1779
+ "type": "object",
1780
+ "description": "Position within the current topological batch for the active phase.",
1781
+ "properties": {
1782
+ "index": {
1783
+ "type": "integer",
1784
+ "description": "Zero-based index of the batch currently executing."
1785
+ },
1786
+ "of": {
1787
+ "type": "integer",
1788
+ "description": "Total number of batches in the current phase."
1789
+ },
1790
+ "level": {
1791
+ "type": "integer",
1792
+ "description": "Dependency level (matches `dependencyLevel` from the topological sort)."
1793
+ }
1794
+ },
1795
+ "required": [
1796
+ "index",
1797
+ "of",
1798
+ "level"
1799
+ ]
1800
+ },
1801
+ "SyncJob": {
1802
+ "type": "object",
1803
+ "description": "Sync job header as surfaced by `getSyncJob` and the create response. The\ncanonical persistence shape is described in `docs/sync/INTERFACES.md`.\n",
1804
+ "properties": {
1805
+ "id": {
1806
+ "type": "string"
1807
+ },
1808
+ "name": {
1809
+ "type": "string"
1810
+ },
1811
+ "status": {
1812
+ "$ref": "#/components/schemas/SyncJobStatus"
1813
+ },
1814
+ "direction": {
1815
+ "$ref": "#/components/schemas/SyncDirection"
1816
+ },
1817
+ "source_org_id": {
1818
+ "type": "string"
1819
+ },
1820
+ "target_org_id": {
1821
+ "type": "string"
1822
+ },
1823
+ "dry_run": {
1824
+ "type": "boolean"
1825
+ },
1826
+ "counts": {
1827
+ "$ref": "#/components/schemas/SyncJobCounts"
1828
+ },
1829
+ "current_phase": {
1830
+ "$ref": "#/components/schemas/SyncPhase"
1831
+ },
1832
+ "current_batch": {
1833
+ "$ref": "#/components/schemas/SyncJobBatch"
1834
+ },
1835
+ "started_at": {
1836
+ "type": "string",
1837
+ "format": "date-time"
1838
+ },
1839
+ "finished_at": {
1840
+ "type": "string",
1841
+ "format": "date-time"
1842
+ },
1843
+ "events": {
1844
+ "type": "array",
1845
+ "description": "Most recent events (capped server-side, typically last 10).",
1846
+ "items": {
1847
+ "$ref": "#/components/schemas/SyncJobEvent"
1848
+ }
1849
+ },
1850
+ "errors_sample": {
1851
+ "type": "array",
1852
+ "description": "Up to 20 sample error messages from failed resources.",
1853
+ "maxItems": 20,
1854
+ "items": {
1855
+ "type": "object",
1856
+ "properties": {
1857
+ "type": {
1858
+ "type": "string"
1859
+ },
1860
+ "source_id": {
1861
+ "type": "string"
1862
+ },
1863
+ "error": {
1864
+ "type": "string"
1865
+ }
1866
+ },
1867
+ "required": [
1868
+ "type",
1869
+ "source_id",
1870
+ "error"
1871
+ ]
1872
+ }
1873
+ }
1874
+ },
1875
+ "required": [
1876
+ "id",
1877
+ "status",
1878
+ "direction",
1879
+ "source_org_id",
1880
+ "target_org_id",
1881
+ "dry_run",
1882
+ "counts",
1883
+ "started_at"
1884
+ ]
1885
+ },
1886
+ "SyncJobListResponse": {
1887
+ "type": "object",
1888
+ "description": "Cursor-paginated list of sync jobs.",
1889
+ "properties": {
1890
+ "next_cursor": {
1891
+ "type": "string"
1892
+ },
1893
+ "results": {
1894
+ "type": "array",
1895
+ "items": {
1896
+ "$ref": "#/components/schemas/SyncJob"
1897
+ }
1898
+ }
1899
+ },
1900
+ "required": [
1901
+ "results"
1902
+ ]
1903
+ },
1904
+ "SyncJobResource": {
1905
+ "type": "object",
1906
+ "description": "Per-resource row backed by `SyncResourcesTable`. See\n`docs/sync/INTERFACES.md` for the DDB shape.\n",
1907
+ "properties": {
1908
+ "type": {
1909
+ "type": "string"
1910
+ },
1911
+ "source_id": {
1912
+ "type": "string"
1913
+ },
1914
+ "target_id": {
1915
+ "type": "string"
1916
+ },
1917
+ "title": {
1918
+ "type": "string",
1919
+ "description": "Human-readable resource title captured from the source payload\nduring Phase 0. Lets clients identify rows without resolving\nraw UUIDs. Absent on rows written before this field existed.\n"
1920
+ },
1921
+ "status": {
1922
+ "$ref": "#/components/schemas/SyncJobResourceStatus"
1923
+ },
1924
+ "phase": {
1925
+ "$ref": "#/components/schemas/SyncPhase"
1926
+ },
1927
+ "attempt": {
1928
+ "type": "integer"
1929
+ },
1930
+ "error": {
1931
+ "type": "string"
1932
+ },
1933
+ "updated_at": {
1934
+ "type": "string",
1935
+ "format": "date-time"
1936
+ }
1937
+ },
1938
+ "required": [
1939
+ "type",
1940
+ "source_id",
1941
+ "status",
1942
+ "phase",
1943
+ "attempt",
1944
+ "updated_at"
1945
+ ]
1946
+ },
1947
+ "SyncJobResourceListResponse": {
1948
+ "type": "object",
1949
+ "description": "Cursor-paginated list of sync job resources.",
1950
+ "properties": {
1951
+ "next_cursor": {
1952
+ "type": "string"
1953
+ },
1954
+ "results": {
1955
+ "type": "array",
1956
+ "items": {
1957
+ "$ref": "#/components/schemas/SyncJobResource"
1958
+ }
1959
+ }
1960
+ },
1961
+ "required": [
1962
+ "results"
1963
+ ]
1964
+ },
1965
+ "DeleteJobStatus": {
1966
+ "type": "string",
1967
+ "description": "Lifecycle status of a bulk-delete job.",
1968
+ "enum": [
1969
+ "pending",
1970
+ "in_progress",
1971
+ "succeeded",
1972
+ "partial",
1973
+ "failed",
1974
+ "cancelled"
1975
+ ]
1976
+ },
1977
+ "DeleteJobResourceStatus": {
1978
+ "type": "string",
1979
+ "description": "Per-resource delete status. `skipped` is used for protected resources\nthat are intentionally not deleted (e.g. built-in schemas).\n",
1980
+ "enum": [
1981
+ "pending",
1982
+ "in_progress",
1983
+ "deleted",
1984
+ "skipped",
1985
+ "failed"
1986
+ ]
1987
+ },
1988
+ "DeleteJobCounts": {
1989
+ "type": "object",
1990
+ "description": "Aggregate counters by resource delete status.",
1991
+ "properties": {
1992
+ "total": {
1993
+ "type": "integer"
1994
+ },
1995
+ "pending": {
1996
+ "type": "integer"
1997
+ },
1998
+ "in_progress": {
1999
+ "type": "integer"
2000
+ },
2001
+ "deleted": {
2002
+ "type": "integer"
2003
+ },
2004
+ "skipped": {
2005
+ "type": "integer"
2006
+ },
2007
+ "failed": {
2008
+ "type": "integer"
2009
+ }
2010
+ },
2011
+ "required": [
2012
+ "total",
2013
+ "pending",
2014
+ "in_progress",
2015
+ "deleted",
2016
+ "skipped",
2017
+ "failed"
2018
+ ]
2019
+ },
2020
+ "DeleteJobRequest": {
2021
+ "type": "object",
2022
+ "description": "Request body for `createDeleteJob`.",
2023
+ "required": [
2024
+ "resources"
2025
+ ],
2026
+ "properties": {
2027
+ "name": {
2028
+ "type": "string",
2029
+ "description": "Optional human-friendly job name shown in the history list."
2030
+ },
2031
+ "resources": {
2032
+ "type": "array",
2033
+ "description": "The resources to delete, by type + id.",
2034
+ "minItems": 1,
2035
+ "items": {
2036
+ "type": "object",
2037
+ "required": [
2038
+ "type",
2039
+ "id"
2040
+ ],
2041
+ "properties": {
2042
+ "type": {
2043
+ "type": "string",
2044
+ "description": "Resource type identifier"
2045
+ },
2046
+ "id": {
2047
+ "type": "string",
2048
+ "description": "Resource ID"
2049
+ },
2050
+ "title": {
2051
+ "type": "string",
2052
+ "description": "Optional human-readable title captured for the failures view."
2053
+ }
2054
+ }
2055
+ }
2056
+ }
2057
+ }
2058
+ },
2059
+ "DeleteJob": {
2060
+ "type": "object",
2061
+ "description": "Bulk-delete job header surfaced by `createDeleteJob`/`getDeleteJob`.",
2062
+ "properties": {
2063
+ "id": {
2064
+ "type": "string"
2065
+ },
2066
+ "name": {
2067
+ "type": "string"
2068
+ },
2069
+ "status": {
2070
+ "$ref": "#/components/schemas/DeleteJobStatus"
2071
+ },
2072
+ "org_id": {
2073
+ "type": "string"
2074
+ },
2075
+ "counts": {
2076
+ "$ref": "#/components/schemas/DeleteJobCounts"
2077
+ },
2078
+ "started_at": {
2079
+ "type": "string",
2080
+ "format": "date-time"
2081
+ },
2082
+ "finished_at": {
2083
+ "type": "string",
2084
+ "format": "date-time"
2085
+ },
2086
+ "rebuild_triggered": {
2087
+ "type": "boolean",
2088
+ "description": "True once the worker has kicked the index rebuild on completion."
2089
+ }
2090
+ },
2091
+ "required": [
2092
+ "id",
2093
+ "status",
2094
+ "org_id",
2095
+ "counts",
2096
+ "started_at"
2097
+ ]
2098
+ },
2099
+ "DeleteJobListResponse": {
2100
+ "type": "object",
2101
+ "description": "Cursor-paginated list of delete jobs.",
2102
+ "properties": {
2103
+ "next_cursor": {
2104
+ "type": "string"
2105
+ },
2106
+ "results": {
2107
+ "type": "array",
2108
+ "items": {
2109
+ "$ref": "#/components/schemas/DeleteJob"
2110
+ }
2111
+ }
2112
+ },
2113
+ "required": [
2114
+ "results"
2115
+ ]
2116
+ },
2117
+ "DeleteJobResource": {
2118
+ "type": "object",
2119
+ "description": "Per-resource row for a delete job.",
2120
+ "properties": {
2121
+ "type": {
2122
+ "type": "string"
2123
+ },
2124
+ "id": {
2125
+ "type": "string"
2126
+ },
2127
+ "title": {
2128
+ "type": "string"
2129
+ },
2130
+ "status": {
2131
+ "$ref": "#/components/schemas/DeleteJobResourceStatus"
2132
+ },
2133
+ "attempt": {
2134
+ "type": "integer"
2135
+ },
2136
+ "error": {
2137
+ "type": "string"
2138
+ },
2139
+ "updated_at": {
2140
+ "type": "string",
2141
+ "format": "date-time"
2142
+ }
2143
+ },
2144
+ "required": [
2145
+ "type",
2146
+ "id",
2147
+ "status",
2148
+ "attempt",
2149
+ "updated_at"
2150
+ ]
2151
+ },
2152
+ "DeleteJobResourceListResponse": {
2153
+ "type": "object",
2154
+ "description": "Cursor-paginated list of delete job resources.",
2155
+ "properties": {
2156
+ "next_cursor": {
2157
+ "type": "string"
2158
+ },
2159
+ "results": {
2160
+ "type": "array",
2161
+ "items": {
2162
+ "$ref": "#/components/schemas/DeleteJobResource"
2163
+ }
2164
+ }
2165
+ },
2166
+ "required": [
2167
+ "results"
2168
+ ]
2169
+ },
2170
+ "SnapshotInventoryItem": {
2171
+ "type": "object",
2172
+ "description": "Minimal identity of a single configuration resource.",
2173
+ "properties": {
2174
+ "type": {
2175
+ "$ref": "#/components/schemas/ResourceType"
2176
+ },
2177
+ "id": {
2178
+ "type": "string",
2179
+ "description": "Unique identifier of the resource"
2180
+ }
2181
+ },
2182
+ "required": [
2183
+ "type",
2184
+ "id"
2185
+ ]
2186
+ },
2187
+ "SnapshotInventorySkippedType": {
2188
+ "type": "object",
2189
+ "description": "A type that could not be listed during inventory collection.",
2190
+ "properties": {
2191
+ "type": {
2192
+ "type": "string"
2193
+ },
2194
+ "reason": {
2195
+ "type": "string"
2196
+ }
2197
+ },
2198
+ "required": [
2199
+ "type",
2200
+ "reason"
2201
+ ]
2202
+ },
2203
+ "ConfigInventoryResponse": {
2204
+ "type": "object",
2205
+ "description": "Fresh inventory of all configuration resources for an org.",
2206
+ "properties": {
2207
+ "inventory_id": {
2208
+ "type": "string",
2209
+ "description": "Unique identifier for this inventory run (UUID)."
2210
+ },
2211
+ "org_id": {
2212
+ "type": "string",
2213
+ "description": "Organization ID the inventory was collected for."
2214
+ },
2215
+ "indexed_at": {
2216
+ "type": "string",
2217
+ "format": "date-time",
2218
+ "description": "ISO timestamp of when the inventory was collected."
2219
+ },
2220
+ "resources_count": {
2221
+ "type": "integer",
2222
+ "description": "Total number of resources found across all types."
2223
+ },
2224
+ "resources": {
2225
+ "type": "array",
2226
+ "description": "List of all found resources as `{ type, id }` pairs.",
2227
+ "items": {
2228
+ "$ref": "#/components/schemas/SnapshotInventoryItem"
2229
+ }
2230
+ },
2231
+ "skipped_types": {
2232
+ "type": "array",
2233
+ "description": "Types that failed to list or had no adapter; never fail the whole inventory.",
2234
+ "items": {
2235
+ "$ref": "#/components/schemas/SnapshotInventorySkippedType"
2236
+ }
2237
+ }
2238
+ },
2239
+ "required": [
2240
+ "inventory_id",
2241
+ "org_id",
2242
+ "indexed_at",
2243
+ "resources_count",
2244
+ "resources",
2245
+ "skipped_types"
2246
+ ]
2247
+ }
2248
+ }
2249
+ }
2250
+ }