@epilot/sdk 2.20.82 → 2.20.84
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 +1485 -341
- package/definitions/targeting.json +77 -3
- 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.d.cts +2 -2
- package/dist/apis/targeting.d.ts +2 -2
- 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-E6N33SVB.js +14 -0
- package/dist/{chunk-HGXYSRIN.cjs → chunk-T4WYY7OU.cjs} +3 -3
- package/dist/chunk-U4AOZZGW.cjs +14 -0
- package/dist/{chunk-JCXLBOC3.js → chunk-ZPG2RR4J.js} +3 -3
- package/dist/index.cjs +10 -10
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/phone-integration-6GDKV5EH.js +7 -0
- package/dist/phone-integration-UENU7EVN.cjs +7 -0
- package/dist/{phone-integration-runtime-7PWKKUBM.cjs → phone-integration-runtime-4SDHGFMR.cjs} +2 -2
- package/dist/{phone-integration-runtime-5VAA6Q4L.js → phone-integration-runtime-PWUZOJVD.js} +1 -1
- package/dist/phone-integration.d-Cx4ZOtzD.d.cts +1429 -0
- package/dist/phone-integration.d-Cx4ZOtzD.d.ts +1429 -0
- package/dist/targeting-C4H6GCPJ.cjs +7 -0
- package/dist/targeting-PPD4TUSO.js +7 -0
- package/dist/{targeting.d-BYVSahmV.d.cts → targeting.d-ZvHqD3kC.d.cts} +85 -2
- package/dist/{targeting.d-BYVSahmV.d.ts → targeting.d-ZvHqD3kC.d.ts} +85 -2
- package/docs/phone-integration.md +772 -0
- package/docs/targeting.md +94 -3
- package/package.json +1 -1
- package/dist/chunk-NHA2IXWN.cjs +0 -14
- package/dist/chunk-QFTXKO2I.js +0 -14
- package/dist/phone-integration-ARSGAHNJ.cjs +0 -7
- package/dist/phone-integration-MGH7LYID.js +0 -7
- package/dist/phone-integration.d-BNqwHuQ6.d.cts +0 -623
- package/dist/phone-integration.d-BNqwHuQ6.d.ts +0 -623
- package/dist/targeting-2JCGF4IR.cjs +0 -7
- package/dist/targeting-2NHAG7B5.js +0 -7
package/docs/targeting.md
CHANGED
|
@@ -66,6 +66,8 @@ const { data } = await targetingClient.changeCampaignStatus(...)
|
|
|
66
66
|
- [`JobStatus`](#jobstatus)
|
|
67
67
|
- [`Campaign`](#campaign)
|
|
68
68
|
- [`Target`](#target)
|
|
69
|
+
- [`TargetEntityFilters`](#targetentityfilters)
|
|
70
|
+
- [`TargetSortItem`](#targetsortitem)
|
|
69
71
|
- [`MatchCampaignParams`](#matchcampaignparams)
|
|
70
72
|
- [`NextBestAction`](#nextbestaction)
|
|
71
73
|
- [`DiscoverCampaignsParams`](#discovercampaignsparams)
|
|
@@ -305,6 +307,27 @@ const { data } = await client.setupCampaign(
|
|
|
305
307
|
email: {
|
|
306
308
|
automation_id: 'b8c01433-5556-4e2b-aad4-6f5348d1df84',
|
|
307
309
|
template_id: 'b8c01433-5556-4e2b-aad4-6f5348d1df84'
|
|
310
|
+
},
|
|
311
|
+
entity_ui: {
|
|
312
|
+
category: 'string',
|
|
313
|
+
icon: {
|
|
314
|
+
name: 'string',
|
|
315
|
+
color: 'string'
|
|
316
|
+
},
|
|
317
|
+
title: 'string',
|
|
318
|
+
body: 'string',
|
|
319
|
+
priority: 'medium',
|
|
320
|
+
is_dismissable: true,
|
|
321
|
+
cta: {
|
|
322
|
+
type: 'journey',
|
|
323
|
+
target: 'string',
|
|
324
|
+
context_params: [
|
|
325
|
+
{
|
|
326
|
+
key: 'string',
|
|
327
|
+
value: 'string'
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
}
|
|
308
331
|
}
|
|
309
332
|
}
|
|
310
333
|
},
|
|
@@ -537,7 +560,17 @@ const { data } = await client.matchTargets(
|
|
|
537
560
|
"name": "string",
|
|
538
561
|
"description": "string",
|
|
539
562
|
"entity_schema": "string",
|
|
540
|
-
"entity_filters": {
|
|
563
|
+
"entity_filters": {
|
|
564
|
+
"filter": {},
|
|
565
|
+
"search": "string",
|
|
566
|
+
"sort": [
|
|
567
|
+
{
|
|
568
|
+
"key": "billing_address.postal_code",
|
|
569
|
+
"order": "asc"
|
|
570
|
+
}
|
|
571
|
+
],
|
|
572
|
+
"limit": 1
|
|
573
|
+
}
|
|
541
574
|
}
|
|
542
575
|
}
|
|
543
576
|
]
|
|
@@ -552,6 +585,7 @@ const { data } = await client.matchTargets(
|
|
|
552
585
|
|
|
553
586
|
Transform target filters into Lucene queries for the provided target IDs.
|
|
554
587
|
Returns the transformed query string for each target along with any errors encountered.
|
|
588
|
+
If the target defines a sort order or
|
|
555
589
|
|
|
556
590
|
`POST /v1/target/queries`
|
|
557
591
|
|
|
@@ -573,7 +607,9 @@ const { data } = await client.getTargetQueries(
|
|
|
573
607
|
{
|
|
574
608
|
"target_id": "b8c01433-5556-4e2b-aad4-6f5348d1df84",
|
|
575
609
|
"query": "string",
|
|
576
|
-
"error": "string"
|
|
610
|
+
"error": "string",
|
|
611
|
+
"sort": ["billing_date:desc", "_title.keyword:asc", "_id:desc"],
|
|
612
|
+
"limit": 1
|
|
577
613
|
}
|
|
578
614
|
]
|
|
579
615
|
}
|
|
@@ -1218,7 +1254,42 @@ type Target = {
|
|
|
1218
1254
|
name?: string
|
|
1219
1255
|
description?: string
|
|
1220
1256
|
entity_schema?: string
|
|
1221
|
-
entity_filters?:
|
|
1257
|
+
entity_filters?: {
|
|
1258
|
+
filter?: Record<string, unknown>
|
|
1259
|
+
search?: string
|
|
1260
|
+
sort?: Array<{
|
|
1261
|
+
key: { ... }
|
|
1262
|
+
order: { ... }
|
|
1263
|
+
}>
|
|
1264
|
+
limit?: number
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
```
|
|
1268
|
+
|
|
1269
|
+
### `TargetEntityFilters`
|
|
1270
|
+
|
|
1271
|
+
Search state of the target. `filter` and `search` use the same shape as the search state of entity views.
|
|
1272
|
+
Besides the filters, it optionally defines the order and maximum number of results.
|
|
1273
|
+
|
|
1274
|
+
|
|
1275
|
+
```ts
|
|
1276
|
+
type TargetEntityFilters = {
|
|
1277
|
+
filter?: Record<string, unknown>
|
|
1278
|
+
search?: string
|
|
1279
|
+
sort?: Array<{
|
|
1280
|
+
key: string
|
|
1281
|
+
order: "asc" | "desc"
|
|
1282
|
+
}>
|
|
1283
|
+
limit?: number
|
|
1284
|
+
}
|
|
1285
|
+
```
|
|
1286
|
+
|
|
1287
|
+
### `TargetSortItem`
|
|
1288
|
+
|
|
1289
|
+
```ts
|
|
1290
|
+
type TargetSortItem = {
|
|
1291
|
+
key: string
|
|
1292
|
+
order: "asc" | "desc"
|
|
1222
1293
|
}
|
|
1223
1294
|
```
|
|
1224
1295
|
|
|
@@ -1327,6 +1398,8 @@ type TargetQueryResult = {
|
|
|
1327
1398
|
target_id: string // uuid
|
|
1328
1399
|
query: string
|
|
1329
1400
|
error?: string
|
|
1401
|
+
sort?: string[]
|
|
1402
|
+
limit?: number
|
|
1330
1403
|
}
|
|
1331
1404
|
```
|
|
1332
1405
|
|
|
@@ -1541,6 +1614,15 @@ type SetupCampaignRequest = {
|
|
|
1541
1614
|
automation_id?: { ... }
|
|
1542
1615
|
template_id?: { ... }
|
|
1543
1616
|
}
|
|
1617
|
+
entity_ui?: {
|
|
1618
|
+
category?: { ... }
|
|
1619
|
+
icon?: { ... }
|
|
1620
|
+
title: { ... }
|
|
1621
|
+
body?: { ... }
|
|
1622
|
+
priority?: { ... }
|
|
1623
|
+
is_dismissable?: { ... }
|
|
1624
|
+
cta: { ... }
|
|
1625
|
+
}
|
|
1544
1626
|
}
|
|
1545
1627
|
}
|
|
1546
1628
|
```
|
|
@@ -1576,6 +1658,15 @@ type SetupTariffChangeCampaignRequest = {
|
|
|
1576
1658
|
automation_id?: { ... }
|
|
1577
1659
|
template_id?: { ... }
|
|
1578
1660
|
}
|
|
1661
|
+
entity_ui?: {
|
|
1662
|
+
category?: { ... }
|
|
1663
|
+
icon?: { ... }
|
|
1664
|
+
title: { ... }
|
|
1665
|
+
body?: { ... }
|
|
1666
|
+
priority?: { ... }
|
|
1667
|
+
is_dismissable?: { ... }
|
|
1668
|
+
cta: { ... }
|
|
1669
|
+
}
|
|
1579
1670
|
}
|
|
1580
1671
|
}
|
|
1581
1672
|
```
|
package/package.json
CHANGED
package/dist/chunk-NHA2IXWN.cjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
|
|
4
|
-
|
|
5
|
-
// src/definitions/phone-integration-runtime.json
|
|
6
|
-
var require_phone_integration_runtime = _chunkNJK5F5TFcjs.__commonJS.call(void 0, {
|
|
7
|
-
"src/definitions/phone-integration-runtime.json"(exports, module) {
|
|
8
|
-
module.exports = { s: "https://phone-integration-api.sls.epilot.io", o: [["batchSearchCustomers", "get", "/v1/customer:batchSearch", [["id", "q", false, "form", true], ["customer_number", "q", false, "form", true], ["external_id", "q", false, "form", true], ["phone_number", "q", false, "form", true], ["email", "q", false, "form", true], ["x-trace-id", "h"]]], ["getManagerStatus", "get", "/v1/manager/status"], ["listPhoneAgents", "get", "/v1/manager/agents"], ["assignPhoneAgent", "post", "/v1/manager/agents", null, 1], ["removePhoneAgent", "delete", "/v1/manager/agents/{user_id}"], ["listProviderSetups", "get", "/v1/operator/provider-setups"], ["getProviderSetup", "get", "/v1/operator/organizations/{org_id}/provider"], ["setupProvider", "post", "/v1/operator/organizations/{org_id}/provider:setup", null, 1]], v: "3.0.3", pp: { "/v1/manager/agents/{user_id}": [["user_id", "p", true]], "/v1/operator/organizations/{org_id}/provider": [["org_id", "p", true]], "/v1/operator/organizations/{org_id}/provider:setup": [["org_id", "p", true]] } };
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
exports.require_phone_integration_runtime = require_phone_integration_runtime;
|
package/dist/chunk-QFTXKO2I.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__commonJS
|
|
3
|
-
} from "./chunk-YPSWSI3M.js";
|
|
4
|
-
|
|
5
|
-
// src/definitions/phone-integration-runtime.json
|
|
6
|
-
var require_phone_integration_runtime = __commonJS({
|
|
7
|
-
"src/definitions/phone-integration-runtime.json"(exports, module) {
|
|
8
|
-
module.exports = { s: "https://phone-integration-api.sls.epilot.io", o: [["batchSearchCustomers", "get", "/v1/customer:batchSearch", [["id", "q", false, "form", true], ["customer_number", "q", false, "form", true], ["external_id", "q", false, "form", true], ["phone_number", "q", false, "form", true], ["email", "q", false, "form", true], ["x-trace-id", "h"]]], ["getManagerStatus", "get", "/v1/manager/status"], ["listPhoneAgents", "get", "/v1/manager/agents"], ["assignPhoneAgent", "post", "/v1/manager/agents", null, 1], ["removePhoneAgent", "delete", "/v1/manager/agents/{user_id}"], ["listProviderSetups", "get", "/v1/operator/provider-setups"], ["getProviderSetup", "get", "/v1/operator/organizations/{org_id}/provider"], ["setupProvider", "post", "/v1/operator/organizations/{org_id}/provider:setup", null, 1]], v: "3.0.3", pp: { "/v1/manager/agents/{user_id}": [["user_id", "p", true]], "/v1/operator/organizations/{org_id}/provider": [["org_id", "p", true]], "/v1/operator/organizations/{org_id}/provider:setup": [["org_id", "p", true]] } };
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
require_phone_integration_runtime
|
|
14
|
-
};
|
|
@@ -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- [`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;
|
|
@@ -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- [`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
|
-
};
|