@epilot/sdk 2.20.79 → 2.20.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/definitions/file-runtime.json +1 -1
  2. package/definitions/file.json +834 -9
  3. package/definitions/phone-integration-runtime.json +1 -1
  4. package/definitions/phone-integration.json +651 -0
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +6 -6
  20. package/dist/apis/billing.js +1 -1
  21. package/dist/apis/blueprint-manifest.cjs +6 -6
  22. package/dist/apis/blueprint-manifest.js +1 -1
  23. package/dist/apis/calendar.cjs +6 -6
  24. package/dist/apis/calendar.js +1 -1
  25. package/dist/apis/chat.cjs +6 -6
  26. package/dist/apis/chat.js +1 -1
  27. package/dist/apis/configuration-hub.cjs +6 -6
  28. package/dist/apis/configuration-hub.js +1 -1
  29. package/dist/apis/consent.cjs +6 -6
  30. package/dist/apis/consent.js +1 -1
  31. package/dist/apis/customer-portal.cjs +6 -6
  32. package/dist/apis/customer-portal.js +1 -1
  33. package/dist/apis/dashboard.cjs +6 -6
  34. package/dist/apis/dashboard.js +1 -1
  35. package/dist/apis/data-governance.cjs +6 -6
  36. package/dist/apis/data-governance.js +1 -1
  37. package/dist/apis/deduplication.cjs +6 -6
  38. package/dist/apis/deduplication.js +1 -1
  39. package/dist/apis/design.cjs +6 -6
  40. package/dist/apis/design.js +1 -1
  41. package/dist/apis/document.cjs +6 -6
  42. package/dist/apis/document.js +1 -1
  43. package/dist/apis/email-settings.cjs +6 -6
  44. package/dist/apis/email-settings.js +1 -1
  45. package/dist/apis/email-template.cjs +6 -6
  46. package/dist/apis/email-template.js +1 -1
  47. package/dist/apis/entity-mapping.cjs +6 -6
  48. package/dist/apis/entity-mapping.js +1 -1
  49. package/dist/apis/entity.cjs +6 -6
  50. package/dist/apis/entity.js +1 -1
  51. package/dist/apis/environments.cjs +6 -6
  52. package/dist/apis/environments.js +1 -1
  53. package/dist/apis/event-catalog.cjs +6 -6
  54. package/dist/apis/event-catalog.js +1 -1
  55. package/dist/apis/external-values.cjs +6 -6
  56. package/dist/apis/external-values.js +1 -1
  57. package/dist/apis/file.cjs +8 -8
  58. package/dist/apis/file.d.cts +2 -2
  59. package/dist/apis/file.d.ts +2 -2
  60. package/dist/apis/file.js +2 -2
  61. package/dist/apis/iban.cjs +6 -6
  62. package/dist/apis/iban.js +1 -1
  63. package/dist/apis/identity.cjs +6 -6
  64. package/dist/apis/identity.js +1 -1
  65. package/dist/apis/integration-toolkit.cjs +6 -6
  66. package/dist/apis/integration-toolkit.js +1 -1
  67. package/dist/apis/journey.cjs +6 -6
  68. package/dist/apis/journey.js +1 -1
  69. package/dist/apis/kanban.cjs +6 -6
  70. package/dist/apis/kanban.js +1 -1
  71. package/dist/apis/message.cjs +6 -6
  72. package/dist/apis/message.js +1 -1
  73. package/dist/apis/metering.cjs +6 -6
  74. package/dist/apis/metering.js +1 -1
  75. package/dist/apis/notes.cjs +6 -6
  76. package/dist/apis/notes.js +1 -1
  77. package/dist/apis/notification.cjs +6 -6
  78. package/dist/apis/notification.js +1 -1
  79. package/dist/apis/organization.cjs +6 -6
  80. package/dist/apis/organization.js +1 -1
  81. package/dist/apis/partner-directory.cjs +6 -6
  82. package/dist/apis/partner-directory.js +1 -1
  83. package/dist/apis/permissions.cjs +6 -6
  84. package/dist/apis/permissions.js +1 -1
  85. package/dist/apis/phone-integration.cjs +8 -8
  86. package/dist/apis/phone-integration.d.cts +2 -2
  87. package/dist/apis/phone-integration.d.ts +2 -2
  88. package/dist/apis/phone-integration.js +2 -2
  89. package/dist/apis/pricing-tier.cjs +6 -6
  90. package/dist/apis/pricing-tier.js +1 -1
  91. package/dist/apis/pricing.cjs +6 -6
  92. package/dist/apis/pricing.js +1 -1
  93. package/dist/apis/purpose.cjs +6 -6
  94. package/dist/apis/purpose.js +1 -1
  95. package/dist/apis/query.cjs +6 -6
  96. package/dist/apis/query.js +1 -1
  97. package/dist/apis/sandbox.cjs +6 -6
  98. package/dist/apis/sandbox.js +1 -1
  99. package/dist/apis/sharing.cjs +6 -6
  100. package/dist/apis/sharing.js +1 -1
  101. package/dist/apis/snapshot.cjs +6 -6
  102. package/dist/apis/snapshot.js +1 -1
  103. package/dist/apis/submission.cjs +6 -6
  104. package/dist/apis/submission.js +1 -1
  105. package/dist/apis/target.cjs +6 -6
  106. package/dist/apis/target.js +1 -1
  107. package/dist/apis/targeting.cjs +6 -6
  108. package/dist/apis/targeting.js +1 -1
  109. package/dist/apis/template-variables.cjs +6 -6
  110. package/dist/apis/template-variables.js +1 -1
  111. package/dist/apis/user.cjs +6 -6
  112. package/dist/apis/user.js +1 -1
  113. package/dist/apis/validation-rules.cjs +6 -6
  114. package/dist/apis/validation-rules.js +1 -1
  115. package/dist/apis/webhooks.cjs +6 -6
  116. package/dist/apis/webhooks.js +1 -1
  117. package/dist/apis/workflow-definition.cjs +6 -6
  118. package/dist/apis/workflow-definition.js +1 -1
  119. package/dist/apis/workflow.cjs +6 -6
  120. package/dist/apis/workflow.js +1 -1
  121. package/dist/{chunk-5Z7XQQT2.js → chunk-2PFXDXXZ.js} +4 -4
  122. package/dist/{chunk-4G44P2X4.cjs → chunk-3PQISQCY.cjs} +4 -4
  123. package/dist/chunk-4HTTGQEJ.cjs +14 -0
  124. package/dist/chunk-IWKGR2GI.js +14 -0
  125. package/dist/chunk-JFRRQORA.js +14 -0
  126. package/dist/{chunk-BY76NFAX.cjs → chunk-XPQ7LBUE.cjs} +1 -1
  127. package/dist/file-3MIGWJIS.cjs +7 -0
  128. package/dist/file-LA7WL5QQ.js +7 -0
  129. package/dist/{file-runtime-RS4DX5LB.js → file-runtime-JOWOEQD2.js} +1 -1
  130. package/dist/file-runtime-LBP7QFAO.cjs +5 -0
  131. package/dist/{file.d-DELNV63w.d.cts → file.d-BIakPRHY.d.cts} +556 -3
  132. package/dist/{file.d-DELNV63w.d.ts → file.d-BIakPRHY.d.ts} +556 -3
  133. package/dist/index.cjs +12 -12
  134. package/dist/index.d.cts +2 -2
  135. package/dist/index.d.ts +2 -2
  136. package/dist/index.js +3 -3
  137. package/dist/phone-integration-5EHY236F.js +7 -0
  138. package/dist/phone-integration-C567S75X.cjs +7 -0
  139. package/dist/{phone-integration-runtime-DFA6NYNK.cjs → phone-integration-runtime-3QDC5IMK.cjs} +2 -2
  140. package/dist/{phone-integration-runtime-27B4SHA5.js → phone-integration-runtime-JWF52VHF.js} +1 -1
  141. package/dist/phone-integration.d-DJrZ4xkA.d.cts +539 -0
  142. package/dist/phone-integration.d-DJrZ4xkA.d.ts +539 -0
  143. package/docs/file.md +344 -0
  144. package/docs/phone-integration.md +293 -0
  145. package/package.json +1 -1
  146. package/dist/chunk-424JLS5G.cjs +0 -14
  147. package/dist/chunk-FGQBS7TA.js +0 -14
  148. package/dist/chunk-UFMZ4EV3.js +0 -14
  149. package/dist/file-2KT6MMMG.cjs +0 -7
  150. package/dist/file-N3SGGI6E.js +0 -7
  151. package/dist/file-runtime-JL2IZ2CE.cjs +0 -5
  152. package/dist/phone-integration-JT2UAOGS.cjs +0 -7
  153. package/dist/phone-integration-KORLYUBG.js +0 -7
  154. package/dist/phone-integration.d-ChHA2oGI.d.cts +0 -179
  155. package/dist/phone-integration.d-ChHA2oGI.d.ts +0 -179
