@gravity-rail/sdk 0.14.0 → 0.16.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/dist/agui.cjs +13 -1
- package/dist/agui.cjs.map +1 -1
- package/dist/agui.d.cts +5 -1
- package/dist/agui.d.ts +5 -1
- package/dist/agui.js +12 -1
- package/dist/agui.js.map +1 -1
- package/dist/{chunk-V7ZKEH4V.js → chunk-2YLKG4TT.js} +1 -1
- package/dist/chunk-2YLKG4TT.js.map +1 -0
- package/dist/{chunk-K4MDFGMO.js → chunk-4B7T6MBH.js} +267 -8
- package/dist/chunk-4B7T6MBH.js.map +1 -0
- package/dist/{client-CKudWmUT.d.cts → client-3xYGmF3t.d.ts} +1335 -18
- package/dist/{client-EAvh7w0y.d.ts → client-BhO_UFFz.d.cts} +1335 -18
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +593 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +164 -9
- package/dist/index.d.ts +164 -9
- package/dist/index.js +334 -23
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +296 -7
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +301 -6
- package/dist/internal.d.ts +301 -6
- package/dist/internal.js +35 -2
- package/dist/internal.js.map +1 -1
- package/dist/{revision-state-BUBt9Rir.d.ts → revision-state-Dma10N9s.d.ts} +23 -3
- package/dist/{revision-state-CY4LBdfa.d.cts → revision-state-Dx8gCQIj.d.cts} +23 -3
- package/dist/schemas.cjs +44 -21
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +54 -23
- package/dist/schemas.d.ts +54 -23
- package/dist/schemas.js +42 -21
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-iRrM4SaF.d.cts → tasks-vupYoJgG.d.cts} +82 -15
- package/dist/{tasks-iRrM4SaF.d.ts → tasks-vupYoJgG.d.ts} +82 -15
- package/package.json +2 -2
- package/dist/chunk-K4MDFGMO.js.map +0 -1
- package/dist/chunk-V7ZKEH4V.js.map +0 -1
package/dist/internal.cjs
CHANGED
|
@@ -69,6 +69,7 @@ __export(internal_exports, {
|
|
|
69
69
|
CustomerActivityEventStatus: () => CustomerActivityEventStatus,
|
|
70
70
|
CustomerActivityReviewOutcome: () => CustomerActivityReviewOutcome,
|
|
71
71
|
CustomerActivitySeverity: () => CustomerActivitySeverity,
|
|
72
|
+
CustomerActivitySlaThresholdSource: () => CustomerActivitySlaThresholdSource,
|
|
72
73
|
CustomersApi: () => CustomersApi,
|
|
73
74
|
DEFAULT_CHAT_MODEL: () => DEFAULT_CHAT_MODEL,
|
|
74
75
|
DEFAULT_CUSTOM_VOICE_MODEL: () => DEFAULT_CUSTOM_VOICE_MODEL,
|
|
@@ -150,7 +151,10 @@ __export(internal_exports, {
|
|
|
150
151
|
PhiPostureReasonCode: () => PhiPostureReasonCode,
|
|
151
152
|
PhiPostureTransitionResponseTargetType: () => PhiPostureTransitionResponseTargetType,
|
|
152
153
|
PhoneNumbersApi: () => PhoneNumbersApi,
|
|
154
|
+
PilotRelationshipType: () => PilotRelationshipType,
|
|
155
|
+
PilotStage: () => PilotStage,
|
|
153
156
|
ProductType: () => ProductType,
|
|
157
|
+
PromoCodeStatus: () => PromoCodeStatus,
|
|
154
158
|
PromptsApi: () => PromptsApi,
|
|
155
159
|
PronunciationsApi: () => PronunciationsApi,
|
|
156
160
|
QUERY_VALUELESS_OPS: () => QUERY_VALUELESS_OPS,
|
|
@@ -198,6 +202,7 @@ __export(internal_exports, {
|
|
|
198
202
|
ToolkitsApi: () => ToolkitsApi,
|
|
199
203
|
VoiceApi: () => VoiceApi,
|
|
200
204
|
WIDGET_SLUGS: () => WIDGET_SLUGS,
|
|
205
|
+
WORKFLOW_IMPLICIT_USE_SCOPE: () => WORKFLOW_IMPLICIT_USE_SCOPE,
|
|
201
206
|
WorkflowAccessWarningResourceType: () => WorkflowAccessWarningResourceType,
|
|
202
207
|
WorkflowNotesApi: () => WorkflowNotesApi,
|
|
203
208
|
WorkflowResourceType: () => WorkflowAccessWarningResourceType,
|
|
@@ -239,6 +244,7 @@ __export(internal_exports, {
|
|
|
239
244
|
bindSupportRequestMethods: () => bindSupportRequestMethods,
|
|
240
245
|
bindTasksMethods: () => bindTasksMethods,
|
|
241
246
|
bindToolkitsMethods: () => bindToolkitsMethods,
|
|
247
|
+
bindTrackedLinksMethods: () => bindTrackedLinksMethods,
|
|
242
248
|
bindWorkflowsMethods: () => bindWorkflowsMethods,
|
|
243
249
|
bindWorkspacesMethods: () => bindWorkspacesMethods,
|
|
244
250
|
canPreviewVoice: () => canPreviewVoice,
|
|
@@ -274,6 +280,9 @@ __export(internal_exports, {
|
|
|
274
280
|
parseExperimentStatCount: () => parseExperimentStatCount,
|
|
275
281
|
parseOrgAuthChallenge: () => parseOrgAuthChallenge,
|
|
276
282
|
requiresAssistantParticipant: () => requiresAssistantParticipant,
|
|
283
|
+
roleCanUseWorkflow: () => roleCanUseWorkflow,
|
|
284
|
+
roleImplicitWorkflowUseScope: () => roleImplicitWorkflowUseScope,
|
|
285
|
+
roleWorkflowAccess: () => roleWorkflowAccess,
|
|
277
286
|
usesBuiltinAssistant: () => usesBuiltinAssistant,
|
|
278
287
|
validateFeatureDependencies: () => validateFeatureDependencies
|
|
279
288
|
});
|
|
@@ -320,6 +329,21 @@ function encodePermissions(permissions) {
|
|
|
320
329
|
if (permissions.delete) accessMode |= PERMISSION_DELETE;
|
|
321
330
|
return accessMode;
|
|
322
331
|
}
|
|
332
|
+
var WORKFLOW_IMPLICIT_USE_SCOPE = "workflows:admin";
|
|
333
|
+
function roleImplicitWorkflowUseScope(role) {
|
|
334
|
+
return (role.grantedScopes ?? []).includes(WORKFLOW_IMPLICIT_USE_SCOPE) ? WORKFLOW_IMPLICIT_USE_SCOPE : null;
|
|
335
|
+
}
|
|
336
|
+
function roleWorkflowAccess(role, workflowId) {
|
|
337
|
+
const viaScope = roleImplicitWorkflowUseScope(role);
|
|
338
|
+
if (viaScope) {
|
|
339
|
+
return { accessMode: PERMISSION_USE | PERMISSION_EDIT, viaScope };
|
|
340
|
+
}
|
|
341
|
+
const entry = (role.workflowAccess ?? []).find((wa) => wa.workflowId === workflowId);
|
|
342
|
+
return { accessMode: entry?.accessMode ?? PERMISSION_NONE, viaScope: null };
|
|
343
|
+
}
|
|
344
|
+
function roleCanUseWorkflow(role, workflowId) {
|
|
345
|
+
return (roleWorkflowAccess(role, workflowId).accessMode & PERMISSION_USE) !== 0;
|
|
346
|
+
}
|
|
323
347
|
var Scope = /* @__PURE__ */ ((Scope2) => {
|
|
324
348
|
Scope2["WORKSPACE_READ"] = "workspace:read";
|
|
325
349
|
Scope2["WORKSPACE_WRITE"] = "workspace:write";
|
|
@@ -473,11 +497,13 @@ var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
|
|
|
473
497
|
EventRuleEventType2["DATA_RECORD_UPDATED"] = "data_record:updated";
|
|
474
498
|
EventRuleEventType2["DATA_RECORD_CHANGED"] = "data_record:changed";
|
|
475
499
|
EventRuleEventType2["CHAT_CREATED"] = "chat:created";
|
|
500
|
+
EventRuleEventType2["CHAT_SUMMARY"] = "chat:summary";
|
|
476
501
|
EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
|
|
477
502
|
EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
|
|
478
503
|
EventRuleEventType2["ROUTINE_TRIGGERED"] = "routine:triggered";
|
|
479
504
|
EventRuleEventType2["ASSISTANT_MESSAGE"] = "workflow:assistant_message";
|
|
480
505
|
EventRuleEventType2["USER_MESSAGE"] = "workflow:user_message";
|
|
506
|
+
EventRuleEventType2["WORKFLOW_EXECUTE"] = "workflow:execute";
|
|
481
507
|
EventRuleEventType2["CALENDAR_EVENT_CREATED"] = "calendar_event:created";
|
|
482
508
|
EventRuleEventType2["CALENDAR_EVENT_UPDATED"] = "calendar_event:updated";
|
|
483
509
|
EventRuleEventType2["CALENDAR_EVENT_CANCELLED"] = "calendar_event:cancelled";
|
|
@@ -547,7 +573,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
|
|
|
547
573
|
WorkspaceFeature2["WEB_SEARCH"] = "web_search";
|
|
548
574
|
WorkspaceFeature2["CALENDAR"] = "calendar";
|
|
549
575
|
WorkspaceFeature2["EXPERIMENTS"] = "experiments";
|
|
550
|
-
WorkspaceFeature2["OPERATOR"] = "operator";
|
|
551
576
|
WorkspaceFeature2["GMAIL"] = "gmail";
|
|
552
577
|
WorkspaceFeature2["GCALENDAR"] = "gcalendar";
|
|
553
578
|
WorkspaceFeature2["GDRIVE"] = "gdrive";
|
|
@@ -927,6 +952,15 @@ var AbilityTypeSlugs = {
|
|
|
927
952
|
CEL_ROUTING: "system:cel_routing"
|
|
928
953
|
};
|
|
929
954
|
|
|
955
|
+
// src/types/generated/promo_code_service.ts
|
|
956
|
+
var PromoCodeStatus = {
|
|
957
|
+
active: "active",
|
|
958
|
+
scheduled: "scheduled",
|
|
959
|
+
expired: "expired",
|
|
960
|
+
inactive: "inactive",
|
|
961
|
+
exhausted: "exhausted"
|
|
962
|
+
};
|
|
963
|
+
|
|
930
964
|
// src/types/query-engine-types.ts
|
|
931
965
|
var QUERY_VALUELESS_OPS = /* @__PURE__ */ new Set([
|
|
932
966
|
"isEmpty",
|
|
@@ -980,6 +1014,10 @@ var CustomerActivitySeverity = {
|
|
|
980
1014
|
high: "high",
|
|
981
1015
|
critical: "critical"
|
|
982
1016
|
};
|
|
1017
|
+
var CustomerActivitySlaThresholdSource = {
|
|
1018
|
+
default: "default",
|
|
1019
|
+
request: "request"
|
|
1020
|
+
};
|
|
983
1021
|
|
|
984
1022
|
// src/types/generated/phi_posture.ts
|
|
985
1023
|
var PhiPolicyReason = {
|
|
@@ -1344,6 +1382,20 @@ var WorkflowAccessWarningResourceType = {
|
|
|
1344
1382
|
calendar: "calendar"
|
|
1345
1383
|
};
|
|
1346
1384
|
|
|
1385
|
+
// src/types/generated/pilot_program.ts
|
|
1386
|
+
var PilotRelationshipType = {
|
|
1387
|
+
direct_pilot: "direct_pilot",
|
|
1388
|
+
partner_channel: "partner_channel"
|
|
1389
|
+
};
|
|
1390
|
+
var PilotStage = {
|
|
1391
|
+
signed: "signed",
|
|
1392
|
+
live: "live",
|
|
1393
|
+
value_evidenced: "value_evidenced",
|
|
1394
|
+
converted: "converted",
|
|
1395
|
+
on_hold: "on_hold",
|
|
1396
|
+
churned: "churned"
|
|
1397
|
+
};
|
|
1398
|
+
|
|
1347
1399
|
// src/app-context.ts
|
|
1348
1400
|
function formatAppContextAsMarkdown(context) {
|
|
1349
1401
|
if (!context) {
|
|
@@ -2915,6 +2967,18 @@ var AIModelsApi = class extends BaseApiClient {
|
|
|
2915
2967
|
const url = queryString ? `ai-models/realtime?${queryString}` : "ai-models/realtime";
|
|
2916
2968
|
return this.fetch(url);
|
|
2917
2969
|
}
|
|
2970
|
+
/**
|
|
2971
|
+
* Get the voice presets offered by the simplified voice picker.
|
|
2972
|
+
*
|
|
2973
|
+
* A preset bundles a realtime speech-to-speech model with one of its native
|
|
2974
|
+
* voices and the settings recommended alongside it, so choosing a voice is
|
|
2975
|
+
* a single decision. Apply one by assigning its `config` wholesale; compare
|
|
2976
|
+
* against it to tell a preset selection from a customised ("Custom") one.
|
|
2977
|
+
* The full engine/voice/settings matrix lives on `getRealtimeModels`.
|
|
2978
|
+
*/
|
|
2979
|
+
async getVoicePresets() {
|
|
2980
|
+
return this.fetch("ai-models/voice-presets");
|
|
2981
|
+
}
|
|
2918
2982
|
/**
|
|
2919
2983
|
* Get available voice models with metadata
|
|
2920
2984
|
*/
|
|
@@ -3949,6 +4013,8 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
3949
4013
|
if (options.mine !== void 0) params.append("mine", options.mine.toString());
|
|
3950
4014
|
if (options.needsResponse !== void 0)
|
|
3951
4015
|
params.append("needsResponse", options.needsResponse.toString());
|
|
4016
|
+
if (options.needsResponseFirst !== void 0)
|
|
4017
|
+
params.append("needsResponseFirst", options.needsResponseFirst.toString());
|
|
3952
4018
|
if (options.paused !== void 0) params.append("paused", options.paused.toString());
|
|
3953
4019
|
if (options.archived !== void 0) params.append("archived", options.archived.toString());
|
|
3954
4020
|
if (options.channel) params.append("channel", options.channel);
|
|
@@ -3998,6 +4064,25 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
3998
4064
|
async getChat(wid, id) {
|
|
3999
4065
|
return this.fetch(`w/${wid}/chats/${id}`);
|
|
4000
4066
|
}
|
|
4067
|
+
/**
|
|
4068
|
+
* Create-chat preflight for SMS: is a conversation already live between this
|
|
4069
|
+
* workspace number and this member?
|
|
4070
|
+
*
|
|
4071
|
+
* An SMS conversation with a member is a single stream — inbound SMS resolves
|
|
4072
|
+
* to ONE current chat per (member phone, workspace phone) pair — so creating
|
|
4073
|
+
* a new SMS chat SUPERSEDES the existing one and the member's next reply
|
|
4074
|
+
* lands on the new chat. Callers use this to say so before committing.
|
|
4075
|
+
*
|
|
4076
|
+
* Read-only, `chats:read`, and PHI-safe by construction: status and timing
|
|
4077
|
+
* only, no message content and no chat title.
|
|
4078
|
+
*/
|
|
4079
|
+
async getCurrentSmsChat(wid, options) {
|
|
4080
|
+
const params = new URLSearchParams({
|
|
4081
|
+
memberId: options.memberId.toString(),
|
|
4082
|
+
phoneNumberId: options.phoneNumberId.toString()
|
|
4083
|
+
});
|
|
4084
|
+
return this.fetch(`w/${wid}/chats/current-sms?${params}`);
|
|
4085
|
+
}
|
|
4001
4086
|
/** Get token usage statistics for a chat. */
|
|
4002
4087
|
async getChatTokenUsage(wid, chatId) {
|
|
4003
4088
|
return this.fetch(`w/${wid}/chats/${chatId}/token-usage`);
|
|
@@ -4023,6 +4108,10 @@ var ChatsApi = class extends BaseApiClient {
|
|
|
4023
4108
|
`w/${wid}/chats/${chatId}/skills`
|
|
4024
4109
|
);
|
|
4025
4110
|
}
|
|
4111
|
+
/** List built-in skills that can be selected before starting a Manager Chat. */
|
|
4112
|
+
async getManagerSkills(wid) {
|
|
4113
|
+
return this.fetch(`w/${wid}/chats/manager/skills`);
|
|
4114
|
+
}
|
|
4026
4115
|
/** List chat IDs that need a response. */
|
|
4027
4116
|
async getChatsNeedsResponse(wid) {
|
|
4028
4117
|
return this.fetch(`w/${wid}/chats/needs-response`);
|
|
@@ -5643,9 +5732,9 @@ var DocumoFaxApi = class extends BaseApiClient {
|
|
|
5643
5732
|
params?.status?.forEach((value) => query.append("status", value));
|
|
5644
5733
|
if (params?.receivedAfter) query.set("receivedAfter", params.receivedAfter);
|
|
5645
5734
|
if (params?.receivedBefore) query.set("receivedBefore", params.receivedBefore);
|
|
5646
|
-
const
|
|
5735
|
+
const suffix2 = query.toString() === "" ? "" : `?${query.toString()}`;
|
|
5647
5736
|
return this.fetch(
|
|
5648
|
-
`w/${wid}/app-connections/documo-fax/faxes${
|
|
5737
|
+
`w/${wid}/app-connections/documo-fax/faxes${suffix2}`
|
|
5649
5738
|
);
|
|
5650
5739
|
}
|
|
5651
5740
|
/**
|
|
@@ -7719,15 +7808,19 @@ var OrgApi = class extends BaseApiClient {
|
|
|
7719
7808
|
async getA2PStatus(orgUuid) {
|
|
7720
7809
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/status`);
|
|
7721
7810
|
}
|
|
7811
|
+
/** Return fixed phone-number and outbound-messaging prices. */
|
|
7812
|
+
async getPhoneBillingPricing(orgUuid) {
|
|
7813
|
+
return this.fetch(`o/${orgUuid}/phone-numbers/pricing`);
|
|
7814
|
+
}
|
|
7722
7815
|
/**
|
|
7723
7816
|
* Start A2P brand registration under a legal entity. `legalEntityUuid`
|
|
7724
7817
|
* is required — brands register per legal entity (Customer Profile);
|
|
7725
7818
|
* there is no primary-entity fallback.
|
|
7726
7819
|
*/
|
|
7727
|
-
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandDescription) {
|
|
7820
|
+
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandDescription, brandUuid = null) {
|
|
7728
7821
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/start`, {
|
|
7729
7822
|
method: "POST",
|
|
7730
|
-
body: JSON.stringify({ legalEntityUuid, brandName, brandDescription })
|
|
7823
|
+
body: JSON.stringify({ legalEntityUuid, brandName, brandDescription, brandUuid })
|
|
7731
7824
|
});
|
|
7732
7825
|
}
|
|
7733
7826
|
/**
|
|
@@ -7933,14 +8026,34 @@ var OrgApi = class extends BaseApiClient {
|
|
|
7933
8026
|
);
|
|
7934
8027
|
}
|
|
7935
8028
|
/**
|
|
7936
|
-
* The brand
|
|
7937
|
-
*
|
|
8029
|
+
* The brand's enrollment-form template URL (carries `?brand=…`, no
|
|
8030
|
+
* credential). `url` is null until a Site is linked. Do not append a
|
|
8031
|
+
* patient identifier to this URL — use {@link mintA2PBrandEnrollmentLink}
|
|
8032
|
+
* to get a patient-ready link instead.
|
|
7938
8033
|
*/
|
|
7939
8034
|
async getA2PBrandEnrollmentUrl(orgUuid, brandUuid) {
|
|
7940
8035
|
return this.fetch(
|
|
7941
8036
|
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`
|
|
7942
8037
|
);
|
|
7943
8038
|
}
|
|
8039
|
+
/**
|
|
8040
|
+
* Mint a patient-ready enrollment link for one patient.
|
|
8041
|
+
*
|
|
8042
|
+
* The returned URL carries a fresh, expiring, single-use `?grant=…` bound to
|
|
8043
|
+
* the member that `externalId` resolves to. `externalId` (the patient's
|
|
8044
|
+
* CRM/EHR identifier) travels in the request body, never the query string,
|
|
8045
|
+
* so it stays out of access logs. When it matches no member, the
|
|
8046
|
+
* credential-free template URL is returned rather than an error.
|
|
8047
|
+
*/
|
|
8048
|
+
async mintA2PBrandEnrollmentLink(orgUuid, brandUuid, externalId) {
|
|
8049
|
+
return this.fetch(
|
|
8050
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`,
|
|
8051
|
+
{
|
|
8052
|
+
method: "POST",
|
|
8053
|
+
body: JSON.stringify({ externalId })
|
|
8054
|
+
}
|
|
8055
|
+
);
|
|
8056
|
+
}
|
|
7944
8057
|
/**
|
|
7945
8058
|
* List available member roles for a workspace in the organization.
|
|
7946
8059
|
*/
|
|
@@ -9770,6 +9883,118 @@ var ToolkitsApi = class extends BaseApiClient {
|
|
|
9770
9883
|
}
|
|
9771
9884
|
};
|
|
9772
9885
|
|
|
9886
|
+
// src/api/tracked-links.ts
|
|
9887
|
+
function withFilters(params, options) {
|
|
9888
|
+
if (options.dateFrom) params.append("dateFrom", options.dateFrom);
|
|
9889
|
+
if (options.dateTo) params.append("dateTo", options.dateTo);
|
|
9890
|
+
if (options.workflowId !== void 0) params.append("workflowId", String(options.workflowId));
|
|
9891
|
+
return params;
|
|
9892
|
+
}
|
|
9893
|
+
function suffix(params) {
|
|
9894
|
+
const query = params.toString();
|
|
9895
|
+
return query ? `?${query}` : "";
|
|
9896
|
+
}
|
|
9897
|
+
var TrackedLinksApi = class extends BaseApiClient {
|
|
9898
|
+
/** Header counters plus whether shortening is configured and enabled. */
|
|
9899
|
+
async getTrackedLinkSummary(wid, options = {}) {
|
|
9900
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
9901
|
+
return this.fetch(
|
|
9902
|
+
`w/${wid}/tracked-links/summary${suffix(params)}`
|
|
9903
|
+
);
|
|
9904
|
+
}
|
|
9905
|
+
/**
|
|
9906
|
+
* Known destination URLs, most recent first. Powers the "Clicked link"
|
|
9907
|
+
* member-filter autocomplete, so it stays unaggregated and cheap.
|
|
9908
|
+
*/
|
|
9909
|
+
async getTrackedLinkDestinations(wid, options = {}) {
|
|
9910
|
+
const params = new URLSearchParams();
|
|
9911
|
+
if (options.q) params.append("q", options.q);
|
|
9912
|
+
if (options.limit !== void 0) params.append("limit", String(options.limit));
|
|
9913
|
+
return this.fetch(
|
|
9914
|
+
`w/${wid}/tracked-links/destinations${suffix(params)}`
|
|
9915
|
+
);
|
|
9916
|
+
}
|
|
9917
|
+
/**
|
|
9918
|
+
* Register a destination an author can reference as `{{links.<key>}}`.
|
|
9919
|
+
*
|
|
9920
|
+
* The URL is deduplicated server-side, so registering one the workspace
|
|
9921
|
+
* already knows adopts that destination — including a row the retired
|
|
9922
|
+
* auto-harvest left unnamed, whose click history then carries forward
|
|
9923
|
+
* under the new key. Registering a URL that already has a *different* key
|
|
9924
|
+
* is a 409: renaming is what `updateTrackedLinkDestination` is for.
|
|
9925
|
+
*
|
|
9926
|
+
* Keys use the same grammar as snippet keys: lowercase letters, digits,
|
|
9927
|
+
* underscores and dots, starting with a letter (`intake_form`,
|
|
9928
|
+
* `docs.privacy`). No hyphens — Jinja2 reads `links.spring-2026` as
|
|
9929
|
+
* subtraction.
|
|
9930
|
+
*/
|
|
9931
|
+
async createTrackedLinkDestination(wid, data) {
|
|
9932
|
+
return this.fetch(`w/${wid}/tracked-links/destinations`, {
|
|
9933
|
+
method: "POST",
|
|
9934
|
+
body: JSON.stringify(data)
|
|
9935
|
+
});
|
|
9936
|
+
}
|
|
9937
|
+
/**
|
|
9938
|
+
* Re-key or relabel a destination.
|
|
9939
|
+
*
|
|
9940
|
+
* Changing `key` breaks templates: `{{links.old}}` stops resolving and the
|
|
9941
|
+
* message ships without its link. Relabelling (`name`) is always safe.
|
|
9942
|
+
* Passing `key: null` releases the handle so another destination can take
|
|
9943
|
+
* it — the non-destructive alternative to deleting, which would take the
|
|
9944
|
+
* click history with it. The URL is not editable.
|
|
9945
|
+
*/
|
|
9946
|
+
async updateTrackedLinkDestination(wid, destinationId, data) {
|
|
9947
|
+
return this.fetch(
|
|
9948
|
+
`w/${wid}/tracked-links/destinations/${destinationId}`,
|
|
9949
|
+
{ method: "PUT", body: JSON.stringify(data) }
|
|
9950
|
+
);
|
|
9951
|
+
}
|
|
9952
|
+
/** Per-destination sent / clicks / unique clickers / CTR for the window. */
|
|
9953
|
+
async getTrackedLinkStats(wid, options = {}) {
|
|
9954
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
9955
|
+
if (options.page !== void 0) params.append("page", String(options.page));
|
|
9956
|
+
if (options.pageSize !== void 0) params.append("pageSize", String(options.pageSize));
|
|
9957
|
+
if (options.q) params.append("q", options.q);
|
|
9958
|
+
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
9959
|
+
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
9960
|
+
return this.fetch(
|
|
9961
|
+
`w/${wid}/tracked-links${suffix(params)}`
|
|
9962
|
+
);
|
|
9963
|
+
}
|
|
9964
|
+
/** Clicks over time for the current filter selection. */
|
|
9965
|
+
async getTrackedLinkTimeseries(wid, options = {}) {
|
|
9966
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
9967
|
+
if (options.destinationId !== void 0) {
|
|
9968
|
+
params.append("destinationId", String(options.destinationId));
|
|
9969
|
+
}
|
|
9970
|
+
if (options.granularity) params.append("granularity", options.granularity);
|
|
9971
|
+
if (options.tz) params.append("tz", options.tz);
|
|
9972
|
+
return this.fetch(
|
|
9973
|
+
`w/${wid}/tracked-links/timeseries${suffix(params)}`
|
|
9974
|
+
);
|
|
9975
|
+
}
|
|
9976
|
+
/**
|
|
9977
|
+
* Delete one destination: its short links stop resolving and its recorded
|
|
9978
|
+
* clicks are removed.
|
|
9979
|
+
*
|
|
9980
|
+
* Turning the workspace setting off only stops NEW links being minted —
|
|
9981
|
+
* links already delivered to members keep working. This is the deliberate
|
|
9982
|
+
* way to break them.
|
|
9983
|
+
*/
|
|
9984
|
+
async deleteTrackedLinkDestination(wid, destinationId) {
|
|
9985
|
+
return this.fetch(
|
|
9986
|
+
`w/${wid}/tracked-links/destinations/${destinationId}`,
|
|
9987
|
+
{ method: "DELETE" }
|
|
9988
|
+
);
|
|
9989
|
+
}
|
|
9990
|
+
/** Delete every destination, its links, and its clicks. Irreversible. */
|
|
9991
|
+
async clearTrackedLinkDestinations(wid) {
|
|
9992
|
+
return this.fetch(`w/${wid}/tracked-links/destinations`, {
|
|
9993
|
+
method: "DELETE"
|
|
9994
|
+
});
|
|
9995
|
+
}
|
|
9996
|
+
};
|
|
9997
|
+
|
|
9773
9998
|
// src/api/journeys.ts
|
|
9774
9999
|
var JourneysApi = class extends BaseApiClient {
|
|
9775
10000
|
/**
|
|
@@ -10760,6 +10985,20 @@ var WorkspacesApi = class extends BaseApiClient {
|
|
|
10760
10985
|
if (featured !== void 0) params.set("featured", String(featured));
|
|
10761
10986
|
return this.fetch(`products?${params.toString()}`);
|
|
10762
10987
|
}
|
|
10988
|
+
/**
|
|
10989
|
+
* Check whether a promo code is usable, without redeeming it.
|
|
10990
|
+
*
|
|
10991
|
+
* Reserves nothing, so it is safe to call as a form field settles. Redemption
|
|
10992
|
+
* happens server-side after checkout completes, when the organization and its
|
|
10993
|
+
* subscription exist.
|
|
10994
|
+
*/
|
|
10995
|
+
async previewPromoCode(code, options) {
|
|
10996
|
+
return this.fetch("promo-codes/preview", {
|
|
10997
|
+
method: "POST",
|
|
10998
|
+
body: JSON.stringify({ code }),
|
|
10999
|
+
signal: options?.signal
|
|
11000
|
+
});
|
|
11001
|
+
}
|
|
10763
11002
|
/** Get a publicly accessible product by ID. */
|
|
10764
11003
|
async getPublicProduct(id) {
|
|
10765
11004
|
return this.fetch(`products/${id}`);
|
|
@@ -10916,6 +11155,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
|
|
|
10916
11155
|
members: new MembersApi(apiKey, baseUrl, customFetch),
|
|
10917
11156
|
milestones: new MilestonesApi(apiKey, baseUrl, customFetch),
|
|
10918
11157
|
motd: new MotdApi(apiKey, baseUrl, customFetch),
|
|
11158
|
+
trackedLinks: new TrackedLinksApi(apiKey, baseUrl, customFetch),
|
|
10919
11159
|
confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
|
|
10920
11160
|
mondayIntegration: new MondayIntegrationApi(apiKey, baseUrl, customFetch),
|
|
10921
11161
|
notificationRules: new NotificationRulesApi(apiKey, baseUrl, customFetch),
|
|
@@ -10981,6 +11221,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
10981
11221
|
"checkSiteSlugAvailability",
|
|
10982
11222
|
"clearConnectionMemberExclusion",
|
|
10983
11223
|
"clearMemberSwitch",
|
|
11224
|
+
"clearTrackedLinkDestinations",
|
|
10984
11225
|
"clickWorkspaceSupportRequestResource",
|
|
10985
11226
|
"cloneDataType",
|
|
10986
11227
|
"cloneTask",
|
|
@@ -11056,6 +11297,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
11056
11297
|
"createSupervisor",
|
|
11057
11298
|
"createTask",
|
|
11058
11299
|
"createTeamsApp",
|
|
11300
|
+
"createTrackedLinkDestination",
|
|
11059
11301
|
"createWorkflow",
|
|
11060
11302
|
"createWorkflowContributor",
|
|
11061
11303
|
"createWorkflowFromTemplate",
|
|
@@ -11121,6 +11363,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
11121
11363
|
"deleteSupervisor",
|
|
11122
11364
|
"deleteTask",
|
|
11123
11365
|
"deleteTeamsApp",
|
|
11366
|
+
"deleteTrackedLinkDestination",
|
|
11124
11367
|
"deleteWidgetDomain",
|
|
11125
11368
|
"deleteWorkflow",
|
|
11126
11369
|
"deleteWorkflowContributor",
|
|
@@ -11245,6 +11488,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
11245
11488
|
"getChatModelOverride",
|
|
11246
11489
|
"getChatPhoneCalls",
|
|
11247
11490
|
"getChatSkills",
|
|
11491
|
+
"getManagerSkills",
|
|
11248
11492
|
"getChatTodos",
|
|
11249
11493
|
"getChatTokenUsage",
|
|
11250
11494
|
"getChatToolCallMessages",
|
|
@@ -11260,6 +11504,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
11260
11504
|
"getConnectionSyncConfig",
|
|
11261
11505
|
"getCredentialUpdateInvites",
|
|
11262
11506
|
"getCurrentMember",
|
|
11507
|
+
"getCurrentSmsChat",
|
|
11263
11508
|
"getCustomToolkit",
|
|
11264
11509
|
"getCustomToolkits",
|
|
11265
11510
|
"getDashboard",
|
|
@@ -11424,6 +11669,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
11424
11669
|
"getPublicFolder",
|
|
11425
11670
|
"getPublicFolderFiles",
|
|
11426
11671
|
"getPublicProducts",
|
|
11672
|
+
"previewPromoCode",
|
|
11427
11673
|
"getQualification",
|
|
11428
11674
|
"getQualifications",
|
|
11429
11675
|
"getRecordingInfo",
|
|
@@ -11470,6 +11716,10 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
11470
11716
|
"getTool",
|
|
11471
11717
|
"getToolCallNames",
|
|
11472
11718
|
"getToolkits",
|
|
11719
|
+
"getTrackedLinkDestinations",
|
|
11720
|
+
"getTrackedLinkStats",
|
|
11721
|
+
"getTrackedLinkSummary",
|
|
11722
|
+
"getTrackedLinkTimeseries",
|
|
11473
11723
|
"getUnreadNotificationCount",
|
|
11474
11724
|
"getUsageDashboard",
|
|
11475
11725
|
"getVariableRegistry",
|
|
@@ -11704,6 +11954,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
11704
11954
|
"updateTask",
|
|
11705
11955
|
"updateTeamsApp",
|
|
11706
11956
|
"updateThemeSettings",
|
|
11957
|
+
"updateTrackedLinkDestination",
|
|
11707
11958
|
"uploadFile",
|
|
11708
11959
|
"updateVoicemailStatus",
|
|
11709
11960
|
"updateWorkflow",
|
|
@@ -11795,11 +12046,13 @@ function bindTasksMethods(target, tasks, abilities) {
|
|
|
11795
12046
|
function bindChatsMethods(target, chats) {
|
|
11796
12047
|
target.getChats = chats.getChats.bind(chats);
|
|
11797
12048
|
target.getChat = chats.getChat.bind(chats);
|
|
12049
|
+
target.getCurrentSmsChat = chats.getCurrentSmsChat.bind(chats);
|
|
11798
12050
|
target.getChatCallbacks = chats.getChatCallbacks.bind(chats);
|
|
11799
12051
|
target.cancelChatCallback = chats.cancelChatCallback.bind(chats);
|
|
11800
12052
|
target.getChatTokenUsage = chats.getChatTokenUsage.bind(chats);
|
|
11801
12053
|
target.getChatTodos = chats.getChatTodos.bind(chats);
|
|
11802
12054
|
target.getChatSkills = chats.getChatSkills.bind(chats);
|
|
12055
|
+
target.getManagerSkills = chats.getManagerSkills.bind(chats);
|
|
11803
12056
|
target.getChatsNeedsResponse = chats.getChatsNeedsResponse.bind(chats);
|
|
11804
12057
|
target.getChatsDailyCreationStats = chats.getChatsDailyCreationStats.bind(chats);
|
|
11805
12058
|
target.getToolCallNames = chats.getToolCallNames.bind(chats);
|
|
@@ -11873,6 +12126,18 @@ function bindMotdMethods(target, motd) {
|
|
|
11873
12126
|
target.getMotd = motd.getMotd.bind(motd);
|
|
11874
12127
|
}
|
|
11875
12128
|
|
|
12129
|
+
// src/client/bindings/tracked-links.ts
|
|
12130
|
+
function bindTrackedLinksMethods(target, trackedLinks) {
|
|
12131
|
+
target.getTrackedLinkSummary = trackedLinks.getTrackedLinkSummary.bind(trackedLinks);
|
|
12132
|
+
target.getTrackedLinkDestinations = trackedLinks.getTrackedLinkDestinations.bind(trackedLinks);
|
|
12133
|
+
target.getTrackedLinkStats = trackedLinks.getTrackedLinkStats.bind(trackedLinks);
|
|
12134
|
+
target.getTrackedLinkTimeseries = trackedLinks.getTrackedLinkTimeseries.bind(trackedLinks);
|
|
12135
|
+
target.createTrackedLinkDestination = trackedLinks.createTrackedLinkDestination.bind(trackedLinks);
|
|
12136
|
+
target.updateTrackedLinkDestination = trackedLinks.updateTrackedLinkDestination.bind(trackedLinks);
|
|
12137
|
+
target.deleteTrackedLinkDestination = trackedLinks.deleteTrackedLinkDestination.bind(trackedLinks);
|
|
12138
|
+
target.clearTrackedLinkDestinations = trackedLinks.clearTrackedLinkDestinations.bind(trackedLinks);
|
|
12139
|
+
}
|
|
12140
|
+
|
|
11876
12141
|
// src/client/bindings/data-types.ts
|
|
11877
12142
|
function bindDataTypesMethods(target, dataTypes) {
|
|
11878
12143
|
target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
|
|
@@ -12368,6 +12633,7 @@ function bindToolkitsMethods(target, toolkits, templates, aiModels, customToolki
|
|
|
12368
12633
|
target.getSTTModels = aiModels.getSTTModels.bind(aiModels);
|
|
12369
12634
|
target.getTTSModels = aiModels.getTTSModels.bind(aiModels);
|
|
12370
12635
|
target.getVoiceModels = aiModels.getVoiceModels.bind(aiModels);
|
|
12636
|
+
target.getVoicePresets = aiModels.getVoicePresets.bind(aiModels);
|
|
12371
12637
|
target.getAllModels = aiModels.getAllModels.bind(aiModels);
|
|
12372
12638
|
target.getCustomToolkits = customToolkits.getCustomToolkits.bind(customToolkits);
|
|
12373
12639
|
target.getCustomToolkit = customToolkits.getCustomToolkit.bind(customToolkits);
|
|
@@ -12833,11 +13099,13 @@ var GravityRailClient = class {
|
|
|
12833
13099
|
// Chats API
|
|
12834
13100
|
getChats;
|
|
12835
13101
|
getChat;
|
|
13102
|
+
getCurrentSmsChat;
|
|
12836
13103
|
getChatCallbacks;
|
|
12837
13104
|
cancelChatCallback;
|
|
12838
13105
|
getChatTokenUsage;
|
|
12839
13106
|
getChatTodos;
|
|
12840
13107
|
getChatSkills;
|
|
13108
|
+
getManagerSkills;
|
|
12841
13109
|
getChatsNeedsResponse;
|
|
12842
13110
|
getChatsDailyCreationStats;
|
|
12843
13111
|
getToolCallNames;
|
|
@@ -13025,6 +13293,15 @@ var GravityRailClient = class {
|
|
|
13025
13293
|
getDashboardWorkflowAssignmentStats;
|
|
13026
13294
|
// MOTD API
|
|
13027
13295
|
getMotd;
|
|
13296
|
+
// Tracked Links analytics (#10934)
|
|
13297
|
+
getTrackedLinkSummary;
|
|
13298
|
+
getTrackedLinkDestinations;
|
|
13299
|
+
getTrackedLinkStats;
|
|
13300
|
+
getTrackedLinkTimeseries;
|
|
13301
|
+
createTrackedLinkDestination;
|
|
13302
|
+
updateTrackedLinkDestination;
|
|
13303
|
+
deleteTrackedLinkDestination;
|
|
13304
|
+
clearTrackedLinkDestinations;
|
|
13028
13305
|
// Journeys API
|
|
13029
13306
|
getJourneys;
|
|
13030
13307
|
getJourney;
|
|
@@ -13129,6 +13406,7 @@ var GravityRailClient = class {
|
|
|
13129
13406
|
getProduct;
|
|
13130
13407
|
getWorkspaceProduct;
|
|
13131
13408
|
getPublicProducts;
|
|
13409
|
+
previewPromoCode;
|
|
13132
13410
|
getPublicProduct;
|
|
13133
13411
|
createProduct;
|
|
13134
13412
|
updateProduct;
|
|
@@ -13483,6 +13761,7 @@ var GravityRailClient = class {
|
|
|
13483
13761
|
getSTTModels;
|
|
13484
13762
|
getTTSModels;
|
|
13485
13763
|
getVoiceModels;
|
|
13764
|
+
getVoicePresets;
|
|
13486
13765
|
getAllModels;
|
|
13487
13766
|
getCustomToolkits;
|
|
13488
13767
|
getCustomToolkit;
|
|
@@ -13813,6 +14092,7 @@ var GravityRailClient = class {
|
|
|
13813
14092
|
bindQueriesMethods(this, apis.queries);
|
|
13814
14093
|
bindDashboardsMethods(this, apis.dashboards);
|
|
13815
14094
|
bindMotdMethods(this, apis.motd);
|
|
14095
|
+
bindTrackedLinksMethods(this, apis.trackedLinks);
|
|
13816
14096
|
bindJourneysMethods(this, apis.journeys);
|
|
13817
14097
|
bindExperimentsMethods(this, apis.experiments);
|
|
13818
14098
|
bindOperatorMethods(this, apis.operatorGroups);
|
|
@@ -14020,6 +14300,7 @@ var GravityRailClient = class {
|
|
|
14020
14300
|
CustomerActivityEventStatus,
|
|
14021
14301
|
CustomerActivityReviewOutcome,
|
|
14022
14302
|
CustomerActivitySeverity,
|
|
14303
|
+
CustomerActivitySlaThresholdSource,
|
|
14023
14304
|
CustomersApi,
|
|
14024
14305
|
DEFAULT_CHAT_MODEL,
|
|
14025
14306
|
DEFAULT_CUSTOM_VOICE_MODEL,
|
|
@@ -14101,7 +14382,10 @@ var GravityRailClient = class {
|
|
|
14101
14382
|
PhiPostureReasonCode,
|
|
14102
14383
|
PhiPostureTransitionResponseTargetType,
|
|
14103
14384
|
PhoneNumbersApi,
|
|
14385
|
+
PilotRelationshipType,
|
|
14386
|
+
PilotStage,
|
|
14104
14387
|
ProductType,
|
|
14388
|
+
PromoCodeStatus,
|
|
14105
14389
|
PromptsApi,
|
|
14106
14390
|
PronunciationsApi,
|
|
14107
14391
|
QUERY_VALUELESS_OPS,
|
|
@@ -14149,6 +14433,7 @@ var GravityRailClient = class {
|
|
|
14149
14433
|
ToolkitsApi,
|
|
14150
14434
|
VoiceApi,
|
|
14151
14435
|
WIDGET_SLUGS,
|
|
14436
|
+
WORKFLOW_IMPLICIT_USE_SCOPE,
|
|
14152
14437
|
WorkflowAccessWarningResourceType,
|
|
14153
14438
|
WorkflowNotesApi,
|
|
14154
14439
|
WorkflowResourceType,
|
|
@@ -14190,6 +14475,7 @@ var GravityRailClient = class {
|
|
|
14190
14475
|
bindSupportRequestMethods,
|
|
14191
14476
|
bindTasksMethods,
|
|
14192
14477
|
bindToolkitsMethods,
|
|
14478
|
+
bindTrackedLinksMethods,
|
|
14193
14479
|
bindWorkflowsMethods,
|
|
14194
14480
|
bindWorkspacesMethods,
|
|
14195
14481
|
canPreviewVoice,
|
|
@@ -14225,6 +14511,9 @@ var GravityRailClient = class {
|
|
|
14225
14511
|
parseExperimentStatCount,
|
|
14226
14512
|
parseOrgAuthChallenge,
|
|
14227
14513
|
requiresAssistantParticipant,
|
|
14514
|
+
roleCanUseWorkflow,
|
|
14515
|
+
roleImplicitWorkflowUseScope,
|
|
14516
|
+
roleWorkflowAccess,
|
|
14228
14517
|
usesBuiltinAssistant,
|
|
14229
14518
|
validateFeatureDependencies
|
|
14230
14519
|
});
|