@epilot/sdk 2.20.81 → 2.20.82
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.
- package/definitions/phone-integration-runtime.json +1 -1
- package/definitions/phone-integration.json +117 -0
- package/dist/apis/access-token.cjs +6 -6
- package/dist/apis/access-token.js +1 -1
- package/dist/apis/address-suggestions.cjs +6 -6
- package/dist/apis/address-suggestions.js +1 -1
- package/dist/apis/address.cjs +6 -6
- package/dist/apis/address.js +1 -1
- package/dist/apis/ai-agents.cjs +6 -6
- package/dist/apis/ai-agents.js +1 -1
- package/dist/apis/app.cjs +6 -6
- package/dist/apis/app.js +1 -1
- package/dist/apis/audit-logs.cjs +6 -6
- package/dist/apis/audit-logs.js +1 -1
- package/dist/apis/automation.cjs +6 -6
- package/dist/apis/automation.js +1 -1
- package/dist/apis/billing.cjs +6 -6
- package/dist/apis/billing.js +1 -1
- package/dist/apis/blueprint-manifest.cjs +6 -6
- package/dist/apis/blueprint-manifest.js +1 -1
- package/dist/apis/calendar.cjs +6 -6
- package/dist/apis/calendar.js +1 -1
- package/dist/apis/chat.cjs +6 -6
- package/dist/apis/chat.js +1 -1
- package/dist/apis/configuration-hub.cjs +6 -6
- package/dist/apis/configuration-hub.js +1 -1
- package/dist/apis/consent.cjs +6 -6
- package/dist/apis/consent.js +1 -1
- package/dist/apis/customer-portal.cjs +6 -6
- package/dist/apis/customer-portal.js +1 -1
- package/dist/apis/dashboard.cjs +6 -6
- package/dist/apis/dashboard.js +1 -1
- package/dist/apis/data-governance.cjs +6 -6
- package/dist/apis/data-governance.js +1 -1
- package/dist/apis/deduplication.cjs +6 -6
- package/dist/apis/deduplication.js +1 -1
- package/dist/apis/design.cjs +6 -6
- package/dist/apis/design.js +1 -1
- package/dist/apis/document.cjs +6 -6
- package/dist/apis/document.js +1 -1
- package/dist/apis/email-settings.cjs +6 -6
- package/dist/apis/email-settings.js +1 -1
- package/dist/apis/email-template.cjs +6 -6
- package/dist/apis/email-template.js +1 -1
- package/dist/apis/entity-mapping.cjs +6 -6
- package/dist/apis/entity-mapping.js +1 -1
- package/dist/apis/entity.cjs +6 -6
- package/dist/apis/entity.js +1 -1
- package/dist/apis/environments.cjs +6 -6
- package/dist/apis/environments.js +1 -1
- package/dist/apis/event-catalog.cjs +6 -6
- package/dist/apis/event-catalog.js +1 -1
- package/dist/apis/external-values.cjs +6 -6
- package/dist/apis/external-values.js +1 -1
- package/dist/apis/file.cjs +6 -6
- package/dist/apis/file.js +1 -1
- package/dist/apis/iban.cjs +6 -6
- package/dist/apis/iban.js +1 -1
- package/dist/apis/identity.cjs +6 -6
- package/dist/apis/identity.js +1 -1
- package/dist/apis/integration-toolkit.cjs +6 -6
- package/dist/apis/integration-toolkit.js +1 -1
- package/dist/apis/journey.cjs +6 -6
- package/dist/apis/journey.js +1 -1
- package/dist/apis/kanban.cjs +6 -6
- package/dist/apis/kanban.js +1 -1
- package/dist/apis/message.cjs +6 -6
- package/dist/apis/message.js +1 -1
- package/dist/apis/metering.cjs +6 -6
- package/dist/apis/metering.js +1 -1
- package/dist/apis/notes.cjs +6 -6
- package/dist/apis/notes.js +1 -1
- package/dist/apis/notification.cjs +6 -6
- package/dist/apis/notification.js +1 -1
- package/dist/apis/organization.cjs +6 -6
- package/dist/apis/organization.js +1 -1
- package/dist/apis/partner-directory.cjs +6 -6
- package/dist/apis/partner-directory.js +1 -1
- package/dist/apis/permissions.cjs +6 -6
- package/dist/apis/permissions.js +1 -1
- package/dist/apis/phone-integration.cjs +8 -8
- package/dist/apis/phone-integration.d.cts +2 -2
- package/dist/apis/phone-integration.d.ts +2 -2
- package/dist/apis/phone-integration.js +2 -2
- package/dist/apis/pricing-tier.cjs +6 -6
- package/dist/apis/pricing-tier.js +1 -1
- package/dist/apis/pricing.cjs +6 -6
- package/dist/apis/pricing.js +1 -1
- package/dist/apis/purpose.cjs +6 -6
- package/dist/apis/purpose.js +1 -1
- package/dist/apis/query.cjs +6 -6
- package/dist/apis/query.js +1 -1
- package/dist/apis/sandbox.cjs +6 -6
- package/dist/apis/sandbox.js +1 -1
- package/dist/apis/sharing.cjs +6 -6
- package/dist/apis/sharing.js +1 -1
- package/dist/apis/snapshot.cjs +6 -6
- package/dist/apis/snapshot.js +1 -1
- package/dist/apis/submission.cjs +6 -6
- package/dist/apis/submission.js +1 -1
- package/dist/apis/target.cjs +6 -6
- package/dist/apis/target.js +1 -1
- package/dist/apis/targeting.cjs +6 -6
- package/dist/apis/targeting.js +1 -1
- package/dist/apis/template-variables.cjs +6 -6
- package/dist/apis/template-variables.js +1 -1
- package/dist/apis/user.cjs +6 -6
- package/dist/apis/user.js +1 -1
- package/dist/apis/validation-rules.cjs +6 -6
- package/dist/apis/validation-rules.js +1 -1
- package/dist/apis/webhooks.cjs +6 -6
- package/dist/apis/webhooks.js +1 -1
- package/dist/apis/workflow-definition.cjs +6 -6
- package/dist/apis/workflow-definition.js +1 -1
- package/dist/apis/workflow.cjs +6 -6
- package/dist/apis/workflow.js +1 -1
- package/dist/{chunk-3PQISQCY.cjs → chunk-HGXYSRIN.cjs} +2 -2
- package/dist/{chunk-2PFXDXXZ.js → chunk-JCXLBOC3.js} +2 -2
- package/dist/{chunk-XPQ7LBUE.cjs → chunk-NHA2IXWN.cjs} +1 -1
- package/dist/{chunk-JFRRQORA.js → chunk-QFTXKO2I.js} +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/phone-integration-ARSGAHNJ.cjs +7 -0
- package/dist/phone-integration-MGH7LYID.js +7 -0
- package/dist/{phone-integration-runtime-JWF52VHF.js → phone-integration-runtime-5VAA6Q4L.js} +1 -1
- package/dist/{phone-integration-runtime-3QDC5IMK.cjs → phone-integration-runtime-7PWKKUBM.cjs} +2 -2
- package/dist/{phone-integration.d-DJrZ4xkA.d.cts → phone-integration.d-BNqwHuQ6.d.cts} +85 -1
- package/dist/{phone-integration.d-DJrZ4xkA.d.ts → phone-integration.d-BNqwHuQ6.d.ts} +85 -1
- package/docs/phone-integration.md +63 -0
- package/package.json +1 -1
- package/dist/phone-integration-5EHY236F.js +0 -7
- package/dist/phone-integration-C567S75X.cjs +0 -7
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-TTU24M3D.js";
|
|
25
25
|
import {
|
|
26
26
|
require_phone_integration_runtime
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QFTXKO2I.js";
|
|
28
28
|
import {
|
|
29
29
|
require_pricing_tier_runtime
|
|
30
30
|
} from "./chunk-6VWCUZ5M.js";
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
expand,
|
|
171
171
|
help,
|
|
172
172
|
openapi
|
|
173
|
-
} from "./chunk-
|
|
173
|
+
} from "./chunk-JCXLBOC3.js";
|
|
174
174
|
import {
|
|
175
175
|
__require
|
|
176
176
|
} from "./chunk-YPSWSI3M.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
+
|
|
3
|
+
// src/docs/phone-integration.json
|
|
4
|
+
var phone_integration_default = '# Phone Integration API\n\n- **Base URL:** `https://phone-integration-api.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/phone-integration](https://docs.epilot.io/api/phone-integration)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.phoneIntegration.batchSearchCustomers(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/phone-integration\'\n\nconst phoneIntegrationClient = getClient()\nauthorize(phoneIntegrationClient, () => \'<token>\')\nconst { data } = await phoneIntegrationClient.batchSearchCustomers(...)\n```\n\n## Operations\n\n**phone-integration**\n- [`batchSearchCustomers`](#batchsearchcustomers)\n\n**manager**\n- [`getManagerStatus`](#getmanagerstatus)\n- [`listPhoneAgents`](#listphoneagents)\n- [`assignPhoneAgent`](#assignphoneagent)\n- [`removePhoneAgent`](#removephoneagent)\n\n**operator**\n- [`listProviderSetups`](#listprovidersetups)\n- [`getProviderSetup`](#getprovidersetup)\n- [`setupProvider`](#setupprovider)\n\n**Schemas**\n- [`ManagerStatus`](#managerstatus)\n- [`PhoneAgent`](#phoneagent)\n- [`AssignPhoneAgentRequest`](#assignphoneagentrequest)\n- [`ProviderSetup`](#providersetup)\n- [`ProviderSetupSummary`](#providersetupsummary)\n- [`ProviderSetupRequest`](#providersetuprequest)\n- [`CustomerBatchSearchResult`](#customerbatchsearchresult)\n- [`CustomerSearchResult`](#customersearchresult)\n- [`CustomerIdentifier`](#customeridentifier)\n- [`CustomerSummary`](#customersummary)\n- [`ErrorResponse`](#errorresponse)\n\n### `batchSearchCustomers`\n\nResolves up to 50 identifiers to epilot customers (Contacts) in one\nrequest \u2014 for example every number in an agent\'s call history.\n\n`GET /v1/customer:batchSearch`\n\n```ts\nconst { data } = await client.batchSearchCustomers({\n id: [\'...\'],\n customer_number: [\'...\'],\n external_id: [\'...\'],\n phone_number: [\'...\'],\n email: [\'...\'],\n x-trace-id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "identifier": {\n "type": "id",\n "value": "+4917012345678"\n },\n "status": "found",\n "customer": {\n "id": "dba8e5f9-8b3f-4608-b887-cd0798fce624",\n "name": "Max Mustermann",\n "customer_number": "4711"\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getManagerStatus`\n\nWhether the caller\'s organization is ready for phone agents: the telephony provider tenant\nexists and is configured. The control center shows a "not set up" state when `ready` is false.\nRequires `phon\n\n`GET /v1/manager/status`\n\n```ts\nconst { data } = await client.getManagerStatus()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "ready": true,\n "reasons": ["provider_tenant_missing"]\n}\n```\n\n</details>\n\n---\n\n### `listPhoneAgents`\n\nOrganization members who hold the phone (`phone:use`), each joined with the provider user behind\nthem. Requires `phone:manage`.\n\n`GET /v1/manager/agents`\n\n```ts\nconst { data } = await client.listPhoneAgents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "user_id": "string",\n "email": "string",\n "display_name": "string",\n "status": "active",\n "provider_user_id": "string",\n "provider_roles": ["string"],\n "assigned_at": "1970-01-01T00:00:00.000Z",\n "assigned_by": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `assignPhoneAgent`\n\nGives an organization member the phone. In order: the member is verified with user-api, their\npairwise subject for the provider is read from identity-api, the provider user is created (or\nfound) bound\n\n`POST /v1/manager/agents`\n\n```ts\nconst { data } = await client.assignPhoneAgent(\n null,\n {\n user_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "user_id": "string",\n "email": "string",\n "display_name": "string",\n "status": "active",\n "provider_user_id": "string",\n "provider_roles": ["string"],\n "assigned_at": "1970-01-01T00:00:00.000Z",\n "assigned_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `removePhoneAgent`\n\nTakes the phone away from a member: the `phone_agent` role is removed first, then the provider\nuser is deactivated (never deleted: call history keeps referring to it). Requires `phone:manage`.\n\n`DELETE /v1/manager/agents/{user_id}`\n\n```ts\nconst { data } = await client.removePhoneAgent({\n user_id: \'example\',\n})\n```\n\n---\n\n### `listProviderSetups`\n\nEvery organization that has a telephony provider tenant, for the admin portal\'s overview: the\nprovider\'s sub-accounts (one per organization, keyed by the organization id) joined with this\nservice\'s se\n\n`GET /v1/operator/provider-setups`\n\n```ts\nconst { data } = await client.listProviderSetups()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "org_id": "string",\n "provider": "babelforce",\n "ready": true,\n "setup_recorded": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string"\n },\n "sso_identity_client_id": "string",\n "last_setup_by": "string",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getProviderSetup`\n\nWhat has been set up at the telephony provider for this organization.\n\n`GET /v1/operator/organizations/{org_id}/provider`\n\n```ts\nconst { data } = await client.getProviderSetup({\n org_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "org_id": "string",\n "ready": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string",\n "created_at": "1970-01-01T00:00:00.000Z"\n },\n "scim": {\n "configured": true,\n "roles_enabled": true\n },\n "sso": {\n "configured": true,\n "identity_client_id": "string",\n "configured_at": "1970-01-01T00:00:00.000Z"\n },\n "last_setup_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `setupProvider`\n\nPrepares the telephony provider for an organization, idempotently and in order: the provider\ntenant (Babelforce sub-account keyed by the organization id), its SCIM configuration with role\nmanagement o\n\n`POST /v1/operator/organizations/{org_id}/provider:setup`\n\n```ts\nconst { data } = await client.setupProvider(\n {\n org_id: \'example\',\n },\n {\n account_name: \'string\',\n identity_client_id: \'string\',\n identity_client_secret: \'stringstring\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "org_id": "string",\n "ready": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string",\n "created_at": "1970-01-01T00:00:00.000Z"\n },\n "scim": {\n "configured": true,\n "roles_enabled": true\n },\n "sso": {\n "configured": true,\n "identity_client_id": "string",\n "configured_at": "1970-01-01T00:00:00.000Z"\n },\n "last_setup_by": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ManagerStatus`\n\n```ts\ntype ManagerStatus = {\n provider: "babelforce"\n ready: boolean\n reasons: "provider_tenant_missing" | "sso_not_configured" | "scim_not_configured" | "identity_enablement_missing"[]\n}\n```\n\n### `PhoneAgent`\n\n```ts\ntype PhoneAgent = {\n user_id: string\n email: string\n display_name?: string\n status: "active" | "pending" | "disabled" | "missing_provider" | "missing_role"\n provider_user_id?: string\n provider_roles?: string[]\n assigned_at?: string // date-time\n assigned_by?: string\n}\n```\n\n### `AssignPhoneAgentRequest`\n\n```ts\ntype AssignPhoneAgentRequest = {\n user_id: string\n}\n```\n\n### `ProviderSetup`\n\n```ts\ntype ProviderSetup = {\n provider: "babelforce"\n org_id: string\n ready: boolean\n tenant: {\n id: string\n name: string\n org_key: string\n created_at?: string // date-time\n }\n scim: {\n configured: boolean\n roles_enabled: boolean\n }\n sso: {\n configured: boolean\n identity_client_id?: string\n configured_at?: string // date-time\n }\n last_setup_by?: string\n}\n```\n\n### `ProviderSetupSummary`\n\nOne organization\'s provider setup, as listed in the overview (no live SCIM or SSO reads).\n\n```ts\ntype ProviderSetupSummary = {\n org_id: string\n provider: "babelforce"\n ready: boolean\n setup_recorded: boolean\n tenant: {\n id: string\n name: string\n org_key: string\n }\n sso_identity_client_id?: string\n last_setup_by?: string\n updated_at?: string // date-time\n}\n```\n\n### `ProviderSetupRequest`\n\n```ts\ntype ProviderSetupRequest = {\n account_name?: string\n identity_client_id: string\n identity_client_secret: string\n}\n```\n\n### `CustomerBatchSearchResult`\n\n```ts\ntype CustomerBatchSearchResult = {\n results: Array<{\n identifier: {\n type: { ... }\n value: { ... }\n }\n status: "found" | "not_found" | "ambiguous" | "invalid" | "error"\n customer?: {\n id: { ... }\n name: { ... }\n customer_number?: { ... }\n }\n }>\n}\n```\n\n### `CustomerSearchResult`\n\n```ts\ntype CustomerSearchResult = {\n identifier: {\n type: "id" | "customer_number" | "external_id" | "phone_number" | "email"\n value: string\n }\n status: "found" | "not_found" | "ambiguous" | "invalid" | "error"\n customer?: {\n id: string\n name: string\n customer_number?: string\n }\n}\n```\n\n### `CustomerIdentifier`\n\n```ts\ntype CustomerIdentifier = {\n type: "id" | "customer_number" | "external_id" | "phone_number" | "email"\n value: string\n}\n```\n\n### `CustomerSummary`\n\nPresent when `status` is `found`\n\n```ts\ntype CustomerSummary = {\n id: string\n name: string\n customer_number?: string\n}\n```\n\n### `ErrorResponse`\n\n```ts\ntype ErrorResponse = {\n status: number\n error: string\n code?: string\n}\n```\n';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.default = phone_integration_default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./chunk-YPSWSI3M.js";
|
|
2
|
+
|
|
3
|
+
// src/docs/phone-integration.json
|
|
4
|
+
var phone_integration_default = '# Phone Integration API\n\n- **Base URL:** `https://phone-integration-api.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/phone-integration](https://docs.epilot.io/api/phone-integration)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.phoneIntegration.batchSearchCustomers(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/phone-integration\'\n\nconst phoneIntegrationClient = getClient()\nauthorize(phoneIntegrationClient, () => \'<token>\')\nconst { data } = await phoneIntegrationClient.batchSearchCustomers(...)\n```\n\n## Operations\n\n**phone-integration**\n- [`batchSearchCustomers`](#batchsearchcustomers)\n\n**manager**\n- [`getManagerStatus`](#getmanagerstatus)\n- [`listPhoneAgents`](#listphoneagents)\n- [`assignPhoneAgent`](#assignphoneagent)\n- [`removePhoneAgent`](#removephoneagent)\n\n**operator**\n- [`listProviderSetups`](#listprovidersetups)\n- [`getProviderSetup`](#getprovidersetup)\n- [`setupProvider`](#setupprovider)\n\n**Schemas**\n- [`ManagerStatus`](#managerstatus)\n- [`PhoneAgent`](#phoneagent)\n- [`AssignPhoneAgentRequest`](#assignphoneagentrequest)\n- [`ProviderSetup`](#providersetup)\n- [`ProviderSetupSummary`](#providersetupsummary)\n- [`ProviderSetupRequest`](#providersetuprequest)\n- [`CustomerBatchSearchResult`](#customerbatchsearchresult)\n- [`CustomerSearchResult`](#customersearchresult)\n- [`CustomerIdentifier`](#customeridentifier)\n- [`CustomerSummary`](#customersummary)\n- [`ErrorResponse`](#errorresponse)\n\n### `batchSearchCustomers`\n\nResolves up to 50 identifiers to epilot customers (Contacts) in one\nrequest \u2014 for example every number in an agent\'s call history.\n\n`GET /v1/customer:batchSearch`\n\n```ts\nconst { data } = await client.batchSearchCustomers({\n id: [\'...\'],\n customer_number: [\'...\'],\n external_id: [\'...\'],\n phone_number: [\'...\'],\n email: [\'...\'],\n x-trace-id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "identifier": {\n "type": "id",\n "value": "+4917012345678"\n },\n "status": "found",\n "customer": {\n "id": "dba8e5f9-8b3f-4608-b887-cd0798fce624",\n "name": "Max Mustermann",\n "customer_number": "4711"\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getManagerStatus`\n\nWhether the caller\'s organization is ready for phone agents: the telephony provider tenant\nexists and is configured. The control center shows a "not set up" state when `ready` is false.\nRequires `phon\n\n`GET /v1/manager/status`\n\n```ts\nconst { data } = await client.getManagerStatus()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "ready": true,\n "reasons": ["provider_tenant_missing"]\n}\n```\n\n</details>\n\n---\n\n### `listPhoneAgents`\n\nOrganization members who hold the phone (`phone:use`), each joined with the provider user behind\nthem. Requires `phone:manage`.\n\n`GET /v1/manager/agents`\n\n```ts\nconst { data } = await client.listPhoneAgents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "user_id": "string",\n "email": "string",\n "display_name": "string",\n "status": "active",\n "provider_user_id": "string",\n "provider_roles": ["string"],\n "assigned_at": "1970-01-01T00:00:00.000Z",\n "assigned_by": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `assignPhoneAgent`\n\nGives an organization member the phone. In order: the member is verified with user-api, their\npairwise subject for the provider is read from identity-api, the provider user is created (or\nfound) bound\n\n`POST /v1/manager/agents`\n\n```ts\nconst { data } = await client.assignPhoneAgent(\n null,\n {\n user_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "user_id": "string",\n "email": "string",\n "display_name": "string",\n "status": "active",\n "provider_user_id": "string",\n "provider_roles": ["string"],\n "assigned_at": "1970-01-01T00:00:00.000Z",\n "assigned_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `removePhoneAgent`\n\nTakes the phone away from a member: the `phone_agent` role is removed first, then the provider\nuser is deactivated (never deleted: call history keeps referring to it). Requires `phone:manage`.\n\n`DELETE /v1/manager/agents/{user_id}`\n\n```ts\nconst { data } = await client.removePhoneAgent({\n user_id: \'example\',\n})\n```\n\n---\n\n### `listProviderSetups`\n\nEvery organization that has a telephony provider tenant, for the admin portal\'s overview: the\nprovider\'s sub-accounts (one per organization, keyed by the organization id) joined with this\nservice\'s se\n\n`GET /v1/operator/provider-setups`\n\n```ts\nconst { data } = await client.listProviderSetups()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "org_id": "string",\n "provider": "babelforce",\n "ready": true,\n "setup_recorded": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string"\n },\n "sso_identity_client_id": "string",\n "last_setup_by": "string",\n "updated_at": "1970-01-01T00:00:00.000Z"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getProviderSetup`\n\nWhat has been set up at the telephony provider for this organization.\n\n`GET /v1/operator/organizations/{org_id}/provider`\n\n```ts\nconst { data } = await client.getProviderSetup({\n org_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "org_id": "string",\n "ready": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string",\n "created_at": "1970-01-01T00:00:00.000Z"\n },\n "scim": {\n "configured": true,\n "roles_enabled": true\n },\n "sso": {\n "configured": true,\n "identity_client_id": "string",\n "configured_at": "1970-01-01T00:00:00.000Z"\n },\n "last_setup_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `setupProvider`\n\nPrepares the telephony provider for an organization, idempotently and in order: the provider\ntenant (Babelforce sub-account keyed by the organization id), its SCIM configuration with role\nmanagement o\n\n`POST /v1/operator/organizations/{org_id}/provider:setup`\n\n```ts\nconst { data } = await client.setupProvider(\n {\n org_id: \'example\',\n },\n {\n account_name: \'string\',\n identity_client_id: \'string\',\n identity_client_secret: \'stringstring\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "org_id": "string",\n "ready": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string",\n "created_at": "1970-01-01T00:00:00.000Z"\n },\n "scim": {\n "configured": true,\n "roles_enabled": true\n },\n "sso": {\n "configured": true,\n "identity_client_id": "string",\n "configured_at": "1970-01-01T00:00:00.000Z"\n },\n "last_setup_by": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ManagerStatus`\n\n```ts\ntype ManagerStatus = {\n provider: "babelforce"\n ready: boolean\n reasons: "provider_tenant_missing" | "sso_not_configured" | "scim_not_configured" | "identity_enablement_missing"[]\n}\n```\n\n### `PhoneAgent`\n\n```ts\ntype PhoneAgent = {\n user_id: string\n email: string\n display_name?: string\n status: "active" | "pending" | "disabled" | "missing_provider" | "missing_role"\n provider_user_id?: string\n provider_roles?: string[]\n assigned_at?: string // date-time\n assigned_by?: string\n}\n```\n\n### `AssignPhoneAgentRequest`\n\n```ts\ntype AssignPhoneAgentRequest = {\n user_id: string\n}\n```\n\n### `ProviderSetup`\n\n```ts\ntype ProviderSetup = {\n provider: "babelforce"\n org_id: string\n ready: boolean\n tenant: {\n id: string\n name: string\n org_key: string\n created_at?: string // date-time\n }\n scim: {\n configured: boolean\n roles_enabled: boolean\n }\n sso: {\n configured: boolean\n identity_client_id?: string\n configured_at?: string // date-time\n }\n last_setup_by?: string\n}\n```\n\n### `ProviderSetupSummary`\n\nOne organization\'s provider setup, as listed in the overview (no live SCIM or SSO reads).\n\n```ts\ntype ProviderSetupSummary = {\n org_id: string\n provider: "babelforce"\n ready: boolean\n setup_recorded: boolean\n tenant: {\n id: string\n name: string\n org_key: string\n }\n sso_identity_client_id?: string\n last_setup_by?: string\n updated_at?: string // date-time\n}\n```\n\n### `ProviderSetupRequest`\n\n```ts\ntype ProviderSetupRequest = {\n account_name?: string\n identity_client_id: string\n identity_client_secret: string\n}\n```\n\n### `CustomerBatchSearchResult`\n\n```ts\ntype CustomerBatchSearchResult = {\n results: Array<{\n identifier: {\n type: { ... }\n value: { ... }\n }\n status: "found" | "not_found" | "ambiguous" | "invalid" | "error"\n customer?: {\n id: { ... }\n name: { ... }\n customer_number?: { ... }\n }\n }>\n}\n```\n\n### `CustomerSearchResult`\n\n```ts\ntype CustomerSearchResult = {\n identifier: {\n type: "id" | "customer_number" | "external_id" | "phone_number" | "email"\n value: string\n }\n status: "found" | "not_found" | "ambiguous" | "invalid" | "error"\n customer?: {\n id: string\n name: string\n customer_number?: string\n }\n}\n```\n\n### `CustomerIdentifier`\n\n```ts\ntype CustomerIdentifier = {\n type: "id" | "customer_number" | "external_id" | "phone_number" | "email"\n value: string\n}\n```\n\n### `CustomerSummary`\n\nPresent when `status` is `found`\n\n```ts\ntype CustomerSummary = {\n id: string\n name: string\n customer_number?: string\n}\n```\n\n### `ErrorResponse`\n\n```ts\ntype ErrorResponse = {\n status: number\n error: string\n code?: string\n}\n```\n';
|
|
5
|
+
export {
|
|
6
|
+
phone_integration_default as default
|
|
7
|
+
};
|
package/dist/{phone-integration-runtime-3QDC5IMK.cjs → phone-integration-runtime-7PWKKUBM.cjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkNHA2IXWNcjs = require('./chunk-NHA2IXWN.cjs');
|
|
4
4
|
require('./chunk-NJK5F5TF.cjs');
|
|
5
|
-
exports. default =
|
|
5
|
+
exports. default = _chunkNHA2IXWNcjs.require_phone_integration_runtime.call(void 0, );
|
|
@@ -175,6 +175,46 @@ declare namespace Components {
|
|
|
175
175
|
*/
|
|
176
176
|
identity_client_secret: string;
|
|
177
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* One organization's provider setup, as listed in the overview (no live SCIM or SSO reads).
|
|
180
|
+
*/
|
|
181
|
+
export interface ProviderSetupSummary {
|
|
182
|
+
/**
|
|
183
|
+
* epilot organization id (the provider tenant's org key)
|
|
184
|
+
*/
|
|
185
|
+
org_id: string;
|
|
186
|
+
provider: "babelforce";
|
|
187
|
+
/**
|
|
188
|
+
* Phone agents can be assigned (same rule as getManagerStatus)
|
|
189
|
+
*/
|
|
190
|
+
ready: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* `setupProvider` has run for this organization at least once. `false` for a tenant created by
|
|
193
|
+
* hand at the provider: run the setup once to record it.
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
196
|
+
setup_recorded: boolean;
|
|
197
|
+
tenant: {
|
|
198
|
+
/**
|
|
199
|
+
* The provider's tenant id (Babelforce sub-account id)
|
|
200
|
+
*/
|
|
201
|
+
id: string;
|
|
202
|
+
name: string;
|
|
203
|
+
org_key: string;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* The identity-api client the recorded SSO configuration points at
|
|
207
|
+
*/
|
|
208
|
+
sso_identity_client_id?: string;
|
|
209
|
+
/**
|
|
210
|
+
* The operator who last ran the setup (email)
|
|
211
|
+
*/
|
|
212
|
+
last_setup_by?: string;
|
|
213
|
+
/**
|
|
214
|
+
* When the setup record last changed
|
|
215
|
+
*/
|
|
216
|
+
updated_at?: string; // date-time
|
|
217
|
+
}
|
|
178
218
|
}
|
|
179
219
|
}
|
|
180
220
|
declare namespace Paths {
|
|
@@ -244,6 +284,17 @@ declare namespace Paths {
|
|
|
244
284
|
export type $502 = Components.Responses.BadGateway;
|
|
245
285
|
}
|
|
246
286
|
}
|
|
287
|
+
namespace ListProviderSetups {
|
|
288
|
+
namespace Responses {
|
|
289
|
+
export interface $200 {
|
|
290
|
+
results: /* One organization's provider setup, as listed in the overview (no live SCIM or SSO reads). */ Components.Schemas.ProviderSetupSummary[];
|
|
291
|
+
}
|
|
292
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
293
|
+
export type $403 = Components.Responses.Forbidden;
|
|
294
|
+
export type $502 = Components.Responses.BadGateway;
|
|
295
|
+
export type $503 = Components.Responses.ServiceUnavailable;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
247
298
|
namespace RemovePhoneAgent {
|
|
248
299
|
namespace Responses {
|
|
249
300
|
export interface $204 {
|
|
@@ -375,6 +426,21 @@ interface OperationMethods {
|
|
|
375
426
|
data?: any,
|
|
376
427
|
config?: AxiosRequestConfig
|
|
377
428
|
): OperationResponse<Paths.RemovePhoneAgent.Responses.$204>
|
|
429
|
+
/**
|
|
430
|
+
* listProviderSetups - listProviderSetups
|
|
431
|
+
*
|
|
432
|
+
* Every organization that has a telephony provider tenant, for the admin portal's overview: the
|
|
433
|
+
* provider's sub-accounts (one per organization, keyed by the organization id) joined with this
|
|
434
|
+
* service's setup record. `ready` follows getManagerStatus: an organization whose tenant was created
|
|
435
|
+
* by hand, outside `setupProvider`, has no record and is not ready until the setup runs once.
|
|
436
|
+
* Sorted by organization id; not paged (one tenant per organization, a few hundred at most).
|
|
437
|
+
*
|
|
438
|
+
*/
|
|
439
|
+
'listProviderSetups'(
|
|
440
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
441
|
+
data?: any,
|
|
442
|
+
config?: AxiosRequestConfig
|
|
443
|
+
): OperationResponse<Paths.ListProviderSetups.Responses.$200>
|
|
378
444
|
/**
|
|
379
445
|
* getProviderSetup - getProviderSetup
|
|
380
446
|
*
|
|
@@ -491,6 +557,23 @@ interface PathsDictionary {
|
|
|
491
557
|
config?: AxiosRequestConfig
|
|
492
558
|
): OperationResponse<Paths.RemovePhoneAgent.Responses.$204>
|
|
493
559
|
}
|
|
560
|
+
['/v1/operator/provider-setups']: {
|
|
561
|
+
/**
|
|
562
|
+
* listProviderSetups - listProviderSetups
|
|
563
|
+
*
|
|
564
|
+
* Every organization that has a telephony provider tenant, for the admin portal's overview: the
|
|
565
|
+
* provider's sub-accounts (one per organization, keyed by the organization id) joined with this
|
|
566
|
+
* service's setup record. `ready` follows getManagerStatus: an organization whose tenant was created
|
|
567
|
+
* by hand, outside `setupProvider`, has no record and is not ready until the setup runs once.
|
|
568
|
+
* Sorted by organization id; not paged (one tenant per organization, a few hundred at most).
|
|
569
|
+
*
|
|
570
|
+
*/
|
|
571
|
+
'get'(
|
|
572
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
573
|
+
data?: any,
|
|
574
|
+
config?: AxiosRequestConfig
|
|
575
|
+
): OperationResponse<Paths.ListProviderSetups.Responses.$200>
|
|
576
|
+
}
|
|
494
577
|
['/v1/operator/organizations/{org_id}/provider']: {
|
|
495
578
|
/**
|
|
496
579
|
* getProviderSetup - getProviderSetup
|
|
@@ -535,5 +618,6 @@ type ManagerStatus = Components.Schemas.ManagerStatus;
|
|
|
535
618
|
type PhoneAgent = Components.Schemas.PhoneAgent;
|
|
536
619
|
type ProviderSetup = Components.Schemas.ProviderSetup;
|
|
537
620
|
type ProviderSetupRequest = Components.Schemas.ProviderSetupRequest;
|
|
621
|
+
type ProviderSetupSummary = Components.Schemas.ProviderSetupSummary;
|
|
538
622
|
|
|
539
|
-
export { type AssignPhoneAgentRequest as A, type Client as C, type ErrorResponse as E, type ManagerStatus as M, type OperationMethods as O, Paths as P, Components as a, type PathsDictionary as b, type CustomerBatchSearchResult as c, type CustomerIdentifier as d, type CustomerSearchResult as e, type CustomerSummary as f, type PhoneAgent as g, type ProviderSetup as h, type ProviderSetupRequest as i };
|
|
623
|
+
export { type AssignPhoneAgentRequest as A, type Client as C, type ErrorResponse as E, type ManagerStatus as M, type OperationMethods as O, Paths as P, Components as a, type PathsDictionary as b, type CustomerBatchSearchResult as c, type CustomerIdentifier as d, type CustomerSearchResult as e, type CustomerSummary as f, type PhoneAgent as g, type ProviderSetup as h, type ProviderSetupRequest as i, type ProviderSetupSummary as j };
|
|
@@ -175,6 +175,46 @@ declare namespace Components {
|
|
|
175
175
|
*/
|
|
176
176
|
identity_client_secret: string;
|
|
177
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* One organization's provider setup, as listed in the overview (no live SCIM or SSO reads).
|
|
180
|
+
*/
|
|
181
|
+
export interface ProviderSetupSummary {
|
|
182
|
+
/**
|
|
183
|
+
* epilot organization id (the provider tenant's org key)
|
|
184
|
+
*/
|
|
185
|
+
org_id: string;
|
|
186
|
+
provider: "babelforce";
|
|
187
|
+
/**
|
|
188
|
+
* Phone agents can be assigned (same rule as getManagerStatus)
|
|
189
|
+
*/
|
|
190
|
+
ready: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* `setupProvider` has run for this organization at least once. `false` for a tenant created by
|
|
193
|
+
* hand at the provider: run the setup once to record it.
|
|
194
|
+
*
|
|
195
|
+
*/
|
|
196
|
+
setup_recorded: boolean;
|
|
197
|
+
tenant: {
|
|
198
|
+
/**
|
|
199
|
+
* The provider's tenant id (Babelforce sub-account id)
|
|
200
|
+
*/
|
|
201
|
+
id: string;
|
|
202
|
+
name: string;
|
|
203
|
+
org_key: string;
|
|
204
|
+
};
|
|
205
|
+
/**
|
|
206
|
+
* The identity-api client the recorded SSO configuration points at
|
|
207
|
+
*/
|
|
208
|
+
sso_identity_client_id?: string;
|
|
209
|
+
/**
|
|
210
|
+
* The operator who last ran the setup (email)
|
|
211
|
+
*/
|
|
212
|
+
last_setup_by?: string;
|
|
213
|
+
/**
|
|
214
|
+
* When the setup record last changed
|
|
215
|
+
*/
|
|
216
|
+
updated_at?: string; // date-time
|
|
217
|
+
}
|
|
178
218
|
}
|
|
179
219
|
}
|
|
180
220
|
declare namespace Paths {
|
|
@@ -244,6 +284,17 @@ declare namespace Paths {
|
|
|
244
284
|
export type $502 = Components.Responses.BadGateway;
|
|
245
285
|
}
|
|
246
286
|
}
|
|
287
|
+
namespace ListProviderSetups {
|
|
288
|
+
namespace Responses {
|
|
289
|
+
export interface $200 {
|
|
290
|
+
results: /* One organization's provider setup, as listed in the overview (no live SCIM or SSO reads). */ Components.Schemas.ProviderSetupSummary[];
|
|
291
|
+
}
|
|
292
|
+
export type $401 = Components.Responses.Unauthorized;
|
|
293
|
+
export type $403 = Components.Responses.Forbidden;
|
|
294
|
+
export type $502 = Components.Responses.BadGateway;
|
|
295
|
+
export type $503 = Components.Responses.ServiceUnavailable;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
247
298
|
namespace RemovePhoneAgent {
|
|
248
299
|
namespace Responses {
|
|
249
300
|
export interface $204 {
|
|
@@ -375,6 +426,21 @@ interface OperationMethods {
|
|
|
375
426
|
data?: any,
|
|
376
427
|
config?: AxiosRequestConfig
|
|
377
428
|
): OperationResponse<Paths.RemovePhoneAgent.Responses.$204>
|
|
429
|
+
/**
|
|
430
|
+
* listProviderSetups - listProviderSetups
|
|
431
|
+
*
|
|
432
|
+
* Every organization that has a telephony provider tenant, for the admin portal's overview: the
|
|
433
|
+
* provider's sub-accounts (one per organization, keyed by the organization id) joined with this
|
|
434
|
+
* service's setup record. `ready` follows getManagerStatus: an organization whose tenant was created
|
|
435
|
+
* by hand, outside `setupProvider`, has no record and is not ready until the setup runs once.
|
|
436
|
+
* Sorted by organization id; not paged (one tenant per organization, a few hundred at most).
|
|
437
|
+
*
|
|
438
|
+
*/
|
|
439
|
+
'listProviderSetups'(
|
|
440
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
441
|
+
data?: any,
|
|
442
|
+
config?: AxiosRequestConfig
|
|
443
|
+
): OperationResponse<Paths.ListProviderSetups.Responses.$200>
|
|
378
444
|
/**
|
|
379
445
|
* getProviderSetup - getProviderSetup
|
|
380
446
|
*
|
|
@@ -491,6 +557,23 @@ interface PathsDictionary {
|
|
|
491
557
|
config?: AxiosRequestConfig
|
|
492
558
|
): OperationResponse<Paths.RemovePhoneAgent.Responses.$204>
|
|
493
559
|
}
|
|
560
|
+
['/v1/operator/provider-setups']: {
|
|
561
|
+
/**
|
|
562
|
+
* listProviderSetups - listProviderSetups
|
|
563
|
+
*
|
|
564
|
+
* Every organization that has a telephony provider tenant, for the admin portal's overview: the
|
|
565
|
+
* provider's sub-accounts (one per organization, keyed by the organization id) joined with this
|
|
566
|
+
* service's setup record. `ready` follows getManagerStatus: an organization whose tenant was created
|
|
567
|
+
* by hand, outside `setupProvider`, has no record and is not ready until the setup runs once.
|
|
568
|
+
* Sorted by organization id; not paged (one tenant per organization, a few hundred at most).
|
|
569
|
+
*
|
|
570
|
+
*/
|
|
571
|
+
'get'(
|
|
572
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
573
|
+
data?: any,
|
|
574
|
+
config?: AxiosRequestConfig
|
|
575
|
+
): OperationResponse<Paths.ListProviderSetups.Responses.$200>
|
|
576
|
+
}
|
|
494
577
|
['/v1/operator/organizations/{org_id}/provider']: {
|
|
495
578
|
/**
|
|
496
579
|
* getProviderSetup - getProviderSetup
|
|
@@ -535,5 +618,6 @@ type ManagerStatus = Components.Schemas.ManagerStatus;
|
|
|
535
618
|
type PhoneAgent = Components.Schemas.PhoneAgent;
|
|
536
619
|
type ProviderSetup = Components.Schemas.ProviderSetup;
|
|
537
620
|
type ProviderSetupRequest = Components.Schemas.ProviderSetupRequest;
|
|
621
|
+
type ProviderSetupSummary = Components.Schemas.ProviderSetupSummary;
|
|
538
622
|
|
|
539
|
-
export { type AssignPhoneAgentRequest as A, type Client as C, type ErrorResponse as E, type ManagerStatus as M, type OperationMethods as O, Paths as P, Components as a, type PathsDictionary as b, type CustomerBatchSearchResult as c, type CustomerIdentifier as d, type CustomerSearchResult as e, type CustomerSummary as f, type PhoneAgent as g, type ProviderSetup as h, type ProviderSetupRequest as i };
|
|
623
|
+
export { type AssignPhoneAgentRequest as A, type Client as C, type ErrorResponse as E, type ManagerStatus as M, type OperationMethods as O, Paths as P, Components as a, type PathsDictionary as b, type CustomerBatchSearchResult as c, type CustomerIdentifier as d, type CustomerSearchResult as e, type CustomerSummary as f, type PhoneAgent as g, type ProviderSetup as h, type ProviderSetupRequest as i, type ProviderSetupSummary as j };
|
|
@@ -34,6 +34,7 @@ const { data } = await phoneIntegrationClient.batchSearchCustomers(...)
|
|
|
34
34
|
- [`removePhoneAgent`](#removephoneagent)
|
|
35
35
|
|
|
36
36
|
**operator**
|
|
37
|
+
- [`listProviderSetups`](#listprovidersetups)
|
|
37
38
|
- [`getProviderSetup`](#getprovidersetup)
|
|
38
39
|
- [`setupProvider`](#setupprovider)
|
|
39
40
|
|
|
@@ -42,6 +43,7 @@ const { data } = await phoneIntegrationClient.batchSearchCustomers(...)
|
|
|
42
43
|
- [`PhoneAgent`](#phoneagent)
|
|
43
44
|
- [`AssignPhoneAgentRequest`](#assignphoneagentrequest)
|
|
44
45
|
- [`ProviderSetup`](#providersetup)
|
|
46
|
+
- [`ProviderSetupSummary`](#providersetupsummary)
|
|
45
47
|
- [`ProviderSetupRequest`](#providersetuprequest)
|
|
46
48
|
- [`CustomerBatchSearchResult`](#customerbatchsearchresult)
|
|
47
49
|
- [`CustomerSearchResult`](#customersearchresult)
|
|
@@ -207,6 +209,46 @@ const { data } = await client.removePhoneAgent({
|
|
|
207
209
|
|
|
208
210
|
---
|
|
209
211
|
|
|
212
|
+
### `listProviderSetups`
|
|
213
|
+
|
|
214
|
+
Every organization that has a telephony provider tenant, for the admin portal's overview: the
|
|
215
|
+
provider's sub-accounts (one per organization, keyed by the organization id) joined with this
|
|
216
|
+
service's se
|
|
217
|
+
|
|
218
|
+
`GET /v1/operator/provider-setups`
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
const { data } = await client.listProviderSetups()
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
<details>
|
|
225
|
+
<summary>Response</summary>
|
|
226
|
+
|
|
227
|
+
```json
|
|
228
|
+
{
|
|
229
|
+
"results": [
|
|
230
|
+
{
|
|
231
|
+
"org_id": "string",
|
|
232
|
+
"provider": "babelforce",
|
|
233
|
+
"ready": true,
|
|
234
|
+
"setup_recorded": true,
|
|
235
|
+
"tenant": {
|
|
236
|
+
"id": "string",
|
|
237
|
+
"name": "string",
|
|
238
|
+
"org_key": "string"
|
|
239
|
+
},
|
|
240
|
+
"sso_identity_client_id": "string",
|
|
241
|
+
"last_setup_by": "string",
|
|
242
|
+
"updated_at": "1970-01-01T00:00:00.000Z"
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
</details>
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
210
252
|
### `getProviderSetup`
|
|
211
253
|
|
|
212
254
|
What has been set up at the telephony provider for this organization.
|
|
@@ -363,6 +405,27 @@ type ProviderSetup = {
|
|
|
363
405
|
}
|
|
364
406
|
```
|
|
365
407
|
|
|
408
|
+
### `ProviderSetupSummary`
|
|
409
|
+
|
|
410
|
+
One organization's provider setup, as listed in the overview (no live SCIM or SSO reads).
|
|
411
|
+
|
|
412
|
+
```ts
|
|
413
|
+
type ProviderSetupSummary = {
|
|
414
|
+
org_id: string
|
|
415
|
+
provider: "babelforce"
|
|
416
|
+
ready: boolean
|
|
417
|
+
setup_recorded: boolean
|
|
418
|
+
tenant: {
|
|
419
|
+
id: string
|
|
420
|
+
name: string
|
|
421
|
+
org_key: string
|
|
422
|
+
}
|
|
423
|
+
sso_identity_client_id?: string
|
|
424
|
+
last_setup_by?: string
|
|
425
|
+
updated_at?: string // date-time
|
|
426
|
+
}
|
|
427
|
+
```
|
|
428
|
+
|
|
366
429
|
### `ProviderSetupRequest`
|
|
367
430
|
|
|
368
431
|
```ts
|
package/package.json
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import "./chunk-YPSWSI3M.js";
|
|
2
|
-
|
|
3
|
-
// src/docs/phone-integration.json
|
|
4
|
-
var phone_integration_default = '# Phone Integration API\n\n- **Base URL:** `https://phone-integration-api.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/phone-integration](https://docs.epilot.io/api/phone-integration)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.phoneIntegration.batchSearchCustomers(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/phone-integration\'\n\nconst phoneIntegrationClient = getClient()\nauthorize(phoneIntegrationClient, () => \'<token>\')\nconst { data } = await phoneIntegrationClient.batchSearchCustomers(...)\n```\n\n## Operations\n\n**phone-integration**\n- [`batchSearchCustomers`](#batchsearchcustomers)\n\n**manager**\n- [`getManagerStatus`](#getmanagerstatus)\n- [`listPhoneAgents`](#listphoneagents)\n- [`assignPhoneAgent`](#assignphoneagent)\n- [`removePhoneAgent`](#removephoneagent)\n\n**operator**\n- [`getProviderSetup`](#getprovidersetup)\n- [`setupProvider`](#setupprovider)\n\n**Schemas**\n- [`ManagerStatus`](#managerstatus)\n- [`PhoneAgent`](#phoneagent)\n- [`AssignPhoneAgentRequest`](#assignphoneagentrequest)\n- [`ProviderSetup`](#providersetup)\n- [`ProviderSetupRequest`](#providersetuprequest)\n- [`CustomerBatchSearchResult`](#customerbatchsearchresult)\n- [`CustomerSearchResult`](#customersearchresult)\n- [`CustomerIdentifier`](#customeridentifier)\n- [`CustomerSummary`](#customersummary)\n- [`ErrorResponse`](#errorresponse)\n\n### `batchSearchCustomers`\n\nResolves up to 50 identifiers to epilot customers (Contacts) in one\nrequest \u2014 for example every number in an agent\'s call history.\n\n`GET /v1/customer:batchSearch`\n\n```ts\nconst { data } = await client.batchSearchCustomers({\n id: [\'...\'],\n customer_number: [\'...\'],\n external_id: [\'...\'],\n phone_number: [\'...\'],\n email: [\'...\'],\n x-trace-id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "identifier": {\n "type": "id",\n "value": "+4917012345678"\n },\n "status": "found",\n "customer": {\n "id": "dba8e5f9-8b3f-4608-b887-cd0798fce624",\n "name": "Max Mustermann",\n "customer_number": "4711"\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getManagerStatus`\n\nWhether the caller\'s organization is ready for phone agents: the telephony provider tenant\nexists and is configured. The control center shows a "not set up" state when `ready` is false.\nRequires `phon\n\n`GET /v1/manager/status`\n\n```ts\nconst { data } = await client.getManagerStatus()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "ready": true,\n "reasons": ["provider_tenant_missing"]\n}\n```\n\n</details>\n\n---\n\n### `listPhoneAgents`\n\nOrganization members who hold the phone (`phone:use`), each joined with the provider user behind\nthem. Requires `phone:manage`.\n\n`GET /v1/manager/agents`\n\n```ts\nconst { data } = await client.listPhoneAgents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "user_id": "string",\n "email": "string",\n "display_name": "string",\n "status": "active",\n "provider_user_id": "string",\n "provider_roles": ["string"],\n "assigned_at": "1970-01-01T00:00:00.000Z",\n "assigned_by": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `assignPhoneAgent`\n\nGives an organization member the phone. In order: the member is verified with user-api, their\npairwise subject for the provider is read from identity-api, the provider user is created (or\nfound) bound\n\n`POST /v1/manager/agents`\n\n```ts\nconst { data } = await client.assignPhoneAgent(\n null,\n {\n user_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "user_id": "string",\n "email": "string",\n "display_name": "string",\n "status": "active",\n "provider_user_id": "string",\n "provider_roles": ["string"],\n "assigned_at": "1970-01-01T00:00:00.000Z",\n "assigned_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `removePhoneAgent`\n\nTakes the phone away from a member: the `phone_agent` role is removed first, then the provider\nuser is deactivated (never deleted: call history keeps referring to it). Requires `phone:manage`.\n\n`DELETE /v1/manager/agents/{user_id}`\n\n```ts\nconst { data } = await client.removePhoneAgent({\n user_id: \'example\',\n})\n```\n\n---\n\n### `getProviderSetup`\n\nWhat has been set up at the telephony provider for this organization.\n\n`GET /v1/operator/organizations/{org_id}/provider`\n\n```ts\nconst { data } = await client.getProviderSetup({\n org_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "org_id": "string",\n "ready": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string",\n "created_at": "1970-01-01T00:00:00.000Z"\n },\n "scim": {\n "configured": true,\n "roles_enabled": true\n },\n "sso": {\n "configured": true,\n "identity_client_id": "string",\n "configured_at": "1970-01-01T00:00:00.000Z"\n },\n "last_setup_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `setupProvider`\n\nPrepares the telephony provider for an organization, idempotently and in order: the provider\ntenant (Babelforce sub-account keyed by the organization id), its SCIM configuration with role\nmanagement o\n\n`POST /v1/operator/organizations/{org_id}/provider:setup`\n\n```ts\nconst { data } = await client.setupProvider(\n {\n org_id: \'example\',\n },\n {\n account_name: \'string\',\n identity_client_id: \'string\',\n identity_client_secret: \'stringstring\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "org_id": "string",\n "ready": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string",\n "created_at": "1970-01-01T00:00:00.000Z"\n },\n "scim": {\n "configured": true,\n "roles_enabled": true\n },\n "sso": {\n "configured": true,\n "identity_client_id": "string",\n "configured_at": "1970-01-01T00:00:00.000Z"\n },\n "last_setup_by": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ManagerStatus`\n\n```ts\ntype ManagerStatus = {\n provider: "babelforce"\n ready: boolean\n reasons: "provider_tenant_missing" | "sso_not_configured" | "scim_not_configured" | "identity_enablement_missing"[]\n}\n```\n\n### `PhoneAgent`\n\n```ts\ntype PhoneAgent = {\n user_id: string\n email: string\n display_name?: string\n status: "active" | "pending" | "disabled" | "missing_provider" | "missing_role"\n provider_user_id?: string\n provider_roles?: string[]\n assigned_at?: string // date-time\n assigned_by?: string\n}\n```\n\n### `AssignPhoneAgentRequest`\n\n```ts\ntype AssignPhoneAgentRequest = {\n user_id: string\n}\n```\n\n### `ProviderSetup`\n\n```ts\ntype ProviderSetup = {\n provider: "babelforce"\n org_id: string\n ready: boolean\n tenant: {\n id: string\n name: string\n org_key: string\n created_at?: string // date-time\n }\n scim: {\n configured: boolean\n roles_enabled: boolean\n }\n sso: {\n configured: boolean\n identity_client_id?: string\n configured_at?: string // date-time\n }\n last_setup_by?: string\n}\n```\n\n### `ProviderSetupRequest`\n\n```ts\ntype ProviderSetupRequest = {\n account_name?: string\n identity_client_id: string\n identity_client_secret: string\n}\n```\n\n### `CustomerBatchSearchResult`\n\n```ts\ntype CustomerBatchSearchResult = {\n results: Array<{\n identifier: {\n type: { ... }\n value: { ... }\n }\n status: "found" | "not_found" | "ambiguous" | "invalid" | "error"\n customer?: {\n id: { ... }\n name: { ... }\n customer_number?: { ... }\n }\n }>\n}\n```\n\n### `CustomerSearchResult`\n\n```ts\ntype CustomerSearchResult = {\n identifier: {\n type: "id" | "customer_number" | "external_id" | "phone_number" | "email"\n value: string\n }\n status: "found" | "not_found" | "ambiguous" | "invalid" | "error"\n customer?: {\n id: string\n name: string\n customer_number?: string\n }\n}\n```\n\n### `CustomerIdentifier`\n\n```ts\ntype CustomerIdentifier = {\n type: "id" | "customer_number" | "external_id" | "phone_number" | "email"\n value: string\n}\n```\n\n### `CustomerSummary`\n\nPresent when `status` is `found`\n\n```ts\ntype CustomerSummary = {\n id: string\n name: string\n customer_number?: string\n}\n```\n\n### `ErrorResponse`\n\n```ts\ntype ErrorResponse = {\n status: number\n error: string\n code?: string\n}\n```\n';
|
|
5
|
-
export {
|
|
6
|
-
phone_integration_default as default
|
|
7
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
|
|
2
|
-
|
|
3
|
-
// src/docs/phone-integration.json
|
|
4
|
-
var phone_integration_default = '# Phone Integration API\n\n- **Base URL:** `https://phone-integration-api.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/phone-integration](https://docs.epilot.io/api/phone-integration)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.phoneIntegration.batchSearchCustomers(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/phone-integration\'\n\nconst phoneIntegrationClient = getClient()\nauthorize(phoneIntegrationClient, () => \'<token>\')\nconst { data } = await phoneIntegrationClient.batchSearchCustomers(...)\n```\n\n## Operations\n\n**phone-integration**\n- [`batchSearchCustomers`](#batchsearchcustomers)\n\n**manager**\n- [`getManagerStatus`](#getmanagerstatus)\n- [`listPhoneAgents`](#listphoneagents)\n- [`assignPhoneAgent`](#assignphoneagent)\n- [`removePhoneAgent`](#removephoneagent)\n\n**operator**\n- [`getProviderSetup`](#getprovidersetup)\n- [`setupProvider`](#setupprovider)\n\n**Schemas**\n- [`ManagerStatus`](#managerstatus)\n- [`PhoneAgent`](#phoneagent)\n- [`AssignPhoneAgentRequest`](#assignphoneagentrequest)\n- [`ProviderSetup`](#providersetup)\n- [`ProviderSetupRequest`](#providersetuprequest)\n- [`CustomerBatchSearchResult`](#customerbatchsearchresult)\n- [`CustomerSearchResult`](#customersearchresult)\n- [`CustomerIdentifier`](#customeridentifier)\n- [`CustomerSummary`](#customersummary)\n- [`ErrorResponse`](#errorresponse)\n\n### `batchSearchCustomers`\n\nResolves up to 50 identifiers to epilot customers (Contacts) in one\nrequest \u2014 for example every number in an agent\'s call history.\n\n`GET /v1/customer:batchSearch`\n\n```ts\nconst { data } = await client.batchSearchCustomers({\n id: [\'...\'],\n customer_number: [\'...\'],\n external_id: [\'...\'],\n phone_number: [\'...\'],\n email: [\'...\'],\n x-trace-id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "identifier": {\n "type": "id",\n "value": "+4917012345678"\n },\n "status": "found",\n "customer": {\n "id": "dba8e5f9-8b3f-4608-b887-cd0798fce624",\n "name": "Max Mustermann",\n "customer_number": "4711"\n }\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `getManagerStatus`\n\nWhether the caller\'s organization is ready for phone agents: the telephony provider tenant\nexists and is configured. The control center shows a "not set up" state when `ready` is false.\nRequires `phon\n\n`GET /v1/manager/status`\n\n```ts\nconst { data } = await client.getManagerStatus()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "ready": true,\n "reasons": ["provider_tenant_missing"]\n}\n```\n\n</details>\n\n---\n\n### `listPhoneAgents`\n\nOrganization members who hold the phone (`phone:use`), each joined with the provider user behind\nthem. Requires `phone:manage`.\n\n`GET /v1/manager/agents`\n\n```ts\nconst { data } = await client.listPhoneAgents()\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "results": [\n {\n "user_id": "string",\n "email": "string",\n "display_name": "string",\n "status": "active",\n "provider_user_id": "string",\n "provider_roles": ["string"],\n "assigned_at": "1970-01-01T00:00:00.000Z",\n "assigned_by": "string"\n }\n ]\n}\n```\n\n</details>\n\n---\n\n### `assignPhoneAgent`\n\nGives an organization member the phone. In order: the member is verified with user-api, their\npairwise subject for the provider is read from identity-api, the provider user is created (or\nfound) bound\n\n`POST /v1/manager/agents`\n\n```ts\nconst { data } = await client.assignPhoneAgent(\n null,\n {\n user_id: \'string\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "user_id": "string",\n "email": "string",\n "display_name": "string",\n "status": "active",\n "provider_user_id": "string",\n "provider_roles": ["string"],\n "assigned_at": "1970-01-01T00:00:00.000Z",\n "assigned_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `removePhoneAgent`\n\nTakes the phone away from a member: the `phone_agent` role is removed first, then the provider\nuser is deactivated (never deleted: call history keeps referring to it). Requires `phone:manage`.\n\n`DELETE /v1/manager/agents/{user_id}`\n\n```ts\nconst { data } = await client.removePhoneAgent({\n user_id: \'example\',\n})\n```\n\n---\n\n### `getProviderSetup`\n\nWhat has been set up at the telephony provider for this organization.\n\n`GET /v1/operator/organizations/{org_id}/provider`\n\n```ts\nconst { data } = await client.getProviderSetup({\n org_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "org_id": "string",\n "ready": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string",\n "created_at": "1970-01-01T00:00:00.000Z"\n },\n "scim": {\n "configured": true,\n "roles_enabled": true\n },\n "sso": {\n "configured": true,\n "identity_client_id": "string",\n "configured_at": "1970-01-01T00:00:00.000Z"\n },\n "last_setup_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `setupProvider`\n\nPrepares the telephony provider for an organization, idempotently and in order: the provider\ntenant (Babelforce sub-account keyed by the organization id), its SCIM configuration with role\nmanagement o\n\n`POST /v1/operator/organizations/{org_id}/provider:setup`\n\n```ts\nconst { data } = await client.setupProvider(\n {\n org_id: \'example\',\n },\n {\n account_name: \'string\',\n identity_client_id: \'string\',\n identity_client_secret: \'stringstring\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "provider": "babelforce",\n "org_id": "string",\n "ready": true,\n "tenant": {\n "id": "string",\n "name": "string",\n "org_key": "string",\n "created_at": "1970-01-01T00:00:00.000Z"\n },\n "scim": {\n "configured": true,\n "roles_enabled": true\n },\n "sso": {\n "configured": true,\n "identity_client_id": "string",\n "configured_at": "1970-01-01T00:00:00.000Z"\n },\n "last_setup_by": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ManagerStatus`\n\n```ts\ntype ManagerStatus = {\n provider: "babelforce"\n ready: boolean\n reasons: "provider_tenant_missing" | "sso_not_configured" | "scim_not_configured" | "identity_enablement_missing"[]\n}\n```\n\n### `PhoneAgent`\n\n```ts\ntype PhoneAgent = {\n user_id: string\n email: string\n display_name?: string\n status: "active" | "pending" | "disabled" | "missing_provider" | "missing_role"\n provider_user_id?: string\n provider_roles?: string[]\n assigned_at?: string // date-time\n assigned_by?: string\n}\n```\n\n### `AssignPhoneAgentRequest`\n\n```ts\ntype AssignPhoneAgentRequest = {\n user_id: string\n}\n```\n\n### `ProviderSetup`\n\n```ts\ntype ProviderSetup = {\n provider: "babelforce"\n org_id: string\n ready: boolean\n tenant: {\n id: string\n name: string\n org_key: string\n created_at?: string // date-time\n }\n scim: {\n configured: boolean\n roles_enabled: boolean\n }\n sso: {\n configured: boolean\n identity_client_id?: string\n configured_at?: string // date-time\n }\n last_setup_by?: string\n}\n```\n\n### `ProviderSetupRequest`\n\n```ts\ntype ProviderSetupRequest = {\n account_name?: string\n identity_client_id: string\n identity_client_secret: string\n}\n```\n\n### `CustomerBatchSearchResult`\n\n```ts\ntype CustomerBatchSearchResult = {\n results: Array<{\n identifier: {\n type: { ... }\n value: { ... }\n }\n status: "found" | "not_found" | "ambiguous" | "invalid" | "error"\n customer?: {\n id: { ... }\n name: { ... }\n customer_number?: { ... }\n }\n }>\n}\n```\n\n### `CustomerSearchResult`\n\n```ts\ntype CustomerSearchResult = {\n identifier: {\n type: "id" | "customer_number" | "external_id" | "phone_number" | "email"\n value: string\n }\n status: "found" | "not_found" | "ambiguous" | "invalid" | "error"\n customer?: {\n id: string\n name: string\n customer_number?: string\n }\n}\n```\n\n### `CustomerIdentifier`\n\n```ts\ntype CustomerIdentifier = {\n type: "id" | "customer_number" | "external_id" | "phone_number" | "email"\n value: string\n}\n```\n\n### `CustomerSummary`\n\nPresent when `status` is `found`\n\n```ts\ntype CustomerSummary = {\n id: string\n name: string\n customer_number?: string\n}\n```\n\n### `ErrorResponse`\n\n```ts\ntype ErrorResponse = {\n status: number\n error: string\n code?: string\n}\n```\n';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports.default = phone_integration_default;
|