@besales/mcp 0.46.0 → 0.47.1

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 (182) hide show
  1. package/README.md +96 -55
  2. package/dist/auth/connection-store.d.ts +21 -1
  3. package/dist/auth/connection-store.js +46 -2
  4. package/dist/auth/connection-store.js.map +1 -1
  5. package/dist/auth/oauth-client.d.ts +5 -1
  6. package/dist/auth/oauth-client.js +22 -12
  7. package/dist/auth/oauth-client.js.map +1 -1
  8. package/dist/cli.js +14 -5
  9. package/dist/cli.js.map +1 -1
  10. package/dist/http/api-client.d.ts +16 -1
  11. package/dist/http/api-client.js +50 -2
  12. package/dist/http/api-client.js.map +1 -1
  13. package/dist/instructions/server-instructions.d.ts +4 -13
  14. package/dist/instructions/server-instructions.js +76 -274
  15. package/dist/instructions/server-instructions.js.map +1 -1
  16. package/dist/prompts/registry.d.ts +15 -0
  17. package/dist/prompts/registry.js +83 -0
  18. package/dist/prompts/registry.js.map +1 -0
  19. package/dist/resources/concepts/feedback-sheets.md +7 -4
  20. package/dist/resources/concepts/handoff.md +4 -1
  21. package/dist/resources/concepts/sandbox.md +14 -5
  22. package/dist/resources/concepts/triggers.md +6 -2
  23. package/dist/resources/concepts/workbook-classification.md +26 -21
  24. package/dist/resources/docs/campaigns.md +20 -0
  25. package/dist/resources/docs/follow-up.md +19 -0
  26. package/dist/resources/docs/platforms.md +2 -2
  27. package/dist/resources/docs/routing.md +18 -0
  28. package/dist/resources/docs/task-state.md +30 -0
  29. package/dist/resources/docs/trigger-actions.md +28 -0
  30. package/dist/resources/docs/variables.md +18 -0
  31. package/dist/resources/registry.js +51 -2
  32. package/dist/resources/registry.js.map +1 -1
  33. package/dist/resources/workflows/extract-from-document.md +8 -1
  34. package/dist/resources/workflows/iterate-with-sandbox.md +5 -2
  35. package/dist/resources/workflows/platform-setup-from-scratch.md +90 -2
  36. package/dist/resources/workflows/production-readiness-check.md +22 -18
  37. package/dist/schemas/mcp-tools.json +1139 -96
  38. package/dist/server.d.ts +2 -0
  39. package/dist/server.js +8 -2
  40. package/dist/server.js.map +1 -1
  41. package/dist/tasks/task-state-store.d.ts +68 -0
  42. package/dist/tasks/task-state-store.js +278 -0
  43. package/dist/tasks/task-state-store.js.map +1 -0
  44. package/dist/tools/annotations.d.ts +7 -0
  45. package/dist/tools/annotations.js +16 -0
  46. package/dist/tools/annotations.js.map +1 -0
  47. package/dist/tools/contracts.js +7 -1
  48. package/dist/tools/contracts.js.map +1 -1
  49. package/dist/tools/definitions/agent-design.d.ts +41 -20
  50. package/dist/tools/definitions/agent-design.js +189 -19
  51. package/dist/tools/definitions/agent-design.js.map +1 -1
  52. package/dist/tools/definitions/analytics.d.ts +40 -0
  53. package/dist/tools/definitions/analytics.js +233 -0
  54. package/dist/tools/definitions/analytics.js.map +1 -0
  55. package/dist/tools/definitions/broadcast-analytics.js +12 -0
  56. package/dist/tools/definitions/broadcast-analytics.js.map +1 -1
  57. package/dist/tools/definitions/broadcast-mailing-variants.d.ts +2 -0
  58. package/dist/tools/definitions/broadcast-mailing-variants.js +10 -0
  59. package/dist/tools/definitions/broadcast-mailing-variants.js.map +1 -1
  60. package/dist/tools/definitions/broadcast-scheduler.d.ts +14 -1
  61. package/dist/tools/definitions/broadcast-scheduler.js +148 -12
  62. package/dist/tools/definitions/broadcast-scheduler.js.map +1 -1
  63. package/dist/tools/definitions/contacts.d.ts +15 -0
  64. package/dist/tools/definitions/contacts.js +84 -0
  65. package/dist/tools/definitions/contacts.js.map +1 -0
  66. package/dist/tools/definitions/crm-platform.d.ts +2 -0
  67. package/dist/tools/definitions/crm-platform.js +75 -5
  68. package/dist/tools/definitions/crm-platform.js.map +1 -1
  69. package/dist/tools/definitions/datasource.d.ts +1 -0
  70. package/dist/tools/definitions/datasource.js +16 -1
  71. package/dist/tools/definitions/datasource.js.map +1 -1
  72. package/dist/tools/definitions/dialogue-audit.d.ts +2 -2
  73. package/dist/tools/definitions/dialogue-audit.js +54 -16
  74. package/dist/tools/definitions/dialogue-audit.js.map +1 -1
  75. package/dist/tools/definitions/dialogue-export.d.ts +1 -1
  76. package/dist/tools/definitions/dialogue-export.js +12 -0
  77. package/dist/tools/definitions/dialogue-export.js.map +1 -1
  78. package/dist/tools/definitions/external-api-channels.js +39 -12
  79. package/dist/tools/definitions/external-api-channels.js.map +1 -1
  80. package/dist/tools/definitions/follow-up-funnel-test.js +4 -0
  81. package/dist/tools/definitions/follow-up-funnel-test.js.map +1 -1
  82. package/dist/tools/definitions/follow-up-setup.js +3 -0
  83. package/dist/tools/definitions/follow-up-setup.js.map +1 -1
  84. package/dist/tools/definitions/follow-up.d.ts +2 -1
  85. package/dist/tools/definitions/follow-up.js +11 -0
  86. package/dist/tools/definitions/follow-up.js.map +1 -1
  87. package/dist/tools/definitions/getcourse-anchor-refresh.d.ts +3 -0
  88. package/dist/tools/definitions/getcourse-anchor-refresh.js +29 -2
  89. package/dist/tools/definitions/getcourse-anchor-refresh.js.map +1 -1
  90. package/dist/tools/definitions/getcourse-cold-welcome.d.ts +12 -2
  91. package/dist/tools/definitions/getcourse-cold-welcome.js +79 -4
  92. package/dist/tools/definitions/getcourse-cold-welcome.js.map +1 -1
  93. package/dist/tools/definitions/getcourse-wave.js +14 -0
  94. package/dist/tools/definitions/getcourse-wave.js.map +1 -1
  95. package/dist/tools/definitions/help.d.ts +8 -0
  96. package/dist/tools/definitions/help.js +219 -0
  97. package/dist/tools/definitions/help.js.map +1 -0
  98. package/dist/tools/definitions/knowledge.d.ts +27 -5
  99. package/dist/tools/definitions/knowledge.js +200 -33
  100. package/dist/tools/definitions/knowledge.js.map +1 -1
  101. package/dist/tools/definitions/link-tracking.js +9 -0
  102. package/dist/tools/definitions/link-tracking.js.map +1 -1
  103. package/dist/tools/definitions/model-comparison.js +6 -0
  104. package/dist/tools/definitions/model-comparison.js.map +1 -1
  105. package/dist/tools/definitions/operational-overview.d.ts +3 -0
  106. package/dist/tools/definitions/operational-overview.js +23 -0
  107. package/dist/tools/definitions/operational-overview.js.map +1 -0
  108. package/dist/tools/definitions/operator-workflow.d.ts +20 -0
  109. package/dist/tools/definitions/operator-workflow.js +114 -0
  110. package/dist/tools/definitions/operator-workflow.js.map +1 -0
  111. package/dist/tools/definitions/platform-setup.d.ts +26 -3
  112. package/dist/tools/definitions/platform-setup.js +209 -7
  113. package/dist/tools/definitions/platform-setup.js.map +1 -1
  114. package/dist/tools/definitions/scheduled-tasks.js +2 -0
  115. package/dist/tools/definitions/scheduled-tasks.js.map +1 -1
  116. package/dist/tools/definitions/session.js +103 -5
  117. package/dist/tools/definitions/session.js.map +1 -1
  118. package/dist/tools/definitions/shared.d.ts +154 -11
  119. package/dist/tools/definitions/shared.js +67 -9
  120. package/dist/tools/definitions/shared.js.map +1 -1
  121. package/dist/tools/definitions/task-state.d.ts +76 -0
  122. package/dist/tools/definitions/task-state.js +301 -0
  123. package/dist/tools/definitions/task-state.js.map +1 -0
  124. package/dist/tools/definitions/trigger-contact-claims.js +2 -0
  125. package/dist/tools/definitions/trigger-contact-claims.js.map +1 -1
  126. package/dist/tools/definitions.d.ts +273 -31
  127. package/dist/tools/definitions.js +12 -0
  128. package/dist/tools/definitions.js.map +1 -1
  129. package/dist/tools/description-localization.d.ts +2 -0
  130. package/dist/tools/description-localization.js +46 -0
  131. package/dist/tools/description-localization.js.map +1 -0
  132. package/dist/tools/incomplete-list.d.ts +23 -0
  133. package/dist/tools/incomplete-list.js +39 -0
  134. package/dist/tools/incomplete-list.js.map +1 -0
  135. package/dist/tools/inventory.d.ts +10 -0
  136. package/dist/tools/inventory.js +49 -0
  137. package/dist/tools/inventory.js.map +1 -0
  138. package/dist/tools/registry-mapping-cases-core.js +197 -2
  139. package/dist/tools/registry-mapping-cases-core.js.map +1 -1
  140. package/dist/tools/registry-mapping-cases-platform.js +69 -0
  141. package/dist/tools/registry-mapping-cases-platform.js.map +1 -1
  142. package/dist/tools/registry.d.ts +2 -0
  143. package/dist/tools/registry.js +60 -8
  144. package/dist/tools/registry.js.map +1 -1
  145. package/dist/tools/result-envelope.d.ts +46 -0
  146. package/dist/tools/result-envelope.js +184 -0
  147. package/dist/tools/result-envelope.js.map +1 -0
  148. package/dist/tools/result.d.ts +41 -3
  149. package/dist/tools/result.js +229 -27
  150. package/dist/tools/result.js.map +1 -1
  151. package/dist/tools/tool-title.d.ts +2 -0
  152. package/dist/tools/tool-title.js +12 -0
  153. package/dist/tools/tool-title.js.map +1 -0
  154. package/dist/tools/toolsets.d.ts +37 -0
  155. package/dist/tools/toolsets.js +64 -0
  156. package/dist/tools/toolsets.js.map +1 -0
  157. package/dist/tools/verify-with.d.ts +5 -0
  158. package/dist/tools/verify-with.js +36 -0
  159. package/dist/tools/verify-with.js.map +1 -0
  160. package/dist/types/api-contract.gen.d.ts +1433 -74
  161. package/dist/utils/logger.d.ts +11 -0
  162. package/dist/utils/logger.js +64 -8
  163. package/dist/utils/logger.js.map +1 -1
  164. package/docs/agent-usage-guide.full.ru.md +20 -15
  165. package/docs/agent-usage-guide.ru.md +29 -16
  166. package/docs/async-operation-lifecycle.md +46 -0
  167. package/docs/connect.ru.md +120 -0
  168. package/docs/evals/model-behavior-scorecard.md +80 -0
  169. package/docs/failure-semantics.md +56 -0
  170. package/docs/help-navigation.md +48 -0
  171. package/docs/host-compatibility-matrix.md +153 -0
  172. package/docs/host-setup.md +22 -6
  173. package/docs/operation-coverage.md +114 -0
  174. package/docs/pii-policy.md +46 -0
  175. package/docs/response-size-budget.md +150 -0
  176. package/docs/task-state.md +58 -0
  177. package/docs/tool-effects.md +46 -0
  178. package/docs/tool-surface.md +91 -0
  179. package/package.json +6 -2
  180. package/scripts/model-eval-server.js +213 -0
  181. package/scripts/probe-mcp-protocol.js +134 -0
  182. package/scripts/run-model-eval.js +447 -0
