@epilot/sdk 2.20.38 → 2.20.39

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 (135) hide show
  1. package/README.md +1 -0
  2. package/definitions/identity-runtime.json +1 -0
  3. package/definitions/identity.json +1546 -0
  4. package/dist/README-OSHX3IVR.cjs +7 -0
  5. package/dist/README-ZSJDIPZZ.js +7 -0
  6. package/dist/{_index-6FK4PV6Y.js → _index-UBUNWMRP.js} +3 -0
  7. package/dist/{_index-655GNTWT.cjs → _index-UWRY3DNX.cjs} +4 -1
  8. package/dist/apis/access-token.cjs +6 -6
  9. package/dist/apis/access-token.js +1 -1
  10. package/dist/apis/address-suggestions.cjs +6 -6
  11. package/dist/apis/address-suggestions.js +1 -1
  12. package/dist/apis/address.cjs +6 -6
  13. package/dist/apis/address.js +1 -1
  14. package/dist/apis/ai-agents.cjs +6 -6
  15. package/dist/apis/ai-agents.js +1 -1
  16. package/dist/apis/app.cjs +6 -6
  17. package/dist/apis/app.js +1 -1
  18. package/dist/apis/audit-logs.cjs +6 -6
  19. package/dist/apis/audit-logs.js +1 -1
  20. package/dist/apis/automation.cjs +6 -6
  21. package/dist/apis/automation.js +1 -1
  22. package/dist/apis/billing.cjs +6 -6
  23. package/dist/apis/billing.js +1 -1
  24. package/dist/apis/blueprint-manifest.cjs +6 -6
  25. package/dist/apis/blueprint-manifest.js +1 -1
  26. package/dist/apis/calendar.cjs +6 -6
  27. package/dist/apis/calendar.js +1 -1
  28. package/dist/apis/chat.cjs +6 -6
  29. package/dist/apis/chat.js +1 -1
  30. package/dist/apis/configuration-hub.cjs +6 -6
  31. package/dist/apis/configuration-hub.js +1 -1
  32. package/dist/apis/consent.cjs +6 -6
  33. package/dist/apis/consent.js +1 -1
  34. package/dist/apis/customer-portal.cjs +6 -6
  35. package/dist/apis/customer-portal.js +1 -1
  36. package/dist/apis/dashboard.cjs +6 -6
  37. package/dist/apis/dashboard.js +1 -1
  38. package/dist/apis/data-governance.cjs +6 -6
  39. package/dist/apis/data-governance.js +1 -1
  40. package/dist/apis/deduplication.cjs +6 -6
  41. package/dist/apis/deduplication.js +1 -1
  42. package/dist/apis/design.cjs +6 -6
  43. package/dist/apis/design.js +1 -1
  44. package/dist/apis/document.cjs +6 -6
  45. package/dist/apis/document.js +1 -1
  46. package/dist/apis/email-settings.cjs +6 -6
  47. package/dist/apis/email-settings.js +1 -1
  48. package/dist/apis/email-template.cjs +6 -6
  49. package/dist/apis/email-template.js +1 -1
  50. package/dist/apis/entity-mapping.cjs +6 -6
  51. package/dist/apis/entity-mapping.js +1 -1
  52. package/dist/apis/entity.cjs +6 -6
  53. package/dist/apis/entity.js +1 -1
  54. package/dist/apis/environments.cjs +6 -6
  55. package/dist/apis/environments.js +1 -1
  56. package/dist/apis/event-catalog.cjs +6 -6
  57. package/dist/apis/event-catalog.js +1 -1
  58. package/dist/apis/file.cjs +6 -6
  59. package/dist/apis/file.js +1 -1
  60. package/dist/apis/iban.cjs +6 -6
  61. package/dist/apis/iban.js +1 -1
  62. package/dist/apis/identity.cjs +38 -0
  63. package/dist/apis/identity.d.cts +18 -0
  64. package/dist/apis/identity.d.ts +18 -0
  65. package/dist/apis/identity.js +38 -0
  66. package/dist/apis/integration-toolkit.cjs +6 -6
  67. package/dist/apis/integration-toolkit.js +1 -1
  68. package/dist/apis/journey.cjs +6 -6
  69. package/dist/apis/journey.js +1 -1
  70. package/dist/apis/kanban.cjs +6 -6
  71. package/dist/apis/kanban.js +1 -1
  72. package/dist/apis/message.cjs +6 -6
  73. package/dist/apis/message.js +1 -1
  74. package/dist/apis/metering.cjs +6 -6
  75. package/dist/apis/metering.js +1 -1
  76. package/dist/apis/notes.cjs +6 -6
  77. package/dist/apis/notes.js +1 -1
  78. package/dist/apis/notification.cjs +6 -6
  79. package/dist/apis/notification.js +1 -1
  80. package/dist/apis/organization.cjs +6 -6
  81. package/dist/apis/organization.js +1 -1
  82. package/dist/apis/partner-directory.cjs +6 -6
  83. package/dist/apis/partner-directory.js +1 -1
  84. package/dist/apis/permissions.cjs +6 -6
  85. package/dist/apis/permissions.js +1 -1
  86. package/dist/apis/pricing-tier.cjs +6 -6
  87. package/dist/apis/pricing-tier.js +1 -1
  88. package/dist/apis/pricing.cjs +6 -6
  89. package/dist/apis/pricing.js +1 -1
  90. package/dist/apis/purpose.cjs +6 -6
  91. package/dist/apis/purpose.js +1 -1
  92. package/dist/apis/query.cjs +6 -6
  93. package/dist/apis/query.js +1 -1
  94. package/dist/apis/sandbox.cjs +6 -6
  95. package/dist/apis/sandbox.js +1 -1
  96. package/dist/apis/sharing.cjs +6 -6
  97. package/dist/apis/sharing.js +1 -1
  98. package/dist/apis/snapshot.cjs +6 -6
  99. package/dist/apis/snapshot.js +1 -1
  100. package/dist/apis/submission.cjs +6 -6
  101. package/dist/apis/submission.js +1 -1
  102. package/dist/apis/target.cjs +6 -6
  103. package/dist/apis/target.js +1 -1
  104. package/dist/apis/targeting.cjs +6 -6
  105. package/dist/apis/targeting.js +1 -1
  106. package/dist/apis/template-variables.cjs +6 -6
  107. package/dist/apis/template-variables.js +1 -1
  108. package/dist/apis/user.cjs +6 -6
  109. package/dist/apis/user.js +1 -1
  110. package/dist/apis/validation-rules.cjs +6 -6
  111. package/dist/apis/validation-rules.js +1 -1
  112. package/dist/apis/webhooks.cjs +6 -6
  113. package/dist/apis/webhooks.js +1 -1
  114. package/dist/apis/workflow-definition.cjs +6 -6
  115. package/dist/apis/workflow-definition.js +1 -1
  116. package/dist/apis/workflow.cjs +6 -6
  117. package/dist/apis/workflow.js +1 -1
  118. package/dist/chunk-3IBAPVLY.js +14 -0
  119. package/dist/{chunk-6KBVDEXV.js → chunk-A6FNV6JX.js} +4 -2
  120. package/dist/{chunk-H7SM2GBY.cjs → chunk-QSGVSIS7.cjs} +4 -2
  121. package/dist/chunk-RPWTWCDC.cjs +14 -0
  122. package/dist/identity-EG35NBZW.js +7 -0
  123. package/dist/identity-XMX3VFXR.cjs +7 -0
  124. package/dist/identity-runtime-57DQPQWX.cjs +5 -0
  125. package/dist/identity-runtime-PFM5KQWA.js +5 -0
  126. package/dist/identity.d-BBL0NI_O.d.cts +1153 -0
  127. package/dist/identity.d-BBL0NI_O.d.ts +1153 -0
  128. package/dist/index.cjs +23 -15
  129. package/dist/index.d.cts +52 -50
  130. package/dist/index.d.ts +52 -50
  131. package/dist/index.js +17 -9
  132. package/docs/identity.md +1279 -0
  133. package/package.json +10 -1
  134. package/dist/README-7F36AG5O.js +0 -7
  135. package/dist/README-I7JMAFA4.cjs +0 -7
