intercom-client 7.0.1 → 7.0.3
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/cjs/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +3 -0
- package/dist/cjs/Client.js +33 -28
- package/dist/cjs/api/resources/contacts/types/Contact.d.ts +9 -9
- package/dist/cjs/api/resources/conversations/types/Conversation.d.ts +10 -10
- package/dist/cjs/api/resources/dataEvents/types/DataEvent.d.ts +1 -1
- package/dist/cjs/api/resources/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.js +2 -1
- package/dist/cjs/api/resources/ipAllowlist/client/Client.d.ts +56 -0
- package/dist/cjs/api/resources/ipAllowlist/client/Client.js +176 -0
- package/dist/cjs/api/resources/ipAllowlist/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/ipAllowlist/client/index.js +2 -0
- package/dist/cjs/api/resources/ipAllowlist/index.d.ts +1 -0
- package/dist/cjs/api/resources/ipAllowlist/index.js +17 -0
- package/dist/cjs/api/resources/messages/types/Message.d.ts +1 -1
- package/dist/cjs/api/resources/notes/types/Note.d.ts +4 -4
- package/dist/cjs/api/resources/tickets/types/Ticket.d.ts +6 -6
- package/dist/cjs/api/resources/unstable/client/Client.d.ts +3 -0
- package/dist/cjs/api/resources/unstable/client/Client.js +5 -0
- package/dist/cjs/api/resources/unstable/resources/aiAgent/types/AiAgent.d.ts +1 -0
- package/dist/cjs/api/resources/unstable/resources/aiAgent/types/AiAgent.js +1 -0
- package/dist/cjs/api/resources/unstable/resources/contacts/client/requests/UpdateContactRequest.d.ts +2 -0
- package/dist/cjs/api/resources/unstable/resources/contacts/types/Contact.d.ts +1 -1
- package/dist/cjs/api/resources/unstable/resources/conversations/client/Client.d.ts +18 -0
- package/dist/cjs/api/resources/unstable/resources/conversations/client/Client.js +56 -0
- package/dist/cjs/api/resources/unstable/resources/conversations/client/requests/ListHandlingEventsRequest.d.ts +10 -0
- package/dist/cjs/api/resources/unstable/resources/conversations/client/requests/ListHandlingEventsRequest.js +3 -0
- package/dist/cjs/api/resources/unstable/resources/conversations/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/unstable/resources/conversations/types/Conversation.d.ts +2 -0
- package/dist/cjs/api/resources/unstable/resources/index.d.ts +2 -0
- package/dist/cjs/api/resources/unstable/resources/index.js +3 -1
- package/dist/cjs/api/resources/unstable/resources/workflows/client/Client.d.ts +39 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/client/Client.js +122 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/client/index.js +17 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/client/requests/ExportWorkflowRequest.d.ts +10 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/client/requests/ExportWorkflowRequest.js +3 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/index.d.ts +1 -0
- package/dist/cjs/api/resources/unstable/resources/workflows/index.js +17 -0
- package/dist/cjs/api/resources/unstable/types/ConversationAttributeUpdatedByAdmin.d.ts +3 -1
- package/dist/cjs/api/resources/unstable/types/ConversationAttributeUpdatedByUser.d.ts +19 -0
- package/dist/cjs/api/resources/unstable/types/ConversationAttributeUpdatedByUser.js +3 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaAppliedByRule.d.ts +24 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaAppliedByRule.js +3 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.d.ts +24 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.js +3 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaPaused.d.ts +29 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaPaused.js +14 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaRemoved.d.ts +7 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaRemoved.js +3 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaTargetMissed.d.ts +50 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaTargetMissed.js +35 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaUnpaused.d.ts +7 -0
- package/dist/cjs/api/resources/unstable/types/ConversationSlaUnpaused.js +3 -0
- package/dist/cjs/api/resources/unstable/types/ConversationTagsUpdated.d.ts +9 -0
- package/dist/cjs/api/resources/unstable/types/ConversationTagsUpdated.js +3 -0
- package/dist/cjs/api/resources/unstable/types/EventDetails.d.ts +1 -1
- package/dist/cjs/api/resources/unstable/types/HandlingEvent.d.ts +21 -0
- package/dist/cjs/api/resources/unstable/types/HandlingEvent.js +12 -0
- package/dist/cjs/api/resources/unstable/types/HandlingEventList.d.ts +8 -0
- package/dist/cjs/api/resources/unstable/types/HandlingEventList.js +3 -0
- package/dist/cjs/api/resources/unstable/types/PriorityChanged.d.ts +23 -0
- package/dist/cjs/api/resources/unstable/types/PriorityChanged.js +17 -0
- package/dist/cjs/api/resources/unstable/types/Snoozed.d.ts +9 -0
- package/dist/cjs/api/resources/unstable/types/Snoozed.js +3 -0
- package/dist/cjs/api/resources/unstable/types/TeammateReference.d.ts +22 -0
- package/dist/cjs/api/resources/unstable/types/TeammateReference.js +13 -0
- package/dist/cjs/api/resources/unstable/types/WorkflowExport.d.ts +55 -0
- package/dist/cjs/api/resources/unstable/types/WorkflowExport.js +16 -0
- package/dist/cjs/api/resources/unstable/types/index.d.ts +14 -0
- package/dist/cjs/api/resources/unstable/types/index.js +14 -0
- package/dist/cjs/api/types/ActivityLog.d.ts +6 -1
- package/dist/cjs/api/types/ActivityLog.js +6 -1
- package/dist/cjs/api/types/IpAllowlist.d.ts +16 -0
- package/dist/cjs/api/types/IpAllowlist.js +3 -0
- package/dist/cjs/api/types/Visitor.d.ts +3 -3
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +3 -0
- package/dist/esm/Client.mjs +5 -0
- package/dist/esm/api/resources/contacts/types/Contact.d.mts +9 -9
- package/dist/esm/api/resources/conversations/types/Conversation.d.mts +10 -10
- package/dist/esm/api/resources/dataEvents/types/DataEvent.d.mts +1 -1
- package/dist/esm/api/resources/index.d.mts +1 -0
- package/dist/esm/api/resources/index.mjs +1 -0
- package/dist/esm/api/resources/ipAllowlist/client/Client.d.mts +56 -0
- package/dist/esm/api/resources/ipAllowlist/client/Client.mjs +139 -0
- package/dist/esm/api/resources/ipAllowlist/client/index.d.mts +1 -0
- package/dist/esm/api/resources/ipAllowlist/client/index.mjs +1 -0
- package/dist/esm/api/resources/ipAllowlist/index.d.mts +1 -0
- package/dist/esm/api/resources/ipAllowlist/index.mjs +1 -0
- package/dist/esm/api/resources/messages/types/Message.d.mts +1 -1
- package/dist/esm/api/resources/notes/types/Note.d.mts +4 -4
- package/dist/esm/api/resources/tickets/types/Ticket.d.mts +6 -6
- package/dist/esm/api/resources/unstable/client/Client.d.mts +3 -0
- package/dist/esm/api/resources/unstable/client/Client.mjs +5 -0
- package/dist/esm/api/resources/unstable/resources/aiAgent/types/AiAgent.d.mts +1 -0
- package/dist/esm/api/resources/unstable/resources/aiAgent/types/AiAgent.mjs +1 -0
- package/dist/esm/api/resources/unstable/resources/contacts/client/requests/UpdateContactRequest.d.mts +2 -0
- package/dist/esm/api/resources/unstable/resources/contacts/types/Contact.d.mts +1 -1
- package/dist/esm/api/resources/unstable/resources/conversations/client/Client.d.mts +18 -0
- package/dist/esm/api/resources/unstable/resources/conversations/client/Client.mjs +56 -0
- package/dist/esm/api/resources/unstable/resources/conversations/client/requests/ListHandlingEventsRequest.d.mts +10 -0
- package/dist/esm/api/resources/unstable/resources/conversations/client/requests/ListHandlingEventsRequest.mjs +2 -0
- package/dist/esm/api/resources/unstable/resources/conversations/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/unstable/resources/conversations/types/Conversation.d.mts +2 -0
- package/dist/esm/api/resources/unstable/resources/index.d.mts +2 -0
- package/dist/esm/api/resources/unstable/resources/index.mjs +2 -0
- package/dist/esm/api/resources/unstable/resources/workflows/client/Client.d.mts +39 -0
- package/dist/esm/api/resources/unstable/resources/workflows/client/Client.mjs +85 -0
- package/dist/esm/api/resources/unstable/resources/workflows/client/index.d.mts +1 -0
- package/dist/esm/api/resources/unstable/resources/workflows/client/index.mjs +1 -0
- package/dist/esm/api/resources/unstable/resources/workflows/client/requests/ExportWorkflowRequest.d.mts +10 -0
- package/dist/esm/api/resources/unstable/resources/workflows/client/requests/ExportWorkflowRequest.mjs +2 -0
- package/dist/esm/api/resources/unstable/resources/workflows/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/unstable/resources/workflows/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/unstable/resources/workflows/index.d.mts +1 -0
- package/dist/esm/api/resources/unstable/resources/workflows/index.mjs +1 -0
- package/dist/esm/api/resources/unstable/types/ConversationAttributeUpdatedByAdmin.d.mts +3 -1
- package/dist/esm/api/resources/unstable/types/ConversationAttributeUpdatedByUser.d.mts +19 -0
- package/dist/esm/api/resources/unstable/types/ConversationAttributeUpdatedByUser.mjs +2 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaAppliedByRule.d.mts +24 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaAppliedByRule.mjs +2 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.d.mts +24 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.mjs +2 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaPaused.d.mts +29 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaPaused.mjs +11 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaRemoved.d.mts +7 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaRemoved.mjs +2 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaTargetMissed.d.mts +50 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaTargetMissed.mjs +32 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaUnpaused.d.mts +7 -0
- package/dist/esm/api/resources/unstable/types/ConversationSlaUnpaused.mjs +2 -0
- package/dist/esm/api/resources/unstable/types/ConversationTagsUpdated.d.mts +9 -0
- package/dist/esm/api/resources/unstable/types/ConversationTagsUpdated.mjs +2 -0
- package/dist/esm/api/resources/unstable/types/EventDetails.d.mts +1 -1
- package/dist/esm/api/resources/unstable/types/HandlingEvent.d.mts +21 -0
- package/dist/esm/api/resources/unstable/types/HandlingEvent.mjs +9 -0
- package/dist/esm/api/resources/unstable/types/HandlingEventList.d.mts +8 -0
- package/dist/esm/api/resources/unstable/types/HandlingEventList.mjs +2 -0
- package/dist/esm/api/resources/unstable/types/PriorityChanged.d.mts +23 -0
- package/dist/esm/api/resources/unstable/types/PriorityChanged.mjs +14 -0
- package/dist/esm/api/resources/unstable/types/Snoozed.d.mts +9 -0
- package/dist/esm/api/resources/unstable/types/Snoozed.mjs +2 -0
- package/dist/esm/api/resources/unstable/types/TeammateReference.d.mts +22 -0
- package/dist/esm/api/resources/unstable/types/TeammateReference.mjs +10 -0
- package/dist/esm/api/resources/unstable/types/WorkflowExport.d.mts +55 -0
- package/dist/esm/api/resources/unstable/types/WorkflowExport.mjs +13 -0
- package/dist/esm/api/resources/unstable/types/index.d.mts +14 -0
- package/dist/esm/api/resources/unstable/types/index.mjs +14 -0
- package/dist/esm/api/types/ActivityLog.d.mts +6 -1
- package/dist/esm/api/types/ActivityLog.mjs +6 -1
- package/dist/esm/api/types/IpAllowlist.d.mts +16 -0
- package/dist/esm/api/types/IpAllowlist.mjs +2 -0
- package/dist/esm/api/types/Visitor.d.mts +3 -3
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +265 -0
|
@@ -4,15 +4,15 @@ import type * as Intercom from "../../../index.mjs";
|
|
|
4
4
|
*/
|
|
5
5
|
export interface Contact {
|
|
6
6
|
/** The type of object. */
|
|
7
|
-
type
|
|
7
|
+
type: "contact";
|
|
8
8
|
/** The unique identifier for the contact which is given by Intercom. */
|
|
9
|
-
id
|
|
9
|
+
id: string;
|
|
10
10
|
/** The unique identifier for the contact which is provided by the Client. */
|
|
11
11
|
external_id?: string;
|
|
12
12
|
/** The id of the workspace which the contact belongs to. */
|
|
13
|
-
workspace_id
|
|
13
|
+
workspace_id: string;
|
|
14
14
|
/** The role of the contact. */
|
|
15
|
-
role
|
|
15
|
+
role: string;
|
|
16
16
|
/** The contact's email. */
|
|
17
17
|
email?: string;
|
|
18
18
|
/** The contact's email domain. */
|
|
@@ -24,15 +24,15 @@ export interface Contact {
|
|
|
24
24
|
/** The id of an admin that has been assigned account ownership of the contact. */
|
|
25
25
|
owner_id?: number;
|
|
26
26
|
/** Whether the contact has had an email sent to them hard bounce. */
|
|
27
|
-
has_hard_bounced
|
|
27
|
+
has_hard_bounced: boolean;
|
|
28
28
|
/** Whether the contact has marked an email sent to them as spam. */
|
|
29
|
-
marked_email_as_spam
|
|
29
|
+
marked_email_as_spam: boolean;
|
|
30
30
|
/** Whether the contact is unsubscribed from emails. */
|
|
31
|
-
unsubscribed_from_emails
|
|
31
|
+
unsubscribed_from_emails: boolean;
|
|
32
32
|
/** (UNIX timestamp) The time when the contact was created. */
|
|
33
|
-
created_at
|
|
33
|
+
created_at: number;
|
|
34
34
|
/** (UNIX timestamp) The time when the contact was last updated. */
|
|
35
|
-
updated_at
|
|
35
|
+
updated_at: number;
|
|
36
36
|
/** (UNIX timestamp) The time specified for when a contact signed up. */
|
|
37
37
|
signed_up_at?: number;
|
|
38
38
|
/** (UNIX timestamp) The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually). */
|
|
@@ -4,25 +4,25 @@ import type * as Intercom from "../../../index.mjs";
|
|
|
4
4
|
*/
|
|
5
5
|
export interface Conversation {
|
|
6
6
|
/** Always conversation. */
|
|
7
|
-
type
|
|
7
|
+
type: string;
|
|
8
8
|
/** The id representing the conversation. */
|
|
9
|
-
id
|
|
9
|
+
id: string;
|
|
10
10
|
/** The title given to the conversation. */
|
|
11
11
|
title?: string;
|
|
12
12
|
/** The time the conversation was created. */
|
|
13
|
-
created_at
|
|
13
|
+
created_at: number;
|
|
14
14
|
/** The last time the conversation was updated. */
|
|
15
|
-
updated_at
|
|
15
|
+
updated_at: number;
|
|
16
16
|
/** The last time a Contact responded to an Admin. In other words, the time a customer started waiting for a response. Set to null if last reply is from an Admin. */
|
|
17
17
|
waiting_since?: number;
|
|
18
18
|
/** If set this is the time in the future when this conversation will be marked as open. i.e. it will be in a snoozed state until this time. i.e. it will be in a snoozed state until this time. */
|
|
19
19
|
snoozed_until?: number;
|
|
20
20
|
/** Indicates whether a conversation is open (true) or closed (false). */
|
|
21
|
-
open
|
|
21
|
+
open: boolean;
|
|
22
22
|
/** Can be set to "open", "closed" or "snoozed". */
|
|
23
|
-
state
|
|
23
|
+
state: Conversation.State;
|
|
24
24
|
/** Indicates whether a conversation has been read. */
|
|
25
|
-
read
|
|
25
|
+
read: boolean;
|
|
26
26
|
/** If marked as priority, it will return priority or else not_priority. */
|
|
27
27
|
priority?: Conversation.Priority;
|
|
28
28
|
/** The id of the admin assigned to the conversation. If it's not assigned to an admin it will return null. */
|
|
@@ -33,10 +33,10 @@ export interface Conversation {
|
|
|
33
33
|
company_id?: string;
|
|
34
34
|
tags?: Intercom.Tags;
|
|
35
35
|
conversation_rating?: Intercom.ConversationRating;
|
|
36
|
-
source
|
|
37
|
-
contacts
|
|
36
|
+
source: Intercom.ConversationSource;
|
|
37
|
+
contacts: Intercom.ConversationContacts;
|
|
38
38
|
teammates?: Intercom.ConversationTeammates;
|
|
39
|
-
custom_attributes
|
|
39
|
+
custom_attributes: Intercom.CustomAttributes;
|
|
40
40
|
first_contact_reply?: Intercom.ConversationFirstContactReply;
|
|
41
41
|
sla_applied?: Intercom.SlaApplied;
|
|
42
42
|
statistics?: Intercom.ConversationStatistics;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface DataEvent {
|
|
5
5
|
/** The type of the object */
|
|
6
|
-
type
|
|
6
|
+
type: "event";
|
|
7
7
|
/** The name of the event that occurred. This is presented to your App's admins when filtering and creating segments - a good event name is typically a past tense 'verb-noun' combination, to improve readability, for example `updated-plan`. */
|
|
8
8
|
event_name: string;
|
|
9
9
|
/** The time the event occurred as a UTC Unix timestamp */
|
|
@@ -49,6 +49,7 @@ export * as helpCenters from "./helpCenters/index.mjs";
|
|
|
49
49
|
export * from "./internalArticles/client/requests/index.mjs";
|
|
50
50
|
export * as internalArticles from "./internalArticles/index.mjs";
|
|
51
51
|
export * from "./internalArticles/types/index.mjs";
|
|
52
|
+
export * as ipAllowlist from "./ipAllowlist/index.mjs";
|
|
52
53
|
export * from "./jobs/client/requests/index.mjs";
|
|
53
54
|
export * as jobs from "./jobs/index.mjs";
|
|
54
55
|
export * from "./jobs/types/index.mjs";
|
|
@@ -49,6 +49,7 @@ export * as helpCenters from "./helpCenters/index.mjs";
|
|
|
49
49
|
export * from "./internalArticles/client/requests/index.mjs";
|
|
50
50
|
export * as internalArticles from "./internalArticles/index.mjs";
|
|
51
51
|
export * from "./internalArticles/types/index.mjs";
|
|
52
|
+
export * as ipAllowlist from "./ipAllowlist/index.mjs";
|
|
52
53
|
export * from "./jobs/client/requests/index.mjs";
|
|
53
54
|
export * as jobs from "./jobs/index.mjs";
|
|
54
55
|
export * from "./jobs/types/index.mjs";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../core/index.mjs";
|
|
4
|
+
import * as Intercom from "../../../index.mjs";
|
|
5
|
+
export declare namespace IpAllowlistClient {
|
|
6
|
+
interface Options extends BaseClientOptions {
|
|
7
|
+
}
|
|
8
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Manage IP allowlist settings for your workspace.
|
|
13
|
+
*
|
|
14
|
+
* The IP Allowlist API allows you to configure which IP addresses are allowed to access the Intercom API and web application for your workspace. This is useful for restricting access to your Intercom workspace to specific corporate networks or VPNs.
|
|
15
|
+
*
|
|
16
|
+
* {% admonition type="info" name="Authentication" %}
|
|
17
|
+
* This endpoint requires the `manage_ip_allowlist` OAuth scope.
|
|
18
|
+
* {% /admonition %}
|
|
19
|
+
*/
|
|
20
|
+
export declare class IpAllowlistClient {
|
|
21
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<IpAllowlistClient.Options>;
|
|
22
|
+
constructor(options?: IpAllowlistClient.Options);
|
|
23
|
+
/**
|
|
24
|
+
* Retrieve the current IP allowlist configuration for the workspace.
|
|
25
|
+
*
|
|
26
|
+
* @param {IpAllowlistClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
|
+
*
|
|
28
|
+
* @throws {@link Intercom.UnauthorizedError}
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* await client.ipAllowlist.getIpAllowlist()
|
|
32
|
+
*/
|
|
33
|
+
getIpAllowlist(requestOptions?: IpAllowlistClient.RequestOptions): core.HttpResponsePromise<Intercom.IpAllowlist>;
|
|
34
|
+
private __getIpAllowlist;
|
|
35
|
+
/**
|
|
36
|
+
* Update the IP allowlist configuration for the workspace.
|
|
37
|
+
*
|
|
38
|
+
* {% admonition type="warning" name="Lockout Protection" %}
|
|
39
|
+
* The API will reject updates that would lock out the caller's IP address. Ensure your current IP is included in the allowlist when enabling the feature.
|
|
40
|
+
* {% /admonition %}
|
|
41
|
+
*
|
|
42
|
+
* @param {Intercom.IpAllowlist} request
|
|
43
|
+
* @param {IpAllowlistClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @throws {@link Intercom.UnauthorizedError}
|
|
46
|
+
* @throws {@link Intercom.UnprocessableEntityError}
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* await client.ipAllowlist.updateIpAllowlist({
|
|
50
|
+
* enabled: true,
|
|
51
|
+
* ip_allowlist: ["192.168.1.0/24", "10.0.0.1"]
|
|
52
|
+
* })
|
|
53
|
+
*/
|
|
54
|
+
updateIpAllowlist(request: Intercom.IpAllowlist, requestOptions?: IpAllowlistClient.RequestOptions): core.HttpResponsePromise<Intercom.IpAllowlist>;
|
|
55
|
+
private __updateIpAllowlist;
|
|
56
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as Intercom from "../../../index.mjs";
|
|
18
|
+
/**
|
|
19
|
+
* Manage IP allowlist settings for your workspace.
|
|
20
|
+
*
|
|
21
|
+
* The IP Allowlist API allows you to configure which IP addresses are allowed to access the Intercom API and web application for your workspace. This is useful for restricting access to your Intercom workspace to specific corporate networks or VPNs.
|
|
22
|
+
*
|
|
23
|
+
* {% admonition type="info" name="Authentication" %}
|
|
24
|
+
* This endpoint requires the `manage_ip_allowlist` OAuth scope.
|
|
25
|
+
* {% /admonition %}
|
|
26
|
+
*/
|
|
27
|
+
export class IpAllowlistClient {
|
|
28
|
+
constructor(options = {}) {
|
|
29
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve the current IP allowlist configuration for the workspace.
|
|
33
|
+
*
|
|
34
|
+
* @param {IpAllowlistClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
|
+
*
|
|
36
|
+
* @throws {@link Intercom.UnauthorizedError}
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.ipAllowlist.getIpAllowlist()
|
|
40
|
+
*/
|
|
41
|
+
getIpAllowlist(requestOptions) {
|
|
42
|
+
return core.HttpResponsePromise.fromPromise(this.__getIpAllowlist(requestOptions));
|
|
43
|
+
}
|
|
44
|
+
__getIpAllowlist(requestOptions) {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
47
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
48
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Intercom-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
49
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
50
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.IntercomEnvironment.UsProduction, "ip_allowlist"),
|
|
51
|
+
method: "GET",
|
|
52
|
+
headers: _headers,
|
|
53
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
54
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 20) * 1000,
|
|
55
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
56
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
57
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
58
|
+
logging: this._options.logging,
|
|
59
|
+
});
|
|
60
|
+
if (_response.ok) {
|
|
61
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
62
|
+
}
|
|
63
|
+
if (_response.error.reason === "status-code") {
|
|
64
|
+
switch (_response.error.statusCode) {
|
|
65
|
+
case 401:
|
|
66
|
+
throw new Intercom.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
67
|
+
default:
|
|
68
|
+
throw new errors.IntercomError({
|
|
69
|
+
statusCode: _response.error.statusCode,
|
|
70
|
+
body: _response.error.body,
|
|
71
|
+
rawResponse: _response.rawResponse,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/ip_allowlist");
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Update the IP allowlist configuration for the workspace.
|
|
80
|
+
*
|
|
81
|
+
* {% admonition type="warning" name="Lockout Protection" %}
|
|
82
|
+
* The API will reject updates that would lock out the caller's IP address. Ensure your current IP is included in the allowlist when enabling the feature.
|
|
83
|
+
* {% /admonition %}
|
|
84
|
+
*
|
|
85
|
+
* @param {Intercom.IpAllowlist} request
|
|
86
|
+
* @param {IpAllowlistClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link Intercom.UnauthorizedError}
|
|
89
|
+
* @throws {@link Intercom.UnprocessableEntityError}
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* await client.ipAllowlist.updateIpAllowlist({
|
|
93
|
+
* enabled: true,
|
|
94
|
+
* ip_allowlist: ["192.168.1.0/24", "10.0.0.1"]
|
|
95
|
+
* })
|
|
96
|
+
*/
|
|
97
|
+
updateIpAllowlist(request, requestOptions) {
|
|
98
|
+
return core.HttpResponsePromise.fromPromise(this.__updateIpAllowlist(request, requestOptions));
|
|
99
|
+
}
|
|
100
|
+
__updateIpAllowlist(request, requestOptions) {
|
|
101
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
103
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
104
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Intercom-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
105
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
106
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.IntercomEnvironment.UsProduction, "ip_allowlist"),
|
|
107
|
+
method: "PUT",
|
|
108
|
+
headers: _headers,
|
|
109
|
+
contentType: "application/json",
|
|
110
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
111
|
+
requestType: "json",
|
|
112
|
+
body: request,
|
|
113
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 20) * 1000,
|
|
114
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
115
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
116
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
117
|
+
logging: this._options.logging,
|
|
118
|
+
});
|
|
119
|
+
if (_response.ok) {
|
|
120
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
121
|
+
}
|
|
122
|
+
if (_response.error.reason === "status-code") {
|
|
123
|
+
switch (_response.error.statusCode) {
|
|
124
|
+
case 401:
|
|
125
|
+
throw new Intercom.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
126
|
+
case 422:
|
|
127
|
+
throw new Intercom.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
128
|
+
default:
|
|
129
|
+
throw new errors.IntercomError({
|
|
130
|
+
statusCode: _response.error.statusCode,
|
|
131
|
+
body: _response.error.body,
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/ip_allowlist");
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -15,7 +15,7 @@ export interface Message {
|
|
|
15
15
|
/** The type of message that was sent. Can be email, inapp, facebook or twitter. */
|
|
16
16
|
message_type: Message.MessageType;
|
|
17
17
|
/** The associated conversation_id */
|
|
18
|
-
conversation_id
|
|
18
|
+
conversation_id: string;
|
|
19
19
|
}
|
|
20
20
|
export declare namespace Message {
|
|
21
21
|
/** The type of message that was sent. Can be email, inapp, facebook or twitter. */
|
|
@@ -4,17 +4,17 @@ import type * as Intercom from "../../../index.mjs";
|
|
|
4
4
|
*/
|
|
5
5
|
export interface Note {
|
|
6
6
|
/** String representing the object's type. Always has the value `note`. */
|
|
7
|
-
type
|
|
7
|
+
type: string;
|
|
8
8
|
/** The id of the note. */
|
|
9
|
-
id
|
|
9
|
+
id: string;
|
|
10
10
|
/** The time the note was created. */
|
|
11
|
-
created_at
|
|
11
|
+
created_at: number;
|
|
12
12
|
/** Represents the contact that the note was created about. */
|
|
13
13
|
contact?: Note.Contact;
|
|
14
14
|
/** Optional. Represents the Admin that created the note. */
|
|
15
15
|
author?: Intercom.Admin;
|
|
16
16
|
/** The body text of the note. */
|
|
17
|
-
body
|
|
17
|
+
body: string;
|
|
18
18
|
}
|
|
19
19
|
export declare namespace Note {
|
|
20
20
|
/**
|
|
@@ -4,17 +4,17 @@ import type * as Intercom from "../../../index.mjs";
|
|
|
4
4
|
*/
|
|
5
5
|
export interface Ticket {
|
|
6
6
|
/** Always ticket */
|
|
7
|
-
type
|
|
7
|
+
type: "ticket";
|
|
8
8
|
/** The unique identifier for the ticket which is given by Intercom. */
|
|
9
|
-
id
|
|
9
|
+
id: string;
|
|
10
10
|
/** The ID of the Ticket used in the Intercom Inbox and Messenger. Do not use ticket_id for API queries. */
|
|
11
|
-
ticket_id
|
|
11
|
+
ticket_id: string;
|
|
12
12
|
/** Category of the Ticket. */
|
|
13
|
-
category
|
|
14
|
-
ticket_attributes
|
|
13
|
+
category: Ticket.Category;
|
|
14
|
+
ticket_attributes: Intercom.TicketCustomAttributes;
|
|
15
15
|
ticket_state?: Intercom.TicketState;
|
|
16
16
|
ticket_type?: Intercom.TicketType;
|
|
17
|
-
contacts
|
|
17
|
+
contacts: Intercom.TicketContacts;
|
|
18
18
|
/** The id representing the admin assigned to the ticket. */
|
|
19
19
|
admin_assignee_id?: string;
|
|
20
20
|
/** The id representing the team assigned to the ticket. */
|
|
@@ -33,6 +33,7 @@ import { TicketsClient } from "../resources/tickets/client/Client.mjs";
|
|
|
33
33
|
import { TicketTypeAttributesClient } from "../resources/ticketTypeAttributes/client/Client.mjs";
|
|
34
34
|
import { TicketTypesClient } from "../resources/ticketTypes/client/Client.mjs";
|
|
35
35
|
import { VisitorsClient } from "../resources/visitors/client/Client.mjs";
|
|
36
|
+
import { WorkflowsClient } from "../resources/workflows/client/Client.mjs";
|
|
36
37
|
export declare namespace UnstableClient {
|
|
37
38
|
interface Options extends BaseClientOptions {
|
|
38
39
|
}
|
|
@@ -57,6 +58,7 @@ export declare class UnstableClient {
|
|
|
57
58
|
protected _dataAttributes: DataAttributesClient | undefined;
|
|
58
59
|
protected _dataEvents: DataEventsClient | undefined;
|
|
59
60
|
protected _dataExport: DataExportClient | undefined;
|
|
61
|
+
protected _workflows: WorkflowsClient | undefined;
|
|
60
62
|
protected _jobs: JobsClient | undefined;
|
|
61
63
|
protected _macros: MacrosClient | undefined;
|
|
62
64
|
protected _messages: MessagesClient | undefined;
|
|
@@ -91,6 +93,7 @@ export declare class UnstableClient {
|
|
|
91
93
|
get dataAttributes(): DataAttributesClient;
|
|
92
94
|
get dataEvents(): DataEventsClient;
|
|
93
95
|
get dataExport(): DataExportClient;
|
|
96
|
+
get workflows(): WorkflowsClient;
|
|
94
97
|
get jobs(): JobsClient;
|
|
95
98
|
get macros(): MacrosClient;
|
|
96
99
|
get messages(): MessagesClient;
|
|
@@ -33,6 +33,7 @@ import { TicketsClient } from "../resources/tickets/client/Client.mjs";
|
|
|
33
33
|
import { TicketTypeAttributesClient } from "../resources/ticketTypeAttributes/client/Client.mjs";
|
|
34
34
|
import { TicketTypesClient } from "../resources/ticketTypes/client/Client.mjs";
|
|
35
35
|
import { VisitorsClient } from "../resources/visitors/client/Client.mjs";
|
|
36
|
+
import { WorkflowsClient } from "../resources/workflows/client/Client.mjs";
|
|
36
37
|
export class UnstableClient {
|
|
37
38
|
constructor(options = {}) {
|
|
38
39
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
@@ -109,6 +110,10 @@ export class UnstableClient {
|
|
|
109
110
|
var _a;
|
|
110
111
|
return ((_a = this._dataExport) !== null && _a !== void 0 ? _a : (this._dataExport = new DataExportClient(this._options)));
|
|
111
112
|
}
|
|
113
|
+
get workflows() {
|
|
114
|
+
var _a;
|
|
115
|
+
return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new WorkflowsClient(this._options)));
|
|
116
|
+
}
|
|
112
117
|
get jobs() {
|
|
113
118
|
var _a;
|
|
114
119
|
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new JobsClient(this._options)));
|
|
@@ -43,6 +43,7 @@ export declare namespace AiAgent {
|
|
|
43
43
|
readonly ConfirmedResolution: "confirmed_resolution";
|
|
44
44
|
readonly Escalated: "escalated";
|
|
45
45
|
readonly NegativeFeedback: "negative_feedback";
|
|
46
|
+
readonly ProcedureHandoff: "procedure_handoff";
|
|
46
47
|
};
|
|
47
48
|
type ResolutionState = (typeof ResolutionState)[keyof typeof ResolutionState];
|
|
48
49
|
}
|
|
@@ -39,6 +39,8 @@ export interface UpdateContactRequest {
|
|
|
39
39
|
owner_id?: number;
|
|
40
40
|
/** Whether the contact is unsubscribed from emails */
|
|
41
41
|
unsubscribed_from_emails?: boolean;
|
|
42
|
+
/** A preferred language setting for the contact, used by Intercom as the language of Fin and the Messenger even if their browser has a different setting. Supports ISO 639-1 two-letter language codes. If an unsupported code is supplied, the field will be set to null. */
|
|
43
|
+
language_override?: string;
|
|
42
44
|
/** The custom attributes which are set for the contact */
|
|
43
45
|
custom_attributes?: Record<string, unknown>;
|
|
44
46
|
}
|
|
@@ -47,7 +47,7 @@ export interface Contact {
|
|
|
47
47
|
last_email_opened_at?: number;
|
|
48
48
|
/** (UNIX timestamp) The time when the contact last clicked a link in an email. */
|
|
49
49
|
last_email_clicked_at?: number;
|
|
50
|
-
/** A preferred language setting for the contact, used by the
|
|
50
|
+
/** A preferred language setting for the contact, used by Intercom as the language of Fin and the Messenger even if their browser has a different setting. Supports ISO 639-1 two-letter language codes. If an unsupported code is supplied, the field will be set to null. */
|
|
51
51
|
language_override?: string;
|
|
52
52
|
/** The name of the browser which the contact is using. */
|
|
53
53
|
browser?: string;
|
|
@@ -479,6 +479,24 @@ export declare class ConversationsClient {
|
|
|
479
479
|
*/
|
|
480
480
|
detachContactFromConversation(request: Intercom.unstable.DetachContactFromConversationRequest, requestOptions?: ConversationsClient.RequestOptions): core.HttpResponsePromise<Intercom.unstable.Conversation>;
|
|
481
481
|
private __detachContactFromConversation;
|
|
482
|
+
/**
|
|
483
|
+
* List all pause/resume events for a conversation. These events track when teammates paused or resumed handling a conversation.
|
|
484
|
+
*
|
|
485
|
+
* Requires the `read_conversations` OAuth scope.
|
|
486
|
+
*
|
|
487
|
+
* @param {Intercom.unstable.ListHandlingEventsRequest} request
|
|
488
|
+
* @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
489
|
+
*
|
|
490
|
+
* @throws {@link Intercom.unstable.UnauthorizedError}
|
|
491
|
+
* @throws {@link Intercom.unstable.NotFoundError}
|
|
492
|
+
*
|
|
493
|
+
* @example
|
|
494
|
+
* await client.unstable.conversations.listHandlingEvents({
|
|
495
|
+
* id: "123"
|
|
496
|
+
* })
|
|
497
|
+
*/
|
|
498
|
+
listHandlingEvents(request: Intercom.unstable.ListHandlingEventsRequest, requestOptions?: ConversationsClient.RequestOptions): core.HttpResponsePromise<Intercom.unstable.HandlingEventList>;
|
|
499
|
+
private __listHandlingEvents;
|
|
482
500
|
/**
|
|
483
501
|
* You can redact a conversation part or the source message of a conversation (as seen in the source object).
|
|
484
502
|
*
|
|
@@ -927,6 +927,62 @@ export class ConversationsClient {
|
|
|
927
927
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/conversations/{conversation_id}/customers/{contact_id}");
|
|
928
928
|
});
|
|
929
929
|
}
|
|
930
|
+
/**
|
|
931
|
+
* List all pause/resume events for a conversation. These events track when teammates paused or resumed handling a conversation.
|
|
932
|
+
*
|
|
933
|
+
* Requires the `read_conversations` OAuth scope.
|
|
934
|
+
*
|
|
935
|
+
* @param {Intercom.unstable.ListHandlingEventsRequest} request
|
|
936
|
+
* @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
937
|
+
*
|
|
938
|
+
* @throws {@link Intercom.unstable.UnauthorizedError}
|
|
939
|
+
* @throws {@link Intercom.unstable.NotFoundError}
|
|
940
|
+
*
|
|
941
|
+
* @example
|
|
942
|
+
* await client.unstable.conversations.listHandlingEvents({
|
|
943
|
+
* id: "123"
|
|
944
|
+
* })
|
|
945
|
+
*/
|
|
946
|
+
listHandlingEvents(request, requestOptions) {
|
|
947
|
+
return core.HttpResponsePromise.fromPromise(this.__listHandlingEvents(request, requestOptions));
|
|
948
|
+
}
|
|
949
|
+
__listHandlingEvents(request, requestOptions) {
|
|
950
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
951
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
952
|
+
const { id } = request;
|
|
953
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
954
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Intercom-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
955
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
956
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.IntercomEnvironment.UsProduction, `conversations/${core.url.encodePathParam(id)}/handling_events`),
|
|
957
|
+
method: "GET",
|
|
958
|
+
headers: _headers,
|
|
959
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
960
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 20) * 1000,
|
|
961
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
962
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
963
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
964
|
+
logging: this._options.logging,
|
|
965
|
+
});
|
|
966
|
+
if (_response.ok) {
|
|
967
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
968
|
+
}
|
|
969
|
+
if (_response.error.reason === "status-code") {
|
|
970
|
+
switch (_response.error.statusCode) {
|
|
971
|
+
case 401:
|
|
972
|
+
throw new Intercom.unstable.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
973
|
+
case 404:
|
|
974
|
+
throw new Intercom.unstable.NotFoundError(_response.error.body, _response.rawResponse);
|
|
975
|
+
default:
|
|
976
|
+
throw new errors.IntercomError({
|
|
977
|
+
statusCode: _response.error.statusCode,
|
|
978
|
+
body: _response.error.body,
|
|
979
|
+
rawResponse: _response.rawResponse,
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/conversations/{id}/handling_events");
|
|
984
|
+
});
|
|
985
|
+
}
|
|
930
986
|
/**
|
|
931
987
|
* You can redact a conversation part or the source message of a conversation (as seen in the source object).
|
|
932
988
|
*
|
|
@@ -4,6 +4,7 @@ export type { CreateConversationRequest } from "./CreateConversationRequest.mjs"
|
|
|
4
4
|
export type { DeleteConversationRequest } from "./DeleteConversationRequest.mjs";
|
|
5
5
|
export type { DetachContactFromConversationRequest } from "./DetachContactFromConversationRequest.mjs";
|
|
6
6
|
export type { ListConversationsRequest } from "./ListConversationsRequest.mjs";
|
|
7
|
+
export type { ListHandlingEventsRequest } from "./ListHandlingEventsRequest.mjs";
|
|
7
8
|
export type { ManageConversationRequest } from "./ManageConversationRequest.mjs";
|
|
8
9
|
export type { ReplyConversationRequest } from "./ReplyConversationRequest.mjs";
|
|
9
10
|
export type { RetrieveConversationRequest } from "./RetrieveConversationRequest.mjs";
|
|
@@ -31,6 +31,8 @@ export interface Conversation {
|
|
|
31
31
|
team_assignee_id?: string;
|
|
32
32
|
/** The ID of the company that the conversation is associated with. The unique identifier for the company which is given by Intercom. */
|
|
33
33
|
company_id?: string;
|
|
34
|
+
/** The company associated with the conversation. */
|
|
35
|
+
company?: Intercom.unstable.Company;
|
|
34
36
|
tags?: Intercom.unstable.Tags;
|
|
35
37
|
conversation_rating?: Intercom.unstable.ConversationRating;
|
|
36
38
|
source?: Intercom.unstable.ConversationSource;
|
|
@@ -91,3 +91,5 @@ export * from "./ticketTypes/client/requests/index.mjs";
|
|
|
91
91
|
export * as ticketTypes from "./ticketTypes/index.mjs";
|
|
92
92
|
export * from "./visitors/client/requests/index.mjs";
|
|
93
93
|
export * as visitors from "./visitors/index.mjs";
|
|
94
|
+
export * from "./workflows/client/requests/index.mjs";
|
|
95
|
+
export * as workflows from "./workflows/index.mjs";
|
|
@@ -91,3 +91,5 @@ export * from "./ticketTypes/client/requests/index.mjs";
|
|
|
91
91
|
export * as ticketTypes from "./ticketTypes/index.mjs";
|
|
92
92
|
export * from "./visitors/client/requests/index.mjs";
|
|
93
93
|
export * as visitors from "./visitors/index.mjs";
|
|
94
|
+
export * from "./workflows/client/requests/index.mjs";
|
|
95
|
+
export * as workflows from "./workflows/index.mjs";
|