intercom-client 7.0.1 → 7.0.2
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/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/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/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/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/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/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
|
@@ -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";
|
|
@@ -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";
|
|
@@ -0,0 +1,39 @@
|
|
|
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 WorkflowsClient {
|
|
6
|
+
interface Options extends BaseClientOptions {
|
|
7
|
+
}
|
|
8
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Export workflow configurations from your workspace.
|
|
13
|
+
*/
|
|
14
|
+
export declare class WorkflowsClient {
|
|
15
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<WorkflowsClient.Options>;
|
|
16
|
+
constructor(options?: WorkflowsClient.Options);
|
|
17
|
+
/**
|
|
18
|
+
* Export a workflow configuration by its ID. This endpoint returns the complete workflow definition including its steps, targeting rules, and attributes.
|
|
19
|
+
*
|
|
20
|
+
* This endpoint is designed for EU Data Act compliance, allowing customers to export their workflow configurations.
|
|
21
|
+
*
|
|
22
|
+
* {% admonition type="warning" name="Unstable API" %}
|
|
23
|
+
* This API is currently in the Unstable version. Its behavior may change in future releases.
|
|
24
|
+
* {% /admonition %}
|
|
25
|
+
*
|
|
26
|
+
* @param {Intercom.unstable.ExportWorkflowRequest} request
|
|
27
|
+
* @param {WorkflowsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
|
+
*
|
|
29
|
+
* @throws {@link Intercom.unstable.ForbiddenError}
|
|
30
|
+
* @throws {@link Intercom.unstable.NotFoundError}
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await client.unstable.workflows.exportWorkflow({
|
|
34
|
+
* id: "12345"
|
|
35
|
+
* })
|
|
36
|
+
*/
|
|
37
|
+
exportWorkflow(request: Intercom.unstable.ExportWorkflowRequest, requestOptions?: WorkflowsClient.RequestOptions): core.HttpResponsePromise<Intercom.unstable.WorkflowExport>;
|
|
38
|
+
private __exportWorkflow;
|
|
39
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
* Export workflow configurations from your workspace.
|
|
20
|
+
*/
|
|
21
|
+
export class WorkflowsClient {
|
|
22
|
+
constructor(options = {}) {
|
|
23
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Export a workflow configuration by its ID. This endpoint returns the complete workflow definition including its steps, targeting rules, and attributes.
|
|
27
|
+
*
|
|
28
|
+
* This endpoint is designed for EU Data Act compliance, allowing customers to export their workflow configurations.
|
|
29
|
+
*
|
|
30
|
+
* {% admonition type="warning" name="Unstable API" %}
|
|
31
|
+
* This API is currently in the Unstable version. Its behavior may change in future releases.
|
|
32
|
+
* {% /admonition %}
|
|
33
|
+
*
|
|
34
|
+
* @param {Intercom.unstable.ExportWorkflowRequest} request
|
|
35
|
+
* @param {WorkflowsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link Intercom.unstable.ForbiddenError}
|
|
38
|
+
* @throws {@link Intercom.unstable.NotFoundError}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* await client.unstable.workflows.exportWorkflow({
|
|
42
|
+
* id: "12345"
|
|
43
|
+
* })
|
|
44
|
+
*/
|
|
45
|
+
exportWorkflow(request, requestOptions) {
|
|
46
|
+
return core.HttpResponsePromise.fromPromise(this.__exportWorkflow(request, requestOptions));
|
|
47
|
+
}
|
|
48
|
+
__exportWorkflow(request, requestOptions) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
51
|
+
const { id } = request;
|
|
52
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
53
|
+
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);
|
|
54
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
55
|
+
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, `export/workflows/${core.url.encodePathParam(id)}`),
|
|
56
|
+
method: "GET",
|
|
57
|
+
headers: _headers,
|
|
58
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
59
|
+
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,
|
|
60
|
+
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,
|
|
61
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
62
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
63
|
+
logging: this._options.logging,
|
|
64
|
+
});
|
|
65
|
+
if (_response.ok) {
|
|
66
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
67
|
+
}
|
|
68
|
+
if (_response.error.reason === "status-code") {
|
|
69
|
+
switch (_response.error.statusCode) {
|
|
70
|
+
case 403:
|
|
71
|
+
throw new Intercom.unstable.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
72
|
+
case 404:
|
|
73
|
+
throw new Intercom.unstable.NotFoundError(_response.error.body, _response.rawResponse);
|
|
74
|
+
default:
|
|
75
|
+
throw new errors.IntercomError({
|
|
76
|
+
statusCode: _response.error.statusCode,
|
|
77
|
+
body: _response.error.body,
|
|
78
|
+
rawResponse: _response.rawResponse,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/export/workflows/{id}");
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ExportWorkflowRequest } from "./ExportWorkflowRequest.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -11,7 +11,9 @@ export declare namespace ConversationAttributeUpdatedByAdmin {
|
|
|
11
11
|
name?: string;
|
|
12
12
|
}
|
|
13
13
|
interface Value {
|
|
14
|
-
/**
|
|
14
|
+
/** Current value of the CDA updated */
|
|
15
15
|
name?: string;
|
|
16
|
+
/** Previous value of the CDA */
|
|
17
|
+
previous?: string;
|
|
16
18
|
}
|
|
17
19
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains details about Custom Data Attributes (CDAs) that were modified by a user for conversation part type <code>conversation_attribute_updated_by_user</code>.
|
|
3
|
+
*/
|
|
4
|
+
export interface ConversationAttributeUpdatedByUser {
|
|
5
|
+
attribute?: ConversationAttributeUpdatedByUser.Attribute;
|
|
6
|
+
value?: ConversationAttributeUpdatedByUser.Value;
|
|
7
|
+
}
|
|
8
|
+
export declare namespace ConversationAttributeUpdatedByUser {
|
|
9
|
+
interface Attribute {
|
|
10
|
+
/** Name of the CDA updated */
|
|
11
|
+
name?: string;
|
|
12
|
+
}
|
|
13
|
+
interface Value {
|
|
14
|
+
/** Current value of the CDA updated */
|
|
15
|
+
name?: string;
|
|
16
|
+
/** Previous value of the CDA (null for older events) */
|
|
17
|
+
previous?: string;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains details about SLA applied by modern Operator workflows for conversation part type <code>conversation_sla_applied_by_rule</code>.
|
|
3
|
+
*/
|
|
4
|
+
export interface ConversationSlaAppliedByRule {
|
|
5
|
+
/** Name of the SLA that was applied */
|
|
6
|
+
sla_name?: string;
|
|
7
|
+
/** Target times configured for the SLA (in seconds) */
|
|
8
|
+
sla_definition?: ConversationSlaAppliedByRule.SlaDefinition;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace ConversationSlaAppliedByRule {
|
|
11
|
+
/**
|
|
12
|
+
* Target times configured for the SLA (in seconds)
|
|
13
|
+
*/
|
|
14
|
+
interface SlaDefinition {
|
|
15
|
+
/** First response time target in seconds */
|
|
16
|
+
first_reply_time?: number;
|
|
17
|
+
/** Next reply time target in seconds */
|
|
18
|
+
next_reply_time?: number;
|
|
19
|
+
/** Resolution time target in seconds */
|
|
20
|
+
resolution_time?: number;
|
|
21
|
+
/** Time to close target in seconds */
|
|
22
|
+
time_to_close?: number;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains details about SLA applied by legacy Inbox Rules for conversation part type <code>conversation_sla_applied_by_workflow</code>.
|
|
3
|
+
*/
|
|
4
|
+
export interface ConversationSlaAppliedByWorkflow {
|
|
5
|
+
/** Name of the SLA that was applied */
|
|
6
|
+
sla_name?: string;
|
|
7
|
+
/** Target times configured for the SLA (in seconds) */
|
|
8
|
+
sla_definition?: ConversationSlaAppliedByWorkflow.SlaDefinition;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace ConversationSlaAppliedByWorkflow {
|
|
11
|
+
/**
|
|
12
|
+
* Target times configured for the SLA (in seconds)
|
|
13
|
+
*/
|
|
14
|
+
interface SlaDefinition {
|
|
15
|
+
/** First response time target in seconds */
|
|
16
|
+
first_reply_time?: number;
|
|
17
|
+
/** Next reply time target in seconds */
|
|
18
|
+
next_reply_time?: number;
|
|
19
|
+
/** Resolution time target in seconds */
|
|
20
|
+
resolution_time?: number;
|
|
21
|
+
/** Time to close target in seconds */
|
|
22
|
+
time_to_close?: number;
|
|
23
|
+
}
|
|
24
|
+
}
|