@opencx/mcp 1.15.4 → 1.15.6

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
@@ -1298,7 +1298,7 @@ export interface paths {
1298
1298
  put?: never;
1299
1299
  /**
1300
1300
  * Block IP addresses
1301
- * @description Block one or more IP addresses or CIDR ranges. Pass a comma-separated string for multiple values (e.g. "203.0.113.7, 198.51.100.0/24"). Both IPv4 and IPv6 are supported.
1301
+ * @description Block one or more IP addresses or CIDR ranges. Pass a comma-separated string for multiple values (e.g. "203.0.113.7, 198.51.100.0/24"). Both IPv4 and IPv6 are supported. Applies to web widget traffic: email and WhatsApp reach us through the provider’s servers and carry no visitor IP, so block those by domain or contact instead. A session first seen on the widget from a blocked address does stay blocked if it later continues on another channel.
1302
1302
  */
1303
1303
  post: operations["blockIps"];
1304
1304
  delete?: never;
@@ -1327,6 +1327,26 @@ export interface paths {
1327
1327
  patch?: never;
1328
1328
  trace?: never;
1329
1329
  };
1330
+ "/blocklist/ips/session-activity": {
1331
+ parameters: {
1332
+ query?: never;
1333
+ header?: never;
1334
+ path?: never;
1335
+ cookie?: never;
1336
+ };
1337
+ /**
1338
+ * List IP addresses seen in recent sessions
1339
+ * @description Which IP addresses have been opening sessions, ranked by volume, with the number of distinct contacts seen from each. A high contact count against a single address is the signature of one visitor minting a throwaway contact per message. Use this to decide what to block instead of guessing at addresses. Covers widget channels only — other channels carry no client IP.
1340
+ */
1341
+ get: operations["listSessionIpActivity"];
1342
+ put?: never;
1343
+ post?: never;
1344
+ delete?: never;
1345
+ options?: never;
1346
+ head?: never;
1347
+ patch?: never;
1348
+ trace?: never;
1349
+ };
1330
1350
  "/blocklist/ips/{id}": {
1331
1351
  parameters: {
1332
1352
  query?: never;
@@ -1531,7 +1551,7 @@ export interface paths {
1531
1551
  put?: never;
1532
1552
  /**
1533
1553
  * Create a macro
1534
- * @description Create a new saved-reply macro. Use {{variable}} syntax in content to reference system or custom variables.
1554
+ * @description Create a new saved-reply macro. Use {{variable}} syntax in content to reference system or custom variables. Attachments are dashboard-authored and cannot be set via the public API.
1535
1555
  */
1536
1556
  post: operations["createMacro"];
1537
1557
  delete?: never;
@@ -1583,7 +1603,7 @@ export interface paths {
1583
1603
  head?: never;
1584
1604
  /**
1585
1605
  * Update a macro
1586
- * @description Partially update a saved-reply macro.
1606
+ * @description Partially update a saved-reply macro. Attachments are dashboard-authored and cannot be changed via the public API; text-only updates leave them untouched.
1587
1607
  */
1588
1608
  patch: operations["updateMacro"];
1589
1609
  trace?: never;
@@ -4076,6 +4096,86 @@ export interface paths {
4076
4096
  patch?: never;
4077
4097
  trace?: never;
4078
4098
  };
4099
+ "/salesforce-crm/connection/status": {
4100
+ parameters: {
4101
+ query?: never;
4102
+ header?: never;
4103
+ path?: never;
4104
+ cookie?: never;
4105
+ };
4106
+ /**
4107
+ * Get Salesforce CRM connection status
4108
+ * @description Whether the organization has an active Salesforce CRM connection. Probe this before rendering any Salesforce-backed surface; 404 means the organization never connected.
4109
+ */
4110
+ get: operations["getSalesforceCrmConnectionStatus"];
4111
+ put?: never;
4112
+ post?: never;
4113
+ delete?: never;
4114
+ options?: never;
4115
+ head?: never;
4116
+ patch?: never;
4117
+ trace?: never;
4118
+ };
4119
+ "/salesforce-crm/contacts/{contactId}": {
4120
+ parameters: {
4121
+ query?: never;
4122
+ header?: never;
4123
+ path?: never;
4124
+ cookie?: never;
4125
+ };
4126
+ /**
4127
+ * Get a contact's Salesforce CRM panel
4128
+ * @description The full Salesforce view of one OpenCX contact: the matched Contact or Lead, its account, opportunities, past cases, and the organization's configured custom objects. `lookup_status` distinguishes a confirmed no-match (`none`) from Salesforce being unreachable (`failed`) — treat `failed` as unknown, never as absence.
4129
+ */
4130
+ get: operations["getSalesforceCrmContact"];
4131
+ put?: never;
4132
+ post?: never;
4133
+ delete?: never;
4134
+ options?: never;
4135
+ head?: never;
4136
+ patch?: never;
4137
+ trace?: never;
4138
+ };
4139
+ "/salesforce-crm/contacts": {
4140
+ parameters: {
4141
+ query?: never;
4142
+ header?: never;
4143
+ path?: never;
4144
+ cookie?: never;
4145
+ };
4146
+ /**
4147
+ * List cached Salesforce CRM records
4148
+ * @description The synced Salesforce Contacts and Leads the organization has cached, newest first. Served from the cache — this never queries Salesforce.
4149
+ */
4150
+ get: operations["listSalesforceCrmContacts"];
4151
+ put?: never;
4152
+ post?: never;
4153
+ delete?: never;
4154
+ options?: never;
4155
+ head?: never;
4156
+ patch?: never;
4157
+ trace?: never;
4158
+ };
4159
+ "/salesforce-crm/contacts/search": {
4160
+ parameters: {
4161
+ query?: never;
4162
+ header?: never;
4163
+ path?: never;
4164
+ cookie?: never;
4165
+ };
4166
+ /**
4167
+ * Search cached Salesforce CRM records
4168
+ * @description Match cached Salesforce records by exact email and/or phone (both given means both must match). Served from the cache — this never queries Salesforce. At least one of `email` or `phone` is required.
4169
+ */
4170
+ get: operations["searchSalesforceCrmContacts"];
4171
+ put?: never;
4172
+ post?: never;
4173
+ delete?: never;
4174
+ options?: never;
4175
+ head?: never;
4176
+ patch?: never;
4177
+ trace?: never;
4178
+ };
4079
4179
  "/companion/notify-team": {
4080
4180
  parameters: {
4081
4181
  query?: never;
@@ -4389,6 +4489,7 @@ export interface components {
4389
4489
  } | {
4390
4490
  /** @constant */
4391
4491
  type: "contacts_phone_number_in";
4492
+ /** @description Full phone numbers, matched exactly on digits (formatting like +, spaces, and dashes is ignored). Use * inside an entry for partial/substring matching. */
4392
4493
  phone_number_in: string[];
4393
4494
  } | {
4394
4495
  /** @constant */
@@ -4662,6 +4763,13 @@ export interface components {
4662
4763
  auto_send_on_close?: boolean;
4663
4764
  /** @description Delay in minutes before sending CSAT after session closes */
4664
4765
  send_delay_minutes?: number;
4766
+ /**
4767
+ * @description How often the same session may be surveyed: once_per_session (default, one survey ever), once_per_close (one per closure, so a reopened session can be surveyed again), or once_until_answered (re-ask after resend_after_days until the customer scores it)
4768
+ * @enum {string}
4769
+ */
4770
+ resend_policy?: "once_per_close" | "once_per_session" | "once_until_answered";
4771
+ /** @description Days to wait before re-asking an unanswered survey. Only used when resend_policy is once_until_answered */
4772
+ resend_after_days?: number;
4665
4773
  /** @description Full-HTML template for the public CSAT feedback page. Null/empty clears it (default page). */
4666
4774
  web_template_html?: string | null;
4667
4775
  /** @description Full-HTML template for the CSAT request email. Null/empty clears it (default email). */
@@ -4714,16 +4822,6 @@ export interface components {
4714
4822
  /** @description Optional reason for redaction */
4715
4823
  reason?: string;
4716
4824
  };
4717
- CreateSavedReplyDto: {
4718
- category: string;
4719
- title: string;
4720
- content: string;
4721
- };
4722
- UpdateSavedReplyDto: {
4723
- category?: string;
4724
- title?: string;
4725
- content?: string;
4726
- };
4727
4825
  UpdateAgentAvailabilityPublicDto: {
4728
4826
  /** @description Whether the agent is available to take chats */
4729
4827
  is_available?: boolean;
@@ -5100,6 +5198,7 @@ export interface components {
5100
5198
  } | {
5101
5199
  /** @constant */
5102
5200
  type: "contacts_phone_number_in";
5201
+ /** @description Full phone numbers, matched exactly on digits (formatting like +, spaces, and dashes is ignored). Use * inside an entry for partial/substring matching. */
5103
5202
  phone_number_in: string[];
5104
5203
  } | {
5105
5204
  /** @constant */
@@ -5465,6 +5564,10 @@ export interface components {
5465
5564
  };
5466
5565
  delay_in_minutes?: number;
5467
5566
  }[];
5567
+ /** @description Hold step sends outside the org office-hours window (defaults to true for new sequences) */
5568
+ respect_office_hours?: boolean;
5569
+ /** @description Named office-hours config to use as the send window; null = org default hours */
5570
+ office_hours_id?: string | null;
5468
5571
  };
5469
5572
  AddContactsToSequenceInput: {
5470
5573
  contacts: ({
@@ -5769,11 +5872,21 @@ export interface components {
5769
5872
  ips: string;
5770
5873
  /** @description Why these addresses are being blocked */
5771
5874
  reason?: string;
5875
+ /** @description Lift the block automatically after this many hours (max 8760). Omit for a permanent block. Automated callers should always set this: a shared or carrier-grade NAT address fronts many people, and a permanent block on one bans all of them. */
5876
+ expires_in_hours?: number;
5772
5877
  };
5773
5878
  CreateEmailTemplatePublicInput: components["schemas"]["CreateEmailTemplateBodyDto"];
5774
5879
  UpdateEmailTemplatePublicInput: components["schemas"]["CreateEmailTemplateBodyDto"];
5775
- CreateMacroInput: components["schemas"]["CreateSavedReplyDto"];
5776
- UpdateMacroInput: components["schemas"]["UpdateSavedReplyDto"];
5880
+ CreateMacroInput: {
5881
+ category: string;
5882
+ title: string;
5883
+ content: string;
5884
+ };
5885
+ UpdateMacroInput: {
5886
+ category?: string;
5887
+ title?: string;
5888
+ content?: string;
5889
+ };
5777
5890
  UpsertTagInputDto: {
5778
5891
  /** @description Tag name (e.g. "billing", "refund", "feature-request") */
5779
5892
  tag_name: string;
@@ -5901,6 +6014,82 @@ export interface components {
5901
6014
  end_time: string;
5902
6015
  }[];
5903
6016
  };
6017
+ SalesforceCrmContactDetailsDto: {
6018
+ id: string;
6019
+ salesforce_record_id: string;
6020
+ /** @enum {string} */
6021
+ record_type: "Contact" | "Lead";
6022
+ email?: string;
6023
+ phone?: string;
6024
+ first_name?: string;
6025
+ last_name?: string;
6026
+ company?: string;
6027
+ salesforce_data: unknown;
6028
+ cached_at: string;
6029
+ salesforce_link: string;
6030
+ };
6031
+ SalesforceCrmAccountDetailsDto: {
6032
+ salesforce_account_id: string;
6033
+ name?: string;
6034
+ website?: string;
6035
+ industry?: string;
6036
+ number_of_employees?: string;
6037
+ annual_revenue?: string;
6038
+ billing_city?: string;
6039
+ billing_state?: string;
6040
+ billing_country?: string;
6041
+ salesforce_data: unknown;
6042
+ salesforce_link: string;
6043
+ };
6044
+ SalesforceCrmOpportunityDetailsDto: {
6045
+ salesforce_opportunity_id: string;
6046
+ name?: string;
6047
+ stage_name?: string;
6048
+ amount?: string;
6049
+ close_date?: string;
6050
+ is_closed?: boolean;
6051
+ is_won?: boolean;
6052
+ salesforce_data: unknown;
6053
+ salesforce_link: string;
6054
+ };
6055
+ SalesforceCrmCaseDetailsDto: {
6056
+ salesforce_case_id: string;
6057
+ case_number?: string;
6058
+ subject?: string;
6059
+ status?: string;
6060
+ priority?: string;
6061
+ origin?: string;
6062
+ created_date?: string;
6063
+ last_modified_date?: string;
6064
+ salesforce_data: unknown;
6065
+ salesforce_link: string;
6066
+ };
6067
+ SalesforceCrmCustomObjectRecordDto: {
6068
+ id: string;
6069
+ values: {
6070
+ [key: string]: string | number | boolean | null;
6071
+ };
6072
+ salesforce_link: string;
6073
+ };
6074
+ SalesforceCrmCustomObjectSectionDto: {
6075
+ object_api_name: string;
6076
+ label: string;
6077
+ records?: components["schemas"]["SalesforceCrmCustomObjectRecordDto"][];
6078
+ };
6079
+ ConsumerSalesforceCrmContactResponseDto: {
6080
+ consumer_id: string;
6081
+ consumer_email?: string;
6082
+ consumer_phone?: string;
6083
+ salesforce_contact?: components["schemas"]["SalesforceCrmContactDetailsDto"];
6084
+ accounts?: components["schemas"]["SalesforceCrmAccountDetailsDto"][];
6085
+ opportunities?: components["schemas"]["SalesforceCrmOpportunityDetailsDto"][];
6086
+ previous_cases?: components["schemas"]["SalesforceCrmCaseDetailsDto"][];
6087
+ custom_objects?: components["schemas"]["SalesforceCrmCustomObjectSectionDto"][];
6088
+ found_in_salesforce: boolean;
6089
+ /** @enum {string} */
6090
+ lookup_status: "found" | "none" | "failed";
6091
+ message: string;
6092
+ };
5904
6093
  GenericResponseDto: {
5905
6094
  data?: {
5906
6095
  success: boolean;
@@ -5919,6 +6108,148 @@ export interface components {
5919
6108
  url: string;
5920
6109
  openai_file_id?: string;
5921
6110
  };
6111
+ WhatsAppTemplateDto: {
6112
+ id: string;
6113
+ name: string;
6114
+ /** @enum {string} */
6115
+ status: "APPROVED" | "REJECTED" | "PENDING" | "PAUSED" | "DISABLED" | "IN_APPEAL" | "PENDING_DELETION" | "DELETED" | "LIMIT_EXCEEDED" | "ARCHIVED";
6116
+ /** @enum {string} */
6117
+ category: "UTILITY" | "MARKETING" | "AUTHENTICATION";
6118
+ /** @enum {string} */
6119
+ parameter_format: "NAMED" | "POSITIONAL";
6120
+ language: string;
6121
+ components?: ({
6122
+ /** @constant */
6123
+ type: "HEADER";
6124
+ /** @constant */
6125
+ format: "TEXT";
6126
+ /** @description 60 chars max */
6127
+ text: string;
6128
+ example?: {
6129
+ header_text: string[];
6130
+ } | {
6131
+ header_text_named_params: {
6132
+ param_name: string;
6133
+ example: string;
6134
+ }[];
6135
+ };
6136
+ } | {
6137
+ /** @constant */
6138
+ type: "HEADER";
6139
+ /**
6140
+ * @description
6141
+ * /**
6142
+ * * IMAGE: JPG | PNG
6143
+ * * DOCUMENT: PDF
6144
+ * * VIDEO: MP4
6145
+ * *\/
6146
+ *
6147
+ * @enum {string}
6148
+ */
6149
+ format: "IMAGE" | "DOCUMENT" | "VIDEO";
6150
+ example?: {
6151
+ /** @description
6152
+ * /**
6153
+ * * A handle for the media uploaded through the Resumable Upload API
6154
+ * * https://developers.facebook.com/docs/graph-api/guides/upload
6155
+ * *\/
6156
+ * */
6157
+ header_handle: string | string[];
6158
+ };
6159
+ } | {
6160
+ /** @constant */
6161
+ type: "HEADER";
6162
+ /** @constant */
6163
+ format: "LOCATION";
6164
+ } | {
6165
+ /** @constant */
6166
+ type: "BODY";
6167
+ /** @description 1024 chars max, or 32768 if `body` is the only component in the template */
6168
+ text: string;
6169
+ example?: {
6170
+ /** @description Yes, this is an array of arrays, but only the first array is used, just like `header_text` */
6171
+ body_text: string[][];
6172
+ } | {
6173
+ body_text_named_params: {
6174
+ param_name: string;
6175
+ example: string;
6176
+ }[];
6177
+ };
6178
+ } | {
6179
+ /** @constant */
6180
+ type: "FOOTER";
6181
+ /** @description 60 chars max */
6182
+ text: string;
6183
+ } | {
6184
+ /**
6185
+ * @description
6186
+ * /**
6187
+ * * Templates are limited to 10 quick reply buttons. If using quick reply buttons with other buttons,
6188
+ * * buttons must be organized into two groups: quick reply buttons and non-quick reply buttons.
6189
+ * * If grouped incorrectly, the API will return an error indicating an invalid combination.
6190
+ * *
6191
+ * * Examples of valid groupings:
6192
+ * * - Quick Reply, Quick Reply
6193
+ * * - Quick Reply, Quick Reply, URL, Phone
6194
+ * * - URL, Phone, Quick Reply, Quick Reply
6195
+ * *
6196
+ * * Examples of invalid groupings:
6197
+ * * - Quick Reply, URL, Quick Reply
6198
+ * * - URL, Quick Reply, URL
6199
+ * *\/
6200
+ *
6201
+ * @constant
6202
+ */
6203
+ type: "BUTTONS";
6204
+ buttons: ({
6205
+ /** @constant */
6206
+ type: "QUICK_REPLY";
6207
+ /** @description 25 chars max */
6208
+ text: string;
6209
+ } | {
6210
+ /** @constant */
6211
+ type: "URL";
6212
+ text: string;
6213
+ /** @description 2000 chars max */
6214
+ url: string;
6215
+ example?: [
6216
+ string
6217
+ ];
6218
+ } | {
6219
+ /** @constant */
6220
+ type: "PHONE_NUMBER";
6221
+ /** @description 25 chars max */
6222
+ text: string;
6223
+ /** @description 20 chars max */
6224
+ phone_number: string;
6225
+ } | {
6226
+ /** @constant */
6227
+ type: "COPY_CODE";
6228
+ /** @description 15 chars max */
6229
+ example: string | string[];
6230
+ } | {
6231
+ /** @constant */
6232
+ type: "FLOW";
6233
+ /** @description 25 chars max */
6234
+ text: string;
6235
+ /** @enum {string} */
6236
+ icon: "DOCUMENT" | "PROMOTION" | "REVIEW";
6237
+ flow_id?: string;
6238
+ flow_name?: string;
6239
+ flow_json?: {
6240
+ [key: string]: unknown;
6241
+ };
6242
+ /** @enum {string} */
6243
+ flow_action: "data_exchange" | "navigate";
6244
+ navigate_screen?: string;
6245
+ } | {
6246
+ /** @constant */
6247
+ type: "MPM";
6248
+ example: string;
6249
+ })[];
6250
+ })[] | null;
6251
+ rejected_reason?: string | null;
6252
+ };
5922
6253
  PhoneAgentDto: {
5923
6254
  id: string;
5924
6255
  org_id: string;
@@ -6232,6 +6563,9 @@ export interface components {
6232
6563
  } | null;
6233
6564
  steps: components["schemas"]["SequenceStep"][];
6234
6565
  is_continuous: boolean;
6566
+ reply_instructions: string | null;
6567
+ respect_office_hours: boolean;
6568
+ office_hours_id: string | null;
6235
6569
  started_at: string | null;
6236
6570
  canceled_at: string | null;
6237
6571
  ended_at: string | null;
@@ -6240,10 +6574,11 @@ export interface components {
6240
6574
  StartOneOffSequenceOutputDto: {
6241
6575
  data?: {
6242
6576
  success: boolean;
6577
+ run_id?: string;
6243
6578
  };
6244
6579
  error?: {
6245
6580
  /** @enum {string} */
6246
- code: "sequence_not_found" | "one_off_sequence_is_canceled" | "sequence_already_started";
6581
+ code: "sequence_not_found" | "one_off_sequence_is_canceled" | "sequence_already_started" | "cannot_schedule_continuous_sequence" | "start_at_in_past";
6247
6582
  status: 400 | 404;
6248
6583
  message: string;
6249
6584
  };
@@ -6348,6 +6683,8 @@ export interface components {
6348
6683
  instructions: {
6349
6684
  id: string;
6350
6685
  title: string;
6686
+ /** @constant */
6687
+ source?: "sequence_campaign";
6351
6688
  }[];
6352
6689
  tools: {
6353
6690
  name: string;
@@ -6370,6 +6707,8 @@ export interface components {
6370
6707
  instructions: {
6371
6708
  id: string;
6372
6709
  title: string;
6710
+ /** @constant */
6711
+ source?: "sequence_campaign";
6373
6712
  }[];
6374
6713
  tools: {
6375
6714
  name: string;
@@ -6522,6 +6861,7 @@ export interface components {
6522
6861
  [key: string]: unknown;
6523
6862
  } | null;
6524
6863
  whatsapp_template_request?: unknown | null;
6864
+ whatsapp_template_snapshot?: unknown | null;
6525
6865
  rule_violation_reflections?: {
6526
6866
  rule_name: string;
6527
6867
  /** @description How the rule was violated */
@@ -6592,7 +6932,7 @@ export interface components {
6592
6932
  }) | null;
6593
6933
  knowledgebase_called?: boolean | null;
6594
6934
  /** @enum {string} */
6595
- 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_integration" | "sub_status_removed_by_system" | "sub_status_set_by_agent" | "sub_status_set_by_api" | "sub_status_set_by_integration" | "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_integration" | "team_assigned_by_system" | "team_assigned_by_user" | "team_unassigned_by_integration" | "team_unassigned_by_system" | "team_unassigned_by_user" | "user_confirmed_the_session_resolved" | "workflow_message" | "workflow_note" | "workflow_triggered";
6935
+ 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" | "session_forwarded" | "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_session_created" | "sub_status_removed_by_agent" | "sub_status_removed_by_api" | "sub_status_removed_by_integration" | "sub_status_removed_by_system" | "sub_status_set_by_agent" | "sub_status_set_by_api" | "sub_status_set_by_integration" | "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_integration" | "team_assigned_by_system" | "team_assigned_by_user" | "team_unassigned_by_integration" | "team_unassigned_by_system" | "team_unassigned_by_user" | "user_confirmed_the_session_resolved" | "workflow_message" | "workflow_note" | "workflow_triggered";
6596
6936
  extra_params?: {
6597
6937
  [key: string]: unknown;
6598
6938
  } | null;
@@ -6622,6 +6962,7 @@ export interface components {
6622
6962
  workflow_run_id?: string | null;
6623
6963
  sequence_id?: string | null;
6624
6964
  whatsapp_template_name?: string | null;
6965
+ whatsapp_template_snapshot?: components["schemas"]["WhatsAppTemplateDto"] | null;
6625
6966
  from_opencx_public_api?: boolean | null;
6626
6967
  sub_status_id?: string | null;
6627
6968
  whatsapp_sent_at?: string | null;
@@ -6713,6 +7054,13 @@ export interface components {
6713
7054
  auto_send_on_close: boolean;
6714
7055
  /** @description Delay in minutes before sending CSAT after session closes */
6715
7056
  send_delay_minutes: number;
7057
+ /**
7058
+ * @description How often the same session may be surveyed: once_per_session, once_per_close, or once_until_answered
7059
+ * @enum {string}
7060
+ */
7061
+ resend_policy: "once_per_close" | "once_per_session" | "once_until_answered";
7062
+ /** @description Days to wait before re-asking an unanswered survey (only used when resend_policy is once_until_answered) */
7063
+ resend_after_days: number;
6716
7064
  /** @description Full-HTML template for the public CSAT feedback page (null = default page) */
6717
7065
  web_template_html: string | null;
6718
7066
  /** @description Full-HTML template for the CSAT request email (null = default email) */
@@ -6971,12 +7319,20 @@ export interface components {
6971
7319
  breaches: number;
6972
7320
  }[];
6973
7321
  };
7322
+ MacroAttachmentDto: {
7323
+ id: string;
7324
+ name: string;
7325
+ size: number;
7326
+ type: string;
7327
+ url: string;
7328
+ };
6974
7329
  SavedReplyDto: {
6975
7330
  id: string;
6976
7331
  org_id: string;
6977
7332
  category: string;
6978
7333
  title: string;
6979
7334
  content: string;
7335
+ attachments: components["schemas"]["MacroAttachmentDto"][];
6980
7336
  /** Format: date-time */
6981
7337
  created_at: string;
6982
7338
  /** Format: date-time */
@@ -6998,6 +7354,35 @@ export interface components {
6998
7354
  enums: components["schemas"]["SavedReplyVariableEnum"][];
6999
7355
  custom: components["schemas"]["SavedReplyVariableDto"][];
7000
7356
  };
7357
+ SalesforceCrmConnectionStatusDto: {
7358
+ is_active: boolean;
7359
+ };
7360
+ SalesforceCrmContactResponseDto: {
7361
+ id: string;
7362
+ organization_id: string;
7363
+ salesforce_record_id: string;
7364
+ /** @enum {string} */
7365
+ record_type: "Contact" | "Lead";
7366
+ email: string | null;
7367
+ phone: string | null;
7368
+ first_name: string | null;
7369
+ last_name: string | null;
7370
+ company: string | null;
7371
+ salesforce_data: {
7372
+ [key: string]: unknown;
7373
+ };
7374
+ /** Format: date-time */
7375
+ cached_at: string;
7376
+ };
7377
+ PaginatedSalesforceCrmContactsResponseDto: {
7378
+ data: components["schemas"]["SalesforceCrmContactResponseDto"][];
7379
+ meta: {
7380
+ total: number;
7381
+ page: number;
7382
+ limit: number;
7383
+ totalPages: number;
7384
+ };
7385
+ };
7001
7386
  AgentAvailability: {
7002
7387
  id: string;
7003
7388
  user_id: number;
@@ -7596,6 +7981,7 @@ export interface components {
7596
7981
  [key: string]: unknown;
7597
7982
  } | null;
7598
7983
  whatsapp_template_request?: unknown | null;
7984
+ whatsapp_template_snapshot?: unknown | null;
7599
7985
  rule_violation_reflections?: {
7600
7986
  rule_name: string;
7601
7987
  /** @description How the rule was violated */
@@ -8960,6 +9346,8 @@ export interface components {
8960
9346
  reason: string | null;
8961
9347
  /** Format: date-time */
8962
9348
  created_at: string;
9349
+ /** @description When the block lifts automatically. Null means it never does. */
9350
+ expires_at: string | null;
8963
9351
  }[];
8964
9352
  total: number;
8965
9353
  page: number;
@@ -8976,6 +9364,8 @@ export interface components {
8976
9364
  reason: string | null;
8977
9365
  /** Format: date-time */
8978
9366
  created_at: string;
9367
+ /** @description When the block lifts automatically. Null means it never does. */
9368
+ expires_at: string | null;
8979
9369
  }[];
8980
9370
  /** @description Addresses that needed no action — already blocked, or not a valid IP/CIDR */
8981
9371
  skipped: string[];
@@ -8994,6 +9384,20 @@ export interface components {
8994
9384
  IpBlockStatusOutput: {
8995
9385
  is_blocked: boolean;
8996
9386
  };
9387
+ SessionIpActivityOutput: {
9388
+ data: {
9389
+ ip: string;
9390
+ session_count: number;
9391
+ contact_count: number;
9392
+ /** Format: date-time */
9393
+ first_seen: string;
9394
+ /** Format: date-time */
9395
+ last_seen: string;
9396
+ is_blocked: boolean;
9397
+ }[];
9398
+ page: number;
9399
+ has_more: boolean;
9400
+ };
8997
9401
  GetCustomDomainsOutput: {
8998
9402
  domainName: string;
8999
9403
  domainNameVerificationStatus: string | null;
@@ -11887,6 +12291,42 @@ export interface operations {
11887
12291
  };
11888
12292
  };
11889
12293
  };
12294
+ listSessionIpActivity: {
12295
+ parameters: {
12296
+ query?: {
12297
+ /** @description How far back to look (default: 30, max: 90) */
12298
+ days?: number;
12299
+ /** @description Page (default: 1) */
12300
+ page?: number;
12301
+ /** @description Results per page (default: 50, max: 200) */
12302
+ limit?: number;
12303
+ };
12304
+ header?: never;
12305
+ path?: never;
12306
+ cookie?: never;
12307
+ };
12308
+ requestBody?: never;
12309
+ responses: {
12310
+ /** @description Default Response */
12311
+ 200: {
12312
+ headers: {
12313
+ [name: string]: unknown;
12314
+ };
12315
+ content: {
12316
+ "application/json": components["schemas"]["SessionIpActivityOutput"];
12317
+ };
12318
+ };
12319
+ /** @description Internal Server Error */
12320
+ 500: {
12321
+ headers: {
12322
+ [name: string]: unknown;
12323
+ };
12324
+ content: {
12325
+ "application/json": components["schemas"]["ErrorDto"];
12326
+ };
12327
+ };
12328
+ };
12329
+ };
11890
12330
  unblockIp: {
11891
12331
  parameters: {
11892
12332
  query?: never;
@@ -14590,6 +15030,10 @@ export interface operations {
14590
15030
  };
14591
15031
  delay_in_minutes?: number;
14592
15032
  }[];
15033
+ /** @description Hold step sends outside the org office-hours window (defaults to true for new sequences) */
15034
+ respect_office_hours?: boolean;
15035
+ /** @description Named office-hours config to use as the send window; null = org default hours */
15036
+ office_hours_id?: string | null;
14593
15037
  };
14594
15038
  };
14595
15039
  };
@@ -16908,6 +17352,132 @@ export interface operations {
16908
17352
  };
16909
17353
  };
16910
17354
  };
17355
+ getSalesforceCrmConnectionStatus: {
17356
+ parameters: {
17357
+ query?: never;
17358
+ header?: never;
17359
+ path?: never;
17360
+ cookie?: never;
17361
+ };
17362
+ requestBody?: never;
17363
+ responses: {
17364
+ /** @description Default Response */
17365
+ 200: {
17366
+ headers: {
17367
+ [name: string]: unknown;
17368
+ };
17369
+ content: {
17370
+ "application/json": components["schemas"]["SalesforceCrmConnectionStatusDto"];
17371
+ };
17372
+ };
17373
+ /** @description Internal Server Error */
17374
+ 500: {
17375
+ headers: {
17376
+ [name: string]: unknown;
17377
+ };
17378
+ content: {
17379
+ "application/json": components["schemas"]["ErrorDto"];
17380
+ };
17381
+ };
17382
+ };
17383
+ };
17384
+ getSalesforceCrmContact: {
17385
+ parameters: {
17386
+ query?: never;
17387
+ header?: never;
17388
+ path: {
17389
+ contactId: string;
17390
+ };
17391
+ cookie?: never;
17392
+ };
17393
+ requestBody?: never;
17394
+ responses: {
17395
+ /** @description Default Response */
17396
+ 200: {
17397
+ headers: {
17398
+ [name: string]: unknown;
17399
+ };
17400
+ content: {
17401
+ "application/json": components["schemas"]["ConsumerSalesforceCrmContactResponseDto"];
17402
+ };
17403
+ };
17404
+ /** @description Internal Server Error */
17405
+ 500: {
17406
+ headers: {
17407
+ [name: string]: unknown;
17408
+ };
17409
+ content: {
17410
+ "application/json": components["schemas"]["ErrorDto"];
17411
+ };
17412
+ };
17413
+ };
17414
+ };
17415
+ listSalesforceCrmContacts: {
17416
+ parameters: {
17417
+ query?: {
17418
+ page?: number;
17419
+ limit?: number;
17420
+ };
17421
+ header?: never;
17422
+ path?: never;
17423
+ cookie?: never;
17424
+ };
17425
+ requestBody?: never;
17426
+ responses: {
17427
+ /** @description Default Response */
17428
+ 200: {
17429
+ headers: {
17430
+ [name: string]: unknown;
17431
+ };
17432
+ content: {
17433
+ "application/json": components["schemas"]["PaginatedSalesforceCrmContactsResponseDto"];
17434
+ };
17435
+ };
17436
+ /** @description Internal Server Error */
17437
+ 500: {
17438
+ headers: {
17439
+ [name: string]: unknown;
17440
+ };
17441
+ content: {
17442
+ "application/json": components["schemas"]["ErrorDto"];
17443
+ };
17444
+ };
17445
+ };
17446
+ };
17447
+ searchSalesforceCrmContacts: {
17448
+ parameters: {
17449
+ query?: {
17450
+ email?: string;
17451
+ phone?: string;
17452
+ page?: number;
17453
+ limit?: number;
17454
+ };
17455
+ header?: never;
17456
+ path?: never;
17457
+ cookie?: never;
17458
+ };
17459
+ requestBody?: never;
17460
+ responses: {
17461
+ /** @description Default Response */
17462
+ 200: {
17463
+ headers: {
17464
+ [name: string]: unknown;
17465
+ };
17466
+ content: {
17467
+ "application/json": components["schemas"]["PaginatedSalesforceCrmContactsResponseDto"];
17468
+ };
17469
+ };
17470
+ /** @description Internal Server Error */
17471
+ 500: {
17472
+ headers: {
17473
+ [name: string]: unknown;
17474
+ };
17475
+ content: {
17476
+ "application/json": components["schemas"]["ErrorDto"];
17477
+ };
17478
+ };
17479
+ };
17480
+ };
16911
17481
  coworkerNotifyTeam: {
16912
17482
  parameters: {
16913
17483
  query?: never;