@epilot/sdk 2.20.73 → 2.20.75

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 (127) hide show
  1. package/definitions/identity.json +8 -3
  2. package/dist/apis/access-token.cjs +6 -6
  3. package/dist/apis/access-token.js +1 -1
  4. package/dist/apis/address-suggestions.cjs +6 -6
  5. package/dist/apis/address-suggestions.js +1 -1
  6. package/dist/apis/address.cjs +6 -6
  7. package/dist/apis/address.js +1 -1
  8. package/dist/apis/ai-agents.cjs +6 -6
  9. package/dist/apis/ai-agents.js +1 -1
  10. package/dist/apis/app.cjs +6 -6
  11. package/dist/apis/app.js +1 -1
  12. package/dist/apis/audit-logs.cjs +6 -6
  13. package/dist/apis/audit-logs.js +1 -1
  14. package/dist/apis/automation.cjs +6 -6
  15. package/dist/apis/automation.js +1 -1
  16. package/dist/apis/billing.cjs +6 -6
  17. package/dist/apis/billing.js +1 -1
  18. package/dist/apis/blueprint-manifest.cjs +6 -6
  19. package/dist/apis/blueprint-manifest.js +1 -1
  20. package/dist/apis/calendar.cjs +6 -6
  21. package/dist/apis/calendar.js +1 -1
  22. package/dist/apis/chat.cjs +6 -6
  23. package/dist/apis/chat.js +1 -1
  24. package/dist/apis/configuration-hub.cjs +6 -6
  25. package/dist/apis/configuration-hub.js +1 -1
  26. package/dist/apis/consent.cjs +6 -6
  27. package/dist/apis/consent.js +1 -1
  28. package/dist/apis/customer-portal.cjs +6 -6
  29. package/dist/apis/customer-portal.js +1 -1
  30. package/dist/apis/dashboard.cjs +6 -6
  31. package/dist/apis/dashboard.js +1 -1
  32. package/dist/apis/data-governance.cjs +6 -6
  33. package/dist/apis/data-governance.js +1 -1
  34. package/dist/apis/deduplication.cjs +6 -6
  35. package/dist/apis/deduplication.js +1 -1
  36. package/dist/apis/design.cjs +6 -6
  37. package/dist/apis/design.js +1 -1
  38. package/dist/apis/document.cjs +6 -6
  39. package/dist/apis/document.js +1 -1
  40. package/dist/apis/email-settings.cjs +6 -6
  41. package/dist/apis/email-settings.js +1 -1
  42. package/dist/apis/email-template.cjs +6 -6
  43. package/dist/apis/email-template.js +1 -1
  44. package/dist/apis/entity-mapping.cjs +6 -6
  45. package/dist/apis/entity-mapping.js +1 -1
  46. package/dist/apis/entity.cjs +6 -6
  47. package/dist/apis/entity.js +1 -1
  48. package/dist/apis/environments.cjs +6 -6
  49. package/dist/apis/environments.js +1 -1
  50. package/dist/apis/event-catalog.cjs +6 -6
  51. package/dist/apis/event-catalog.js +1 -1
  52. package/dist/apis/external-values.cjs +6 -6
  53. package/dist/apis/external-values.js +1 -1
  54. package/dist/apis/file.cjs +6 -6
  55. package/dist/apis/file.js +1 -1
  56. package/dist/apis/iban.cjs +6 -6
  57. package/dist/apis/iban.js +1 -1
  58. package/dist/apis/identity.cjs +6 -6
  59. package/dist/apis/identity.d.cts +2 -2
  60. package/dist/apis/identity.d.ts +2 -2
  61. package/dist/apis/identity.js +1 -1
  62. package/dist/apis/integration-toolkit.cjs +6 -6
  63. package/dist/apis/integration-toolkit.js +1 -1
  64. package/dist/apis/journey.cjs +6 -6
  65. package/dist/apis/journey.js +1 -1
  66. package/dist/apis/kanban.cjs +6 -6
  67. package/dist/apis/kanban.js +1 -1
  68. package/dist/apis/message.cjs +6 -6
  69. package/dist/apis/message.js +1 -1
  70. package/dist/apis/metering.cjs +6 -6
  71. package/dist/apis/metering.js +1 -1
  72. package/dist/apis/notes.cjs +6 -6
  73. package/dist/apis/notes.js +1 -1
  74. package/dist/apis/notification.cjs +6 -6
  75. package/dist/apis/notification.js +1 -1
  76. package/dist/apis/organization.cjs +6 -6
  77. package/dist/apis/organization.js +1 -1
  78. package/dist/apis/partner-directory.cjs +6 -6
  79. package/dist/apis/partner-directory.js +1 -1
  80. package/dist/apis/permissions.cjs +6 -6
  81. package/dist/apis/permissions.js +1 -1
  82. package/dist/apis/phone-integration.cjs +6 -6
  83. package/dist/apis/phone-integration.js +1 -1
  84. package/dist/apis/pricing-tier.cjs +6 -6
  85. package/dist/apis/pricing-tier.js +1 -1
  86. package/dist/apis/pricing.cjs +6 -6
  87. package/dist/apis/pricing.js +1 -1
  88. package/dist/apis/purpose.cjs +6 -6
  89. package/dist/apis/purpose.js +1 -1
  90. package/dist/apis/query.cjs +6 -6
  91. package/dist/apis/query.js +1 -1
  92. package/dist/apis/sandbox.cjs +6 -6
  93. package/dist/apis/sandbox.js +1 -1
  94. package/dist/apis/sharing.cjs +6 -6
  95. package/dist/apis/sharing.js +1 -1
  96. package/dist/apis/snapshot.cjs +6 -6
  97. package/dist/apis/snapshot.js +1 -1
  98. package/dist/apis/submission.cjs +6 -6
  99. package/dist/apis/submission.js +1 -1
  100. package/dist/apis/target.cjs +6 -6
  101. package/dist/apis/target.js +1 -1
  102. package/dist/apis/targeting.cjs +6 -6
  103. package/dist/apis/targeting.js +1 -1
  104. package/dist/apis/template-variables.cjs +6 -6
  105. package/dist/apis/template-variables.js +1 -1
  106. package/dist/apis/user.cjs +6 -6
  107. package/dist/apis/user.js +1 -1
  108. package/dist/apis/validation-rules.cjs +6 -6
  109. package/dist/apis/validation-rules.js +1 -1
  110. package/dist/apis/webhooks.cjs +6 -6
  111. package/dist/apis/webhooks.js +1 -1
  112. package/dist/apis/workflow-definition.cjs +6 -6
  113. package/dist/apis/workflow-definition.js +1 -1
  114. package/dist/apis/workflow.cjs +6 -6
  115. package/dist/apis/workflow.js +1 -1
  116. package/dist/{chunk-WG7OKIQ3.js → chunk-6B5HXASK.js} +1 -1
  117. package/dist/{chunk-5PG5IEQ7.cjs → chunk-JGPHZYSD.cjs} +1 -1
  118. package/dist/{identity-F5XHYPXY.js → identity-OT3MIWHV.js} +1 -1
  119. package/dist/{identity-JDTGYAOV.cjs → identity-XCFH3MIW.cjs} +1 -1
  120. package/dist/{identity.d-BBL0NI_O.d.cts → identity.d-DUcoy_-W.d.cts} +154 -18
  121. package/dist/{identity.d-BBL0NI_O.d.ts → identity.d-DUcoy_-W.d.ts} +154 -18
  122. package/dist/index.cjs +8 -8
  123. package/dist/index.d.cts +1 -1
  124. package/dist/index.d.ts +1 -1
  125. package/dist/index.js +1 -1
  126. package/docs/identity.md +3 -3
  127. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