@@ -0,0 +1,1546 @@
1
+ {
2
+ "openapi": "3.0.3",
3
+ "info": {
4
+ "title": "Identity API",
5
+ "version": "1.0.0",
6
+ "description": "epilot as an OpenID Connect provider (\"Sign in with epilot\").\n\nThe standard OpenID Connect endpoints (discovery, JWKS, authorize, token, UserInfo, revocation)\nare described by the discovery document at `/.well-known/openid-configuration` and are not\nrepeated here. Partners integrate against that document with any certified OpenID Connect\nrelying-party library.\n\nThis specification covers the epilot-specific parts of the service:\n\n- the **operator API** used by epilot platform staff to register partner applications\n (clients) and to enable organizations on them,\n- the **360 session endpoints** that let the portal prove a live 360 session during an\n authorization (the session hop).\n\nTenant model: one confidential client per partner application and environment; the organization\na person is acting in travels in every ID token as the claim `https://id.epilot.cloud/claims/org_id`.\nA relying party must key everything on `(iss, sub, org_id)`.\n"
7
+ },
8
+ "tags": [
9
+ {
10
+ "name": "Operator Clients",
11
+ "description": "Register and manage partner applications (OIDC clients). Platform operators only."
12
+ },
13
+ {
14
+ "name": "Operator Organizations",
15
+ "description": "Enable, suspend and revoke organizations on a partner client. Platform operators only."
16
+ },
17
+ {
18
+ "name": "Session",
19
+ "description": "360 session hop used by the epilot portal during an authorization."
20
+ },
21
+ {
22
+ "name": "Launch",
23
+ "description": "Start a partner login from an epilot link (OpenID Connect third-party initiated login)."
24
+ }
25
+ ],
26
+ "servers": [
27
+ {
28
+ "url": "https://id.epilot.cloud"
29
+ }
30
+ ],
31
+ "security": [
32
+ {
33
+ "OperatorAuth": []
34
+ }
35
+ ],
36
+ "paths": {
37
+ "/v1/identity/operator/clients": {
38
+ "get": {
39
+ "operationId": "listClients",
40
+ "summary": "listClients",
41
+ "description": "List registered partner clients. The client secret is never returned.",
42
+ "tags": [
43
+ "Operator Clients"
44
+ ],
45
+ "parameters": [
46
+ {
47
+ "$ref": "#/components/parameters/PartnerKeyQuery"
48
+ },
49
+ {
50
+ "$ref": "#/components/parameters/ClientStatusQuery"
51
+ },
52
+ {
53
+ "$ref": "#/components/parameters/SizeQuery"
54
+ },
55
+ {
56
+ "$ref": "#/components/parameters/CursorQuery"
57
+ }
58
+ ],
59
+ "responses": {
60
+ "200": {
61
+ "description": "Clients",
62
+ "content": {
63
+ "application/json": {
64
+ "schema": {
65
+ "$ref": "#/components/schemas/PartnerClientList"
66
+ }
67
+ }
68
+ }
69
+ },
70
+ "401": {
71
+ "$ref": "#/components/responses/Unauthorized"
72
+ },
73
+ "403": {
74
+ "$ref": "#/components/responses/Forbidden"
75
+ }
76
+ }
77
+ },
78
+ "post": {
79
+ "operationId": "createOidcClient",
80
+ "summary": "createOidcClient",
81
+ "description": "Create a partner client in `draft` status. The client secret is returned exactly once in this\nresponse and can never be read again; use `rotateClientSecret` to obtain a new one.\n",
82
+ "tags": [
83
+ "Operator Clients"
84
+ ],
85
+ "requestBody": {
86
+ "required": true,
87
+ "content": {
88
+ "application/json": {
89
+ "schema": {
90
+ "$ref": "#/components/schemas/PartnerClientCreate"
91
+ }
92
+ }
93
+ }
94
+ },
95
+ "responses": {
96
+ "201": {
97
+ "description": "Created client including its one-time secret",
98
+ "content": {
99
+ "application/json": {
100
+ "schema": {
101
+ "$ref": "#/components/schemas/PartnerClientWithSecret"
102
+ }
103
+ }
104
+ }
105
+ },
106
+ "400": {
107
+ "$ref": "#/components/responses/BadRequest"
108
+ },
109
+ "401": {
110
+ "$ref": "#/components/responses/Unauthorized"
111
+ },
112
+ "403": {
113
+ "$ref": "#/components/responses/Forbidden"
114
+ }
115
+ }
116
+ }
117
+ },
118
+ "/v1/identity/operator/clients/{client_id}": {
119
+ "parameters": [
120
+ {
121
+ "$ref": "#/components/parameters/ClientIdPath"
122
+ }
123
+ ],
124
+ "get": {
125
+ "operationId": "getOidcClient",
126
+ "summary": "getOidcClient",
127
+ "description": "Read a partner client. The client secret is never returned.",
128
+ "tags": [
129
+ "Operator Clients"
130
+ ],
131
+ "responses": {
132
+ "200": {
133
+ "description": "Client",
134
+ "content": {
135
+ "application/json": {
136
+ "schema": {
137
+ "$ref": "#/components/schemas/PartnerClient"
138
+ }
139
+ }
140
+ }
141
+ },
142
+ "401": {
143
+ "$ref": "#/components/responses/Unauthorized"
144
+ },
145
+ "403": {
146
+ "$ref": "#/components/responses/Forbidden"
147
+ },
148
+ "404": {
149
+ "$ref": "#/components/responses/NotFound"
150
+ }
151
+ }
152
+ },
153
+ "put": {
154
+ "operationId": "updateClient",
155
+ "summary": "updateClient",
156
+ "description": "Replace the mutable configuration of a client. `config_version` must equal the current\nversion (compare-and-swap); a mismatch is rejected with `409`.\n",
157
+ "tags": [
158
+ "Operator Clients"
159
+ ],
160
+ "requestBody": {
161
+ "required": true,
162
+ "content": {
163
+ "application/json": {
164
+ "schema": {
165
+ "$ref": "#/components/schemas/PartnerClientUpdate"
166
+ }
167
+ }
168
+ }
169
+ },
170
+ "responses": {
171
+ "200": {
172
+ "description": "Updated client",
173
+ "content": {
174
+ "application/json": {
175
+ "schema": {
176
+ "$ref": "#/components/schemas/PartnerClient"
177
+ }
178
+ }
179
+ }
180
+ },
181
+ "400": {
182
+ "$ref": "#/components/responses/BadRequest"
183
+ },
184
+ "401": {
185
+ "$ref": "#/components/responses/Unauthorized"
186
+ },
187
+ "403": {
188
+ "$ref": "#/components/responses/Forbidden"
189
+ },
190
+ "404": {
191
+ "$ref": "#/components/responses/NotFound"
192
+ },
193
+ "409": {
194
+ "$ref": "#/components/responses/Conflict"
195
+ }
196
+ }
197
+ },
198
+ "delete": {
199
+ "operationId": "retireClient",
200
+ "summary": "retireClient",
201
+ "description": "Retire a client. The record is kept as a tombstone, the `client_id` is never reused, every\norganization enablement is revoked and all provider-side artefacts are revoked.\n",
202
+ "tags": [
203
+ "Operator Clients"
204
+ ],
205
+ "responses": {
206
+ "200": {
207
+ "description": "Retired client",
208
+ "content": {
209
+ "application/json": {
210
+ "schema": {
211
+ "$ref": "#/components/schemas/PartnerClient"
212
+ }
213
+ }
214
+ }
215
+ },
216
+ "401": {
217
+ "$ref": "#/components/responses/Unauthorized"
218
+ },
219
+ "403": {
220
+ "$ref": "#/components/responses/Forbidden"
221
+ },
222
+ "404": {
223
+ "$ref": "#/components/responses/NotFound"
224
+ }
225
+ }
226
+ }
227
+ },
228
+ "/v1/identity/operator/clients/{client_id}:activate": {
229
+ "parameters": [
230
+ {
231
+ "$ref": "#/components/parameters/ClientIdPath"
232
+ }
233
+ ],
234
+ "post": {
235
+ "operationId": "activateClient",
236
+ "summary": "activateClient",
237
+ "description": "Activate a `draft` or `suspended` client. Validates that every redirect URI is an absolute\nHTTPS URL without fragment, that `scopes_allowed` contains `openid`, and that the\nauthentication method is `client_secret_basic`.\n",
238
+ "tags": [
239
+ "Operator Clients"
240
+ ],
241
+ "responses": {
242
+ "200": {
243
+ "description": "Activated client",
244
+ "content": {
245
+ "application/json": {
246
+ "schema": {
247
+ "$ref": "#/components/schemas/PartnerClient"
248
+ }
249
+ }
250
+ }
251
+ },
252
+ "400": {
253
+ "$ref": "#/components/responses/BadRequest"
254
+ },
255
+ "401": {
256
+ "$ref": "#/components/responses/Unauthorized"
257
+ },
258
+ "403": {
259
+ "$ref": "#/components/responses/Forbidden"
260
+ },
261
+ "404": {
262
+ "$ref": "#/components/responses/NotFound"
263
+ },
264
+ "409": {
265
+ "$ref": "#/components/responses/Conflict"
266
+ }
267
+ }
268
+ }
269
+ },
270
+ "/v1/identity/operator/clients/{client_id}:suspend": {
271
+ "parameters": [
272
+ {
273
+ "$ref": "#/components/parameters/ClientIdPath"
274
+ }
275
+ ],
276
+ "post": {
277
+ "operationId": "suspendClient",
278
+ "summary": "suspendClient",
279
+ "description": "Immediately block the client for every organization. Provider-side artefacts (codes, tokens,\ngrants) are revoked; the audit trail is kept. Reversible with `activateClient`.\n",
280
+ "tags": [
281
+ "Operator Clients"
282
+ ],
283
+ "requestBody": {
284
+ "required": false,
285
+ "content": {
286
+ "application/json": {
287
+ "schema": {
288
+ "$ref": "#/components/schemas/StatusChangeRequest"
289
+ }
290
+ }
291
+ }
292
+ },
293
+ "responses": {
294
+ "200": {
295
+ "description": "Suspended client",
296
+ "content": {
297
+ "application/json": {
298
+ "schema": {
299
+ "$ref": "#/components/schemas/PartnerClient"
300
+ }
301
+ }
302
+ }
303
+ },
304
+ "401": {
305
+ "$ref": "#/components/responses/Unauthorized"
306
+ },
307
+ "403": {
308
+ "$ref": "#/components/responses/Forbidden"
309
+ },
310
+ "404": {
311
+ "$ref": "#/components/responses/NotFound"
312
+ },
313
+ "409": {
314
+ "$ref": "#/components/responses/Conflict"
315
+ }
316
+ }
317
+ }
318
+ },
319
+ "/v1/identity/operator/clients/{client_id}:rotateSecret": {
320
+ "parameters": [
321
+ {
322
+ "$ref": "#/components/parameters/ClientIdPath"
323
+ }
324
+ ],
325
+ "post": {
326
+ "operationId": "rotateClientSecret",
327
+ "summary": "rotateClientSecret",
328
+ "description": "Issue a new client secret. The new secret is returned exactly once. The previous secret\nkeeps working until `previous_secret_expires_at` unless `compromise_mode` is set, in which\ncase it stops working immediately.\n",
329
+ "tags": [
330
+ "Operator Clients"
331
+ ],
332
+ "requestBody": {
333
+ "required": false,
334
+ "content": {
335
+ "application/json": {
336
+ "schema": {
337
+ "$ref": "#/components/schemas/RotateSecretRequest"
338
+ }
339
+ }
340
+ }
341
+ },
342
+ "responses": {
343
+ "200": {
344
+ "description": "Client including its new one-time secret",
345
+ "content": {
346
+ "application/json": {
347
+ "schema": {
348
+ "$ref": "#/components/schemas/PartnerClientWithSecret"
349
+ }
350
+ }
351
+ }
352
+ },
353
+ "401": {
354
+ "$ref": "#/components/responses/Unauthorized"
355
+ },
356
+ "403": {
357
+ "$ref": "#/components/responses/Forbidden"
358
+ },
359
+ "404": {
360
+ "$ref": "#/components/responses/NotFound"
361
+ },
362
+ "409": {
363
+ "$ref": "#/components/responses/Conflict"
364
+ }
365
+ }
366
+ }
367
+ },
368
+ "/v1/identity/operator/clients/{client_id}/organizations": {
369
+ "parameters": [
370
+ {
371
+ "$ref": "#/components/parameters/ClientIdPath"
372
+ }
373
+ ],
374
+ "get": {
375
+ "operationId": "listClientOrganizations",
376
+ "summary": "listClientOrganizations",
377
+ "description": "List the organizations enabled on a client, including suspended and revoked ones.",
378
+ "tags": [
379
+ "Operator Organizations"
380
+ ],
381
+ "parameters": [
382
+ {
383
+ "$ref": "#/components/parameters/OrgEnablementStatusQuery"
384
+ }
385
+ ],
386
+ "responses": {
387
+ "200": {
388
+ "description": "Organization enablements",
389
+ "content": {
390
+ "application/json": {
391
+ "schema": {
392
+ "$ref": "#/components/schemas/OrgEnablementList"
393
+ }
394
+ }
395
+ }
396
+ },
397
+ "401": {
398
+ "$ref": "#/components/responses/Unauthorized"
399
+ },
400
+ "403": {
401
+ "$ref": "#/components/responses/Forbidden"
402
+ },
403
+ "404": {
404
+ "$ref": "#/components/responses/NotFound"
405
+ }
406
+ }
407
+ },
408
+ "post": {
409
+ "operationId": "enableClientOrganization",
410
+ "summary": "enableClientOrganization",
411
+ "description": "Enable an epilot organization on a client, recording the customer's authorization policy\n(version 1). `allowed_scopes` must contain `openid` and be a subset of the client's\n`scopes_allowed`.\n",
412
+ "tags": [
413
+ "Operator Organizations"
414
+ ],
415
+ "requestBody": {
416
+ "required": true,
417
+ "content": {
418
+ "application/json": {
419
+ "schema": {
420
+ "$ref": "#/components/schemas/OrgEnablementCreate"
421
+ }
422
+ }
423
+ }
424
+ },
425
+ "responses": {
426
+ "201": {
427
+ "description": "Created enablement",
428
+ "content": {
429
+ "application/json": {
430
+ "schema": {
431
+ "$ref": "#/components/schemas/OrgEnablement"
432
+ }
433
+ }
434
+ }
435
+ },
436
+ "400": {
437
+ "$ref": "#/components/responses/BadRequest"
438
+ },
439
+ "401": {
440
+ "$ref": "#/components/responses/Unauthorized"
441
+ },
442
+ "403": {
443
+ "$ref": "#/components/responses/Forbidden"
444
+ },
445
+ "404": {
446
+ "$ref": "#/components/responses/NotFound"
447
+ },
448
+ "409": {
449
+ "$ref": "#/components/responses/Conflict"
450
+ }
451
+ }
452
+ }
453
+ },
454
+ "/v1/identity/operator/clients/{client_id}/organizations/{org_id}": {
455
+ "parameters": [
456
+ {
457
+ "$ref": "#/components/parameters/ClientIdPath"
458
+ },
459
+ {
460
+ "$ref": "#/components/parameters/OrgIdPath"
461
+ }
462
+ ],
463
+ "get": {
464
+ "operationId": "getClientOrganization",
465
+ "summary": "getClientOrganization",
466
+ "description": "Read one organization enablement.",
467
+ "tags": [
468
+ "Operator Organizations"
469
+ ],
470
+ "responses": {
471
+ "200": {
472
+ "description": "Enablement",
473
+ "content": {
474
+ "application/json": {
475
+ "schema": {
476
+ "$ref": "#/components/schemas/OrgEnablement"
477
+ }
478
+ }
479
+ }
480
+ },
481
+ "401": {
482
+ "$ref": "#/components/responses/Unauthorized"
483
+ },
484
+ "403": {
485
+ "$ref": "#/components/responses/Forbidden"
486
+ },
487
+ "404": {
488
+ "$ref": "#/components/responses/NotFound"
489
+ }
490
+ }
491
+ },
492
+ "put": {
493
+ "operationId": "updateClientOrganization",
494
+ "summary": "updateClientOrganization",
495
+ "description": "Record a new version of the customer's authorization policy. `expected_policy_version` must\nequal the current version (compare-and-swap); a mismatch is rejected with `409`.\n",
496
+ "tags": [
497
+ "Operator Organizations"
498
+ ],
499
+ "requestBody": {
500
+ "required": true,
501
+ "content": {
502
+ "application/json": {
503
+ "schema": {
504
+ "$ref": "#/components/schemas/OrgEnablementUpdate"
505
+ }
506
+ }
507
+ }
508
+ },
509
+ "responses": {
510
+ "200": {
511
+ "description": "Updated enablement",
512
+ "content": {
513
+ "application/json": {
514
+ "schema": {
515
+ "$ref": "#/components/schemas/OrgEnablement"
516
+ }
517
+ }
518
+ }
519
+ },
520
+ "400": {
521
+ "$ref": "#/components/responses/BadRequest"
522
+ },
523
+ "401": {
524
+ "$ref": "#/components/responses/Unauthorized"
525
+ },
526
+ "403": {
527
+ "$ref": "#/components/responses/Forbidden"
528
+ },
529
+ "404": {
530
+ "$ref": "#/components/responses/NotFound"
531
+ },
532
+ "409": {
533
+ "$ref": "#/components/responses/Conflict"
534
+ }
535
+ }
536
+ },
537
+ "delete": {
538
+ "operationId": "revokeClientOrganization",
539
+ "summary": "revokeClientOrganization",
540
+ "description": "Revoke an organization's enablement. The record is kept as an audited tombstone; future\nauthorizations for this organization fail with `access_denied` and provider-side artefacts\nbound to it are revoked.\n",
541
+ "tags": [
542
+ "Operator Organizations"
543
+ ],
544
+ "requestBody": {
545
+ "required": false,
546
+ "content": {
547
+ "application/json": {
548
+ "schema": {
549
+ "$ref": "#/components/schemas/StatusChangeRequest"
550
+ }
551
+ }
552
+ }
553
+ },
554
+ "responses": {
555
+ "200": {
556
+ "description": "Revoked enablement",
557
+ "content": {
558
+ "application/json": {
559
+ "schema": {
560
+ "$ref": "#/components/schemas/OrgEnablement"
561
+ }
562
+ }
563
+ }
564
+ },
565
+ "401": {
566
+ "$ref": "#/components/responses/Unauthorized"
567
+ },
568
+ "403": {
569
+ "$ref": "#/components/responses/Forbidden"
570
+ },
571
+ "404": {
572
+ "$ref": "#/components/responses/NotFound"
573
+ }
574
+ }
575
+ }
576
+ },
577
+ "/v1/identity/operator/clients/{client_id}/organizations/{org_id}:suspend": {
578
+ "parameters": [
579
+ {
580
+ "$ref": "#/components/parameters/ClientIdPath"
581
+ },
582
+ {
583
+ "$ref": "#/components/parameters/OrgIdPath"
584
+ }
585
+ ],
586
+ "post": {
587
+ "operationId": "suspendClientOrganization",
588
+ "summary": "suspendClientOrganization",
589
+ "description": "Temporarily block one organization on this client. Reversible with `activateClientOrganization`.",
590
+ "tags": [
591
+ "Operator Organizations"
592
+ ],
593
+ "requestBody": {
594
+ "required": false,
595
+ "content": {
596
+ "application/json": {
597
+ "schema": {
598
+ "$ref": "#/components/schemas/StatusChangeRequest"
599
+ }
600
+ }
601
+ }
602
+ },
603
+ "responses": {
604
+ "200": {
605
+ "description": "Suspended enablement",
606
+ "content": {
607
+ "application/json": {
608
+ "schema": {
609
+ "$ref": "#/components/schemas/OrgEnablement"
610
+ }
611
+ }
612
+ }
613
+ },
614
+ "401": {
615
+ "$ref": "#/components/responses/Unauthorized"
616
+ },
617
+ "403": {
618
+ "$ref": "#/components/responses/Forbidden"
619
+ },
620
+ "404": {
621
+ "$ref": "#/components/responses/NotFound"
622
+ },
623
+ "409": {
624
+ "$ref": "#/components/responses/Conflict"
625
+ }
626
+ }
627
+ }
628
+ },
629
+ "/v1/identity/operator/clients/{client_id}/organizations/{org_id}:activate": {
630
+ "parameters": [
631
+ {
632
+ "$ref": "#/components/parameters/ClientIdPath"
633
+ },
634
+ {
635
+ "$ref": "#/components/parameters/OrgIdPath"
636
+ }
637
+ ],
638
+ "post": {
639
+ "operationId": "activateClientOrganization",
640
+ "summary": "activateClientOrganization",
641
+ "description": "Resume a suspended organization on this client. Revoked enablements cannot be re-activated; enabling the organization again (`POST …/organizations`) replaces the revoked entry and continues its policy version.",
642
+ "tags": [
643
+ "Operator Organizations"
644
+ ],
645
+ "responses": {
646
+ "200": {
647
+ "description": "Active enablement",
648
+ "content": {
649
+ "application/json": {
650
+ "schema": {
651
+ "$ref": "#/components/schemas/OrgEnablement"
652
+ }
653
+ }
654
+ }
655
+ },
656
+ "401": {
657
+ "$ref": "#/components/responses/Unauthorized"
658
+ },
659
+ "403": {
660
+ "$ref": "#/components/responses/Forbidden"
661
+ },
662
+ "404": {
663
+ "$ref": "#/components/responses/NotFound"
664
+ },
665
+ "409": {
666
+ "$ref": "#/components/responses/Conflict"
667
+ }
668
+ }
669
+ }
670
+ },
671
+ "/v1/identity/session": {
672
+ "get": {
673
+ "operationId": "createIdentitySession",
674
+ "summary": "createIdentitySession",
675
+ "description": "Called by the epilot portal through the portal-host proxy after every persisted 360 session.\nValidates the 360 bearer token itself and mirrors it into the `identity_session` cookie\n(`HttpOnly; Secure; Path=/v1/identity`) whose lifetime equals the remaining token lifetime.\nThe cookie is what proves the live 360 session during `completeInteraction`.\n",
676
+ "tags": [
677
+ "Session"
678
+ ],
679
+ "security": [
680
+ {
681
+ "EpilotAuth": []
682
+ }
683
+ ],
684
+ "responses": {
685
+ "200": {
686
+ "description": "Session mirrored into the cookie",
687
+ "headers": {
688
+ "Set-Cookie": {
689
+ "description": "`identity_session=<360 ID token>; HttpOnly; Secure; SameSite=None; Path=/v1/identity; Max-Age=<remaining lifetime>`",
690
+ "schema": {
691
+ "type": "string"
692
+ }
693
+ }
694
+ },
695
+ "content": {
696
+ "application/json": {
697
+ "schema": {
698
+ "$ref": "#/components/schemas/IdentitySession"
699
+ }
700
+ }
701
+ }
702
+ },
703
+ "401": {
704
+ "$ref": "#/components/responses/Unauthorized"
705
+ }
706
+ }
707
+ },
708
+ "delete": {
709
+ "operationId": "deleteIdentitySession",
710
+ "summary": "deleteIdentitySession",
711
+ "description": "Clears the `identity_session` cookie. Called by the portal on logout.",
712
+ "tags": [
713
+ "Session"
714
+ ],
715
+ "security": [],
716
+ "responses": {
717
+ "204": {
718
+ "description": "Cookie cleared",
719
+ "headers": {
720
+ "Set-Cookie": {
721
+ "description": "Expired `identity_session` cookie",
722
+ "schema": {
723
+ "type": "string"
724
+ }
725
+ }
726
+ }
727
+ }
728
+ }
729
+ }
730
+ },
731
+ "/v1/identity/interaction/{interaction_id}": {
732
+ "parameters": [
733
+ {
734
+ "name": "interaction_id",
735
+ "in": "path",
736
+ "required": true,
737
+ "description": "Opaque identifier of the parked authorization request",
738
+ "schema": {
739
+ "type": "string",
740
+ "minLength": 1,
741
+ "maxLength": 128
742
+ }
743
+ }
744
+ ]
745
+ },
746
+ "/v1/identity/launch/{client_id}": {
747
+ "parameters": [
748
+ {
749
+ "$ref": "#/components/parameters/ClientIdPath"
750
+ }
751
+ ],
752
+ "get": {
753
+ "operationId": "launchClient",
754
+ "summary": "launchClient",
755
+ "description": "One validated place for partner start links (manager UI, hosted apps). Redirects the browser to the\nclient's registered `initiate_login_uri` with `iss` set to this issuer and, when given, the deep link as\n`target_link_uri` (OpenID Connect Core §4, third-party initiated login). Authenticates nobody: the partner\nthen starts a normal \"Sign in with epilot\" authorization.\n\n`target` must be an absolute HTTPS URL starting with one of the client's registered\n`launch_target_prefixes`; anything else is rejected. Retired, suspended or draft clients, and clients\nwithout an `initiate_login_uri`, answer `404`.\n",
756
+ "tags": [
757
+ "Launch"
758
+ ],
759
+ "security": [],
760
+ "parameters": [
761
+ {
762
+ "name": "target",
763
+ "in": "query",
764
+ "required": false,
765
+ "description": "Deep link inside the partner application to continue to after login",
766
+ "schema": {
767
+ "type": "string",
768
+ "format": "uri",
769
+ "maxLength": 2048
770
+ }
771
+ },
772
+ {
773
+ "$ref": "#/components/parameters/AnyOtherQueryParameters"
774
+ }
775
+ ],
776
+ "responses": {
777
+ "302": {
778
+ "description": "Redirect to the partner's initiate_login_uri",
779
+ "headers": {
780
+ "Location": {
781
+ "schema": {
782
+ "type": "string",
783
+ "format": "uri"
784
+ }
785
+ }
786
+ }
787
+ },
788
+ "400": {
789
+ "$ref": "#/components/responses/BadRequest"
790
+ },
791
+ "404": {
792
+ "$ref": "#/components/responses/NotFound"
793
+ }
794
+ }
795
+ }
796
+ }
797
+ },
798
+ "components": {
799
+ "securitySchemes": {
800
+ "OperatorAuth": {
801
+ "type": "http",
802
+ "scheme": "bearer",
803
+ "bearerFormat": "JWT",
804
+ "description": "Internal-auth bearer token minted for an epilot admin-portal user. Customer organization\nbearers are never accepted; the caller must belong to an allowed admin-portal group.\n"
805
+ },
806
+ "EpilotAuth": {
807
+ "type": "http",
808
+ "scheme": "bearer",
809
+ "bearerFormat": "JWT",
810
+ "description": "Authorization header with the caller's epilot 360 bearer token."
811
+ },
812
+ "IdentitySessionCookie": {
813
+ "type": "apiKey",
814
+ "in": "cookie",
815
+ "name": "identity_session",
816
+ "description": "Cookie set by `createIdentitySession`, carrying the live 360 credential."
817
+ }
818
+ },
819
+ "parameters": {
820
+ "AnyOtherQueryParameters": {
821
+ "name": "extra",
822
+ "in": "query",
823
+ "required": false,
824
+ "description": "Any other query parameters (marketing tags on a start link, parameters a proxy appends) are accepted\nand ignored. Start links and the session hop must never fail on an unknown parameter.\n",
825
+ "style": "form",
826
+ "explode": true,
827
+ "schema": {
828
+ "type": "object",
829
+ "additionalProperties": true
830
+ }
831
+ },
832
+ "ClientIdPath": {
833
+ "name": "client_id",
834
+ "in": "path",
835
+ "required": true,
836
+ "schema": {
837
+ "$ref": "#/components/schemas/PartnerClientId"
838
+ }
839
+ },
840
+ "OrgIdPath": {
841
+ "name": "org_id",
842
+ "in": "path",
843
+ "required": true,
844
+ "schema": {
845
+ "$ref": "#/components/schemas/OrgId"
846
+ }
847
+ },
848
+ "PartnerKeyQuery": {
849
+ "name": "partner_key",
850
+ "in": "query",
851
+ "required": false,
852
+ "description": "Filter by partner key",
853
+ "schema": {
854
+ "type": "string"
855
+ }
856
+ },
857
+ "ClientStatusQuery": {
858
+ "name": "status",
859
+ "in": "query",
860
+ "required": false,
861
+ "schema": {
862
+ "$ref": "#/components/schemas/PartnerClientStatus"
863
+ }
864
+ },
865
+ "OrgEnablementStatusQuery": {
866
+ "name": "status",
867
+ "in": "query",
868
+ "required": false,
869
+ "schema": {
870
+ "$ref": "#/components/schemas/OrgEnablementStatus"
871
+ }
872
+ },
873
+ "SizeQuery": {
874
+ "name": "size",
875
+ "in": "query",
876
+ "required": false,
877
+ "schema": {
878
+ "type": "integer",
879
+ "minimum": 1,
880
+ "maximum": 200,
881
+ "default": 50
882
+ }
883
+ },
884
+ "CursorQuery": {
885
+ "name": "cursor",
886
+ "in": "query",
887
+ "required": false,
888
+ "description": "Opaque cursor from a previous response",
889
+ "schema": {
890
+ "type": "string"
891
+ }
892
+ }
893
+ },
894
+ "responses": {
895
+ "BadRequest": {
896
+ "description": "Invalid request",
897
+ "content": {
898
+ "application/json": {
899
+ "schema": {
900
+ "$ref": "#/components/schemas/Error"
901
+ }
902
+ }
903
+ }
904
+ },
905
+ "Unauthorized": {
906
+ "description": "Missing or invalid credentials",
907
+ "content": {
908
+ "application/json": {
909
+ "schema": {
910
+ "$ref": "#/components/schemas/Error"
911
+ }
912
+ }
913
+ }
914
+ },
915
+ "Forbidden": {
916
+ "description": "Caller is not a platform operator",
917
+ "content": {
918
+ "application/json": {
919
+ "schema": {
920
+ "$ref": "#/components/schemas/Error"
921
+ }
922
+ }
923
+ }
924
+ },
925
+ "NotFound": {
926
+ "description": "Not found",
927
+ "content": {
928
+ "application/json": {
929
+ "schema": {
930
+ "$ref": "#/components/schemas/Error"
931
+ }
932
+ }
933
+ }
934
+ },
935
+ "Conflict": {
936
+ "description": "Version mismatch or invalid state transition",
937
+ "content": {
938
+ "application/json": {
939
+ "schema": {
940
+ "$ref": "#/components/schemas/Error"
941
+ }
942
+ }
943
+ }
944
+ }
945
+ },
946
+ "schemas": {
947
+ "Error": {
948
+ "type": "object",
949
+ "required": [
950
+ "status",
951
+ "error"
952
+ ],
953
+ "properties": {
954
+ "status": {
955
+ "type": "integer",
956
+ "example": 404
957
+ },
958
+ "error": {
959
+ "type": "string",
960
+ "example": "Client not found"
961
+ },
962
+ "details": {
963
+ "type": "array",
964
+ "description": "Request validation problems (only on `400` from schema validation)",
965
+ "items": {
966
+ "type": "object",
967
+ "additionalProperties": true
968
+ }
969
+ }
970
+ }
971
+ },
972
+ "PartnerClientId": {
973
+ "type": "string",
974
+ "description": "Opaque client identifier, unique within the issuer, never reused",
975
+ "example": "bf-prod-x7k2",
976
+ "minLength": 1,
977
+ "maxLength": 128,
978
+ "pattern": "^[A-Za-z0-9._~-]+$"
979
+ },
980
+ "OrgId": {
981
+ "type": "string",
982
+ "description": "epilot organization id, an opaque case-sensitive string",
983
+ "example": "739224",
984
+ "minLength": 1,
985
+ "maxLength": 64,
986
+ "pattern": "^[A-Za-z0-9_-]+$"
987
+ },
988
+ "Environment": {
989
+ "type": "string",
990
+ "description": "Partner-side environment this client belongs to",
991
+ "enum": [
992
+ "dev",
993
+ "staging",
994
+ "production"
995
+ ]
996
+ },
997
+ "PartnerClientStatus": {
998
+ "type": "string",
999
+ "enum": [
1000
+ "draft",
1001
+ "active",
1002
+ "suspended",
1003
+ "retired"
1004
+ ]
1005
+ },
1006
+ "Scope": {
1007
+ "type": "string",
1008
+ "enum": [
1009
+ "openid",
1010
+ "email",
1011
+ "profile"
1012
+ ]
1013
+ },
1014
+ "HttpsUri": {
1015
+ "type": "string",
1016
+ "format": "uri",
1017
+ "description": "Absolute HTTPS URL without fragment",
1018
+ "example": "https://partner.example.com/auth/callback"
1019
+ },
1020
+ "PartnerClientCreate": {
1021
+ "type": "object",
1022
+ "required": [
1023
+ "partner_key",
1024
+ "display_name",
1025
+ "environment",
1026
+ "redirect_uris"
1027
+ ],
1028
+ "properties": {
1029
+ "partner_key": {
1030
+ "type": "string",
1031
+ "description": "Stable key of the partner application, shared by its environments",
1032
+ "example": "babelforce",
1033
+ "minLength": 1,
1034
+ "maxLength": 64,
1035
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
1036
+ },
1037
+ "display_name": {
1038
+ "type": "string",
1039
+ "example": "Babelforce",
1040
+ "minLength": 1,
1041
+ "maxLength": 128
1042
+ },
1043
+ "description": {
1044
+ "type": "string",
1045
+ "maxLength": 1024
1046
+ },
1047
+ "environment": {
1048
+ "$ref": "#/components/schemas/Environment"
1049
+ },
1050
+ "redirect_uris": {
1051
+ "type": "array",
1052
+ "minItems": 1,
1053
+ "items": {
1054
+ "$ref": "#/components/schemas/HttpsUri"
1055
+ }
1056
+ },
1057
+ "sector_identifier_uri": {
1058
+ "allOf": [
1059
+ {
1060
+ "$ref": "#/components/schemas/HttpsUri"
1061
+ }
1062
+ ],
1063
+ "description": "Optional. Pairwise sector for `sub` derivation. Required when the redirect URIs span\nmore than one host, so one person keeps one `sub` at this partner.\n"
1064
+ },
1065
+ "initiate_login_uri": {
1066
+ "allOf": [
1067
+ {
1068
+ "$ref": "#/components/schemas/HttpsUri"
1069
+ }
1070
+ ],
1071
+ "description": "Where a login started from epilot should begin at the partner"
1072
+ },
1073
+ "launch_target_prefixes": {
1074
+ "type": "array",
1075
+ "description": "Allowed prefixes for deep-link targets when a login is started from epilot",
1076
+ "items": {
1077
+ "type": "string"
1078
+ }
1079
+ },
1080
+ "scopes_allowed": {
1081
+ "type": "array",
1082
+ "description": "Upper bound for every organization enablement's `allowed_scopes`. Defaults to all scopes.",
1083
+ "minItems": 1,
1084
+ "uniqueItems": true,
1085
+ "items": {
1086
+ "$ref": "#/components/schemas/Scope"
1087
+ }
1088
+ }
1089
+ }
1090
+ },
1091
+ "PartnerClientUpdate": {
1092
+ "type": "object",
1093
+ "required": [
1094
+ "config_version",
1095
+ "display_name",
1096
+ "redirect_uris",
1097
+ "scopes_allowed"
1098
+ ],
1099
+ "properties": {
1100
+ "config_version": {
1101
+ "type": "integer",
1102
+ "description": "Current configuration version, for compare-and-swap",
1103
+ "minimum": 1
1104
+ },
1105
+ "allow_sector_change": {
1106
+ "type": "boolean",
1107
+ "default": false,
1108
+ "description": "Required (true) when the update changes the pairwise sector of an **active** client, i.e. the\n`sector_identifier_uri` host or, without one, the redirect host. Changing the sector changes the\n`sub` of every person at this partner; without this flag such an update is rejected with `409`.\n"
1109
+ },
1110
+ "display_name": {
1111
+ "type": "string",
1112
+ "minLength": 1,
1113
+ "maxLength": 128
1114
+ },
1115
+ "description": {
1116
+ "type": "string",
1117
+ "maxLength": 1024
1118
+ },
1119
+ "redirect_uris": {
1120
+ "type": "array",
1121
+ "minItems": 1,
1122
+ "items": {
1123
+ "$ref": "#/components/schemas/HttpsUri"
1124
+ }
1125
+ },
1126
+ "sector_identifier_uri": {
1127
+ "$ref": "#/components/schemas/HttpsUri"
1128
+ },
1129
+ "initiate_login_uri": {
1130
+ "$ref": "#/components/schemas/HttpsUri"
1131
+ },
1132
+ "launch_target_prefixes": {
1133
+ "type": "array",
1134
+ "items": {
1135
+ "type": "string"
1136
+ }
1137
+ },
1138
+ "scopes_allowed": {
1139
+ "type": "array",
1140
+ "minItems": 1,
1141
+ "uniqueItems": true,
1142
+ "items": {
1143
+ "$ref": "#/components/schemas/Scope"
1144
+ }
1145
+ }
1146
+ }
1147
+ },
1148
+ "PartnerClient": {
1149
+ "type": "object",
1150
+ "required": [
1151
+ "client_id",
1152
+ "partner_key",
1153
+ "display_name",
1154
+ "environment",
1155
+ "redirect_uris",
1156
+ "token_endpoint_auth_method",
1157
+ "grant_types",
1158
+ "scopes_allowed",
1159
+ "status",
1160
+ "config_version",
1161
+ "created_at",
1162
+ "updated_at"
1163
+ ],
1164
+ "properties": {
1165
+ "client_id": {
1166
+ "$ref": "#/components/schemas/PartnerClientId"
1167
+ },
1168
+ "partner_key": {
1169
+ "type": "string"
1170
+ },
1171
+ "display_name": {
1172
+ "type": "string"
1173
+ },
1174
+ "description": {
1175
+ "type": "string"
1176
+ },
1177
+ "environment": {
1178
+ "$ref": "#/components/schemas/Environment"
1179
+ },
1180
+ "redirect_uris": {
1181
+ "type": "array",
1182
+ "items": {
1183
+ "$ref": "#/components/schemas/HttpsUri"
1184
+ }
1185
+ },
1186
+ "sector_identifier_uri": {
1187
+ "$ref": "#/components/schemas/HttpsUri"
1188
+ },
1189
+ "initiate_login_uri": {
1190
+ "$ref": "#/components/schemas/HttpsUri"
1191
+ },
1192
+ "launch_target_prefixes": {
1193
+ "type": "array",
1194
+ "items": {
1195
+ "type": "string"
1196
+ }
1197
+ },
1198
+ "token_endpoint_auth_method": {
1199
+ "type": "string",
1200
+ "enum": [
1201
+ "client_secret_basic"
1202
+ ]
1203
+ },
1204
+ "grant_types": {
1205
+ "type": "array",
1206
+ "items": {
1207
+ "type": "string",
1208
+ "enum": [
1209
+ "authorization_code"
1210
+ ]
1211
+ }
1212
+ },
1213
+ "scopes_allowed": {
1214
+ "type": "array",
1215
+ "items": {
1216
+ "$ref": "#/components/schemas/Scope"
1217
+ }
1218
+ },
1219
+ "status": {
1220
+ "$ref": "#/components/schemas/PartnerClientStatus"
1221
+ },
1222
+ "status_reason": {
1223
+ "type": "string",
1224
+ "description": "Operator-supplied reason for the last suspension or retirement"
1225
+ },
1226
+ "config_version": {
1227
+ "type": "integer",
1228
+ "minimum": 1
1229
+ },
1230
+ "secret_rotated_at": {
1231
+ "type": "string",
1232
+ "format": "date-time"
1233
+ },
1234
+ "previous_secret_expires_at": {
1235
+ "type": "string",
1236
+ "format": "date-time",
1237
+ "description": "Until when the previous secret still authenticates after a rotation"
1238
+ },
1239
+ "created_at": {
1240
+ "type": "string",
1241
+ "format": "date-time"
1242
+ },
1243
+ "updated_at": {
1244
+ "type": "string",
1245
+ "format": "date-time"
1246
+ },
1247
+ "created_by": {
1248
+ "type": "string",
1249
+ "description": "Admin-portal identity of the operator who created the client"
1250
+ },
1251
+ "updated_by": {
1252
+ "type": "string"
1253
+ }
1254
+ }
1255
+ },
1256
+ "PartnerClientWithSecret": {
1257
+ "allOf": [
1258
+ {
1259
+ "$ref": "#/components/schemas/PartnerClient"
1260
+ },
1261
+ {
1262
+ "type": "object",
1263
+ "required": [
1264
+ "client_secret"
1265
+ ],
1266
+ "properties": {
1267
+ "client_secret": {
1268
+ "type": "string",
1269
+ "description": "Returned exactly once. Store it securely; it cannot be retrieved again."
1270
+ }
1271
+ }
1272
+ }
1273
+ ]
1274
+ },
1275
+ "PartnerClientList": {
1276
+ "type": "object",
1277
+ "required": [
1278
+ "results"
1279
+ ],
1280
+ "properties": {
1281
+ "results": {
1282
+ "type": "array",
1283
+ "items": {
1284
+ "$ref": "#/components/schemas/PartnerClient"
1285
+ }
1286
+ },
1287
+ "next_cursor": {
1288
+ "type": "string",
1289
+ "nullable": true
1290
+ }
1291
+ }
1292
+ },
1293
+ "StatusChangeRequest": {
1294
+ "type": "object",
1295
+ "properties": {
1296
+ "reason": {
1297
+ "type": "string",
1298
+ "maxLength": 1024
1299
+ }
1300
+ }
1301
+ },
1302
+ "RotateSecretRequest": {
1303
+ "type": "object",
1304
+ "properties": {
1305
+ "compromise_mode": {
1306
+ "type": "boolean",
1307
+ "default": false,
1308
+ "description": "When true the previous secret stops working immediately"
1309
+ },
1310
+ "migration_window_seconds": {
1311
+ "type": "integer",
1312
+ "minimum": 0,
1313
+ "maximum": 2592000,
1314
+ "default": 86400,
1315
+ "description": "How long the previous secret keeps working (ignored in compromise mode)"
1316
+ }
1317
+ }
1318
+ },
1319
+ "AuthorizationPolicyInput": {
1320
+ "type": "object",
1321
+ "required": [
1322
+ "allowed_scopes",
1323
+ "customer_approval_ref",
1324
+ "approved_at"
1325
+ ],
1326
+ "properties": {
1327
+ "mode": {
1328
+ "type": "string",
1329
+ "enum": [
1330
+ "preauthorized"
1331
+ ],
1332
+ "default": "preauthorized"
1333
+ },
1334
+ "population": {
1335
+ "type": "string",
1336
+ "enum": [
1337
+ "all_current_org_members"
1338
+ ],
1339
+ "default": "all_current_org_members"
1340
+ },
1341
+ "allowed_scopes": {
1342
+ "type": "array",
1343
+ "minItems": 1,
1344
+ "uniqueItems": true,
1345
+ "description": "Must contain `openid` and be a subset of the client's `scopes_allowed`",
1346
+ "items": {
1347
+ "$ref": "#/components/schemas/Scope"
1348
+ }
1349
+ },
1350
+ "customer_approval_ref": {
1351
+ "type": "string",
1352
+ "description": "Reference to the customer's approval evidence (ticket, signed order, contract clause)",
1353
+ "minLength": 1,
1354
+ "maxLength": 512
1355
+ },
1356
+ "approved_at": {
1357
+ "type": "string",
1358
+ "format": "date-time"
1359
+ }
1360
+ }
1361
+ },
1362
+ "AuthorizationPolicy": {
1363
+ "allOf": [
1364
+ {
1365
+ "$ref": "#/components/schemas/AuthorizationPolicyInput"
1366
+ },
1367
+ {
1368
+ "type": "object",
1369
+ "required": [
1370
+ "version",
1371
+ "mandatory_claims",
1372
+ "recorded_by",
1373
+ "recorded_at"
1374
+ ],
1375
+ "properties": {
1376
+ "version": {
1377
+ "type": "integer",
1378
+ "minimum": 1
1379
+ },
1380
+ "mandatory_claims": {
1381
+ "type": "array",
1382
+ "items": {
1383
+ "type": "string",
1384
+ "enum": [
1385
+ "org_id"
1386
+ ]
1387
+ }
1388
+ },
1389
+ "recorded_by": {
1390
+ "type": "string"
1391
+ },
1392
+ "recorded_at": {
1393
+ "type": "string",
1394
+ "format": "date-time"
1395
+ }
1396
+ }
1397
+ }
1398
+ ]
1399
+ },
1400
+ "PartnerAccount": {
1401
+ "type": "object",
1402
+ "description": "Optional audit reference to the partner tenant this organization maps to. The partner enforces the mapping.",
1403
+ "required": [
1404
+ "id"
1405
+ ],
1406
+ "properties": {
1407
+ "id": {
1408
+ "type": "string",
1409
+ "maxLength": 256
1410
+ },
1411
+ "label": {
1412
+ "type": "string",
1413
+ "maxLength": 256
1414
+ }
1415
+ }
1416
+ },
1417
+ "OrgEnablementStatus": {
1418
+ "type": "string",
1419
+ "enum": [
1420
+ "active",
1421
+ "suspended",
1422
+ "revoked"
1423
+ ]
1424
+ },
1425
+ "OrgEnablementCreate": {
1426
+ "type": "object",
1427
+ "required": [
1428
+ "org_id",
1429
+ "authorization_policy"
1430
+ ],
1431
+ "properties": {
1432
+ "org_id": {
1433
+ "$ref": "#/components/schemas/OrgId"
1434
+ },
1435
+ "authorization_policy": {
1436
+ "$ref": "#/components/schemas/AuthorizationPolicyInput"
1437
+ },
1438
+ "partner_account": {
1439
+ "$ref": "#/components/schemas/PartnerAccount"
1440
+ }
1441
+ }
1442
+ },
1443
+ "OrgEnablementUpdate": {
1444
+ "type": "object",
1445
+ "required": [
1446
+ "expected_policy_version",
1447
+ "authorization_policy"
1448
+ ],
1449
+ "properties": {
1450
+ "expected_policy_version": {
1451
+ "type": "integer",
1452
+ "minimum": 1,
1453
+ "description": "Current policy version, for compare-and-swap"
1454
+ },
1455
+ "authorization_policy": {
1456
+ "$ref": "#/components/schemas/AuthorizationPolicyInput"
1457
+ },
1458
+ "partner_account": {
1459
+ "$ref": "#/components/schemas/PartnerAccount"
1460
+ }
1461
+ }
1462
+ },
1463
+ "OrgEnablement": {
1464
+ "type": "object",
1465
+ "required": [
1466
+ "client_id",
1467
+ "org_id",
1468
+ "status",
1469
+ "authorization_policy",
1470
+ "created_at",
1471
+ "updated_at"
1472
+ ],
1473
+ "properties": {
1474
+ "client_id": {
1475
+ "$ref": "#/components/schemas/PartnerClientId"
1476
+ },
1477
+ "org_id": {
1478
+ "$ref": "#/components/schemas/OrgId"
1479
+ },
1480
+ "status": {
1481
+ "$ref": "#/components/schemas/OrgEnablementStatus"
1482
+ },
1483
+ "status_reason": {
1484
+ "type": "string"
1485
+ },
1486
+ "authorization_policy": {
1487
+ "$ref": "#/components/schemas/AuthorizationPolicy"
1488
+ },
1489
+ "partner_account": {
1490
+ "$ref": "#/components/schemas/PartnerAccount"
1491
+ },
1492
+ "created_at": {
1493
+ "type": "string",
1494
+ "format": "date-time"
1495
+ },
1496
+ "updated_at": {
1497
+ "type": "string",
1498
+ "format": "date-time"
1499
+ },
1500
+ "created_by": {
1501
+ "type": "string"
1502
+ },
1503
+ "updated_by": {
1504
+ "type": "string"
1505
+ }
1506
+ }
1507
+ },
1508
+ "OrgEnablementList": {
1509
+ "type": "object",
1510
+ "required": [
1511
+ "results"
1512
+ ],
1513
+ "properties": {
1514
+ "results": {
1515
+ "type": "array",
1516
+ "items": {
1517
+ "$ref": "#/components/schemas/OrgEnablement"
1518
+ }
1519
+ }
1520
+ }
1521
+ },
1522
+ "IdentitySession": {
1523
+ "type": "object",
1524
+ "required": [
1525
+ "org_id",
1526
+ "user_id",
1527
+ "expires_at"
1528
+ ],
1529
+ "properties": {
1530
+ "org_id": {
1531
+ "$ref": "#/components/schemas/OrgId"
1532
+ },
1533
+ "user_id": {
1534
+ "type": "string",
1535
+ "description": "epilot user id of the session owner"
1536
+ },
1537
+ "expires_at": {
1538
+ "type": "string",
1539
+ "format": "date-time",
1540
+ "description": "When the mirrored credential, and therefore the cookie, expires"
1541
+ }
1542
+ }
1543
+ }
1544
+ }
1545
+ }
1546
+ }