@@ -1 +1 @@
1
- {"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"]]]],"v":"3.0.3"}
1
+ {"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}"],["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,6 +9,14 @@
9
9
  {
10
10
  "name": "phone-integration",
11
11
  "description": "Phone Integration"
12
+ },
13
+ {
14
+ "name": "manager",
15
+ "description": "Phone manager (epilot 360 control center): which organization members hold the phone and the\ntelephony-provider user behind each of them. Caller must hold `phone:manage` in the organization.\n"
16
+ },
17
+ {
18
+ "name": "operator",
19
+ "description": "Provider setup per organization, run by epilot CS from the admin portal. Platform operators only\n(admin-portal internal-auth token in an allowed group), never customer tokens.\n"
12
20
  }
13
21
  ],
14
22
  "servers": [
@@ -183,17 +191,660 @@
183
191
  }
184
192
  }
185
193
  }
194
+ },
195
+ "/v1/manager/status": {
196
+ "get": {
197
+ "operationId": "getManagerStatus",
198
+ "summary": "getManagerStatus",
199
+ "description": "Whether 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 `phone:manage`.\n",
200
+ "tags": [
201
+ "manager"
202
+ ],
203
+ "security": [
204
+ {
205
+ "EpilotAuth": []
206
+ }
207
+ ],
208
+ "x-epilot-permissions": [
209
+ "phone:manage"
210
+ ],
211
+ "responses": {
212
+ "200": {
213
+ "description": "Readiness of the organization",
214
+ "content": {
215
+ "application/json": {
216
+ "schema": {
217
+ "$ref": "#/components/schemas/ManagerStatus"
218
+ }
219
+ }
220
+ }
221
+ },
222
+ "401": {
223
+ "$ref": "#/components/responses/Unauthorized"
224
+ },
225
+ "403": {
226
+ "$ref": "#/components/responses/Forbidden"
227
+ }
228
+ }
229
+ }
230
+ },
231
+ "/v1/manager/agents": {
232
+ "get": {
233
+ "operationId": "listPhoneAgents",
234
+ "summary": "listPhoneAgents",
235
+ "description": "Organization members who hold the phone (`phone:use`), each joined with the provider user behind\nthem. Requires `phone:manage`.\n",
236
+ "tags": [
237
+ "manager"
238
+ ],
239
+ "security": [
240
+ {
241
+ "EpilotAuth": []
242
+ }
243
+ ],
244
+ "x-epilot-permissions": [
245
+ "phone:manage"
246
+ ],
247
+ "responses": {
248
+ "200": {
249
+ "description": "The organization's phone agents",
250
+ "content": {
251
+ "application/json": {
252
+ "schema": {
253
+ "type": "object",
254
+ "required": [
255
+ "results"
256
+ ],
257
+ "properties": {
258
+ "results": {
259
+ "type": "array",
260
+ "items": {
261
+ "$ref": "#/components/schemas/PhoneAgent"
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ },
269
+ "401": {
270
+ "$ref": "#/components/responses/Unauthorized"
271
+ },
272
+ "403": {
273
+ "$ref": "#/components/responses/Forbidden"
274
+ },
275
+ "502": {
276
+ "$ref": "#/components/responses/BadGateway"
277
+ }
278
+ }
279
+ },
280
+ "post": {
281
+ "operationId": "assignPhoneAgent",
282
+ "summary": "assignPhoneAgent",
283
+ "description": "Gives 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 to that subject with the `agent` role, and only then the `phone_agent` role\n(`phone:use`) is assigned in epilot. Idempotent: an already assigned member answers `200`.\nRequires `phone:manage`.\n",
284
+ "tags": [
285
+ "manager"
286
+ ],
287
+ "security": [
288
+ {
289
+ "EpilotAuth": []
290
+ }
291
+ ],
292
+ "x-epilot-permissions": [
293
+ "phone:manage"
294
+ ],
295
+ "requestBody": {
296
+ "required": true,
297
+ "content": {
298
+ "application/json": {
299
+ "schema": {
300
+ "$ref": "#/components/schemas/AssignPhoneAgentRequest"
301
+ }
302
+ }
303
+ }
304
+ },
305
+ "responses": {
306
+ "200": {
307
+ "description": "The member already held the phone",
308
+ "content": {
309
+ "application/json": {
310
+ "schema": {
311
+ "$ref": "#/components/schemas/PhoneAgent"
312
+ }
313
+ }
314
+ }
315
+ },
316
+ "201": {
317
+ "description": "The member now holds the phone",
318
+ "content": {
319
+ "application/json": {
320
+ "schema": {
321
+ "$ref": "#/components/schemas/PhoneAgent"
322
+ }
323
+ }
324
+ }
325
+ },
326
+ "400": {
327
+ "$ref": "#/components/responses/BadRequest"
328
+ },
329
+ "401": {
330
+ "$ref": "#/components/responses/Unauthorized"
331
+ },
332
+ "403": {
333
+ "$ref": "#/components/responses/Forbidden"
334
+ },
335
+ "404": {
336
+ "description": "The user is not an active member of the organization (code `member_not_found`)",
337
+ "content": {
338
+ "application/json": {
339
+ "schema": {
340
+ "$ref": "#/components/schemas/ErrorResponse"
341
+ }
342
+ }
343
+ }
344
+ },
345
+ "409": {
346
+ "description": "The member cannot get the phone yet; `code` says why:\n- `not_set_up`: the organization is not set up for the phone (see getManagerStatus);\n- `identity_subject_unavailable`: identity-api cannot issue the member's subject (organization\n not enabled on the identity client, or the user is not an active member there);\n- `identity_client_unavailable`: the identity client the setup points at is not active;\n- `provider_conflict`: the provider refused, e.g. this person's identity is bound to another\n provider user.\n",
347
+ "content": {
348
+ "application/json": {
349
+ "schema": {
350
+ "$ref": "#/components/schemas/ErrorResponse"
351
+ }
352
+ }
353
+ }
354
+ },
355
+ "502": {
356
+ "$ref": "#/components/responses/BadGateway"
357
+ }
358
+ }
359
+ }
360
+ },
361
+ "/v1/manager/agents/{user_id}": {
362
+ "parameters": [
363
+ {
364
+ "name": "user_id",
365
+ "in": "path",
366
+ "required": true,
367
+ "description": "epilot user id (`custom:ivy_user_id`)",
368
+ "schema": {
369
+ "type": "string",
370
+ "minLength": 1,
371
+ "maxLength": 64,
372
+ "pattern": "^[A-Za-z0-9_-]+$"
373
+ }
374
+ }
375
+ ],
376
+ "delete": {
377
+ "operationId": "removePhoneAgent",
378
+ "summary": "removePhoneAgent",
379
+ "description": "Takes 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",
380
+ "tags": [
381
+ "manager"
382
+ ],
383
+ "security": [
384
+ {
385
+ "EpilotAuth": []
386
+ }
387
+ ],
388
+ "x-epilot-permissions": [
389
+ "phone:manage"
390
+ ],
391
+ "responses": {
392
+ "204": {
393
+ "description": "The member no longer holds the phone"
394
+ },
395
+ "400": {
396
+ "$ref": "#/components/responses/BadRequest"
397
+ },
398
+ "401": {
399
+ "$ref": "#/components/responses/Unauthorized"
400
+ },
401
+ "403": {
402
+ "$ref": "#/components/responses/Forbidden"
403
+ },
404
+ "404": {
405
+ "description": "The member does not hold the phone (code `agent_not_found`)",
406
+ "content": {
407
+ "application/json": {
408
+ "schema": {
409
+ "$ref": "#/components/schemas/ErrorResponse"
410
+ }
411
+ }
412
+ }
413
+ },
414
+ "502": {
415
+ "description": "The role was removed but the provider user could not be deactivated (code `provider_error`);\nremoving again retries the deactivation.\n",
416
+ "content": {
417
+ "application/json": {
418
+ "schema": {
419
+ "$ref": "#/components/schemas/ErrorResponse"
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ }
426
+ },
427
+ "/v1/operator/organizations/{org_id}/provider": {
428
+ "parameters": [
429
+ {
430
+ "name": "org_id",
431
+ "in": "path",
432
+ "required": true,
433
+ "description": "epilot organization id",
434
+ "schema": {
435
+ "type": "string",
436
+ "minLength": 1,
437
+ "maxLength": 64,
438
+ "pattern": "^[A-Za-z0-9_-]+$"
439
+ }
440
+ }
441
+ ],
442
+ "get": {
443
+ "operationId": "getProviderSetup",
444
+ "summary": "getProviderSetup",
445
+ "description": "What has been set up at the telephony provider for this organization.",
446
+ "tags": [
447
+ "operator"
448
+ ],
449
+ "security": [
450
+ {
451
+ "OperatorAuth": []
452
+ }
453
+ ],
454
+ "x-epilot-permissions": [
455
+ "internal"
456
+ ],
457
+ "responses": {
458
+ "200": {
459
+ "description": "Provider setup state",
460
+ "content": {
461
+ "application/json": {
462
+ "schema": {
463
+ "$ref": "#/components/schemas/ProviderSetup"
464
+ }
465
+ }
466
+ }
467
+ },
468
+ "400": {
469
+ "$ref": "#/components/responses/BadRequest"
470
+ },
471
+ "401": {
472
+ "$ref": "#/components/responses/Unauthorized"
473
+ },
474
+ "403": {
475
+ "$ref": "#/components/responses/Forbidden"
476
+ },
477
+ "502": {
478
+ "$ref": "#/components/responses/BadGateway"
479
+ },
480
+ "503": {
481
+ "$ref": "#/components/responses/ServiceUnavailable"
482
+ }
483
+ }
484
+ }
485
+ },
486
+ "/v1/operator/organizations/{org_id}/provider:setup": {
487
+ "parameters": [
488
+ {
489
+ "name": "org_id",
490
+ "in": "path",
491
+ "required": true,
492
+ "description": "epilot organization id",
493
+ "schema": {
494
+ "type": "string",
495
+ "minLength": 1,
496
+ "maxLength": 64,
497
+ "pattern": "^[A-Za-z0-9_-]+$"
498
+ }
499
+ }
500
+ ],
501
+ "post": {
502
+ "operationId": "setupProvider",
503
+ "summary": "setupProvider",
504
+ "description": "Prepares 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 on, and its SSO configuration pointing at the identity-api client given here. The\nclient secret is forwarded to the provider and never stored by this service. Re-running updates\nthe SSO configuration (new client or rotated secret) and leaves the rest untouched.\n",
505
+ "tags": [
506
+ "operator"
507
+ ],
508
+ "security": [
509
+ {
510
+ "OperatorAuth": []
511
+ }
512
+ ],
513
+ "x-epilot-permissions": [
514
+ "internal"
515
+ ],
516
+ "requestBody": {
517
+ "required": true,
518
+ "content": {
519
+ "application/json": {
520
+ "schema": {
521
+ "$ref": "#/components/schemas/ProviderSetupRequest"
522
+ }
523
+ }
524
+ }
525
+ },
526
+ "responses": {
527
+ "200": {
528
+ "description": "Provider setup state after the run",
529
+ "content": {
530
+ "application/json": {
531
+ "schema": {
532
+ "$ref": "#/components/schemas/ProviderSetup"
533
+ }
534
+ }
535
+ }
536
+ },
537
+ "400": {
538
+ "$ref": "#/components/responses/BadRequest"
539
+ },
540
+ "401": {
541
+ "$ref": "#/components/responses/Unauthorized"
542
+ },
543
+ "403": {
544
+ "$ref": "#/components/responses/Forbidden"
545
+ },
546
+ "409": {
547
+ "description": "The provider refused, for example the account name is taken (code `provider_conflict`)",
548
+ "content": {
549
+ "application/json": {
550
+ "schema": {
551
+ "$ref": "#/components/schemas/ErrorResponse"
552
+ }
553
+ }
554
+ }
555
+ },
556
+ "502": {
557
+ "$ref": "#/components/responses/BadGateway"
558
+ },
559
+ "503": {
560
+ "$ref": "#/components/responses/ServiceUnavailable"
561
+ }
562
+ }
563
+ }
186
564
  }
187
565
  },
188
566
  "components": {
567
+ "responses": {
568
+ "BadRequest": {
569
+ "description": "The request is malformed or fails validation",
570
+ "content": {
571
+ "application/json": {
572
+ "schema": {
573
+ "$ref": "#/components/schemas/ErrorResponse"
574
+ }
575
+ }
576
+ }
577
+ },
578
+ "Unauthorized": {
579
+ "description": "Missing or invalid bearer token",
580
+ "content": {
581
+ "application/json": {
582
+ "schema": {
583
+ "$ref": "#/components/schemas/ErrorResponse"
584
+ }
585
+ }
586
+ }
587
+ },
588
+ "Forbidden": {
589
+ "description": "The caller lacks the required permission",
590
+ "content": {
591
+ "application/json": {
592
+ "schema": {
593
+ "$ref": "#/components/schemas/ErrorResponse"
594
+ }
595
+ }
596
+ }
597
+ },
598
+ "BadGateway": {
599
+ "description": "A dependency failed: the telephony provider could not be reached or answered unexpectedly (code\n`provider_error`, with the provider's request id when it sent one), or identity-api is\ntemporarily unavailable (code `identity_unavailable`). Retrying is safe.\n",
600
+ "content": {
601
+ "application/json": {
602
+ "schema": {
603
+ "$ref": "#/components/schemas/ErrorResponse"
604
+ }
605
+ }
606
+ }
607
+ },
608
+ "ServiceUnavailable": {
609
+ "description": "The operator's admin-portal groups could not be checked right now; retry",
610
+ "content": {
611
+ "application/json": {
612
+ "schema": {
613
+ "$ref": "#/components/schemas/ErrorResponse"
614
+ }
615
+ }
616
+ }
617
+ }
618
+ },
189
619
  "securitySchemes": {
190
620
  "EpilotAuth": {
191
621
  "type": "http",
192
622
  "scheme": "bearer",
193
623
  "bearerFormat": "JWT"
624
+ },
625
+ "OperatorAuth": {
626
+ "type": "http",
627
+ "scheme": "bearer",
628
+ "bearerFormat": "JWT",
629
+ "description": "Internal-auth bearer token minted for an epilot admin-portal user in an allowed group (same\npolicy as identity-api's operator API). Customer organization bearers are never accepted.\n"
194
630
  }
195
631
  },
196
632
  "schemas": {
633
+ "ManagerStatus": {
634
+ "type": "object",
635
+ "required": [
636
+ "provider",
637
+ "ready",
638
+ "reasons"
639
+ ],
640
+ "properties": {
641
+ "provider": {
642
+ "type": "string",
643
+ "description": "Telephony provider behind this organization",
644
+ "enum": [
645
+ "babelforce"
646
+ ]
647
+ },
648
+ "ready": {
649
+ "type": "boolean",
650
+ "description": "Agents can be assigned"
651
+ },
652
+ "reasons": {
653
+ "type": "array",
654
+ "description": "Why the organization is not ready (empty when ready)",
655
+ "items": {
656
+ "type": "string",
657
+ "enum": [
658
+ "provider_tenant_missing",
659
+ "sso_not_configured",
660
+ "scim_not_configured",
661
+ "identity_enablement_missing"
662
+ ]
663
+ }
664
+ }
665
+ }
666
+ },
667
+ "PhoneAgent": {
668
+ "type": "object",
669
+ "required": [
670
+ "user_id",
671
+ "email",
672
+ "status"
673
+ ],
674
+ "properties": {
675
+ "user_id": {
676
+ "type": "string",
677
+ "description": "epilot user id"
678
+ },
679
+ "email": {
680
+ "type": "string"
681
+ },
682
+ "display_name": {
683
+ "type": "string"
684
+ },
685
+ "status": {
686
+ "type": "string",
687
+ "description": "`active`: holds the phone and has an enabled provider user. `pending`: assigned in epilot but\nthe provider user is not activated yet. `disabled`: provider user disabled. `missing_provider`:\nholds `phone:use` but no provider user is bound (assign again to repair). `missing_role`:\nassigned here, but the `phone_agent` role (`phone:use`) was removed elsewhere, e.g. in the\nusers and permissions settings (assign again to restore it, or remove to deactivate the\nprovider user).\n",
688
+ "enum": [
689
+ "active",
690
+ "pending",
691
+ "disabled",
692
+ "missing_provider",
693
+ "missing_role"
694
+ ]
695
+ },
696
+ "provider_user_id": {
697
+ "type": "string",
698
+ "description": "The provider's id of the bound user"
699
+ },
700
+ "provider_roles": {
701
+ "type": "array",
702
+ "items": {
703
+ "type": "string"
704
+ }
705
+ },
706
+ "assigned_at": {
707
+ "type": "string",
708
+ "format": "date-time"
709
+ },
710
+ "assigned_by": {
711
+ "type": "string",
712
+ "description": "epilot user id of the manager who assigned the phone"
713
+ }
714
+ }
715
+ },
716
+ "AssignPhoneAgentRequest": {
717
+ "type": "object",
718
+ "required": [
719
+ "user_id"
720
+ ],
721
+ "properties": {
722
+ "user_id": {
723
+ "type": "string",
724
+ "description": "epilot user id of an active member of the caller's organization",
725
+ "minLength": 1,
726
+ "maxLength": 64,
727
+ "pattern": "^[A-Za-z0-9_-]+$"
728
+ }
729
+ }
730
+ },
731
+ "ProviderSetup": {
732
+ "type": "object",
733
+ "required": [
734
+ "provider",
735
+ "org_id",
736
+ "ready",
737
+ "tenant",
738
+ "scim",
739
+ "sso"
740
+ ],
741
+ "properties": {
742
+ "provider": {
743
+ "type": "string",
744
+ "enum": [
745
+ "babelforce"
746
+ ]
747
+ },
748
+ "org_id": {
749
+ "type": "string"
750
+ },
751
+ "ready": {
752
+ "type": "boolean",
753
+ "description": "Everything below is in place"
754
+ },
755
+ "tenant": {
756
+ "type": "object",
757
+ "description": "The provider tenant for this organization (null until created)",
758
+ "nullable": true,
759
+ "required": [
760
+ "id",
761
+ "name",
762
+ "org_key"
763
+ ],
764
+ "properties": {
765
+ "id": {
766
+ "type": "string"
767
+ },
768
+ "name": {
769
+ "type": "string"
770
+ },
771
+ "org_key": {
772
+ "type": "string"
773
+ },
774
+ "created_at": {
775
+ "type": "string",
776
+ "format": "date-time"
777
+ }
778
+ }
779
+ },
780
+ "scim": {
781
+ "type": "object",
782
+ "required": [
783
+ "configured",
784
+ "roles_enabled"
785
+ ],
786
+ "properties": {
787
+ "configured": {
788
+ "type": "boolean"
789
+ },
790
+ "roles_enabled": {
791
+ "type": "boolean"
792
+ }
793
+ }
794
+ },
795
+ "sso": {
796
+ "type": "object",
797
+ "required": [
798
+ "configured"
799
+ ],
800
+ "properties": {
801
+ "configured": {
802
+ "type": "boolean"
803
+ },
804
+ "identity_client_id": {
805
+ "type": "string",
806
+ "description": "The identity-api client the tenant's SSO configuration points at"
807
+ },
808
+ "configured_at": {
809
+ "type": "string",
810
+ "format": "date-time"
811
+ }
812
+ }
813
+ },
814
+ "last_setup_by": {
815
+ "type": "string",
816
+ "description": "Admin-portal operator (email) who last ran the setup"
817
+ }
818
+ }
819
+ },
820
+ "ProviderSetupRequest": {
821
+ "type": "object",
822
+ "required": [
823
+ "identity_client_id",
824
+ "identity_client_secret"
825
+ ],
826
+ "properties": {
827
+ "account_name": {
828
+ "type": "string",
829
+ "description": "Provider tenant name, unique across the provider (3 to 100 characters). Required the first\ntime (`400` with code `account_name_required` without it); ignored once the tenant exists.\n",
830
+ "minLength": 3,
831
+ "maxLength": 100
832
+ },
833
+ "identity_client_id": {
834
+ "type": "string",
835
+ "description": "identity-api client registered for the provider (its partner application for this stage)",
836
+ "minLength": 1,
837
+ "maxLength": 128,
838
+ "pattern": "^[A-Za-z0-9._~-]+$"
839
+ },
840
+ "identity_client_secret": {
841
+ "type": "string",
842
+ "description": "The client's current secret, forwarded to the provider's SSO configuration and never stored",
843
+ "minLength": 12,
844
+ "maxLength": 512
845
+ }
846
+ }
847
+ },
197
848
  "CustomerBatchSearchResult": {
198
849
  "type": "object",
199
850
  "additionalProperties": false,