client.ipAllowlist.getIpAllowlist() -> Intercom.IpAllowlistclient.ipAllowlist.updateIpAllowlist({ ...params }) -> Intercom.IpAllowlistclient.unstable.conversations.listHandlingEvents({ ...params }) -> Intercom.HandlingEventListclient.unstable.workflows.exportWorkflow({ ...params }) -> Intercom.WorkflowExportconversation_attribute_updated_by_user.
+ */
+export interface ConversationAttributeUpdatedByUser {
+ attribute?: ConversationAttributeUpdatedByUser.Attribute;
+ value?: ConversationAttributeUpdatedByUser.Value;
+}
+
+export namespace ConversationAttributeUpdatedByUser {
+ export interface Attribute {
+ /** Name of the CDA updated */
+ name?: string;
+ }
+
+ export interface Value {
+ /** Current value of the CDA updated */
+ name?: string;
+ /** Previous value of the CDA (null for older events) */
+ previous?: string;
+ }
+}
diff --git a/src/api/resources/unstable/types/ConversationSlaAppliedByRule.ts b/src/api/resources/unstable/types/ConversationSlaAppliedByRule.ts
new file mode 100644
index 00000000..8340e44f
--- /dev/null
+++ b/src/api/resources/unstable/types/ConversationSlaAppliedByRule.ts
@@ -0,0 +1,27 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Contains details about SLA applied by modern Operator workflows for conversation part type conversation_sla_applied_by_rule.
+ */
+export interface ConversationSlaAppliedByRule {
+ /** Name of the SLA that was applied */
+ sla_name?: string;
+ /** Target times configured for the SLA (in seconds) */
+ sla_definition?: ConversationSlaAppliedByRule.SlaDefinition;
+}
+
+export namespace ConversationSlaAppliedByRule {
+ /**
+ * Target times configured for the SLA (in seconds)
+ */
+ export interface SlaDefinition {
+ /** First response time target in seconds */
+ first_reply_time?: number;
+ /** Next reply time target in seconds */
+ next_reply_time?: number;
+ /** Resolution time target in seconds */
+ resolution_time?: number;
+ /** Time to close target in seconds */
+ time_to_close?: number;
+ }
+}
diff --git a/src/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.ts b/src/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.ts
new file mode 100644
index 00000000..29b5464d
--- /dev/null
+++ b/src/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.ts
@@ -0,0 +1,27 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Contains details about SLA applied by legacy Inbox Rules for conversation part type conversation_sla_applied_by_workflow.
+ */
+export interface ConversationSlaAppliedByWorkflow {
+ /** Name of the SLA that was applied */
+ sla_name?: string;
+ /** Target times configured for the SLA (in seconds) */
+ sla_definition?: ConversationSlaAppliedByWorkflow.SlaDefinition;
+}
+
+export namespace ConversationSlaAppliedByWorkflow {
+ /**
+ * Target times configured for the SLA (in seconds)
+ */
+ export interface SlaDefinition {
+ /** First response time target in seconds */
+ first_reply_time?: number;
+ /** Next reply time target in seconds */
+ next_reply_time?: number;
+ /** Resolution time target in seconds */
+ resolution_time?: number;
+ /** Time to close target in seconds */
+ time_to_close?: number;
+ }
+}
diff --git a/src/api/resources/unstable/types/ConversationSlaPaused.ts b/src/api/resources/unstable/types/ConversationSlaPaused.ts
new file mode 100644
index 00000000..eb842828
--- /dev/null
+++ b/src/api/resources/unstable/types/ConversationSlaPaused.ts
@@ -0,0 +1,33 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Contains SLA status at the moment of pausing for conversation part type conversation_sla_paused.
+ */
+export interface ConversationSlaPaused {
+ /** Name of the SLA being paused */
+ sla_name?: string;
+ /** Overall SLA status at pause time */
+ current_sla_status?: ConversationSlaPaused.CurrentSlaStatus;
+ /** Status of all SLA targets at pause time */
+ sla_states?: Recordconversation_sla_removed.
+ */
+export interface ConversationSlaRemoved {
+ /** Name of the SLA that was removed */
+ sla_name?: string;
+}
diff --git a/src/api/resources/unstable/types/ConversationSlaTargetMissed.ts b/src/api/resources/unstable/types/ConversationSlaTargetMissed.ts
new file mode 100644
index 00000000..bec5f996
--- /dev/null
+++ b/src/api/resources/unstable/types/ConversationSlaTargetMissed.ts
@@ -0,0 +1,55 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Contains complete status of all SLA targets when a breach occurs for conversation part type conversation_sla_target_missed.
+ */
+export interface ConversationSlaTargetMissed {
+ /** Name of the SLA */
+ sla_name?: string;
+ /** Which specific target was missed */
+ sla_target_type?: ConversationSlaTargetMissed.SlaTargetType;
+ /** Overall SLA status */
+ current_sla_status?: ConversationSlaTargetMissed.CurrentSlaStatus;
+ /** Status of all SLA targets at the time of breach */
+ sla_states?: Recordconversation_sla_unpaused.
+ */
+export interface ConversationSlaUnpaused {
+ /** Name of the SLA being unpaused */
+ sla_name?: string;
+}
diff --git a/src/api/resources/unstable/types/ConversationTagsUpdated.ts b/src/api/resources/unstable/types/ConversationTagsUpdated.ts
new file mode 100644
index 00000000..556dd3e0
--- /dev/null
+++ b/src/api/resources/unstable/types/ConversationTagsUpdated.ts
@@ -0,0 +1,11 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Contains details about tags that were added or removed from a conversation for conversation part type conversation_tags_updated.
+ */
+export interface ConversationTagsUpdated {
+ /** Array of tag names that were added */
+ tags_added?: string[];
+ /** Array of tag names that were removed */
+ tags_removed?: string[];
+}
diff --git a/src/api/resources/unstable/types/EventDetails.ts b/src/api/resources/unstable/types/EventDetails.ts
index b257b71e..422603dc 100644
--- a/src/api/resources/unstable/types/EventDetails.ts
+++ b/src/api/resources/unstable/types/EventDetails.ts
@@ -5,6 +5,16 @@ import type * as Intercom from "../../../index.js";
export type EventDetails =
| Intercom.unstable.ConversationAttributeUpdatedByWorkflow
| Intercom.unstable.ConversationAttributeUpdatedByAdmin
+ | Intercom.unstable.ConversationAttributeUpdatedByUser
| Intercom.unstable.CustomActionStarted
| Intercom.unstable.CustomActionFinished
- | Intercom.unstable.OperatorWorkflowEvent;
+ | Intercom.unstable.OperatorWorkflowEvent
+ | Intercom.unstable.ConversationTagsUpdated
+ | Intercom.unstable.Snoozed
+ | Intercom.unstable.PriorityChanged
+ | Intercom.unstable.ConversationSlaAppliedByRule
+ | Intercom.unstable.ConversationSlaAppliedByWorkflow
+ | Intercom.unstable.ConversationSlaTargetMissed
+ | Intercom.unstable.ConversationSlaPaused
+ | Intercom.unstable.ConversationSlaUnpaused
+ | Intercom.unstable.ConversationSlaRemoved;
diff --git a/src/api/resources/unstable/types/HandlingEvent.ts b/src/api/resources/unstable/types/HandlingEvent.ts
new file mode 100644
index 00000000..f6d3e9d6
--- /dev/null
+++ b/src/api/resources/unstable/types/HandlingEvent.ts
@@ -0,0 +1,25 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Intercom from "../../../index.js";
+
+/**
+ * A pause or resume event for a conversation
+ */
+export interface HandlingEvent {
+ teammate: Intercom.unstable.TeammateReference;
+ /** The type of handling event */
+ type: HandlingEvent.Type;
+ /** ISO8601 timestamp when the event occurred */
+ timestamp: string;
+ /** Optional reason for the event (e.g., "Paused", "Away") */
+ reason?: string;
+}
+
+export namespace HandlingEvent {
+ /** The type of handling event */
+ export const Type = {
+ Paused: "paused",
+ Resumed: "resumed",
+ } as const;
+ export type Type = (typeof Type)[keyof typeof Type];
+}
diff --git a/src/api/resources/unstable/types/HandlingEventList.ts b/src/api/resources/unstable/types/HandlingEventList.ts
new file mode 100644
index 00000000..57dfe2d2
--- /dev/null
+++ b/src/api/resources/unstable/types/HandlingEventList.ts
@@ -0,0 +1,11 @@
+// This file was auto-generated by Fern from our API Definition.
+
+import type * as Intercom from "../../../index.js";
+
+/**
+ * A list of handling events for a conversation
+ */
+export interface HandlingEventList {
+ /** Array of handling events */
+ handling_events?: Intercom.unstable.HandlingEvent[];
+}
diff --git a/src/api/resources/unstable/types/PriorityChanged.ts b/src/api/resources/unstable/types/PriorityChanged.ts
new file mode 100644
index 00000000..f09b55df
--- /dev/null
+++ b/src/api/resources/unstable/types/PriorityChanged.ts
@@ -0,0 +1,26 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Contains details about priority changes for conversation part type priority_changed.
+ */
+export interface PriorityChanged {
+ /** Current priority state */
+ current_priority?: PriorityChanged.CurrentPriority;
+ /** Previous priority state */
+ previous_priority?: PriorityChanged.PreviousPriority;
+}
+
+export namespace PriorityChanged {
+ /** Current priority state */
+ export const CurrentPriority = {
+ Priority: "priority",
+ NotPriority: "not_priority",
+ } as const;
+ export type CurrentPriority = (typeof CurrentPriority)[keyof typeof CurrentPriority];
+ /** Previous priority state */
+ export const PreviousPriority = {
+ Priority: "priority",
+ NotPriority: "not_priority",
+ } as const;
+ export type PreviousPriority = (typeof PreviousPriority)[keyof typeof PreviousPriority];
+}
diff --git a/src/api/resources/unstable/types/Snoozed.ts b/src/api/resources/unstable/types/Snoozed.ts
new file mode 100644
index 00000000..c8ea22fc
--- /dev/null
+++ b/src/api/resources/unstable/types/Snoozed.ts
@@ -0,0 +1,11 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * Contains details about conversation snooze timing for conversation part type snoozed.
+ */
+export interface Snoozed {
+ /** Human-readable description of snooze duration */
+ until?: string;
+ /** ISO timestamp for custom snooze times (null for general snoozes) */
+ custom_until_time?: string;
+}
diff --git a/src/api/resources/unstable/types/TeammateReference.ts b/src/api/resources/unstable/types/TeammateReference.ts
new file mode 100644
index 00000000..913ea0b2
--- /dev/null
+++ b/src/api/resources/unstable/types/TeammateReference.ts
@@ -0,0 +1,25 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * A reference to a teammate (admin, team, or bot)
+ */
+export interface TeammateReference {
+ /** The type of teammate */
+ type: TeammateReference.Type;
+ /** The unique identifier of the teammate */
+ id: number;
+ /** The display name of the teammate */
+ name: string;
+ /** The email address of the teammate (optional for teams/bots) */
+ email?: string;
+}
+
+export namespace TeammateReference {
+ /** The type of teammate */
+ export const Type = {
+ Admin: "admin",
+ Team: "team",
+ Bot: "bot",
+ } as const;
+ export type Type = (typeof Type)[keyof typeof Type];
+}
diff --git a/src/api/resources/unstable/types/WorkflowExport.ts b/src/api/resources/unstable/types/WorkflowExport.ts
new file mode 100644
index 00000000..93531949
--- /dev/null
+++ b/src/api/resources/unstable/types/WorkflowExport.ts
@@ -0,0 +1,59 @@
+// This file was auto-generated by Fern from our API Definition.
+
+/**
+ * A workflow export containing the complete workflow configuration.
+ */
+export interface WorkflowExport {
+ /** The version of the export format. */
+ export_version?: string;
+ /** The timestamp when the export was generated. */
+ exported_at?: string;
+ /** The workspace identifier. */
+ app_id?: number;
+ /** The workflow configuration. */
+ workflow?: WorkflowExport.Workflow;
+}
+
+export namespace WorkflowExport {
+ /**
+ * The workflow configuration.
+ */
+ export interface Workflow {
+ /** The unique identifier for the workflow. */
+ id?: string;
+ /** The title of the workflow. */
+ title?: string;
+ /** The description of the workflow. */
+ description?: string;
+ /** The type of trigger that starts this workflow. */
+ trigger_type?: string;
+ /** The current state of the workflow. */
+ state?: Workflow.State;
+ /** The channels this workflow targets. */
+ target_channels?: string[];
+ /** The preferred devices for this workflow. */
+ preferred_devices?: string[];
+ /** When the workflow was created. */
+ created_at?: string;
+ /** When the workflow was last updated. */
+ updated_at?: string;
+ /** The targeting rules for this workflow. */
+ targeting?: RecordText for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -788,6 +872,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -1220,6 +1357,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -1426,6 +1605,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -1683,6 +1915,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -1850,6 +2124,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -2071,6 +2398,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -2277,6 +2646,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -2696,6 +3118,27 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }], @@ -2826,6 +3269,27 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + }, tags: { type: "tag.list", tags: [ @@ -2984,6 +3448,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -3157,6 +3663,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -3384,6 +3943,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -3557,6 +4158,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -3787,6 +4441,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -3969,6 +4665,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -4197,6 +4946,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -4376,6 +5167,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -4603,6 +5447,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -4776,6 +5662,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -5109,6 +6048,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -5281,6 +6262,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -5503,6 +6537,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -5675,6 +6751,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -5897,6 +7026,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -6068,6 +7239,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -6290,6 +7514,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 991267715, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -6464,6 +7730,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 991267715, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -6690,6 +8009,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -6862,6 +8223,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -7177,6 +8591,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -7331,6 +8787,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -7537,6 +9046,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -7691,6 +9242,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -7975,6 +9579,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -8127,6 +9773,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -8333,6 +10032,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -8485,6 +10226,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -8691,6 +10485,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -8843,6 +10679,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -9049,6 +10938,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -9201,6 +11132,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -9495,6 +11479,120 @@ describe("ConversationsClient", () => { }).rejects.toThrow(Intercom.unstable.UnprocessableEntityError); }); + test("listHandlingEvents (1)", async () => { + const server = mockServerPool.createServer(); + const client = new IntercomClient({ + maxRetries: 0, + token: "test", + version: "2.14", + environment: server.baseUrl, + }); + + const rawResponseBody = { + handling_events: [ + { + teammate: { type: "admin", id: 123, name: "Jane Example", email: "jane@example.com" }, + type: "paused", + timestamp: "2026-01-09T09:00:00Z", + reason: "Paused", + }, + { + teammate: { type: "admin", id: 123, name: "Jane Example", email: "jane@example.com" }, + type: "resumed", + timestamp: "2026-01-09T09:10:00Z", + reason: "Paused", + }, + ], + }; + server + .mockEndpoint() + .get("/conversations/123/handling_events") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.unstable.conversations.listHandlingEvents({ + id: "123", + }); + expect(response).toEqual({ + handling_events: [ + { + teammate: { + type: "admin", + id: 123, + name: "Jane Example", + email: "jane@example.com", + }, + type: "paused", + timestamp: "2026-01-09T09:00:00Z", + reason: "Paused", + }, + { + teammate: { + type: "admin", + id: 123, + name: "Jane Example", + email: "jane@example.com", + }, + type: "resumed", + timestamp: "2026-01-09T09:10:00Z", + reason: "Paused", + }, + ], + }); + }); + + test("listHandlingEvents (2)", async () => { + const server = mockServerPool.createServer(); + const client = new IntercomClient({ + maxRetries: 0, + token: "test", + version: "2.14", + environment: server.baseUrl, + }); + + const rawResponseBody = { type: "type", errors: [{ code: "code" }, { code: "code" }] }; + server + .mockEndpoint() + .get("/conversations/id/handling_events") + .respondWith() + .statusCode(401) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.unstable.conversations.listHandlingEvents({ + id: "id", + }); + }).rejects.toThrow(Intercom.unstable.UnauthorizedError); + }); + + test("listHandlingEvents (3)", async () => { + const server = mockServerPool.createServer(); + const client = new IntercomClient({ + maxRetries: 0, + token: "test", + version: "2.14", + environment: server.baseUrl, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/conversations/id/handling_events") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.unstable.conversations.listHandlingEvents({ + id: "id", + }); + }).rejects.toThrow(Intercom.unstable.NotFoundError); + }); + test("redactConversation (1)", async () => { const server = mockServerPool.createServer(); const client = new IntercomClient({ @@ -9523,6 +11621,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -9692,6 +11832,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ @@ -9918,6 +12111,48 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { type: "plan", id: "269315", name: "Pro" }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { type: "tag.list" }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { type: "note", id: "17495962", created_at: 1674589321, body: "Text for the note.
" }, + ], + }, + }, tags: { type: "tag.list", tags: [{ type: "tag", id: "123456", name: "Test tag", applied_at: 1663597223 }] }, conversation_rating: { rating: 5, @@ -10087,6 +12322,59 @@ describe("ConversationsClient", () => { admin_assignee_id: 0, team_assignee_id: "5017691", company_id: "5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", + company: { + type: "company", + id: "531ee472cce572a6ec000006", + name: "Blue Sun", + app_id: "ecahpwf5", + plan: { + type: "plan", + id: "269315", + name: "Pro", + }, + company_id: "6", + remote_created_at: 1663597223, + created_at: 1663597223, + updated_at: 1663597223, + last_request_at: 1663597223, + size: 100, + website: "https://www.intercom.com", + industry: "Software", + monthly_spend: 100, + session_count: 100, + user_count: 100, + custom_attributes: { + paid_subscriber: "custom_attributes", + monthly_spend: "custom_attributes", + team_mates: "custom_attributes", + }, + tags: { + type: "tag.list", + }, + segments: { + type: "segment.list", + segments: [ + { + id: "56203d253cba154d39010062", + name: "Active", + created_at: 1394621988, + updated_at: 1394622004, + count: 3, + }, + ], + }, + notes: { + type: "note.list", + notes: [ + { + type: "note", + id: "17495962", + created_at: 1674589321, + body: "Text for the note.
", + }, + ], + }, + }, tags: { type: "tag.list", tags: [ diff --git a/tests/wire/unstable/workflows.test.ts b/tests/wire/unstable/workflows.test.ts new file mode 100644 index 00000000..b4035d7f --- /dev/null +++ b/tests/wire/unstable/workflows.test.ts @@ -0,0 +1,131 @@ +// This file was auto-generated by Fern from our API Definition. + +import * as Intercom from "../../../src/api/index"; +import { IntercomClient } from "../../../src/Client"; +import { mockServerPool } from "../../mock-server/MockServerPool"; + +describe("WorkflowsClient", () => { + test("exportWorkflow (1)", async () => { + const server = mockServerPool.createServer(); + const client = new IntercomClient({ + maxRetries: 0, + token: "test", + version: "2.14", + environment: server.baseUrl, + }); + + const rawResponseBody = { + export_version: "1.0", + exported_at: "2026-01-26T12:00:00Z", + app_id: 12345, + workflow: { + id: "67890", + title: "My Workflow", + description: "A workflow that handles customer inquiries", + trigger_type: "inbound_conversation", + state: "live", + target_channels: ["chat"], + preferred_devices: ["desktop", "mobile"], + created_at: "2025-06-15T10:30:00Z", + updated_at: "2026-01-20T14:45:00Z", + targeting: { key: "value" }, + snapshot: { key: "value" }, + attributes: [{ key: "value" }], + embedded_rules: [{ key: "value" }], + }, + }; + server + .mockEndpoint() + .get("/export/workflows/12345") + .respondWith() + .statusCode(200) + .jsonBody(rawResponseBody) + .build(); + + const response = await client.unstable.workflows.exportWorkflow({ + id: "12345", + }); + expect(response).toEqual({ + export_version: "1.0", + exported_at: "2026-01-26T12:00:00Z", + app_id: 12345, + workflow: { + id: "67890", + title: "My Workflow", + description: "A workflow that handles customer inquiries", + trigger_type: "inbound_conversation", + state: "live", + target_channels: ["chat"], + preferred_devices: ["desktop", "mobile"], + created_at: "2025-06-15T10:30:00Z", + updated_at: "2026-01-20T14:45:00Z", + targeting: { + key: "value", + }, + snapshot: { + key: "value", + }, + attributes: [ + { + key: "value", + }, + ], + embedded_rules: [ + { + key: "value", + }, + ], + }, + }); + }); + + test("exportWorkflow (2)", async () => { + const server = mockServerPool.createServer(); + const client = new IntercomClient({ + maxRetries: 0, + token: "test", + version: "2.14", + environment: server.baseUrl, + }); + + const rawResponseBody = { type: "type", errors: [{ code: "code" }, { code: "code" }] }; + server + .mockEndpoint() + .get("/export/workflows/id") + .respondWith() + .statusCode(403) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.unstable.workflows.exportWorkflow({ + id: "id", + }); + }).rejects.toThrow(Intercom.unstable.ForbiddenError); + }); + + test("exportWorkflow (3)", async () => { + const server = mockServerPool.createServer(); + const client = new IntercomClient({ + maxRetries: 0, + token: "test", + version: "2.14", + environment: server.baseUrl, + }); + + const rawResponseBody = { key: "value" }; + server + .mockEndpoint() + .get("/export/workflows/id") + .respondWith() + .statusCode(404) + .jsonBody(rawResponseBody) + .build(); + + await expect(async () => { + return await client.unstable.workflows.exportWorkflow({ + id: "id", + }); + }).rejects.toThrow(Intercom.unstable.NotFoundError); + }); +}); From 349c30fc6f8f46725882dcf9cac93b9276df7cf6 Mon Sep 17 00:00:00 2001 From: fern-support <126544928+fern-support@users.noreply.github.com> Date: Fri, 30 Jan 2026 13:12:11 -0500 Subject: [PATCH 2/2] Fix key issue in integration tests --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d5b7754..268fb922 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,7 @@ jobs: run: pnpm test env: INTERCOM_API_KEY: ${{ secrets.INTERCOM_API_KEY }} + API_TOKEN: ${{ secrets.INTERCOM_API_KEY }} publish: needs: [ compile, test ]