@@ -3,6 +3,23 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export interface paths {
6
+ "/api/v2/agents/{agentId}/readiness": {
7
+ parameters: {
8
+ query?: never;
9
+ header?: never;
10
+ path?: never;
11
+ cookie?: never;
12
+ };
13
+ /** Доказательная готовность выбранного агента и текущей версии конфигурации */
14
+ get: operations["AgentReadinessController_get"];
15
+ put?: never;
16
+ post?: never;
17
+ delete?: never;
18
+ options?: never;
19
+ head?: never;
20
+ patch?: never;
21
+ trace?: never;
22
+ };
6
23
  "/api/v2/auth/login": {
7
24
  parameters: {
8
25
  query?: never;
@@ -235,8 +252,8 @@ export interface paths {
235
252
  /** @description PKCE S256 challenge — SHA256(code_verifier) base64url-encoded */
236
253
  code_challenge: string;
237
254
  code_challenge_method: "S256";
238
- /** @description Requested scopes: base `mcp:*` plus any subset of the optional scopes, in the canonical order `mcp:platform-setup`, `mcp:funnel-test`, `read:campaigns`, `launch:campaigns`. `mcp:*` enables PromptHub/ICP/Sandbox/Knowledge tools; `mcp:platform-setup` enables Platform Setup Bridge mutations; `mcp:funnel-test` permits frozen-plan funnel tests that can send real messages; `read:campaigns` covers cold-welcome preview and broadcast reads; `launch:campaigns` covers cold-welcome/broadcast launches. `besales-mcp connect` always requests the widest string. INVARIANT: a new scope is APPENDED to the optional list — never swapped in for an existing one, or every reconnect silently narrows live keys. */
239
- scope: "mcp:*" | "mcp:* mcp:platform-setup" | "mcp:* mcp:funnel-test" | "mcp:* mcp:platform-setup mcp:funnel-test" | "mcp:* read:campaigns" | "mcp:* mcp:platform-setup read:campaigns" | "mcp:* mcp:funnel-test read:campaigns" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns" | "mcp:* launch:campaigns" | "mcp:* mcp:platform-setup launch:campaigns" | "mcp:* mcp:funnel-test launch:campaigns" | "mcp:* mcp:platform-setup mcp:funnel-test launch:campaigns" | "mcp:* read:campaigns launch:campaigns" | "mcp:* mcp:platform-setup read:campaigns launch:campaigns" | "mcp:* mcp:funnel-test read:campaigns launch:campaigns" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns launch:campaigns";
255
+ /** @description Requested scopes: base `mcp:*` plus any subset of the optional scopes, in the canonical order `mcp:platform-setup`, `mcp:funnel-test`, `read:campaigns`, `launch:campaigns`, `read:contacts`, `write:operators`. `mcp:*` enables PromptHub/ICP/Sandbox/Knowledge tools; `mcp:platform-setup` enables Platform Setup Bridge mutations; `mcp:funnel-test` permits frozen-plan funnel tests that can send real messages; `read:campaigns` covers cold-welcome preview and broadcast reads; `launch:campaigns` covers cold-welcome/broadcast launches; `read:contacts` covers contact search, cards and safe diagnostics; `write:operators` permits a CAS-protected local workspace-operator assignment without sending messages. `besales-mcp connect` always requests the widest string. INVARIANT: a new scope is APPENDED to the optional list — never swapped in for an existing one, or every reconnect silently narrows live keys. */
256
+ scope: "mcp:*" | "mcp:* mcp:platform-setup" | "mcp:* mcp:funnel-test" | "mcp:* mcp:platform-setup mcp:funnel-test" | "mcp:* read:campaigns" | "mcp:* mcp:platform-setup read:campaigns" | "mcp:* mcp:funnel-test read:campaigns" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns" | "mcp:* launch:campaigns" | "mcp:* mcp:platform-setup launch:campaigns" | "mcp:* mcp:funnel-test launch:campaigns" | "mcp:* mcp:platform-setup mcp:funnel-test launch:campaigns" | "mcp:* read:campaigns launch:campaigns" | "mcp:* mcp:platform-setup read:campaigns launch:campaigns" | "mcp:* mcp:funnel-test read:campaigns launch:campaigns" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns launch:campaigns" | "mcp:* read:contacts" | "mcp:* mcp:platform-setup read:contacts" | "mcp:* mcp:funnel-test read:contacts" | "mcp:* mcp:platform-setup mcp:funnel-test read:contacts" | "mcp:* read:campaigns read:contacts" | "mcp:* mcp:platform-setup read:campaigns read:contacts" | "mcp:* mcp:funnel-test read:campaigns read:contacts" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns read:contacts" | "mcp:* launch:campaigns read:contacts" | "mcp:* mcp:platform-setup launch:campaigns read:contacts" | "mcp:* mcp:funnel-test launch:campaigns read:contacts" | "mcp:* mcp:platform-setup mcp:funnel-test launch:campaigns read:contacts" | "mcp:* read:campaigns launch:campaigns read:contacts" | "mcp:* mcp:platform-setup read:campaigns launch:campaigns read:contacts" | "mcp:* mcp:funnel-test read:campaigns launch:campaigns read:contacts" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns launch:campaigns read:contacts" | "mcp:* write:operators" | "mcp:* mcp:platform-setup write:operators" | "mcp:* mcp:funnel-test write:operators" | "mcp:* mcp:platform-setup mcp:funnel-test write:operators" | "mcp:* read:campaigns write:operators" | "mcp:* mcp:platform-setup read:campaigns write:operators" | "mcp:* mcp:funnel-test read:campaigns write:operators" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns write:operators" | "mcp:* launch:campaigns write:operators" | "mcp:* mcp:platform-setup launch:campaigns write:operators" | "mcp:* mcp:funnel-test launch:campaigns write:operators" | "mcp:* mcp:platform-setup mcp:funnel-test launch:campaigns write:operators" | "mcp:* read:campaigns launch:campaigns write:operators" | "mcp:* mcp:platform-setup read:campaigns launch:campaigns write:operators" | "mcp:* mcp:funnel-test read:campaigns launch:campaigns write:operators" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns launch:campaigns write:operators" | "mcp:* read:contacts write:operators" | "mcp:* mcp:platform-setup read:contacts write:operators" | "mcp:* mcp:funnel-test read:contacts write:operators" | "mcp:* mcp:platform-setup mcp:funnel-test read:contacts write:operators" | "mcp:* read:campaigns read:contacts write:operators" | "mcp:* mcp:platform-setup read:campaigns read:contacts write:operators" | "mcp:* mcp:funnel-test read:campaigns read:contacts write:operators" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns read:contacts write:operators" | "mcp:* launch:campaigns read:contacts write:operators" | "mcp:* mcp:platform-setup launch:campaigns read:contacts write:operators" | "mcp:* mcp:funnel-test launch:campaigns read:contacts write:operators" | "mcp:* mcp:platform-setup mcp:funnel-test launch:campaigns read:contacts write:operators" | "mcp:* read:campaigns launch:campaigns read:contacts write:operators" | "mcp:* mcp:platform-setup read:campaigns launch:campaigns read:contacts write:operators" | "mcp:* mcp:funnel-test read:campaigns launch:campaigns read:contacts write:operators" | "mcp:* mcp:platform-setup mcp:funnel-test read:campaigns launch:campaigns read:contacts write:operators";
240
257
  };
241
258
  header?: never;
242
259
  path?: never;
@@ -450,6 +467,10 @@ export interface paths {
450
467
  api_key: string;
451
468
  /** Format: uuid */
452
469
  workspace_id: string;
470
+ /** @description Workspace name captured at token exchange for local human-readable selection */
471
+ workspace_name: string;
472
+ /** @description Masked account email (for example, o***@example.com); never contains the raw email */
473
+ account_label: string | null;
453
474
  /**
454
475
  * Format: date-time
455
476
  * @description API key expiration (90 days from now)
@@ -477,6 +498,59 @@ export interface paths {
477
498
  patch?: never;
478
499
  trace?: never;
479
500
  };
501
+ "/api/v2/auth/mcp-context": {
502
+ parameters: {
503
+ query?: never;
504
+ header?: never;
505
+ path?: never;
506
+ cookie?: never;
507
+ };
508
+ /**
509
+ * Read safe labels for the current MCP connection
510
+ * @description Lightweight alternative to workspace overview for local workspace selection.
511
+ */
512
+ get: {
513
+ parameters: {
514
+ query?: never;
515
+ header?: never;
516
+ path?: never;
517
+ cookie?: never;
518
+ };
519
+ requestBody?: never;
520
+ responses: {
521
+ /** @description Current workspace and masked account label */
522
+ 200: {
523
+ headers: {
524
+ [name: string]: unknown;
525
+ };
526
+ content: {
527
+ "application/json": {
528
+ /** Format: uuid */
529
+ workspace_id: string;
530
+ workspace_name: string;
531
+ account_label: string | null;
532
+ /** @description Effective scopes of this exact MCP key */
533
+ scopes: string[];
534
+ };
535
+ };
536
+ };
537
+ /** @description MCP key is missing, revoked, or belongs to another workspace */
538
+ 403: {
539
+ headers: {
540
+ [name: string]: unknown;
541
+ };
542
+ content?: never;
543
+ };
544
+ };
545
+ };
546
+ put?: never;
547
+ post?: never;
548
+ delete?: never;
549
+ options?: never;
550
+ head?: never;
551
+ patch?: never;
552
+ trace?: never;
553
+ };
480
554
  "/api/v2/auth/mcp-connections": {
481
555
  parameters: {
482
556
  query?: never;
@@ -890,6 +964,28 @@ export interface paths {
890
964
  patch?: never;
891
965
  trace?: never;
892
966
  };
967
+ "/api/v2/workspaces/{workspaceId}/navigation": {
968
+ parameters: {
969
+ query?: never;
970
+ header?: never;
971
+ path?: never;
972
+ cookie?: never;
973
+ };
974
+ get?: never;
975
+ put?: never;
976
+ /**
977
+ * Выбрать один следующий шаг по намерению и живому overview
978
+ * @description Read-only навигатор. Учитывает тип бота, уже выбранные объекты и текущее состояние
979
+ * workspace. Возвращает конкретный MCP tool, аргументы, необходимый ввод человека и способ
980
+ * проверки; сам мутацию не выполняет и readiness не подменяет.
981
+ */
982
+ post: operations["navigateWorkspaceTask"];
983
+ delete?: never;
984
+ options?: never;
985
+ head?: never;
986
+ patch?: never;
987
+ trace?: never;
988
+ };
893
989
  "/api/v2/setup-sessions": {
894
990
  parameters: {
895
991
  query?: never;
@@ -5422,7 +5518,10 @@ export interface paths {
5422
5518
  /** Sanitized setup context with readiness flags */
5423
5519
  get: {
5424
5520
  parameters: {
5425
- query?: never;
5521
+ query?: {
5522
+ /** @description Секции снимка через запятую; agent_summaries исключает полный промпт. */
5523
+ sections?: string;
5524
+ };
5426
5525
  header?: never;
5427
5526
  path: {
5428
5527
  platformId: components["parameters"]["PlatformIdPath"];
@@ -5449,6 +5548,49 @@ export interface paths {
5449
5548
  patch?: never;
5450
5549
  trace?: never;
5451
5550
  };
5551
+ "/api/v2/platforms/{platformId}/setup/trigger-action-catalog": {
5552
+ parameters: {
5553
+ query?: never;
5554
+ header?: never;
5555
+ path?: never;
5556
+ cookie?: never;
5557
+ };
5558
+ /**
5559
+ * Current trigger action schemas, examples and dependencies
5560
+ * @description Каталог строится из боевого `CreateTriggerActionDto` и `TRIGGER_ACTION_CONFIG`.
5561
+ * `actionType` позволяет запросить один тип без загрузки всех схем.
5562
+ */
5563
+ get: {
5564
+ parameters: {
5565
+ query?: {
5566
+ actionType?: string;
5567
+ };
5568
+ header?: never;
5569
+ path: {
5570
+ platformId: components["parameters"]["PlatformIdPath"];
5571
+ };
5572
+ cookie?: never;
5573
+ };
5574
+ requestBody?: never;
5575
+ responses: {
5576
+ 200: {
5577
+ headers: {
5578
+ [name: string]: unknown;
5579
+ };
5580
+ content: {
5581
+ "application/json": components["schemas"]["TriggerActionCatalogResponse"];
5582
+ };
5583
+ };
5584
+ };
5585
+ };
5586
+ put?: never;
5587
+ post?: never;
5588
+ delete?: never;
5589
+ options?: never;
5590
+ head?: never;
5591
+ patch?: never;
5592
+ trace?: never;
5593
+ };
5452
5594
  "/api/v2/platforms/{platformId}/agents": {
5453
5595
  parameters: {
5454
5596
  query?: never;
@@ -5459,7 +5601,14 @@ export interface paths {
5459
5601
  /** List agents attached to existing platform */
5460
5602
  get: {
5461
5603
  parameters: {
5462
- query?: never;
5604
+ query?: {
5605
+ /** @description Размер страницы; без него список отдаётся целиком. */
5606
+ limit?: number;
5607
+ /** @description Курсор из предыдущего ответа. */
5608
+ cursor?: string;
5609
+ /** @description Поиск без учёта регистра по name или displayName. */
5610
+ q?: string;
5611
+ };
5463
5612
  header?: never;
5464
5613
  path: {
5465
5614
  platformId: components["parameters"]["PlatformIdPath"];
@@ -6340,6 +6489,26 @@ export interface paths {
6340
6489
  patch?: never;
6341
6490
  trace?: never;
6342
6491
  };
6492
+ "/api/v2/workspaces/{workspaceId}/getcourse-cold-welcome/touch-history/{gcUserId}": {
6493
+ parameters: {
6494
+ query?: never;
6495
+ header?: never;
6496
+ path?: never;
6497
+ cookie?: never;
6498
+ };
6499
+ /**
6500
+ * What we have already sent this person, and by what right
6501
+ * @description Three sources with DIFFERENT keys, joined into one answer. `touches` is the touch journal: a RIGHT taken BEFORE transport, so a row exists even for an attempt that never sent (UNKNOWN, stuck CLAIMED). `sends` is the recipient registry: written AFTER delivery and best-effort, so its absence does NOT prove non-delivery. `firstWelcomeAt` is the earliest mark across the person cards. Do not add `touches` and `sends` together — they answer different questions.
6502
+ */
6503
+ get: operations["getContactTouchHistory"];
6504
+ put?: never;
6505
+ post?: never;
6506
+ delete?: never;
6507
+ options?: never;
6508
+ head?: never;
6509
+ patch?: never;
6510
+ trace?: never;
6511
+ };
6343
6512
  "/api/v2/workspaces/{workspaceId}/getcourse-cold-welcome/preview": {
6344
6513
  parameters: {
6345
6514
  query?: never;
@@ -6537,6 +6706,49 @@ export interface paths {
6537
6706
  patch?: never;
6538
6707
  trace?: never;
6539
6708
  };
6709
+ "/api/v2/workspaces/{workspaceId}/getcourse-anchor-refresh/{correlationId}": {
6710
+ parameters: {
6711
+ query?: never;
6712
+ header?: never;
6713
+ path?: never;
6714
+ cookie?: never;
6715
+ };
6716
+ /**
6717
+ * Статус фонового перечитывания календарных якорей
6718
+ * @description Retained 24 часа. STALLED означает, что фоновый процесс больше не владеет lock; часть дат могла быть переписана, поэтому перед повтором нужен аудит по correlationId. Отмены нет: уже выполненные частичные перезаписи необратимы. Scope `read:campaigns`.
6719
+ */
6720
+ get: {
6721
+ parameters: {
6722
+ query?: never;
6723
+ header?: never;
6724
+ path: {
6725
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
6726
+ correlationId: string;
6727
+ };
6728
+ cookie?: never;
6729
+ };
6730
+ requestBody?: never;
6731
+ responses: {
6732
+ /** @description Состояние и terminal result/error */
6733
+ 200: {
6734
+ headers: {
6735
+ [name: string]: unknown;
6736
+ };
6737
+ content: {
6738
+ "application/json": components["schemas"]["GetCourseAnchorRefreshStatusResponse"];
6739
+ };
6740
+ };
6741
+ 404: components["responses"]["NotFound"];
6742
+ };
6743
+ };
6744
+ put?: never;
6745
+ post?: never;
6746
+ delete?: never;
6747
+ options?: never;
6748
+ head?: never;
6749
+ patch?: never;
6750
+ trace?: never;
6751
+ };
6540
6752
  "/api/v2/workspaces/{workspaceId}/getcourse-cold-welcome/batch": {
6541
6753
  parameters: {
6542
6754
  query?: never;
@@ -7788,6 +8000,13 @@ export interface paths {
7788
8000
  "application/json": components["schemas"]["PlatformSetupMutationResult"];
7789
8001
  };
7790
8002
  };
8003
+ /** @description Название триггера уже занято у этого агента */
8004
+ 409: {
8005
+ headers: {
8006
+ [name: string]: unknown;
8007
+ };
8008
+ content?: never;
8009
+ };
7791
8010
  };
7792
8011
  };
7793
8012
  delete?: never;
@@ -7862,6 +8081,13 @@ export interface paths {
7862
8081
  "application/json": components["schemas"]["PlatformSetupMutationResult"];
7863
8082
  };
7864
8083
  };
8084
+ /** @description Название триггера уже занято у этого агента */
8085
+ 409: {
8086
+ headers: {
8087
+ [name: string]: unknown;
8088
+ };
8089
+ content?: never;
8090
+ };
7865
8091
  };
7866
8092
  };
7867
8093
  trace?: never;
@@ -8774,8 +9000,8 @@ export interface paths {
8774
9000
  get?: never;
8775
9001
  put?: never;
8776
9002
  /**
8777
- * Создать External API канал (provisioning)
8778
- * @description Возвращает apiKey + webhookSecret ОДИН раз. Scope `mcp:platform-setup` (или UI JWT).
9003
+ * Создать External API канал и выдать browser-handoff ссылку
9004
+ * @description Секреты не проходят через API/MCP-ответ. Scope `mcp:platform-setup` (или UI JWT).
8779
9005
  */
8780
9006
  post: {
8781
9007
  parameters: {
@@ -8792,13 +9018,13 @@ export interface paths {
8792
9018
  };
8793
9019
  };
8794
9020
  responses: {
8795
- /** @description Канал создан (ключ и секрет показываются один раз) */
9021
+ /** @description Канал создан; credentials покажет вошедшему человеку одноразовая страница */
8796
9022
  201: {
8797
9023
  headers: {
8798
9024
  [name: string]: unknown;
8799
9025
  };
8800
9026
  content: {
8801
- "application/json": components["schemas"]["ProvisionedExternalApiChannel"];
9027
+ "application/json": components["schemas"]["ExternalApiChannelCreated"];
8802
9028
  };
8803
9029
  };
8804
9030
  };
@@ -8818,7 +9044,7 @@ export interface paths {
8818
9044
  };
8819
9045
  get?: never;
8820
9046
  put?: never;
8821
- /** Перевыпустить bsl-ключ канала (старый отзывается) */
9047
+ /** Выдать browser-handoff ссылку на перевыпуск bsl-ключа */
8822
9048
  post: {
8823
9049
  parameters: {
8824
9050
  query?: never;
@@ -8831,15 +9057,13 @@ export interface paths {
8831
9057
  };
8832
9058
  requestBody?: never;
8833
9059
  responses: {
8834
- /** @description Новый ключ (показывается один раз) */
9060
+ /** @description Ротация произойдёт только при открытии одноразовой страницы */
8835
9061
  201: {
8836
9062
  headers: {
8837
9063
  [name: string]: unknown;
8838
9064
  };
8839
9065
  content: {
8840
- "application/json": {
8841
- apiKey: string;
8842
- };
9066
+ "application/json": components["schemas"]["IssuedCredentialReveal"];
8843
9067
  };
8844
9068
  };
8845
9069
  };
@@ -8859,7 +9083,7 @@ export interface paths {
8859
9083
  };
8860
9084
  get?: never;
8861
9085
  put?: never;
8862
- /** Перевыпустить webhook-secret канала */
9086
+ /** Выдать browser-handoff ссылку на замену webhook-secret */
8863
9087
  post: {
8864
9088
  parameters: {
8865
9089
  query?: never;
@@ -8872,15 +9096,13 @@ export interface paths {
8872
9096
  };
8873
9097
  requestBody?: never;
8874
9098
  responses: {
8875
- /** @description Новый секрет (показывается один раз) */
9099
+ /** @description Замена произойдёт только при открытии одноразовой страницы */
8876
9100
  201: {
8877
9101
  headers: {
8878
9102
  [name: string]: unknown;
8879
9103
  };
8880
9104
  content: {
8881
- "application/json": {
8882
- webhookSecret: string;
8883
- };
9105
+ "application/json": components["schemas"]["IssuedCredentialReveal"];
8884
9106
  };
8885
9107
  };
8886
9108
  };
@@ -9158,6 +9380,81 @@ export interface paths {
9158
9380
  patch?: never;
9159
9381
  trace?: never;
9160
9382
  };
9383
+ "/api/v2/contacts/{contactId}/diagnostics": {
9384
+ parameters: {
9385
+ query?: never;
9386
+ header?: never;
9387
+ path?: never;
9388
+ cookie?: never;
9389
+ };
9390
+ /**
9391
+ * Диагностика причин молчания, operator workflow, действий и доставки
9392
+ * @description MCP-only read: возвращает метаданные и сохранённые evidence без тел сообщений, аргументов/результатов инструментов и raw error text. Отсутствующий production RAG trace помечается unknown, а не нулём.
9393
+ */
9394
+ get: {
9395
+ parameters: {
9396
+ query?: {
9397
+ messageId?: string;
9398
+ };
9399
+ header?: never;
9400
+ path: {
9401
+ contactId: string;
9402
+ };
9403
+ cookie?: never;
9404
+ };
9405
+ requestBody?: never;
9406
+ responses: {
9407
+ 200: {
9408
+ headers: {
9409
+ [name: string]: unknown;
9410
+ };
9411
+ content: {
9412
+ "application/json": {
9413
+ contact: {
9414
+ [key: string]: unknown;
9415
+ };
9416
+ platform: {
9417
+ [key: string]: unknown;
9418
+ } | null;
9419
+ message: {
9420
+ [key: string]: unknown;
9421
+ } | null;
9422
+ agent: {
9423
+ [key: string]: unknown;
9424
+ } | null;
9425
+ operatorEvents: {
9426
+ [key: string]: unknown;
9427
+ }[];
9428
+ triggerExecutions: {
9429
+ [key: string]: unknown;
9430
+ }[];
9431
+ toolExecutions: {
9432
+ [key: string]: unknown;
9433
+ }[];
9434
+ evidence: {
9435
+ [key: string]: unknown;
9436
+ };
9437
+ limitations: string[];
9438
+ };
9439
+ };
9440
+ };
9441
+ /** @description Контакт или выбранное сообщение не найдено в workspace */
9442
+ 404: {
9443
+ headers: {
9444
+ [name: string]: unknown;
9445
+ };
9446
+ content?: never;
9447
+ };
9448
+ };
9449
+ };
9450
+ put?: never;
9451
+ post?: never;
9452
+ delete?: never;
9453
+ options?: never;
9454
+ head?: never;
9455
+ patch?: never;
9456
+ trace?: never;
9457
+ };
9161
9458
  "/api/v2/contacts/import": {
9162
9459
  parameters: {
9163
9460
  query?: never;
@@ -9246,21 +9543,63 @@ export interface paths {
9246
9543
  patch?: never;
9247
9544
  trace?: never;
9248
9545
  };
9249
- "/api/v2/contacts/export": {
9546
+ "/api/v2/workspaces/{workspaceId}/getcourse-contact-imports/{jobId}": {
9250
9547
  parameters: {
9251
9548
  query?: never;
9252
9549
  header?: never;
9253
9550
  path?: never;
9254
9551
  cookie?: never;
9255
9552
  };
9256
- get?: never;
9257
- put?: never;
9258
- /** Export contacts by filter */
9259
- post: {
9553
+ /**
9554
+ * Статус импорта GetCourse-контактов или одиночной cold-welcome отправки
9555
+ * @description Возвращает только ImportJob типа GETCOURSE_CONTACTS в указанном workspace. PARTIAL и FAILED выводятся из terminal counters. Scope `launch:campaigns`, потому что этот же ключ запускает обе операции и `mcp:*` намеренно не включает массовое чтение контактов.
9556
+ */
9557
+ get: {
9260
9558
  parameters: {
9261
9559
  query?: never;
9262
9560
  header?: never;
9263
- path?: never;
9561
+ path: {
9562
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
9563
+ jobId: string;
9564
+ };
9565
+ cookie?: never;
9566
+ };
9567
+ requestBody?: never;
9568
+ responses: {
9569
+ 200: {
9570
+ headers: {
9571
+ [name: string]: unknown;
9572
+ };
9573
+ content: {
9574
+ "application/json": components["schemas"]["GetCourseContactImportStatusResponse"];
9575
+ };
9576
+ };
9577
+ 404: components["responses"]["NotFound"];
9578
+ };
9579
+ };
9580
+ put?: never;
9581
+ post?: never;
9582
+ delete?: never;
9583
+ options?: never;
9584
+ head?: never;
9585
+ patch?: never;
9586
+ trace?: never;
9587
+ };
9588
+ "/api/v2/contacts/export": {
9589
+ parameters: {
9590
+ query?: never;
9591
+ header?: never;
9592
+ path?: never;
9593
+ cookie?: never;
9594
+ };
9595
+ get?: never;
9596
+ put?: never;
9597
+ /** Export contacts by filter */
9598
+ post: {
9599
+ parameters: {
9600
+ query?: never;
9601
+ header?: never;
9602
+ path?: never;
9264
9603
  cookie?: never;
9265
9604
  };
9266
9605
  requestBody?: {
@@ -12402,6 +12741,71 @@ export interface paths {
12402
12741
  patch?: never;
12403
12742
  trace?: never;
12404
12743
  };
12744
+ "/api/v2/workspaces/{workspaceId}/workbooks/{workbookId}/sheets/read": {
12745
+ parameters: {
12746
+ query?: never;
12747
+ header?: never;
12748
+ path?: never;
12749
+ cookie?: never;
12750
+ };
12751
+ /**
12752
+ * Постранично прочитать диапазон листа без записи в знания
12753
+ * @description Inspect возвращает только sample. Этот endpoint читает поздние строки и колонки,
12754
+ * возвращает явные признаки продолжения и fingerprint страницы. Для Google Sheets
12755
+ * точные total могут быть неизвестны и тогда возвращаются null.
12756
+ */
12757
+ get: {
12758
+ parameters: {
12759
+ query?: {
12760
+ sheetTitle?: string;
12761
+ sheetGid?: number;
12762
+ sheetIndex?: number;
12763
+ rowOffset?: number;
12764
+ rowLimit?: number;
12765
+ columnOffset?: number;
12766
+ columnLimit?: number;
12767
+ };
12768
+ header?: never;
12769
+ path: {
12770
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
12771
+ workbookId: string;
12772
+ };
12773
+ cookie?: never;
12774
+ };
12775
+ requestBody?: never;
12776
+ responses: {
12777
+ 200: {
12778
+ headers: {
12779
+ [name: string]: unknown;
12780
+ };
12781
+ content: {
12782
+ "application/json": components["schemas"]["WorkbookSheetPage"];
12783
+ };
12784
+ };
12785
+ /** @description Селектор листа неоднозначен или не подходит типу книги */
12786
+ 400: {
12787
+ headers: {
12788
+ [name: string]: unknown;
12789
+ };
12790
+ content?: never;
12791
+ };
12792
+ /** @description SourceWorkbook */
12793
+ 404: {
12794
+ headers: {
12795
+ [name: string]: unknown;
12796
+ };
12797
+ content?: never;
12798
+ };
12799
+ };
12800
+ };
12801
+ put?: never;
12802
+ post?: never;
12803
+ delete?: never;
12804
+ options?: never;
12805
+ head?: never;
12806
+ patch?: never;
12807
+ trace?: never;
12808
+ };
12405
12809
  "/api/v2/workspaces/{workspaceId}/workbooks/{workbookId}/extract-amocrm-leads": {
12406
12810
  parameters: {
12407
12811
  query?: never;
@@ -12782,7 +13186,7 @@ export interface paths {
12782
13186
  put?: never;
12783
13187
  /**
12784
13188
  * Переиндексация knowledge space (re-embed Qa + KnowledgeChunk → Pinecone)
12785
- * @description Идемпотентная фоновая пересборка векторов из Postgres — восстанавливает поиск после рассинхрона Postgres↔Pinecone (v1.5 Increment 15). Возвращает job_id сразу; итог фоновой BullMQ-задачи `knowledge-namespace-reindex` — в логах воркера.
13189
+ * @description Идемпотентная фоновая пересборка векторов из Postgres — восстанавливает поиск после рассинхрона Postgres↔Pinecone (v1.5 Increment 15). Возвращает job_id сразу; итог фоновой BullMQ-задачи доступен через status endpoint в течение 24 часов.
12786
13190
  */
12787
13191
  post: {
12788
13192
  parameters: {
@@ -12816,6 +13220,44 @@ export interface paths {
12816
13220
  patch?: never;
12817
13221
  trace?: never;
12818
13222
  };
13223
+ "/api/v2/workspaces/{workspaceId}/knowledge-spaces/{knowledgeSpaceId}/reindex/status": {
13224
+ parameters: {
13225
+ query?: never;
13226
+ header?: never;
13227
+ path?: never;
13228
+ cookie?: never;
13229
+ };
13230
+ /** Статус фоновой переиндексации knowledge space */
13231
+ get: {
13232
+ parameters: {
13233
+ query?: never;
13234
+ header?: never;
13235
+ path: {
13236
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
13237
+ knowledgeSpaceId: string;
13238
+ };
13239
+ cookie?: never;
13240
+ };
13241
+ requestBody?: never;
13242
+ responses: {
13243
+ 200: {
13244
+ headers: {
13245
+ [name: string]: unknown;
13246
+ };
13247
+ content: {
13248
+ "application/json": components["schemas"]["AsyncJobStatusResponse"];
13249
+ };
13250
+ };
13251
+ };
13252
+ };
13253
+ put?: never;
13254
+ post?: never;
13255
+ delete?: never;
13256
+ options?: never;
13257
+ head?: never;
13258
+ patch?: never;
13259
+ trace?: never;
13260
+ };
12819
13261
  "/api/v2/workspaces/{workspaceId}/knowledge-spaces/{knowledgeSpaceId}/channel-links": {
12820
13262
  parameters: {
12821
13263
  query?: never;
@@ -13800,6 +14242,45 @@ export interface paths {
13800
14242
  patch?: never;
13801
14243
  trace?: never;
13802
14244
  };
14245
+ "/api/v2/workspaces/{workspaceId}/knowledge-spaces/{knowledgeSpaceId}/tables/{tableId}/reindex/status": {
14246
+ parameters: {
14247
+ query?: never;
14248
+ header?: never;
14249
+ path?: never;
14250
+ cookie?: never;
14251
+ };
14252
+ /** Статус фоновой переиндексации knowledge table */
14253
+ get: {
14254
+ parameters: {
14255
+ query?: never;
14256
+ header?: never;
14257
+ path: {
14258
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
14259
+ knowledgeSpaceId: string;
14260
+ tableId: string;
14261
+ };
14262
+ cookie?: never;
14263
+ };
14264
+ requestBody?: never;
14265
+ responses: {
14266
+ 200: {
14267
+ headers: {
14268
+ [name: string]: unknown;
14269
+ };
14270
+ content: {
14271
+ "application/json": components["schemas"]["AsyncJobStatusResponse"];
14272
+ };
14273
+ };
14274
+ };
14275
+ };
14276
+ put?: never;
14277
+ post?: never;
14278
+ delete?: never;
14279
+ options?: never;
14280
+ head?: never;
14281
+ patch?: never;
14282
+ trace?: never;
14283
+ };
13803
14284
  "/api/v2/workspaces/{workspaceId}/variables": {
13804
14285
  parameters: {
13805
14286
  query?: never;
@@ -19352,6 +19833,91 @@ export interface paths {
19352
19833
  patch?: never;
19353
19834
  trace?: never;
19354
19835
  };
19836
+ "/api/v2/workspaces/{workspaceId}/analytics/inbound/{report}": {
19837
+ parameters: {
19838
+ query?: never;
19839
+ header?: never;
19840
+ path?: never;
19841
+ cookie?: never;
19842
+ };
19843
+ /** Агрегаты органических входящих диалогов */
19844
+ get: operations["getInboundAnalytics"];
19845
+ put?: never;
19846
+ post?: never;
19847
+ delete?: never;
19848
+ options?: never;
19849
+ head?: never;
19850
+ patch?: never;
19851
+ trace?: never;
19852
+ };
19853
+ "/api/v2/workspaces/{workspaceId}/analytics/funnel/{report}": {
19854
+ parameters: {
19855
+ query?: never;
19856
+ header?: never;
19857
+ path?: never;
19858
+ cookie?: never;
19859
+ };
19860
+ /** Мета, сводка или недельные когорты воронки площадки */
19861
+ get: operations["getFunnelAnalytics"];
19862
+ put?: never;
19863
+ post?: never;
19864
+ delete?: never;
19865
+ options?: never;
19866
+ head?: never;
19867
+ patch?: never;
19868
+ trace?: never;
19869
+ };
19870
+ "/api/v2/workspaces/{workspaceId}/analytics/costs/{report}": {
19871
+ parameters: {
19872
+ query?: never;
19873
+ header?: never;
19874
+ path?: never;
19875
+ cookie?: never;
19876
+ };
19877
+ /** Фактический AI usage ledger и его разрезы */
19878
+ get: operations["getAiCosts"];
19879
+ put?: never;
19880
+ post?: never;
19881
+ delete?: never;
19882
+ options?: never;
19883
+ head?: never;
19884
+ patch?: never;
19885
+ trace?: never;
19886
+ };
19887
+ "/api/v2/workspaces/{workspaceId}/custom-reports": {
19888
+ parameters: {
19889
+ query?: never;
19890
+ header?: never;
19891
+ path?: never;
19892
+ cookie?: never;
19893
+ };
19894
+ /** Список сохранённых кастомных отчётов */
19895
+ get: operations["listCustomReports"];
19896
+ put?: never;
19897
+ post?: never;
19898
+ delete?: never;
19899
+ options?: never;
19900
+ head?: never;
19901
+ patch?: never;
19902
+ trace?: never;
19903
+ };
19904
+ "/api/v2/workspaces/{workspaceId}/custom-reports/{reportId}": {
19905
+ parameters: {
19906
+ query?: never;
19907
+ header?: never;
19908
+ path?: never;
19909
+ cookie?: never;
19910
+ };
19911
+ /** Определение сохранённого кастомного отчёта */
19912
+ get: operations["getCustomReport"];
19913
+ put?: never;
19914
+ post?: never;
19915
+ delete?: never;
19916
+ options?: never;
19917
+ head?: never;
19918
+ patch?: never;
19919
+ trace?: never;
19920
+ };
19355
19921
  "/api/v2/workspaces/{workspaceId}/custom-reports/{reportId}/report": {
19356
19922
  parameters: {
19357
19923
  query?: never;
@@ -19372,7 +19938,7 @@ export interface paths {
19372
19938
  patch?: never;
19373
19939
  trace?: never;
19374
19940
  };
19375
- "/api/v2/workspaces/{workspaceId}/custom-reports/{reportId}/drilldown": {
19941
+ "/api/v2/workspaces/{workspaceId}/operational-overview": {
19376
19942
  parameters: {
19377
19943
  query?: never;
19378
19944
  header?: never;
@@ -19380,10 +19946,10 @@ export interface paths {
19380
19946
  cookie?: never;
19381
19947
  };
19382
19948
  /**
19383
- * Контакты и сделки за числом сохранённой таблицы
19384
- * @description Возвращает конкретные исполнения, контакты или сделки за числовой ячейкой источников «Обзор», «Фоллоу-апы» и «Перс воронка». Сервер перечитывает определение отчёта и проверяет updatedAt; сводная передаёт полный путь строки. Snapshot и fingerprint обязательны только для personalized-источника. Для процентной колонки раскрывается фактический числитель.
19949
+ * Эксплуатационная сводка воркспейса
19950
+ * @description Возвращает состояние follow-up цепочек, расписаний и последних задач, безопасные метаданные ошибок действий и предупреждения с drill-down. Очередь операторов включается только когда effective scopes текущего вызова содержат read:conversations; иначе ответ явно сообщает missingScope.
19385
19951
  */
19386
- get: operations["getCustomReportDrilldown"];
19952
+ get: operations["getWorkspaceOperationalOverview"];
19387
19953
  put?: never;
19388
19954
  post?: never;
19389
19955
  delete?: never;
@@ -19392,30 +19958,105 @@ export interface paths {
19392
19958
  patch?: never;
19393
19959
  trace?: never;
19394
19960
  };
19395
- }
19396
- export type webhooks = Record<string, never>;
19397
- export interface components {
19398
- schemas: {
19399
- TriggerContactClaim: {
19400
- /** Format: uuid */
19401
- triggerId: string;
19402
- triggerName: string;
19403
- /** Format: uuid */
19404
- agentId: string;
19405
- agentName: string | null;
19406
- /** @enum {string} */
19407
- status: "IN_PROGRESS" | "COMPLETED";
19408
- /** Format: date-time */
19409
- claimedAt: string;
19410
- /** @description false у status=IN_PROGRESS — право держит владелец */
19411
- canReset: boolean;
19412
- /** @enum {string|null} */
19413
- blockedReason: "RUNNING" | null;
19414
- triggerIsEnabled: boolean;
19415
- /** @description Осталась ли включённой настройка «сработать один раз». Право переживает её выключение: тогда строка висит, но триггер срабатывает как обычный. */
19416
- stillOneTime: boolean;
19417
- };
19418
- TriggerContactClaimsPage: {
19961
+ "/api/v2/workspaces/{workspaceId}/workspace-operators": {
19962
+ parameters: {
19963
+ query?: never;
19964
+ header?: never;
19965
+ path?: never;
19966
+ cookie?: never;
19967
+ };
19968
+ /** Системные операторы Besales для фильтра и назначения */
19969
+ get: operations["listWorkspaceOperatorsForWorkflow"];
19970
+ put?: never;
19971
+ post?: never;
19972
+ delete?: never;
19973
+ options?: never;
19974
+ head?: never;
19975
+ patch?: never;
19976
+ trace?: never;
19977
+ };
19978
+ "/api/v2/workspaces/{workspaceId}/operator-queue": {
19979
+ parameters: {
19980
+ query?: never;
19981
+ header?: never;
19982
+ path?: never;
19983
+ cookie?: never;
19984
+ };
19985
+ /** Пагинированная очередь живых операторов */
19986
+ get: operations["listWorkspaceOperatorQueue"];
19987
+ put?: never;
19988
+ post?: never;
19989
+ delete?: never;
19990
+ options?: never;
19991
+ head?: never;
19992
+ patch?: never;
19993
+ trace?: never;
19994
+ };
19995
+ "/api/v2/workspaces/{workspaceId}/chats/{contactId}/operator-assignment": {
19996
+ parameters: {
19997
+ query?: never;
19998
+ header?: never;
19999
+ path?: never;
20000
+ cookie?: never;
20001
+ };
20002
+ /** Текущее назначение оператора и CAS-версия */
20003
+ get: operations["getWorkspaceOperatorAssignment"];
20004
+ put?: never;
20005
+ post?: never;
20006
+ delete?: never;
20007
+ options?: never;
20008
+ head?: never;
20009
+ /**
20010
+ * Назначить, переназначить или снять системного оператора
20011
+ * @description CAS-операция меняет только локальное назначение Besales. Она не меняет CRM operator, operatorStatus и не отправляет сообщение.
20012
+ */
20013
+ patch: operations["updateWorkspaceOperatorAssignment"];
20014
+ trace?: never;
20015
+ };
20016
+ "/api/v2/workspaces/{workspaceId}/custom-reports/{reportId}/drilldown": {
20017
+ parameters: {
20018
+ query?: never;
20019
+ header?: never;
20020
+ path?: never;
20021
+ cookie?: never;
20022
+ };
20023
+ /**
20024
+ * Контакты и сделки за числом сохранённой таблицы
20025
+ * @description Возвращает конкретные исполнения, контакты или сделки за числовой ячейкой источников «Обзор», «Фоллоу-апы» и «Перс воронка». Сервер перечитывает определение отчёта и проверяет updatedAt; сводная передаёт полный путь строки. Snapshot и fingerprint обязательны только для personalized-источника. Для процентной колонки раскрывается фактический числитель.
20026
+ */
20027
+ get: operations["getCustomReportDrilldown"];
20028
+ put?: never;
20029
+ post?: never;
20030
+ delete?: never;
20031
+ options?: never;
20032
+ head?: never;
20033
+ patch?: never;
20034
+ trace?: never;
20035
+ };
20036
+ }
20037
+ export type webhooks = Record<string, never>;
20038
+ export interface components {
20039
+ schemas: {
20040
+ TriggerContactClaim: {
20041
+ /** Format: uuid */
20042
+ triggerId: string;
20043
+ triggerName: string;
20044
+ /** Format: uuid */
20045
+ agentId: string;
20046
+ agentName: string | null;
20047
+ /** @enum {string} */
20048
+ status: "IN_PROGRESS" | "COMPLETED";
20049
+ /** Format: date-time */
20050
+ claimedAt: string;
20051
+ /** @description false у status=IN_PROGRESS — право держит владелец */
20052
+ canReset: boolean;
20053
+ /** @enum {string|null} */
20054
+ blockedReason: "RUNNING" | null;
20055
+ triggerIsEnabled: boolean;
20056
+ /** @description Осталась ли включённой настройка «сработать один раз». Право переживает её выключение: тогда строка висит, но триггер срабатывает как обычный. */
20057
+ stillOneTime: boolean;
20058
+ };
20059
+ TriggerContactClaimsPage: {
19419
20060
  claims: components["schemas"]["TriggerContactClaim"][];
19420
20061
  truncated: boolean;
19421
20062
  };
@@ -19469,6 +20110,125 @@ export interface components {
19469
20110
  dayOffset?: number;
19470
20111
  atTime?: string;
19471
20112
  };
20113
+ /** @description Pass-through ответа канонической UI-витрины. Конкретная форма зависит от report и сохраняется без пересчёта адаптером; nullable и unknown-поля имеют доменный смысл. */
20114
+ AnalyticsAggregateResponse: {
20115
+ [key: string]: unknown;
20116
+ };
20117
+ OperationalOverviewWarning: {
20118
+ /** @enum {string} */
20119
+ severity: "info" | "warning" | "critical";
20120
+ code: string;
20121
+ sourceType: string;
20122
+ sourceId: string;
20123
+ /** Format: date-time */
20124
+ occurredAt: string | null;
20125
+ reason: string;
20126
+ drilldown: {
20127
+ type: string;
20128
+ id: string;
20129
+ };
20130
+ };
20131
+ OperationalOverviewResponse: {
20132
+ /** Format: date-time */
20133
+ generatedAt: string;
20134
+ summary: {
20135
+ [key: string]: number;
20136
+ };
20137
+ followUp: {
20138
+ [key: string]: unknown;
20139
+ };
20140
+ schedules: {
20141
+ [key: string]: unknown;
20142
+ }[];
20143
+ jobs: {
20144
+ [key: string]: unknown;
20145
+ }[];
20146
+ actionErrors: {
20147
+ [key: string]: unknown;
20148
+ }[];
20149
+ operatorQueue: {
20150
+ [key: string]: unknown;
20151
+ };
20152
+ warnings: components["schemas"]["OperationalOverviewWarning"][];
20153
+ };
20154
+ WorkspaceOperatorOption: {
20155
+ /** Format: uuid */
20156
+ id: string;
20157
+ displayName: string | null;
20158
+ assignable: boolean;
20159
+ /** @enum {string} */
20160
+ operatorType: "WORKSPACE";
20161
+ };
20162
+ WorkspaceOperatorIdentity: {
20163
+ /** Format: uuid */
20164
+ id: string;
20165
+ displayName: string | null;
20166
+ };
20167
+ OperatorWorkflowEvidence: {
20168
+ /** Format: uuid */
20169
+ id: string;
20170
+ /** @enum {string} */
20171
+ eventType: "OPERATOR_TAKEOVER" | "FINISH_RESOLVED";
20172
+ /** Format: date-time */
20173
+ occurredAt: string;
20174
+ };
20175
+ WorkspaceOperatorAssignmentState: {
20176
+ /** Format: uuid */
20177
+ contactId: string;
20178
+ /** @enum {string|null} */
20179
+ status: "WAITING_OPERATOR" | "IN_PROGRESS" | "WAITING_CUSTOMER" | "RESOLVED" | null;
20180
+ /** Format: date-time */
20181
+ statusUpdatedAt: string | null;
20182
+ /** Format: uuid */
20183
+ workspaceOperatorId: string | null;
20184
+ /** Format: date-time */
20185
+ assignedAt: string | null;
20186
+ operatorDisplayName: string | null;
20187
+ workflowEvidence: components["schemas"]["OperatorWorkflowEvidence"] | null;
20188
+ };
20189
+ OperatorQueueResponse: {
20190
+ data: {
20191
+ [key: string]: unknown;
20192
+ }[];
20193
+ page: number;
20194
+ limit: number;
20195
+ total: number;
20196
+ hasMore: boolean;
20197
+ };
20198
+ UpdateWorkspaceOperatorAssignment: {
20199
+ /** Format: uuid */
20200
+ workspaceOperatorId: string | null;
20201
+ /** Format: uuid */
20202
+ expectedWorkspaceOperatorId: string | null;
20203
+ /** Format: date-time */
20204
+ expectedAssignedOperatorAt: string | null;
20205
+ };
20206
+ WorkspaceOperatorAssignmentResult: {
20207
+ changed: boolean;
20208
+ assignedOperator: components["schemas"]["WorkspaceOperatorIdentity"] | null;
20209
+ /** Format: date-time */
20210
+ assignedOperatorAt: string | null;
20211
+ };
20212
+ CustomReportDefinition: {
20213
+ /** Format: uuid */
20214
+ id: string;
20215
+ name: string;
20216
+ sourceKey: string;
20217
+ section: string;
20218
+ view: string;
20219
+ filters: {
20220
+ [key: string]: unknown;
20221
+ };
20222
+ dimensionValues: string[];
20223
+ rowDimensions: string[];
20224
+ metricKeys: string[];
20225
+ /** Format: date-time */
20226
+ archivedAt?: string | null;
20227
+ /** Format: date-time */
20228
+ createdAt?: string;
20229
+ /** Format: date-time */
20230
+ updatedAt: string;
20231
+ };
19472
20232
  CustomReportDataResponse: {
19473
20233
  metricKeys: string[];
19474
20234
  dimensionValues: string[];
@@ -19751,6 +20511,10 @@ export interface components {
19751
20511
  createdAfter?: string;
19752
20512
  contacts?: components["schemas"]["GetCourseColdWelcomeContact"][];
19753
20513
  channels?: components["schemas"]["GetCourseTransport"][];
20514
+ /** @description Метка сегмента запуска. Ею считается правило «этим сегментом человеку уже уходило»: без неё прогноз правил (policyForecast) по этому правилу структурно пуст, и ноль читается как «проверили, никого». Аудиторию метка не отбирает. */
20515
+ segment?: string;
20516
+ /** @description Разовый текст запуска — им считается правило «тот же текст не дважды» (журнал касаний ключуется отпечатком шаблона). Для запуска с сохранённой рассылкой не нужен: текст берётся из неё тем же резолвером, что на старте, включая посегментные тексты. */
20517
+ message?: string;
19754
20518
  /** @deprecated */
19755
20519
  channelsMode?: components["schemas"]["ColdWelcomeChannelsMode"];
19756
20520
  };
@@ -19761,6 +20525,23 @@ export interface components {
19761
20525
  */
19762
20526
  ColdWelcomeChannelsMode: "RESTRICT" | "ADD";
19763
20527
  GetCourseColdWelcomePreviewResponse: {
20528
+ /** @description ПРОГНОЗ ПРАВИЛ ОТПРАВКИ на момент запроса, а не обещание. Блокирует одна точка — пересчёт правил постранично вплотную к транспорту, и между предпросмотром и отправкой человек успевает зарегистрироваться на эфир или получить это же касание другим запуском. Причины ВЗАИМНО ИСКЛЮЧАЮТ друг друга (сервер возвращает первую сработавшую), поэтому сумма — это ЛЮДИ, а не срабатывания. Считается по МЕТКЕ и ТЕКСТУ запроса: без segment (и без message у запуска разовым текстом) соответствующие правила дают нули. */
20529
+ policyForecast?: {
20530
+ blockedBy: {
20531
+ /** @description Этим сегментом человеку уже уходило НАШЕЙ отправкой. Периметр строго наш (волна школы тем же ярлыком отправкой здесь не считается — иначе запрет накрыл бы 37 % отправок; замер прода 10.09.2026). */
20532
+ alreadySentSegment: number;
20533
+ /** @description Уже получал «Первое сообщение» — оно одноразово НА ЧЕЛОВЕКА. */
20534
+ alreadyGreeted: number;
20535
+ /** @description Идёт эпизод регистрации: приветствие ДОЛЖНЫ и не отдали либо подготовлен повторный вход на новый эфир. Считается ПО ЧЕЛОВЕКУ, без скоупа площадки. */
20536
+ activeEpisode: number;
20537
+ /** @description Тихий период: человека трогали (нашей отправкой либо шагом календарной цепочки) внутри окна. Окно резолвится настройками — перекрытие рассылки, затем площадка, затем воркспейс, затем 0. По умолчанию 0, то есть правило выключено, пока оператор его не выставит; рекомендация — 7 суток. Волна школы касанием НЕ считается. Расписания судятся своим cooldownDays. */
20538
+ cooldown: number;
20539
+ };
20540
+ /** @description Тот же ТЕКСТ уже занят в журнале касаний под ДРУГИМ ярлыком. Отдельно от blockedBy: это не правило владельца, а атомарное право — «тот же текст не дважды» держится строкой журнала, а не читающей проверкой. */
20541
+ touchClaimed: number;
20542
+ /** @description ИНФОРМАЦИЯ, а не запрет: этим же ярлыком человека рассылал ВНЕШНИЙ механизм — волна школы своими процессами либо шаблон Wazzup. Наш догон в мессенджерах уйдёт как обычно: так работает штатный процесс. В отсев это число НЕ входит. */
20543
+ externalWaveTouched: number;
20544
+ };
19764
20545
  /** @description Выбранные каналы, которых НЕТ в allowlist площадки: они не уедут ни в каком режиме. Чинится галочкой в настройках площадки, поэтому возвращаются ИМЕНАМИ, а не числом. */
19765
20546
  channelsNotAllowedByPlatform?: components["schemas"]["GetCourseTransport"][];
19766
20547
  /** @description Сколько ещё МОЖЕТ получить первое сообщение. */
@@ -19809,6 +20590,28 @@ export interface components {
19809
20590
  alreadyRunning: boolean;
19810
20591
  refreshableVariables: string[];
19811
20592
  };
20593
+ GetCourseAnchorRefreshStatusResponse: {
20594
+ correlationId: string;
20595
+ /** Format: uuid */
20596
+ platformId: string;
20597
+ /** @enum {string} */
20598
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "STALLED";
20599
+ result: {
20600
+ correlationId: string;
20601
+ contactsScanned: number;
20602
+ outcomes: {
20603
+ [key: string]: number;
20604
+ };
20605
+ changedByVariable: {
20606
+ [key: string]: number;
20607
+ };
20608
+ } | null;
20609
+ error: string | null;
20610
+ /** Format: date-time */
20611
+ startedAt: string;
20612
+ /** Format: date-time */
20613
+ finishedAt: string | null;
20614
+ };
19812
20615
  /** @description Ровно один источник текста (message ЛИБО mailingVariantId) и ровно одна аудитория (createdAfter ЛИБО contacts). */
19813
20616
  GetCourseColdWelcomeLaunchRequest: {
19814
20617
  /**
@@ -20181,6 +20984,32 @@ export interface components {
20181
20984
  } & {
20182
20985
  [key: string]: unknown;
20183
20986
  };
20987
+ TriggerActionCatalogItem: {
20988
+ actionType: string;
20989
+ title: string;
20990
+ configInputKey: string | null;
20991
+ responseRelation: string | null;
20992
+ configRequired: boolean;
20993
+ /** @enum {string} */
20994
+ requiredScope: "mcp:platform-setup";
20995
+ requiredRelations: string[];
20996
+ effect: string;
20997
+ verification: string;
20998
+ actionSchema: {
20999
+ [key: string]: unknown;
21000
+ };
21001
+ minimalExample: {
21002
+ [key: string]: unknown;
21003
+ };
21004
+ };
21005
+ TriggerActionCatalogResponse: {
21006
+ /** @enum {string} */
21007
+ source: "CreateTriggerActionDto+TRIGGER_ACTION_CONFIG";
21008
+ /** @enum {boolean} */
21009
+ complete: true;
21010
+ total: number;
21011
+ items: components["schemas"]["TriggerActionCatalogItem"][];
21012
+ };
20184
21013
  ConfirmableSetupMutation: {
20185
21014
  explicitConfirmation?: boolean;
20186
21015
  confirmationReason?: string;
@@ -20399,7 +21228,9 @@ export interface components {
20399
21228
  updatedAt?: string;
20400
21229
  };
20401
21230
  TriggerUpsertRequest: components["schemas"]["ConfirmableSetupMutation"] & {
21231
+ /** @description Название, уникальное в рамках агента. Потолок общий с формой интерфейса — канон AGENT_TRIGGER_NAME_MAX_LENGTH (ai-aniomaly/src/core/application/tools/constants/agent-trigger.constants.ts). */
20402
21232
  name?: string;
21233
+ /** @description Условие срабатывания; уходит в системный промпт агента целиком. Потолок общий с формой интерфейса — канон AGENT_TRIGGER_CONDITION_MAX_LENGTH (ai-aniomaly/src/core/application/tools/constants/agent-trigger.constants.ts). */
20403
21234
  condition?: string;
20404
21235
  isEnabled?: boolean;
20405
21236
  priority?: number;
@@ -20864,6 +21695,10 @@ export interface components {
20864
21695
  guardActiveSeries?: components["schemas"]["OutboundGuardMode"];
20865
21696
  guardActiveApplication?: components["schemas"]["OutboundGuardMode"];
20866
21697
  guardPaid?: components["schemas"]["OutboundGuardMode"];
21698
+ /** @description Quiet period in days after ANY touch OF OURS (a send or a calendar-chain follow-up step). Counted PER PERSON across the workspace; a school wave does NOT count as a touch (measured: the wide perimeter would have blocked 15.3% of our sends). null = not configured, effective value 0 (rule disabled); the owner recommends 7. Schedules are NOT judged by this number — they have their own cooldownDays. */
21699
+ quietDays?: number | null;
21700
+ /** @description How many days the school's "no linked messengers" answer stays trusted. While it is fresh, the contact import neither creates a card nor asks the school again, and schedule selection does not feed that person. null = not configured, effective value 7; 0 = ask the school every time. */
21701
+ reachabilityTtlDays?: number | null;
20867
21702
  /** @description Transport → exact deal custom field NAME (read API returns no field ids). Clear with {}. */
20868
21703
  deliveryFieldMap?: {
20869
21704
  [key: string]: string;
@@ -21049,6 +21884,50 @@ export interface components {
21049
21884
  suggestedNextPhase: "1" | "2" | "3" | "4" | "5" | "6" | null;
21050
21885
  };
21051
21886
  };
21887
+ WorkspaceNavigationRequest: {
21888
+ /** @enum {string} */
21889
+ intent: "CREATE_BOT" | "IMPROVE_AGENT" | "DIAGNOSE_CONTACT" | "AUDIT_DIALOGUES" | "CAMPAIGN_REPORT" | "CONNECT_CRM" | "CONNECT_DATASOURCE" | "CONFIGURE_FOLLOWUP" | "CONTINUE_TASK" | "FREEFORM";
21890
+ /** @enum {string} */
21891
+ botType?: "FAQ" | "SALES" | "BOOKING" | "OUTBOUND" | "SUPPORT" | "UNKNOWN";
21892
+ /** Format: uuid */
21893
+ platformId?: string;
21894
+ /** Format: uuid */
21895
+ agentId?: string;
21896
+ /** Format: uuid */
21897
+ contactId?: string;
21898
+ /** Format: uuid */
21899
+ taskId?: string;
21900
+ question?: string;
21901
+ };
21902
+ WorkspaceNavigationResponse: {
21903
+ objective: string;
21904
+ intent: components["schemas"]["WorkspaceNavigationRequest"]["intent"];
21905
+ /** @enum {string|null} */
21906
+ botType: "FAQ" | "SALES" | "BOOKING" | "OUTBOUND" | "SUPPORT" | "UNKNOWN" | null;
21907
+ selectedObjects: {
21908
+ type: string;
21909
+ id: string;
21910
+ label: string | null;
21911
+ }[];
21912
+ completed: string[];
21913
+ missing: string[];
21914
+ requiredUserInput: {
21915
+ field: string;
21916
+ reason: string;
21917
+ options?: string[];
21918
+ }[];
21919
+ next: {
21920
+ tool: string;
21921
+ arguments: {
21922
+ [key: string]: unknown;
21923
+ };
21924
+ reason: string;
21925
+ verifyWith: string;
21926
+ } | null;
21927
+ finishCondition: string;
21928
+ /** @enum {string} */
21929
+ evidenceSource: "live_workspace_overview";
21930
+ };
21052
21931
  CreateSetupSessionRequest: {
21053
21932
  /** Format: uuid */
21054
21933
  workspaceId: string;
@@ -21447,6 +22326,8 @@ export interface components {
21447
22326
  writtenAt?: string;
21448
22327
  };
21449
22328
  StartSandboxRunRequest: {
22329
+ /** @description Неактивированный системный промпт для изолированной проверки. Допустим только при options.mode=single_agent, действует лишь внутри sandbox run и не меняет production AgentChat или PromptVersion. */
22330
+ candidatePrompt?: string;
21450
22331
  /** @description Test scenarios to run (default — all linked to agent's ICP) */
21451
22332
  scenarioIds?: string[];
21452
22333
  options?: {
@@ -22247,15 +23128,21 @@ export interface components {
22247
23128
  callbackUrl?: string;
22248
23129
  sourceChannel?: string;
22249
23130
  };
22250
- ProvisionedExternalApiChannel: {
23131
+ IssuedCredentialReveal: {
23132
+ /** @description Одноразовая ссылка для вошедшего человека */
23133
+ revealUrl: string;
23134
+ /** Format: date-time */
23135
+ revealExpiresAt: string;
23136
+ };
23137
+ ExternalApiChannelCreated: {
22251
23138
  /** Format: uuid */
22252
23139
  channelId: string;
22253
- /** @description Bearer-ключ партнёра для входящих (показывается ОДИН раз) */
22254
- apiKey: string;
22255
- /** @description Секрет HMAC-подписи колбэков (показывается ОДИН раз) */
22256
- webhookSecret: string;
22257
23140
  /** @description Путь приёма входящих: /api/v2/channels/{channelId}/messages */
22258
23141
  ingestPath: string;
23142
+ /** @description Одноразовая ссылка для вошедшего человека */
23143
+ revealUrl: string;
23144
+ /** Format: date-time */
23145
+ revealExpiresAt: string;
22259
23146
  };
22260
23147
  /** @enum {string} */
22261
23148
  CallDirection: "Inbound" | "Outbound";
@@ -23690,6 +24577,23 @@ export interface components {
23690
24577
  checkerEnabled?: boolean;
23691
24578
  errorReasons?: string[];
23692
24579
  };
24580
+ GetCourseContactImportStatusResponse: {
24581
+ /** Format: uuid */
24582
+ id: string;
24583
+ /** Format: uuid */
24584
+ workspaceId: string;
24585
+ /** @enum {string} */
24586
+ status: "RUNNING" | "COMPLETED" | "PARTIAL" | "FAILED";
24587
+ totalRows: number;
24588
+ processedRows: number;
24589
+ successCount: number;
24590
+ failedCount: number;
24591
+ errorReasons: string[];
24592
+ /** Format: date-time */
24593
+ createdAt: string;
24594
+ /** Format: date-time */
24595
+ completedAt: string | null;
24596
+ };
23693
24597
  ContactExportRequest: {
23694
24598
  /** Format: uuid */
23695
24599
  workspaceId?: string;
@@ -23935,6 +24839,8 @@ export interface components {
23935
24839
  defaultPlatformId: string | null;
23936
24840
  defaultChannels: string[];
23937
24841
  defaultDealFields: Record<string, never> | null;
24842
+ /** @description Quiet-period override for this mailing, in days. 0 means "this text may be sent inside the quiet period" — that IS the permission. null means the mailing does not override; the platform setting applies, then the workspace one, then 0. */
24843
+ quietDaysOverride: number | null;
23938
24844
  };
23939
24845
  CreateBroadcastMailingVariantRequest: {
23940
24846
  name: string;
@@ -23951,6 +24857,8 @@ export interface components {
23951
24857
  defaultPlatformId?: string | null;
23952
24858
  defaultChannels?: string[];
23953
24859
  defaultDealFields?: Record<string, never> | null;
24860
+ /** @description Quiet-period override for this mailing, in days. 0 means "this text may be sent inside the quiet period" — that IS the permission. null means the mailing does not override; the platform setting applies, then the workspace one, then 0. */
24861
+ quietDaysOverride?: number | null;
23954
24862
  };
23955
24863
  UpdateBroadcastMailingVariantRequest: {
23956
24864
  name?: string;
@@ -23968,6 +24876,8 @@ export interface components {
23968
24876
  defaultPlatformId?: string | null;
23969
24877
  defaultChannels?: string[];
23970
24878
  defaultDealFields?: Record<string, never> | null;
24879
+ /** @description Quiet-period override for this mailing, in days. 0 means "this text may be sent inside the quiet period" — that IS the permission. null means the mailing does not override; the platform setting applies, then the workspace one, then 0. */
24880
+ quietDaysOverride?: number | null;
23971
24881
  };
23972
24882
  WorkspaceLinkDomain: {
23973
24883
  /**
@@ -24268,7 +25178,9 @@ export interface components {
24268
25178
  indirect: number;
24269
25179
  indirectAmount: number;
24270
25180
  notSent: {
24271
- total: number;
25181
+ /** @description Всего не отправлено по этой волне. null — «не выяснено», а НЕ ноль: активен фильтр по измерению (воронка/сегмент/продукт), а снимок волны его не несёт — волна охватила несколько воронок. Отсев принадлежит ВОЛНЕ, у отсеянного своей воронки нет (он отсеян до отправки), поэтому какой воронке достался этот отсев — неизвестно. Ноль означал бы «никого не отсеяли», а полное число волны — цифру, за которой откроется пустой список. */
25182
+ total: number | null;
25183
+ /** @description Пусто, когда total = null. */
24272
25184
  byReason: {
24273
25185
  [key: string]: number;
24274
25186
  };
@@ -24300,6 +25212,8 @@ export interface components {
24300
25212
  total: number;
24301
25213
  failedDelivery: number;
24302
25214
  byDayProduct: components["schemas"]["BroadcastSkipDayProduct"][];
25215
+ /** @description Отсев волн, который выбранный фильтр по измерению не относит ни к одному своему значению: волна охватила несколько воронок/сегментов/продуктов, и снимок оставил ось пустой. Отсев принадлежит ВОЛНЕ — у отсеянного контакта своей воронки нет, он отсеян до отправки и строки реестра не имеет. Показывать обязательно: у Ксаматы за август 2026 таких 7157 из 9674, то есть разрез по воронкам покрывает лишь четверть отсева. 0 — фильтра по измерению нет либо распределено всё. */
25216
+ unattributed: number;
24303
25217
  };
24304
25218
  BroadcastRecipientItem: {
24305
25219
  /** Format: uuid */
@@ -25276,13 +26190,14 @@ export interface components {
25276
26190
  SandboxFinding: {
25277
26191
  /** Format: uuid */
25278
26192
  scenarioId?: string | null;
26193
+ turnIndex?: number;
25279
26194
  /** @enum {string} */
25280
- category: "hallucination" | "wrong_action" | "wrong_routing" | "missed_trigger" | "wrong_pipeline_transition" | "rag_miss" | "bad_tone" | "other";
26195
+ category: "hallucination" | "wrong_action" | "wrong_routing" | "missed_context" | "rag_miss" | "bad_tone" | "off_topic" | "contradiction" | "other";
25281
26196
  /** @enum {string} */
25282
26197
  severity: "low" | "medium" | "critical";
25283
- message: string;
25284
- suggestion?: string;
25285
- turnIndex?: number;
26198
+ description: string;
26199
+ evidence?: string;
26200
+ recommendation?: string;
25286
26201
  };
25287
26202
  /** @enum {string} */
25288
26203
  SourceWorkbookKind: "XLSX_UPLOAD" | "GOOGLE_SHEETS";
@@ -25337,11 +26252,22 @@ export interface components {
25337
26252
  /** @description Для Google Sheets — числовой gid */
25338
26253
  sheetGid?: number;
25339
26254
  sheetIndex: number;
25340
- rowCount: number;
25341
- columnCount: number;
26255
+ rowCount: number | null;
26256
+ columnCount: number | null;
26257
+ dimensionsKnown: boolean;
26258
+ /** @description Источник содержит строки за доступной parser-границей. */
26259
+ rowsTruncated?: boolean;
26260
+ /** @description Граница полного обхода Google grid; может включать пустые строки. */
26261
+ scanUpperBoundRowCount?: number;
26262
+ /** @description Граница полного обхода Google grid; может включать пустые колонки. */
26263
+ scanUpperBoundColumnCount?: number;
25342
26264
  sampleRows: components["schemas"]["SheetCellMetadata"][][];
25343
26265
  hyperlinkStats: components["schemas"]["ColumnLinkStats"][];
25344
26266
  truncated: boolean;
26267
+ readError?: {
26268
+ code: string;
26269
+ message: string;
26270
+ };
25345
26271
  };
25346
26272
  InspectWorkbookResponse: {
25347
26273
  workbook: components["schemas"]["SourceWorkbook"];
@@ -25349,6 +26275,35 @@ export interface components {
25349
26275
  totalSampleCells: number;
25350
26276
  globallyTruncated: boolean;
25351
26277
  };
26278
+ WorkbookSheetPage: {
26279
+ /** Format: uuid */
26280
+ workbookId: string;
26281
+ sourceIdentity: string;
26282
+ sheetTitle: string;
26283
+ sheetGid?: number;
26284
+ sheetIndex: number;
26285
+ rowOffset: number;
26286
+ rowLimit: number;
26287
+ returnedRowCount: number;
26288
+ columnOffset: number;
26289
+ columnLimit: number;
26290
+ returnedColumnCount: number;
26291
+ totalRowCount: number | null;
26292
+ totalColumnCount: number | null;
26293
+ dimensionsKnown: boolean;
26294
+ /** @description Часть источника лежит за доступной scan-границей; полный вывод делать нельзя. */
26295
+ sourceTruncated?: boolean;
26296
+ /** @description Граница, до которой надо пройти rowOffset для полного обхода. */
26297
+ scanUpperBoundRowCount: number;
26298
+ /** @description Граница, до которой надо пройти columnOffset для полного обхода. */
26299
+ scanUpperBoundColumnCount: number;
26300
+ rows: components["schemas"]["SheetCellMetadata"][][];
26301
+ hasMoreRows: boolean;
26302
+ hasMoreColumns: boolean;
26303
+ nextRowOffset: number | null;
26304
+ nextColumnOffset: number | null;
26305
+ pageFingerprint: string;
26306
+ };
25352
26307
  WorkbookInspectError: {
25353
26308
  /** @enum {string} */
25354
26309
  error: "google_sheets_not_shared";
@@ -25794,8 +26749,9 @@ export interface components {
25794
26749
  limit?: number;
25795
26750
  };
25796
26751
  KnowledgeTableReindexResponse: {
26752
+ job_id: string;
25797
26753
  /**
25798
- * @description QUEUED — reindex поставлен в фоновую очередь (для крупных источников вроде каталога 1С); опрашивай GET .../tables/:id → last_success_at для подтверждения завершения. INDEXED/SKIPPED — legacy синхронный результат.
26754
+ * @description QUEUED — reindex поставлен в фоновую очередь (для крупных источников вроде каталога 1С); опрашивай GET .../tables/:id/reindex/status для подтверждения завершения. INDEXED/SKIPPED — legacy синхронный результат.
25799
26755
  * @enum {string}
25800
26756
  */
25801
26757
  status: "QUEUED" | "INDEXED" | "SKIPPED";
@@ -25803,6 +26759,20 @@ export interface components {
25803
26759
  /** Format: date-time */
25804
26760
  indexed_at: string;
25805
26761
  };
26762
+ AsyncJobStatusResponse: {
26763
+ job_id: string;
26764
+ /** @enum {string} */
26765
+ status: "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "EXPIRED";
26766
+ progress: unknown;
26767
+ result: unknown;
26768
+ error: string | null;
26769
+ /** Format: date-time */
26770
+ queued_at: string | null;
26771
+ /** Format: date-time */
26772
+ started_at: string | null;
26773
+ /** Format: date-time */
26774
+ finished_at: string | null;
26775
+ };
25806
26776
  /** @enum {string} */
25807
26777
  VariableType: "TEXT" | "NUMBER" | "FLOAT" | "BOOLEAN";
25808
26778
  VariableResponse: {
@@ -26437,20 +27407,65 @@ export interface components {
26437
27407
  }
26438
27408
  export type $defs = Record<string, never>;
26439
27409
  export interface operations {
26440
- startIcpAudioImportRun: {
27410
+ AgentReadinessController_get: {
26441
27411
  parameters: {
26442
27412
  query?: never;
26443
27413
  header?: never;
26444
- path?: never;
26445
- cookie?: never;
26446
- };
26447
- requestBody: {
26448
- content: {
26449
- "application/json": components["schemas"]["StartIcpAudioImportRequest"];
27414
+ path: {
27415
+ agentId: string;
26450
27416
  };
27417
+ cookie?: never;
26451
27418
  };
27419
+ requestBody?: never;
26452
27420
  responses: {
26453
- /** @description Run accepted, items scheduled */
27421
+ /** @description NOT_PROVEN с отдельными gates; configurationCurrent null до фиксации полной версии зависимых настроек, promptAndAgentCurrent проверяет только промпт и запись агента */
27422
+ 200: {
27423
+ headers: {
27424
+ [name: string]: unknown;
27425
+ };
27426
+ content?: never;
27427
+ };
27428
+ };
27429
+ };
27430
+ navigateWorkspaceTask: {
27431
+ parameters: {
27432
+ query?: never;
27433
+ header?: never;
27434
+ path: {
27435
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27436
+ };
27437
+ cookie?: never;
27438
+ };
27439
+ requestBody: {
27440
+ content: {
27441
+ "application/json": components["schemas"]["WorkspaceNavigationRequest"];
27442
+ };
27443
+ };
27444
+ responses: {
27445
+ 200: {
27446
+ headers: {
27447
+ [name: string]: unknown;
27448
+ };
27449
+ content: {
27450
+ "application/json": components["schemas"]["WorkspaceNavigationResponse"];
27451
+ };
27452
+ };
27453
+ };
27454
+ };
27455
+ startIcpAudioImportRun: {
27456
+ parameters: {
27457
+ query?: never;
27458
+ header?: never;
27459
+ path?: never;
27460
+ cookie?: never;
27461
+ };
27462
+ requestBody: {
27463
+ content: {
27464
+ "application/json": components["schemas"]["StartIcpAudioImportRequest"];
27465
+ };
27466
+ };
27467
+ responses: {
27468
+ /** @description Run accepted, items scheduled */
26454
27469
  202: {
26455
27470
  headers: {
26456
27471
  [name: string]: unknown;
@@ -26588,6 +27603,62 @@ export interface operations {
26588
27603
  };
26589
27604
  };
26590
27605
  };
27606
+ getContactTouchHistory: {
27607
+ parameters: {
27608
+ query?: never;
27609
+ header?: never;
27610
+ path: {
27611
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27612
+ /** @description GetCourse school-side person id (getcourse_user_id). */
27613
+ gcUserId: number;
27614
+ };
27615
+ cookie?: never;
27616
+ };
27617
+ requestBody?: never;
27618
+ responses: {
27619
+ /** @description OK */
27620
+ 200: {
27621
+ headers: {
27622
+ [name: string]: unknown;
27623
+ };
27624
+ content: {
27625
+ "application/json": {
27626
+ getcourseUserId: number;
27627
+ /** Format: date-time */
27628
+ firstWelcomeAt: string | null;
27629
+ /** @description More journal rows exist than fit in this response. */
27630
+ truncated: boolean;
27631
+ touches: {
27632
+ /** @description Touch name = the right key. Four kinds: a segment label, `text:<template fingerprint>`, `registration:<deal>`, and `legacy:welcome` (a right restored by backfill for the period before the journal existed). */
27633
+ touchKey: string;
27634
+ /** @enum {string} */
27635
+ kind: "FIRST" | "REPEAT" | "REGISTRATION";
27636
+ /** @enum {string} */
27637
+ status: "CLAIMED" | "SENT" | "UNKNOWN" | "RELEASED";
27638
+ /** Format: date-time */
27639
+ claimedAt: string;
27640
+ /** Format: date-time */
27641
+ sentAt: string | null;
27642
+ /** @description Empty for rows written before 2026-09-09 — the column did not exist yet. */
27643
+ mailingName: string | null;
27644
+ /** Format: uuid */
27645
+ platformId: string | null;
27646
+ lastError: string | null;
27647
+ }[];
27648
+ sends: {
27649
+ segment: string | null;
27650
+ /** @enum {string} */
27651
+ mode: "cold_welcome" | "registration_welcome" | "scheduled";
27652
+ /** Format: date-time */
27653
+ receivedAt: string;
27654
+ /** Format: uuid */
27655
+ platformId: string | null;
27656
+ }[];
27657
+ };
27658
+ };
27659
+ };
27660
+ };
27661
+ };
26591
27662
  listWorkspaceDataSources: {
26592
27663
  parameters: {
26593
27664
  query?: never;
@@ -26665,6 +27736,159 @@ export interface operations {
26665
27736
  };
26666
27737
  };
26667
27738
  };
27739
+ getInboundAnalytics: {
27740
+ parameters: {
27741
+ query?: {
27742
+ platformId?: string;
27743
+ channels?: string[];
27744
+ mode?: "all" | "days" | "range";
27745
+ days?: number;
27746
+ from?: string;
27747
+ to?: string;
27748
+ };
27749
+ header?: never;
27750
+ path: {
27751
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27752
+ report: "summary" | "topics" | "speed" | "money" | "cycle" | "quality";
27753
+ };
27754
+ cookie?: never;
27755
+ };
27756
+ requestBody?: never;
27757
+ responses: {
27758
+ /** @description Канонический ответ выбранной входящей витрины; null не заменяется нулём. */
27759
+ 200: {
27760
+ headers: {
27761
+ [name: string]: unknown;
27762
+ };
27763
+ content: {
27764
+ "application/json": components["schemas"]["AnalyticsAggregateResponse"];
27765
+ };
27766
+ };
27767
+ 400: components["responses"]["ValidationError"];
27768
+ 401: components["responses"]["Unauthorized"];
27769
+ 403: components["responses"]["Forbidden"];
27770
+ };
27771
+ };
27772
+ getFunnelAnalytics: {
27773
+ parameters: {
27774
+ query: {
27775
+ platformId: string;
27776
+ from?: string;
27777
+ to?: string;
27778
+ view?: "cohort" | "period";
27779
+ managerId?: number;
27780
+ };
27781
+ header?: never;
27782
+ path: {
27783
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27784
+ report: "meta" | "summary" | "cohorts";
27785
+ };
27786
+ cookie?: never;
27787
+ };
27788
+ requestBody?: never;
27789
+ responses: {
27790
+ /** @description Канонический ответ воронки с неизменным view и зерном. */
27791
+ 200: {
27792
+ headers: {
27793
+ [name: string]: unknown;
27794
+ };
27795
+ content: {
27796
+ "application/json": components["schemas"]["AnalyticsAggregateResponse"];
27797
+ };
27798
+ };
27799
+ 400: components["responses"]["ValidationError"];
27800
+ 401: components["responses"]["Unauthorized"];
27801
+ 403: components["responses"]["Forbidden"];
27802
+ 404: components["responses"]["NotFound"];
27803
+ };
27804
+ };
27805
+ getAiCosts: {
27806
+ parameters: {
27807
+ query?: {
27808
+ mode?: "all" | "days" | "range";
27809
+ days?: number;
27810
+ from?: string;
27811
+ to?: string;
27812
+ scope?: "production" | "with_tests";
27813
+ groupBy?: "customer" | "platform" | "tag" | "operation" | "provider";
27814
+ page?: number;
27815
+ limit?: number;
27816
+ };
27817
+ header?: never;
27818
+ path: {
27819
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27820
+ report: "summary" | "tasks" | "breakdown";
27821
+ };
27822
+ cookie?: never;
27823
+ };
27824
+ requestBody?: never;
27825
+ responses: {
27826
+ /** @description Ledger с отдельным числом priced и unpriced usage events. */
27827
+ 200: {
27828
+ headers: {
27829
+ [name: string]: unknown;
27830
+ };
27831
+ content: {
27832
+ "application/json": components["schemas"]["AnalyticsAggregateResponse"];
27833
+ };
27834
+ };
27835
+ 400: components["responses"]["ValidationError"];
27836
+ 401: components["responses"]["Unauthorized"];
27837
+ 403: components["responses"]["Forbidden"];
27838
+ };
27839
+ };
27840
+ listCustomReports: {
27841
+ parameters: {
27842
+ query?: never;
27843
+ header?: never;
27844
+ path: {
27845
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27846
+ };
27847
+ cookie?: never;
27848
+ };
27849
+ requestBody?: never;
27850
+ responses: {
27851
+ /** @description Неархивированные определения отчётов. */
27852
+ 200: {
27853
+ headers: {
27854
+ [name: string]: unknown;
27855
+ };
27856
+ content: {
27857
+ "application/json": {
27858
+ items: components["schemas"]["CustomReportDefinition"][];
27859
+ };
27860
+ };
27861
+ };
27862
+ 401: components["responses"]["Unauthorized"];
27863
+ 403: components["responses"]["Forbidden"];
27864
+ };
27865
+ };
27866
+ getCustomReport: {
27867
+ parameters: {
27868
+ query?: never;
27869
+ header?: never;
27870
+ path: {
27871
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27872
+ reportId: string;
27873
+ };
27874
+ cookie?: never;
27875
+ };
27876
+ requestBody?: never;
27877
+ responses: {
27878
+ /** @description Определение и версия отчёта. */
27879
+ 200: {
27880
+ headers: {
27881
+ [name: string]: unknown;
27882
+ };
27883
+ content: {
27884
+ "application/json": components["schemas"]["CustomReportDefinition"];
27885
+ };
27886
+ };
27887
+ 401: components["responses"]["Unauthorized"];
27888
+ 403: components["responses"]["Forbidden"];
27889
+ 404: components["responses"]["NotFound"];
27890
+ };
27891
+ };
26668
27892
  getCustomReportData: {
26669
27893
  parameters: {
26670
27894
  query: {
@@ -26696,6 +27920,141 @@ export interface operations {
26696
27920
  404: components["responses"]["NotFound"];
26697
27921
  };
26698
27922
  };
27923
+ getWorkspaceOperationalOverview: {
27924
+ parameters: {
27925
+ query?: never;
27926
+ header?: never;
27927
+ path: {
27928
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27929
+ };
27930
+ cookie?: never;
27931
+ };
27932
+ requestBody?: never;
27933
+ responses: {
27934
+ /** @description Текущее состояние и приоритетные предупреждения. */
27935
+ 200: {
27936
+ headers: {
27937
+ [name: string]: unknown;
27938
+ };
27939
+ content: {
27940
+ "application/json": components["schemas"]["OperationalOverviewResponse"];
27941
+ };
27942
+ };
27943
+ 401: components["responses"]["Unauthorized"];
27944
+ 403: components["responses"]["Forbidden"];
27945
+ };
27946
+ };
27947
+ listWorkspaceOperatorsForWorkflow: {
27948
+ parameters: {
27949
+ query?: never;
27950
+ header?: never;
27951
+ path: {
27952
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27953
+ };
27954
+ cookie?: never;
27955
+ };
27956
+ requestBody?: never;
27957
+ responses: {
27958
+ /** @description Только workspace operators; CRM operators в ответ не входят. */
27959
+ 200: {
27960
+ headers: {
27961
+ [name: string]: unknown;
27962
+ };
27963
+ content: {
27964
+ "application/json": components["schemas"]["WorkspaceOperatorOption"][];
27965
+ };
27966
+ };
27967
+ 401: components["responses"]["Unauthorized"];
27968
+ 403: components["responses"]["Forbidden"];
27969
+ };
27970
+ };
27971
+ listWorkspaceOperatorQueue: {
27972
+ parameters: {
27973
+ query?: {
27974
+ status?: "WAITING_OPERATOR" | "IN_PROGRESS" | "WAITING_CUSTOMER" | "RESOLVED";
27975
+ workspaceOperatorId?: string;
27976
+ contactId?: string;
27977
+ page?: number;
27978
+ limit?: number;
27979
+ };
27980
+ header?: never;
27981
+ path: {
27982
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
27983
+ };
27984
+ cookie?: never;
27985
+ };
27986
+ requestBody?: never;
27987
+ responses: {
27988
+ /** @description Текущее состояние и последнее связанное доказательство workflow. */
27989
+ 200: {
27990
+ headers: {
27991
+ [name: string]: unknown;
27992
+ };
27993
+ content: {
27994
+ "application/json": components["schemas"]["OperatorQueueResponse"];
27995
+ };
27996
+ };
27997
+ 401: components["responses"]["Unauthorized"];
27998
+ 403: components["responses"]["Forbidden"];
27999
+ };
28000
+ };
28001
+ getWorkspaceOperatorAssignment: {
28002
+ parameters: {
28003
+ query?: never;
28004
+ header?: never;
28005
+ path: {
28006
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
28007
+ contactId: string;
28008
+ };
28009
+ cookie?: never;
28010
+ };
28011
+ requestBody?: never;
28012
+ responses: {
28013
+ /** @description Назначение, статус и доказательство workflow. */
28014
+ 200: {
28015
+ headers: {
28016
+ [name: string]: unknown;
28017
+ };
28018
+ content: {
28019
+ "application/json": components["schemas"]["WorkspaceOperatorAssignmentState"];
28020
+ };
28021
+ };
28022
+ 401: components["responses"]["Unauthorized"];
28023
+ 403: components["responses"]["Forbidden"];
28024
+ 404: components["responses"]["NotFound"];
28025
+ };
28026
+ };
28027
+ updateWorkspaceOperatorAssignment: {
28028
+ parameters: {
28029
+ query?: never;
28030
+ header?: never;
28031
+ path: {
28032
+ workspaceId: components["parameters"]["WorkspaceIdPath"];
28033
+ contactId: string;
28034
+ };
28035
+ cookie?: never;
28036
+ };
28037
+ requestBody: {
28038
+ content: {
28039
+ "application/json": components["schemas"]["UpdateWorkspaceOperatorAssignment"];
28040
+ };
28041
+ };
28042
+ responses: {
28043
+ /** @description Фактически сохранённое назначение. */
28044
+ 200: {
28045
+ headers: {
28046
+ [name: string]: unknown;
28047
+ };
28048
+ content: {
28049
+ "application/json": components["schemas"]["WorkspaceOperatorAssignmentResult"];
28050
+ };
28051
+ };
28052
+ 401: components["responses"]["Unauthorized"];
28053
+ 403: components["responses"]["Forbidden"];
28054
+ 404: components["responses"]["NotFound"];
28055
+ 409: components["responses"]["Conflict"];
28056
+ };
28057
+ };
26699
28058
  getCustomReportDrilldown: {
26700
28059
  parameters: {
26701
28060
  query: {