2
 
3
3
  // src/docs/identity.json
4
- var identity_default = '# Identity API\n\n- **Base URL:** `https://id.epilot.cloud`\n- **Full API Docs:** [https://docs.epilot.io/api/identity](https://docs.epilot.io/api/identity)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.identity.listClients(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/identity\'\n\nconst identityClient = getClient()\nauthorize(identityClient, () => \'<token>\')\nconst { data } = await identityClient.listClients(...)\n```\n\n## Operations\n\n**Operator Clients**\n- [`listClients`](#listclients)\n- [`createOidcClient`](#createoidcclient)\n- [`getOidcClient`](#getoidcclient)\n- [`updateClient`](#updateclient)\n- [`retireClient`](#retireclient)\n- [`activateClient`](#activateclient)\n- [`suspendClient`](#suspendclient)\n- [`rotateClientSecret`](#rotateclientsecret)\n\n**Operator Organizations**\n- [`listClientOrganizations`](#listclientorganizations)\n- [`enableClientOrganization`](#enableclientorganization)\n- [`getClientOrganization`](#getclientorganization)\n- [`updateClientOrganization`](#updateclientorganization)\n- [`revokeClientOrganization`](#revokeclientorganization)\n- [`suspendClientOrganization`](#suspendclientorganization)\n- [`activateClientOrganization`](#activateclientorganization)\n- [`getUserSubject`](#getusersubject)\n\n**Session**\n- [`createIdentitySession`](#createidentitysession)\n- [`deleteIdentitySession`](#deleteidentitysession)\n\n**Launch**\n- [`launchClient`](#launchclient)\n\n**Schemas**\n- [`Error`](#error)\n- [`PartnerClientId`](#partnerclientid)\n- [`OrgId`](#orgid)\n- [`UserId`](#userid)\n- [`Environment`](#environment)\n- [`PartnerClientStatus`](#partnerclientstatus)\n- [`Scope`](#scope)\n- [`HttpsUri`](#httpsuri)\n- [`PartnerClientCreate`](#partnerclientcreate)\n- [`PartnerClientUpdate`](#partnerclientupdate)\n- [`PartnerClient`](#partnerclient)\n- [`PartnerClientWithSecret`](#partnerclientwithsecret)\n- [`PartnerClientList`](#partnerclientlist)\n- [`StatusChangeRequest`](#statuschangerequest)\n- [`RotateSecretRequest`](#rotatesecretrequest)\n- [`AuthorizationPolicyInput`](#authorizationpolicyinput)\n- [`AuthorizationPolicy`](#authorizationpolicy)\n- [`OrgEnablementStatus`](#orgenablementstatus)\n- [`OrgEnablementCreate`](#orgenablementcreate)\n- [`OrgEnablementUpdate`](#orgenablementupdate)\n- [`OrgEnablement`](#orgenablement)\n- [`OrgEnablementList`](#orgenablementlist)\n- [`IdentitySession`](#identitysession)\n- [`UserSubject`](#usersubject)\n\n### `listClients`\n\nList registered partner clients. The client secret is never returned.\n\n`GET /v1/identity/operator/clients`\n\n```ts\nconst { data } = await client.listClients({\n partner_key: \'example\',\n status: \'example\',\n size: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `createOidcClient`\n\nCreate 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\n`POST /v1/identity/operator/clients`\n\n```ts\nconst { data } = await client.createOidcClient(\n null,\n {\n partner_key: \'babelforce\',\n display_name: \'Babelforce\',\n description: \'string\',\n environment: \'dev\',\n redirect_uris: [\'https://partner.example.com/auth/callback\'],\n sector_identifier_uri: \'https://partner.example.com/auth/callback\',\n initiate_login_uri: \'https://partner.example.com/auth/callback\',\n launch_target_prefixes: [\'string\'],\n scopes_allowed: [\'openid\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string",\n "client_secret": "string"\n}\n```\n\n</details>\n\n---\n\n### `getOidcClient`\n\nRead a partner client. The client secret is never returned.\n\n`GET /v1/identity/operator/clients/{client_id}`\n\n```ts\nconst { data } = await client.getOidcClient({\n client_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateClient`\n\nReplace the mutable configuration of a client. `config_version` must equal the current\nversion (compare-and-swap); a mismatch is rejected with `409`.\n\n`PUT /v1/identity/operator/clients/{client_id}`\n\n```ts\nconst { data } = await client.updateClient(\n {\n client_id: \'example\',\n },\n {\n config_version: 1,\n allow_sector_change: false,\n display_name: \'string\',\n description: \'string\',\n redirect_uris: [\'https://partner.example.com/auth/callback\'],\n sector_identifier_uri: \'https://partner.example.com/auth/callback\',\n initiate_login_uri: \'https://partner.example.com/auth/callback\',\n launch_target_prefixes: [\'string\'],\n scopes_allowed: [\'openid\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `retireClient`\n\nRetire 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\n`DELETE /v1/identity/operator/clients/{client_id}`\n\n```ts\nconst { data } = await client.retireClient({\n client_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `activateClient`\n\nActivate 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 `c\n\n`POST /v1/identity/operator/clients/{client_id}:activate`\n\n```ts\nconst { data } = await client.activateClient({\n client_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `suspendClient`\n\nImmediately block the client for every organization. Provider-side artefacts (codes, tokens,\ngrants) are revoked; the audit trail is kept. Reversible with `activateClient`.\n\n`POST /v1/identity/operator/clients/{client_id}:suspend`\n\n```ts\nconst { data } = await client.suspendClient(\n {\n client_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `rotateClientSecret`\n\nIssue 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\n\n`POST /v1/identity/operator/clients/{client_id}:rotateSecret`\n\n```ts\nconst { data } = await client.rotateClientSecret(\n {\n client_id: \'example\',\n },\n {\n compromise_mode: false,\n migration_window_seconds: 86400\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string",\n "client_secret": "string"\n}\n```\n\n</details>\n\n---\n\n### `listClientOrganizations`\n\nList the organizations enabled on a client, including suspended and revoked ones.\n\n`GET /v1/identity/operator/clients/{client_id}/organizations`\n\n```ts\nconst { data } = await client.listClientOrganizations({\n client_id: \'example\',\n status: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `enableClientOrganization`\n\nEnable 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\n`POST /v1/identity/operator/clients/{client_id}/organizations`\n\n```ts\nconst { data } = await client.enableClientOrganization(\n {\n client_id: \'example\',\n },\n {\n org_id: \'739224\',\n authorization_policy: {\n mode: \'preauthorized\',\n population: \'all_current_org_members\',\n allowed_scopes: [\'openid\'],\n customer_approval_ref: \'string\',\n approved_at: \'1970-01-01T00:00:00.000Z\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getClientOrganization`\n\nRead one organization enablement.\n\n`GET /v1/identity/operator/clients/{client_id}/organizations/{org_id}`\n\n```ts\nconst { data } = await client.getClientOrganization({\n client_id: \'example\',\n org_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateClientOrganization`\n\nRecord 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\n`PUT /v1/identity/operator/clients/{client_id}/organizations/{org_id}`\n\n```ts\nconst { data } = await client.updateClientOrganization(\n {\n client_id: \'example\',\n org_id: \'example\',\n },\n {\n expected_policy_version: 1,\n authorization_policy: {\n mode: \'preauthorized\',\n population: \'all_current_org_members\',\n allowed_scopes: [\'openid\'],\n customer_approval_ref: \'string\',\n approved_at: \'1970-01-01T00:00:00.000Z\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `revokeClientOrganization`\n\nRevoke 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 revok\n\n`DELETE /v1/identity/operator/clients/{client_id}/organizations/{org_id}`\n\n```ts\nconst { data } = await client.revokeClientOrganization(\n {\n client_id: \'example\',\n org_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `suspendClientOrganization`\n\nTemporarily block one organization on this client. Reversible with `activateClientOrganization`.\n\n`POST /v1/identity/operator/clients/{client_id}/organizations/{org_id}:suspend`\n\n```ts\nconst { data } = await client.suspendClientOrganization(\n {\n client_id: \'example\',\n org_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `activateClientOrganization`\n\nResume a suspended organization on this client. Revoked enablements cannot be re-activated; enabling the organization again (`POST \u2026/organizations`) replaces the revoked entry and continues its policy\n\n`POST /v1/identity/operator/clients/{client_id}/organizations/{org_id}:activate`\n\n```ts\nconst { data } = await client.activateClientOrganization({\n client_id: \'example\',\n org_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getUserSubject`\n\nThe pairwise `sub` this client receives for one epilot user, so the partner can bind the person on its\nside **before** the first sign-in (for example a Babelforce agent provisioned through SCIM with\n`\n\n`GET /v1/identity/operator/clients/{client_id}/organizations/{org_id}/users/{user_id}:subject`\n\n```ts\nconst { data } = await client.getUserSubject({\n client_id: \'example\',\n org_id: \'example\',\n user_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "user_id": "100321",\n "sub": "v1.dGhpcy1pcy1hLWR1bW15LXN1YmplY3QtdmFsdWUtMDAx",\n "key_version": "v1",\n "sector": "portal.epilot.cloud"\n}\n```\n\n</details>\n\n---\n\n### `createIdentitySession`\n\nCalled 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;\n\n`GET /v1/identity/session`\n\n```ts\nconst { data } = await client.createIdentitySession()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "org_id": "739224",\n "user_id": "string",\n "expires_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteIdentitySession`\n\nClears the `identity_session` cookie. Called by the portal on logout.\n\n`DELETE /v1/identity/session`\n\n```ts\nconst { data } = await client.deleteIdentitySession()\n```\n\n---\n\n### `launchClient`\n\nOne 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 lin\n\n`GET /v1/identity/launch/{client_id}`\n\n```ts\nconst { data } = await client.launchClient({\n client_id: \'example\',\n target: \'example\',\n extra: \'example\',\n})\n```\n\n---\n\n## Schemas\n\n### `Error`\n\n```ts\ntype Error = {\n status: number\n error: string\n details?: Record<string, unknown>[]\n}\n```\n\n### `PartnerClientId`\n\nOpaque client identifier, unique within the issuer, never reused\n\n```ts\ntype PartnerClientId = string\n```\n\n### `OrgId`\n\nepilot organization id, an opaque case-sensitive string\n\n```ts\ntype OrgId = string\n```\n\n### `UserId`\n\nepilot user id (`custom:ivy_user_id` in a 360 token). A user belongs to exactly one organization.\n\n```ts\ntype UserId = string\n```\n\n### `Environment`\n\nPartner-side environment this client belongs to\n\n```ts\ntype Environment = "dev" | "staging" | "production"\n```\n\n### `PartnerClientStatus`\n\n```ts\ntype PartnerClientStatus = "draft" | "active" | "suspended" | "retired"\n```\n\n### `Scope`\n\n```ts\ntype Scope = "openid" | "email" | "profile"\n```\n\n### `HttpsUri`\n\nAbsolute HTTPS URL without fragment\n\n```ts\ntype HttpsUri = string // uri\n```\n\n### `PartnerClientCreate`\n\n```ts\ntype PartnerClientCreate = {\n partner_key: string\n display_name: string\n description?: string\n environment: "dev" | "staging" | "production"\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n scopes_allowed?: "openid" | "email" | "profile"[]\n}\n```\n\n### `PartnerClientUpdate`\n\n```ts\ntype PartnerClientUpdate = {\n config_version: number\n allow_sector_change?: boolean\n display_name: string\n description?: string\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n scopes_allowed: "openid" | "email" | "profile"[]\n}\n```\n\n### `PartnerClient`\n\n```ts\ntype PartnerClient = {\n client_id: string\n partner_key: string\n display_name: string\n description?: string\n environment: "dev" | "staging" | "production"\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n token_endpoint_auth_method: "client_secret_basic"\n grant_types: "authorization_code"[]\n scopes_allowed: "openid" | "email" | "profile"[]\n status: "draft" | "active" | "suspended" | "retired"\n status_reason?: string\n config_version: number\n secret_rotated_at?: string // date-time\n previous_secret_expires_at?: string // date-time\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n}\n```\n\n### `PartnerClientWithSecret`\n\n```ts\ntype PartnerClientWithSecret = {\n client_id: string\n partner_key: string\n display_name: string\n description?: string\n environment: "dev" | "staging" | "production"\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n token_endpoint_auth_method: "client_secret_basic"\n grant_types: "authorization_code"[]\n scopes_allowed: "openid" | "email" | "profile"[]\n status: "draft" | "active" | "suspended" | "retired"\n status_reason?: string\n config_version: number\n secret_rotated_at?: string // date-time\n previous_secret_expires_at?: string // date-time\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n client_secret: string\n}\n```\n\n### `PartnerClientList`\n\n```ts\ntype PartnerClientList = {\n results: Array<{\n client_id: string\n partner_key: string\n display_name: string\n description?: string\n environment: "dev" | "staging" | "production"\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n token_endpoint_auth_method: "client_secret_basic"\n grant_types: "authorization_code"[]\n scopes_allowed: "openid" | "email" | "profile"[]\n status: "draft" | "active" | "suspended" | "retired"\n status_reason?: string\n config_version: number\n secret_rotated_at?: string // date-time\n previous_secret_expires_at?: string // date-time\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n }>\n next_cursor?: string\n}\n```\n\n### `StatusChangeRequest`\n\n```ts\ntype StatusChangeRequest = {\n reason?: string\n}\n```\n\n### `RotateSecretRequest`\n\n```ts\ntype RotateSecretRequest = {\n compromise_mode?: boolean\n migration_window_seconds?: number\n}\n```\n\n### `AuthorizationPolicyInput`\n\n```ts\ntype AuthorizationPolicyInput = {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at: string // date-time\n}\n```\n\n### `AuthorizationPolicy`\n\n```ts\ntype AuthorizationPolicy = {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at: string // date-time\n version: number\n mandatory_claims: "org_id"[]\n recorded_by: string\n recorded_at: string // date-time\n}\n```\n\n### `OrgEnablementStatus`\n\n```ts\ntype OrgEnablementStatus = "active" | "suspended" | "revoked"\n```\n\n### `OrgEnablementCreate`\n\n```ts\ntype OrgEnablementCreate = {\n org_id: string\n authorization_policy: {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at: string // date-time\n }\n}\n```\n\n### `OrgEnablementUpdate`\n\n```ts\ntype OrgEnablementUpdate = {\n expected_policy_version: number\n authorization_policy: {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at: string // date-time\n }\n}\n```\n\n### `OrgEnablement`\n\n```ts\ntype OrgEnablement = {\n client_id: string\n org_id: string\n status: "active" | "suspended" | "revoked"\n status_reason?: string\n authorization_policy: {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at: string // date-time\n version: number\n mandatory_claims: "org_id"[]\n recorded_by: string\n recorded_at: string // date-time\n }\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n}\n```\n\n### `OrgEnablementList`\n\n```ts\ntype OrgEnablementList = {\n results: Array<{\n client_id: string\n org_id: string\n status: "active" | "suspended" | "revoked"\n status_reason?: string\n authorization_policy: {\n mode?: { ... }\n population?: { ... }\n allowed_scopes: { ... }\n customer_approval_ref: { ... }\n approved_at: { ... }\n version: { ... }\n mandatory_claims: { ... }\n recorded_by: { ... }\n recorded_at: { ... }\n }\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n }>\n}\n```\n\n### `IdentitySession`\n\n```ts\ntype IdentitySession = {\n org_id: string\n user_id: string\n expires_at: string // date-time\n}\n```\n\n### `UserSubject`\n\n```ts\ntype UserSubject = {\n client_id: string\n org_id: string\n user_id: string\n sub: string\n key_version: string\n sector: string\n}\n```\n';
4
+ var identity_default = '# Identity API\n\n- **Base URL:** `https://id.epilot.cloud`\n- **Full API Docs:** [https://docs.epilot.io/api/identity](https://docs.epilot.io/api/identity)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.identity.listClients(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/identity\'\n\nconst identityClient = getClient()\nauthorize(identityClient, () => \'<token>\')\nconst { data } = await identityClient.listClients(...)\n```\n\n## Operations\n\n**Operator Clients**\n- [`listClients`](#listclients)\n- [`createOidcClient`](#createoidcclient)\n- [`getOidcClient`](#getoidcclient)\n- [`updateClient`](#updateclient)\n- [`retireClient`](#retireclient)\n- [`activateClient`](#activateclient)\n- [`suspendClient`](#suspendclient)\n- [`rotateClientSecret`](#rotateclientsecret)\n\n**Operator Organizations**\n- [`listClientOrganizations`](#listclientorganizations)\n- [`enableClientOrganization`](#enableclientorganization)\n- [`getClientOrganization`](#getclientorganization)\n- [`updateClientOrganization`](#updateclientorganization)\n- [`revokeClientOrganization`](#revokeclientorganization)\n- [`suspendClientOrganization`](#suspendclientorganization)\n- [`activateClientOrganization`](#activateclientorganization)\n- [`getUserSubject`](#getusersubject)\n\n**Session**\n- [`createIdentitySession`](#createidentitysession)\n- [`deleteIdentitySession`](#deleteidentitysession)\n\n**Launch**\n- [`launchClient`](#launchclient)\n\n**Schemas**\n- [`Error`](#error)\n- [`PartnerClientId`](#partnerclientid)\n- [`OrgId`](#orgid)\n- [`UserId`](#userid)\n- [`Environment`](#environment)\n- [`PartnerClientStatus`](#partnerclientstatus)\n- [`Scope`](#scope)\n- [`HttpsUri`](#httpsuri)\n- [`PartnerClientCreate`](#partnerclientcreate)\n- [`PartnerClientUpdate`](#partnerclientupdate)\n- [`PartnerClient`](#partnerclient)\n- [`PartnerClientWithSecret`](#partnerclientwithsecret)\n- [`PartnerClientList`](#partnerclientlist)\n- [`StatusChangeRequest`](#statuschangerequest)\n- [`RotateSecretRequest`](#rotatesecretrequest)\n- [`AuthorizationPolicyInput`](#authorizationpolicyinput)\n- [`AuthorizationPolicy`](#authorizationpolicy)\n- [`OrgEnablementStatus`](#orgenablementstatus)\n- [`OrgEnablementCreate`](#orgenablementcreate)\n- [`OrgEnablementUpdate`](#orgenablementupdate)\n- [`OrgEnablement`](#orgenablement)\n- [`OrgEnablementList`](#orgenablementlist)\n- [`IdentitySession`](#identitysession)\n- [`UserSubject`](#usersubject)\n\n### `listClients`\n\nList registered partner clients. The client secret is never returned.\n\n`GET /v1/identity/operator/clients`\n\n```ts\nconst { data } = await client.listClients({\n partner_key: \'example\',\n status: \'example\',\n size: 1,\n cursor: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n }\n ],\n "next_cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `createOidcClient`\n\nCreate 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\n`POST /v1/identity/operator/clients`\n\n```ts\nconst { data } = await client.createOidcClient(\n null,\n {\n partner_key: \'babelforce\',\n display_name: \'Babelforce\',\n description: \'string\',\n environment: \'dev\',\n redirect_uris: [\'https://partner.example.com/auth/callback\'],\n sector_identifier_uri: \'https://partner.example.com/auth/callback\',\n initiate_login_uri: \'https://partner.example.com/auth/callback\',\n launch_target_prefixes: [\'string\'],\n scopes_allowed: [\'openid\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string",\n "client_secret": "string"\n}\n```\n\n</details>\n\n---\n\n### `getOidcClient`\n\nRead a partner client. The client secret is never returned.\n\n`GET /v1/identity/operator/clients/{client_id}`\n\n```ts\nconst { data } = await client.getOidcClient({\n client_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateClient`\n\nReplace the mutable configuration of a client. `config_version` must equal the current\nversion (compare-and-swap); a mismatch is rejected with `409`.\n\n`PUT /v1/identity/operator/clients/{client_id}`\n\n```ts\nconst { data } = await client.updateClient(\n {\n client_id: \'example\',\n },\n {\n config_version: 1,\n allow_sector_change: false,\n display_name: \'string\',\n description: \'string\',\n redirect_uris: [\'https://partner.example.com/auth/callback\'],\n sector_identifier_uri: \'https://partner.example.com/auth/callback\',\n initiate_login_uri: \'https://partner.example.com/auth/callback\',\n launch_target_prefixes: [\'string\'],\n scopes_allowed: [\'openid\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `retireClient`\n\nRetire 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\n`DELETE /v1/identity/operator/clients/{client_id}`\n\n```ts\nconst { data } = await client.retireClient({\n client_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `activateClient`\n\nActivate 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 `c\n\n`POST /v1/identity/operator/clients/{client_id}:activate`\n\n```ts\nconst { data } = await client.activateClient({\n client_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `suspendClient`\n\nImmediately block the client for every organization. Provider-side artefacts (codes, tokens,\ngrants) are revoked; the audit trail is kept. Reversible with `activateClient`.\n\n`POST /v1/identity/operator/clients/{client_id}:suspend`\n\n```ts\nconst { data } = await client.suspendClient(\n {\n client_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `rotateClientSecret`\n\nIssue 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\n\n`POST /v1/identity/operator/clients/{client_id}:rotateSecret`\n\n```ts\nconst { data } = await client.rotateClientSecret(\n {\n client_id: \'example\',\n },\n {\n compromise_mode: false,\n migration_window_seconds: 86400\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "partner_key": "string",\n "display_name": "string",\n "description": "string",\n "environment": "dev",\n "redirect_uris": ["https://partner.example.com/auth/callback"],\n "sector_identifier_uri": "https://partner.example.com/auth/callback",\n "initiate_login_uri": "https://partner.example.com/auth/callback",\n "launch_target_prefixes": ["string"],\n "token_endpoint_auth_method": "client_secret_basic",\n "grant_types": ["authorization_code"],\n "scopes_allowed": ["openid"],\n "status": "draft",\n "status_reason": "string",\n "config_version": 1,\n "secret_rotated_at": "1970-01-01T00:00:00.000Z",\n "previous_secret_expires_at": "1970-01-01T00:00:00.000Z",\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string",\n "client_secret": "string"\n}\n```\n\n</details>\n\n---\n\n### `listClientOrganizations`\n\nList the organizations enabled on a client, including suspended and revoked ones.\n\n`GET /v1/identity/operator/clients/{client_id}/organizations`\n\n```ts\nconst { data } = await client.listClientOrganizations({\n client_id: \'example\',\n status: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `enableClientOrganization`\n\nEnable 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\n`POST /v1/identity/operator/clients/{client_id}/organizations`\n\n```ts\nconst { data } = await client.enableClientOrganization(\n {\n client_id: \'example\',\n },\n {\n org_id: \'739224\',\n authorization_policy: {\n mode: \'preauthorized\',\n population: \'all_current_org_members\',\n allowed_scopes: [\'openid\'],\n customer_approval_ref: \'string\',\n approved_at: \'1970-01-01T00:00:00.000Z\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getClientOrganization`\n\nRead one organization enablement.\n\n`GET /v1/identity/operator/clients/{client_id}/organizations/{org_id}`\n\n```ts\nconst { data } = await client.getClientOrganization({\n client_id: \'example\',\n org_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateClientOrganization`\n\nRecord 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\n`PUT /v1/identity/operator/clients/{client_id}/organizations/{org_id}`\n\n```ts\nconst { data } = await client.updateClientOrganization(\n {\n client_id: \'example\',\n org_id: \'example\',\n },\n {\n expected_policy_version: 1,\n authorization_policy: {\n mode: \'preauthorized\',\n population: \'all_current_org_members\',\n allowed_scopes: [\'openid\'],\n customer_approval_ref: \'string\',\n approved_at: \'1970-01-01T00:00:00.000Z\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `revokeClientOrganization`\n\nRevoke 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 revok\n\n`DELETE /v1/identity/operator/clients/{client_id}/organizations/{org_id}`\n\n```ts\nconst { data } = await client.revokeClientOrganization(\n {\n client_id: \'example\',\n org_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `suspendClientOrganization`\n\nTemporarily block one organization on this client. Reversible with `activateClientOrganization`.\n\n`POST /v1/identity/operator/clients/{client_id}/organizations/{org_id}:suspend`\n\n```ts\nconst { data } = await client.suspendClientOrganization(\n {\n client_id: \'example\',\n org_id: \'example\',\n },\n {\n reason: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `activateClientOrganization`\n\nResume a suspended organization on this client. Revoked enablements cannot be re-activated; enabling the organization again (`POST \u2026/organizations`) replaces the revoked entry and continues its policy\n\n`POST /v1/identity/operator/clients/{client_id}/organizations/{org_id}:activate`\n\n```ts\nconst { data } = await client.activateClientOrganization({\n client_id: \'example\',\n org_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "status": "active",\n "status_reason": "string",\n "authorization_policy": {\n "mode": "preauthorized",\n "population": "all_current_org_members",\n "allowed_scopes": ["openid"],\n "customer_approval_ref": "string",\n "approved_at": "1970-01-01T00:00:00.000Z",\n "version": 1,\n "mandatory_claims": ["org_id"],\n "recorded_by": "string",\n "recorded_at": "1970-01-01T00:00:00.000Z"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "updated_at": "1970-01-01T00:00:00.000Z",\n "created_by": "string",\n "updated_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getUserSubject`\n\nThe pairwise `sub` this client receives for one epilot user, so the partner can bind the person on its\nside **before** the first sign-in (for example a Babelforce agent provisioned through SCIM with\n`\n\n`GET /v1/identity/operator/clients/{client_id}/organizations/{org_id}/users/{user_id}:subject`\n\n```ts\nconst { data } = await client.getUserSubject({\n client_id: \'example\',\n org_id: \'example\',\n user_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "client_id": "bf-prod-x7k2",\n "org_id": "739224",\n "user_id": "100321",\n "sub": "v1.dGhpcy1pcy1hLWR1bW15LXN1YmplY3QtdmFsdWUtMDAx",\n "key_version": "v1",\n "sector": "portal.epilot.cloud"\n}\n```\n\n</details>\n\n---\n\n### `createIdentitySession`\n\nCalled 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;\n\n`GET /v1/identity/session`\n\n```ts\nconst { data } = await client.createIdentitySession()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "org_id": "739224",\n "user_id": "string",\n "expires_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `deleteIdentitySession`\n\nClears the `identity_session` cookie. Called by the portal on logout.\n\n`DELETE /v1/identity/session`\n\n```ts\nconst { data } = await client.deleteIdentitySession()\n```\n\n---\n\n### `launchClient`\n\nOne 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 lin\n\n`GET /v1/identity/launch/{client_id}`\n\n```ts\nconst { data } = await client.launchClient({\n client_id: \'example\',\n target: \'example\',\n extra: \'example\',\n})\n```\n\n---\n\n## Schemas\n\n### `Error`\n\n```ts\ntype Error = {\n status: number\n error: string\n details?: Record<string, unknown>[]\n}\n```\n\n### `PartnerClientId`\n\nOpaque client identifier, unique within the issuer, never reused\n\n```ts\ntype PartnerClientId = string\n```\n\n### `OrgId`\n\nepilot organization id, an opaque case-sensitive string\n\n```ts\ntype OrgId = string\n```\n\n### `UserId`\n\nepilot user id (`custom:ivy_user_id` in a 360 token). A user belongs to exactly one organization.\n\n```ts\ntype UserId = string\n```\n\n### `Environment`\n\nPartner-side environment this client belongs to\n\n```ts\ntype Environment = "dev" | "staging" | "production"\n```\n\n### `PartnerClientStatus`\n\n```ts\ntype PartnerClientStatus = "draft" | "active" | "suspended" | "retired"\n```\n\n### `Scope`\n\n```ts\ntype Scope = "openid" | "email" | "profile"\n```\n\n### `HttpsUri`\n\nAbsolute HTTPS URL without fragment\n\n```ts\ntype HttpsUri = string // uri\n```\n\n### `PartnerClientCreate`\n\n```ts\ntype PartnerClientCreate = {\n partner_key: string\n display_name: string\n description?: string\n environment: "dev" | "staging" | "production"\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n scopes_allowed?: "openid" | "email" | "profile"[]\n}\n```\n\n### `PartnerClientUpdate`\n\n```ts\ntype PartnerClientUpdate = {\n config_version: number\n allow_sector_change?: boolean\n display_name: string\n description?: string\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n scopes_allowed: "openid" | "email" | "profile"[]\n}\n```\n\n### `PartnerClient`\n\n```ts\ntype PartnerClient = {\n client_id: string\n partner_key: string\n display_name: string\n description?: string\n environment: "dev" | "staging" | "production"\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n token_endpoint_auth_method: "client_secret_basic"\n grant_types: "authorization_code"[]\n scopes_allowed: "openid" | "email" | "profile"[]\n status: "draft" | "active" | "suspended" | "retired"\n status_reason?: string\n config_version: number\n secret_rotated_at?: string // date-time\n previous_secret_expires_at?: string // date-time\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n}\n```\n\n### `PartnerClientWithSecret`\n\n```ts\ntype PartnerClientWithSecret = {\n client_id: string\n partner_key: string\n display_name: string\n description?: string\n environment: "dev" | "staging" | "production"\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n token_endpoint_auth_method: "client_secret_basic"\n grant_types: "authorization_code"[]\n scopes_allowed: "openid" | "email" | "profile"[]\n status: "draft" | "active" | "suspended" | "retired"\n status_reason?: string\n config_version: number\n secret_rotated_at?: string // date-time\n previous_secret_expires_at?: string // date-time\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n client_secret: string\n}\n```\n\n### `PartnerClientList`\n\n```ts\ntype PartnerClientList = {\n results: Array<{\n client_id: string\n partner_key: string\n display_name: string\n description?: string\n environment: "dev" | "staging" | "production"\n redirect_uris: string // uri[]\n sector_identifier_uri?: string // uri\n initiate_login_uri?: string // uri\n launch_target_prefixes?: string[]\n token_endpoint_auth_method: "client_secret_basic"\n grant_types: "authorization_code"[]\n scopes_allowed: "openid" | "email" | "profile"[]\n status: "draft" | "active" | "suspended" | "retired"\n status_reason?: string\n config_version: number\n secret_rotated_at?: string // date-time\n previous_secret_expires_at?: string // date-time\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n }>\n next_cursor?: string\n}\n```\n\n### `StatusChangeRequest`\n\n```ts\ntype StatusChangeRequest = {\n reason?: string\n}\n```\n\n### `RotateSecretRequest`\n\n```ts\ntype RotateSecretRequest = {\n compromise_mode?: boolean\n migration_window_seconds?: number\n}\n```\n\n### `AuthorizationPolicyInput`\n\n```ts\ntype AuthorizationPolicyInput = {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at?: string // date-time\n}\n```\n\n### `AuthorizationPolicy`\n\n```ts\ntype AuthorizationPolicy = {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at: string // date-time\n version: number\n mandatory_claims: "org_id"[]\n recorded_by: string\n recorded_at: string // date-time\n}\n```\n\n### `OrgEnablementStatus`\n\n```ts\ntype OrgEnablementStatus = "active" | "suspended" | "revoked"\n```\n\n### `OrgEnablementCreate`\n\n```ts\ntype OrgEnablementCreate = {\n org_id: string\n authorization_policy: {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at?: string // date-time\n }\n}\n```\n\n### `OrgEnablementUpdate`\n\n```ts\ntype OrgEnablementUpdate = {\n expected_policy_version: number\n authorization_policy: {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at?: string // date-time\n }\n}\n```\n\n### `OrgEnablement`\n\n```ts\ntype OrgEnablement = {\n client_id: string\n org_id: string\n status: "active" | "suspended" | "revoked"\n status_reason?: string\n authorization_policy: {\n mode?: "preauthorized"\n population?: "all_current_org_members"\n allowed_scopes: "openid" | "email" | "profile"[]\n customer_approval_ref: string\n approved_at: string // date-time\n version: number\n mandatory_claims: "org_id"[]\n recorded_by: string\n recorded_at: string // date-time\n }\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n}\n```\n\n### `OrgEnablementList`\n\n```ts\ntype OrgEnablementList = {\n results: Array<{\n client_id: string\n org_id: string\n status: "active" | "suspended" | "revoked"\n status_reason?: string\n authorization_policy: {\n mode?: { ... }\n population?: { ... }\n allowed_scopes: { ... }\n customer_approval_ref: { ... }\n approved_at: { ... }\n version: { ... }\n mandatory_claims: { ... }\n recorded_by: { ... }\n recorded_at: { ... }\n }\n created_at: string // date-time\n updated_at: string // date-time\n created_by?: string\n updated_by?: string\n }>\n}\n```\n\n### `IdentitySession`\n\n```ts\ntype IdentitySession = {\n org_id: string\n user_id: string\n expires_at: string // date-time\n}\n```\n\n### `UserSubject`\n\n```ts\ntype UserSubject = {\n client_id: string\n org_id: string\n user_id: string\n sub: string\n key_version: string\n sector: string\n}\n```\n';
5
5
 
