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
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
|
|
|
44
44
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "intercom-client",
|
|
47
|
-
"X-Fern-SDK-Version": "7.0.
|
|
48
|
-
"User-Agent": "intercom-client/7.0.
|
|
47
|
+
"X-Fern-SDK-Version": "7.0.3",
|
|
48
|
+
"User-Agent": "intercom-client/7.0.3",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
"Intercom-Version": (_a = options === null || options === void 0 ? void 0 : options.version) !== null && _a !== void 0 ? _a : "2.14",
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { EventsClient } from "./api/resources/events/client/Client.js";
|
|
|
14
14
|
import { ExportClient } from "./api/resources/export/client/Client.js";
|
|
15
15
|
import { HelpCentersClient } from "./api/resources/helpCenters/client/Client.js";
|
|
16
16
|
import { InternalArticlesClient } from "./api/resources/internalArticles/client/Client.js";
|
|
17
|
+
import { IpAllowlistClient } from "./api/resources/ipAllowlist/client/Client.js";
|
|
17
18
|
import { JobsClient } from "./api/resources/jobs/client/Client.js";
|
|
18
19
|
import { MessagesClient } from "./api/resources/messages/client/Client.js";
|
|
19
20
|
import { NewsClient } from "./api/resources/news/client/Client.js";
|
|
@@ -46,6 +47,7 @@ export declare class IntercomClient {
|
|
|
46
47
|
protected _dataExport: DataExportClient | undefined;
|
|
47
48
|
protected _helpCenters: HelpCentersClient | undefined;
|
|
48
49
|
protected _internalArticles: InternalArticlesClient | undefined;
|
|
50
|
+
protected _ipAllowlist: IpAllowlistClient | undefined;
|
|
49
51
|
protected _companies: CompaniesClient | undefined;
|
|
50
52
|
protected _contacts: ContactsClient | undefined;
|
|
51
53
|
protected _notes: NotesClient | undefined;
|
|
@@ -77,6 +79,7 @@ export declare class IntercomClient {
|
|
|
77
79
|
get dataExport(): DataExportClient;
|
|
78
80
|
get helpCenters(): HelpCentersClient;
|
|
79
81
|
get internalArticles(): InternalArticlesClient;
|
|
82
|
+
get ipAllowlist(): IpAllowlistClient;
|
|
80
83
|
get companies(): CompaniesClient;
|
|
81
84
|
get contacts(): ContactsClient;
|
|
82
85
|
get notes(): NotesClient;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -18,20 +18,21 @@ const Client_js_13 = require("./api/resources/events/client/Client.js");
|
|
|
18
18
|
const Client_js_14 = require("./api/resources/export/client/Client.js");
|
|
19
19
|
const Client_js_15 = require("./api/resources/helpCenters/client/Client.js");
|
|
20
20
|
const Client_js_16 = require("./api/resources/internalArticles/client/Client.js");
|
|
21
|
-
const Client_js_17 = require("./api/resources/
|
|
22
|
-
const Client_js_18 = require("./api/resources/
|
|
23
|
-
const Client_js_19 = require("./api/resources/
|
|
24
|
-
const Client_js_20 = require("./api/resources/
|
|
25
|
-
const Client_js_21 = require("./api/resources/
|
|
26
|
-
const Client_js_22 = require("./api/resources/
|
|
27
|
-
const Client_js_23 = require("./api/resources/
|
|
28
|
-
const Client_js_24 = require("./api/resources/
|
|
29
|
-
const Client_js_25 = require("./api/resources/
|
|
30
|
-
const Client_js_26 = require("./api/resources/
|
|
31
|
-
const Client_js_27 = require("./api/resources/
|
|
32
|
-
const Client_js_28 = require("./api/resources/
|
|
33
|
-
const Client_js_29 = require("./api/resources/
|
|
34
|
-
const Client_js_30 = require("./api/resources/
|
|
21
|
+
const Client_js_17 = require("./api/resources/ipAllowlist/client/Client.js");
|
|
22
|
+
const Client_js_18 = require("./api/resources/jobs/client/Client.js");
|
|
23
|
+
const Client_js_19 = require("./api/resources/messages/client/Client.js");
|
|
24
|
+
const Client_js_20 = require("./api/resources/news/client/Client.js");
|
|
25
|
+
const Client_js_21 = require("./api/resources/notes/client/Client.js");
|
|
26
|
+
const Client_js_22 = require("./api/resources/phoneCallRedirects/client/Client.js");
|
|
27
|
+
const Client_js_23 = require("./api/resources/segments/client/Client.js");
|
|
28
|
+
const Client_js_24 = require("./api/resources/subscriptionTypes/client/Client.js");
|
|
29
|
+
const Client_js_25 = require("./api/resources/tags/client/Client.js");
|
|
30
|
+
const Client_js_26 = require("./api/resources/teams/client/Client.js");
|
|
31
|
+
const Client_js_27 = require("./api/resources/ticketStates/client/Client.js");
|
|
32
|
+
const Client_js_28 = require("./api/resources/tickets/client/Client.js");
|
|
33
|
+
const Client_js_29 = require("./api/resources/ticketTypes/client/Client.js");
|
|
34
|
+
const Client_js_30 = require("./api/resources/unstable/client/Client.js");
|
|
35
|
+
const Client_js_31 = require("./api/resources/visitors/client/Client.js");
|
|
35
36
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
36
37
|
class IntercomClient {
|
|
37
38
|
constructor(options = {}) {
|
|
@@ -69,6 +70,10 @@ class IntercomClient {
|
|
|
69
70
|
var _a;
|
|
70
71
|
return ((_a = this._internalArticles) !== null && _a !== void 0 ? _a : (this._internalArticles = new Client_js_16.InternalArticlesClient(this._options)));
|
|
71
72
|
}
|
|
73
|
+
get ipAllowlist() {
|
|
74
|
+
var _a;
|
|
75
|
+
return ((_a = this._ipAllowlist) !== null && _a !== void 0 ? _a : (this._ipAllowlist = new Client_js_17.IpAllowlistClient(this._options)));
|
|
76
|
+
}
|
|
72
77
|
get companies() {
|
|
73
78
|
var _a;
|
|
74
79
|
return ((_a = this._companies) !== null && _a !== void 0 ? _a : (this._companies = new Client_js_6.CompaniesClient(this._options)));
|
|
@@ -79,11 +84,11 @@ class IntercomClient {
|
|
|
79
84
|
}
|
|
80
85
|
get notes() {
|
|
81
86
|
var _a;
|
|
82
|
-
return ((_a = this._notes) !== null && _a !== void 0 ? _a : (this._notes = new
|
|
87
|
+
return ((_a = this._notes) !== null && _a !== void 0 ? _a : (this._notes = new Client_js_21.NotesClient(this._options)));
|
|
83
88
|
}
|
|
84
89
|
get tags() {
|
|
85
90
|
var _a;
|
|
86
|
-
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new
|
|
91
|
+
return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_js_25.TagsClient(this._options)));
|
|
87
92
|
}
|
|
88
93
|
get conversations() {
|
|
89
94
|
var _a;
|
|
@@ -107,23 +112,23 @@ class IntercomClient {
|
|
|
107
112
|
}
|
|
108
113
|
get jobs() {
|
|
109
114
|
var _a;
|
|
110
|
-
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new
|
|
115
|
+
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_js_18.JobsClient(this._options)));
|
|
111
116
|
}
|
|
112
117
|
get messages() {
|
|
113
118
|
var _a;
|
|
114
|
-
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new
|
|
119
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_js_19.MessagesClient(this._options)));
|
|
115
120
|
}
|
|
116
121
|
get segments() {
|
|
117
122
|
var _a;
|
|
118
|
-
return ((_a = this._segments) !== null && _a !== void 0 ? _a : (this._segments = new
|
|
123
|
+
return ((_a = this._segments) !== null && _a !== void 0 ? _a : (this._segments = new Client_js_23.SegmentsClient(this._options)));
|
|
119
124
|
}
|
|
120
125
|
get subscriptionTypes() {
|
|
121
126
|
var _a;
|
|
122
|
-
return ((_a = this._subscriptionTypes) !== null && _a !== void 0 ? _a : (this._subscriptionTypes = new
|
|
127
|
+
return ((_a = this._subscriptionTypes) !== null && _a !== void 0 ? _a : (this._subscriptionTypes = new Client_js_24.SubscriptionTypesClient(this._options)));
|
|
123
128
|
}
|
|
124
129
|
get phoneCallRedirects() {
|
|
125
130
|
var _a;
|
|
126
|
-
return ((_a = this._phoneCallRedirects) !== null && _a !== void 0 ? _a : (this._phoneCallRedirects = new
|
|
131
|
+
return ((_a = this._phoneCallRedirects) !== null && _a !== void 0 ? _a : (this._phoneCallRedirects = new Client_js_22.PhoneCallRedirectsClient(this._options)));
|
|
127
132
|
}
|
|
128
133
|
get calls() {
|
|
129
134
|
var _a;
|
|
@@ -131,31 +136,31 @@ class IntercomClient {
|
|
|
131
136
|
}
|
|
132
137
|
get teams() {
|
|
133
138
|
var _a;
|
|
134
|
-
return ((_a = this._teams) !== null && _a !== void 0 ? _a : (this._teams = new
|
|
139
|
+
return ((_a = this._teams) !== null && _a !== void 0 ? _a : (this._teams = new Client_js_26.TeamsClient(this._options)));
|
|
135
140
|
}
|
|
136
141
|
get ticketStates() {
|
|
137
142
|
var _a;
|
|
138
|
-
return ((_a = this._ticketStates) !== null && _a !== void 0 ? _a : (this._ticketStates = new
|
|
143
|
+
return ((_a = this._ticketStates) !== null && _a !== void 0 ? _a : (this._ticketStates = new Client_js_27.TicketStatesClient(this._options)));
|
|
139
144
|
}
|
|
140
145
|
get ticketTypes() {
|
|
141
146
|
var _a;
|
|
142
|
-
return ((_a = this._ticketTypes) !== null && _a !== void 0 ? _a : (this._ticketTypes = new
|
|
147
|
+
return ((_a = this._ticketTypes) !== null && _a !== void 0 ? _a : (this._ticketTypes = new Client_js_29.TicketTypesClient(this._options)));
|
|
143
148
|
}
|
|
144
149
|
get tickets() {
|
|
145
150
|
var _a;
|
|
146
|
-
return ((_a = this._tickets) !== null && _a !== void 0 ? _a : (this._tickets = new
|
|
151
|
+
return ((_a = this._tickets) !== null && _a !== void 0 ? _a : (this._tickets = new Client_js_28.TicketsClient(this._options)));
|
|
147
152
|
}
|
|
148
153
|
get visitors() {
|
|
149
154
|
var _a;
|
|
150
|
-
return ((_a = this._visitors) !== null && _a !== void 0 ? _a : (this._visitors = new
|
|
155
|
+
return ((_a = this._visitors) !== null && _a !== void 0 ? _a : (this._visitors = new Client_js_31.VisitorsClient(this._options)));
|
|
151
156
|
}
|
|
152
157
|
get news() {
|
|
153
158
|
var _a;
|
|
154
|
-
return ((_a = this._news) !== null && _a !== void 0 ? _a : (this._news = new
|
|
159
|
+
return ((_a = this._news) !== null && _a !== void 0 ? _a : (this._news = new Client_js_20.NewsClient(this._options)));
|
|
155
160
|
}
|
|
156
161
|
get unstable() {
|
|
157
162
|
var _a;
|
|
158
|
-
return ((_a = this._unstable) !== null && _a !== void 0 ? _a : (this._unstable = new
|
|
163
|
+
return ((_a = this._unstable) !== null && _a !== void 0 ? _a : (this._unstable = new Client_js_30.UnstableClient(this._options)));
|
|
159
164
|
}
|
|
160
165
|
}
|
|
161
166
|
exports.IntercomClient = IntercomClient;
|
|
@@ -4,15 +4,15 @@ import type * as Intercom from "../../../index.js";
|
|
|
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.js";
|
|
|
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.js";
|
|
|
49
49
|
export * from "./internalArticles/client/requests/index.js";
|
|
50
50
|
export * as internalArticles from "./internalArticles/index.js";
|
|
51
51
|
export * from "./internalArticles/types/index.js";
|
|
52
|
+
export * as ipAllowlist from "./ipAllowlist/index.js";
|
|
52
53
|
export * from "./jobs/client/requests/index.js";
|
|
53
54
|
export * as jobs from "./jobs/index.js";
|
|
54
55
|
export * from "./jobs/types/index.js";
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.visitors = exports.unstable = exports.ticketTypes = exports.tickets = exports.ticketStates = exports.teams = exports.tags = exports.subscriptionTypes = exports.segments = exports.phoneCallRedirects = exports.notes = exports.news = exports.messages = exports.jobs = exports.internalArticles = exports.helpCenters = exports.helpCenter = exports.export_ = exports.events = exports.dataExport = exports.dataEvents = exports.dataAttributes = exports.customObjectInstances = exports.customChannelEvents = exports.conversations = exports.contacts = exports.companies = exports.calls = exports.awayStatusReasons = exports.articles = exports.aiContentSource = exports.aiContent = exports.aiAgent = exports.admins = void 0;
|
|
39
|
+
exports.visitors = exports.unstable = exports.ticketTypes = exports.tickets = exports.ticketStates = exports.teams = exports.tags = exports.subscriptionTypes = exports.segments = exports.phoneCallRedirects = exports.notes = exports.news = exports.messages = exports.jobs = exports.ipAllowlist = exports.internalArticles = exports.helpCenters = exports.helpCenter = exports.export_ = exports.events = exports.dataExport = exports.dataEvents = exports.dataAttributes = exports.customObjectInstances = exports.customChannelEvents = exports.conversations = exports.contacts = exports.companies = exports.calls = exports.awayStatusReasons = exports.articles = exports.aiContentSource = exports.aiContent = exports.aiAgent = exports.admins = void 0;
|
|
40
40
|
__exportStar(require("./admins/client/requests/index.js"), exports);
|
|
41
41
|
exports.admins = __importStar(require("./admins/index.js"));
|
|
42
42
|
__exportStar(require("./admins/types/index.js"), exports);
|
|
@@ -88,6 +88,7 @@ exports.helpCenters = __importStar(require("./helpCenters/index.js"));
|
|
|
88
88
|
__exportStar(require("./internalArticles/client/requests/index.js"), exports);
|
|
89
89
|
exports.internalArticles = __importStar(require("./internalArticles/index.js"));
|
|
90
90
|
__exportStar(require("./internalArticles/types/index.js"), exports);
|
|
91
|
+
exports.ipAllowlist = __importStar(require("./ipAllowlist/index.js"));
|
|
91
92
|
__exportStar(require("./jobs/client/requests/index.js"), exports);
|
|
92
93
|
exports.jobs = __importStar(require("./jobs/index.js"));
|
|
93
94
|
__exportStar(require("./jobs/types/index.js"), exports);
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as Intercom from "../../../index.js";
|
|
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,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.IpAllowlistClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
+
const Intercom = __importStar(require("../../../index.js"));
|
|
54
|
+
/**
|
|
55
|
+
* Manage IP allowlist settings for your workspace.
|
|
56
|
+
*
|
|
57
|
+
* 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.
|
|
58
|
+
*
|
|
59
|
+
* {% admonition type="info" name="Authentication" %}
|
|
60
|
+
* This endpoint requires the `manage_ip_allowlist` OAuth scope.
|
|
61
|
+
* {% /admonition %}
|
|
62
|
+
*/
|
|
63
|
+
class IpAllowlistClient {
|
|
64
|
+
constructor(options = {}) {
|
|
65
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Retrieve the current IP allowlist configuration for the workspace.
|
|
69
|
+
*
|
|
70
|
+
* @param {IpAllowlistClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
71
|
+
*
|
|
72
|
+
* @throws {@link Intercom.UnauthorizedError}
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* await client.ipAllowlist.getIpAllowlist()
|
|
76
|
+
*/
|
|
77
|
+
getIpAllowlist(requestOptions) {
|
|
78
|
+
return core.HttpResponsePromise.fromPromise(this.__getIpAllowlist(requestOptions));
|
|
79
|
+
}
|
|
80
|
+
__getIpAllowlist(requestOptions) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
83
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
84
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Intercom-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
86
|
+
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"),
|
|
87
|
+
method: "GET",
|
|
88
|
+
headers: _headers,
|
|
89
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
90
|
+
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,
|
|
91
|
+
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,
|
|
92
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
93
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
94
|
+
logging: this._options.logging,
|
|
95
|
+
});
|
|
96
|
+
if (_response.ok) {
|
|
97
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
98
|
+
}
|
|
99
|
+
if (_response.error.reason === "status-code") {
|
|
100
|
+
switch (_response.error.statusCode) {
|
|
101
|
+
case 401:
|
|
102
|
+
throw new Intercom.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
103
|
+
default:
|
|
104
|
+
throw new errors.IntercomError({
|
|
105
|
+
statusCode: _response.error.statusCode,
|
|
106
|
+
body: _response.error.body,
|
|
107
|
+
rawResponse: _response.rawResponse,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/ip_allowlist");
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Update the IP allowlist configuration for the workspace.
|
|
116
|
+
*
|
|
117
|
+
* {% admonition type="warning" name="Lockout Protection" %}
|
|
118
|
+
* 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.
|
|
119
|
+
* {% /admonition %}
|
|
120
|
+
*
|
|
121
|
+
* @param {Intercom.IpAllowlist} request
|
|
122
|
+
* @param {IpAllowlistClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
123
|
+
*
|
|
124
|
+
* @throws {@link Intercom.UnauthorizedError}
|
|
125
|
+
* @throws {@link Intercom.UnprocessableEntityError}
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* await client.ipAllowlist.updateIpAllowlist({
|
|
129
|
+
* enabled: true,
|
|
130
|
+
* ip_allowlist: ["192.168.1.0/24", "10.0.0.1"]
|
|
131
|
+
* })
|
|
132
|
+
*/
|
|
133
|
+
updateIpAllowlist(request, requestOptions) {
|
|
134
|
+
return core.HttpResponsePromise.fromPromise(this.__updateIpAllowlist(request, requestOptions));
|
|
135
|
+
}
|
|
136
|
+
__updateIpAllowlist(request, requestOptions) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
139
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
140
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Intercom-Version": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.version }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
141
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
142
|
+
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"),
|
|
143
|
+
method: "PUT",
|
|
144
|
+
headers: _headers,
|
|
145
|
+
contentType: "application/json",
|
|
146
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
147
|
+
requestType: "json",
|
|
148
|
+
body: request,
|
|
149
|
+
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,
|
|
150
|
+
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,
|
|
151
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
152
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
153
|
+
logging: this._options.logging,
|
|
154
|
+
});
|
|
155
|
+
if (_response.ok) {
|
|
156
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
157
|
+
}
|
|
158
|
+
if (_response.error.reason === "status-code") {
|
|
159
|
+
switch (_response.error.statusCode) {
|
|
160
|
+
case 401:
|
|
161
|
+
throw new Intercom.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
162
|
+
case 422:
|
|
163
|
+
throw new Intercom.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
164
|
+
default:
|
|
165
|
+
throw new errors.IntercomError({
|
|
166
|
+
statusCode: _response.error.statusCode,
|
|
167
|
+
body: _response.error.body,
|
|
168
|
+
rawResponse: _response.rawResponse,
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/ip_allowlist");
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
exports.IpAllowlistClient = IpAllowlistClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -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.js";
|
|
|
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.js";
|
|
|
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.js";
|
|
|
33
33
|
import { TicketTypeAttributesClient } from "../resources/ticketTypeAttributes/client/Client.js";
|
|
34
34
|
import { TicketTypesClient } from "../resources/ticketTypes/client/Client.js";
|
|
35
35
|
import { VisitorsClient } from "../resources/visitors/client/Client.js";
|
|
36
|
+
import { WorkflowsClient } from "../resources/workflows/client/Client.js";
|
|
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;
|