@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,1279 @@
1
+ # Identity API
2
+
3
+ - **Base URL:** `https://id.epilot.cloud`
4
+ - **Full API Docs:** [https://docs.epilot.io/api/identity](https://docs.epilot.io/api/identity)
5
+
6
+ ## Usage
7
+
8
+ ```ts
9
+ import { epilot } from '@epilot/sdk'
10
+
11
+ epilot.authorize(() => '<token>')
12
+ const { data } = await epilot.identity.listClients(...)
13
+ ```
14
+
15
+ ### Tree-shakeable import
16
+
17
+ ```ts
18
+ import { getClient, authorize } from '@epilot/sdk/identity'
19
+
20
+ const identityClient = getClient()
21
+ authorize(identityClient, () => '<token>')
22
+ const { data } = await identityClient.listClients(...)
23
+ ```
24
+
25
+ ## Operations
26
+
27
+ **Operator Clients**
28
+ - [`listClients`](#listclients)
29
+ - [`createOidcClient`](#createoidcclient)
30
+ - [`getOidcClient`](#getoidcclient)
31
+ - [`updateClient`](#updateclient)
32
+ - [`retireClient`](#retireclient)
33
+ - [`activateClient`](#activateclient)
34
+ - [`suspendClient`](#suspendclient)
35
+ - [`rotateClientSecret`](#rotateclientsecret)
36
+
37
+ **Operator Organizations**
38
+ - [`listClientOrganizations`](#listclientorganizations)
39
+ - [`enableClientOrganization`](#enableclientorganization)
40
+ - [`getClientOrganization`](#getclientorganization)
41
+ - [`updateClientOrganization`](#updateclientorganization)
42
+ - [`revokeClientOrganization`](#revokeclientorganization)
43
+ - [`suspendClientOrganization`](#suspendclientorganization)
44
+ - [`activateClientOrganization`](#activateclientorganization)
45
+
46
+ **Session**
47
+ - [`createIdentitySession`](#createidentitysession)
48
+ - [`deleteIdentitySession`](#deleteidentitysession)
49
+
50
+ **Launch**
51
+ - [`launchClient`](#launchclient)
52
+
53
+ **Schemas**
54
+ - [`Error`](#error)
55
+ - [`PartnerClientId`](#partnerclientid)
56
+ - [`OrgId`](#orgid)
57
+ - [`Environment`](#environment)
58
+ - [`PartnerClientStatus`](#partnerclientstatus)
59
+ - [`Scope`](#scope)
60
+ - [`HttpsUri`](#httpsuri)
61
+ - [`PartnerClientCreate`](#partnerclientcreate)
62
+ - [`PartnerClientUpdate`](#partnerclientupdate)
63
+ - [`PartnerClient`](#partnerclient)
64
+ - [`PartnerClientWithSecret`](#partnerclientwithsecret)
65
+ - [`PartnerClientList`](#partnerclientlist)
66
+ - [`StatusChangeRequest`](#statuschangerequest)
67
+ - [`RotateSecretRequest`](#rotatesecretrequest)
68
+ - [`AuthorizationPolicyInput`](#authorizationpolicyinput)
69
+ - [`AuthorizationPolicy`](#authorizationpolicy)
70
+ - [`PartnerAccount`](#partneraccount)
71
+ - [`OrgEnablementStatus`](#orgenablementstatus)
72
+ - [`OrgEnablementCreate`](#orgenablementcreate)
73
+ - [`OrgEnablementUpdate`](#orgenablementupdate)
74
+ - [`OrgEnablement`](#orgenablement)
75
+ - [`OrgEnablementList`](#orgenablementlist)
76
+ - [`IdentitySession`](#identitysession)
77
+
78
+ ### `listClients`
79
+
80
+ List registered partner clients. The client secret is never returned.
81
+
82
+ `GET /v1/identity/operator/clients`
83
+
84
+ ```ts
85
+ const { data } = await client.listClients({
86
+ partner_key: 'example',
87
+ status: 'example',
88
+ size: 1,
89
+ cursor: 'example',
90
+ })
91
+ ```
92
+
93
+ <details>
94
+ <summary>Response</summary>
95
+
96
+ ```json
97
+ {
98
+ "results": [
99
+ {
100
+ "client_id": "bf-prod-x7k2",
101
+ "partner_key": "string",
102
+ "display_name": "string",
103
+ "description": "string",
104
+ "environment": "dev",
105
+ "redirect_uris": ["https://partner.example.com/auth/callback"],
106
+ "sector_identifier_uri": "https://partner.example.com/auth/callback",
107
+ "initiate_login_uri": "https://partner.example.com/auth/callback",
108
+ "launch_target_prefixes": ["string"],
109
+ "token_endpoint_auth_method": "client_secret_basic",
110
+ "grant_types": ["authorization_code"],
111
+ "scopes_allowed": ["openid"],
112
+ "status": "draft",
113
+ "status_reason": "string",
114
+ "config_version": 1,
115
+ "secret_rotated_at": "1970-01-01T00:00:00.000Z",
116
+ "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
117
+ "created_at": "1970-01-01T00:00:00.000Z",
118
+ "updated_at": "1970-01-01T00:00:00.000Z",
119
+ "created_by": "string",
120
+ "updated_by": "string"
121
+ }
122
+ ],
123
+ "next_cursor": "string"
124
+ }
125
+ ```
126
+
127
+ </details>
128
+
129
+ ---
130
+
131
+ ### `createOidcClient`
132
+
133
+ Create a partner client in `draft` status. The client secret is returned exactly once in this
134
+ response and can never be read again; use `rotateClientSecret` to obtain a new one.
135
+
136
+ `POST /v1/identity/operator/clients`
137
+
138
+ ```ts
139
+ const { data } = await client.createOidcClient(
140
+ null,
141
+ {
142
+ partner_key: 'babelforce',
143
+ display_name: 'Babelforce',
144
+ description: 'string',
145
+ environment: 'dev',
146
+ redirect_uris: ['https://partner.example.com/auth/callback'],
147
+ sector_identifier_uri: 'https://partner.example.com/auth/callback',
148
+ initiate_login_uri: 'https://partner.example.com/auth/callback',
149
+ launch_target_prefixes: ['string'],
150
+ scopes_allowed: ['openid']
151
+ },
152
+ )
153
+ ```
154
+
155
+ <details>
156
+ <summary>Response</summary>
157
+
158
+ ```json
159
+ {
160
+ "client_id": "bf-prod-x7k2",
161
+ "partner_key": "string",
162
+ "display_name": "string",
163
+ "description": "string",
164
+ "environment": "dev",
165
+ "redirect_uris": ["https://partner.example.com/auth/callback"],
166
+ "sector_identifier_uri": "https://partner.example.com/auth/callback",
167
+ "initiate_login_uri": "https://partner.example.com/auth/callback",
168
+ "launch_target_prefixes": ["string"],
169
+ "token_endpoint_auth_method": "client_secret_basic",
170
+ "grant_types": ["authorization_code"],
171
+ "scopes_allowed": ["openid"],
172
+ "status": "draft",
173
+ "status_reason": "string",
174
+ "config_version": 1,
175
+ "secret_rotated_at": "1970-01-01T00:00:00.000Z",
176
+ "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
177
+ "created_at": "1970-01-01T00:00:00.000Z",
178
+ "updated_at": "1970-01-01T00:00:00.000Z",
179
+ "created_by": "string",
180
+ "updated_by": "string",
181
+ "client_secret": "string"
182
+ }
183
+ ```
184
+
185
+ </details>
186
+
187
+ ---
188
+
189
+ ### `getOidcClient`
190
+
191
+ Read a partner client. The client secret is never returned.
192
+
193
+ `GET /v1/identity/operator/clients/{client_id}`
194
+
195
+ ```ts
196
+ const { data } = await client.getOidcClient({
197
+ client_id: 'example',
198
+ })
199
+ ```
200
+
201
+ <details>
202
+ <summary>Response</summary>
203
+
204
+ ```json
205
+ {
206
+ "client_id": "bf-prod-x7k2",
207
+ "partner_key": "string",
208
+ "display_name": "string",
209
+ "description": "string",
210
+ "environment": "dev",
211
+ "redirect_uris": ["https://partner.example.com/auth/callback"],
212
+ "sector_identifier_uri": "https://partner.example.com/auth/callback",
213
+ "initiate_login_uri": "https://partner.example.com/auth/callback",
214
+ "launch_target_prefixes": ["string"],
215
+ "token_endpoint_auth_method": "client_secret_basic",
216
+ "grant_types": ["authorization_code"],
217
+ "scopes_allowed": ["openid"],
218
+ "status": "draft",
219
+ "status_reason": "string",
220
+ "config_version": 1,
221
+ "secret_rotated_at": "1970-01-01T00:00:00.000Z",
222
+ "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
223
+ "created_at": "1970-01-01T00:00:00.000Z",
224
+ "updated_at": "1970-01-01T00:00:00.000Z",
225
+ "created_by": "string",
226
+ "updated_by": "string"
227
+ }
228
+ ```
229
+
230
+ </details>
231
+
232
+ ---
233
+
234
+ ### `updateClient`
235
+
236
+ Replace the mutable configuration of a client. `config_version` must equal the current
237
+ version (compare-and-swap); a mismatch is rejected with `409`.
238
+
239
+ `PUT /v1/identity/operator/clients/{client_id}`
240
+
241
+ ```ts
242
+ const { data } = await client.updateClient(
243
+ {
244
+ client_id: 'example',
245
+ },
246
+ {
247
+ config_version: 1,
248
+ allow_sector_change: false,
249
+ display_name: 'string',
250
+ description: 'string',
251
+ redirect_uris: ['https://partner.example.com/auth/callback'],
252
+ sector_identifier_uri: 'https://partner.example.com/auth/callback',
253
+ initiate_login_uri: 'https://partner.example.com/auth/callback',
254
+ launch_target_prefixes: ['string'],
255
+ scopes_allowed: ['openid']
256
+ },
257
+ )
258
+ ```
259
+
260
+ <details>
261
+ <summary>Response</summary>
262
+
263
+ ```json
264
+ {
265
+ "client_id": "bf-prod-x7k2",
266
+ "partner_key": "string",
267
+ "display_name": "string",
268
+ "description": "string",
269
+ "environment": "dev",
270
+ "redirect_uris": ["https://partner.example.com/auth/callback"],
271
+ "sector_identifier_uri": "https://partner.example.com/auth/callback",
272
+ "initiate_login_uri": "https://partner.example.com/auth/callback",
273
+ "launch_target_prefixes": ["string"],
274
+ "token_endpoint_auth_method": "client_secret_basic",
275
+ "grant_types": ["authorization_code"],
276
+ "scopes_allowed": ["openid"],
277
+ "status": "draft",
278
+ "status_reason": "string",
279
+ "config_version": 1,
280
+ "secret_rotated_at": "1970-01-01T00:00:00.000Z",
281
+ "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
282
+ "created_at": "1970-01-01T00:00:00.000Z",
283
+ "updated_at": "1970-01-01T00:00:00.000Z",
284
+ "created_by": "string",
285
+ "updated_by": "string"
286
+ }
287
+ ```
288
+
289
+ </details>
290
+
291
+ ---
292
+
293
+ ### `retireClient`
294
+
295
+ Retire a client. The record is kept as a tombstone, the `client_id` is never reused, every
296
+ organization enablement is revoked and all provider-side artefacts are revoked.
297
+
298
+ `DELETE /v1/identity/operator/clients/{client_id}`
299
+
300
+ ```ts
301
+ const { data } = await client.retireClient({
302
+ client_id: 'example',
303
+ })
304
+ ```
305
+
306
+ <details>
307
+ <summary>Response</summary>
308
+
309
+ ```json
310
+ {
311
+ "client_id": "bf-prod-x7k2",
312
+ "partner_key": "string",
313
+ "display_name": "string",
314
+ "description": "string",
315
+ "environment": "dev",
316
+ "redirect_uris": ["https://partner.example.com/auth/callback"],
317
+ "sector_identifier_uri": "https://partner.example.com/auth/callback",
318
+ "initiate_login_uri": "https://partner.example.com/auth/callback",
319
+ "launch_target_prefixes": ["string"],
320
+ "token_endpoint_auth_method": "client_secret_basic",
321
+ "grant_types": ["authorization_code"],
322
+ "scopes_allowed": ["openid"],
323
+ "status": "draft",
324
+ "status_reason": "string",
325
+ "config_version": 1,
326
+ "secret_rotated_at": "1970-01-01T00:00:00.000Z",
327
+ "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
328
+ "created_at": "1970-01-01T00:00:00.000Z",
329
+ "updated_at": "1970-01-01T00:00:00.000Z",
330
+ "created_by": "string",
331
+ "updated_by": "string"
332
+ }
333
+ ```
334
+
335
+ </details>
336
+
337
+ ---
338
+
339
+ ### `activateClient`
340
+
341
+ Activate a `draft` or `suspended` client. Validates that every redirect URI is an absolute
342
+ HTTPS URL without fragment, that `scopes_allowed` contains `openid`, and that the
343
+ authentication method is `c
344
+
345
+ `POST /v1/identity/operator/clients/{client_id}:activate`
346
+
347
+ ```ts
348
+ const { data } = await client.activateClient({
349
+ client_id: 'example',
350
+ })
351
+ ```
352
+
353
+ <details>
354
+ <summary>Response</summary>
355
+
356
+ ```json
357
+ {
358
+ "client_id": "bf-prod-x7k2",
359
+ "partner_key": "string",
360
+ "display_name": "string",
361
+ "description": "string",
362
+ "environment": "dev",
363
+ "redirect_uris": ["https://partner.example.com/auth/callback"],
364
+ "sector_identifier_uri": "https://partner.example.com/auth/callback",
365
+ "initiate_login_uri": "https://partner.example.com/auth/callback",
366
+ "launch_target_prefixes": ["string"],
367
+ "token_endpoint_auth_method": "client_secret_basic",
368
+ "grant_types": ["authorization_code"],
369
+ "scopes_allowed": ["openid"],
370
+ "status": "draft",
371
+ "status_reason": "string",
372
+ "config_version": 1,
373
+ "secret_rotated_at": "1970-01-01T00:00:00.000Z",
374
+ "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
375
+ "created_at": "1970-01-01T00:00:00.000Z",
376
+ "updated_at": "1970-01-01T00:00:00.000Z",
377
+ "created_by": "string",
378
+ "updated_by": "string"
379
+ }
380
+ ```
381
+
382
+ </details>
383
+
384
+ ---
385
+
386
+ ### `suspendClient`
387
+
388
+ Immediately block the client for every organization. Provider-side artefacts (codes, tokens,
389
+ grants) are revoked; the audit trail is kept. Reversible with `activateClient`.
390
+
391
+ `POST /v1/identity/operator/clients/{client_id}:suspend`
392
+
393
+ ```ts
394
+ const { data } = await client.suspendClient(
395
+ {
396
+ client_id: 'example',
397
+ },
398
+ {
399
+ reason: 'string'
400
+ },
401
+ )
402
+ ```
403
+
404
+ <details>
405
+ <summary>Response</summary>
406
+
407
+ ```json
408
+ {
409
+ "client_id": "bf-prod-x7k2",
410
+ "partner_key": "string",
411
+ "display_name": "string",
412
+ "description": "string",
413
+ "environment": "dev",
414
+ "redirect_uris": ["https://partner.example.com/auth/callback"],
415
+ "sector_identifier_uri": "https://partner.example.com/auth/callback",
416
+ "initiate_login_uri": "https://partner.example.com/auth/callback",
417
+ "launch_target_prefixes": ["string"],
418
+ "token_endpoint_auth_method": "client_secret_basic",
419
+ "grant_types": ["authorization_code"],
420
+ "scopes_allowed": ["openid"],
421
+ "status": "draft",
422
+ "status_reason": "string",
423
+ "config_version": 1,
424
+ "secret_rotated_at": "1970-01-01T00:00:00.000Z",
425
+ "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
426
+ "created_at": "1970-01-01T00:00:00.000Z",
427
+ "updated_at": "1970-01-01T00:00:00.000Z",
428
+ "created_by": "string",
429
+ "updated_by": "string"
430
+ }
431
+ ```
432
+
433
+ </details>
434
+
435
+ ---
436
+
437
+ ### `rotateClientSecret`
438
+
439
+ Issue a new client secret. The new secret is returned exactly once. The previous secret
440
+ keeps working until `previous_secret_expires_at` unless `compromise_mode` is set, in which
441
+ case it stops working
442
+
443
+ `POST /v1/identity/operator/clients/{client_id}:rotateSecret`
444
+
445
+ ```ts
446
+ const { data } = await client.rotateClientSecret(
447
+ {
448
+ client_id: 'example',
449
+ },
450
+ {
451
+ compromise_mode: false,
452
+ migration_window_seconds: 86400
453
+ },
454
+ )
455
+ ```
456
+
457
+ <details>
458
+ <summary>Response</summary>
459
+
460
+ ```json
461
+ {
462
+ "client_id": "bf-prod-x7k2",
463
+ "partner_key": "string",
464
+ "display_name": "string",
465
+ "description": "string",
466
+ "environment": "dev",
467
+ "redirect_uris": ["https://partner.example.com/auth/callback"],
468
+ "sector_identifier_uri": "https://partner.example.com/auth/callback",
469
+ "initiate_login_uri": "https://partner.example.com/auth/callback",
470
+ "launch_target_prefixes": ["string"],
471
+ "token_endpoint_auth_method": "client_secret_basic",
472
+ "grant_types": ["authorization_code"],
473
+ "scopes_allowed": ["openid"],
474
+ "status": "draft",
475
+ "status_reason": "string",
476
+ "config_version": 1,
477
+ "secret_rotated_at": "1970-01-01T00:00:00.000Z",
478
+ "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",
479
+ "created_at": "1970-01-01T00:00:00.000Z",
480
+ "updated_at": "1970-01-01T00:00:00.000Z",
481
+ "created_by": "string",
482
+ "updated_by": "string",
483
+ "client_secret": "string"
484
+ }
485
+ ```
486
+
487
+ </details>
488
+
489
+ ---
490
+
491
+ ### `listClientOrganizations`
492
+
493
+ List the organizations enabled on a client, including suspended and revoked ones.
494
+
495
+ `GET /v1/identity/operator/clients/{client_id}/organizations`
496
+
497
+ ```ts
498
+ const { data } = await client.listClientOrganizations({
499
+ client_id: 'example',
500
+ status: 'example',
501
+ })
502
+ ```
503
+
504
+ <details>
505
+ <summary>Response</summary>
506
+
507
+ ```json
508
+ {
509
+ "results": [
510
+ {
511
+ "client_id": "bf-prod-x7k2",
512
+ "org_id": "739224",
513
+ "status": "active",
514
+ "status_reason": "string",
515
+ "authorization_policy": {
516
+ "mode": "preauthorized",
517
+ "population": "all_current_org_members",
518
+ "allowed_scopes": ["openid"],
519
+ "customer_approval_ref": "string",
520
+ "approved_at": "1970-01-01T00:00:00.000Z",
521
+ "version": 1,
522
+ "mandatory_claims": ["org_id"],
523
+ "recorded_by": "string",
524
+ "recorded_at": "1970-01-01T00:00:00.000Z"
525
+ },
526
+ "partner_account": {
527
+ "id": "string",
528
+ "label": "string"
529
+ },
530
+ "created_at": "1970-01-01T00:00:00.000Z",
531
+ "updated_at": "1970-01-01T00:00:00.000Z",
532
+ "created_by": "string",
533
+ "updated_by": "string"
534
+ }
535
+ ]
536
+ }
537
+ ```
538
+
539
+ </details>
540
+
541
+ ---
542
+
543
+ ### `enableClientOrganization`
544
+
545
+ Enable an epilot organization on a client, recording the customer's authorization policy
546
+ (version 1). `allowed_scopes` must contain `openid` and be a subset of the client's
547
+ `scopes_allowed`.
548
+
549
+ `POST /v1/identity/operator/clients/{client_id}/organizations`
550
+
551
+ ```ts
552
+ const { data } = await client.enableClientOrganization(
553
+ {
554
+ client_id: 'example',
555
+ },
556
+ {
557
+ org_id: '739224',
558
+ authorization_policy: {
559
+ mode: 'preauthorized',
560
+ population: 'all_current_org_members',
561
+ allowed_scopes: ['openid'],
562
+ customer_approval_ref: 'string',
563
+ approved_at: '1970-01-01T00:00:00.000Z'
564
+ },
565
+ partner_account: {
566
+ id: 'string',
567
+ label: 'string'
568
+ }
569
+ },
570
+ )
571
+ ```
572
+
573
+ <details>
574
+ <summary>Response</summary>
575
+
576
+ ```json
577
+ {
578
+ "client_id": "bf-prod-x7k2",
579
+ "org_id": "739224",
580
+ "status": "active",
581
+ "status_reason": "string",
582
+ "authorization_policy": {
583
+ "mode": "preauthorized",
584
+ "population": "all_current_org_members",
585
+ "allowed_scopes": ["openid"],
586
+ "customer_approval_ref": "string",
587
+ "approved_at": "1970-01-01T00:00:00.000Z",
588
+ "version": 1,
589
+ "mandatory_claims": ["org_id"],
590
+ "recorded_by": "string",
591
+ "recorded_at": "1970-01-01T00:00:00.000Z"
592
+ },
593
+ "partner_account": {
594
+ "id": "string",
595
+ "label": "string"
596
+ },
597
+ "created_at": "1970-01-01T00:00:00.000Z",
598
+ "updated_at": "1970-01-01T00:00:00.000Z",
599
+ "created_by": "string",
600
+ "updated_by": "string"
601
+ }
602
+ ```
603
+
604
+ </details>
605
+
606
+ ---
607
+
608
+ ### `getClientOrganization`
609
+
610
+ Read one organization enablement.
611
+
612
+ `GET /v1/identity/operator/clients/{client_id}/organizations/{org_id}`
613
+
614
+ ```ts
615
+ const { data } = await client.getClientOrganization({
616
+ client_id: 'example',
617
+ org_id: 'example',
618
+ })
619
+ ```
620
+
621
+ <details>
622
+ <summary>Response</summary>
623
+
624
+ ```json
625
+ {
626
+ "client_id": "bf-prod-x7k2",
627
+ "org_id": "739224",
628
+ "status": "active",
629
+ "status_reason": "string",
630
+ "authorization_policy": {
631
+ "mode": "preauthorized",
632
+ "population": "all_current_org_members",
633
+ "allowed_scopes": ["openid"],
634
+ "customer_approval_ref": "string",
635
+ "approved_at": "1970-01-01T00:00:00.000Z",
636
+ "version": 1,
637
+ "mandatory_claims": ["org_id"],
638
+ "recorded_by": "string",
639
+ "recorded_at": "1970-01-01T00:00:00.000Z"
640
+ },
641
+ "partner_account": {
642
+ "id": "string",
643
+ "label": "string"
644
+ },
645
+ "created_at": "1970-01-01T00:00:00.000Z",
646
+ "updated_at": "1970-01-01T00:00:00.000Z",
647
+ "created_by": "string",
648
+ "updated_by": "string"
649
+ }
650
+ ```
651
+
652
+ </details>
653
+
654
+ ---
655
+
656
+ ### `updateClientOrganization`
657
+
658
+ Record a new version of the customer's authorization policy. `expected_policy_version` must
659
+ equal the current version (compare-and-swap); a mismatch is rejected with `409`.
660
+
661
+ `PUT /v1/identity/operator/clients/{client_id}/organizations/{org_id}`
662
+
663
+ ```ts
664
+ const { data } = await client.updateClientOrganization(
665
+ {
666
+ client_id: 'example',
667
+ org_id: 'example',
668
+ },
669
+ {
670
+ expected_policy_version: 1,
671
+ authorization_policy: {
672
+ mode: 'preauthorized',
673
+ population: 'all_current_org_members',
674
+ allowed_scopes: ['openid'],
675
+ customer_approval_ref: 'string',
676
+ approved_at: '1970-01-01T00:00:00.000Z'
677
+ },
678
+ partner_account: {
679
+ id: 'string',
680
+ label: 'string'
681
+ }
682
+ },
683
+ )
684
+ ```
685
+
686
+ <details>
687
+ <summary>Response</summary>
688
+
689
+ ```json
690
+ {
691
+ "client_id": "bf-prod-x7k2",
692
+ "org_id": "739224",
693
+ "status": "active",
694
+ "status_reason": "string",
695
+ "authorization_policy": {
696
+ "mode": "preauthorized",
697
+ "population": "all_current_org_members",
698
+ "allowed_scopes": ["openid"],
699
+ "customer_approval_ref": "string",
700
+ "approved_at": "1970-01-01T00:00:00.000Z",
701
+ "version": 1,
702
+ "mandatory_claims": ["org_id"],
703
+ "recorded_by": "string",
704
+ "recorded_at": "1970-01-01T00:00:00.000Z"
705
+ },
706
+ "partner_account": {
707
+ "id": "string",
708
+ "label": "string"
709
+ },
710
+ "created_at": "1970-01-01T00:00:00.000Z",
711
+ "updated_at": "1970-01-01T00:00:00.000Z",
712
+ "created_by": "string",
713
+ "updated_by": "string"
714
+ }
715
+ ```
716
+
717
+ </details>
718
+
719
+ ---
720
+
721
+ ### `revokeClientOrganization`
722
+
723
+ Revoke an organization's enablement. The record is kept as an audited tombstone; future
724
+ authorizations for this organization fail with `access_denied` and provider-side artefacts
725
+ bound to it are revok
726
+
727
+ `DELETE /v1/identity/operator/clients/{client_id}/organizations/{org_id}`
728
+
729
+ ```ts
730
+ const { data } = await client.revokeClientOrganization(
731
+ {
732
+ client_id: 'example',
733
+ org_id: 'example',
734
+ },
735
+ {
736
+ reason: 'string'
737
+ },
738
+ )
739
+ ```
740
+
741
+ <details>
742
+ <summary>Response</summary>
743
+
744
+ ```json
745
+ {
746
+ "client_id": "bf-prod-x7k2",
747
+ "org_id": "739224",
748
+ "status": "active",
749
+ "status_reason": "string",
750
+ "authorization_policy": {
751
+ "mode": "preauthorized",
752
+ "population": "all_current_org_members",
753
+ "allowed_scopes": ["openid"],
754
+ "customer_approval_ref": "string",
755
+ "approved_at": "1970-01-01T00:00:00.000Z",
756
+ "version": 1,
757
+ "mandatory_claims": ["org_id"],
758
+ "recorded_by": "string",
759
+ "recorded_at": "1970-01-01T00:00:00.000Z"
760
+ },
761
+ "partner_account": {
762
+ "id": "string",
763
+ "label": "string"
764
+ },
765
+ "created_at": "1970-01-01T00:00:00.000Z",
766
+ "updated_at": "1970-01-01T00:00:00.000Z",
767
+ "created_by": "string",
768
+ "updated_by": "string"
769
+ }
770
+ ```
771
+
772
+ </details>
773
+
774
+ ---
775
+
776
+ ### `suspendClientOrganization`
777
+
778
+ Temporarily block one organization on this client. Reversible with `activateClientOrganization`.
779
+
780
+ `POST /v1/identity/operator/clients/{client_id}/organizations/{org_id}:suspend`
781
+
782
+ ```ts
783
+ const { data } = await client.suspendClientOrganization(
784
+ {
785
+ client_id: 'example',
786
+ org_id: 'example',
787
+ },
788
+ {
789
+ reason: 'string'
790
+ },
791
+ )
792
+ ```
793
+
794
+ <details>
795
+ <summary>Response</summary>
796
+
797
+ ```json
798
+ {
799
+ "client_id": "bf-prod-x7k2",
800
+ "org_id": "739224",
801
+ "status": "active",
802
+ "status_reason": "string",
803
+ "authorization_policy": {
804
+ "mode": "preauthorized",
805
+ "population": "all_current_org_members",
806
+ "allowed_scopes": ["openid"],
807
+ "customer_approval_ref": "string",
808
+ "approved_at": "1970-01-01T00:00:00.000Z",
809
+ "version": 1,
810
+ "mandatory_claims": ["org_id"],
811
+ "recorded_by": "string",
812
+ "recorded_at": "1970-01-01T00:00:00.000Z"
813
+ },
814
+ "partner_account": {
815
+ "id": "string",
816
+ "label": "string"
817
+ },
818
+ "created_at": "1970-01-01T00:00:00.000Z",
819
+ "updated_at": "1970-01-01T00:00:00.000Z",
820
+ "created_by": "string",
821
+ "updated_by": "string"
822
+ }
823
+ ```
824
+
825
+ </details>
826
+
827
+ ---
828
+
829
+ ### `activateClientOrganization`
830
+
831
+ 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
832
+
833
+ `POST /v1/identity/operator/clients/{client_id}/organizations/{org_id}:activate`
834
+
835
+ ```ts
836
+ const { data } = await client.activateClientOrganization({
837
+ client_id: 'example',
838
+ org_id: 'example',
839
+ })
840
+ ```
841
+
842
+ <details>
843
+ <summary>Response</summary>
844
+
845
+ ```json
846
+ {
847
+ "client_id": "bf-prod-x7k2",
848
+ "org_id": "739224",
849
+ "status": "active",
850
+ "status_reason": "string",
851
+ "authorization_policy": {
852
+ "mode": "preauthorized",
853
+ "population": "all_current_org_members",
854
+ "allowed_scopes": ["openid"],
855
+ "customer_approval_ref": "string",
856
+ "approved_at": "1970-01-01T00:00:00.000Z",
857
+ "version": 1,
858
+ "mandatory_claims": ["org_id"],
859
+ "recorded_by": "string",
860
+ "recorded_at": "1970-01-01T00:00:00.000Z"
861
+ },
862
+ "partner_account": {
863
+ "id": "string",
864
+ "label": "string"
865
+ },
866
+ "created_at": "1970-01-01T00:00:00.000Z",
867
+ "updated_at": "1970-01-01T00:00:00.000Z",
868
+ "created_by": "string",
869
+ "updated_by": "string"
870
+ }
871
+ ```
872
+
873
+ </details>
874
+
875
+ ---
876
+
877
+ ### `createIdentitySession`
878
+
879
+ Called by the epilot portal through the portal-host proxy after every persisted 360 session.
880
+ Validates the 360 bearer token itself and mirrors it into the `identity_session` cookie
881
+ (`HttpOnly; Secure;
882
+
883
+ `GET /v1/identity/session`
884
+
885
+ ```ts
886
+ const { data } = await client.createIdentitySession()
887
+ ```
888
+
889
+ <details>
890
+ <summary>Response</summary>
891
+
892
+ ```json
893
+ {
894
+ "org_id": "739224",
895
+ "user_id": "string",
896
+ "expires_at": "1970-01-01T00:00:00.000Z"
897
+ }
898
+ ```
899
+
900
+ </details>
901
+
902
+ ---
903
+
904
+ ### `deleteIdentitySession`
905
+
906
+ Clears the `identity_session` cookie. Called by the portal on logout.
907
+
908
+ `DELETE /v1/identity/session`
909
+
910
+ ```ts
911
+ const { data } = await client.deleteIdentitySession()
912
+ ```
913
+
914
+ ---
915
+
916
+ ### `launchClient`
917
+
918
+ One validated place for partner start links (manager UI, hosted apps). Redirects the browser to the
919
+ client's registered `initiate_login_uri` with `iss` set to this issuer and, when given, the deep lin
920
+
921
+ `GET /v1/identity/launch/{client_id}`
922
+
923
+ ```ts
924
+ const { data } = await client.launchClient({
925
+ client_id: 'example',
926
+ target: 'example',
927
+ extra: 'example',
928
+ })
929
+ ```
930
+
931
+ ---
932
+
933
+ ## Schemas
934
+
935
+ ### `Error`
936
+
937
+ ```ts
938
+ type Error = {
939
+ status: number
940
+ error: string
941
+ details?: Record<string, unknown>[]
942
+ }
943
+ ```
944
+
945
+ ### `PartnerClientId`
946
+
947
+ Opaque client identifier, unique within the issuer, never reused
948
+
949
+ ```ts
950
+ type PartnerClientId = string
951
+ ```
952
+
953
+ ### `OrgId`
954
+
955
+ epilot organization id, an opaque case-sensitive string
956
+
957
+ ```ts
958
+ type OrgId = string
959
+ ```
960
+
961
+ ### `Environment`
962
+
963
+ Partner-side environment this client belongs to
964
+
965
+ ```ts
966
+ type Environment = "dev" | "staging" | "production"
967
+ ```
968
+
969
+ ### `PartnerClientStatus`
970
+
971
+ ```ts
972
+ type PartnerClientStatus = "draft" | "active" | "suspended" | "retired"
973
+ ```
974
+
975
+ ### `Scope`
976
+
977
+ ```ts
978
+ type Scope = "openid" | "email" | "profile"
979
+ ```
980
+
981
+ ### `HttpsUri`
982
+
983
+ Absolute HTTPS URL without fragment
984
+
985
+ ```ts
986
+ type HttpsUri = string // uri
987
+ ```
988
+
989
+ ### `PartnerClientCreate`
990
+
991
+ ```ts
992
+ type PartnerClientCreate = {
993
+ partner_key: string
994
+ display_name: string
995
+ description?: string
996
+ environment: "dev" | "staging" | "production"
997
+ redirect_uris: string // uri[]
998
+ sector_identifier_uri?: string // uri
999
+ initiate_login_uri?: string // uri
1000
+ launch_target_prefixes?: string[]
1001
+ scopes_allowed?: "openid" | "email" | "profile"[]
1002
+ }
1003
+ ```
1004
+
1005
+ ### `PartnerClientUpdate`
1006
+
1007
+ ```ts
1008
+ type PartnerClientUpdate = {
1009
+ config_version: number
1010
+ allow_sector_change?: boolean
1011
+ display_name: string
1012
+ description?: string
1013
+ redirect_uris: string // uri[]
1014
+ sector_identifier_uri?: string // uri
1015
+ initiate_login_uri?: string // uri
1016
+ launch_target_prefixes?: string[]
1017
+ scopes_allowed: "openid" | "email" | "profile"[]
1018
+ }
1019
+ ```
1020
+
1021
+ ### `PartnerClient`
1022
+
1023
+ ```ts
1024
+ type PartnerClient = {
1025
+ client_id: string
1026
+ partner_key: string
1027
+ display_name: string
1028
+ description?: string
1029
+ environment: "dev" | "staging" | "production"
1030
+ redirect_uris: string // uri[]
1031
+ sector_identifier_uri?: string // uri
1032
+ initiate_login_uri?: string // uri
1033
+ launch_target_prefixes?: string[]
1034
+ token_endpoint_auth_method: "client_secret_basic"
1035
+ grant_types: "authorization_code"[]
1036
+ scopes_allowed: "openid" | "email" | "profile"[]
1037
+ status: "draft" | "active" | "suspended" | "retired"
1038
+ status_reason?: string
1039
+ config_version: number
1040
+ secret_rotated_at?: string // date-time
1041
+ previous_secret_expires_at?: string // date-time
1042
+ created_at: string // date-time
1043
+ updated_at: string // date-time
1044
+ created_by?: string
1045
+ updated_by?: string
1046
+ }
1047
+ ```
1048
+
1049
+ ### `PartnerClientWithSecret`
1050
+
1051
+ ```ts
1052
+ type PartnerClientWithSecret = {
1053
+ client_id: string
1054
+ partner_key: string
1055
+ display_name: string
1056
+ description?: string
1057
+ environment: "dev" | "staging" | "production"
1058
+ redirect_uris: string // uri[]
1059
+ sector_identifier_uri?: string // uri
1060
+ initiate_login_uri?: string // uri
1061
+ launch_target_prefixes?: string[]
1062
+ token_endpoint_auth_method: "client_secret_basic"
1063
+ grant_types: "authorization_code"[]
1064
+ scopes_allowed: "openid" | "email" | "profile"[]
1065
+ status: "draft" | "active" | "suspended" | "retired"
1066
+ status_reason?: string
1067
+ config_version: number
1068
+ secret_rotated_at?: string // date-time
1069
+ previous_secret_expires_at?: string // date-time
1070
+ created_at: string // date-time
1071
+ updated_at: string // date-time
1072
+ created_by?: string
1073
+ updated_by?: string
1074
+ client_secret: string
1075
+ }
1076
+ ```
1077
+
1078
+ ### `PartnerClientList`
1079
+
1080
+ ```ts
1081
+ type PartnerClientList = {
1082
+ results: Array<{
1083
+ client_id: string
1084
+ partner_key: string
1085
+ display_name: string
1086
+ description?: string
1087
+ environment: "dev" | "staging" | "production"
1088
+ redirect_uris: string // uri[]
1089
+ sector_identifier_uri?: string // uri
1090
+ initiate_login_uri?: string // uri
1091
+ launch_target_prefixes?: string[]
1092
+ token_endpoint_auth_method: "client_secret_basic"
1093
+ grant_types: "authorization_code"[]
1094
+ scopes_allowed: "openid" | "email" | "profile"[]
1095
+ status: "draft" | "active" | "suspended" | "retired"
1096
+ status_reason?: string
1097
+ config_version: number
1098
+ secret_rotated_at?: string // date-time
1099
+ previous_secret_expires_at?: string // date-time
1100
+ created_at: string // date-time
1101
+ updated_at: string // date-time
1102
+ created_by?: string
1103
+ updated_by?: string
1104
+ }>
1105
+ next_cursor?: string
1106
+ }
1107
+ ```
1108
+
1109
+ ### `StatusChangeRequest`
1110
+
1111
+ ```ts
1112
+ type StatusChangeRequest = {
1113
+ reason?: string
1114
+ }
1115
+ ```
1116
+
1117
+ ### `RotateSecretRequest`
1118
+
1119
+ ```ts
1120
+ type RotateSecretRequest = {
1121
+ compromise_mode?: boolean
1122
+ migration_window_seconds?: number
1123
+ }
1124
+ ```
1125
+
1126
+ ### `AuthorizationPolicyInput`
1127
+
1128
+ ```ts
1129
+ type AuthorizationPolicyInput = {
1130
+ mode?: "preauthorized"
1131
+ population?: "all_current_org_members"
1132
+ allowed_scopes: "openid" | "email" | "profile"[]
1133
+ customer_approval_ref: string
1134
+ approved_at: string // date-time
1135
+ }
1136
+ ```
1137
+
1138
+ ### `AuthorizationPolicy`
1139
+
1140
+ ```ts
1141
+ type AuthorizationPolicy = {
1142
+ mode?: "preauthorized"
1143
+ population?: "all_current_org_members"
1144
+ allowed_scopes: "openid" | "email" | "profile"[]
1145
+ customer_approval_ref: string
1146
+ approved_at: string // date-time
1147
+ version: number
1148
+ mandatory_claims: "org_id"[]
1149
+ recorded_by: string
1150
+ recorded_at: string // date-time
1151
+ }
1152
+ ```
1153
+
1154
+ ### `PartnerAccount`
1155
+
1156
+ Optional audit reference to the partner tenant this organization maps to. The partner enforces the mapping.
1157
+
1158
+ ```ts
1159
+ type PartnerAccount = {
1160
+ id: string
1161
+ label?: string
1162
+ }
1163
+ ```
1164
+
1165
+ ### `OrgEnablementStatus`
1166
+
1167
+ ```ts
1168
+ type OrgEnablementStatus = "active" | "suspended" | "revoked"
1169
+ ```
1170
+
1171
+ ### `OrgEnablementCreate`
1172
+
1173
+ ```ts
1174
+ type OrgEnablementCreate = {
1175
+ org_id: string
1176
+ authorization_policy: {
1177
+ mode?: "preauthorized"
1178
+ population?: "all_current_org_members"
1179
+ allowed_scopes: "openid" | "email" | "profile"[]
1180
+ customer_approval_ref: string
1181
+ approved_at: string // date-time
1182
+ }
1183
+ partner_account?: {
1184
+ id: string
1185
+ label?: string
1186
+ }
1187
+ }
1188
+ ```
1189
+
1190
+ ### `OrgEnablementUpdate`
1191
+
1192
+ ```ts
1193
+ type OrgEnablementUpdate = {
1194
+ expected_policy_version: number
1195
+ authorization_policy: {
1196
+ mode?: "preauthorized"
1197
+ population?: "all_current_org_members"
1198
+ allowed_scopes: "openid" | "email" | "profile"[]
1199
+ customer_approval_ref: string
1200
+ approved_at: string // date-time
1201
+ }
1202
+ partner_account?: {
1203
+ id: string
1204
+ label?: string
1205
+ }
1206
+ }
1207
+ ```
1208
+
1209
+ ### `OrgEnablement`
1210
+
1211
+ ```ts
1212
+ type OrgEnablement = {
1213
+ client_id: string
1214
+ org_id: string
1215
+ status: "active" | "suspended" | "revoked"
1216
+ status_reason?: string
1217
+ authorization_policy: {
1218
+ mode?: "preauthorized"
1219
+ population?: "all_current_org_members"
1220
+ allowed_scopes: "openid" | "email" | "profile"[]
1221
+ customer_approval_ref: string
1222
+ approved_at: string // date-time
1223
+ version: number
1224
+ mandatory_claims: "org_id"[]
1225
+ recorded_by: string
1226
+ recorded_at: string // date-time
1227
+ }
1228
+ partner_account?: {
1229
+ id: string
1230
+ label?: string
1231
+ }
1232
+ created_at: string // date-time
1233
+ updated_at: string // date-time
1234
+ created_by?: string
1235
+ updated_by?: string
1236
+ }
1237
+ ```
1238
+
1239
+ ### `OrgEnablementList`
1240
+
1241
+ ```ts
1242
+ type OrgEnablementList = {
1243
+ results: Array<{
1244
+ client_id: string
1245
+ org_id: string
1246
+ status: "active" | "suspended" | "revoked"
1247
+ status_reason?: string
1248
+ authorization_policy: {
1249
+ mode?: { ... }
1250
+ population?: { ... }
1251
+ allowed_scopes: { ... }
1252
+ customer_approval_ref: { ... }
1253
+ approved_at: { ... }
1254
+ version: { ... }
1255
+ mandatory_claims: { ... }
1256
+ recorded_by: { ... }
1257
+ recorded_at: { ... }
1258
+ }
1259
+ partner_account?: {
1260
+ id: { ... }
1261
+ label?: { ... }
1262
+ }
1263
+ created_at: string // date-time
1264
+ updated_at: string // date-time
1265
+ created_by?: string
1266
+ updated_by?: string
1267
+ }>
1268
+ }
1269
+ ```
1270
+
1271
+ ### `IdentitySession`
1272
+
1273
+ ```ts
1274
+ type IdentitySession = {
1275
+ org_id: string
1276
+ user_id: string
1277
+ expires_at: string // date-time
1278
+ }
1279
+ ```