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.
Files changed (152) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +33 -28
  4. package/dist/cjs/api/resources/index.d.ts +1 -0
  5. package/dist/cjs/api/resources/index.js +2 -1
  6. package/dist/cjs/api/resources/ipAllowlist/client/Client.d.ts +56 -0
  7. package/dist/cjs/api/resources/ipAllowlist/client/Client.js +176 -0
  8. package/dist/cjs/api/resources/ipAllowlist/client/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/ipAllowlist/client/index.js +2 -0
  10. package/dist/cjs/api/resources/ipAllowlist/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/ipAllowlist/index.js +17 -0
  12. package/dist/cjs/api/resources/unstable/client/Client.d.ts +3 -0
  13. package/dist/cjs/api/resources/unstable/client/Client.js +5 -0
  14. package/dist/cjs/api/resources/unstable/resources/aiAgent/types/AiAgent.d.ts +1 -0
  15. package/dist/cjs/api/resources/unstable/resources/aiAgent/types/AiAgent.js +1 -0
  16. package/dist/cjs/api/resources/unstable/resources/contacts/client/requests/UpdateContactRequest.d.ts +2 -0
  17. package/dist/cjs/api/resources/unstable/resources/contacts/types/Contact.d.ts +1 -1
  18. package/dist/cjs/api/resources/unstable/resources/conversations/client/Client.d.ts +18 -0
  19. package/dist/cjs/api/resources/unstable/resources/conversations/client/Client.js +56 -0
  20. package/dist/cjs/api/resources/unstable/resources/conversations/client/requests/ListHandlingEventsRequest.d.ts +10 -0
  21. package/dist/cjs/api/resources/unstable/resources/conversations/client/requests/ListHandlingEventsRequest.js +3 -0
  22. package/dist/cjs/api/resources/unstable/resources/conversations/client/requests/index.d.ts +1 -0
  23. package/dist/cjs/api/resources/unstable/resources/conversations/types/Conversation.d.ts +2 -0
  24. package/dist/cjs/api/resources/unstable/resources/index.d.ts +2 -0
  25. package/dist/cjs/api/resources/unstable/resources/index.js +3 -1
  26. package/dist/cjs/api/resources/unstable/resources/workflows/client/Client.d.ts +39 -0
  27. package/dist/cjs/api/resources/unstable/resources/workflows/client/Client.js +122 -0
  28. package/dist/cjs/api/resources/unstable/resources/workflows/client/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/unstable/resources/workflows/client/index.js +17 -0
  30. package/dist/cjs/api/resources/unstable/resources/workflows/client/requests/ExportWorkflowRequest.d.ts +10 -0
  31. package/dist/cjs/api/resources/unstable/resources/workflows/client/requests/ExportWorkflowRequest.js +3 -0
  32. package/dist/cjs/api/resources/unstable/resources/workflows/client/requests/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/unstable/resources/workflows/client/requests/index.js +2 -0
  34. package/dist/cjs/api/resources/unstable/resources/workflows/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/unstable/resources/workflows/index.js +17 -0
  36. package/dist/cjs/api/resources/unstable/types/ConversationAttributeUpdatedByAdmin.d.ts +3 -1
  37. package/dist/cjs/api/resources/unstable/types/ConversationAttributeUpdatedByUser.d.ts +19 -0
  38. package/dist/cjs/api/resources/unstable/types/ConversationAttributeUpdatedByUser.js +3 -0
  39. package/dist/cjs/api/resources/unstable/types/ConversationSlaAppliedByRule.d.ts +24 -0
  40. package/dist/cjs/api/resources/unstable/types/ConversationSlaAppliedByRule.js +3 -0
  41. package/dist/cjs/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.d.ts +24 -0
  42. package/dist/cjs/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.js +3 -0
  43. package/dist/cjs/api/resources/unstable/types/ConversationSlaPaused.d.ts +29 -0
  44. package/dist/cjs/api/resources/unstable/types/ConversationSlaPaused.js +14 -0
  45. package/dist/cjs/api/resources/unstable/types/ConversationSlaRemoved.d.ts +7 -0
  46. package/dist/cjs/api/resources/unstable/types/ConversationSlaRemoved.js +3 -0
  47. package/dist/cjs/api/resources/unstable/types/ConversationSlaTargetMissed.d.ts +50 -0
  48. package/dist/cjs/api/resources/unstable/types/ConversationSlaTargetMissed.js +35 -0
  49. package/dist/cjs/api/resources/unstable/types/ConversationSlaUnpaused.d.ts +7 -0
  50. package/dist/cjs/api/resources/unstable/types/ConversationSlaUnpaused.js +3 -0
  51. package/dist/cjs/api/resources/unstable/types/ConversationTagsUpdated.d.ts +9 -0
  52. package/dist/cjs/api/resources/unstable/types/ConversationTagsUpdated.js +3 -0
  53. package/dist/cjs/api/resources/unstable/types/EventDetails.d.ts +1 -1
  54. package/dist/cjs/api/resources/unstable/types/HandlingEvent.d.ts +21 -0
  55. package/dist/cjs/api/resources/unstable/types/HandlingEvent.js +12 -0
  56. package/dist/cjs/api/resources/unstable/types/HandlingEventList.d.ts +8 -0
  57. package/dist/cjs/api/resources/unstable/types/HandlingEventList.js +3 -0
  58. package/dist/cjs/api/resources/unstable/types/PriorityChanged.d.ts +23 -0
  59. package/dist/cjs/api/resources/unstable/types/PriorityChanged.js +17 -0
  60. package/dist/cjs/api/resources/unstable/types/Snoozed.d.ts +9 -0
  61. package/dist/cjs/api/resources/unstable/types/Snoozed.js +3 -0
  62. package/dist/cjs/api/resources/unstable/types/TeammateReference.d.ts +22 -0
  63. package/dist/cjs/api/resources/unstable/types/TeammateReference.js +13 -0
  64. package/dist/cjs/api/resources/unstable/types/WorkflowExport.d.ts +55 -0
  65. package/dist/cjs/api/resources/unstable/types/WorkflowExport.js +16 -0
  66. package/dist/cjs/api/resources/unstable/types/index.d.ts +14 -0
  67. package/dist/cjs/api/resources/unstable/types/index.js +14 -0
  68. package/dist/cjs/api/types/ActivityLog.d.ts +6 -1
  69. package/dist/cjs/api/types/ActivityLog.js +6 -1
  70. package/dist/cjs/api/types/IpAllowlist.d.ts +16 -0
  71. package/dist/cjs/api/types/IpAllowlist.js +3 -0
  72. package/dist/cjs/api/types/index.d.ts +1 -0
  73. package/dist/cjs/api/types/index.js +1 -0
  74. package/dist/cjs/version.d.ts +1 -1
  75. package/dist/cjs/version.js +1 -1
  76. package/dist/esm/BaseClient.mjs +2 -2
  77. package/dist/esm/Client.d.mts +3 -0
  78. package/dist/esm/Client.mjs +5 -0
  79. package/dist/esm/api/resources/index.d.mts +1 -0
  80. package/dist/esm/api/resources/index.mjs +1 -0
  81. package/dist/esm/api/resources/ipAllowlist/client/Client.d.mts +56 -0
  82. package/dist/esm/api/resources/ipAllowlist/client/Client.mjs +139 -0
  83. package/dist/esm/api/resources/ipAllowlist/client/index.d.mts +1 -0
  84. package/dist/esm/api/resources/ipAllowlist/client/index.mjs +1 -0
  85. package/dist/esm/api/resources/ipAllowlist/index.d.mts +1 -0
  86. package/dist/esm/api/resources/ipAllowlist/index.mjs +1 -0
  87. package/dist/esm/api/resources/unstable/client/Client.d.mts +3 -0
  88. package/dist/esm/api/resources/unstable/client/Client.mjs +5 -0
  89. package/dist/esm/api/resources/unstable/resources/aiAgent/types/AiAgent.d.mts +1 -0
  90. package/dist/esm/api/resources/unstable/resources/aiAgent/types/AiAgent.mjs +1 -0
  91. package/dist/esm/api/resources/unstable/resources/contacts/client/requests/UpdateContactRequest.d.mts +2 -0
  92. package/dist/esm/api/resources/unstable/resources/contacts/types/Contact.d.mts +1 -1
  93. package/dist/esm/api/resources/unstable/resources/conversations/client/Client.d.mts +18 -0
  94. package/dist/esm/api/resources/unstable/resources/conversations/client/Client.mjs +56 -0
  95. package/dist/esm/api/resources/unstable/resources/conversations/client/requests/ListHandlingEventsRequest.d.mts +10 -0
  96. package/dist/esm/api/resources/unstable/resources/conversations/client/requests/ListHandlingEventsRequest.mjs +2 -0
  97. package/dist/esm/api/resources/unstable/resources/conversations/client/requests/index.d.mts +1 -0
  98. package/dist/esm/api/resources/unstable/resources/conversations/types/Conversation.d.mts +2 -0
  99. package/dist/esm/api/resources/unstable/resources/index.d.mts +2 -0
  100. package/dist/esm/api/resources/unstable/resources/index.mjs +2 -0
  101. package/dist/esm/api/resources/unstable/resources/workflows/client/Client.d.mts +39 -0
  102. package/dist/esm/api/resources/unstable/resources/workflows/client/Client.mjs +85 -0
  103. package/dist/esm/api/resources/unstable/resources/workflows/client/index.d.mts +1 -0
  104. package/dist/esm/api/resources/unstable/resources/workflows/client/index.mjs +1 -0
  105. package/dist/esm/api/resources/unstable/resources/workflows/client/requests/ExportWorkflowRequest.d.mts +10 -0
  106. package/dist/esm/api/resources/unstable/resources/workflows/client/requests/ExportWorkflowRequest.mjs +2 -0
  107. package/dist/esm/api/resources/unstable/resources/workflows/client/requests/index.d.mts +1 -0
  108. package/dist/esm/api/resources/unstable/resources/workflows/client/requests/index.mjs +1 -0
  109. package/dist/esm/api/resources/unstable/resources/workflows/index.d.mts +1 -0
  110. package/dist/esm/api/resources/unstable/resources/workflows/index.mjs +1 -0
  111. package/dist/esm/api/resources/unstable/types/ConversationAttributeUpdatedByAdmin.d.mts +3 -1
  112. package/dist/esm/api/resources/unstable/types/ConversationAttributeUpdatedByUser.d.mts +19 -0
  113. package/dist/esm/api/resources/unstable/types/ConversationAttributeUpdatedByUser.mjs +2 -0
  114. package/dist/esm/api/resources/unstable/types/ConversationSlaAppliedByRule.d.mts +24 -0
  115. package/dist/esm/api/resources/unstable/types/ConversationSlaAppliedByRule.mjs +2 -0
  116. package/dist/esm/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.d.mts +24 -0
  117. package/dist/esm/api/resources/unstable/types/ConversationSlaAppliedByWorkflow.mjs +2 -0
  118. package/dist/esm/api/resources/unstable/types/ConversationSlaPaused.d.mts +29 -0
  119. package/dist/esm/api/resources/unstable/types/ConversationSlaPaused.mjs +11 -0
  120. package/dist/esm/api/resources/unstable/types/ConversationSlaRemoved.d.mts +7 -0
  121. package/dist/esm/api/resources/unstable/types/ConversationSlaRemoved.mjs +2 -0
  122. package/dist/esm/api/resources/unstable/types/ConversationSlaTargetMissed.d.mts +50 -0
  123. package/dist/esm/api/resources/unstable/types/ConversationSlaTargetMissed.mjs +32 -0
  124. package/dist/esm/api/resources/unstable/types/ConversationSlaUnpaused.d.mts +7 -0
  125. package/dist/esm/api/resources/unstable/types/ConversationSlaUnpaused.mjs +2 -0
  126. package/dist/esm/api/resources/unstable/types/ConversationTagsUpdated.d.mts +9 -0
  127. package/dist/esm/api/resources/unstable/types/ConversationTagsUpdated.mjs +2 -0
  128. package/dist/esm/api/resources/unstable/types/EventDetails.d.mts +1 -1
  129. package/dist/esm/api/resources/unstable/types/HandlingEvent.d.mts +21 -0
  130. package/dist/esm/api/resources/unstable/types/HandlingEvent.mjs +9 -0
  131. package/dist/esm/api/resources/unstable/types/HandlingEventList.d.mts +8 -0
  132. package/dist/esm/api/resources/unstable/types/HandlingEventList.mjs +2 -0
  133. package/dist/esm/api/resources/unstable/types/PriorityChanged.d.mts +23 -0
  134. package/dist/esm/api/resources/unstable/types/PriorityChanged.mjs +14 -0
  135. package/dist/esm/api/resources/unstable/types/Snoozed.d.mts +9 -0
  136. package/dist/esm/api/resources/unstable/types/Snoozed.mjs +2 -0
  137. package/dist/esm/api/resources/unstable/types/TeammateReference.d.mts +22 -0
  138. package/dist/esm/api/resources/unstable/types/TeammateReference.mjs +10 -0
  139. package/dist/esm/api/resources/unstable/types/WorkflowExport.d.mts +55 -0
  140. package/dist/esm/api/resources/unstable/types/WorkflowExport.mjs +13 -0
  141. package/dist/esm/api/resources/unstable/types/index.d.mts +14 -0
  142. package/dist/esm/api/resources/unstable/types/index.mjs +14 -0
  143. package/dist/esm/api/types/ActivityLog.d.mts +6 -1
  144. package/dist/esm/api/types/ActivityLog.mjs +6 -1
  145. package/dist/esm/api/types/IpAllowlist.d.mts +16 -0
  146. package/dist/esm/api/types/IpAllowlist.mjs +2 -0
  147. package/dist/esm/api/types/index.d.mts +1 -0
  148. package/dist/esm/api/types/index.mjs +1 -0
  149. package/dist/esm/version.d.mts +1 -1
  150. package/dist/esm/version.mjs +1 -1
  151. package/package.json +1 -1
  152. package/reference.md +265 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "123"
