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
|
@@ -36,6 +36,7 @@ const Client_js_30 = require("../resources/tickets/client/Client.js");
|
|
|
36
36
|
const Client_js_31 = require("../resources/ticketTypeAttributes/client/Client.js");
|
|
37
37
|
const Client_js_32 = require("../resources/ticketTypes/client/Client.js");
|
|
38
38
|
const Client_js_33 = require("../resources/visitors/client/Client.js");
|
|
39
|
+
const Client_js_34 = require("../resources/workflows/client/Client.js");
|
|
39
40
|
class UnstableClient {
|
|
40
41
|
constructor(options = {}) {
|
|
41
42
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
@@ -112,6 +113,10 @@ class UnstableClient {
|
|
|
112
113
|
var _a;
|
|
113
114
|
return ((_a = this._dataExport) !== null && _a !== void 0 ? _a : (this._dataExport = new Client_js_14.DataExportClient(this._options)));
|
|
114
115
|
}
|
|
116
|
+
get workflows() {
|
|
117
|
+
var _a;
|
|
118
|
+
return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Client_js_34.WorkflowsClient(this._options)));
|
|
119
|
+
}
|
|
115
120
|
get jobs() {
|
|
116
121
|
var _a;
|
|
117
122
|
return ((_a = this._jobs) !== null && _a !== void 0 ? _a : (this._jobs = new Client_js_19.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
|
}
|
package/dist/cjs/api/resources/unstable/resources/contacts/client/requests/UpdateContactRequest.d.ts
CHANGED
|
@@ -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
|
*
|
|
@@ -963,6 +963,62 @@ class ConversationsClient {
|
|
|
963
963
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/conversations/{conversation_id}/customers/{contact_id}");
|
|
964
964
|
});
|
|
965
965
|
}
|
|
966
|
+
/**
|
|
967
|
+
* List all pause/resume events for a conversation. These events track when teammates paused or resumed handling a conversation.
|
|
968
|
+
*
|
|
969
|
+
* Requires the `read_conversations` OAuth scope.
|
|
970
|
+
*
|
|
971
|
+
* @param {Intercom.unstable.ListHandlingEventsRequest} request
|
|
972
|
+
* @param {ConversationsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
973
|
+
*
|
|
974
|
+
* @throws {@link Intercom.unstable.UnauthorizedError}
|
|
975
|
+
* @throws {@link Intercom.unstable.NotFoundError}
|
|
976
|
+
*
|
|
977
|
+
* @example
|
|
978
|
+
* await client.unstable.conversations.listHandlingEvents({
|
|
979
|
+
* id: "123"
|
|
980
|
+
* })
|
|
981
|
+
*/
|
|
982
|
+
listHandlingEvents(request, requestOptions) {
|
|
983
|
+
return core.HttpResponsePromise.fromPromise(this.__listHandlingEvents(request, requestOptions));
|
|
984
|
+
}
|
|
985
|
+
__listHandlingEvents(request, requestOptions) {
|
|
986
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
987
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
988
|
+
const { id } = request;
|
|
989
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
990
|
+
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);
|
|
991
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
992
|
+
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`),
|
|
993
|
+
method: "GET",
|
|
994
|
+
headers: _headers,
|
|
995
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
996
|
+
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,
|
|
997
|
+
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,
|
|
998
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
999
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
1000
|
+
logging: this._options.logging,
|
|
1001
|
+
});
|
|
1002
|
+
if (_response.ok) {
|
|
1003
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
1004
|
+
}
|
|
1005
|
+
if (_response.error.reason === "status-code") {
|
|
1006
|
+
switch (_response.error.statusCode) {
|
|
1007
|
+
case 401:
|
|
1008
|
+
throw new Intercom.unstable.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
1009
|
+
case 404:
|
|
1010
|
+
throw new Intercom.unstable.NotFoundError(_response.error.body, _response.rawResponse);
|
|
1011
|
+
default:
|
|
1012
|
+
throw new errors.IntercomError({
|
|
1013
|
+
statusCode: _response.error.statusCode,
|
|
1014
|
+
body: _response.error.body,
|
|
1015
|
+
rawResponse: _response.rawResponse,
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/conversations/{id}/handling_events");
|
|
1020
|
+
});
|
|
1021
|
+
}
|
|
966
1022
|
/**
|
|
967
1023
|
* You can redact a conversation part or the source message of a conversation (as seen in the source object).
|
|
968
1024
|
*
|
|
@@ -4,6 +4,7 @@ export type { CreateConversationRequest } from "./CreateConversationRequest.js";
|
|
|
4
4
|
export type { DeleteConversationRequest } from "./DeleteConversationRequest.js";
|
|
5
5
|
export type { DetachContactFromConversationRequest } from "./DetachContactFromConversationRequest.js";
|
|
6
6
|
export type { ListConversationsRequest } from "./ListConversationsRequest.js";
|
|
7
|
+
export type { ListHandlingEventsRequest } from "./ListHandlingEventsRequest.js";
|
|
7
8
|
export type { ManageConversationRequest } from "./ManageConversationRequest.js";
|
|
8
9
|
export type { ReplyConversationRequest } from "./ReplyConversationRequest.js";
|
|
9
10
|
export type { RetrieveConversationRequest } from "./RetrieveConversationRequest.js";
|
|
@@ -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.js";
|
|
|
91
91
|
export * as ticketTypes from "./ticketTypes/index.js";
|
|
92
92
|
export * from "./visitors/client/requests/index.js";
|
|
93
93
|
export * as visitors from "./visitors/index.js";
|
|
94
|
+
export * from "./workflows/client/requests/index.js";
|
|
95
|
+
export * as workflows from "./workflows/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.ticketTypes = exports.ticketTypeAttributes = exports.tickets = exports.ticketStates = exports.teams = exports.tags = exports.switch_ = exports.subscriptionTypes = exports.segments = exports.notes = exports.news = exports.messages = exports.macros = exports.jobs = exports.internalArticles = exports.helpCenter = exports.export_ = exports.emails = exports.dataExport = exports.dataEvents = exports.dataAttributes = exports.customObjectInstances = exports.customChannelEvents = exports.conversations = exports.contacts = exports.companies = exports.calls = exports.brands = exports.awayStatusReasons = exports.articles = exports.aiContentSource = exports.aiContent = exports.aiAgent = exports.admins = void 0;
|
|
39
|
+
exports.workflows = exports.visitors = exports.ticketTypes = exports.ticketTypeAttributes = exports.tickets = exports.ticketStates = exports.teams = exports.tags = exports.switch_ = exports.subscriptionTypes = exports.segments = exports.notes = exports.news = exports.messages = exports.macros = exports.jobs = exports.internalArticles = exports.helpCenter = exports.export_ = exports.emails = exports.dataExport = exports.dataEvents = exports.dataAttributes = exports.customObjectInstances = exports.customChannelEvents = exports.conversations = exports.contacts = exports.companies = exports.calls = exports.brands = 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);
|
|
@@ -130,3 +130,5 @@ __exportStar(require("./ticketTypes/client/requests/index.js"), exports);
|
|
|
130
130
|
exports.ticketTypes = __importStar(require("./ticketTypes/index.js"));
|
|
131
131
|
__exportStar(require("./visitors/client/requests/index.js"), exports);
|
|
132
132
|
exports.visitors = __importStar(require("./visitors/index.js"));
|
|
133
|
+
__exportStar(require("./workflows/client/requests/index.js"), exports);
|
|
134
|
+
exports.workflows = __importStar(require("./workflows/index.js"));
|
|
@@ -0,0 +1,39 @@
|
|
|
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 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,122 @@
|
|
|
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.WorkflowsClient = 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
|
+
* Export workflow configurations from your workspace.
|
|
56
|
+
*/
|
|
57
|
+
class WorkflowsClient {
|
|
58
|
+
constructor(options = {}) {
|
|
59
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Export a workflow configuration by its ID. This endpoint returns the complete workflow definition including its steps, targeting rules, and attributes.
|
|
63
|
+
*
|
|
64
|
+
* This endpoint is designed for EU Data Act compliance, allowing customers to export their workflow configurations.
|
|
65
|
+
*
|
|
66
|
+
* {% admonition type="warning" name="Unstable API" %}
|
|
67
|
+
* This API is currently in the Unstable version. Its behavior may change in future releases.
|
|
68
|
+
* {% /admonition %}
|
|
69
|
+
*
|
|
70
|
+
* @param {Intercom.unstable.ExportWorkflowRequest} request
|
|
71
|
+
* @param {WorkflowsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
|
+
*
|
|
73
|
+
* @throws {@link Intercom.unstable.ForbiddenError}
|
|
74
|
+
* @throws {@link Intercom.unstable.NotFoundError}
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* await client.unstable.workflows.exportWorkflow({
|
|
78
|
+
* id: "12345"
|
|
79
|
+
* })
|
|
80
|
+
*/
|
|
81
|
+
exportWorkflow(request, requestOptions) {
|
|
82
|
+
return core.HttpResponsePromise.fromPromise(this.__exportWorkflow(request, requestOptions));
|
|
83
|
+
}
|
|
84
|
+
__exportWorkflow(request, requestOptions) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
87
|
+
const { id } = request;
|
|
88
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
89
|
+
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);
|
|
90
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
91
|
+
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)}`),
|
|
92
|
+
method: "GET",
|
|
93
|
+
headers: _headers,
|
|
94
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
95
|
+
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,
|
|
96
|
+
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,
|
|
97
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
98
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
99
|
+
logging: this._options.logging,
|
|
100
|
+
});
|
|
101
|
+
if (_response.ok) {
|
|
102
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
103
|
+
}
|
|
104
|
+
if (_response.error.reason === "status-code") {
|
|
105
|
+
switch (_response.error.statusCode) {
|
|
106
|
+
case 403:
|
|
107
|
+
throw new Intercom.unstable.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
108
|
+
case 404:
|
|
109
|
+
throw new Intercom.unstable.NotFoundError(_response.error.body, _response.rawResponse);
|
|
110
|
+
default:
|
|
111
|
+
throw new errors.IntercomError({
|
|
112
|
+
statusCode: _response.error.statusCode,
|
|
113
|
+
body: _response.error.body,
|
|
114
|
+
rawResponse: _response.rawResponse,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/export/workflows/{id}");
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
exports.WorkflowsClient = WorkflowsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/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("./requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ExportWorkflowRequest } from "./ExportWorkflowRequest.js";
|
|
@@ -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);
|
|
@@ -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,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConversationSlaPaused = void 0;
|
|
5
|
+
var ConversationSlaPaused;
|
|
6
|
+
(function (ConversationSlaPaused) {
|
|
7
|
+
/** Overall SLA status at pause time */
|
|
8
|
+
ConversationSlaPaused.CurrentSlaStatus = {
|
|
9
|
+
Active: "active",
|
|
10
|
+
Hit: "hit",
|
|
11
|
+
Missed: "missed",
|
|
12
|
+
Canceled: "canceled",
|
|
13
|
+
};
|
|
14
|
+
})(ConversationSlaPaused || (exports.ConversationSlaPaused = ConversationSlaPaused = {}));
|