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
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains SLA status at the moment of pausing for conversation part type <code>conversation_sla_paused</code>.
|
|
3
|
+
*/
|
|
4
|
+
export interface ConversationSlaPaused {
|
|
5
|
+
/** Name of the SLA being paused */
|
|
6
|
+
sla_name?: string;
|
|
7
|
+
/** Overall SLA status at pause time */
|
|
8
|
+
current_sla_status?: ConversationSlaPaused.CurrentSlaStatus;
|
|
9
|
+
/** Status of all SLA targets at pause time */
|
|
10
|
+
sla_states?: Record<string, ConversationSlaPaused.SlaStates.Value>;
|
|
11
|
+
}
|
|
12
|
+
export declare namespace ConversationSlaPaused {
|
|
13
|
+
/** Overall SLA status at pause time */
|
|
14
|
+
const CurrentSlaStatus: {
|
|
15
|
+
readonly Active: "active";
|
|
16
|
+
readonly Hit: "hit";
|
|
17
|
+
readonly Missed: "missed";
|
|
18
|
+
readonly Canceled: "canceled";
|
|
19
|
+
};
|
|
20
|
+
type CurrentSlaStatus = (typeof CurrentSlaStatus)[keyof typeof CurrentSlaStatus];
|
|
21
|
+
namespace SlaStates {
|
|
22
|
+
interface Value {
|
|
23
|
+
/** Status of this specific target (always paused) */
|
|
24
|
+
status?: "paused";
|
|
25
|
+
/** Time remaining when paused */
|
|
26
|
+
seconds_remaining?: number;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var ConversationSlaPaused;
|
|
3
|
+
(function (ConversationSlaPaused) {
|
|
4
|
+
/** Overall SLA status at pause time */
|
|
5
|
+
ConversationSlaPaused.CurrentSlaStatus = {
|
|
6
|
+
Active: "active",
|
|
7
|
+
Hit: "hit",
|
|
8
|
+
Missed: "missed",
|
|
9
|
+
Canceled: "canceled",
|
|
10
|
+
};
|
|
11
|
+
})(ConversationSlaPaused || (ConversationSlaPaused = {}));
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains complete status of all SLA targets when a breach occurs for conversation part type <code>conversation_sla_target_missed</code>.
|
|
3
|
+
*/
|
|
4
|
+
export interface ConversationSlaTargetMissed {
|
|
5
|
+
/** Name of the SLA */
|
|
6
|
+
sla_name?: string;
|
|
7
|
+
/** Which specific target was missed */
|
|
8
|
+
sla_target_type?: ConversationSlaTargetMissed.SlaTargetType;
|
|
9
|
+
/** Overall SLA status */
|
|
10
|
+
current_sla_status?: ConversationSlaTargetMissed.CurrentSlaStatus;
|
|
11
|
+
/** Status of all SLA targets at the time of breach */
|
|
12
|
+
sla_states?: Record<string, ConversationSlaTargetMissed.SlaStates.Value>;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace ConversationSlaTargetMissed {
|
|
15
|
+
/** Which specific target was missed */
|
|
16
|
+
const SlaTargetType: {
|
|
17
|
+
readonly FirstReplyTime: "first_reply_time";
|
|
18
|
+
readonly NextReplyTime: "next_reply_time";
|
|
19
|
+
readonly ResolutionTime: "resolution_time";
|
|
20
|
+
readonly TimeToClose: "time_to_close";
|
|
21
|
+
};
|
|
22
|
+
type SlaTargetType = (typeof SlaTargetType)[keyof typeof SlaTargetType];
|
|
23
|
+
/** Overall SLA status */
|
|
24
|
+
const CurrentSlaStatus: {
|
|
25
|
+
readonly Hit: "hit";
|
|
26
|
+
readonly Missed: "missed";
|
|
27
|
+
readonly Active: "active";
|
|
28
|
+
readonly Paused: "paused";
|
|
29
|
+
readonly Canceled: "canceled";
|
|
30
|
+
};
|
|
31
|
+
type CurrentSlaStatus = (typeof CurrentSlaStatus)[keyof typeof CurrentSlaStatus];
|
|
32
|
+
namespace SlaStates {
|
|
33
|
+
interface Value {
|
|
34
|
+
/** Status of this specific target */
|
|
35
|
+
status?: Value.Status;
|
|
36
|
+
/** Time remaining for active/paused targets (null for hit/missed) */
|
|
37
|
+
seconds_remaining?: number;
|
|
38
|
+
}
|
|
39
|
+
namespace Value {
|
|
40
|
+
/** Status of this specific target */
|
|
41
|
+
const Status: {
|
|
42
|
+
readonly Hit: "hit";
|
|
43
|
+
readonly Missed: "missed";
|
|
44
|
+
readonly Active: "active";
|
|
45
|
+
readonly Paused: "paused";
|
|
46
|
+
};
|
|
47
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var ConversationSlaTargetMissed;
|
|
3
|
+
(function (ConversationSlaTargetMissed) {
|
|
4
|
+
/** Which specific target was missed */
|
|
5
|
+
ConversationSlaTargetMissed.SlaTargetType = {
|
|
6
|
+
FirstReplyTime: "first_reply_time",
|
|
7
|
+
NextReplyTime: "next_reply_time",
|
|
8
|
+
ResolutionTime: "resolution_time",
|
|
9
|
+
TimeToClose: "time_to_close",
|
|
10
|
+
};
|
|
11
|
+
/** Overall SLA status */
|
|
12
|
+
ConversationSlaTargetMissed.CurrentSlaStatus = {
|
|
13
|
+
Hit: "hit",
|
|
14
|
+
Missed: "missed",
|
|
15
|
+
Active: "active",
|
|
16
|
+
Paused: "paused",
|
|
17
|
+
Canceled: "canceled",
|
|
18
|
+
};
|
|
19
|
+
let SlaStates;
|
|
20
|
+
(function (SlaStates) {
|
|
21
|
+
let Value;
|
|
22
|
+
(function (Value) {
|
|
23
|
+
/** Status of this specific target */
|
|
24
|
+
Value.Status = {
|
|
25
|
+
Hit: "hit",
|
|
26
|
+
Missed: "missed",
|
|
27
|
+
Active: "active",
|
|
28
|
+
Paused: "paused",
|
|
29
|
+
};
|
|
30
|
+
})(Value = SlaStates.Value || (SlaStates.Value = {}));
|
|
31
|
+
})(SlaStates = ConversationSlaTargetMissed.SlaStates || (ConversationSlaTargetMissed.SlaStates = {}));
|
|
32
|
+
})(ConversationSlaTargetMissed || (ConversationSlaTargetMissed = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains details about tags that were added or removed from a conversation for conversation part type <code>conversation_tags_updated</code>.
|
|
3
|
+
*/
|
|
4
|
+
export interface ConversationTagsUpdated {
|
|
5
|
+
/** Array of tag names that were added */
|
|
6
|
+
tags_added?: string[];
|
|
7
|
+
/** Array of tag names that were removed */
|
|
8
|
+
tags_removed?: string[];
|
|
9
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type * as Intercom from "../../../index.mjs";
|
|
2
|
-
export type EventDetails = Intercom.unstable.ConversationAttributeUpdatedByWorkflow | Intercom.unstable.ConversationAttributeUpdatedByAdmin | Intercom.unstable.CustomActionStarted | Intercom.unstable.CustomActionFinished | Intercom.unstable.OperatorWorkflowEvent;
|
|
2
|
+
export type EventDetails = Intercom.unstable.ConversationAttributeUpdatedByWorkflow | Intercom.unstable.ConversationAttributeUpdatedByAdmin | Intercom.unstable.ConversationAttributeUpdatedByUser | Intercom.unstable.CustomActionStarted | Intercom.unstable.CustomActionFinished | Intercom.unstable.OperatorWorkflowEvent | Intercom.unstable.ConversationTagsUpdated | Intercom.unstable.Snoozed | Intercom.unstable.PriorityChanged | Intercom.unstable.ConversationSlaAppliedByRule | Intercom.unstable.ConversationSlaAppliedByWorkflow | Intercom.unstable.ConversationSlaTargetMissed | Intercom.unstable.ConversationSlaPaused | Intercom.unstable.ConversationSlaUnpaused | Intercom.unstable.ConversationSlaRemoved;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as Intercom from "../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* A pause or resume event for a conversation
|
|
4
|
+
*/
|
|
5
|
+
export interface HandlingEvent {
|
|
6
|
+
teammate: Intercom.unstable.TeammateReference;
|
|
7
|
+
/** The type of handling event */
|
|
8
|
+
type: HandlingEvent.Type;
|
|
9
|
+
/** ISO8601 timestamp when the event occurred */
|
|
10
|
+
timestamp: string;
|
|
11
|
+
/** Optional reason for the event (e.g., "Paused", "Away") */
|
|
12
|
+
reason?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace HandlingEvent {
|
|
15
|
+
/** The type of handling event */
|
|
16
|
+
const Type: {
|
|
17
|
+
readonly Paused: "paused";
|
|
18
|
+
readonly Resumed: "resumed";
|
|
19
|
+
};
|
|
20
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
21
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var HandlingEvent;
|
|
3
|
+
(function (HandlingEvent) {
|
|
4
|
+
/** The type of handling event */
|
|
5
|
+
HandlingEvent.Type = {
|
|
6
|
+
Paused: "paused",
|
|
7
|
+
Resumed: "resumed",
|
|
8
|
+
};
|
|
9
|
+
})(HandlingEvent || (HandlingEvent = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains details about priority changes for conversation part type <code>priority_changed</code>.
|
|
3
|
+
*/
|
|
4
|
+
export interface PriorityChanged {
|
|
5
|
+
/** Current priority state */
|
|
6
|
+
current_priority?: PriorityChanged.CurrentPriority;
|
|
7
|
+
/** Previous priority state */
|
|
8
|
+
previous_priority?: PriorityChanged.PreviousPriority;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace PriorityChanged {
|
|
11
|
+
/** Current priority state */
|
|
12
|
+
const CurrentPriority: {
|
|
13
|
+
readonly Priority: "priority";
|
|
14
|
+
readonly NotPriority: "not_priority";
|
|
15
|
+
};
|
|
16
|
+
type CurrentPriority = (typeof CurrentPriority)[keyof typeof CurrentPriority];
|
|
17
|
+
/** Previous priority state */
|
|
18
|
+
const PreviousPriority: {
|
|
19
|
+
readonly Priority: "priority";
|
|
20
|
+
readonly NotPriority: "not_priority";
|
|
21
|
+
};
|
|
22
|
+
type PreviousPriority = (typeof PreviousPriority)[keyof typeof PreviousPriority];
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var PriorityChanged;
|
|
3
|
+
(function (PriorityChanged) {
|
|
4
|
+
/** Current priority state */
|
|
5
|
+
PriorityChanged.CurrentPriority = {
|
|
6
|
+
Priority: "priority",
|
|
7
|
+
NotPriority: "not_priority",
|
|
8
|
+
};
|
|
9
|
+
/** Previous priority state */
|
|
10
|
+
PriorityChanged.PreviousPriority = {
|
|
11
|
+
Priority: "priority",
|
|
12
|
+
NotPriority: "not_priority",
|
|
13
|
+
};
|
|
14
|
+
})(PriorityChanged || (PriorityChanged = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contains details about conversation snooze timing for conversation part type <code>snoozed</code>.
|
|
3
|
+
*/
|
|
4
|
+
export interface Snoozed {
|
|
5
|
+
/** Human-readable description of snooze duration */
|
|
6
|
+
until?: string;
|
|
7
|
+
/** ISO timestamp for custom snooze times (null for general snoozes) */
|
|
8
|
+
custom_until_time?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A reference to a teammate (admin, team, or bot)
|
|
3
|
+
*/
|
|
4
|
+
export interface TeammateReference {
|
|
5
|
+
/** The type of teammate */
|
|
6
|
+
type: TeammateReference.Type;
|
|
7
|
+
/** The unique identifier of the teammate */
|
|
8
|
+
id: number;
|
|
9
|
+
/** The display name of the teammate */
|
|
10
|
+
name: string;
|
|
11
|
+
/** The email address of the teammate (optional for teams/bots) */
|
|
12
|
+
email?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace TeammateReference {
|
|
15
|
+
/** The type of teammate */
|
|
16
|
+
const Type: {
|
|
17
|
+
readonly Admin: "admin";
|
|
18
|
+
readonly Team: "team";
|
|
19
|
+
readonly Bot: "bot";
|
|
20
|
+
};
|
|
21
|
+
type Type = (typeof Type)[keyof typeof Type];
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var TeammateReference;
|
|
3
|
+
(function (TeammateReference) {
|
|
4
|
+
/** The type of teammate */
|
|
5
|
+
TeammateReference.Type = {
|
|
6
|
+
Admin: "admin",
|
|
7
|
+
Team: "team",
|
|
8
|
+
Bot: "bot",
|
|
9
|
+
};
|
|
10
|
+
})(TeammateReference || (TeammateReference = {}));
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A workflow export containing the complete workflow configuration.
|
|
3
|
+
*/
|
|
4
|
+
export interface WorkflowExport {
|
|
5
|
+
/** The version of the export format. */
|
|
6
|
+
export_version?: string;
|
|
7
|
+
/** The timestamp when the export was generated. */
|
|
8
|
+
exported_at?: string;
|
|
9
|
+
/** The workspace identifier. */
|
|
10
|
+
app_id?: number;
|
|
11
|
+
/** The workflow configuration. */
|
|
12
|
+
workflow?: WorkflowExport.Workflow;
|
|
13
|
+
}
|
|
14
|
+
export declare namespace WorkflowExport {
|
|
15
|
+
/**
|
|
16
|
+
* The workflow configuration.
|
|
17
|
+
*/
|
|
18
|
+
interface Workflow {
|
|
19
|
+
/** The unique identifier for the workflow. */
|
|
20
|
+
id?: string;
|
|
21
|
+
/** The title of the workflow. */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** The description of the workflow. */
|
|
24
|
+
description?: string;
|
|
25
|
+
/** The type of trigger that starts this workflow. */
|
|
26
|
+
trigger_type?: string;
|
|
27
|
+
/** The current state of the workflow. */
|
|
28
|
+
state?: Workflow.State;
|
|
29
|
+
/** The channels this workflow targets. */
|
|
30
|
+
target_channels?: string[];
|
|
31
|
+
/** The preferred devices for this workflow. */
|
|
32
|
+
preferred_devices?: string[];
|
|
33
|
+
/** When the workflow was created. */
|
|
34
|
+
created_at?: string;
|
|
35
|
+
/** When the workflow was last updated. */
|
|
36
|
+
updated_at?: string;
|
|
37
|
+
/** The targeting rules for this workflow. */
|
|
38
|
+
targeting?: Record<string, unknown>;
|
|
39
|
+
/** The current snapshot of workflow steps and configuration. */
|
|
40
|
+
snapshot?: Record<string, unknown>;
|
|
41
|
+
/** Custom attributes defined for this workflow. */
|
|
42
|
+
attributes?: Record<string, unknown>[];
|
|
43
|
+
/** Rules embedded within the workflow steps. */
|
|
44
|
+
embedded_rules?: Record<string, unknown>[];
|
|
45
|
+
}
|
|
46
|
+
namespace Workflow {
|
|
47
|
+
/** The current state of the workflow. */
|
|
48
|
+
const State: {
|
|
49
|
+
readonly Live: "live";
|
|
50
|
+
readonly Draft: "draft";
|
|
51
|
+
readonly Paused: "paused";
|
|
52
|
+
};
|
|
53
|
+
type State = (typeof State)[keyof typeof State];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var WorkflowExport;
|
|
3
|
+
(function (WorkflowExport) {
|
|
4
|
+
let Workflow;
|
|
5
|
+
(function (Workflow) {
|
|
6
|
+
/** The current state of the workflow. */
|
|
7
|
+
Workflow.State = {
|
|
8
|
+
Live: "live",
|
|
9
|
+
Draft: "draft",
|
|
10
|
+
Paused: "paused",
|
|
11
|
+
};
|
|
12
|
+
})(Workflow = WorkflowExport.Workflow || (WorkflowExport.Workflow = {}));
|
|
13
|
+
})(WorkflowExport || (WorkflowExport = {}));
|