5
+ * }
6
+ */
7
+ export interface ListHandlingEventsRequest {
8
+ /** The identifier for the conversation as given by Intercom. */
9
+ id: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * id: "12345"
5
+ * }
6
+ */
7
+ export interface ExportWorkflowRequest {
8
+ /** The unique identifier for the workflow */
9
+ id: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type { ExportWorkflowRequest } from "./ExportWorkflowRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- /** Value of the CDA updated */
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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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 = {}));
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Contains basic SLA information when removed for conversation part type <code>conversation_sla_removed</code>.
3
+ */
4
+ export interface ConversationSlaRemoved {
5
+ /** Name of the SLA that was removed */
6
+ sla_name?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,35 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.ConversationSlaTargetMissed = void 0;
5
+ var ConversationSlaTargetMissed;
6
+ (function (ConversationSlaTargetMissed) {
7
+ /** Which specific target was missed */
8
+ ConversationSlaTargetMissed.SlaTargetType = {
9
+ FirstReplyTime: "first_reply_time",
10
+ NextReplyTime: "next_reply_time",
11
+ ResolutionTime: "resolution_time",
12
+ TimeToClose: "time_to_close",
13
+ };
14
+ /** Overall SLA status */
15
+ ConversationSlaTargetMissed.CurrentSlaStatus = {
16
+ Hit: "hit",
17
+ Missed: "missed",
18
+ Active: "active",
19
+ Paused: "paused",
20
+ Canceled: "canceled",
21
+ };
22
+ let SlaStates;
23
+ (function (SlaStates) {
24
+ let Value;
25
+ (function (Value) {
26
+ /** Status of this specific target */
27
+ Value.Status = {
28
+ Hit: "hit",
29
+ Missed: "missed",
30
+ Active: "active",
31
+ Paused: "paused",
32
+ };
33
+ })(Value = SlaStates.Value || (SlaStates.Value = {}));
34
+ })(SlaStates = ConversationSlaTargetMissed.SlaStates || (ConversationSlaTargetMissed.SlaStates = {}));
35
+ })(ConversationSlaTargetMissed || (exports.ConversationSlaTargetMissed = ConversationSlaTargetMissed = {}));
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Contains basic SLA information when unpaused for conversation part type <code>conversation_sla_unpaused</code>.
3
+ */
4
+ export interface ConversationSlaUnpaused {
5
+ /** Name of the SLA being unpaused */
6
+ sla_name?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,2 @@
1
1
  import type * as Intercom from "../../../index.js";
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.js";
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,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.HandlingEvent = void 0;
5
+ var HandlingEvent;
6
+ (function (HandlingEvent) {
7
+ /** The type of handling event */
8
+ HandlingEvent.Type = {
9
+ Paused: "paused",
10
+ Resumed: "resumed",
11
+ };
12
+ })(HandlingEvent || (exports.HandlingEvent = HandlingEvent = {}));
@@ -0,0 +1,8 @@
1
+ import type * as Intercom from "../../../index.js";
2
+ /**
3
+ * A list of handling events for a conversation
4
+ */
5
+ export interface HandlingEventList {
6
+ /** Array of handling events */
7
+ handling_events?: Intercom.unstable.HandlingEvent[];
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });