@opencx/mcp 1.11.84 → 1.11.85

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/schema.d.ts CHANGED
@@ -1280,6 +1280,58 @@ export interface paths {
1280
1280
  patch?: never;
1281
1281
  trace?: never;
1282
1282
  };
1283
+ "/macros": {
1284
+ parameters: {
1285
+ query?: never;
1286
+ header?: never;
1287
+ path?: never;
1288
+ cookie?: never;
1289
+ };
1290
+ /**
1291
+ * List macros
1292
+ * @description List all saved-reply macros for the organization.
1293
+ */
1294
+ get: operations["listMacros"];
1295
+ put?: never;
1296
+ /**
1297
+ * Create a macro
1298
+ * @description Create a new saved-reply macro. Use {{variable}} syntax in content to reference system or custom variables.
1299
+ */
1300
+ post: operations["createMacro"];
1301
+ delete?: never;
1302
+ options?: never;
1303
+ head?: never;
1304
+ patch?: never;
1305
+ trace?: never;
1306
+ };
1307
+ "/macros/{id}": {
1308
+ parameters: {
1309
+ query?: never;
1310
+ header?: never;
1311
+ path?: never;
1312
+ cookie?: never;
1313
+ };
1314
+ /**
1315
+ * Get a macro
1316
+ * @description Get a single saved-reply macro by ID.
1317
+ */
1318
+ get: operations["getMacro"];
1319
+ put?: never;
1320
+ post?: never;
1321
+ /**
1322
+ * Delete a macro
1323
+ * @description Permanently delete a saved-reply macro.
1324
+ */
1325
+ delete: operations["deleteMacro"];
1326
+ options?: never;
1327
+ head?: never;
1328
+ /**
1329
+ * Update a macro
1330
+ * @description Partially update a saved-reply macro.
1331
+ */
1332
+ patch: operations["updateMacro"];
1333
+ trace?: never;
1334
+ };
1283
1335
  "/handoff-analytics/events": {
1284
1336
  parameters: {
1285
1337
  query?: never;
@@ -2044,6 +2096,46 @@ export interface paths {
2044
2096
  patch?: never;
2045
2097
  trace?: never;
2046
2098
  };
2099
+ "/resource-usage/{resource_type}/{resource_id}/conversations": {
2100
+ parameters: {
2101
+ query?: never;
2102
+ header?: never;
2103
+ path?: never;
2104
+ cookie?: never;
2105
+ };
2106
+ /**
2107
+ * List conversations that used a resource
2108
+ * @description Reverse lookup: list the conversations where a given action, instruction, or KB item was used, newest first. Returns one row per conversation with the reply count, ticket number, last message, and first/last-used timestamps. Defaults to `applied` usage (the resource actually fired); pass `usageKind=available` to see where an instruction was in context but may not have fired.
2109
+ */
2110
+ get: operations["listResourceConversations"];
2111
+ put?: never;
2112
+ post?: never;
2113
+ delete?: never;
2114
+ options?: never;
2115
+ head?: never;
2116
+ patch?: never;
2117
+ trace?: never;
2118
+ };
2119
+ "/resource-usage/{resource_type}/{resource_id}/usage-summary": {
2120
+ parameters: {
2121
+ query?: never;
2122
+ header?: never;
2123
+ path?: never;
2124
+ cookie?: never;
2125
+ };
2126
+ /**
2127
+ * Get usage counts for a resource
2128
+ * @description Aggregate usage for a given action, instruction, or KB item: distinct sessions and total replies where it was applied, the available counterpart (for instructions, to compute apply-rate), and first/last-used timestamps. Optionally bound by a date range.
2129
+ */
2130
+ get: operations["getResourceUsageSummary"];
2131
+ put?: never;
2132
+ post?: never;
2133
+ delete?: never;
2134
+ options?: never;
2135
+ head?: never;
2136
+ patch?: never;
2137
+ trace?: never;
2138
+ };
2047
2139
  "/sequences": {
2048
2140
  parameters: {
2049
2141
  query?: never;
@@ -4000,6 +4092,16 @@ export interface components {
4000
4092
  /** @description Optional reason for redaction */
4001
4093
  reason?: string;
4002
4094
  };
4095
+ CreateSavedReplyDto: {
4096
+ category: string;
4097
+ title: string;
4098
+ content: string;
4099
+ };
4100
+ UpdateSavedReplyDto: {
4101
+ category?: string;
4102
+ title?: string;
4103
+ content?: string;
4104
+ };
4003
4105
  SalesforceMiawWebhookBody: {
4004
4106
  /** @enum {string} */
4005
4107
  event: "message:new";
@@ -4762,7 +4864,7 @@ export interface components {
4762
4864
  * @description What starts the workflow. Use "manual-trigger" for on-demand execution, "ai-trigger" for AI-initiated, "webhook" for external HTTP triggers, "cron-trigger" for scheduled runs, or event-based triggers like "ticket-created", "contact-created", etc.
4763
4865
  * @enum {string}
4764
4866
  */
4765
- trigger_type: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4867
+ trigger_type: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "first-contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4766
4868
  /** @description Trigger-specific configuration (e.g. cron expression for cron-trigger) */
4767
4869
  trigger_configuration?: unknown | null;
4768
4870
  /** @description Array of workflow steps and control-flow blocks. Each step is an object with { "$kind": "Action", "id": "<unique-step-id>", "type": "<action-type>", "name": "<display-name>", "input": { ... } }. Control-flow blocks use { "$kind": "Block", "type": "if-else", "id": "<unique-id>", "inputs": { "condition": { "operatorName": "equals", "left": "{{step_id.field}}", "right": "value" } }, "branches": { "then": [...steps], "else": [...steps] } }. Use {{step_id.field}} to reference outputs from previous steps (no `.output.` segment — the field sits directly under the step id). */
@@ -4779,7 +4881,7 @@ export interface components {
4779
4881
  * @description New trigger type
4780
4882
  * @enum {string}
4781
4883
  */
4782
- trigger_type?: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4884
+ trigger_type?: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "first-contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4783
4885
  /** @description New trigger configuration */
4784
4886
  trigger_configuration?: unknown | null;
4785
4887
  /** @description New workflow step/block definitions (replaces existing blocks) */
@@ -4792,7 +4894,7 @@ export interface components {
4792
4894
  * @description Trigger type to validate against
4793
4895
  * @enum {string}
4794
4896
  */
4795
- trigger_type: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4897
+ trigger_type: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "first-contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4796
4898
  /** @description Trigger configuration to validate against the trigger's configuration_def. When omitted, the trigger is validated as if unconfigured — triggers with required configuration (e.g. cron-trigger, ai-trigger) will report errors. */
4797
4899
  trigger_configuration?: unknown | null;
4798
4900
  /** @description Workflow blocks to validate */
@@ -4805,7 +4907,7 @@ export interface components {
4805
4907
  * @description Trigger type whose payload shape this synthetic payload should match
4806
4908
  * @enum {string}
4807
4909
  */
4808
- type: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4910
+ type: "manual-trigger" | "ai-trigger" | "cron-trigger" | "form-trigger" | "webhook" | "contact-created" | "phone-call-started" | "phone-call-finished" | "ticket-created" | "ticket-reassigned" | "ticket-resolved" | "ticket-handoff" | "pre-ticket-handoff" | "ticket-tag-added" | "ticket-inactive" | "agent-inactive" | "sequence-completed" | "csat-score-submit" | "prohibited-topic-detected" | "sla-first-reply-breached" | "sla-next-reply-breached" | "sla-resolution-breached" | "voice-call-transferred" | "pre-voice-call-transfer" | "pre-phone-call-finished" | "manual-ticket-trigger" | "contact-message-received" | "first-contact-message-received" | "macro-called" | "agent-availability-changed" | "agent-avail-in-team-changed";
4809
4911
  payload: unknown;
4810
4912
  };
4811
4913
  };
@@ -4956,6 +5058,8 @@ export interface components {
4956
5058
  };
4957
5059
  CreateEmailTemplatePublicInput: components["schemas"]["CreateEmailTemplateBodyDto"];
4958
5060
  UpdateEmailTemplatePublicInput: components["schemas"]["CreateEmailTemplateBodyDto"];
5061
+ CreateMacroInput: components["schemas"]["CreateSavedReplyDto"];
5062
+ UpdateMacroInput: components["schemas"]["UpdateSavedReplyDto"];
4959
5063
  UpsertTagInputDto: {
4960
5064
  /** @description Tag name (e.g. "billing", "refund", "feature-request") */
4961
5065
  tag_name: string;
@@ -4988,12 +5092,14 @@ export interface components {
4988
5092
  limit: number;
4989
5093
  visibility?: ("internal" | "public")[];
4990
5094
  sourceTypes?: ("custom_training" | "help_center" | "integration" | "website")[];
4991
- dataSources?: ("confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "ai_instructions" | "custom_training" | "website")[];
5095
+ dataSources?: ("confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "hubspot_kb" | "ai_instructions" | "custom_training" | "website")[];
4992
5096
  /**
4993
5097
  * @default relevance
4994
5098
  * @enum {string}
4995
5099
  */
4996
- sortBy: "relevance" | "handoffs";
5100
+ sortBy: "relevance" | "handoffs" | "citations";
5101
+ dateFrom?: unknown;
5102
+ dateTo?: unknown;
4997
5103
  /**
4998
5104
  * @description Include the full content field in results. Set to false to reduce response size.
4999
5105
  * @default true
@@ -5125,7 +5231,7 @@ export interface components {
5125
5231
  /** @constant */
5126
5232
  type: "response_skipped";
5127
5233
  /** @enum {string} */
5128
- reason?: "empty_response" | "potential_answers_dead_end" | "silent_handoff";
5234
+ reason?: "empty_response" | "potential_answers_dead_end" | "silent_handoff" | "superseded_by_newer_run";
5129
5235
  reasoning?: ({
5130
5236
  /** @constant */
5131
5237
  type: "reasoning";
@@ -5228,6 +5334,23 @@ export interface components {
5228
5334
  language: "en" | "fr" | "de" | "nl" | "pl" | "pt" | "es" | "it" | "ru" | "ja" | "ko" | "zh" | "ar" | "tr" | "sv" | "da" | "no" | "fi" | "el" | "cs" | "hu" | "th" | "vi" | "id" | "he" | "hi" | "uk" | "ro" | "bg" | "hr" | "sk" | "sl" | "sr" | "et" | "lv" | "lt" | "is" | "ga" | "ms" | "tl" | "fa" | "bn" | "ta" | "te" | "ur" | "sw" | "zu" | "af" | "sq" | "hy" | "az" | "eu" | "be" | "bs" | "ca" | "cy" | "ku" | "ckb" | "kmr";
5229
5335
  };
5230
5336
  };
5337
+ actionCalls?: {
5338
+ action: {
5339
+ name: string;
5340
+ id: string;
5341
+ openapi?: {
5342
+ openapi_spec_id?: string;
5343
+ operation_spec: unknown;
5344
+ operation_id?: string;
5345
+ operation_method?: string;
5346
+ };
5347
+ metadata: unknown;
5348
+ required_form_submission?: boolean;
5349
+ is_handoff_like?: boolean;
5350
+ };
5351
+ arguments: unknown;
5352
+ result: unknown;
5353
+ }[];
5231
5354
  /** @default null */
5232
5355
  assignment_choice_summary: {
5233
5356
  /** @constant */
@@ -5243,6 +5366,11 @@ export interface components {
5243
5366
  max_capacity_in_group: number | null;
5244
5367
  is_available_globally: boolean;
5245
5368
  is_available_in_group: boolean;
5369
+ /** @default [] */
5370
+ missing_required_skills: {
5371
+ id: string;
5372
+ name: string;
5373
+ }[];
5246
5374
  } | null;
5247
5375
  peers: {
5248
5376
  agent_id: number;
@@ -5255,6 +5383,16 @@ export interface components {
5255
5383
  max_capacity_in_group: number | null;
5256
5384
  is_available_globally: boolean;
5257
5385
  is_available_in_group: boolean;
5386
+ /** @default [] */
5387
+ missing_required_skills: {
5388
+ id: string;
5389
+ name: string;
5390
+ }[];
5391
+ }[];
5392
+ /** @default [] */
5393
+ required_skills: {
5394
+ id: string;
5395
+ name: string;
5258
5396
  }[];
5259
5397
  } | null;
5260
5398
  } | {
@@ -5321,6 +5459,11 @@ export interface components {
5321
5459
  max_capacity_in_group: number | null;
5322
5460
  is_available_globally: boolean;
5323
5461
  is_available_in_group: boolean;
5462
+ /** @default [] */
5463
+ missing_required_skills: {
5464
+ id: string;
5465
+ name: string;
5466
+ }[];
5324
5467
  } | null;
5325
5468
  peers: {
5326
5469
  agent_id: number;
@@ -5333,6 +5476,16 @@ export interface components {
5333
5476
  max_capacity_in_group: number | null;
5334
5477
  is_available_globally: boolean;
5335
5478
  is_available_in_group: boolean;
5479
+ /** @default [] */
5480
+ missing_required_skills: {
5481
+ id: string;
5482
+ name: string;
5483
+ }[];
5484
+ }[];
5485
+ /** @default [] */
5486
+ required_skills: {
5487
+ id: string;
5488
+ name: string;
5336
5489
  }[];
5337
5490
  } | null;
5338
5491
  destination_id?: string;
@@ -5352,7 +5505,7 @@ export interface components {
5352
5505
  }) | null;
5353
5506
  knowledgebase_called?: boolean | null;
5354
5507
  /** @enum {string} */
5355
- type: "agent_assigned_by_system" | "agent_assigned_by_user" | "agent_changed" | "agent_comment" | "agent_initiated_session" | "agent_joined" | "agent_message" | "agent_reopened_session" | "agent_took_session_from_ai" | "agent_unassigned_by_system" | "agent_unassigned_by_user" | "ai_assumed_the_session_resolved" | "ai_decided_to_not_reply" | "ai_decided_to_resolve_the_issue" | "ai_reopened_session" | "ai_response_cancelled" | "call_history" | "call_transferred" | "closed_resolved_by_agent" | "closed_resolved_by_api" | "closed_resolved_by_contact" | "closed_resolved_by_integration" | "closed_resolved_by_system" | "closed_unresolved_by_agent" | "closed_unresolved_by_api" | "closed_unresolved_by_system" | "contact_data_updated" | "csat_requested" | "csat_submitted" | "email_draft_message" | "handoff" | "handoff_to_salesforce_miaw" | "handoff_to_zendesk" | "message" | "prohibited_topic_detected" | "sequence_message" | "sla_applied_by_agent" | "sla_applied_by_system" | "sla_first_reply_breached" | "sla_first_reply_completed_after_breach" | "sla_first_reply_fulfilled" | "sla_first_reply_metric_started" | "sla_freezed_office_hours_ended" | "sla_freezed_snoozed" | "sla_next_reply_breached" | "sla_next_reply_completed_after_breach" | "sla_next_reply_fulfilled" | "sla_next_reply_metric_started" | "sla_removed_by_agent" | "sla_removed_by_system" | "sla_resolution_breached" | "sla_resolution_completed_after_breach" | "sla_resolution_fulfilled" | "sla_resolution_metric_started" | "sla_resolution_paused_resolved" | "sla_resolution_paused_waiting_on_customer" | "sla_resolution_resumed_customer_replied" | "sla_resolution_resumed_reopened" | "sla_resumed_office_hours_started" | "sla_resumed_snooze_cancelled" | "sla_resumed_snooze_expired" | "state_checkpoint" | "sub_status_removed_by_agent" | "sub_status_removed_by_api" | "sub_status_removed_by_system" | "sub_status_set_by_agent" | "sub_status_set_by_api" | "sub_status_set_by_system" | "system_reopened_session" | "team_assigned_by_system" | "team_assigned_by_user" | "team_unassigned_by_system" | "team_unassigned_by_user" | "user_confirmed_the_session_resolved" | "workflow_message" | "workflow_note" | "workflow_triggered";
5508
+ type: "agent_assigned_by_integration" | "agent_assigned_by_system" | "agent_assigned_by_user" | "agent_changed" | "agent_comment" | "agent_initiated_session" | "agent_joined" | "agent_message" | "agent_reopened_session" | "agent_took_session_from_ai" | "agent_unassigned_by_integration" | "agent_unassigned_by_system" | "agent_unassigned_by_user" | "ai_assumed_the_session_resolved" | "ai_decided_to_not_reply" | "ai_decided_to_resolve_the_issue" | "ai_reopened_session" | "ai_response_cancelled" | "ai_resumed_by_system" | "call_history" | "call_transferred" | "closed_resolved_by_agent" | "closed_resolved_by_api" | "closed_resolved_by_contact" | "closed_resolved_by_integration" | "closed_resolved_by_system" | "closed_unresolved_by_agent" | "closed_unresolved_by_api" | "closed_unresolved_by_system" | "contact_data_updated" | "csat_requested" | "csat_submitted" | "email_draft_message" | "handoff" | "handoff_to_salesforce_miaw" | "handoff_to_zendesk" | "integration_reopened_session" | "message" | "prohibited_topic_detected" | "sequence_message" | "skills_added_by_system" | "sla_applied_by_agent" | "sla_applied_by_system" | "sla_first_reply_breached" | "sla_first_reply_completed_after_breach" | "sla_first_reply_fulfilled" | "sla_first_reply_metric_started" | "sla_freezed_office_hours_ended" | "sla_freezed_snoozed" | "sla_next_reply_breached" | "sla_next_reply_completed_after_breach" | "sla_next_reply_fulfilled" | "sla_next_reply_metric_started" | "sla_removed_by_agent" | "sla_removed_by_system" | "sla_resolution_breached" | "sla_resolution_completed_after_breach" | "sla_resolution_fulfilled" | "sla_resolution_metric_started" | "sla_resolution_paused_resolved" | "sla_resolution_paused_waiting_on_customer" | "sla_resolution_resumed_customer_replied" | "sla_resolution_resumed_reopened" | "sla_resumed_office_hours_started" | "sla_resumed_snooze_cancelled" | "sla_resumed_snooze_expired" | "state_checkpoint" | "sub_status_removed_by_agent" | "sub_status_removed_by_api" | "sub_status_removed_by_system" | "sub_status_set_by_agent" | "sub_status_set_by_api" | "sub_status_set_by_system" | "system_reopened_session" | "tag_added_by_agent" | "tag_added_by_api" | "tag_added_by_integration" | "tag_added_by_system" | "tag_removed_by_agent" | "tag_removed_by_api" | "tag_removed_by_integration" | "tag_removed_by_system" | "team_assigned_by_system" | "team_assigned_by_user" | "team_unassigned_by_system" | "team_unassigned_by_user" | "user_confirmed_the_session_resolved" | "workflow_message" | "workflow_note" | "workflow_triggered";
5356
5509
  extra_params?: {
5357
5510
  [key: string]: unknown;
5358
5511
  } | null;
@@ -5369,6 +5522,8 @@ export interface components {
5369
5522
  contact_slack_data?: string | null;
5370
5523
  attachments?: components["schemas"]["ChatAttachmentDto"][] | null;
5371
5524
  email_rfc_message_id?: string | null;
5525
+ email_to?: string[] | null;
5526
+ email_cc?: string[] | null;
5372
5527
  external_message_id?: string | null;
5373
5528
  csat_score?: number | null;
5374
5529
  csat_feedback?: string | null;
@@ -5471,6 +5626,7 @@ export interface components {
5471
5626
  recording_enabled: boolean;
5472
5627
  stt_keyterms: string[];
5473
5628
  stt_model: ("deepgram/flux-general" | "deepgram/nova-3" | "deepgram/nova-3-medical" | "cartesia/ink-whisper" | "elevenlabs/scribe_v2_realtime" | "xai/stt-1") | null;
5629
+ tts_speed_pct: number | null;
5474
5630
  failover_transfer_destination_id: string | null;
5475
5631
  };
5476
5632
  PhoneAgentVoiceDto: {
@@ -5816,6 +5972,17 @@ export interface components {
5816
5972
  breaches: number;
5817
5973
  }[];
5818
5974
  };
5975
+ SavedReplyDto: {
5976
+ id: string;
5977
+ org_id: string;
5978
+ category: string;
5979
+ title: string;
5980
+ content: string;
5981
+ /** Format: date-time */
5982
+ created_at: string;
5983
+ /** Format: date-time */
5984
+ updated_at: string;
5985
+ };
5819
5986
  StartOneOffSequenceOutputDto: {
5820
5987
  data?: {
5821
5988
  success: boolean;
@@ -6201,7 +6368,7 @@ export interface components {
6201
6368
  summary: string;
6202
6369
  explanation: string | null;
6203
6370
  sentiment: ("angry" | "happy" | "neutral") | null;
6204
- reasons: ("based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance")[];
6371
+ reasons: ("ai_implied_handoff" | "based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance")[];
6205
6372
  references: components["schemas"]["InvestigationReferenceItem"][];
6206
6373
  referenced_documents: components["schemas"]["InvestigationReferenceBuckets"];
6207
6374
  } | null;
@@ -6408,6 +6575,11 @@ export interface components {
6408
6575
  max_capacity_in_group: number | null;
6409
6576
  is_available_globally: boolean;
6410
6577
  is_available_in_group: boolean;
6578
+ /** @default [] */
6579
+ missing_required_skills: {
6580
+ id: string;
6581
+ name: string;
6582
+ }[];
6411
6583
  } | null;
6412
6584
  peers: {
6413
6585
  agent_id: number;
@@ -6420,6 +6592,16 @@ export interface components {
6420
6592
  max_capacity_in_group: number | null;
6421
6593
  is_available_globally: boolean;
6422
6594
  is_available_in_group: boolean;
6595
+ /** @default [] */
6596
+ missing_required_skills: {
6597
+ id: string;
6598
+ name: string;
6599
+ }[];
6600
+ }[];
6601
+ /** @default [] */
6602
+ required_skills: {
6603
+ id: string;
6604
+ name: string;
6423
6605
  }[];
6424
6606
  } | null;
6425
6607
  destination_id?: string;
@@ -6588,6 +6770,12 @@ export interface components {
6588
6770
  /** @constant */
6589
6771
  type: "sub_status_removed_by_api";
6590
6772
  sub_status_id: string | null;
6773
+ } | {
6774
+ /** @enum {string} */
6775
+ type: "tag_added_by_system" | "tag_added_by_agent" | "tag_added_by_api" | "tag_added_by_integration" | "tag_removed_by_system" | "tag_removed_by_agent" | "tag_removed_by_api" | "tag_removed_by_integration";
6776
+ tags: {
6777
+ name: string;
6778
+ }[];
6591
6779
  } | {
6592
6780
  /** @constant */
6593
6781
  type: "ai_resolved_issue";
@@ -6624,6 +6812,9 @@ export interface components {
6624
6812
  type: "system_reopened_session";
6625
6813
  workflow_id: string | null;
6626
6814
  workflow_run_id: string | null;
6815
+ } | {
6816
+ /** @constant */
6817
+ type: "integration_reopened_session";
6627
6818
  } | {
6628
6819
  /** @constant */
6629
6820
  type: "ai_reopened_session";
@@ -6652,6 +6843,10 @@ export interface components {
6652
6843
  /** @constant */
6653
6844
  type: "agent_assigned_by_system";
6654
6845
  assigned_agent_id?: number;
6846
+ } | {
6847
+ /** @constant */
6848
+ type: "agent_assigned_by_integration";
6849
+ assigned_agent_id?: number;
6655
6850
  } | {
6656
6851
  /** @constant */
6657
6852
  type: "agent_assigned_by_user";
@@ -6661,6 +6856,10 @@ export interface components {
6661
6856
  /** @constant */
6662
6857
  type: "agent_unassigned_by_system";
6663
6858
  unassigned_agent_id?: number;
6859
+ } | {
6860
+ /** @constant */
6861
+ type: "agent_unassigned_by_integration";
6862
+ unassigned_agent_id?: number;
6664
6863
  } | {
6665
6864
  /** @constant */
6666
6865
  type: "agent_unassigned_by_user";
@@ -6865,7 +7064,7 @@ export interface components {
6865
7064
  /** @enum {string} */
6866
7065
  source_type: "custom_training" | "help_center" | "integration" | "website";
6867
7066
  /** @description External source the item was synced from (present when listing). */
6868
- data_source?: ("confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "ai_instructions" | "custom_training" | "website") | null;
7067
+ data_source?: ("confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "hubspot_kb" | "ai_instructions" | "custom_training" | "website") | null;
6869
7068
  stream?: string | null;
6870
7069
  source_url: string | null;
6871
7070
  /** @description Contact segment ids this item is restricted to. Empty = available to all contacts. */
@@ -6923,12 +7122,12 @@ export interface components {
6923
7122
  end_date: string;
6924
7123
  reasons: {
6925
7124
  /** @enum {string} */
6926
- reason: "based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance";
7125
+ reason: "ai_implied_handoff" | "based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance";
6927
7126
  count: number;
6928
7127
  percentage: number;
6929
7128
  }[];
6930
7129
  reason_combinations: {
6931
- reasons: ("based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance")[];
7130
+ reasons: ("ai_implied_handoff" | "based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance")[];
6932
7131
  session_count: number;
6933
7132
  percentage: number;
6934
7133
  }[];
@@ -7013,6 +7212,38 @@ export interface components {
7013
7212
  /** @description When the organization was last updated. */
7014
7213
  updated_at: string | null;
7015
7214
  };
7215
+ PublicResourceUsageConversationsDto: {
7216
+ conversations: {
7217
+ session_id: string;
7218
+ /** @description Inbox ticket number, if assigned */
7219
+ ticket_number: number | null;
7220
+ /** @description The conversation’s most recent message */
7221
+ last_message: string | null;
7222
+ /** @description AI replies in this conversation that used the resource */
7223
+ reply_count: number;
7224
+ /** @description ISO 8601 timestamp of first use in this conversation */
7225
+ first_used_at: string;
7226
+ /** @description ISO 8601 timestamp of most recent use */
7227
+ last_used_at: string;
7228
+ }[];
7229
+ /** @description Distinct conversations matching the lookup */
7230
+ total_sessions: number;
7231
+ };
7232
+ PublicResourceUsageSummaryDto: {
7233
+ /** @description Distinct conversations that used this resource */
7234
+ session_count: number;
7235
+ /** @description Distinct conversations where the resource was applied */
7236
+ applied_sessions: number;
7237
+ /** @description Total applications/invocations */
7238
+ applied_replies: number;
7239
+ /** @description Distinct conversations where an instruction was in context (instructions only) */
7240
+ available_sessions: number;
7241
+ available_replies: number;
7242
+ /** @description ISO 8601 timestamp of first use */
7243
+ first_used_at: string | null;
7244
+ /** @description ISO 8601 timestamp of most recent use */
7245
+ last_used_at: string | null;
7246
+ };
7016
7247
  AddContactsToSequenceOutput: {
7017
7248
  run_id: string;
7018
7249
  };
@@ -7365,7 +7596,7 @@ export interface components {
7365
7596
  */
7366
7597
  type: "Unary" | "Binary" | "Logical";
7367
7598
  /** @description Field types this operator can be applied to */
7368
- applies_to: ("String" | "Number" | "Boolean" | "Array" | "Object" | "DateTime" | "LongText" | "Url" | "Email" | "Select" | "LazySelect" | "Code" | "MultiSelect" | "JsonSchema" | "Any" | "AnyObject" | "RichText" | "File" | "PhoneNumber" | "DateOnly" | "CronExpression" | "Integer")[];
7599
+ applies_to: ("String" | "Number" | "Boolean" | "Array" | "Object" | "DateTime" | "LongText" | "Url" | "Email" | "Select" | "LazySelect" | "Code" | "MultiSelect" | "LazyMultiSelect" | "JsonSchema" | "Any" | "AnyObject" | "RichText" | "File" | "PhoneNumber" | "DateOnly" | "CronExpression" | "Integer")[];
7369
7600
  };
7370
7601
  WorkflowDefinitionsPublicDto: {
7371
7602
  /** @description Available action types with their input/output schemas */
@@ -7380,7 +7611,7 @@ export interface components {
7380
7611
  }[];
7381
7612
  /** @description Condition operators for if-else blocks, from the engine registry. This is the complete set the runtime evaluates — always pick "operatorName" from this list. */
7382
7613
  operators: components["schemas"]["OperatorPublicDto"][];
7383
- /** @description Field schemas for the extra reference scopes available in every run, beyond the trigger payload and step outputs. Each entry's "name" is the scope root and its "properties" are the referenceable fields: {{metadata.<field>}} (date/time of the run), {{run.<field>}}, {{workflow.<field>}}, {{organization.<field>}}, and {{variables.<key>}} for the organization's global variables. */
7614
+ /** @description Field schemas for the extra reference scopes available in every run, beyond the trigger payload and step outputs. Each entry's "name" is the scope root and its "properties" are the referenceable fields: {{metadata.<field>}} (date/time of the run), {{run.<field>}}, {{workflow.<field>}}, {{organization.<field>}}, and {{variables.<key>}} for the organization's global variables. Leaf scopes have no "properties" and are referenced directly, e.g. {{routingSkills}} — a JSON string of every org skill (name + description). */
7384
7615
  extra_variables: unknown[];
7385
7616
  };
7386
7617
  TestWorkflowPublicOutput: {
@@ -7479,7 +7710,7 @@ export interface components {
7479
7710
  summary: string;
7480
7711
  explanation: string | null;
7481
7712
  sentiment: string | null;
7482
- reasons: ("based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance")[];
7713
+ reasons: ("ai_implied_handoff" | "based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance")[];
7483
7714
  references: {
7484
7715
  /** @enum {string} */
7485
7716
  reference_type: "ai_profile" | "instruction" | "knowledge" | "prohibited_topic" | "tool";
@@ -7569,12 +7800,13 @@ export interface components {
7569
7800
  records: unknown | null;
7570
7801
  }[];
7571
7802
  ListEmailTemplatesOutput: components["schemas"]["EmailTemplateDto"][];
7803
+ ListMacrosOutput: components["schemas"]["SavedReplyDto"][];
7572
7804
  ListHandoffEventsOutput: {
7573
7805
  items: {
7574
7806
  session_id: string;
7575
7807
  summary: string;
7576
7808
  explanation: string | null;
7577
- reasons: ("based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance")[];
7809
+ reasons: ("ai_implied_handoff" | "based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance")[];
7578
7810
  sentiment: ("angry" | "happy" | "neutral") | null;
7579
7811
  created_at: string;
7580
7812
  }[];
@@ -7651,7 +7883,7 @@ export interface components {
7651
7883
  updated_at: string;
7652
7884
  content?: string;
7653
7885
  /** @enum {string} */
7654
- data_source: "confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "ai_instructions" | "custom_training" | "website";
7886
+ data_source: "confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "hubspot_kb" | "ai_instructions" | "custom_training" | "website";
7655
7887
  stream: string | null;
7656
7888
  relevance_score: number;
7657
7889
  directory_id: string | null;
@@ -9437,7 +9669,7 @@ export interface operations {
9437
9669
  /** @description Full-text search over item titles/content */
9438
9670
  search?: string;
9439
9671
  /** @description Filter to a specific external data source (e.g. website, confluence, notion) */
9440
- data_source?: "confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "ai_instructions" | "custom_training" | "website";
9672
+ data_source?: "confluence" | "notion" | "zendesk_support" | "shopify" | "gitbook" | "intercom" | "front" | "freshdesk" | "hubspot_kb" | "ai_instructions" | "custom_training" | "website";
9441
9673
  visibility?: "internal" | "public";
9442
9674
  page?: number;
9443
9675
  limit?: number;
@@ -10329,13 +10561,173 @@ export interface operations {
10329
10561
  };
10330
10562
  };
10331
10563
  };
10564
+ listMacros: {
10565
+ parameters: {
10566
+ query?: never;
10567
+ header?: never;
10568
+ path?: never;
10569
+ cookie?: never;
10570
+ };
10571
+ requestBody?: never;
10572
+ responses: {
10573
+ /** @description Default Response */
10574
+ 200: {
10575
+ headers: {
10576
+ [name: string]: unknown;
10577
+ };
10578
+ content: {
10579
+ "application/json": components["schemas"]["ListMacrosOutput"];
10580
+ };
10581
+ };
10582
+ /** @description Internal Server Error */
10583
+ 500: {
10584
+ headers: {
10585
+ [name: string]: unknown;
10586
+ };
10587
+ content: {
10588
+ "application/json": components["schemas"]["ErrorDto"];
10589
+ };
10590
+ };
10591
+ };
10592
+ };
10593
+ createMacro: {
10594
+ parameters: {
10595
+ query?: never;
10596
+ header?: never;
10597
+ path?: never;
10598
+ cookie?: never;
10599
+ };
10600
+ requestBody: {
10601
+ content: {
10602
+ "application/json": components["schemas"]["CreateMacroInput"];
10603
+ };
10604
+ };
10605
+ responses: {
10606
+ /** @description Default Response */
10607
+ 201: {
10608
+ headers: {
10609
+ [name: string]: unknown;
10610
+ };
10611
+ content: {
10612
+ "application/json": components["schemas"]["SavedReplyDto"];
10613
+ };
10614
+ };
10615
+ /** @description Internal Server Error */
10616
+ 500: {
10617
+ headers: {
10618
+ [name: string]: unknown;
10619
+ };
10620
+ content: {
10621
+ "application/json": components["schemas"]["ErrorDto"];
10622
+ };
10623
+ };
10624
+ };
10625
+ };
10626
+ getMacro: {
10627
+ parameters: {
10628
+ query?: never;
10629
+ header?: never;
10630
+ path: {
10631
+ /** @description Macro ID */
10632
+ id: string;
10633
+ };
10634
+ cookie?: never;
10635
+ };
10636
+ requestBody?: never;
10637
+ responses: {
10638
+ /** @description Default Response */
10639
+ 200: {
10640
+ headers: {
10641
+ [name: string]: unknown;
10642
+ };
10643
+ content: {
10644
+ "application/json": components["schemas"]["SavedReplyDto"];
10645
+ };
10646
+ };
10647
+ /** @description Internal Server Error */
10648
+ 500: {
10649
+ headers: {
10650
+ [name: string]: unknown;
10651
+ };
10652
+ content: {
10653
+ "application/json": components["schemas"]["ErrorDto"];
10654
+ };
10655
+ };
10656
+ };
10657
+ };
10658
+ deleteMacro: {
10659
+ parameters: {
10660
+ query?: never;
10661
+ header?: never;
10662
+ path: {
10663
+ /** @description Macro ID */
10664
+ id: string;
10665
+ };
10666
+ cookie?: never;
10667
+ };
10668
+ requestBody?: never;
10669
+ responses: {
10670
+ /** @description Default Response */
10671
+ 204: {
10672
+ headers: {
10673
+ [name: string]: unknown;
10674
+ };
10675
+ content?: never;
10676
+ };
10677
+ /** @description Internal Server Error */
10678
+ 500: {
10679
+ headers: {
10680
+ [name: string]: unknown;
10681
+ };
10682
+ content: {
10683
+ "application/json": components["schemas"]["ErrorDto"];
10684
+ };
10685
+ };
10686
+ };
10687
+ };
10688
+ updateMacro: {
10689
+ parameters: {
10690
+ query?: never;
10691
+ header?: never;
10692
+ path: {
10693
+ /** @description Macro ID */
10694
+ id: string;
10695
+ };
10696
+ cookie?: never;
10697
+ };
10698
+ requestBody: {
10699
+ content: {
10700
+ "application/json": components["schemas"]["UpdateMacroInput"];
10701
+ };
10702
+ };
10703
+ responses: {
10704
+ /** @description Default Response */
10705
+ 200: {
10706
+ headers: {
10707
+ [name: string]: unknown;
10708
+ };
10709
+ content: {
10710
+ "application/json": components["schemas"]["SavedReplyDto"];
10711
+ };
10712
+ };
10713
+ /** @description Internal Server Error */
10714
+ 500: {
10715
+ headers: {
10716
+ [name: string]: unknown;
10717
+ };
10718
+ content: {
10719
+ "application/json": components["schemas"]["ErrorDto"];
10720
+ };
10721
+ };
10722
+ };
10723
+ };
10332
10724
  listHandoffEvents: {
10333
10725
  parameters: {
10334
10726
  query?: {
10335
10727
  /** @description Pagination cursor from a previous response */
10336
10728
  cursor?: string;
10337
10729
  /** @description Only return handoffs that include this reason */
10338
- reason?: "based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance";
10730
+ reason?: "ai_implied_handoff" | "based_on_instructions" | "instructions_not_clear" | "insufficient_knowledge" | "insufficient_tools" | "prohibited_topic" | "user_requested_human_assistance";
10339
10731
  /** @description Start date in ISO 8601 format (defaults to 30 days ago) */
10340
10732
  start_date?: string;
10341
10733
  /** @description End date in ISO 8601 format (defaults to now) */
@@ -12012,6 +12404,79 @@ export interface operations {
12012
12404
  };
12013
12405
  };
12014
12406
  };
12407
+ listResourceConversations: {
12408
+ parameters: {
12409
+ query?: {
12410
+ usageKind?: "applied" | "available";
12411
+ from?: unknown;
12412
+ to?: unknown;
12413
+ limit?: number;
12414
+ offset?: number;
12415
+ };
12416
+ header?: never;
12417
+ path: {
12418
+ resource_type: "action" | "instruction" | "knowledge";
12419
+ resource_id: string;
12420
+ };
12421
+ cookie?: never;
12422
+ };
12423
+ requestBody?: never;
12424
+ responses: {
12425
+ /** @description Default Response */
12426
+ 200: {
12427
+ headers: {
12428
+ [name: string]: unknown;
12429
+ };
12430
+ content: {
12431
+ "application/json": components["schemas"]["PublicResourceUsageConversationsDto"];
12432
+ };
12433
+ };
12434
+ /** @description Internal Server Error */
12435
+ 500: {
12436
+ headers: {
12437
+ [name: string]: unknown;
12438
+ };
12439
+ content: {
12440
+ "application/json": components["schemas"]["ErrorDto"];
12441
+ };
12442
+ };
12443
+ };
12444
+ };
12445
+ getResourceUsageSummary: {
12446
+ parameters: {
12447
+ query?: {
12448
+ from?: unknown;
12449
+ to?: unknown;
12450
+ };
12451
+ header?: never;
12452
+ path: {
12453
+ resource_type: "action" | "instruction" | "knowledge";
12454
+ resource_id: string;
12455
+ };
12456
+ cookie?: never;
12457
+ };
12458
+ requestBody?: never;
12459
+ responses: {
12460
+ /** @description Default Response */
12461
+ 200: {
12462
+ headers: {
12463
+ [name: string]: unknown;
12464
+ };
12465
+ content: {
12466
+ "application/json": components["schemas"]["PublicResourceUsageSummaryDto"];
12467
+ };
12468
+ };
12469
+ /** @description Internal Server Error */
12470
+ 500: {
12471
+ headers: {
12472
+ [name: string]: unknown;
12473
+ };
12474
+ content: {
12475
+ "application/json": components["schemas"]["ErrorDto"];
12476
+ };
12477
+ };
12478
+ };
12479
+ };
12015
12480
  createSequence: {
12016
12481
  parameters: {
12017
12482
  query?: never;