@intelligence-cloud/sdk 0.1.1 → 0.2.0
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/CHANGELOG.md +41 -0
- package/README.md +122 -64
- package/dist/index.cjs +2618 -968
- package/dist/index.d.cts +923 -476
- package/dist/index.d.ts +923 -476
- package/dist/index.js +2597 -954
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,361 +1,3 @@
|
|
|
1
|
-
declare const ALL_PRODUCTS: ProductKey[];
|
|
2
|
-
declare const MANAGER_ALERTS_GROUP = "Manager Alerts";
|
|
3
|
-
declare const INSIGHTS_HUB_ACCESS_GROUP = "Insights Hub Access";
|
|
4
|
-
declare const UPSET_CUSTOMER_RULE = "Upset Customer";
|
|
5
|
-
declare const CUSTOMER_THREAT_RULE = "Customer Threat";
|
|
6
|
-
declare const THREAT_PHRASES_MISSING = "Customer Threat phrases are provided by your Tresic contact.";
|
|
7
|
-
/** The `department` value that marks an integration (data-reading) user. Such users are never seats or managers. */
|
|
8
|
-
declare const INTEGRATION_DEPARTMENT = "integration";
|
|
9
|
-
/** The fixed message of the ConflictError raised when a same-named company has another contact. */
|
|
10
|
-
declare function companyNameConflictMessage(name: string): string;
|
|
11
|
-
/** The "Upset Customer" rule: sentiment below −40, priority high, routed to `groupIds`. */
|
|
12
|
-
declare function upsetCustomerRule(groupIds: string[], enabled?: boolean): {
|
|
13
|
-
name: string;
|
|
14
|
-
priority: "high";
|
|
15
|
-
match_logic: "any";
|
|
16
|
-
enabled: boolean;
|
|
17
|
-
triggers: {
|
|
18
|
-
trigger_type: "sentiment";
|
|
19
|
-
config: {
|
|
20
|
-
operator: "lt";
|
|
21
|
-
threshold: number;
|
|
22
|
-
};
|
|
23
|
-
}[];
|
|
24
|
-
group_ids: string[];
|
|
25
|
-
};
|
|
26
|
-
/** The "Customer Threat" rule: any threat phrase AND sentiment below −20, priority critical. */
|
|
27
|
-
declare function customerThreatRule(groupIds: string[], phrases: readonly string[], enabled?: boolean): {
|
|
28
|
-
name: string;
|
|
29
|
-
priority: "critical";
|
|
30
|
-
match_logic: "all";
|
|
31
|
-
enabled: boolean;
|
|
32
|
-
triggers: ({
|
|
33
|
-
trigger_type: "sentiment";
|
|
34
|
-
config: {
|
|
35
|
-
operator: "lt";
|
|
36
|
-
threshold: number;
|
|
37
|
-
match_logic?: undefined;
|
|
38
|
-
keywords?: undefined;
|
|
39
|
-
};
|
|
40
|
-
} | {
|
|
41
|
-
trigger_type: "keyword_match";
|
|
42
|
-
config: {
|
|
43
|
-
match_logic: "any";
|
|
44
|
-
keywords: string[];
|
|
45
|
-
operator?: undefined;
|
|
46
|
-
threshold?: undefined;
|
|
47
|
-
};
|
|
48
|
-
})[];
|
|
49
|
-
group_ids: string[];
|
|
50
|
-
};
|
|
51
|
-
/** What `provisionSeatCustomer` builds. */
|
|
52
|
-
interface SeatCustomerSpec {
|
|
53
|
-
/** Default: `reseller_id` of the signed-in admin. */
|
|
54
|
-
resellerId?: string;
|
|
55
|
-
/**
|
|
56
|
-
* The id of an existing company to use. Store the `companyId` a first run returns and pass it on
|
|
57
|
-
* every re-run. Without it, an existing company is reused only when both its name and its primary
|
|
58
|
-
* contact email match; a same-named company with another contact raises ConflictError.
|
|
59
|
-
*/
|
|
60
|
-
companyId?: string;
|
|
61
|
-
companyName: string;
|
|
62
|
-
companyCode?: string;
|
|
63
|
-
/** Becomes the company's customer admin and is always emailed an invitation. */
|
|
64
|
-
primaryAdmin: {
|
|
65
|
-
name: string;
|
|
66
|
-
email: string;
|
|
67
|
-
phone: string;
|
|
68
|
-
};
|
|
69
|
-
/** Turn MFA off for the company (needed when an integration user lives in it). */
|
|
70
|
-
mfaOff?: boolean;
|
|
71
|
-
location: {
|
|
72
|
-
name: string;
|
|
73
|
-
street: string;
|
|
74
|
-
city: string;
|
|
75
|
-
state: string;
|
|
76
|
-
country: string;
|
|
77
|
-
zipcode: string;
|
|
78
|
-
/** A `GET /verticals` id. Default: looked up by `verticalKey`. */
|
|
79
|
-
verticalId?: string;
|
|
80
|
-
/** Default `csps-msps`. */
|
|
81
|
-
verticalKey?: string;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Customer Threat phrases. Required when the Customer Threat rule has to be created.
|
|
85
|
-
* Customer Threat phrases are provided by your Tresic contact.
|
|
86
|
-
*/
|
|
87
|
-
threatPhrases?: readonly string[];
|
|
88
|
-
/** Optional phone-system connector for the location. */
|
|
89
|
-
connector?: {
|
|
90
|
-
/** Default "<location name> phone system". */
|
|
91
|
-
name?: string;
|
|
92
|
-
apiUrl: string;
|
|
93
|
-
domain: string;
|
|
94
|
-
apiKey: string;
|
|
95
|
-
/** Lines to monitor in First Alert and Insights Hub once the connector is active. */
|
|
96
|
-
monitoredNumbers?: string[];
|
|
97
|
-
/** Seconds to wait for the connector to settle, checking every 10 seconds. Default 600. */
|
|
98
|
-
timeout?: number;
|
|
99
|
-
};
|
|
100
|
-
/** Optional single sign-on: claims the domain and returns the DNS TXT record to publish. */
|
|
101
|
-
sso?: {
|
|
102
|
-
domain: string;
|
|
103
|
-
};
|
|
104
|
-
/** Reactivate the company or location when it is found deactivated (otherwise that is an error). */
|
|
105
|
-
reactivate?: boolean;
|
|
106
|
-
}
|
|
107
|
-
/** A Base Intelligence Seat customer, rebuilt by name. */
|
|
108
|
-
interface SeatCustomer {
|
|
109
|
-
companyId: string;
|
|
110
|
-
companyName: string;
|
|
111
|
-
locationId: string;
|
|
112
|
-
locationName: string;
|
|
113
|
-
groups: {
|
|
114
|
-
managerAlerts: string | null;
|
|
115
|
-
insightsHubAccess: string | null;
|
|
116
|
-
};
|
|
117
|
-
rules: {
|
|
118
|
-
upsetCustomer: string | null;
|
|
119
|
-
customerThreat: string | null;
|
|
120
|
-
};
|
|
121
|
-
connectorId: string | null;
|
|
122
|
-
connectorStatus: string | null;
|
|
123
|
-
/** Why the connector is in its status, e.g. `invalid_permissions` for a key without the permissions the connector needs. */
|
|
124
|
-
connectorStateReason: string | null;
|
|
125
|
-
/** Users every workflow ignores (never a seat, manager or integration user; never updated). */
|
|
126
|
-
excludeUserIds?: string[];
|
|
127
|
-
/** Same as `excludeUserIds`, by email (case-insensitive). */
|
|
128
|
-
excludeEmails?: string[];
|
|
129
|
-
}
|
|
130
|
-
interface ProvisionResult extends SeatCustomer {
|
|
131
|
-
/** Objects created by this run (everything else already existed). */
|
|
132
|
-
created: string[];
|
|
133
|
-
/** Objects found and kept; `connector:updated` when a found connector got the new settings. */
|
|
134
|
-
existing: string[];
|
|
135
|
-
/** DNS TXT record to publish for single sign-on, when `sso` was given. */
|
|
136
|
-
ssoTxtRecord: {
|
|
137
|
-
type: string;
|
|
138
|
-
name: string;
|
|
139
|
-
value: string;
|
|
140
|
-
} | null;
|
|
141
|
-
}
|
|
142
|
-
/** A customer object, or a company id to rebuild it from. */
|
|
143
|
-
type CustomerRef = SeatCustomer | string;
|
|
144
|
-
interface NewUser {
|
|
145
|
-
email: string;
|
|
146
|
-
firstName: string;
|
|
147
|
-
lastName: string;
|
|
148
|
-
phoneNumber?: string;
|
|
149
|
-
/**
|
|
150
|
-
* Email the invitation once the user is fully set up (lines mapped, groups and products on).
|
|
151
|
-
* Default true. False: create the user without an invitation; send one later with
|
|
152
|
-
* `users.resendInvitation`.
|
|
153
|
-
*/
|
|
154
|
-
sendInvitation?: boolean;
|
|
155
|
-
authMethod?: "password" | "sso";
|
|
156
|
-
/** Reuse an Idempotency-Key when retrying the same create. */
|
|
157
|
-
idempotencyKey?: string;
|
|
158
|
-
}
|
|
159
|
-
type UserKind = "frontline" | "manager" | "integration";
|
|
160
|
-
interface UserResult {
|
|
161
|
-
userId: string;
|
|
162
|
-
email: string;
|
|
163
|
-
kind: UserKind;
|
|
164
|
-
/** False when the user already existed (found by email) and the workflow carried on. */
|
|
165
|
-
created: boolean;
|
|
166
|
-
extensions: string[];
|
|
167
|
-
/** Managers (and integration users) whose line list this call changed. */
|
|
168
|
-
managersUpdated: string[];
|
|
169
|
-
/** True when this call emailed the invitation. */
|
|
170
|
-
invited: boolean;
|
|
171
|
-
/** Rule ids this call switched on (addManager only). */
|
|
172
|
-
alertsActivated: string[];
|
|
173
|
-
}
|
|
174
|
-
/** Options for `addManager`. */
|
|
175
|
-
interface AddManagerOptions {
|
|
176
|
-
/** Switch the customer's two alert rules on once the manager is set up. Default true. */
|
|
177
|
-
activateAlerts?: boolean;
|
|
178
|
-
}
|
|
179
|
-
interface ChangeResult {
|
|
180
|
-
userId: string;
|
|
181
|
-
oldExtension: string;
|
|
182
|
-
newExtension: string;
|
|
183
|
-
managersUpdated: string[];
|
|
184
|
-
}
|
|
185
|
-
interface RemoveResult {
|
|
186
|
-
userId: string;
|
|
187
|
-
/**
|
|
188
|
-
* `integration` for a user tagged `department: "integration"`, an excluded user, or a non-manager
|
|
189
|
-
* holding more than one line: such a user releases no lines.
|
|
190
|
-
*/
|
|
191
|
-
kind: UserKind;
|
|
192
|
-
/** Lines taken off managers, integration users, First Alert and Insights Hub (only lines no other end user holds). */
|
|
193
|
-
extensionsReleased: string[];
|
|
194
|
-
managersUpdated: string[];
|
|
195
|
-
}
|
|
196
|
-
/** What `offboardCustomer` did. */
|
|
197
|
-
interface OffboardResult {
|
|
198
|
-
webhookPaused: boolean;
|
|
199
|
-
firstAlertWebhookCleared: boolean;
|
|
200
|
-
connectorDeactivated: boolean;
|
|
201
|
-
integrationUsersDeactivated: string[];
|
|
202
|
-
companyDeactivated: boolean;
|
|
203
|
-
}
|
|
204
|
-
interface SeatUser {
|
|
205
|
-
id: string;
|
|
206
|
-
email: string;
|
|
207
|
-
displayName: string;
|
|
208
|
-
status: string;
|
|
209
|
-
enabledProducts: string[];
|
|
210
|
-
groups: string[];
|
|
211
|
-
/** The user's department (`integration` marks an integration user). */
|
|
212
|
-
department: string | null;
|
|
213
|
-
}
|
|
214
|
-
interface SyncResult {
|
|
215
|
-
dryRun: boolean;
|
|
216
|
-
/** The union of end-user extensions (end users holding exactly one line). */
|
|
217
|
-
lines: string[];
|
|
218
|
-
/** Managers and integration users whose lines change. */
|
|
219
|
-
managers: {
|
|
220
|
-
userId: string;
|
|
221
|
-
add: string[];
|
|
222
|
-
remove: string[];
|
|
223
|
-
}[];
|
|
224
|
-
firstAlert: {
|
|
225
|
-
add: string[];
|
|
226
|
-
remove: string[];
|
|
227
|
-
};
|
|
228
|
-
insightsHub: {
|
|
229
|
-
add: string[];
|
|
230
|
-
remove: string[];
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
/** An integration (data-reading) user: `department` is "integration". Never a seat or a manager. */
|
|
234
|
-
declare function isIntegration(u: {
|
|
235
|
-
department?: string | null;
|
|
236
|
-
}): boolean;
|
|
237
|
-
/** A manager: After Call, First Alert and Insights Hub, and not an integration user. Groups are not checked. */
|
|
238
|
-
declare function isManager(u: {
|
|
239
|
-
enabledProducts: string[];
|
|
240
|
-
department?: string | null;
|
|
241
|
-
}): boolean;
|
|
242
|
-
/** An end user (a seat): After Call only, and not an integration user. */
|
|
243
|
-
declare function isFrontline(u: {
|
|
244
|
-
enabledProducts: string[];
|
|
245
|
-
department?: string | null;
|
|
246
|
-
}): boolean;
|
|
247
|
-
/**
|
|
248
|
-
* Base Intelligence Seat lifecycle (admin credentials). One location per customer, After Call for
|
|
249
|
-
* every end user, First Alert and Insights Hub for managers, two alert rules routed to
|
|
250
|
-
* "Manager Alerts", and an "Insights Hub Access" group.
|
|
251
|
-
*/
|
|
252
|
-
declare class Workflows {
|
|
253
|
-
private readonly c;
|
|
254
|
-
constructor(c: Client);
|
|
255
|
-
private bestConnector;
|
|
256
|
-
private resolve;
|
|
257
|
-
private requireConnector;
|
|
258
|
-
/**
|
|
259
|
-
* Find the user by email (reactivating and assigning to the location if needed) or create them.
|
|
260
|
-
* Re-running a workflow therefore carries on with the same user.
|
|
261
|
-
*/
|
|
262
|
-
private ensureUser;
|
|
263
|
-
/** The last step: email the invitation to a user who has not accepted one yet. */
|
|
264
|
-
private invite;
|
|
265
|
-
/** Replace the user's numbers on the customer's connector; a refusal becomes ExtensionMappingError. */
|
|
266
|
-
private mapNumbers;
|
|
267
|
-
/** Lines at the location: First Alert's monitored numbers for the customer's connector. */
|
|
268
|
-
private locationLines;
|
|
269
|
-
private excluded;
|
|
270
|
-
/** Active or invited frontline users at the location (not excluded), with their department. */
|
|
271
|
-
private seatUsers;
|
|
272
|
-
/** Managers and integration users: the users who hold every line. */
|
|
273
|
-
private lineHolders;
|
|
274
|
-
/** Lines held by end users who hold exactly one line (users holding several are not seats). */
|
|
275
|
-
private endUserLines;
|
|
276
|
-
/** Rebuild the customer object (location, groups, rules, connector) from a company id. */
|
|
277
|
-
getSeatCustomer(companyId: string, options?: {
|
|
278
|
-
locationName?: string;
|
|
279
|
-
}): Promise<SeatCustomer>;
|
|
280
|
-
/**
|
|
281
|
-
* Create (or finish) a Base Intelligence Seat customer. Idempotent: objects that already exist
|
|
282
|
-
* (found by name) are kept, so a re-run completes a half-built customer.
|
|
283
|
-
*/
|
|
284
|
-
provisionSeatCustomer(spec: SeatCustomerSpec): Promise<ProvisionResult>;
|
|
285
|
-
/**
|
|
286
|
-
* Switch on the customer's two alert rules (Upset Customer, Customer Threat). Rules already on are
|
|
287
|
-
* left as they are. Returns the ids of the rules this call switched on.
|
|
288
|
-
*/
|
|
289
|
-
activateSeatAlerts(ref: CustomerRef): Promise<string[]>;
|
|
290
|
-
/**
|
|
291
|
-
* End user: create (or find) the user without an invitation (frontline, After Call only, at the
|
|
292
|
-
* location), alert email off, map their extension, then add the extension to every manager's
|
|
293
|
-
* mapping and to the First Alert and Insights Hub numbers, and last email the invitation (unless
|
|
294
|
-
* `user.sendInvitation` is false). A refused mapping stops before managers, First Alert and
|
|
295
|
-
* Insights Hub are touched and throws ExtensionMappingError; no invitation has been sent.
|
|
296
|
-
*/
|
|
297
|
-
addFrontlineUser(ref: CustomerRef, user: NewUser, extension: string): Promise<UserResult>;
|
|
298
|
-
/**
|
|
299
|
-
* Manager: create (or find) the user without an invitation, with After Call, First Alert and
|
|
300
|
-
* Insights Hub at the location, both groups, alert email on for every rule they receive, and a
|
|
301
|
-
* mapping of exactly the end-user lines at the location. The manager's own phone line is not
|
|
302
|
-
* captured on the Seat: it is never mapped, nor added to First Alert or Insights Hub, and an
|
|
303
|
-
* extension passed as the third argument throws FilterError. Then, with `activateAlerts`
|
|
304
|
-
* (default true), switch the customer's two alert rules on (see activateSeatAlerts), and last
|
|
305
|
-
* email the invitation (unless `user.sendInvitation` is false). A refused mapping throws
|
|
306
|
-
* ExtensionMappingError: the rules stay as they were and no invitation has been sent.
|
|
307
|
-
*/
|
|
308
|
-
addManager(ref: CustomerRef, user: NewUser, options?: AddManagerOptions): Promise<UserResult>;
|
|
309
|
-
/**
|
|
310
|
-
* Integration user (reads calls, alerts and insights for another system; never a seat or a
|
|
311
|
-
* manager): create (or find) the user without an invitation, tag it `department: "integration"`,
|
|
312
|
-
* switch on After Call, First Alert and Insights Hub, add it to both groups, switch every alert
|
|
313
|
-
* email off, map all lines, and last email the invitation (unless `user.sendInvitation` is false;
|
|
314
|
-
* the person who holds the integration's password accepts it). Integration users keep every line
|
|
315
|
-
* as end users come and go (like managers) and release no lines when removed. The user must sign
|
|
316
|
-
* in with a password (`authMethod: "password"`). Never switches alerts on.
|
|
317
|
-
*/
|
|
318
|
-
addIntegrationUser(ref: CustomerRef, user: NewUser): Promise<UserResult>;
|
|
319
|
-
/** Move an end user from one extension to another: their mapping, every manager and integration user, First Alert, Insights Hub. */
|
|
320
|
-
changeUserExtension(ref: CustomerRef, userId: string, oldExtension: string, newExtension: string): Promise<ChangeResult>;
|
|
321
|
-
/**
|
|
322
|
-
* Remove a user, in this order: leave every group, clear their number mapping, take their line off
|
|
323
|
-
* managers, integration users, First Alert and Insights Hub (unless `keepExtensions`), then
|
|
324
|
-
* deactivate. Products are left as they are.
|
|
325
|
-
*
|
|
326
|
-
* Only an end user releases a line, and only a line no other end user at the location still
|
|
327
|
-
* holds. Managers, integration users (`department: "integration"`), excluded users and any
|
|
328
|
-
* non-manager holding more than one line release nothing: every other line stays where it is.
|
|
329
|
-
*/
|
|
330
|
-
removeUser(ref: CustomerRef, userId: string, options?: {
|
|
331
|
-
keepExtensions?: boolean;
|
|
332
|
-
}): Promise<RemoveResult>;
|
|
333
|
-
/** End users: invited or active frontline users with After Call only (integration and excluded users left out). */
|
|
334
|
-
listFrontlineUsers(ref: CustomerRef): Promise<SeatUser[]>;
|
|
335
|
-
/** Managers: invited or active frontline users with After Call, First Alert and Insights Hub (integration and excluded users left out). */
|
|
336
|
-
listManagers(ref: CustomerRef): Promise<SeatUser[]>;
|
|
337
|
-
/** Integration users at the location: users tagged `department: "integration"`. */
|
|
338
|
-
listIntegrationUsers(ref: CustomerRef): Promise<SeatUser[]>;
|
|
339
|
-
/**
|
|
340
|
-
* A customer leaves. In order: pause the After Call webhook (the address is kept; it can't be
|
|
341
|
-
* deleted), clear the First Alert webhook address (numbers kept), deactivate the connector (which
|
|
342
|
-
* stops call capture), deactivate the integration users, and deactivate the company (unless
|
|
343
|
-
* `deactivateCompany: false`). Steps already done are skipped, so it is safe to run again.
|
|
344
|
-
* Ask your Tresic contact about the retention of the customer's data.
|
|
345
|
-
*/
|
|
346
|
-
offboardCustomer(ref: CustomerRef, options?: {
|
|
347
|
-
deactivateCompany?: boolean;
|
|
348
|
-
}): Promise<OffboardResult>;
|
|
349
|
-
/**
|
|
350
|
-
* Recompute the union of end-user extensions (end users holding exactly one line) and push it to
|
|
351
|
-
* every manager, integration user, First Alert and Insights Hub. Managers and integration users end up with exactly
|
|
352
|
-
* these lines; any other number on their mapping is removed. `dryRun: true` returns the diff without writing.
|
|
353
|
-
*/
|
|
354
|
-
syncNumbers(ref: CustomerRef, options?: {
|
|
355
|
-
dryRun?: boolean;
|
|
356
|
-
}): Promise<SyncResult>;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
1
|
interface components {
|
|
360
2
|
schemas: {
|
|
361
3
|
/**
|
|
@@ -905,12 +547,13 @@ interface components {
|
|
|
905
547
|
}[];
|
|
906
548
|
};
|
|
907
549
|
/**
|
|
908
|
-
* @description `connecting` →
|
|
550
|
+
* @description `connecting` → running or `error`. A running connector reports `active` or `connected`: treat
|
|
551
|
+
* both as running (calls flow). Deactivate: `deactivating` → `inactive`.
|
|
909
552
|
* Reactivate: back to `connecting`.
|
|
910
553
|
*
|
|
911
554
|
* @enum {string}
|
|
912
555
|
*/
|
|
913
|
-
ConnectorStatus: "connecting" | "active" | "error" | "deactivating" | "inactive";
|
|
556
|
+
ConnectorStatus: "connecting" | "active" | "connected" | "error" | "deactivating" | "inactive";
|
|
914
557
|
NetSapiensConfigInput: {
|
|
915
558
|
/**
|
|
916
559
|
* Format: uri
|
|
@@ -4131,8 +3774,8 @@ interface operations {
|
|
|
4131
3774
|
* "id": "6f1c2e8a-3b4d-4c9e-a7f2-1d5e8b9c0a31",
|
|
4132
3775
|
* "location_id": "0193b6c2-6b29-7a51-b0e4-1c8f3d5e7a02",
|
|
4133
3776
|
* "name": "Upset Customer",
|
|
4134
|
-
* "priority": "
|
|
4135
|
-
* "match_logic": "
|
|
3777
|
+
* "priority": "medium",
|
|
3778
|
+
* "match_logic": "all",
|
|
4136
3779
|
* "enabled": false,
|
|
4137
3780
|
* "is_default": false,
|
|
4138
3781
|
* "triggers": [
|
|
@@ -4141,7 +3784,18 @@ interface operations {
|
|
|
4141
3784
|
* "trigger_type": "sentiment",
|
|
4142
3785
|
* "config": {
|
|
4143
3786
|
* "operator": "lt",
|
|
4144
|
-
* "threshold": -
|
|
3787
|
+
* "threshold": -20
|
|
3788
|
+
* }
|
|
3789
|
+
* },
|
|
3790
|
+
* {
|
|
3791
|
+
* "id": "9a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5e",
|
|
3792
|
+
* "trigger_type": "keyword_match",
|
|
3793
|
+
* "config": {
|
|
3794
|
+
* "match_logic": "any",
|
|
3795
|
+
* "keywords": [
|
|
3796
|
+
* "<phrase supplied by your Tresic contact>",
|
|
3797
|
+
* "<phrase supplied by your Tresic contact>"
|
|
3798
|
+
* ]
|
|
4145
3799
|
* }
|
|
4146
3800
|
* }
|
|
4147
3801
|
* ],
|
|
@@ -4710,7 +4364,7 @@ interface operations {
|
|
|
4710
4364
|
requestBody: {
|
|
4711
4365
|
content: {
|
|
4712
4366
|
/** @example {
|
|
4713
|
-
* "monitor_all_numbers":
|
|
4367
|
+
* "monitor_all_numbers": false
|
|
4714
4368
|
* } */
|
|
4715
4369
|
"application/json": {
|
|
4716
4370
|
monitor_all_numbers: boolean;
|
|
@@ -8090,7 +7744,7 @@ declare const OPERATIONS: {
|
|
|
8090
7744
|
readonly name: "status";
|
|
8091
7745
|
readonly in: "query";
|
|
8092
7746
|
readonly type: "string";
|
|
8093
|
-
readonly enum: readonly ["connecting", "active", "error", "deactivating", "inactive"];
|
|
7747
|
+
readonly enum: readonly ["connecting", "active", "connected", "error", "deactivating", "inactive"];
|
|
8094
7748
|
}, {
|
|
8095
7749
|
readonly name: "limit";
|
|
8096
7750
|
readonly in: "query";
|
|
@@ -8341,7 +7995,7 @@ declare const OPERATIONS: {
|
|
|
8341
7995
|
readonly name: "status";
|
|
8342
7996
|
readonly in: "query";
|
|
8343
7997
|
readonly type: "string";
|
|
8344
|
-
readonly enum: readonly ["connecting", "active", "error", "deactivating", "inactive"];
|
|
7998
|
+
readonly enum: readonly ["connecting", "active", "connected", "error", "deactivating", "inactive"];
|
|
8345
7999
|
}, {
|
|
8346
8000
|
readonly name: "type";
|
|
8347
8001
|
readonly in: "query";
|
|
@@ -10919,31 +10573,55 @@ declare class RateLimitError extends ApiError {
|
|
|
10919
10573
|
readonly retryAfter: number | null;
|
|
10920
10574
|
constructor(status: number, code: string | null, message: string, retryAfter: number | null, extra?: ApiErrorExtra);
|
|
10921
10575
|
}
|
|
10922
|
-
/** A
|
|
10923
|
-
declare class
|
|
10576
|
+
/** A request the SDK refused before sending it: an unknown filter, a bad date, a window or limit that is too large, bad input to a helper. */
|
|
10577
|
+
declare class InvalidRequestError extends IntelligenceCloudError {
|
|
10924
10578
|
}
|
|
10925
|
-
/** The
|
|
10579
|
+
/** The old name of `InvalidRequestError`, kept as an alias. */
|
|
10580
|
+
declare const FilterError: typeof InvalidRequestError;
|
|
10581
|
+
type FilterError = InvalidRequestError;
|
|
10582
|
+
/** The connector ended in `error`. `stateReason` says why (for example `invalid_permissions`). */
|
|
10926
10583
|
declare class ConnectorError extends IntelligenceCloudError {
|
|
10584
|
+
readonly connectorId: string | null;
|
|
10927
10585
|
readonly stateReason: string | null;
|
|
10586
|
+
readonly statusMessage: string | null;
|
|
10928
10587
|
readonly status: string | null;
|
|
10929
10588
|
readonly connector: Record<string, unknown> | null;
|
|
10930
|
-
constructor(
|
|
10589
|
+
constructor(connector: Record<string, unknown> | null);
|
|
10590
|
+
}
|
|
10591
|
+
/** The connector did not reach a final status in time. Check it again later with `connectors.getConnector`. */
|
|
10592
|
+
declare class ConnectorTimeoutError extends IntelligenceCloudError {
|
|
10593
|
+
readonly connector: Record<string, unknown> | null;
|
|
10594
|
+
readonly status: string | null;
|
|
10595
|
+
constructor(connector: Record<string, unknown> | null, waitedSeconds: number);
|
|
10931
10596
|
}
|
|
10932
10597
|
/** The login is not a frontline user, so conversation data would come back empty. */
|
|
10933
10598
|
declare class FrontlineRequiredError extends IntelligenceCloudError {
|
|
10934
10599
|
readonly role: string | null;
|
|
10935
10600
|
constructor(role: string | null);
|
|
10936
10601
|
}
|
|
10937
|
-
/**
|
|
10938
|
-
|
|
10602
|
+
/**
|
|
10603
|
+
* An account helper stopped part-way. `step` names the step it reached, `result` is the result so far
|
|
10604
|
+
* (the same type the helper returns) and `cause` is the error that stopped it. Run the helper again
|
|
10605
|
+
* with the same input: it finds what exists and carries on.
|
|
10606
|
+
*/
|
|
10607
|
+
declare class AccountError extends IntelligenceCloudError {
|
|
10939
10608
|
readonly step: string;
|
|
10940
|
-
readonly
|
|
10941
|
-
constructor(step: string,
|
|
10609
|
+
readonly result: unknown;
|
|
10610
|
+
constructor(step: string, result: unknown, cause: unknown);
|
|
10611
|
+
}
|
|
10612
|
+
/**
|
|
10613
|
+
* The helper needs the other kind of login. Account helpers (`client.accounts`) need an administrator
|
|
10614
|
+
* login; conversation helpers (`client.conversations`) need the person's own user login.
|
|
10615
|
+
*/
|
|
10616
|
+
declare class WrongLoginError extends IntelligenceCloudError {
|
|
10617
|
+
readonly role: string | null;
|
|
10618
|
+
readonly needed: "admin" | "user";
|
|
10619
|
+
constructor(role: string | null, needed: "admin" | "user");
|
|
10942
10620
|
}
|
|
10943
10621
|
/**
|
|
10944
|
-
* A
|
|
10945
|
-
* (usually a connector that is not
|
|
10946
|
-
* Fix the cause, then run the
|
|
10622
|
+
* A helper created or updated the user, but the API refused the user's number mapping
|
|
10623
|
+
* (usually a connector that is not running yet, or an extension another location monitors).
|
|
10624
|
+
* Fix the cause, then run the helper again (it finds the user and carries on) or call `accounts.syncLines`.
|
|
10947
10625
|
*/
|
|
10948
10626
|
declare class ExtensionMappingError extends IntelligenceCloudError {
|
|
10949
10627
|
readonly userId: string | null;
|
|
@@ -11010,7 +10688,7 @@ declare class FileTokenStore implements TokenStore {
|
|
|
11010
10688
|
}
|
|
11011
10689
|
|
|
11012
10690
|
declare const DEFAULT_BASE_URL = "https://app.intelligence.cloud/api/v1";
|
|
11013
|
-
declare const SDK_VERSION = "0.
|
|
10691
|
+
declare const SDK_VERSION = "0.2.0";
|
|
11014
10692
|
type Camel<S extends string> = S extends `${infer A}_${infer B}` ? `${A}${Capitalize<Camel<B>>}` : S;
|
|
11015
10693
|
type Loose<V> = V extends string ? V | Date : V;
|
|
11016
10694
|
type LooseKeys<T> = {
|
|
@@ -11094,7 +10772,7 @@ interface ClientOptions {
|
|
|
11094
10772
|
* alerts, tasks, insights) are always reduced to the documented fields.
|
|
11095
10773
|
*/
|
|
11096
10774
|
keepUnknownFields?: boolean;
|
|
11097
|
-
/** Sent as `User-Agent`. Default `intelligence-cloud-sdk-typescript/0.
|
|
10775
|
+
/** Sent as `User-Agent`. Default `intelligence-cloud-sdk-typescript/0.2.0`. */
|
|
11098
10776
|
userAgent?: string;
|
|
11099
10777
|
/** A `fetch` implementation. Default: the global `fetch` (Node 20+, Next.js). Keep certificate verification on in any client you pass. */
|
|
11100
10778
|
fetch?: typeof fetch;
|
|
@@ -11137,6 +10815,8 @@ declare class Core {
|
|
|
11137
10815
|
private readonly random;
|
|
11138
10816
|
readonly now: () => number;
|
|
11139
10817
|
private renewing;
|
|
10818
|
+
/** Write requests (anything but GET) attempted by this client. Account helpers use it to tell a clean stop from a partial one. */
|
|
10819
|
+
writes: number;
|
|
11140
10820
|
constructor(opts: ClientOptions);
|
|
11141
10821
|
/** Call one documented operation and return its projected response body. */
|
|
11142
10822
|
call<K extends OperationId>(operationId: K, pathArgs: string[], opts?: CallOptions): Promise<any>;
|
|
@@ -11173,7 +10853,7 @@ declare class Core {
|
|
|
11173
10853
|
}
|
|
11174
10854
|
|
|
11175
10855
|
type S$1 = components["schemas"];
|
|
11176
|
-
type Me = NonNullable<S$1["Me"]["data"]>;
|
|
10856
|
+
type Me$1 = NonNullable<S$1["Me"]["data"]>;
|
|
11177
10857
|
type CallListItem = S$1["CallListItem"];
|
|
11178
10858
|
type CallDetail = NonNullable<S$1["CallDetailResponse"]["data"]>;
|
|
11179
10859
|
type TranscriptLine = NonNullable<NonNullable<S$1["TranscriptResponse"]["data"]>["transcript"]>[number];
|
|
@@ -11185,10 +10865,15 @@ type TasksSummary = NonNullable<S$1["TaskList"]["summary"]>;
|
|
|
11185
10865
|
type TopicCall = NonNullable<S$1["TopicCallList"]["data"]>[number];
|
|
11186
10866
|
type AlertsDashboard = NonNullable<S$1["AlertsDashboardResponse"]["data"]>;
|
|
11187
10867
|
type InsightsDashboard = NonNullable<S$1["InsightsDashboardResponse"]["data"]>;
|
|
11188
|
-
/**
|
|
11189
|
-
|
|
10868
|
+
/**
|
|
10869
|
+
* A call's recording link. `expiresAt` is RFC 3339; the link stops working then (120 minutes after
|
|
10870
|
+
* issue). Anyone holding the link can download the audio: it is hidden from `JSON.stringify`,
|
|
10871
|
+
* `console.log` and `String()`; read `url` when you need it.
|
|
10872
|
+
*/
|
|
10873
|
+
declare class RecordingLink {
|
|
11190
10874
|
url: string | null;
|
|
11191
10875
|
expiresAt: string | null;
|
|
10876
|
+
constructor(url: string | null, expiresAt: string | null);
|
|
11192
10877
|
}
|
|
11193
10878
|
/** The outcome of a webhook test send: whether your endpoint answered 2xx, and its HTTP status. */
|
|
11194
10879
|
interface WebhookTestResult {
|
|
@@ -11280,9 +10965,9 @@ declare class Intelligence {
|
|
|
11280
10965
|
private roleCheck;
|
|
11281
10966
|
constructor(c: Client, checkRole: boolean);
|
|
11282
10967
|
/** The signed-in user (`GET /me`). */
|
|
11283
|
-
whoami(): Promise<Me>;
|
|
10968
|
+
whoami(): Promise<Me$1>;
|
|
11284
10969
|
/** Throws `FrontlineRequiredError` unless this login is a frontline user. Checked once, then cached. */
|
|
11285
|
-
requireFrontline(): Promise<Me>;
|
|
10970
|
+
requireFrontline(): Promise<Me$1>;
|
|
11286
10971
|
private frontline;
|
|
11287
10972
|
private callQuery;
|
|
11288
10973
|
/** One page of calls, newest first, with totals for the whole filter in `summary`. */
|
|
@@ -11360,9 +11045,840 @@ declare class Intelligence {
|
|
|
11360
11045
|
testFirstAlertWebhook(locationId: string, url?: string): Promise<WebhookTestResult>;
|
|
11361
11046
|
}
|
|
11362
11047
|
|
|
11048
|
+
declare const INSPECT$2: unique symbol;
|
|
11049
|
+
declare const BRAND: unique symbol;
|
|
11050
|
+
/**
|
|
11051
|
+
* A connection to a phone system. `type` is the platform as the API names it
|
|
11052
|
+
* (`connectors.listConnectorTypes()`); `config` is that platform's own settings, sent to the API as
|
|
11053
|
+
* given. The connection key is sent when the connector is created or repaired and is never kept,
|
|
11054
|
+
* logged or shown: give it in full each time.
|
|
11055
|
+
*/
|
|
11056
|
+
declare class ConnectorSpec {
|
|
11057
|
+
type: string;
|
|
11058
|
+
/** Default `"<team name> phone system"`. */
|
|
11059
|
+
name?: string;
|
|
11060
|
+
/** Seconds to wait for a new connector to settle. Default 600. */
|
|
11061
|
+
timeout: number;
|
|
11062
|
+
private _config;
|
|
11063
|
+
constructor(type: string, config: Record<string, unknown>, options?: {
|
|
11064
|
+
name?: string;
|
|
11065
|
+
timeout?: number;
|
|
11066
|
+
});
|
|
11067
|
+
/** The platform's settings. Values whose names contain key, secret, token, password, passwd, pwd, credential or auth print as `***`. */
|
|
11068
|
+
get config(): Record<string, unknown>;
|
|
11069
|
+
set config(value: Record<string, unknown>);
|
|
11070
|
+
/** The documented phone system: its API root (ending in /ns-api/v2), its domain and a read/write key. */
|
|
11071
|
+
static netsapiens(apiUrl: string, domain: string, apiKey: string, options?: {
|
|
11072
|
+
name?: string;
|
|
11073
|
+
timeout?: number;
|
|
11074
|
+
}): ConnectorSpec;
|
|
11075
|
+
get [BRAND](): boolean;
|
|
11076
|
+
toJSON(): unknown;
|
|
11077
|
+
toString(): string;
|
|
11078
|
+
[INSPECT$2](_depth: number, options: unknown, inspect?: (v: unknown, o: unknown) => string): string;
|
|
11079
|
+
}
|
|
11080
|
+
|
|
11081
|
+
declare const PRODUCT_KEYS: readonly ["after-call-copilot", "first-alert-copilot", "insights-hub"];
|
|
11082
|
+
declare const LICENSES: readonly ["base_user", "base_manager", "integration", "other"];
|
|
11083
|
+
type License = (typeof LICENSES)[number];
|
|
11084
|
+
/** A team's location. `vertical` is a vertical id, or its key from `locations.listVerticals()`. */
|
|
11085
|
+
interface TeamSpec {
|
|
11086
|
+
name: string;
|
|
11087
|
+
street: string;
|
|
11088
|
+
city: string;
|
|
11089
|
+
state: string;
|
|
11090
|
+
country: string;
|
|
11091
|
+
zipcode: string;
|
|
11092
|
+
vertical: string;
|
|
11093
|
+
}
|
|
11094
|
+
interface PersonSpec {
|
|
11095
|
+
email: string;
|
|
11096
|
+
firstName: string;
|
|
11097
|
+
lastName: string;
|
|
11098
|
+
phoneNumber?: string | null;
|
|
11099
|
+
/** `"password"` (default), or `"sso"` once the customer's single sign-on is connected. */
|
|
11100
|
+
authMethod?: "password" | "sso";
|
|
11101
|
+
}
|
|
11102
|
+
/** One alert's settings. `null` or left out keeps what the rule has (or the default level on a new rule). */
|
|
11103
|
+
interface AlertSetting {
|
|
11104
|
+
phrases?: string[] | null;
|
|
11105
|
+
/** A whole number from -100 to -1. */
|
|
11106
|
+
sentimentBelow?: number | null;
|
|
11107
|
+
}
|
|
11108
|
+
interface AlertSettings {
|
|
11109
|
+
customerThreat?: AlertSetting | null;
|
|
11110
|
+
upsetCustomer?: AlertSetting | null;
|
|
11111
|
+
/** Level only; it has no phrases. */
|
|
11112
|
+
lowSentiment?: AlertSetting | null;
|
|
11113
|
+
}
|
|
11114
|
+
interface CustomerSpec {
|
|
11115
|
+
companyName: string;
|
|
11116
|
+
/** Primary contact, invited as company admin; `phoneNumber` is required. */
|
|
11117
|
+
admin: PersonSpec;
|
|
11118
|
+
/** The first team. */
|
|
11119
|
+
team: TeamSpec;
|
|
11120
|
+
/** Used for the team and for Management. */
|
|
11121
|
+
connector?: ConnectorSpec | null;
|
|
11122
|
+
alerts?: AlertSettings | null;
|
|
11123
|
+
/** Default: the signed-in reseller. */
|
|
11124
|
+
resellerId?: string | null;
|
|
11125
|
+
companyCode?: string | null;
|
|
11126
|
+
/**
|
|
11127
|
+
* The company to use, from an earlier run. Without it, a company with the same name is used only
|
|
11128
|
+
* when its primary contact email is `admin.email`; otherwise ConflictError is thrown.
|
|
11129
|
+
*/
|
|
11130
|
+
companyId?: string | null;
|
|
11131
|
+
/** True for a company whose users include an integration user. */
|
|
11132
|
+
mfaOff?: boolean;
|
|
11133
|
+
ssoDomain?: string | null;
|
|
11134
|
+
/** Reactivate a company or location found inactive. */
|
|
11135
|
+
reactivate?: boolean;
|
|
11136
|
+
}
|
|
11137
|
+
interface TeamGroups {
|
|
11138
|
+
customerThreats: string | null;
|
|
11139
|
+
upsetCustomers: string | null;
|
|
11140
|
+
lowSentimentCalls: string | null;
|
|
11141
|
+
insightsHubAccess: string | null;
|
|
11142
|
+
weeklyReports: string | null;
|
|
11143
|
+
}
|
|
11144
|
+
interface TeamRules {
|
|
11145
|
+
customerThreat: string | null;
|
|
11146
|
+
upsetCustomer: string | null;
|
|
11147
|
+
lowSentiment: string | null;
|
|
11148
|
+
}
|
|
11149
|
+
interface Team {
|
|
11150
|
+
locationId: string;
|
|
11151
|
+
name: string;
|
|
11152
|
+
/** `"team"` or `"management"`. */
|
|
11153
|
+
kind: "team" | "management";
|
|
11154
|
+
groups: TeamGroups;
|
|
11155
|
+
rules: TeamRules;
|
|
11156
|
+
connectorId: string | null;
|
|
11157
|
+
connectorStatus: string | null;
|
|
11158
|
+
connectorStateReason: string | null;
|
|
11159
|
+
}
|
|
11160
|
+
interface Customer {
|
|
11161
|
+
companyId: string;
|
|
11162
|
+
management: Team | null;
|
|
11163
|
+
teams: Team[];
|
|
11164
|
+
/**
|
|
11165
|
+
* Items still to do: `"customerThreat"` and `"upsetCustomer"` until their phrases arrive
|
|
11166
|
+
* (`setAlerts`), and, for a layout this SDK does not recognise, what is missing.
|
|
11167
|
+
*/
|
|
11168
|
+
pending: string[];
|
|
11169
|
+
ssoDomainId: string | null;
|
|
11170
|
+
/** `{ name, value }` for the customer's DNS. */
|
|
11171
|
+
ssoTxtRecord: {
|
|
11172
|
+
name: string;
|
|
11173
|
+
value: string;
|
|
11174
|
+
} | null;
|
|
11175
|
+
created: string[];
|
|
11176
|
+
existing: string[];
|
|
11177
|
+
}
|
|
11178
|
+
interface Member {
|
|
11179
|
+
userId: string;
|
|
11180
|
+
email: string;
|
|
11181
|
+
license: License;
|
|
11182
|
+
/** Location ids (Management not listed). */
|
|
11183
|
+
teams: string[];
|
|
11184
|
+
lines: string[];
|
|
11185
|
+
created: boolean;
|
|
11186
|
+
/** An invitation was emailed by this call. */
|
|
11187
|
+
invited: boolean;
|
|
11188
|
+
notes: string[];
|
|
11189
|
+
}
|
|
11190
|
+
interface ActivateResult {
|
|
11191
|
+
switchedOn: string[];
|
|
11192
|
+
noManager: {
|
|
11193
|
+
locationId: string;
|
|
11194
|
+
team: string;
|
|
11195
|
+
missing: string[];
|
|
11196
|
+
}[];
|
|
11197
|
+
}
|
|
11198
|
+
interface RemoveResult {
|
|
11199
|
+
userId: string;
|
|
11200
|
+
license: License;
|
|
11201
|
+
releasedLines: string[];
|
|
11202
|
+
deactivated: boolean;
|
|
11203
|
+
notes: string[];
|
|
11204
|
+
}
|
|
11205
|
+
interface LicenseReport {
|
|
11206
|
+
baseUser: number;
|
|
11207
|
+
baseManager: number;
|
|
11208
|
+
integration: number;
|
|
11209
|
+
other: number;
|
|
11210
|
+
/** Management is not counted. */
|
|
11211
|
+
teams: number;
|
|
11212
|
+
members: {
|
|
11213
|
+
baseUser: Member[];
|
|
11214
|
+
baseManager: Member[];
|
|
11215
|
+
integration: Member[];
|
|
11216
|
+
other: Member[];
|
|
11217
|
+
};
|
|
11218
|
+
}
|
|
11219
|
+
interface LineChange {
|
|
11220
|
+
add: string[];
|
|
11221
|
+
remove: string[];
|
|
11222
|
+
}
|
|
11223
|
+
interface TeamLinePlan {
|
|
11224
|
+
team: string;
|
|
11225
|
+
lines: string[];
|
|
11226
|
+
/** People who own a line here but read back as "other" (their line is kept; correct them). */
|
|
11227
|
+
other: string[];
|
|
11228
|
+
firstAlert: LineChange;
|
|
11229
|
+
insightsHub: LineChange;
|
|
11230
|
+
holders: Record<string, LineChange>;
|
|
11231
|
+
}
|
|
11232
|
+
interface SyncResult {
|
|
11233
|
+
teams: Record<string, TeamLinePlan>;
|
|
11234
|
+
applied: boolean;
|
|
11235
|
+
}
|
|
11236
|
+
interface OffboardResult {
|
|
11237
|
+
webhooksPaused: string[];
|
|
11238
|
+
firstAlertWebhooksCleared: string[];
|
|
11239
|
+
connectorsDeactivated: string[];
|
|
11240
|
+
integrationUsersDeactivated: string[];
|
|
11241
|
+
companyDeactivated: boolean;
|
|
11242
|
+
}
|
|
11243
|
+
type CustomerArg = Customer | string;
|
|
11244
|
+
type TeamArg = Team | string;
|
|
11245
|
+
/** Create and maintain customers (administrator login). */
|
|
11246
|
+
declare class Accounts {
|
|
11247
|
+
private readonly c;
|
|
11248
|
+
private me;
|
|
11249
|
+
private verticals;
|
|
11250
|
+
private connectorTypes;
|
|
11251
|
+
private readonly rawConnectors;
|
|
11252
|
+
private tail;
|
|
11253
|
+
constructor(c: Client);
|
|
11254
|
+
private requireAdmin;
|
|
11255
|
+
private run;
|
|
11256
|
+
/** Throw `exc` as it is when nothing was written yet; otherwise as AccountError. */
|
|
11257
|
+
private stop;
|
|
11258
|
+
private resolve;
|
|
11259
|
+
private teamOf;
|
|
11260
|
+
private teamsOf;
|
|
11261
|
+
private locationsOf;
|
|
11262
|
+
private verticalId;
|
|
11263
|
+
private checkConnector;
|
|
11264
|
+
/**
|
|
11265
|
+
* Read the customer's layout back: Management, teams, groups, rules, connectors and what is
|
|
11266
|
+
* pending. A layout this SDK does not recognise (for example one built with 0.1.x) is returned with
|
|
11267
|
+
* what is missing listed in `pending`.
|
|
11268
|
+
*/
|
|
11269
|
+
getCustomer(companyId: string): Promise<Customer>;
|
|
11270
|
+
private readTeam;
|
|
11271
|
+
private readConnector;
|
|
11272
|
+
private pendingOf;
|
|
11273
|
+
/**
|
|
11274
|
+
* Create the customer, or finish one an earlier run started.
|
|
11275
|
+
*
|
|
11276
|
+
* The company with all three products; the SSO domain claim (if `ssoDomain`); the first team and
|
|
11277
|
+
* `<Company> - Management`; the connector at each (if given); five groups on the team and the
|
|
11278
|
+
* weekly reports group at Management; the Low Sentiment rule, plus Customer Threat and Upset
|
|
11279
|
+
* Customer when their phrases are given, all switched off; Insights Hub with "monitor all numbers"
|
|
11280
|
+
* off. Alerts without phrases are listed in `Customer.pending` and follow with `setAlerts`. Store
|
|
11281
|
+
* `companyId` and pass it on later runs: a company is never adopted by its name alone.
|
|
11282
|
+
*/
|
|
11283
|
+
createCustomer(spec: CustomerSpec): Promise<Customer>;
|
|
11284
|
+
/**
|
|
11285
|
+
* `spec.companyId`, or the one company with this exact name whose primary contact email is
|
|
11286
|
+
* `spec.admin.email`. Throws ConflictError, before any write, when the name is taken by another.
|
|
11287
|
+
*/
|
|
11288
|
+
private findCompany;
|
|
11289
|
+
private ensureDomain;
|
|
11290
|
+
private ensureLocation;
|
|
11291
|
+
private ensureGroups;
|
|
11292
|
+
private settingsFrom;
|
|
11293
|
+
/**
|
|
11294
|
+
* Create missing rules (switched off) and apply the given phrases and levels to existing ones.
|
|
11295
|
+
* Returns the ids of the rules created or changed.
|
|
11296
|
+
*/
|
|
11297
|
+
private ensureRules;
|
|
11298
|
+
private ensureInsightsHub;
|
|
11299
|
+
private monitorAllOff;
|
|
11300
|
+
/**
|
|
11301
|
+
* The location's connector of this type for the same phone-system domain (best status first),
|
|
11302
|
+
* else one of this type with this name.
|
|
11303
|
+
*/
|
|
11304
|
+
private findConnector;
|
|
11305
|
+
private static unchanged;
|
|
11306
|
+
/**
|
|
11307
|
+
* Find, repair or create the team's connector and record its status on the team. Returns the
|
|
11308
|
+
* ConnectorError or ConnectorTimeoutError when it did not become active (the caller throws it at
|
|
11309
|
+
* the end, once everything else is built), else null.
|
|
11310
|
+
*/
|
|
11311
|
+
private ensureConnector;
|
|
11312
|
+
private setConn;
|
|
11313
|
+
/**
|
|
11314
|
+
* Add a further team: its location, connector (required; give the key in full each time), groups,
|
|
11315
|
+
* rules (copying the phrases and levels of the first team's rules, except where `alerts` sets them)
|
|
11316
|
+
* and Insights Hub setup. The rules are created switched off.
|
|
11317
|
+
*/
|
|
11318
|
+
addTeam(customer: CustomerArg, team: TeamSpec, connector: ConnectorSpec, options?: {
|
|
11319
|
+
alerts?: AlertSettings | null;
|
|
11320
|
+
reactivate?: boolean;
|
|
11321
|
+
}): Promise<Team>;
|
|
11322
|
+
/**
|
|
11323
|
+
* Create or update the three rules' phrases and sentiment levels on one team or on every team.
|
|
11324
|
+
* Anything left out is kept. Existing rules keep their on or off state; a rule created here (one
|
|
11325
|
+
* that was pending its phrases) starts switched off: `activateAlerts` switches it on. Returns the
|
|
11326
|
+
* ids of the rules created or changed.
|
|
11327
|
+
*/
|
|
11328
|
+
setAlerts(customer: CustomerArg, alerts: AlertSettings, options?: {
|
|
11329
|
+
team?: TeamArg | null;
|
|
11330
|
+
}): Promise<string[]>;
|
|
11331
|
+
/**
|
|
11332
|
+
* Attach a phone system to a customer created without one: the named team, or the first team and
|
|
11333
|
+
* Management. Refuses (InvalidRequestError, before any write) where an active connector exists.
|
|
11334
|
+
* Returns the teams it attached.
|
|
11335
|
+
*/
|
|
11336
|
+
setConnector(customer: CustomerArg, connector: ConnectorSpec, options?: {
|
|
11337
|
+
team?: TeamArg | null;
|
|
11338
|
+
}): Promise<Team[]>;
|
|
11339
|
+
/**
|
|
11340
|
+
* Switch the rules on for every team. A team does not need a manager: its alerts then show in the app
|
|
11341
|
+
* only, and the team is listed under `noManager` with the alert groups that have none.
|
|
11342
|
+
*/
|
|
11343
|
+
activateAlerts(customer: CustomerArg, options?: {
|
|
11344
|
+
team?: TeamArg | null;
|
|
11345
|
+
}): Promise<ActivateResult>;
|
|
11346
|
+
/** Everyone at the customer's locations, with products and groups per location, lines and license. */
|
|
11347
|
+
private index;
|
|
11348
|
+
private classify;
|
|
11349
|
+
private member;
|
|
11350
|
+
private person;
|
|
11351
|
+
/** People who hold a team's lines: its Base Managers and integration users. */
|
|
11352
|
+
private holders;
|
|
11353
|
+
/**
|
|
11354
|
+
* The team line this person owns: anyone active on the team, not a Base Manager or integration user,
|
|
11355
|
+
* with After Call on there and exactly one number on its connector. A Base User normally; also
|
|
11356
|
+
* someone read back as "other" (for example with First Alert switched on in the app), whose line is
|
|
11357
|
+
* never taken away.
|
|
11358
|
+
*/
|
|
11359
|
+
private ownedLine;
|
|
11360
|
+
/** user id -> the team line they own. */
|
|
11361
|
+
private owners;
|
|
11362
|
+
/** A team's lines: the line of every person who owns one there. */
|
|
11363
|
+
private teamLines;
|
|
11364
|
+
/**
|
|
11365
|
+
* Refuse, before any write, to give an existing person a different license through an add helper:
|
|
11366
|
+
* that would take away lines they hold. `changeLicense` converts Base Users and Base Managers. A
|
|
11367
|
+
* person read back as "other" (for example one an earlier run of this helper left part-way) is
|
|
11368
|
+
* accepted when the helper cannot take anything away from them.
|
|
11369
|
+
*/
|
|
11370
|
+
private checkExisting;
|
|
11371
|
+
/** Notes for the teams whose alert groups this person leaves with no Base Manager in them. */
|
|
11372
|
+
private emptiedGroups;
|
|
11373
|
+
/**
|
|
11374
|
+
* Everyone active at the customer's locations, with license, teams and lines.
|
|
11375
|
+
*
|
|
11376
|
+
* `license`: "base_user", "base_manager", "integration" or "other". A Base User has After Call on and
|
|
11377
|
+
* their own line mapped; a Base Manager has all three products, is on Management and is in the alert
|
|
11378
|
+
* groups of at least one team; an integration user is tagged as one; anyone else is "other", listed
|
|
11379
|
+
* so it can be corrected.
|
|
11380
|
+
*/
|
|
11381
|
+
listMembers(customer: CustomerArg, options?: {
|
|
11382
|
+
license?: License | null;
|
|
11383
|
+
team?: TeamArg | null;
|
|
11384
|
+
}): Promise<Member[]>;
|
|
11385
|
+
/** People by license and the number of teams (Management not counted). */
|
|
11386
|
+
licenseReport(customer: CustomerArg): Promise<LicenseReport>;
|
|
11387
|
+
/**
|
|
11388
|
+
* Find or create the person (never emailing an invitation here) and make sure they are on
|
|
11389
|
+
* `locationIds`. Returns (id, created, company user).
|
|
11390
|
+
*/
|
|
11391
|
+
private ensureUser;
|
|
11392
|
+
private addLocations;
|
|
11393
|
+
private removeLocations;
|
|
11394
|
+
private productsOn;
|
|
11395
|
+
private productsOff;
|
|
11396
|
+
private joinGroups;
|
|
11397
|
+
private leaveGroups;
|
|
11398
|
+
/** Alert email off for a person the helpers create. Someone who has signed in keeps their own choice. */
|
|
11399
|
+
private emailOff;
|
|
11400
|
+
private setMappings;
|
|
11401
|
+
/** Set (`replace`) or add to the person's numbers on one connector; other connectors are kept. */
|
|
11402
|
+
private map;
|
|
11403
|
+
/** The last step: email the invitation to a person who has none yet. */
|
|
11404
|
+
private invite;
|
|
11405
|
+
private faNumbers;
|
|
11406
|
+
private ihNumbers;
|
|
11407
|
+
/** A team line onto First Alert, Insights Hub and every holder of the team's lines. */
|
|
11408
|
+
private attachLine;
|
|
11409
|
+
/**
|
|
11410
|
+
* Take a team line off its holders, First Alert and Insights Hub, unless another Base User at the
|
|
11411
|
+
* team still holds it. Returns true when it was released.
|
|
11412
|
+
*/
|
|
11413
|
+
private releaseLine;
|
|
11414
|
+
private needConnector;
|
|
11415
|
+
/** Management and each team: products, groups, alert email off, lines. Returns the lines held. */
|
|
11416
|
+
private managerSetup;
|
|
11417
|
+
/**
|
|
11418
|
+
* Add a Base User: created without an invitation, After Call on, their line mapped on the team's
|
|
11419
|
+
* connector and added to the team's First Alert and Insights Hub lines and to every Base Manager and
|
|
11420
|
+
* integration user of the team, then the invitation (if `invite`). If the line cannot be mapped,
|
|
11421
|
+
* AccountError (cause ExtensionMappingError) is thrown and no invitation is sent.
|
|
11422
|
+
*/
|
|
11423
|
+
addBaseUser(customer: CustomerArg, person: PersonSpec, options: {
|
|
11424
|
+
team: TeamArg;
|
|
11425
|
+
line: string;
|
|
11426
|
+
invite?: boolean;
|
|
11427
|
+
}): Promise<Member>;
|
|
11428
|
+
/**
|
|
11429
|
+
* Add a Base Manager on each team and on Management: all three products; their own line at
|
|
11430
|
+
* Management (if `line`); every Base User line of each team; the three alert groups, Insights Hub
|
|
11431
|
+
* Access and Insights Hub Weekly Reports of each team (and the company-wide weekly reports group
|
|
11432
|
+
* with `companyReports: true`); alert email off. The invitation is sent last.
|
|
11433
|
+
*/
|
|
11434
|
+
addBaseManager(customer: CustomerArg, person: PersonSpec, options: {
|
|
11435
|
+
teams: TeamArg[];
|
|
11436
|
+
line?: string | null;
|
|
11437
|
+
companyReports?: boolean;
|
|
11438
|
+
invite?: boolean;
|
|
11439
|
+
}): Promise<Member>;
|
|
11440
|
+
/**
|
|
11441
|
+
* Add the customer's integration (data-reading) user across every team: password sign-in, tagged
|
|
11442
|
+
* `department: "integration"`, all three products, the alert groups and Insights Hub Access, alert
|
|
11443
|
+
* email off, every team's lines. Later Base Users' lines are added to it. The company needs MFA off
|
|
11444
|
+
* (`CustomerSpec.mfaOff`) for it to sign in.
|
|
11445
|
+
*/
|
|
11446
|
+
addIntegrationUser(customer: CustomerArg, person: PersonSpec, options?: {
|
|
11447
|
+
invite?: boolean;
|
|
11448
|
+
}): Promise<Member>;
|
|
11449
|
+
/**
|
|
11450
|
+
* Base User to Base Manager (`to: "base_manager"`): their own line moves to Management and they get
|
|
11451
|
+
* the products, team lines and groups of `teams` (default: their teams); teams they were on and that
|
|
11452
|
+
* are not in `teams` are left.
|
|
11453
|
+
* Base Manager to Base User (`to: "base_user"`): groups, team lines, the extra products and
|
|
11454
|
+
* Management are removed; they keep one team (`teams[0]`, default their first) and their own line
|
|
11455
|
+
* (`line`, default their Management line), which is added to that team's lists.
|
|
11456
|
+
*
|
|
11457
|
+
* Safe to run again, also after an AccountError: a person part-way through the change is recognised
|
|
11458
|
+
* and the change continues. Until it completes, `result.lines` and `result.teams` hold what the
|
|
11459
|
+
* person had before.
|
|
11460
|
+
*/
|
|
11461
|
+
changeLicense(customer: CustomerArg, userId: string, to: "base_user" | "base_manager", options?: {
|
|
11462
|
+
teams?: TeamArg[] | null;
|
|
11463
|
+
line?: string | null;
|
|
11464
|
+
}): Promise<Member>;
|
|
11465
|
+
private toManager;
|
|
11466
|
+
private toUser;
|
|
11467
|
+
/**
|
|
11468
|
+
* Move a Base User (membership and line) to another team, or swap one of a Base Manager's teams for
|
|
11469
|
+
* another. Calls captured before the move stay with the old team (`Member.notes` says so). Safe to
|
|
11470
|
+
* run again, also after an AccountError: the move continues.
|
|
11471
|
+
*/
|
|
11472
|
+
moveUser(customer: CustomerArg, userId: string, options: {
|
|
11473
|
+
fromTeam: TeamArg;
|
|
11474
|
+
toTeam: TeamArg;
|
|
11475
|
+
}): Promise<Member>;
|
|
11476
|
+
private moveManager;
|
|
11477
|
+
/**
|
|
11478
|
+
* Change a person's own line from `old` to `new`.
|
|
11479
|
+
*
|
|
11480
|
+
* A Base User: their mapping, and the team's First Alert and Insights Hub lists and holders, where
|
|
11481
|
+
* `old` is released only when no other Base User of the team still holds it. A Base Manager: their
|
|
11482
|
+
* own line at Management only; a team line belongs to the Base User who holds it, so `old` must be
|
|
11483
|
+
* the manager's own line.
|
|
11484
|
+
*/
|
|
11485
|
+
changeLine(customer: CustomerArg, userId: string, oldLine: string, newLine: string): Promise<Member>;
|
|
11486
|
+
/**
|
|
11487
|
+
* Take the person out of every group, release a Base User's line (unless `keepLines`, and only when
|
|
11488
|
+
* no other Base User of the team holds it), clear their lines, then deactivate them. Removing a Base
|
|
11489
|
+
* Manager or an integration user never takes a line off anyone else. `notes` names any team whose
|
|
11490
|
+
* alert groups are left with no Base Manager (its alerts are not changed).
|
|
11491
|
+
*/
|
|
11492
|
+
removeUser(customer: CustomerArg, userId: string, options?: {
|
|
11493
|
+
keepLines?: boolean;
|
|
11494
|
+
}): Promise<RemoveResult>;
|
|
11495
|
+
/**
|
|
11496
|
+
* Email invitations to people who have not signed in. Without `userIds`: everyone who was never
|
|
11497
|
+
* sent one, or whose invitation has expired. With `userIds`: re-send to those of them who have not
|
|
11498
|
+
* signed in. Returns the ids invited.
|
|
11499
|
+
*/
|
|
11500
|
+
sendInvitations(customer: CustomerArg, options?: {
|
|
11501
|
+
userIds?: string[] | null;
|
|
11502
|
+
}): Promise<string[]>;
|
|
11503
|
+
/**
|
|
11504
|
+
* Make the line lists match the people: every Base User's line is on their team's First Alert and
|
|
11505
|
+
* Insights Hub lists and on its holders; Base Managers and integration users hold exactly their
|
|
11506
|
+
* teams' lines on each team's connector; nothing else is listed. `dryRun: true` returns the changes
|
|
11507
|
+
* without making them.
|
|
11508
|
+
*
|
|
11509
|
+
* Anyone with After Call on and exactly one line on a team's connector owns that line, also when they
|
|
11510
|
+
* read back as "other" (listed under `other`): their line is never released.
|
|
11511
|
+
*/
|
|
11512
|
+
syncLines(customer: CustomerArg, options?: {
|
|
11513
|
+
dryRun?: boolean;
|
|
11514
|
+
}): Promise<SyncResult>;
|
|
11515
|
+
/**
|
|
11516
|
+
* Stop everything for a customer who leaves, at every team and at Management, in this order: pause
|
|
11517
|
+
* each After Call webhook (its address is kept; it can't be deleted), clear each First Alert webhook,
|
|
11518
|
+
* stop each connector (ends the phone-system subscription), deactivate the integration users, then
|
|
11519
|
+
* deactivate the company. Ask your Tresic contact about retention of the customer's data.
|
|
11520
|
+
*/
|
|
11521
|
+
offboardCustomer(customer: CustomerArg, options?: {
|
|
11522
|
+
deactivateCompany?: boolean;
|
|
11523
|
+
}): Promise<OffboardResult>;
|
|
11524
|
+
}
|
|
11525
|
+
|
|
11526
|
+
/** The After Call `end_of_call_summary` event, as documented. */
|
|
11527
|
+
type AfterCallSummaryEvent = components["schemas"]["AfterCallSummaryEvent"];
|
|
11528
|
+
/** The largest webhook body the parser accepts by default (256 KB). Answer 413 to anything larger. */
|
|
11529
|
+
declare const MAX_EVENT_BYTES = 262144;
|
|
11530
|
+
/**
|
|
11531
|
+
* An event of a type this SDK does not handle. Answer 2xx and ignore it: new event types can be
|
|
11532
|
+
* added at any time.
|
|
11533
|
+
*/
|
|
11534
|
+
interface UnknownEvent {
|
|
11535
|
+
readonly kind: "unknown";
|
|
11536
|
+
/** The event's `type`, or null when it has none. */
|
|
11537
|
+
readonly type: string | null;
|
|
11538
|
+
readonly version: string | null;
|
|
11539
|
+
/** The parsed body, as received. */
|
|
11540
|
+
readonly raw: Record<string, unknown>;
|
|
11541
|
+
}
|
|
11542
|
+
/** True for an event of a type this SDK does not handle (answer 2xx and ignore it). */
|
|
11543
|
+
declare function isUnknownEvent(e: AfterCallSummaryEvent | UnknownEvent): e is UnknownEvent;
|
|
11544
|
+
/**
|
|
11545
|
+
* Parse and check an After Call webhook body. Accepts the raw body (string or bytes) or an
|
|
11546
|
+
* already-parsed object.
|
|
11547
|
+
*
|
|
11548
|
+
* - An `end_of_call_summary` event comes back with only the documented fields.
|
|
11549
|
+
* - Any other JSON object comes back as an `UnknownEvent` (check with `isUnknownEvent`): answer 2xx
|
|
11550
|
+
* and ignore it.
|
|
11551
|
+
* - Throws `PayloadTooLargeError` for a body over `maxBytes` (default 256 KB; answer 413) and
|
|
11552
|
+
* `WebhookPayloadError` for a body that isn't a JSON object or a malformed `end_of_call_summary`
|
|
11553
|
+
* (answer 400).
|
|
11554
|
+
*
|
|
11555
|
+
* Treat the event as a notification: read the call with `getCall(event.call.id)` before you write
|
|
11556
|
+
* anything from it into another system.
|
|
11557
|
+
*/
|
|
11558
|
+
declare function parseAfterCallEvent(body: string | Uint8Array | ArrayBuffer | Record<string, unknown>, options?: {
|
|
11559
|
+
maxBytes?: number;
|
|
11560
|
+
}): AfterCallSummaryEvent | UnknownEvent;
|
|
11561
|
+
declare const INSPECT$1: unique symbol;
|
|
11562
|
+
/**
|
|
11563
|
+
* A First Alert delivery. Take the alert id, answer 2xx, then read the alert with
|
|
11564
|
+
* `client.conversations.alert(event.alertId)`. Printing it shows only the alert id and time.
|
|
11565
|
+
*
|
|
11566
|
+
* The published event schema is an open object (alert id, rule, location, call, time), so only the
|
|
11567
|
+
* alert id is required; the other fields are null when the delivery does not carry them.
|
|
11568
|
+
*/
|
|
11569
|
+
declare const EVENT_BRAND: unique symbol;
|
|
11570
|
+
declare class FirstAlertEvent {
|
|
11571
|
+
get [EVENT_BRAND](): boolean;
|
|
11572
|
+
readonly alertId: string;
|
|
11573
|
+
readonly rule: string | null;
|
|
11574
|
+
readonly locationId: string | null;
|
|
11575
|
+
readonly callId: string | null;
|
|
11576
|
+
readonly timestamp: Date | null;
|
|
11577
|
+
readonly isTest: boolean;
|
|
11578
|
+
/** The body as received. */
|
|
11579
|
+
readonly raw: Record<string, unknown>;
|
|
11580
|
+
constructor(f: {
|
|
11581
|
+
alertId: string;
|
|
11582
|
+
rule?: string | null;
|
|
11583
|
+
locationId?: string | null;
|
|
11584
|
+
callId?: string | null;
|
|
11585
|
+
timestamp?: Date | null;
|
|
11586
|
+
isTest?: boolean;
|
|
11587
|
+
raw?: Record<string, unknown>;
|
|
11588
|
+
});
|
|
11589
|
+
toString(): string;
|
|
11590
|
+
toJSON(): unknown;
|
|
11591
|
+
[INSPECT$1](): string;
|
|
11592
|
+
}
|
|
11593
|
+
/**
|
|
11594
|
+
* Parse a First Alert webhook body into a `FirstAlertEvent`. Accepts the raw body (string or bytes)
|
|
11595
|
+
* or an already-parsed object.
|
|
11596
|
+
*
|
|
11597
|
+
* Throws `PayloadTooLargeError` (answer 413) above `maxBytes` and `WebhookPayloadError` (answer 400)
|
|
11598
|
+
* for a body that is not JSON or carries no alert id.
|
|
11599
|
+
*/
|
|
11600
|
+
declare function parseFirstAlertEvent(body: string | Uint8Array | ArrayBuffer | Record<string, unknown>, options?: {
|
|
11601
|
+
maxBytes?: number;
|
|
11602
|
+
}): FirstAlertEvent;
|
|
11603
|
+
/** Storage for `Deduplicator`. Swap in a shared store (a database or cache) for multi-instance deployments. */
|
|
11604
|
+
interface DedupStore {
|
|
11605
|
+
/** Return true if `key` was already recorded; otherwise record it and return false. Must be atomic. */
|
|
11606
|
+
checkAndAdd(key: string): boolean | Promise<boolean>;
|
|
11607
|
+
}
|
|
11608
|
+
/** In-memory LRU store (per process). */
|
|
11609
|
+
declare class MemoryDedupStore implements DedupStore {
|
|
11610
|
+
private readonly maxSize;
|
|
11611
|
+
private readonly keys;
|
|
11612
|
+
constructor(maxSize?: number);
|
|
11613
|
+
checkAndAdd(key: string): boolean;
|
|
11614
|
+
}
|
|
11615
|
+
/**
|
|
11616
|
+
* De-duplicate deliveries on `call.id` (After Call) or the alert id (First Alert). Retries and calls
|
|
11617
|
+
* with several legs can deliver the same call more than once.
|
|
11618
|
+
*
|
|
11619
|
+
* const dedup = new Deduplicator();
|
|
11620
|
+
* if (await dedup.isDuplicate(event.call.id)) return; // already handled
|
|
11621
|
+
*
|
|
11622
|
+
* The same name and meaning in every SDK: Python `is_duplicate`, PHP `isDuplicate`.
|
|
11623
|
+
*/
|
|
11624
|
+
declare class Deduplicator {
|
|
11625
|
+
private readonly store;
|
|
11626
|
+
constructor(options?: {
|
|
11627
|
+
maxSize?: number;
|
|
11628
|
+
store?: DedupStore;
|
|
11629
|
+
});
|
|
11630
|
+
/** True if this id was seen before. The first call for an id records it and returns false. */
|
|
11631
|
+
isDuplicate(id: string): Promise<boolean>;
|
|
11632
|
+
/** @deprecated Use `isDuplicate` (same result). */
|
|
11633
|
+
seen(id: string): Promise<boolean>;
|
|
11634
|
+
}
|
|
11635
|
+
|
|
11636
|
+
declare const MAX_WINDOW_DAYS = 31;
|
|
11637
|
+
declare const MAX_LIMIT = 200;
|
|
11638
|
+
declare const MAX_HISTORY = 50;
|
|
11639
|
+
declare const INSPECT: unique symbol;
|
|
11640
|
+
type Rec = Record<string, any>;
|
|
11641
|
+
/** A moment: a Date, or an RFC 3339 date-time string with a time zone offset. */
|
|
11642
|
+
type When = Date | string;
|
|
11643
|
+
declare const CALL_BRAND: unique symbol;
|
|
11644
|
+
declare const ALERT_BRAND: unique symbol;
|
|
11645
|
+
/** `***` and the last four digits. Extensions (four digits or fewer) are shown as they are. */
|
|
11646
|
+
declare function maskNumber(number: string | null | undefined): string | null | undefined;
|
|
11647
|
+
/** A name with any phone number in it (five or more digits) shown as `***` and its last four. */
|
|
11648
|
+
declare function maskName(name: string | null | undefined): string | null | undefined;
|
|
11649
|
+
/** A team (location) this person can see. */
|
|
11650
|
+
interface TeamRef {
|
|
11651
|
+
locationId: string;
|
|
11652
|
+
name: string;
|
|
11653
|
+
/** `"team"` or `"management"`. */
|
|
11654
|
+
kind: "team" | "management";
|
|
11655
|
+
}
|
|
11656
|
+
interface Me {
|
|
11657
|
+
userId: string;
|
|
11658
|
+
email: string | null;
|
|
11659
|
+
name: string | null;
|
|
11660
|
+
role: string | null;
|
|
11661
|
+
companyId: string | null;
|
|
11662
|
+
teams: TeamRef[];
|
|
11663
|
+
/** The person's own lines. The API gives a user login no way to read them yet: null. */
|
|
11664
|
+
lines: string[] | null;
|
|
11665
|
+
}
|
|
11666
|
+
/** One task. Printing it shows only the id, status and due date. */
|
|
11667
|
+
declare class TaskBrief {
|
|
11668
|
+
id: string;
|
|
11669
|
+
title: string | null;
|
|
11670
|
+
status: string | null;
|
|
11671
|
+
dueDate: string | null;
|
|
11672
|
+
callId: string | null;
|
|
11673
|
+
description: string | null;
|
|
11674
|
+
constructor(f: {
|
|
11675
|
+
id: string;
|
|
11676
|
+
title?: string | null;
|
|
11677
|
+
status?: string | null;
|
|
11678
|
+
dueDate?: string | null;
|
|
11679
|
+
callId?: string | null;
|
|
11680
|
+
description?: string | null;
|
|
11681
|
+
});
|
|
11682
|
+
toString(): string;
|
|
11683
|
+
[INSPECT](): string;
|
|
11684
|
+
}
|
|
11685
|
+
/** One call, without transcript or recording. Printing it shows only the id and time. */
|
|
11686
|
+
declare class CallBrief {
|
|
11687
|
+
id: string;
|
|
11688
|
+
when: Date | null;
|
|
11689
|
+
/** inbound, outbound, internal, missed, forwarded or unknown. */
|
|
11690
|
+
direction: string | null;
|
|
11691
|
+
status: string | null;
|
|
11692
|
+
durationSeconds: number | null;
|
|
11693
|
+
callerName: string | null;
|
|
11694
|
+
/** Last four digits unless the client has `maskNumbers: false`. */
|
|
11695
|
+
callerNumber: string | null;
|
|
11696
|
+
calleeName: string | null;
|
|
11697
|
+
calleeNumber: string | null;
|
|
11698
|
+
summary: string | null;
|
|
11699
|
+
/** From `brief()`; empty in list results. */
|
|
11700
|
+
keyPoints: string[];
|
|
11701
|
+
/** From `brief()`; see `taskCount` in list results. */
|
|
11702
|
+
tasks: TaskBrief[];
|
|
11703
|
+
taskCount: number | null;
|
|
11704
|
+
sentiment: string | null;
|
|
11705
|
+
sentimentScore: number | null;
|
|
11706
|
+
topics: string[];
|
|
11707
|
+
/** Names of the alerts the call raised (`brief()` only). */
|
|
11708
|
+
alerts: string[];
|
|
11709
|
+
locationId: string | null;
|
|
11710
|
+
/** The call's page in the app (an id-only address). */
|
|
11711
|
+
link: string | null;
|
|
11712
|
+
constructor(f?: Partial<CallBrief>);
|
|
11713
|
+
get [CALL_BRAND](): boolean;
|
|
11714
|
+
toString(): string;
|
|
11715
|
+
[INSPECT](): string;
|
|
11716
|
+
}
|
|
11717
|
+
/** One First Alert hit. Printing it shows only the id and time. */
|
|
11718
|
+
declare class AlertBrief {
|
|
11719
|
+
id: string;
|
|
11720
|
+
callId: string | null;
|
|
11721
|
+
when: Date | null;
|
|
11722
|
+
/** The alert (rule) names that fired. */
|
|
11723
|
+
alerts: string[];
|
|
11724
|
+
callerName: string | null;
|
|
11725
|
+
callerNumber: string | null;
|
|
11726
|
+
calleeName: string | null;
|
|
11727
|
+
calleeNumber: string | null;
|
|
11728
|
+
summary: string | null;
|
|
11729
|
+
sentiment: string | null;
|
|
11730
|
+
sentimentScore: number | null;
|
|
11731
|
+
topics: string[];
|
|
11732
|
+
/** Who holds the alert; the API does not publish it yet. */
|
|
11733
|
+
holder: string | null;
|
|
11734
|
+
/** Set by `alert()`. */
|
|
11735
|
+
call: CallBrief | null;
|
|
11736
|
+
/** The alert's page in the app (an id-only address). */
|
|
11737
|
+
link: string | null;
|
|
11738
|
+
constructor(f?: Partial<AlertBrief>);
|
|
11739
|
+
get [ALERT_BRAND](): boolean;
|
|
11740
|
+
toString(): string;
|
|
11741
|
+
[INSPECT](): string;
|
|
11742
|
+
}
|
|
11743
|
+
interface TeamView {
|
|
11744
|
+
/** Location id. */
|
|
11745
|
+
team: string;
|
|
11746
|
+
since: Date;
|
|
11747
|
+
until: Date;
|
|
11748
|
+
counts: Record<string, number>;
|
|
11749
|
+
alerts: AlertBrief[];
|
|
11750
|
+
openTasks: TaskBrief[];
|
|
11751
|
+
briefs: CallBrief[];
|
|
11752
|
+
}
|
|
11753
|
+
interface TopicsView {
|
|
11754
|
+
since: Date;
|
|
11755
|
+
until: Date;
|
|
11756
|
+
/** total, answered, unanswered. */
|
|
11757
|
+
calls: {
|
|
11758
|
+
total: number;
|
|
11759
|
+
answered: number;
|
|
11760
|
+
unanswered: number;
|
|
11761
|
+
};
|
|
11762
|
+
/** name, slug, callCount. */
|
|
11763
|
+
topics: Rec[];
|
|
11764
|
+
/** name, slug, callCount, percentageChange. */
|
|
11765
|
+
rising: Rec[];
|
|
11766
|
+
}
|
|
11767
|
+
/** An id to pass to another system in place of content. */
|
|
11768
|
+
interface Reference {
|
|
11769
|
+
/** `"call"` or `"alert"`. */
|
|
11770
|
+
kind: "call" | "alert";
|
|
11771
|
+
id: string;
|
|
11772
|
+
/** The page in the app: `<appUrl>/after-call-copilot/calls/<id>` or `.../first-alert-copilot/alerts/<id>`. */
|
|
11773
|
+
link: string | null;
|
|
11774
|
+
}
|
|
11775
|
+
type TeamSelector = string | {
|
|
11776
|
+
locationId: string;
|
|
11777
|
+
};
|
|
11778
|
+
/** A signed-in person's calls, tasks and alerts (user login). */
|
|
11779
|
+
declare class Conversations {
|
|
11780
|
+
private readonly c;
|
|
11781
|
+
private me_;
|
|
11782
|
+
constructor(c: Client);
|
|
11783
|
+
private requireUser;
|
|
11784
|
+
private mask;
|
|
11785
|
+
private maskNm;
|
|
11786
|
+
private link;
|
|
11787
|
+
private static limit;
|
|
11788
|
+
private static when;
|
|
11789
|
+
/** (start, end). Default: today (local time), or the last `defaultDays` days. At most 31 days. */
|
|
11790
|
+
window(day: Date | string | null | undefined, since: When | null | undefined, until: When | null | undefined, defaultDays?: number): [Date, Date];
|
|
11791
|
+
private teamId;
|
|
11792
|
+
private static searchTerm;
|
|
11793
|
+
private pages;
|
|
11794
|
+
private briefFromRow;
|
|
11795
|
+
private alertFromRow;
|
|
11796
|
+
private static taskFromRow;
|
|
11797
|
+
/** Who is signed in, and their teams. (Their own lines are not readable with a user login yet.) */
|
|
11798
|
+
me(): Promise<Me>;
|
|
11799
|
+
/** The teams (locations) this person can see. Management is listed with `kind: "management"`. */
|
|
11800
|
+
teams(): Promise<TeamRef[]>;
|
|
11801
|
+
/**
|
|
11802
|
+
* Calls, newest first, as briefs. Default: today. The window is at most 31 days and `limit` at most
|
|
11803
|
+
* 200. `number` and `search` share the API's one search field: pass one or the other.
|
|
11804
|
+
*/
|
|
11805
|
+
calls(options?: {
|
|
11806
|
+
day?: Date | string | null;
|
|
11807
|
+
since?: When | null;
|
|
11808
|
+
until?: When | null;
|
|
11809
|
+
team?: TeamSelector | null;
|
|
11810
|
+
number?: string | null;
|
|
11811
|
+
search?: string | null;
|
|
11812
|
+
limit?: number;
|
|
11813
|
+
}): Promise<CallBrief[]>;
|
|
11814
|
+
/**
|
|
11815
|
+
* One call: when, direction, parties, summary, key points, tasks, sentiment, topics and the alerts
|
|
11816
|
+
* it raised. No transcript and no recording.
|
|
11817
|
+
*/
|
|
11818
|
+
brief(callId: string): Promise<CallBrief>;
|
|
11819
|
+
/** The transcript of one call: segments with `time`, `speaker`, `name` and `text`. */
|
|
11820
|
+
transcript(callId: string): Promise<Rec[]>;
|
|
11821
|
+
/**
|
|
11822
|
+
* A link to the call's audio that expires, or null when the call has no recording. The SDK never
|
|
11823
|
+
* downloads the audio. Treat the link as a secret: never log or store it.
|
|
11824
|
+
*/
|
|
11825
|
+
recordingLink(callId: string): Promise<RecordingLink | null>;
|
|
11826
|
+
/** Recent briefs for one caller (the last 31 days), for use before a callback. `limit` at most 50. */
|
|
11827
|
+
callerHistory(number: string, options?: {
|
|
11828
|
+
limit?: number;
|
|
11829
|
+
}): Promise<CallBrief[]>;
|
|
11830
|
+
/** Open tasks (up to 200), each with the id of the call it came from. `due`: only tasks due that day. */
|
|
11831
|
+
openTasks(options?: {
|
|
11832
|
+
due?: Date | string | null;
|
|
11833
|
+
team?: TeamSelector | null;
|
|
11834
|
+
}): Promise<TaskBrief[]>;
|
|
11835
|
+
/**
|
|
11836
|
+
* Alerts on this person's teams, newest first. Default: today; at most 31 days and 200 alerts.
|
|
11837
|
+
* `status` is refused: the API has no alert status filter yet.
|
|
11838
|
+
*/
|
|
11839
|
+
alerts(options?: {
|
|
11840
|
+
since?: When | null;
|
|
11841
|
+
until?: When | null;
|
|
11842
|
+
team?: TeamSelector | null;
|
|
11843
|
+
status?: string | null;
|
|
11844
|
+
limit?: number;
|
|
11845
|
+
}): Promise<AlertBrief[]>;
|
|
11846
|
+
/** One alert with its call brief, or null when this login cannot see it. */
|
|
11847
|
+
alert(alertId: string): Promise<AlertBrief | null>;
|
|
11848
|
+
/**
|
|
11849
|
+
* For a manager: one team's counts, alerts, open tasks and briefs (up to 200) for a day or a window of
|
|
11850
|
+
* at most 31 days. Default: today.
|
|
11851
|
+
*/
|
|
11852
|
+
teamView(team: TeamSelector, options?: {
|
|
11853
|
+
day?: Date | string | null;
|
|
11854
|
+
since?: When | null;
|
|
11855
|
+
until?: When | null;
|
|
11856
|
+
}): Promise<TeamView>;
|
|
11857
|
+
/**
|
|
11858
|
+
* What customers are raising and which topics are rising. Default: the last 7 days; at most 31.
|
|
11859
|
+
* Needs Insights Hub access.
|
|
11860
|
+
*/
|
|
11861
|
+
topics(options?: {
|
|
11862
|
+
since?: When | null;
|
|
11863
|
+
until?: When | null;
|
|
11864
|
+
team?: TeamSelector | null;
|
|
11865
|
+
}): Promise<TopicsView>;
|
|
11866
|
+
/**
|
|
11867
|
+
* The id and its page in the app, for passing to another system in place of content. A string is
|
|
11868
|
+
* taken as a call id. The link uses the client's `appUrl` (default https://app.intelligence.cloud).
|
|
11869
|
+
*/
|
|
11870
|
+
reference(callOrAlert: CallBrief | AlertBrief | FirstAlertEvent | string): Reference;
|
|
11871
|
+
/** A typed First Alert event, beside `parseAfterCallEvent`. See `parseFirstAlertEvent`. */
|
|
11872
|
+
parseFirstAlertEvent(payload: Parameters<typeof parseFirstAlertEvent>[0]): FirstAlertEvent;
|
|
11873
|
+
}
|
|
11874
|
+
|
|
11363
11875
|
type S = components["schemas"];
|
|
11364
11876
|
type ProductKey = S["ProductKey"];
|
|
11365
11877
|
type Connector = S["Connector"];
|
|
11878
|
+
/** A running connector reports either of these. */
|
|
11879
|
+
declare const RUNNING: readonly ["active", "connected"];
|
|
11880
|
+
/** The app address that links to call and alert pages point to unless `appUrl` says otherwise. */
|
|
11881
|
+
declare const DEFAULT_APP_URL = "https://app.intelligence.cloud";
|
|
11366
11882
|
interface ConnectorWaitOptions {
|
|
11367
11883
|
/** Wait until the connector settles. Default true. */
|
|
11368
11884
|
wait?: boolean;
|
|
@@ -11377,16 +11893,22 @@ interface IntelligenceClientOptions extends ClientOptions {
|
|
|
11377
11893
|
* (admin logins get empty lists by design). Default true.
|
|
11378
11894
|
*/
|
|
11379
11895
|
checkRole?: boolean;
|
|
11896
|
+
/**
|
|
11897
|
+
* `client.conversations` shows caller numbers as their last four digits (and masks digit runs of
|
|
11898
|
+
* five or more inside names). Default true; false shows them in full.
|
|
11899
|
+
*/
|
|
11900
|
+
maskNumbers?: boolean;
|
|
11901
|
+
/** The app's address, for the links on call and alert briefs and `conversations.reference`. https only. Default `https://app.intelligence.cloud`. */
|
|
11902
|
+
appUrl?: string;
|
|
11380
11903
|
}
|
|
11381
11904
|
type ConnectorData = NonNullable<ResponseOf<"getConnector">["data"]>;
|
|
11382
11905
|
/**
|
|
11383
11906
|
* Intelligence Cloud partner API client. One client per credential.
|
|
11384
11907
|
*
|
|
11385
|
-
* - Customer lifecycle (
|
|
11386
|
-
* (`companies`, `locations`, `users`, …) and the
|
|
11387
|
-
*
|
|
11388
|
-
*
|
|
11389
|
-
* also on the client itself (`client.searchCalls(…)`).
|
|
11908
|
+
* - Customer lifecycle (administrator login): low-level namespaces mirroring the API reference
|
|
11909
|
+
* (`companies`, `locations`, `users`, …) and the account layer, `client.accounts`.
|
|
11910
|
+
* - A signed-in person's own calls, tasks and alerts (user login): `client.conversations`, and the
|
|
11911
|
+
* read helpers `client.intelligence.searchCalls(…)`, also on the client itself.
|
|
11390
11912
|
*
|
|
11391
11913
|
* const ic = new Client({ email: process.env.IC_EMAIL!, password: process.env.IC_PASSWORD! });
|
|
11392
11914
|
*/
|
|
@@ -11590,17 +12112,17 @@ declare class Client {
|
|
|
11590
12112
|
raiseOnError?: boolean;
|
|
11591
12113
|
}) => Promise<ConnectorData>;
|
|
11592
12114
|
/**
|
|
11593
|
-
* Create a connector (202) and, by default, wait until it is `active
|
|
12115
|
+
* Create a connector (202) and, by default, wait until it is running (`active` or `connected`).
|
|
11594
12116
|
* Throws `ConnectorError` with `stateReason` (e.g. `invalid_permissions`) when it ends in `error`.
|
|
11595
12117
|
*/
|
|
11596
12118
|
createConnector: (locationId: string, body: BodyOf<"createConnector">, o?: ConnectorWaitOptions) => Promise<{
|
|
11597
12119
|
data?: components["schemas"]["Connector"];
|
|
11598
12120
|
}>;
|
|
11599
|
-
/** Update a connector; when it reconnects (202), wait until it is
|
|
12121
|
+
/** Update a connector; when it reconnects (202), wait until it is running. */
|
|
11600
12122
|
updateConnector: (locationId: string, connectorId: string, body: BodyOf<"updateConnector">, o?: ConnectorWaitOptions) => Promise<{
|
|
11601
12123
|
data?: components["schemas"]["Connector"];
|
|
11602
12124
|
}>;
|
|
11603
|
-
/** Restart a connector and, by default, wait until it is `active` (ConnectorError on `error`). */
|
|
12125
|
+
/** Restart a connector and, by default, wait until it is running, `active` or `connected` (ConnectorError on `error`). */
|
|
11604
12126
|
reactivateConnector: (locationId: string, connectorId: string, o?: ConnectorWaitOptions) => Promise<{
|
|
11605
12127
|
data?: components["schemas"]["Connector"];
|
|
11606
12128
|
}>;
|
|
@@ -11941,8 +12463,14 @@ declare class Client {
|
|
|
11941
12463
|
};
|
|
11942
12464
|
/** Conversation intelligence helpers (frontline credentials). */
|
|
11943
12465
|
readonly intelligence: Intelligence;
|
|
11944
|
-
/**
|
|
11945
|
-
readonly
|
|
12466
|
+
/** Create and maintain customers: teams, people, lines, alerts (administrator login). */
|
|
12467
|
+
readonly accounts: Accounts;
|
|
12468
|
+
/** A signed-in person's own calls, tasks and alerts, with careful defaults (user login). */
|
|
12469
|
+
readonly conversations: Conversations;
|
|
12470
|
+
/** Whether `conversations` masks caller numbers. */
|
|
12471
|
+
readonly maskNumbers: boolean;
|
|
12472
|
+
/** The app's address for page links. */
|
|
12473
|
+
readonly appUrl: string;
|
|
11946
12474
|
constructor(options: IntelligenceClientOptions);
|
|
11947
12475
|
/** Ends ALL sessions of this user (web app and other jobs too). The SDK never calls it on its own. */
|
|
11948
12476
|
logout(): Promise<void>;
|
|
@@ -12214,87 +12742,6 @@ declare class Client {
|
|
|
12214
12742
|
})[];
|
|
12215
12743
|
}>;
|
|
12216
12744
|
testFirstAlertWebhook(locationId: string, url?: string): Promise<WebhookTestResult>;
|
|
12217
|
-
provisionSeatCustomer(...a: Parameters<Workflows["provisionSeatCustomer"]>): Promise<ProvisionResult>;
|
|
12218
|
-
getSeatCustomer(...a: Parameters<Workflows["getSeatCustomer"]>): Promise<SeatCustomer>;
|
|
12219
|
-
addFrontlineUser(...a: Parameters<Workflows["addFrontlineUser"]>): Promise<UserResult>;
|
|
12220
|
-
addManager(...a: Parameters<Workflows["addManager"]>): Promise<UserResult>;
|
|
12221
|
-
activateSeatAlerts(...a: Parameters<Workflows["activateSeatAlerts"]>): Promise<string[]>;
|
|
12222
|
-
changeUserExtension(...a: Parameters<Workflows["changeUserExtension"]>): Promise<ChangeResult>;
|
|
12223
|
-
removeUser(...a: Parameters<Workflows["removeUser"]>): Promise<RemoveResult>;
|
|
12224
|
-
listFrontlineUsers(...a: Parameters<Workflows["listFrontlineUsers"]>): Promise<SeatUser[]>;
|
|
12225
|
-
listManagers(...a: Parameters<Workflows["listManagers"]>): Promise<SeatUser[]>;
|
|
12226
|
-
addIntegrationUser(...a: Parameters<Workflows["addIntegrationUser"]>): Promise<UserResult>;
|
|
12227
|
-
listIntegrationUsers(...a: Parameters<Workflows["listIntegrationUsers"]>): Promise<SeatUser[]>;
|
|
12228
|
-
offboardCustomer(...a: Parameters<Workflows["offboardCustomer"]>): Promise<OffboardResult>;
|
|
12229
|
-
syncNumbers(...a: Parameters<Workflows["syncNumbers"]>): Promise<SyncResult>;
|
|
12230
|
-
}
|
|
12231
|
-
|
|
12232
|
-
/** The After Call `end_of_call_summary` event, as documented. */
|
|
12233
|
-
type AfterCallSummaryEvent = components["schemas"]["AfterCallSummaryEvent"];
|
|
12234
|
-
/** The largest webhook body the parser accepts by default (256 KB). Answer 413 to anything larger. */
|
|
12235
|
-
declare const MAX_EVENT_BYTES = 262144;
|
|
12236
|
-
/**
|
|
12237
|
-
* An event of a type this SDK does not handle. Answer 2xx and ignore it: new event types can be
|
|
12238
|
-
* added at any time.
|
|
12239
|
-
*/
|
|
12240
|
-
interface UnknownEvent {
|
|
12241
|
-
readonly kind: "unknown";
|
|
12242
|
-
/** The event's `type`, or null when it has none. */
|
|
12243
|
-
readonly type: string | null;
|
|
12244
|
-
readonly version: string | null;
|
|
12245
|
-
/** The parsed body, as received. */
|
|
12246
|
-
readonly raw: Record<string, unknown>;
|
|
12247
|
-
}
|
|
12248
|
-
/** True for an event of a type this SDK does not handle (answer 2xx and ignore it). */
|
|
12249
|
-
declare function isUnknownEvent(e: AfterCallSummaryEvent | UnknownEvent): e is UnknownEvent;
|
|
12250
|
-
/**
|
|
12251
|
-
* Parse and check an After Call webhook body. Accepts the raw body (string or bytes) or an
|
|
12252
|
-
* already-parsed object.
|
|
12253
|
-
*
|
|
12254
|
-
* - An `end_of_call_summary` event comes back with only the documented fields.
|
|
12255
|
-
* - Any other JSON object comes back as an `UnknownEvent` (check with `isUnknownEvent`): answer 2xx
|
|
12256
|
-
* and ignore it.
|
|
12257
|
-
* - Throws `PayloadTooLargeError` for a body over `maxBytes` (default 256 KB; answer 413) and
|
|
12258
|
-
* `WebhookPayloadError` for a body that isn't a JSON object or a malformed `end_of_call_summary`
|
|
12259
|
-
* (answer 400).
|
|
12260
|
-
*
|
|
12261
|
-
* Treat the event as a notification: read the call with `getCall(event.call.id)` before you write
|
|
12262
|
-
* anything from it into another system.
|
|
12263
|
-
*/
|
|
12264
|
-
declare function parseAfterCallEvent(body: string | Uint8Array | ArrayBuffer | Record<string, unknown>, options?: {
|
|
12265
|
-
maxBytes?: number;
|
|
12266
|
-
}): AfterCallSummaryEvent | UnknownEvent;
|
|
12267
|
-
/** Storage for `Deduplicator`. Swap in a shared store (a database or cache) for multi-instance deployments. */
|
|
12268
|
-
interface DedupStore {
|
|
12269
|
-
/** Return true if `key` was already recorded; otherwise record it and return false. Must be atomic. */
|
|
12270
|
-
checkAndAdd(key: string): boolean | Promise<boolean>;
|
|
12271
|
-
}
|
|
12272
|
-
/** In-memory LRU store (per process). */
|
|
12273
|
-
declare class MemoryDedupStore implements DedupStore {
|
|
12274
|
-
private readonly maxSize;
|
|
12275
|
-
private readonly keys;
|
|
12276
|
-
constructor(maxSize?: number);
|
|
12277
|
-
checkAndAdd(key: string): boolean;
|
|
12278
|
-
}
|
|
12279
|
-
/**
|
|
12280
|
-
* De-duplicate deliveries on `call.id` (After Call) or the alert id (First Alert). Retries and calls
|
|
12281
|
-
* with several legs can deliver the same call more than once.
|
|
12282
|
-
*
|
|
12283
|
-
* const dedup = new Deduplicator();
|
|
12284
|
-
* if (await dedup.isDuplicate(event.call.id)) return; // already handled
|
|
12285
|
-
*
|
|
12286
|
-
* The same name and meaning in every SDK: Python `is_duplicate`, PHP `isDuplicate`.
|
|
12287
|
-
*/
|
|
12288
|
-
declare class Deduplicator {
|
|
12289
|
-
private readonly store;
|
|
12290
|
-
constructor(options?: {
|
|
12291
|
-
maxSize?: number;
|
|
12292
|
-
store?: DedupStore;
|
|
12293
|
-
});
|
|
12294
|
-
/** True if this id was seen before. The first call for an id records it and returns false. */
|
|
12295
|
-
isDuplicate(id: string): Promise<boolean>;
|
|
12296
|
-
/** @deprecated Use `isDuplicate` (same result). */
|
|
12297
|
-
seen(id: string): Promise<boolean>;
|
|
12298
12745
|
}
|
|
12299
12746
|
|
|
12300
12747
|
/**
|
|
@@ -12318,4 +12765,4 @@ declare function digitsOnly(value: string): string;
|
|
|
12318
12765
|
*/
|
|
12319
12766
|
declare function alertNumber(value: string): string;
|
|
12320
12767
|
|
|
12321
|
-
export {
|
|
12768
|
+
export { ALWAYS_REMOVED_FIELDS, AccountError, Accounts, type ActivateResult, type AfterCallSummaryEvent, type AfterCallWebhook, type Alert, AlertBrief, type AlertSearch, type AlertSetting, type AlertSettings, type AlertsDashboard, ApiError, type ApiErrorExtra, AuthError, type BodyOf, CallBrief, type CallDetail, type CallListItem, type CallSearch, type CallsPage, type CallsSummary, Client, type ClientOptions, ConflictError, type Connector, ConnectorError, ConnectorSpec, ConnectorTimeoutError, type ConnectorWaitOptions, type Me as ConversationMe, Conversations, type Customer, type CustomerArg, type CustomerSpec, DEFAULT_APP_URL, DEFAULT_BASE_URL, type DedupStore, Deduplicator, EXTENSION_CONFLICT_MESSAGE, ExtensionMappingError, FileTokenStore, FilterError, FirstAlertEvent, FrontlineRequiredError, type InsightsDashboard, Intelligence, type IntelligenceClientOptions, IntelligenceCloudError, InvalidRequestError, type ItemOf, LICENSES, type License, type LicenseReport, type LineChange, MAX_EVENT_BYTES, MAX_HISTORY, MAX_LIMIT, MAX_LOCATION_IDS, MAX_NUMBERS, MAX_RETRY_AFTER_MS, MAX_WINDOW_DAYS, type Me$1 as Me, type Member, MemoryDedupStore, MemoryTokenStore, MfaRequiredError, NotFoundError, type OffboardResult, PRODUCT_KEYS, type Page, PasswordExpiredError, PayloadTooLargeError, type PersonSpec, type ProductKey, type QueryOf, RUNNING, RateLimitError, RecordingLink, type Reference, type RemoveResult, type ResponseOf, SDK_VERSION, type Sentiment, type SyncResult, type Task, TaskBrief, type TaskSearch, type TasksPage, type TasksSummary, type Team, type TeamArg, type TeamGroups, type TeamLinePlan, type TeamRef, type TeamRules, type TeamSelector, type TeamSpec, type TeamView, type TokenStore, type Tokens, type TopicCall, type TopicCallSearch, type TopicsView, type TranscriptLine, type UnknownEvent, ValidationError, WebhookPayloadError, type WebhookTestResult, type When, WrongLoginError, alertNumber, type components, digitsOnly, isUnknownEvent, maskName, maskNumber, type operations, parseAfterCallEvent, parseFirstAlertEvent, toRfc3339 };
|