6
6
 
7
7
  exports.default = identity_default;
@@ -25,10 +25,17 @@ declare namespace Components {
25
25
  Schemas.OrgId /* ^[A-Za-z0-9_-]+$ */;
26
26
  export type PartnerKeyQuery = string;
27
27
  export type SizeQuery = number;
28
+ export type UserIdPath = /**
29
+ * epilot user id (`custom:ivy_user_id` in a 360 token). A user belongs to exactly one organization.
30
+ * example:
31
+ * 100321
32
+ */
33
+ Schemas.UserId /* ^[A-Za-z0-9_-]+$ */;
28
34
  }
29
35
  export interface PathParameters {
30
36
  ClientIdPath?: Parameters.ClientIdPath;
31
37
  OrgIdPath?: Parameters.OrgIdPath;
38
+ UserIdPath?: Parameters.UserIdPath;
32
39
  }
33
40
  export interface QueryParameters {
34
41
  AnyOtherQueryParameters?: Parameters.AnyOtherQueryParameters;
@@ -60,9 +67,17 @@ declare namespace Components {
60
67
  * Reference to the customer's approval evidence (ticket, signed order, contract clause)
61
68
  */
62
69
  customer_approval_ref: string;
70
+ /**
71
+ * When the customer approved. Optional: enabling an organization defaults it to the time of the
72
+ * request, and a policy update keeps the current value unless a new one is given.
73
+ *
74
+ */
63
75
  approved_at: string; // date-time
64
76
  version: number;
65
77
  mandatory_claims: ("org_id")[];
78
+ /**
79
+ * Email of the admin-portal operator who recorded this policy version
80
+ */
66
81
  recorded_by: string;
67
82
  recorded_at: string; // date-time
68
83
  }
@@ -80,7 +95,12 @@ declare namespace Components {
80
95
  * Reference to the customer's approval evidence (ticket, signed order, contract clause)
81
96
  */
82
97
  customer_approval_ref: string;
83
- approved_at: string; // date-time
98
+ /**
99
+ * When the customer approved. Optional: enabling an organization defaults it to the time of the
100
+ * request, and a policy update keeps the current value unless a new one is given.
101
+ *
102
+ */
103
+ approved_at?: string; // date-time
84
104
  }
85
105
  /**
86
106
  * Partner-side environment this client belongs to
@@ -122,7 +142,7 @@ declare namespace Components {
122
142
  */
123
143
  user_id: string;
124
144
  /**
125
- * When the mirrored credential, and therefore the cookie, expires
145
+ * When the cookie expires (the mirrored credential's expiry, capped at 15 minutes)
126
146
  */
127
147
  expires_at: string; // date-time
128
148
  }
@@ -142,10 +162,15 @@ declare namespace Components {
142
162
  status: OrgEnablementStatus;
143
163
  status_reason?: string;
144
164
  authorization_policy: AuthorizationPolicy;
145
- partner_account?: /* Optional audit reference to the partner tenant this organization maps to. The partner enforces the mapping. */ PartnerAccount;
146
165
  created_at: string; // date-time
147
166
  updated_at: string; // date-time
167
+ /**
168
+ * Email of the admin-portal operator who enabled the organization
169
+ */
148
170
  created_by?: string;
171
+ /**
172
+ * Email of the admin-portal operator who last changed the enablement
173
+ */
149
174
  updated_by?: string;
150
175
  }
151
176
  export interface OrgEnablementCreate {
@@ -156,7 +181,6 @@ declare namespace Components {
156
181
  */
157
182
  OrgId /* ^[A-Za-z0-9_-]+$ */;
158
183
  authorization_policy: AuthorizationPolicyInput;
159
- partner_account?: /* Optional audit reference to the partner tenant this organization maps to. The partner enforces the mapping. */ PartnerAccount;
160
184
  }
161
185
  export interface OrgEnablementList {
162
186
  results: OrgEnablement[];
@@ -168,7 +192,6 @@ declare namespace Components {
168
192
  */
169
193
  expected_policy_version: number;
170
194
  authorization_policy: AuthorizationPolicyInput;
171
- partner_account?: /* Optional audit reference to the partner tenant this organization maps to. The partner enforces the mapping. */ PartnerAccount;
172
195
  }
173
196
  /**
174
197
  * epilot organization id, an opaque case-sensitive string
@@ -176,13 +199,6 @@ declare namespace Components {
176
199
  * 739224
177
200
  */
178
201
  export type OrgId = string; // ^[A-Za-z0-9_-]+$
179
- /**
180
- * Optional audit reference to the partner tenant this organization maps to. The partner enforces the mapping.
181
- */
182
- export interface PartnerAccount {
183
- id: string;
184
- label?: string;
185
- }
186
202
  export interface PartnerClient {
187
203
  client_id: /**
188
204
  * Opaque client identifier, unique within the issuer, never reused
@@ -230,9 +246,12 @@ declare namespace Components {
230
246
  created_at: string; // date-time
231
247
  updated_at: string; // date-time
232
248
  /**
233
- * Admin-portal identity of the operator who created the client
249
+ * Email of the admin-portal operator who created the client (their Cognito identity when the pool holds no email)
234
250
  */
235
251
  created_by?: string;
252
+ /**
253
+ * Email of the admin-portal operator who last changed the client
254
+ */
236
255
  updated_by?: string;
237
256
  }
238
257
  export interface PartnerClientCreate {
@@ -393,9 +412,12 @@ declare namespace Components {
393
412
  created_at: string; // date-time
394
413
  updated_at: string; // date-time
395
414
  /**
396
- * Admin-portal identity of the operator who created the client
415
+ * Email of the admin-portal operator who created the client (their Cognito identity when the pool holds no email)
397
416
  */
398
417
  created_by?: string;
418
+ /**
419
+ * Email of the admin-portal operator who last changed the client
420
+ */
399
421
  updated_by?: string;
400
422
  /**
401
423
  * Returned exactly once. Store it securely; it cannot be retrieved again.
@@ -416,6 +438,50 @@ declare namespace Components {
416
438
  export interface StatusChangeRequest {
417
439
  reason?: string;
418
440
  }
441
+ /**
442
+ * epilot user id (`custom:ivy_user_id` in a 360 token). A user belongs to exactly one organization.
443
+ * example:
444
+ * 100321
445
+ */
446
+ export type UserId = string; // ^[A-Za-z0-9_-]+$
447
+ export interface UserSubject {
448
+ client_id: /**
449
+ * Opaque client identifier, unique within the issuer, never reused
450
+ * example:
451
+ * bf-prod-x7k2
452
+ */
453
+ PartnerClientId /* ^[A-Za-z0-9._~-]+$ */;
454
+ org_id: /**
455
+ * epilot organization id, an opaque case-sensitive string
456
+ * example:
457
+ * 739224
458
+ */
459
+ OrgId /* ^[A-Za-z0-9_-]+$ */;
460
+ user_id: /**
461
+ * epilot user id (`custom:ivy_user_id` in a 360 token). A user belongs to exactly one organization.
462
+ * example:
463
+ * 100321
464
+ */
465
+ UserId /* ^[A-Za-z0-9_-]+$ */;
466
+ /**
467
+ * The pairwise subject this client receives for the user, `<key_version>.<base64url digest>`
468
+ * example:
469
+ * v1.dGhpcy1pcy1hLWR1bW15LXN1YmplY3QtdmFsdWUtMDAx
470
+ */
471
+ sub: string;
472
+ /**
473
+ * Active pairwise key version the value was derived with
474
+ * example:
475
+ * v1
476
+ */
477
+ key_version: string;
478
+ /**
479
+ * Pairwise sector the value was derived for (sector_identifier_uri host, else the first redirect host)
480
+ * example:
481
+ * portal.epilot.cloud
482
+ */
483
+ sector: string;
484
+ }
419
485
  }
420
486
  }
421
487
  declare namespace Paths {
@@ -486,6 +552,16 @@ declare namespace Paths {
486
552
  export type $404 = Components.Responses.NotFound;
487
553
  }
488
554
  }
555
+ namespace GetUserSubject {
556
+ namespace Responses {
557
+ export type $200 = Components.Schemas.UserSubject;
558
+ export type $400 = Components.Schemas.Error;
559
+ export type $401 = Components.Responses.Unauthorized;
560
+ export type $403 = Components.Responses.Forbidden;
561
+ export type $404 = Components.Schemas.Error;
562
+ export type $409 = Components.Schemas.Error;
563
+ }
564
+ }
489
565
  namespace LaunchClient {
490
566
  namespace Parameters {
491
567
  export interface Extra {
@@ -652,6 +728,13 @@ declare namespace Paths {
652
728
  export type $1 = Components.Parameters.OrgIdPath;
653
729
  }
654
730
  }
731
+ namespace V1IdentityOperatorClients$ClientIdOrganizations$OrgIdUsers$UserIdSubject {
732
+ namespace Parameters {
733
+ export type $0 = Components.Parameters.ClientIdPath;
734
+ export type $1 = Components.Parameters.OrgIdPath;
735
+ export type $2 = Components.Parameters.UserIdPath;
736
+ }
737
+ }
655
738
  namespace V1IdentityOperatorClients$ClientIdRotateSecret {
656
739
  namespace Parameters {
657
740
  export type $0 = Components.Parameters.ClientIdPath;
@@ -838,12 +921,37 @@ interface OperationMethods {
838
921
  data?: any,
839
922
  config?: AxiosRequestConfig
840
923
  ): OperationResponse<Paths.ActivateClientOrganization.Responses.$200>
924
+ /**
925
+ * getUserSubject - getUserSubject
926
+ *
927
+ * The pairwise `sub` this client receives for one epilot user, so the partner can bind the person on its
928
+ * side **before** the first sign-in (for example a Babelforce agent provisioned through SCIM with
929
+ * `externalId = sub`).
930
+ *
931
+ * Derived exactly as the token endpoint derives it, never stored:
932
+ * `sub = key_version + "." + base64url(HMAC-SHA256(key[key_version], sector + "\n" + user_id))`, where the
933
+ * sector is the client's `sector_identifier_uri` host or, without one, the host of its first redirect URI.
934
+ * The same inputs always give the same value; it changes only when the client's sector or the active key
935
+ * version changes.
936
+ *
937
+ * Requires an **active** client (a draft client's sector may still change and would invalidate every binding),
938
+ * an organization enablement that is not revoked, and the user being an active member of that organization
939
+ * (checked live against user-api). Every read is written to the audit trail: the value is a partner-facing
940
+ * identifier.
941
+ *
942
+ */
943
+ 'getUserSubject'(
944
+ parameters?: Parameters<UnknownParamsObject> | null,
945
+ data?: any,
946
+ config?: AxiosRequestConfig
947
+ ): OperationResponse<Paths.GetUserSubject.Responses.$200>
841
948
  /**
842
949
  * createIdentitySession - createIdentitySession
843
950
  *
844
951
  * Called by the epilot portal through the portal-host proxy after every persisted 360 session.
845
952
  * Validates the 360 bearer token itself and mirrors it into the `identity_session` cookie
846
- * (`HttpOnly; Secure; Path=/v1/identity`) whose lifetime equals the remaining token lifetime.
953
+ * (`HttpOnly; Secure; Path=/v1/identity`) whose lifetime is the remaining token lifetime, capped at 15 minutes
954
+ * (the portal mirrors the credential again on every token refresh and just before a partner sign-in).
847
955
  * The cookie is what proves the live 360 session during `completeInteraction`.
848
956
  *
849
957
  */
@@ -1073,13 +1181,40 @@ interface PathsDictionary {
1073
1181
  config?: AxiosRequestConfig
1074
1182
  ): OperationResponse<Paths.ActivateClientOrganization.Responses.$200>
1075
1183
  }
1184
+ ['/v1/identity/operator/clients/{client_id}/organizations/{org_id}/users/{user_id}:subject']: {
1185
+ /**
1186
+ * getUserSubject - getUserSubject
1187
+ *
1188
+ * The pairwise `sub` this client receives for one epilot user, so the partner can bind the person on its
1189
+ * side **before** the first sign-in (for example a Babelforce agent provisioned through SCIM with
1190
+ * `externalId = sub`).
1191
+ *
1192
+ * Derived exactly as the token endpoint derives it, never stored:
1193
+ * `sub = key_version + "." + base64url(HMAC-SHA256(key[key_version], sector + "\n" + user_id))`, where the
1194
+ * sector is the client's `sector_identifier_uri` host or, without one, the host of its first redirect URI.
1195
+ * The same inputs always give the same value; it changes only when the client's sector or the active key
1196
+ * version changes.
1197
+ *
1198
+ * Requires an **active** client (a draft client's sector may still change and would invalidate every binding),
1199
+ * an organization enablement that is not revoked, and the user being an active member of that organization
1200
+ * (checked live against user-api). Every read is written to the audit trail: the value is a partner-facing
1201
+ * identifier.
1202
+ *
1203
+ */
1204
+ 'get'(
1205
+ parameters?: Parameters<UnknownParamsObject> | null,
1206
+ data?: any,
1207
+ config?: AxiosRequestConfig
1208
+ ): OperationResponse<Paths.GetUserSubject.Responses.$200>
1209
+ }
1076
1210
  ['/v1/identity/session']: {
1077
1211
  /**
1078
1212
  * createIdentitySession - createIdentitySession
1079
1213
  *
1080
1214
  * Called by the epilot portal through the portal-host proxy after every persisted 360 session.
1081
1215
  * Validates the 360 bearer token itself and mirrors it into the `identity_session` cookie
1082
- * (`HttpOnly; Secure; Path=/v1/identity`) whose lifetime equals the remaining token lifetime.
1216
+ * (`HttpOnly; Secure; Path=/v1/identity`) whose lifetime is the remaining token lifetime, capped at 15 minutes
1217
+ * (the portal mirrors the credential again on every token refresh and just before a partner sign-in).
1083
1218
  * The cookie is what proves the live 360 session during `completeInteraction`.
1084
1219
  *
1085
1220
  */
@@ -1138,7 +1273,6 @@ type OrgEnablementList = Components.Schemas.OrgEnablementList;
1138
1273
  type OrgEnablementStatus = Components.Schemas.OrgEnablementStatus;
1139
1274
  type OrgEnablementUpdate = Components.Schemas.OrgEnablementUpdate;
1140
1275
  type OrgId = Components.Schemas.OrgId;
1141
- type PartnerAccount = Components.Schemas.PartnerAccount;
1142
1276
  type PartnerClient = Components.Schemas.PartnerClient;
1143
1277
  type PartnerClientCreate = Components.Schemas.PartnerClientCreate;
1144
1278
  type PartnerClientId = Components.Schemas.PartnerClientId;
@@ -1149,5 +1283,7 @@ type PartnerClientWithSecret = Components.Schemas.PartnerClientWithSecret;
1149
1283
  type RotateSecretRequest = Components.Schemas.RotateSecretRequest;
1150
1284
  type Scope = Components.Schemas.Scope;
1151
1285
  type StatusChangeRequest = Components.Schemas.StatusChangeRequest;
1286
+ type UserId = Components.Schemas.UserId;
1287
+ type UserSubject = Components.Schemas.UserSubject;
1152
1288
 
1153
- export { type AuthorizationPolicy as A, type Client as C, type Environment as E, type HttpsUri as H, type IdentitySession as I, type OperationMethods as O, Paths as P, type RotateSecretRequest as R, type Scope as S, Components as a, type PathsDictionary as b, type AuthorizationPolicyInput as c, type Error as d, type OrgEnablement as e, type OrgEnablementCreate as f, type OrgEnablementList as g, type OrgEnablementStatus as h, type OrgEnablementUpdate as i, type OrgId as j, type PartnerAccount as k, type PartnerClient as l, type PartnerClientCreate as m, type PartnerClientId as n, type PartnerClientList as o, type PartnerClientStatus as p, type PartnerClientUpdate as q, type PartnerClientWithSecret as r, type StatusChangeRequest as s };
1289
+ export { type AuthorizationPolicy as A, type Client as C, type Environment as E, type HttpsUri as H, type IdentitySession as I, type OperationMethods as O, Paths as P, type RotateSecretRequest as R, type Scope as S, type UserId as U, Components as a, type PathsDictionary as b, type AuthorizationPolicyInput as c, type Error as d, type OrgEnablement as e, type OrgEnablementCreate as f, type OrgEnablementList as g, type OrgEnablementStatus as h, type OrgEnablementUpdate as i, type OrgId as j, type PartnerClient as k, type PartnerClientCreate as l, type PartnerClientId as m, type PartnerClientList as n, type PartnerClientStatus as o, type PartnerClientUpdate as p, type PartnerClientWithSecret as q, type StatusChangeRequest as r, type UserSubject as s };