@gravity-rail/cli 0.15.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/gr.js +287 -21
- package/dist/gr.js.map +1 -1
- package/dist/lib.js +72 -7
- package/dist/lib.js.map +1 -1
- package/package.json +3 -3
package/dist/gr.js
CHANGED
|
@@ -3213,7 +3213,7 @@ var init_libphonenumber_js = __esm({
|
|
|
3213
3213
|
}
|
|
3214
3214
|
});
|
|
3215
3215
|
|
|
3216
|
-
// ../sdk/dist/chunk-
|
|
3216
|
+
// ../sdk/dist/chunk-4B7T6MBH.js
|
|
3217
3217
|
function sanitizePhoneForBackend(phoneNumber) {
|
|
3218
3218
|
try {
|
|
3219
3219
|
let parsed = parsePhoneNumber4(phoneNumber);
|
|
@@ -3336,6 +3336,16 @@ function supportRequestParams(params) {
|
|
|
3336
3336
|
const query = searchParams.toString();
|
|
3337
3337
|
return query ? `?${query}` : "";
|
|
3338
3338
|
}
|
|
3339
|
+
function withFilters(params, options) {
|
|
3340
|
+
if (options.dateFrom) params.append("dateFrom", options.dateFrom);
|
|
3341
|
+
if (options.dateTo) params.append("dateTo", options.dateTo);
|
|
3342
|
+
if (options.workflowId !== void 0) params.append("workflowId", String(options.workflowId));
|
|
3343
|
+
return params;
|
|
3344
|
+
}
|
|
3345
|
+
function suffix(params) {
|
|
3346
|
+
const query = params.toString();
|
|
3347
|
+
return query ? `?${query}` : "";
|
|
3348
|
+
}
|
|
3339
3349
|
function createApiModules(apiKey, baseUrl3, customFetch) {
|
|
3340
3350
|
return {
|
|
3341
3351
|
abilities: new AbilitiesApi(apiKey, baseUrl3, customFetch),
|
|
@@ -3378,6 +3388,7 @@ function createApiModules(apiKey, baseUrl3, customFetch) {
|
|
|
3378
3388
|
members: new MembersApi(apiKey, baseUrl3, customFetch),
|
|
3379
3389
|
milestones: new MilestonesApi(apiKey, baseUrl3, customFetch),
|
|
3380
3390
|
motd: new MotdApi(apiKey, baseUrl3, customFetch),
|
|
3391
|
+
trackedLinks: new TrackedLinksApi(apiKey, baseUrl3, customFetch),
|
|
3381
3392
|
confluence: new ConfluenceApi(apiKey, baseUrl3, customFetch),
|
|
3382
3393
|
mondayIntegration: new MondayIntegrationApi(apiKey, baseUrl3, customFetch),
|
|
3383
3394
|
notificationRules: new NotificationRulesApi(apiKey, baseUrl3, customFetch),
|
|
@@ -3475,6 +3486,7 @@ function bindChatsMethods(target, chats) {
|
|
|
3475
3486
|
target.getChatTokenUsage = chats.getChatTokenUsage.bind(chats);
|
|
3476
3487
|
target.getChatTodos = chats.getChatTodos.bind(chats);
|
|
3477
3488
|
target.getChatSkills = chats.getChatSkills.bind(chats);
|
|
3489
|
+
target.getManagerSkills = chats.getManagerSkills.bind(chats);
|
|
3478
3490
|
target.getChatsNeedsResponse = chats.getChatsNeedsResponse.bind(chats);
|
|
3479
3491
|
target.getChatsDailyCreationStats = chats.getChatsDailyCreationStats.bind(chats);
|
|
3480
3492
|
target.getToolCallNames = chats.getToolCallNames.bind(chats);
|
|
@@ -3541,6 +3553,16 @@ function bindDashboardsMethods(target, dashboards) {
|
|
|
3541
3553
|
function bindMotdMethods(target, motd) {
|
|
3542
3554
|
target.getMotd = motd.getMotd.bind(motd);
|
|
3543
3555
|
}
|
|
3556
|
+
function bindTrackedLinksMethods(target, trackedLinks) {
|
|
3557
|
+
target.getTrackedLinkSummary = trackedLinks.getTrackedLinkSummary.bind(trackedLinks);
|
|
3558
|
+
target.getTrackedLinkDestinations = trackedLinks.getTrackedLinkDestinations.bind(trackedLinks);
|
|
3559
|
+
target.getTrackedLinkStats = trackedLinks.getTrackedLinkStats.bind(trackedLinks);
|
|
3560
|
+
target.getTrackedLinkTimeseries = trackedLinks.getTrackedLinkTimeseries.bind(trackedLinks);
|
|
3561
|
+
target.createTrackedLinkDestination = trackedLinks.createTrackedLinkDestination.bind(trackedLinks);
|
|
3562
|
+
target.updateTrackedLinkDestination = trackedLinks.updateTrackedLinkDestination.bind(trackedLinks);
|
|
3563
|
+
target.deleteTrackedLinkDestination = trackedLinks.deleteTrackedLinkDestination.bind(trackedLinks);
|
|
3564
|
+
target.clearTrackedLinkDestinations = trackedLinks.clearTrackedLinkDestinations.bind(trackedLinks);
|
|
3565
|
+
}
|
|
3544
3566
|
function bindDataTypesMethods(target, dataTypes) {
|
|
3545
3567
|
target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
|
|
3546
3568
|
target.getDataType = dataTypes.getDataType.bind(dataTypes);
|
|
@@ -4013,6 +4035,7 @@ function bindToolkitsMethods(target, toolkits, templates, aiModels, customToolki
|
|
|
4013
4035
|
target.getSTTModels = aiModels.getSTTModels.bind(aiModels);
|
|
4014
4036
|
target.getTTSModels = aiModels.getTTSModels.bind(aiModels);
|
|
4015
4037
|
target.getVoiceModels = aiModels.getVoiceModels.bind(aiModels);
|
|
4038
|
+
target.getVoicePresets = aiModels.getVoicePresets.bind(aiModels);
|
|
4016
4039
|
target.getAllModels = aiModels.getAllModels.bind(aiModels);
|
|
4017
4040
|
target.getCustomToolkits = customToolkits.getCustomToolkits.bind(customToolkits);
|
|
4018
4041
|
target.getCustomToolkit = customToolkits.getCustomToolkit.bind(customToolkits);
|
|
@@ -4424,9 +4447,9 @@ function bindSupportRequestMethods(target, supportRequests) {
|
|
|
4424
4447
|
target.reopenWorkspaceSupportRequest = supportRequests.reopenWorkspaceSupportRequest.bind(supportRequests);
|
|
4425
4448
|
target.clickWorkspaceSupportRequestResource = supportRequests.clickWorkspaceSupportRequestResource.bind(supportRequests);
|
|
4426
4449
|
}
|
|
4427
|
-
var AbilitiesApi, AccessGrantsApi, AgentTasksApi, AgentsApi, AIModelsApi, ApiKeysApi, AppsApi, AssignmentsApi, VoiceApi, AuthApi, BuildersApi, CalendarsApi, CallsApi, CELApi, ChatsApi, ConfluenceApi, CustomToolkitsApi, DataTypesApi, DiscordBotsApi, SlackAppsApi, EventsApi, FeaturesApi, FhirConnectionsApi, InboundFaxStatus, DocumoFaxApi, HealthieApi, FilesApi, InboxesApi, InquiriesApi, AppConnectionsApi, McpServersApi, MemberImportValidationError, MembersApi, MilestonesApi, MondayIntegrationApi, NotificationRulesApi, OperatorApi, OrgApi, OAuthConnectionsApi, OAuthApi, PhoneNumbersApi, PronunciationsApi, PromptsApi, PersonasApi, QueriesApi, QualificationsApi, ReportsApi, SalesforceApi, ConnectionSyncApi, HubspotApi, SitesApi, SubscriptionsApi, SupportRequestsApi, CustomersApi, ResellersApi, SupervisorsApi, TasksApi, TemplatesApi, ToolkitsApi, JourneysApi, WorkflowsApi, WorkflowNotesApi, EventRuleEventType, DriverMode, WorkspaceInvitationsApi, WorkspacesApi, DashboardsApi, TeamsAppsApi, ExperimentsApi, PatientSyncConnectionsApi, MotdApi, WORKSPACE_METHOD_NAMES, WORKSPACE_METHOD_NAME_SET, GravityRailClient, WIDGET_SLUGS, CHAT_TYPES, BUILTIN_ASSISTANT_CHAT_TYPES, MEMBER_AGENT_CHAT_TYPES;
|
|
4428
|
-
var
|
|
4429
|
-
"../sdk/dist/chunk-
|
|
4450
|
+
var AbilitiesApi, AccessGrantsApi, AgentTasksApi, AgentsApi, AIModelsApi, ApiKeysApi, AppsApi, AssignmentsApi, VoiceApi, AuthApi, BuildersApi, CalendarsApi, CallsApi, CELApi, ChatsApi, ConfluenceApi, CustomToolkitsApi, DataTypesApi, DiscordBotsApi, SlackAppsApi, EventsApi, FeaturesApi, FhirConnectionsApi, InboundFaxStatus, DocumoFaxApi, HealthieApi, FilesApi, InboxesApi, InquiriesApi, AppConnectionsApi, McpServersApi, MemberImportValidationError, MembersApi, MilestonesApi, MondayIntegrationApi, NotificationRulesApi, OperatorApi, OrgApi, OAuthConnectionsApi, OAuthApi, PhoneNumbersApi, PronunciationsApi, PromptsApi, PersonasApi, QueriesApi, QualificationsApi, ReportsApi, SalesforceApi, ConnectionSyncApi, HubspotApi, SitesApi, SubscriptionsApi, SupportRequestsApi, CustomersApi, ResellersApi, SupervisorsApi, TasksApi, TemplatesApi, ToolkitsApi, JourneysApi, WorkflowsApi, WorkflowNotesApi, EventRuleEventType, DriverMode, WorkspaceInvitationsApi, WorkspacesApi, DashboardsApi, TeamsAppsApi, ExperimentsApi, PatientSyncConnectionsApi, MotdApi, TrackedLinksApi, WORKSPACE_METHOD_NAMES, WORKSPACE_METHOD_NAME_SET, GravityRailClient, WIDGET_SLUGS, CHAT_TYPES, BUILTIN_ASSISTANT_CHAT_TYPES, MEMBER_AGENT_CHAT_TYPES;
|
|
4451
|
+
var init_chunk_4B7T6MBH = __esm({
|
|
4452
|
+
"../sdk/dist/chunk-4B7T6MBH.js"() {
|
|
4430
4453
|
init_chunk_GP6ICMWF();
|
|
4431
4454
|
init_libphonenumber_js();
|
|
4432
4455
|
AbilitiesApi = class extends BaseApiClient {
|
|
@@ -4685,6 +4708,18 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
4685
4708
|
const url = queryString ? `ai-models/realtime?${queryString}` : "ai-models/realtime";
|
|
4686
4709
|
return this.fetch(url);
|
|
4687
4710
|
}
|
|
4711
|
+
/**
|
|
4712
|
+
* Get the voice presets offered by the simplified voice picker.
|
|
4713
|
+
*
|
|
4714
|
+
* A preset bundles a realtime speech-to-speech model with one of its native
|
|
4715
|
+
* voices and the settings recommended alongside it, so choosing a voice is
|
|
4716
|
+
* a single decision. Apply one by assigning its `config` wholesale; compare
|
|
4717
|
+
* against it to tell a preset selection from a customised ("Custom") one.
|
|
4718
|
+
* The full engine/voice/settings matrix lives on `getRealtimeModels`.
|
|
4719
|
+
*/
|
|
4720
|
+
async getVoicePresets() {
|
|
4721
|
+
return this.fetch("ai-models/voice-presets");
|
|
4722
|
+
}
|
|
4688
4723
|
/**
|
|
4689
4724
|
* Get available voice models with metadata
|
|
4690
4725
|
*/
|
|
@@ -5780,6 +5815,10 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
5780
5815
|
`w/${wid}/chats/${chatId}/skills`
|
|
5781
5816
|
);
|
|
5782
5817
|
}
|
|
5818
|
+
/** List built-in skills that can be selected before starting a Manager Chat. */
|
|
5819
|
+
async getManagerSkills(wid) {
|
|
5820
|
+
return this.fetch(`w/${wid}/chats/manager/skills`);
|
|
5821
|
+
}
|
|
5783
5822
|
/** List chat IDs that need a response. */
|
|
5784
5823
|
async getChatsNeedsResponse(wid) {
|
|
5785
5824
|
return this.fetch(`w/${wid}/chats/needs-response`);
|
|
@@ -7165,9 +7204,9 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
7165
7204
|
params?.status?.forEach((value) => query.append("status", value));
|
|
7166
7205
|
if (params?.receivedAfter) query.set("receivedAfter", params.receivedAfter);
|
|
7167
7206
|
if (params?.receivedBefore) query.set("receivedBefore", params.receivedBefore);
|
|
7168
|
-
const
|
|
7207
|
+
const suffix2 = query.toString() === "" ? "" : `?${query.toString()}`;
|
|
7169
7208
|
return this.fetch(
|
|
7170
|
-
`w/${wid}/app-connections/documo-fax/faxes${
|
|
7209
|
+
`w/${wid}/app-connections/documo-fax/faxes${suffix2}`
|
|
7171
7210
|
);
|
|
7172
7211
|
}
|
|
7173
7212
|
/**
|
|
@@ -9149,15 +9188,19 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
9149
9188
|
async getA2PStatus(orgUuid) {
|
|
9150
9189
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/status`);
|
|
9151
9190
|
}
|
|
9191
|
+
/** Return fixed phone-number and outbound-messaging prices. */
|
|
9192
|
+
async getPhoneBillingPricing(orgUuid) {
|
|
9193
|
+
return this.fetch(`o/${orgUuid}/phone-numbers/pricing`);
|
|
9194
|
+
}
|
|
9152
9195
|
/**
|
|
9153
9196
|
* Start A2P brand registration under a legal entity. `legalEntityUuid`
|
|
9154
9197
|
* is required — brands register per legal entity (Customer Profile);
|
|
9155
9198
|
* there is no primary-entity fallback.
|
|
9156
9199
|
*/
|
|
9157
|
-
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandDescription) {
|
|
9200
|
+
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandDescription, brandUuid = null) {
|
|
9158
9201
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/start`, {
|
|
9159
9202
|
method: "POST",
|
|
9160
|
-
body: JSON.stringify({ legalEntityUuid, brandName, brandDescription })
|
|
9203
|
+
body: JSON.stringify({ legalEntityUuid, brandName, brandDescription, brandUuid })
|
|
9161
9204
|
});
|
|
9162
9205
|
}
|
|
9163
9206
|
/**
|
|
@@ -9363,14 +9406,34 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
9363
9406
|
);
|
|
9364
9407
|
}
|
|
9365
9408
|
/**
|
|
9366
|
-
* The brand
|
|
9367
|
-
*
|
|
9409
|
+
* The brand's enrollment-form template URL (carries `?brand=…`, no
|
|
9410
|
+
* credential). `url` is null until a Site is linked. Do not append a
|
|
9411
|
+
* patient identifier to this URL — use {@link mintA2PBrandEnrollmentLink}
|
|
9412
|
+
* to get a patient-ready link instead.
|
|
9368
9413
|
*/
|
|
9369
9414
|
async getA2PBrandEnrollmentUrl(orgUuid, brandUuid) {
|
|
9370
9415
|
return this.fetch(
|
|
9371
9416
|
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`
|
|
9372
9417
|
);
|
|
9373
9418
|
}
|
|
9419
|
+
/**
|
|
9420
|
+
* Mint a patient-ready enrollment link for one patient.
|
|
9421
|
+
*
|
|
9422
|
+
* The returned URL carries a fresh, expiring, single-use `?grant=…` bound to
|
|
9423
|
+
* the member that `externalId` resolves to. `externalId` (the patient's
|
|
9424
|
+
* CRM/EHR identifier) travels in the request body, never the query string,
|
|
9425
|
+
* so it stays out of access logs. When it matches no member, the
|
|
9426
|
+
* credential-free template URL is returned rather than an error.
|
|
9427
|
+
*/
|
|
9428
|
+
async mintA2PBrandEnrollmentLink(orgUuid, brandUuid, externalId) {
|
|
9429
|
+
return this.fetch(
|
|
9430
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`,
|
|
9431
|
+
{
|
|
9432
|
+
method: "POST",
|
|
9433
|
+
body: JSON.stringify({ externalId })
|
|
9434
|
+
}
|
|
9435
|
+
);
|
|
9436
|
+
}
|
|
9374
9437
|
/**
|
|
9375
9438
|
* List available member roles for a workspace in the organization.
|
|
9376
9439
|
*/
|
|
@@ -11696,6 +11759,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
11696
11759
|
EventRuleEventType2["DATA_RECORD_UPDATED"] = "data_record:updated";
|
|
11697
11760
|
EventRuleEventType2["DATA_RECORD_CHANGED"] = "data_record:changed";
|
|
11698
11761
|
EventRuleEventType2["CHAT_CREATED"] = "chat:created";
|
|
11762
|
+
EventRuleEventType2["CHAT_SUMMARY"] = "chat:summary";
|
|
11699
11763
|
EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
|
|
11700
11764
|
EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
|
|
11701
11765
|
EventRuleEventType2["ROUTINE_TRIGGERED"] = "routine:triggered";
|
|
@@ -12098,6 +12162,20 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12098
12162
|
if (featured !== void 0) params.set("featured", String(featured));
|
|
12099
12163
|
return this.fetch(`products?${params.toString()}`);
|
|
12100
12164
|
}
|
|
12165
|
+
/**
|
|
12166
|
+
* Check whether a promo code is usable, without redeeming it.
|
|
12167
|
+
*
|
|
12168
|
+
* Reserves nothing, so it is safe to call as a form field settles. Redemption
|
|
12169
|
+
* happens server-side after checkout completes, when the organization and its
|
|
12170
|
+
* subscription exist.
|
|
12171
|
+
*/
|
|
12172
|
+
async previewPromoCode(code, options) {
|
|
12173
|
+
return this.fetch("promo-codes/preview", {
|
|
12174
|
+
method: "POST",
|
|
12175
|
+
body: JSON.stringify({ code }),
|
|
12176
|
+
signal: options?.signal
|
|
12177
|
+
});
|
|
12178
|
+
}
|
|
12101
12179
|
/** Get a publicly accessible product by ID. */
|
|
12102
12180
|
async getPublicProduct(id) {
|
|
12103
12181
|
return this.fetch(`products/${id}`);
|
|
@@ -12438,6 +12516,106 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12438
12516
|
return this.fetch(`w/${wid}/motd${query ? `?${query}` : ""}`);
|
|
12439
12517
|
}
|
|
12440
12518
|
};
|
|
12519
|
+
TrackedLinksApi = class extends BaseApiClient {
|
|
12520
|
+
/** Header counters plus whether shortening is configured and enabled. */
|
|
12521
|
+
async getTrackedLinkSummary(wid, options = {}) {
|
|
12522
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
12523
|
+
return this.fetch(
|
|
12524
|
+
`w/${wid}/tracked-links/summary${suffix(params)}`
|
|
12525
|
+
);
|
|
12526
|
+
}
|
|
12527
|
+
/**
|
|
12528
|
+
* Known destination URLs, most recent first. Powers the "Clicked link"
|
|
12529
|
+
* member-filter autocomplete, so it stays unaggregated and cheap.
|
|
12530
|
+
*/
|
|
12531
|
+
async getTrackedLinkDestinations(wid, options = {}) {
|
|
12532
|
+
const params = new URLSearchParams();
|
|
12533
|
+
if (options.q) params.append("q", options.q);
|
|
12534
|
+
if (options.limit !== void 0) params.append("limit", String(options.limit));
|
|
12535
|
+
return this.fetch(
|
|
12536
|
+
`w/${wid}/tracked-links/destinations${suffix(params)}`
|
|
12537
|
+
);
|
|
12538
|
+
}
|
|
12539
|
+
/**
|
|
12540
|
+
* Register a destination an author can reference as `{{links.<key>}}`.
|
|
12541
|
+
*
|
|
12542
|
+
* The URL is deduplicated server-side, so registering one the workspace
|
|
12543
|
+
* already knows adopts that destination — including a row the retired
|
|
12544
|
+
* auto-harvest left unnamed, whose click history then carries forward
|
|
12545
|
+
* under the new key. Registering a URL that already has a *different* key
|
|
12546
|
+
* is a 409: renaming is what `updateTrackedLinkDestination` is for.
|
|
12547
|
+
*
|
|
12548
|
+
* Keys use the same grammar as snippet keys: lowercase letters, digits,
|
|
12549
|
+
* underscores and dots, starting with a letter (`intake_form`,
|
|
12550
|
+
* `docs.privacy`). No hyphens — Jinja2 reads `links.spring-2026` as
|
|
12551
|
+
* subtraction.
|
|
12552
|
+
*/
|
|
12553
|
+
async createTrackedLinkDestination(wid, data) {
|
|
12554
|
+
return this.fetch(`w/${wid}/tracked-links/destinations`, {
|
|
12555
|
+
method: "POST",
|
|
12556
|
+
body: JSON.stringify(data)
|
|
12557
|
+
});
|
|
12558
|
+
}
|
|
12559
|
+
/**
|
|
12560
|
+
* Re-key or relabel a destination.
|
|
12561
|
+
*
|
|
12562
|
+
* Changing `key` breaks templates: `{{links.old}}` stops resolving and the
|
|
12563
|
+
* message ships without its link. Relabelling (`name`) is always safe.
|
|
12564
|
+
* Passing `key: null` releases the handle so another destination can take
|
|
12565
|
+
* it — the non-destructive alternative to deleting, which would take the
|
|
12566
|
+
* click history with it. The URL is not editable.
|
|
12567
|
+
*/
|
|
12568
|
+
async updateTrackedLinkDestination(wid, destinationId, data) {
|
|
12569
|
+
return this.fetch(
|
|
12570
|
+
`w/${wid}/tracked-links/destinations/${destinationId}`,
|
|
12571
|
+
{ method: "PUT", body: JSON.stringify(data) }
|
|
12572
|
+
);
|
|
12573
|
+
}
|
|
12574
|
+
/** Per-destination sent / clicks / unique clickers / CTR for the window. */
|
|
12575
|
+
async getTrackedLinkStats(wid, options = {}) {
|
|
12576
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
12577
|
+
if (options.page !== void 0) params.append("page", String(options.page));
|
|
12578
|
+
if (options.pageSize !== void 0) params.append("pageSize", String(options.pageSize));
|
|
12579
|
+
if (options.q) params.append("q", options.q);
|
|
12580
|
+
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
12581
|
+
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
12582
|
+
return this.fetch(
|
|
12583
|
+
`w/${wid}/tracked-links${suffix(params)}`
|
|
12584
|
+
);
|
|
12585
|
+
}
|
|
12586
|
+
/** Clicks over time for the current filter selection. */
|
|
12587
|
+
async getTrackedLinkTimeseries(wid, options = {}) {
|
|
12588
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
12589
|
+
if (options.destinationId !== void 0) {
|
|
12590
|
+
params.append("destinationId", String(options.destinationId));
|
|
12591
|
+
}
|
|
12592
|
+
if (options.granularity) params.append("granularity", options.granularity);
|
|
12593
|
+
if (options.tz) params.append("tz", options.tz);
|
|
12594
|
+
return this.fetch(
|
|
12595
|
+
`w/${wid}/tracked-links/timeseries${suffix(params)}`
|
|
12596
|
+
);
|
|
12597
|
+
}
|
|
12598
|
+
/**
|
|
12599
|
+
* Delete one destination: its short links stop resolving and its recorded
|
|
12600
|
+
* clicks are removed.
|
|
12601
|
+
*
|
|
12602
|
+
* Turning the workspace setting off only stops NEW links being minted —
|
|
12603
|
+
* links already delivered to members keep working. This is the deliberate
|
|
12604
|
+
* way to break them.
|
|
12605
|
+
*/
|
|
12606
|
+
async deleteTrackedLinkDestination(wid, destinationId) {
|
|
12607
|
+
return this.fetch(
|
|
12608
|
+
`w/${wid}/tracked-links/destinations/${destinationId}`,
|
|
12609
|
+
{ method: "DELETE" }
|
|
12610
|
+
);
|
|
12611
|
+
}
|
|
12612
|
+
/** Delete every destination, its links, and its clicks. Irreversible. */
|
|
12613
|
+
async clearTrackedLinkDestinations(wid) {
|
|
12614
|
+
return this.fetch(`w/${wid}/tracked-links/destinations`, {
|
|
12615
|
+
method: "DELETE"
|
|
12616
|
+
});
|
|
12617
|
+
}
|
|
12618
|
+
};
|
|
12441
12619
|
WORKSPACE_METHOD_NAMES = [
|
|
12442
12620
|
"activateWorkflowRevision",
|
|
12443
12621
|
"addGroupMember",
|
|
@@ -12472,6 +12650,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12472
12650
|
"checkSiteSlugAvailability",
|
|
12473
12651
|
"clearConnectionMemberExclusion",
|
|
12474
12652
|
"clearMemberSwitch",
|
|
12653
|
+
"clearTrackedLinkDestinations",
|
|
12475
12654
|
"clickWorkspaceSupportRequestResource",
|
|
12476
12655
|
"cloneDataType",
|
|
12477
12656
|
"cloneTask",
|
|
@@ -12547,6 +12726,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12547
12726
|
"createSupervisor",
|
|
12548
12727
|
"createTask",
|
|
12549
12728
|
"createTeamsApp",
|
|
12729
|
+
"createTrackedLinkDestination",
|
|
12550
12730
|
"createWorkflow",
|
|
12551
12731
|
"createWorkflowContributor",
|
|
12552
12732
|
"createWorkflowFromTemplate",
|
|
@@ -12612,6 +12792,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12612
12792
|
"deleteSupervisor",
|
|
12613
12793
|
"deleteTask",
|
|
12614
12794
|
"deleteTeamsApp",
|
|
12795
|
+
"deleteTrackedLinkDestination",
|
|
12615
12796
|
"deleteWidgetDomain",
|
|
12616
12797
|
"deleteWorkflow",
|
|
12617
12798
|
"deleteWorkflowContributor",
|
|
@@ -12736,6 +12917,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12736
12917
|
"getChatModelOverride",
|
|
12737
12918
|
"getChatPhoneCalls",
|
|
12738
12919
|
"getChatSkills",
|
|
12920
|
+
"getManagerSkills",
|
|
12739
12921
|
"getChatTodos",
|
|
12740
12922
|
"getChatTokenUsage",
|
|
12741
12923
|
"getChatToolCallMessages",
|
|
@@ -12916,6 +13098,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12916
13098
|
"getPublicFolder",
|
|
12917
13099
|
"getPublicFolderFiles",
|
|
12918
13100
|
"getPublicProducts",
|
|
13101
|
+
"previewPromoCode",
|
|
12919
13102
|
"getQualification",
|
|
12920
13103
|
"getQualifications",
|
|
12921
13104
|
"getRecordingInfo",
|
|
@@ -12962,6 +13145,10 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12962
13145
|
"getTool",
|
|
12963
13146
|
"getToolCallNames",
|
|
12964
13147
|
"getToolkits",
|
|
13148
|
+
"getTrackedLinkDestinations",
|
|
13149
|
+
"getTrackedLinkStats",
|
|
13150
|
+
"getTrackedLinkSummary",
|
|
13151
|
+
"getTrackedLinkTimeseries",
|
|
12965
13152
|
"getUnreadNotificationCount",
|
|
12966
13153
|
"getUsageDashboard",
|
|
12967
13154
|
"getVariableRegistry",
|
|
@@ -13196,6 +13383,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13196
13383
|
"updateTask",
|
|
13197
13384
|
"updateTeamsApp",
|
|
13198
13385
|
"updateThemeSettings",
|
|
13386
|
+
"updateTrackedLinkDestination",
|
|
13199
13387
|
"uploadFile",
|
|
13200
13388
|
"updateVoicemailStatus",
|
|
13201
13389
|
"updateWorkflow",
|
|
@@ -13245,6 +13433,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13245
13433
|
getChatTokenUsage;
|
|
13246
13434
|
getChatTodos;
|
|
13247
13435
|
getChatSkills;
|
|
13436
|
+
getManagerSkills;
|
|
13248
13437
|
getChatsNeedsResponse;
|
|
13249
13438
|
getChatsDailyCreationStats;
|
|
13250
13439
|
getToolCallNames;
|
|
@@ -13432,6 +13621,15 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13432
13621
|
getDashboardWorkflowAssignmentStats;
|
|
13433
13622
|
// MOTD API
|
|
13434
13623
|
getMotd;
|
|
13624
|
+
// Tracked Links analytics (#10934)
|
|
13625
|
+
getTrackedLinkSummary;
|
|
13626
|
+
getTrackedLinkDestinations;
|
|
13627
|
+
getTrackedLinkStats;
|
|
13628
|
+
getTrackedLinkTimeseries;
|
|
13629
|
+
createTrackedLinkDestination;
|
|
13630
|
+
updateTrackedLinkDestination;
|
|
13631
|
+
deleteTrackedLinkDestination;
|
|
13632
|
+
clearTrackedLinkDestinations;
|
|
13435
13633
|
// Journeys API
|
|
13436
13634
|
getJourneys;
|
|
13437
13635
|
getJourney;
|
|
@@ -13536,6 +13734,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13536
13734
|
getProduct;
|
|
13537
13735
|
getWorkspaceProduct;
|
|
13538
13736
|
getPublicProducts;
|
|
13737
|
+
previewPromoCode;
|
|
13539
13738
|
getPublicProduct;
|
|
13540
13739
|
createProduct;
|
|
13541
13740
|
updateProduct;
|
|
@@ -13890,6 +14089,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13890
14089
|
getSTTModels;
|
|
13891
14090
|
getTTSModels;
|
|
13892
14091
|
getVoiceModels;
|
|
14092
|
+
getVoicePresets;
|
|
13893
14093
|
getAllModels;
|
|
13894
14094
|
getCustomToolkits;
|
|
13895
14095
|
getCustomToolkit;
|
|
@@ -14220,6 +14420,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
14220
14420
|
bindQueriesMethods(this, apis.queries);
|
|
14221
14421
|
bindDashboardsMethods(this, apis.dashboards);
|
|
14222
14422
|
bindMotdMethods(this, apis.motd);
|
|
14423
|
+
bindTrackedLinksMethods(this, apis.trackedLinks);
|
|
14223
14424
|
bindJourneysMethods(this, apis.journeys);
|
|
14224
14425
|
bindExperimentsMethods(this, apis.experiments);
|
|
14225
14426
|
bindOperatorMethods(this, apis.operatorGroups);
|
|
@@ -14405,7 +14606,7 @@ var init_chunk_2YLKG4TT = __esm({
|
|
|
14405
14606
|
var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS;
|
|
14406
14607
|
var init_dist = __esm({
|
|
14407
14608
|
"../sdk/dist/index.js"() {
|
|
14408
|
-
|
|
14609
|
+
init_chunk_4B7T6MBH();
|
|
14409
14610
|
init_chunk_2YLKG4TT();
|
|
14410
14611
|
init_chunk_GP6ICMWF();
|
|
14411
14612
|
SEARCHABLE_EVENT_RULE_SOURCE_FIELDS = [
|
|
@@ -16640,8 +16841,8 @@ function crudCommands(config) {
|
|
|
16640
16841
|
requiresWorkspace ? [hctx.workspace, id, cascade] : [id, cascade],
|
|
16641
16842
|
resolveClient
|
|
16642
16843
|
);
|
|
16643
|
-
const
|
|
16644
|
-
process.stdout.write(`Deleted ${entityName} ${id}${
|
|
16844
|
+
const suffix2 = result3 && typeof result3 === "object" && "deletedTaskCount" in result3 && result3.deletedTaskCount ? ` and ${result3.deletedTaskCount} child entities` : "";
|
|
16845
|
+
process.stdout.write(`Deleted ${entityName} ${id}${suffix2}
|
|
16645
16846
|
`);
|
|
16646
16847
|
} else {
|
|
16647
16848
|
await callApiWithId(
|
|
@@ -17159,6 +17360,43 @@ var agentTasksDomain = {
|
|
|
17159
17360
|
// src/domains/agents.ts
|
|
17160
17361
|
init_output();
|
|
17161
17362
|
var COLUMNS = [COL.id(), COL.uuid(), COL.name(), COL.status(), COL.created()];
|
|
17363
|
+
var AGENT_FIELD_REFERENCE = `
|
|
17364
|
+
Field reference for --data JSON (create/update):
|
|
17365
|
+
|
|
17366
|
+
Required on create
|
|
17367
|
+
name (string) Display name
|
|
17368
|
+
chatModelId (string) Text chat model ID (see \`gr ai-models chat\`)
|
|
17369
|
+
e.g. "aws:bedrock:claude-4-5-haiku"
|
|
17370
|
+
|
|
17371
|
+
Optional
|
|
17372
|
+
description (string) Short summary shown in listings
|
|
17373
|
+
systemPrompt (string) Base instructions / identity
|
|
17374
|
+
chatModelConfig (object|null) Chat model overrides (temperature, thinking, \u2026)
|
|
17375
|
+
realtimeModelId (string|null) Voice/realtime model (see \`gr ai-models realtime\`)
|
|
17376
|
+
e.g. "xai:realtime:voice-agent-2" (Grok Voice Think Fast 2)
|
|
17377
|
+
Native models auto-fill tts=native + default voice when
|
|
17378
|
+
realtimeModelConfig is omitted.
|
|
17379
|
+
realtimeModelConfig (object|null) Realtime config. Native example:
|
|
17380
|
+
{"ttsModel":"native","voiceModel":"xai:voice:eve"}
|
|
17381
|
+
Composable (custom:realtime:composable) needs
|
|
17382
|
+
voiceModel + ttsModel + inferenceModel.
|
|
17383
|
+
memberRoleId (number) Role id (omit to use the default Agent role)
|
|
17384
|
+
email / phone / externalId Optional contact fields
|
|
17385
|
+
labelIds (number[]) Member label ids
|
|
17386
|
+
codeInterpreterEnabled (bool)
|
|
17387
|
+
maxDailyActions (number|null)
|
|
17388
|
+
|
|
17389
|
+
Attach an agent\u2019s models/identity to a workflow (draft), then publish:
|
|
17390
|
+
gr workflows update --id <wf> -d '{"copyFromAgentId": <agentId>}'
|
|
17391
|
+
gr workflows publish --id <wf>
|
|
17392
|
+
|
|
17393
|
+
One-shot workflow voice WITHOUT creating an agent (preferred for "use Grok Voice 2"):
|
|
17394
|
+
gr workflows update --id <wf> -d '{"realtimeModelId":"xai:realtime:voice-agent-2"}'
|
|
17395
|
+
gr workflows publish --id <wf>
|
|
17396
|
+
|
|
17397
|
+
List models:
|
|
17398
|
+
gr ai-models chat | realtime | voice
|
|
17399
|
+
`;
|
|
17162
17400
|
var agentsDomain = {
|
|
17163
17401
|
name: "agents",
|
|
17164
17402
|
description: "Manage agents",
|
|
@@ -17175,9 +17413,16 @@ var agentsDomain = {
|
|
|
17175
17413
|
unarchiveMethod: "unarchiveAgent",
|
|
17176
17414
|
columns: COLUMNS,
|
|
17177
17415
|
paginationSupport: "full",
|
|
17178
|
-
|
|
17416
|
+
createHelp: `Create an agent
|
|
17417
|
+
${AGENT_FIELD_REFERENCE}`,
|
|
17418
|
+
updateHelp: `Update an agent. All fields optional.
|
|
17419
|
+
${AGENT_FIELD_REFERENCE}`,
|
|
17420
|
+
createExamples: [
|
|
17421
|
+
`gr agents create -d '{"name":"Support","chatModelId":"aws:bedrock:claude-4-5-haiku","realtimeModelId":"xai:realtime:voice-agent-2"}'`,
|
|
17422
|
+
"gr agents create --file agent.json"
|
|
17423
|
+
],
|
|
17179
17424
|
updateExamples: [
|
|
17180
|
-
`gr agents update --id 42
|
|
17425
|
+
`gr agents update --id 42 -d '{"realtimeModelId":"xai:realtime:voice-agent-2"}'`,
|
|
17181
17426
|
"gr agents update --id 42 --file agent.json"
|
|
17182
17427
|
]
|
|
17183
17428
|
})
|
|
@@ -18161,8 +18406,26 @@ Core
|
|
|
18161
18406
|
name (string) Display name
|
|
18162
18407
|
description (string, optional)
|
|
18163
18408
|
defaultPhoneNumberId (number|null) Outbound caller ID (workspace phone id)
|
|
18409
|
+
defaultInboxId (number|null) Default inbox for inbound messaging
|
|
18164
18410
|
permissions (object, optional) Workflow-level permission flags
|
|
18165
18411
|
|
|
18412
|
+
Assistant / models (live on the DRAFT revision \u2014 publish to go live)
|
|
18413
|
+
assistantName (string) Display name for the workflow assistant
|
|
18414
|
+
assistantIdentity (string) Persona / identity instructions
|
|
18415
|
+
chatModelId (string) Text chat model (see \`gr ai-models chat\`)
|
|
18416
|
+
chatModelConfig (object|null) Chat model overrides
|
|
18417
|
+
realtimeModelId (string|null) Voice/realtime model (see \`gr ai-models realtime\`)
|
|
18418
|
+
One-shot voice example:
|
|
18419
|
+
{"realtimeModelId":"xai:realtime:voice-agent-2"}
|
|
18420
|
+
Native models auto-fill tts=native + default voice
|
|
18421
|
+
(xAI \u2192 xai:voice:eve). Optional explicit config:
|
|
18422
|
+
{"realtimeModelId":"xai:realtime:voice-agent-2",
|
|
18423
|
+
"realtimeModelConfig":{"ttsModel":"native",
|
|
18424
|
+
"voiceModel":"xai:voice:ara"}}
|
|
18425
|
+
realtimeModelConfig (object|null) Realtime config; omit for provider defaults
|
|
18426
|
+
copyFromAgentId (number) Copy full assistant settings from an agent
|
|
18427
|
+
copyFromWorkflowRevisionId (number) Copy assistant settings from a revision
|
|
18428
|
+
|
|
18166
18429
|
Member role access (memberRoleAccess)
|
|
18167
18430
|
Array of objects, NOT bare role ids:
|
|
18168
18431
|
[{"memberRoleId": 6, "accessMode": 1}]
|
|
@@ -18188,6 +18451,9 @@ Use the dedicated commands:
|
|
|
18188
18451
|
workflows revisions edit Branch a published revision back into the draft
|
|
18189
18452
|
workflows revisions diff Compare two revisions
|
|
18190
18453
|
workflows revisions update Edit a revision's label / publish notes
|
|
18454
|
+
|
|
18455
|
+
After changing assistant/realtime fields, publish so live traffic picks them up:
|
|
18456
|
+
gr workflows publish --id <workflowId>
|
|
18191
18457
|
`;
|
|
18192
18458
|
|
|
18193
18459
|
// src/domains/workflows.ts
|
|
@@ -23500,7 +23766,7 @@ var COLUMNS14 = [
|
|
|
23500
23766
|
];
|
|
23501
23767
|
var aiModelsDomain = {
|
|
23502
23768
|
name: "ai-models",
|
|
23503
|
-
description:
|
|
23769
|
+
description: `List available AI models (chat, realtime/voice stacks, speaker voices). Use realtime ids as workflow/agent realtimeModelId; voice ids go in realtimeModelConfig.voiceModel. One-shot workflow voice: gr workflows update -d '{"realtimeModelId":"xai:realtime:voice-agent-2"}' then publish.`,
|
|
23504
23770
|
commands: [
|
|
23505
23771
|
{
|
|
23506
23772
|
path: ["ai-models", "list"],
|
|
@@ -23513,7 +23779,7 @@ var aiModelsDomain = {
|
|
|
23513
23779
|
},
|
|
23514
23780
|
{
|
|
23515
23781
|
path: ["ai-models", "chat"],
|
|
23516
|
-
description: "List chat models",
|
|
23782
|
+
description: "List chat models (use as chatModelId on agents/workflows)",
|
|
23517
23783
|
requiresWorkspace: false,
|
|
23518
23784
|
handler: async ({ ctx }) => {
|
|
23519
23785
|
const result3 = await requireAuth(ctx).apiClient.getChatModels();
|
|
@@ -23522,7 +23788,7 @@ var aiModelsDomain = {
|
|
|
23522
23788
|
},
|
|
23523
23789
|
{
|
|
23524
23790
|
path: ["ai-models", "realtime"],
|
|
23525
|
-
description: "List realtime
|
|
23791
|
+
description: "List realtime/voice stacks (use as realtimeModelId). e.g. xai:realtime:voice-agent-2 = Grok Voice Think Fast 2",
|
|
23526
23792
|
requiresWorkspace: false,
|
|
23527
23793
|
handler: async ({ ctx }) => {
|
|
23528
23794
|
const result3 = await requireAuth(ctx).apiClient.getRealtimeModels();
|
|
@@ -23531,7 +23797,7 @@ var aiModelsDomain = {
|
|
|
23531
23797
|
},
|
|
23532
23798
|
{
|
|
23533
23799
|
path: ["ai-models", "voice"],
|
|
23534
|
-
description: "List voice
|
|
23800
|
+
description: "List speaker voices (use as realtimeModelConfig.voiceModel). Match provider to the realtime model (xai:voice:* with xAI realtime)",
|
|
23535
23801
|
requiresWorkspace: false,
|
|
23536
23802
|
handler: async ({ ctx }) => {
|
|
23537
23803
|
const result3 = await requireAuth(ctx).apiClient.getVoiceModels();
|
|
@@ -30108,7 +30374,7 @@ var widgetDomainsDomain = {
|
|
|
30108
30374
|
}
|
|
30109
30375
|
],
|
|
30110
30376
|
examples: [
|
|
30111
|
-
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat,operator --allow-write",
|
|
30377
|
+
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat,operator-tools --allow-write",
|
|
30112
30378
|
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat --allow-subdomains --port 4444 --allow-write"
|
|
30113
30379
|
],
|
|
30114
30380
|
handler: async ({ ctx, workspace, args }) => {
|
|
@@ -35527,7 +35793,7 @@ init_concierge_api();
|
|
|
35527
35793
|
|
|
35528
35794
|
// package.json
|
|
35529
35795
|
var package_default = {
|
|
35530
|
-
version: "0.
|
|
35796
|
+
version: "0.16.0"};
|
|
35531
35797
|
|
|
35532
35798
|
// src/gr.ts
|
|
35533
35799
|
var VERSION = package_default.version;
|