@gravity-rail/cli 0.15.0 → 0.17.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 +1365 -283
- package/dist/gr.js.map +1 -1
- package/dist/lib.js +909 -207
- package/dist/lib.js.map +1 -1
- package/package.json +5 -5
package/dist/gr.js
CHANGED
|
@@ -207,7 +207,7 @@ var init_pagination = __esm({
|
|
|
207
207
|
}
|
|
208
208
|
});
|
|
209
209
|
|
|
210
|
-
// ../sdk/dist/chunk-
|
|
210
|
+
// ../sdk/dist/chunk-PJFEGUHM.js
|
|
211
211
|
function getCookieValue(name) {
|
|
212
212
|
if (typeof document === "undefined") return void 0;
|
|
213
213
|
const cookies = document.cookie.split(";");
|
|
@@ -265,8 +265,8 @@ function setOrgAuthHeader(headers2, token) {
|
|
|
265
265
|
headers2.set(orgAuthHeaderName(token), token);
|
|
266
266
|
}
|
|
267
267
|
var ApiError, BaseApiClient;
|
|
268
|
-
var
|
|
269
|
-
"../sdk/dist/chunk-
|
|
268
|
+
var init_chunk_PJFEGUHM = __esm({
|
|
269
|
+
"../sdk/dist/chunk-PJFEGUHM.js"() {
|
|
270
270
|
ApiError = class extends Error {
|
|
271
271
|
statusCode;
|
|
272
272
|
/** Legacy string-array errors — kept for non-validation callers. */
|
|
@@ -276,6 +276,13 @@ var init_chunk_GP6ICMWF = __esm({
|
|
|
276
276
|
* Populated when the backend returns a WorkflowValidationErrorResponse.
|
|
277
277
|
*/
|
|
278
278
|
validationErrors;
|
|
279
|
+
/**
|
|
280
|
+
* The raw structured `detail` object when the backend returned one (a body
|
|
281
|
+
* with `error: true` or a `code`). Declared here rather than bolted on with
|
|
282
|
+
* `as any` at the throw site so consumers can narrow it with a type guard —
|
|
283
|
+
* see `isMemberContactConflict` in `types/member-types`.
|
|
284
|
+
*/
|
|
285
|
+
errorData;
|
|
279
286
|
constructor(message, statusCode, errors, validationErrors) {
|
|
280
287
|
super(message);
|
|
281
288
|
this.statusCode = statusCode;
|
|
@@ -3213,7 +3220,7 @@ var init_libphonenumber_js = __esm({
|
|
|
3213
3220
|
}
|
|
3214
3221
|
});
|
|
3215
3222
|
|
|
3216
|
-
// ../sdk/dist/chunk-
|
|
3223
|
+
// ../sdk/dist/chunk-CEFOCGYO.js
|
|
3217
3224
|
function sanitizePhoneForBackend(phoneNumber) {
|
|
3218
3225
|
try {
|
|
3219
3226
|
let parsed = parsePhoneNumber4(phoneNumber);
|
|
@@ -3336,6 +3343,16 @@ function supportRequestParams(params) {
|
|
|
3336
3343
|
const query = searchParams.toString();
|
|
3337
3344
|
return query ? `?${query}` : "";
|
|
3338
3345
|
}
|
|
3346
|
+
function withFilters(params, options) {
|
|
3347
|
+
if (options.dateFrom) params.append("dateFrom", options.dateFrom);
|
|
3348
|
+
if (options.dateTo) params.append("dateTo", options.dateTo);
|
|
3349
|
+
if (options.workflowId !== void 0) params.append("workflowId", String(options.workflowId));
|
|
3350
|
+
return params;
|
|
3351
|
+
}
|
|
3352
|
+
function suffix(params) {
|
|
3353
|
+
const query = params.toString();
|
|
3354
|
+
return query ? `?${query}` : "";
|
|
3355
|
+
}
|
|
3339
3356
|
function createApiModules(apiKey, baseUrl3, customFetch) {
|
|
3340
3357
|
return {
|
|
3341
3358
|
abilities: new AbilitiesApi(apiKey, baseUrl3, customFetch),
|
|
@@ -3376,10 +3393,11 @@ function createApiModules(apiKey, baseUrl3, customFetch) {
|
|
|
3376
3393
|
connectionSync: new ConnectionSyncApi(apiKey, baseUrl3, customFetch),
|
|
3377
3394
|
mcpServers: new McpServersApi(apiKey, baseUrl3, customFetch),
|
|
3378
3395
|
members: new MembersApi(apiKey, baseUrl3, customFetch),
|
|
3379
|
-
milestones: new MilestonesApi(apiKey, baseUrl3, customFetch),
|
|
3380
3396
|
motd: new MotdApi(apiKey, baseUrl3, customFetch),
|
|
3397
|
+
trackedLinks: new TrackedLinksApi(apiKey, baseUrl3, customFetch),
|
|
3381
3398
|
confluence: new ConfluenceApi(apiKey, baseUrl3, customFetch),
|
|
3382
3399
|
mondayIntegration: new MondayIntegrationApi(apiKey, baseUrl3, customFetch),
|
|
3400
|
+
interventionRequests: new InterventionRequestsApi(apiKey, baseUrl3, customFetch),
|
|
3383
3401
|
notificationRules: new NotificationRulesApi(apiKey, baseUrl3, customFetch),
|
|
3384
3402
|
oauth: new OAuthApi(apiKey, baseUrl3, customFetch),
|
|
3385
3403
|
operatorGroups: new OperatorApi(apiKey, baseUrl3, customFetch),
|
|
@@ -3389,6 +3407,7 @@ function createApiModules(apiKey, baseUrl3, customFetch) {
|
|
|
3389
3407
|
pronunciations: new PronunciationsApi(apiKey, baseUrl3, customFetch),
|
|
3390
3408
|
qualifications: new QualificationsApi(apiKey, baseUrl3, customFetch),
|
|
3391
3409
|
personas: new PersonasApi(apiKey, baseUrl3, customFetch),
|
|
3410
|
+
metrics: new MetricsApi(apiKey, baseUrl3, customFetch),
|
|
3392
3411
|
queries: new QueriesApi(apiKey, baseUrl3, customFetch),
|
|
3393
3412
|
reports: new ReportsApi(apiKey, baseUrl3, customFetch),
|
|
3394
3413
|
salesforce: new SalesforceApi(apiKey, baseUrl3, customFetch),
|
|
@@ -3475,6 +3494,7 @@ function bindChatsMethods(target, chats) {
|
|
|
3475
3494
|
target.getChatTokenUsage = chats.getChatTokenUsage.bind(chats);
|
|
3476
3495
|
target.getChatTodos = chats.getChatTodos.bind(chats);
|
|
3477
3496
|
target.getChatSkills = chats.getChatSkills.bind(chats);
|
|
3497
|
+
target.getManagerSkills = chats.getManagerSkills.bind(chats);
|
|
3478
3498
|
target.getChatsNeedsResponse = chats.getChatsNeedsResponse.bind(chats);
|
|
3479
3499
|
target.getChatsDailyCreationStats = chats.getChatsDailyCreationStats.bind(chats);
|
|
3480
3500
|
target.getToolCallNames = chats.getToolCallNames.bind(chats);
|
|
@@ -3537,10 +3557,21 @@ function bindDashboardsMethods(target, dashboards) {
|
|
|
3537
3557
|
target.deleteDashboard = dashboards.deleteDashboard.bind(dashboards);
|
|
3538
3558
|
target.getDashboardChannelStats = dashboards.getDashboardChannelStats.bind(dashboards);
|
|
3539
3559
|
target.getDashboardWorkflowAssignmentStats = dashboards.getDashboardWorkflowAssignmentStats.bind(dashboards);
|
|
3560
|
+
target.getConfigurationHealth = dashboards.getConfigurationHealth.bind(dashboards);
|
|
3540
3561
|
}
|
|
3541
3562
|
function bindMotdMethods(target, motd) {
|
|
3542
3563
|
target.getMotd = motd.getMotd.bind(motd);
|
|
3543
3564
|
}
|
|
3565
|
+
function bindTrackedLinksMethods(target, trackedLinks) {
|
|
3566
|
+
target.getTrackedLinkSummary = trackedLinks.getTrackedLinkSummary.bind(trackedLinks);
|
|
3567
|
+
target.getTrackedLinkDestinations = trackedLinks.getTrackedLinkDestinations.bind(trackedLinks);
|
|
3568
|
+
target.getTrackedLinkStats = trackedLinks.getTrackedLinkStats.bind(trackedLinks);
|
|
3569
|
+
target.getTrackedLinkTimeseries = trackedLinks.getTrackedLinkTimeseries.bind(trackedLinks);
|
|
3570
|
+
target.createTrackedLinkDestination = trackedLinks.createTrackedLinkDestination.bind(trackedLinks);
|
|
3571
|
+
target.updateTrackedLinkDestination = trackedLinks.updateTrackedLinkDestination.bind(trackedLinks);
|
|
3572
|
+
target.deleteTrackedLinkDestination = trackedLinks.deleteTrackedLinkDestination.bind(trackedLinks);
|
|
3573
|
+
target.clearTrackedLinkDestinations = trackedLinks.clearTrackedLinkDestinations.bind(trackedLinks);
|
|
3574
|
+
}
|
|
3544
3575
|
function bindDataTypesMethods(target, dataTypes) {
|
|
3545
3576
|
target.getDataTypes = dataTypes.getDataTypes.bind(dataTypes);
|
|
3546
3577
|
target.getDataType = dataTypes.getDataType.bind(dataTypes);
|
|
@@ -3923,7 +3954,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
|
|
|
3923
3954
|
target.updateSupervisor = supervisors.updateSupervisor.bind(supervisors);
|
|
3924
3955
|
target.deleteSupervisor = supervisors.deleteSupervisor.bind(supervisors);
|
|
3925
3956
|
}
|
|
3926
|
-
function bindCalendarsMethods(target, calendars
|
|
3957
|
+
function bindCalendarsMethods(target, calendars) {
|
|
3927
3958
|
target.getCalendars = calendars.getCalendars.bind(calendars);
|
|
3928
3959
|
target.getCalendar = calendars.getCalendar.bind(calendars);
|
|
3929
3960
|
target.createCalendar = calendars.createCalendar.bind(calendars);
|
|
@@ -3955,11 +3986,6 @@ function bindCalendarsMethods(target, calendars, milestones) {
|
|
|
3955
3986
|
target.linkCalendarToGoogle = calendars.linkCalendarToGoogle.bind(calendars);
|
|
3956
3987
|
target.unlinkCalendarFromGoogle = calendars.unlinkCalendarFromGoogle.bind(calendars);
|
|
3957
3988
|
target.syncCalendarWithGoogle = calendars.syncCalendarWithGoogle.bind(calendars);
|
|
3958
|
-
target.getMilestones = milestones.getMilestones.bind(milestones);
|
|
3959
|
-
target.getMilestone = milestones.getMilestone.bind(milestones);
|
|
3960
|
-
target.createMilestone = milestones.createMilestone.bind(milestones);
|
|
3961
|
-
target.updateMilestone = milestones.updateMilestone.bind(milestones);
|
|
3962
|
-
target.deleteMilestone = milestones.deleteMilestone.bind(milestones);
|
|
3963
3989
|
}
|
|
3964
3990
|
function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRules) {
|
|
3965
3991
|
target.getPhoneNumbers = phoneNumbers.getPhoneNumbers.bind(phoneNumbers);
|
|
@@ -4013,6 +4039,7 @@ function bindToolkitsMethods(target, toolkits, templates, aiModels, customToolki
|
|
|
4013
4039
|
target.getSTTModels = aiModels.getSTTModels.bind(aiModels);
|
|
4014
4040
|
target.getTTSModels = aiModels.getTTSModels.bind(aiModels);
|
|
4015
4041
|
target.getVoiceModels = aiModels.getVoiceModels.bind(aiModels);
|
|
4042
|
+
target.getVoicePresets = aiModels.getVoicePresets.bind(aiModels);
|
|
4016
4043
|
target.getAllModels = aiModels.getAllModels.bind(aiModels);
|
|
4017
4044
|
target.getCustomToolkits = customToolkits.getCustomToolkits.bind(customToolkits);
|
|
4018
4045
|
target.getCustomToolkit = customToolkits.getCustomToolkit.bind(customToolkits);
|
|
@@ -4301,6 +4328,11 @@ function bindOrgMethods(target, org) {
|
|
|
4301
4328
|
target.updateBusinessProfile = org.updateBusinessProfile.bind(org);
|
|
4302
4329
|
target.submitBusinessProfile = org.submitBusinessProfile.bind(org);
|
|
4303
4330
|
target.cancelBusinessProfile = org.cancelBusinessProfile.bind(org);
|
|
4331
|
+
target.listLegalEntities = org.listLegalEntities.bind(org);
|
|
4332
|
+
target.getLegalEntity = org.getLegalEntity.bind(org);
|
|
4333
|
+
target.createLegalEntity = org.createLegalEntity.bind(org);
|
|
4334
|
+
target.getVoiceTrustProducts = org.getVoiceTrustProducts.bind(org);
|
|
4335
|
+
target.syncVoiceTrustProducts = org.syncVoiceTrustProducts.bind(org);
|
|
4304
4336
|
target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
|
|
4305
4337
|
target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
|
|
4306
4338
|
}
|
|
@@ -4375,6 +4407,16 @@ function bindPersonasMethods(target, personas) {
|
|
|
4375
4407
|
target.updatePersona = personas.updatePersona.bind(personas);
|
|
4376
4408
|
target.deletePersona = personas.deletePersona.bind(personas);
|
|
4377
4409
|
}
|
|
4410
|
+
function bindMetricsMethods(target, metrics) {
|
|
4411
|
+
target.listMetrics = metrics.listMetrics.bind(metrics);
|
|
4412
|
+
target.getMetric = metrics.getMetric.bind(metrics);
|
|
4413
|
+
target.createMetric = metrics.createMetric.bind(metrics);
|
|
4414
|
+
target.updateMetric = metrics.updateMetric.bind(metrics);
|
|
4415
|
+
target.deleteMetric = metrics.deleteMetric.bind(metrics);
|
|
4416
|
+
target.listMetricObservations = metrics.listMetricObservations.bind(metrics);
|
|
4417
|
+
target.getMetricSeries = metrics.getMetricSeries.bind(metrics);
|
|
4418
|
+
target.computeChatMetrics = metrics.computeChatMetrics.bind(metrics);
|
|
4419
|
+
}
|
|
4378
4420
|
function bindQueriesMethods(target, queries) {
|
|
4379
4421
|
target.getQueryFields = queries.getQueryFields.bind(queries);
|
|
4380
4422
|
target.validateQuery = queries.validateQuery.bind(queries);
|
|
@@ -4424,10 +4466,10 @@ function bindSupportRequestMethods(target, supportRequests) {
|
|
|
4424
4466
|
target.reopenWorkspaceSupportRequest = supportRequests.reopenWorkspaceSupportRequest.bind(supportRequests);
|
|
4425
4467
|
target.clickWorkspaceSupportRequestResource = supportRequests.clickWorkspaceSupportRequestResource.bind(supportRequests);
|
|
4426
4468
|
}
|
|
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,
|
|
4428
|
-
var
|
|
4429
|
-
"../sdk/dist/chunk-
|
|
4430
|
-
|
|
4469
|
+
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, 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, InterventionRequestsApi, MetricsApi, TrackedLinksApi, WORKSPACE_METHOD_NAMES, WORKSPACE_METHOD_NAME_SET, GravityRailClient, WIDGET_SLUGS, CHAT_TYPES, BUILTIN_ASSISTANT_CHAT_TYPES, MEMBER_AGENT_CHAT_TYPES;
|
|
4470
|
+
var init_chunk_CEFOCGYO = __esm({
|
|
4471
|
+
"../sdk/dist/chunk-CEFOCGYO.js"() {
|
|
4472
|
+
init_chunk_PJFEGUHM();
|
|
4431
4473
|
init_libphonenumber_js();
|
|
4432
4474
|
AbilitiesApi = class extends BaseApiClient {
|
|
4433
4475
|
/**
|
|
@@ -4685,6 +4727,18 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
4685
4727
|
const url = queryString ? `ai-models/realtime?${queryString}` : "ai-models/realtime";
|
|
4686
4728
|
return this.fetch(url);
|
|
4687
4729
|
}
|
|
4730
|
+
/**
|
|
4731
|
+
* Get the voice presets offered by the simplified voice picker.
|
|
4732
|
+
*
|
|
4733
|
+
* A preset bundles a realtime speech-to-speech model with one of its native
|
|
4734
|
+
* voices and the settings recommended alongside it, so choosing a voice is
|
|
4735
|
+
* a single decision. Apply one by assigning its `config` wholesale; compare
|
|
4736
|
+
* against it to tell a preset selection from a customised ("Custom") one.
|
|
4737
|
+
* The full engine/voice/settings matrix lives on `getRealtimeModels`.
|
|
4738
|
+
*/
|
|
4739
|
+
async getVoicePresets() {
|
|
4740
|
+
return this.fetch("ai-models/voice-presets");
|
|
4741
|
+
}
|
|
4688
4742
|
/**
|
|
4689
4743
|
* Get available voice models with metadata
|
|
4690
4744
|
*/
|
|
@@ -5780,6 +5834,10 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
5780
5834
|
`w/${wid}/chats/${chatId}/skills`
|
|
5781
5835
|
);
|
|
5782
5836
|
}
|
|
5837
|
+
/** List built-in skills selectable before a Manager Chat (and on Routine manager tasks). */
|
|
5838
|
+
async getManagerSkills(wid) {
|
|
5839
|
+
return this.fetch(`w/${wid}/chats/manager/skills`);
|
|
5840
|
+
}
|
|
5783
5841
|
/** List chat IDs that need a response. */
|
|
5784
5842
|
async getChatsNeedsResponse(wid) {
|
|
5785
5843
|
return this.fetch(`w/${wid}/chats/needs-response`);
|
|
@@ -7165,9 +7223,9 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
7165
7223
|
params?.status?.forEach((value) => query.append("status", value));
|
|
7166
7224
|
if (params?.receivedAfter) query.set("receivedAfter", params.receivedAfter);
|
|
7167
7225
|
if (params?.receivedBefore) query.set("receivedBefore", params.receivedBefore);
|
|
7168
|
-
const
|
|
7226
|
+
const suffix2 = query.toString() === "" ? "" : `?${query.toString()}`;
|
|
7169
7227
|
return this.fetch(
|
|
7170
|
-
`w/${wid}/app-connections/documo-fax/faxes${
|
|
7228
|
+
`w/${wid}/app-connections/documo-fax/faxes${suffix2}`
|
|
7171
7229
|
);
|
|
7172
7230
|
}
|
|
7173
7231
|
/**
|
|
@@ -8178,12 +8236,34 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
8178
8236
|
body: JSON.stringify(memberRole)
|
|
8179
8237
|
});
|
|
8180
8238
|
}
|
|
8181
|
-
/** Delete a member role. */
|
|
8239
|
+
/** Delete a member role. Default roles (``systemKey`` set) return 403. */
|
|
8182
8240
|
async deleteMemberRole(wid, id) {
|
|
8183
8241
|
return this.fetch(`w/${wid}/member-roles/${id}`, {
|
|
8184
8242
|
method: "DELETE"
|
|
8185
8243
|
});
|
|
8186
8244
|
}
|
|
8245
|
+
/**
|
|
8246
|
+
* Describe legacy duplicate default roles in this workspace. Read-only.
|
|
8247
|
+
*
|
|
8248
|
+
* Workspaces seeded by older versions of the product can carry the same
|
|
8249
|
+
* default role under several spellings ("manager" next to "Manager"). This
|
|
8250
|
+
* reports which ones should be merged and exactly how many members and
|
|
8251
|
+
* references each merge would move.
|
|
8252
|
+
*/
|
|
8253
|
+
async getMemberRoleCleanupPlan(wid) {
|
|
8254
|
+
return this.fetch(`w/${wid}/member-roles/cleanup-plan`);
|
|
8255
|
+
}
|
|
8256
|
+
/**
|
|
8257
|
+
* Move every member and reference from one role to another, then delete the
|
|
8258
|
+
* source role. Requires `member_roles:admin`. The source cannot be a default
|
|
8259
|
+
* role.
|
|
8260
|
+
*/
|
|
8261
|
+
async mergeMemberRoles(wid, request) {
|
|
8262
|
+
return this.fetch(`w/${wid}/member-roles/cleanup/merge`, {
|
|
8263
|
+
method: "POST",
|
|
8264
|
+
body: JSON.stringify(request)
|
|
8265
|
+
});
|
|
8266
|
+
}
|
|
8187
8267
|
// Import/Export Members API
|
|
8188
8268
|
/**
|
|
8189
8269
|
* Read-only preview classifying each CSV row before any write (GRA-5545).
|
|
@@ -8485,44 +8565,6 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
8485
8565
|
return this.fetch(`w/${wid}/members/${memberId}/sync-links`);
|
|
8486
8566
|
}
|
|
8487
8567
|
};
|
|
8488
|
-
MilestonesApi = class extends BaseApiClient {
|
|
8489
|
-
/** List milestones in a workspace with optional pagination and sorting. */
|
|
8490
|
-
async getMilestones(wid, options = {}) {
|
|
8491
|
-
const params = new URLSearchParams();
|
|
8492
|
-
if (options.page) params.append("page", options.page.toString());
|
|
8493
|
-
if (options.pageSize) params.append("pageSize", options.pageSize.toString());
|
|
8494
|
-
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
8495
|
-
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
8496
|
-
if (options.search) params.append("search", options.search);
|
|
8497
|
-
return this.fetch(
|
|
8498
|
-
`w/${wid}/milestones${params.toString() ? `?${params.toString()}` : ""}`
|
|
8499
|
-
);
|
|
8500
|
-
}
|
|
8501
|
-
/** Get a single milestone by ID. */
|
|
8502
|
-
async getMilestone(wid, id) {
|
|
8503
|
-
return this.fetch(`w/${wid}/milestones/${id}`);
|
|
8504
|
-
}
|
|
8505
|
-
/** Create a new milestone in a workspace. */
|
|
8506
|
-
async createMilestone(wid, milestone) {
|
|
8507
|
-
return this.fetch(`w/${wid}/milestones`, {
|
|
8508
|
-
method: "POST",
|
|
8509
|
-
body: JSON.stringify(milestone)
|
|
8510
|
-
});
|
|
8511
|
-
}
|
|
8512
|
-
/** Update an existing milestone with partial data. */
|
|
8513
|
-
async updateMilestone(wid, id, milestone) {
|
|
8514
|
-
return this.fetch(`w/${wid}/milestones/${id}`, {
|
|
8515
|
-
method: "PUT",
|
|
8516
|
-
body: JSON.stringify(milestone)
|
|
8517
|
-
});
|
|
8518
|
-
}
|
|
8519
|
-
/** Delete a milestone by ID. */
|
|
8520
|
-
async deleteMilestone(wid, id) {
|
|
8521
|
-
return this.fetch(`w/${wid}/milestones/${id}`, {
|
|
8522
|
-
method: "DELETE"
|
|
8523
|
-
});
|
|
8524
|
-
}
|
|
8525
|
-
};
|
|
8526
8568
|
MondayIntegrationApi = class extends BaseApiClient {
|
|
8527
8569
|
/**
|
|
8528
8570
|
* Get list of boards from the workspace Monday.com connection
|
|
@@ -8805,6 +8847,41 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
8805
8847
|
async getCurrentOrgMember(orgIdOrUuid) {
|
|
8806
8848
|
return this.fetch(`o/${orgIdOrUuid}/me`);
|
|
8807
8849
|
}
|
|
8850
|
+
/**
|
|
8851
|
+
* Update the settings an org admin owns: name, slug and contact details.
|
|
8852
|
+
*
|
|
8853
|
+
* Deliberately NOT the admin organization update — `primary` and
|
|
8854
|
+
* `enforceCreditLimit` are superuser-only and are not fields on this
|
|
8855
|
+
* endpoint's request model at all.
|
|
8856
|
+
*/
|
|
8857
|
+
async updateOrganizationSettings(orgIdOrUuid, data) {
|
|
8858
|
+
return this.fetch(`o/${orgIdOrUuid}`, {
|
|
8859
|
+
method: "PATCH",
|
|
8860
|
+
body: JSON.stringify(data)
|
|
8861
|
+
});
|
|
8862
|
+
}
|
|
8863
|
+
/**
|
|
8864
|
+
* Read this organization's SSO configuration.
|
|
8865
|
+
*
|
|
8866
|
+
* Org-scoped (`org:admin`), unlike the SSO fields on the superuser admin
|
|
8867
|
+
* organization update — an org admin owns their own identity provider.
|
|
8868
|
+
*/
|
|
8869
|
+
async getOrgSsoConfig(orgIdOrUuid) {
|
|
8870
|
+
return this.fetch(`o/${orgIdOrUuid}/sso`);
|
|
8871
|
+
}
|
|
8872
|
+
/** Configure this organization's SSO. Requires `org:admin`. */
|
|
8873
|
+
async updateOrgSsoConfig(orgIdOrUuid, data) {
|
|
8874
|
+
return this.fetch(`o/${orgIdOrUuid}/sso`, {
|
|
8875
|
+
method: "PUT",
|
|
8876
|
+
body: JSON.stringify(data)
|
|
8877
|
+
});
|
|
8878
|
+
}
|
|
8879
|
+
/** Remove this organization's SSO configuration. Requires `org:admin`. */
|
|
8880
|
+
async deleteOrgSsoConfig(orgIdOrUuid) {
|
|
8881
|
+
return this.fetch(`o/${orgIdOrUuid}/sso`, {
|
|
8882
|
+
method: "DELETE"
|
|
8883
|
+
});
|
|
8884
|
+
}
|
|
8808
8885
|
/**
|
|
8809
8886
|
* Get the billing customer UUID for an organization.
|
|
8810
8887
|
*/
|
|
@@ -8925,6 +9002,22 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
8925
9002
|
async getOrganizationWorkspace(orgIdOrUuid, workspaceUuid) {
|
|
8926
9003
|
return this.fetch(`o/${orgIdOrUuid}/workspaces/${workspaceUuid}`);
|
|
8927
9004
|
}
|
|
9005
|
+
/**
|
|
9006
|
+
* Workspace cards for the organization page: identity plus the GLB-side
|
|
9007
|
+
* counts. Any org member may call it — members get the workspaces they
|
|
9008
|
+
* belong to, org:read holders get all of them.
|
|
9009
|
+
*/
|
|
9010
|
+
async getOrganizationWorkspaceSummaries(orgIdOrUuid) {
|
|
9011
|
+
return this.fetch(`o/${orgIdOrUuid}/workspaces/summary`);
|
|
9012
|
+
}
|
|
9013
|
+
/**
|
|
9014
|
+
* Workspace-schema aggregates for one card, plus the caller's own member
|
|
9015
|
+
* role. Separate from the list because it opens a session against the
|
|
9016
|
+
* workspace's own schema — each card fetches its own.
|
|
9017
|
+
*/
|
|
9018
|
+
async getOrganizationWorkspaceStats(orgIdOrUuid, workspaceUuid) {
|
|
9019
|
+
return this.fetch(`o/${orgIdOrUuid}/workspaces/${workspaceUuid}/stats`);
|
|
9020
|
+
}
|
|
8928
9021
|
/**
|
|
8929
9022
|
* Create a workspace in an organization.
|
|
8930
9023
|
*/
|
|
@@ -9149,15 +9242,19 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
9149
9242
|
async getA2PStatus(orgUuid) {
|
|
9150
9243
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/status`);
|
|
9151
9244
|
}
|
|
9245
|
+
/** Return fixed phone-number and outbound-messaging prices. */
|
|
9246
|
+
async getPhoneBillingPricing(orgUuid) {
|
|
9247
|
+
return this.fetch(`o/${orgUuid}/phone-numbers/pricing`);
|
|
9248
|
+
}
|
|
9152
9249
|
/**
|
|
9153
9250
|
* Start A2P brand registration under a legal entity. `legalEntityUuid`
|
|
9154
9251
|
* is required — brands register per legal entity (Customer Profile);
|
|
9155
9252
|
* there is no primary-entity fallback.
|
|
9156
9253
|
*/
|
|
9157
|
-
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandDescription) {
|
|
9254
|
+
async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandDescription, brandUuid = null) {
|
|
9158
9255
|
return this.fetch(`o/${orgUuid}/phone-numbers/a2p/start`, {
|
|
9159
9256
|
method: "POST",
|
|
9160
|
-
body: JSON.stringify({ legalEntityUuid, brandName, brandDescription })
|
|
9257
|
+
body: JSON.stringify({ legalEntityUuid, brandName, brandDescription, brandUuid })
|
|
9161
9258
|
});
|
|
9162
9259
|
}
|
|
9163
9260
|
/**
|
|
@@ -9363,14 +9460,34 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
9363
9460
|
);
|
|
9364
9461
|
}
|
|
9365
9462
|
/**
|
|
9366
|
-
* The brand
|
|
9367
|
-
*
|
|
9463
|
+
* The brand's enrollment-form template URL (carries `?brand=…`, no
|
|
9464
|
+
* credential). `url` is null until a Site is linked. Do not append a
|
|
9465
|
+
* patient identifier to this URL — use {@link mintA2PBrandEnrollmentLink}
|
|
9466
|
+
* to get a patient-ready link instead.
|
|
9368
9467
|
*/
|
|
9369
9468
|
async getA2PBrandEnrollmentUrl(orgUuid, brandUuid) {
|
|
9370
9469
|
return this.fetch(
|
|
9371
9470
|
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`
|
|
9372
9471
|
);
|
|
9373
9472
|
}
|
|
9473
|
+
/**
|
|
9474
|
+
* Mint a patient-ready enrollment link for one patient.
|
|
9475
|
+
*
|
|
9476
|
+
* The returned URL carries a fresh, expiring, single-use `?grant=…` bound to
|
|
9477
|
+
* the member that `externalId` resolves to. `externalId` (the patient's
|
|
9478
|
+
* CRM/EHR identifier) travels in the request body, never the query string,
|
|
9479
|
+
* so it stays out of access logs. When it matches no member, the
|
|
9480
|
+
* credential-free template URL is returned rather than an error.
|
|
9481
|
+
*/
|
|
9482
|
+
async mintA2PBrandEnrollmentLink(orgUuid, brandUuid, externalId) {
|
|
9483
|
+
return this.fetch(
|
|
9484
|
+
`o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`,
|
|
9485
|
+
{
|
|
9486
|
+
method: "POST",
|
|
9487
|
+
body: JSON.stringify({ externalId })
|
|
9488
|
+
}
|
|
9489
|
+
);
|
|
9490
|
+
}
|
|
9374
9491
|
/**
|
|
9375
9492
|
* List available member roles for a workspace in the organization.
|
|
9376
9493
|
*/
|
|
@@ -11696,6 +11813,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
11696
11813
|
EventRuleEventType2["DATA_RECORD_UPDATED"] = "data_record:updated";
|
|
11697
11814
|
EventRuleEventType2["DATA_RECORD_CHANGED"] = "data_record:changed";
|
|
11698
11815
|
EventRuleEventType2["CHAT_CREATED"] = "chat:created";
|
|
11816
|
+
EventRuleEventType2["CHAT_SUMMARY"] = "chat:summary";
|
|
11699
11817
|
EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
|
|
11700
11818
|
EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
|
|
11701
11819
|
EventRuleEventType2["ROUTINE_TRIGGERED"] = "routine:triggered";
|
|
@@ -12098,6 +12216,20 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12098
12216
|
if (featured !== void 0) params.set("featured", String(featured));
|
|
12099
12217
|
return this.fetch(`products?${params.toString()}`);
|
|
12100
12218
|
}
|
|
12219
|
+
/**
|
|
12220
|
+
* Check whether a promo code is usable, without redeeming it.
|
|
12221
|
+
*
|
|
12222
|
+
* Reserves nothing, so it is safe to call as a form field settles. Redemption
|
|
12223
|
+
* happens server-side after checkout completes, when the organization and its
|
|
12224
|
+
* subscription exist.
|
|
12225
|
+
*/
|
|
12226
|
+
async previewPromoCode(code, options) {
|
|
12227
|
+
return this.fetch("promo-codes/preview", {
|
|
12228
|
+
method: "POST",
|
|
12229
|
+
body: JSON.stringify({ code }),
|
|
12230
|
+
signal: options?.signal
|
|
12231
|
+
});
|
|
12232
|
+
}
|
|
12101
12233
|
/** Get a publicly accessible product by ID. */
|
|
12102
12234
|
async getPublicProduct(id) {
|
|
12103
12235
|
return this.fetch(`products/${id}`);
|
|
@@ -12252,6 +12384,32 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12252
12384
|
`w/${wid}/dashboards/stats/workflow-assignments`
|
|
12253
12385
|
);
|
|
12254
12386
|
}
|
|
12387
|
+
/**
|
|
12388
|
+
* Current saved-configuration health across every family (Workflow
|
|
12389
|
+
* configuration, Journey authoring, Workflow access, Routine → Workflow
|
|
12390
|
+
* access, and the workspace lint).
|
|
12391
|
+
*
|
|
12392
|
+
* Requires ALL of `workflows:read`, `journeys:read`, `automations:read`,
|
|
12393
|
+
* `datatypes:read`, `members:read`, and `member_roles:read` — a pruned
|
|
12394
|
+
* subset would render as "all configuration is healthy".
|
|
12395
|
+
*
|
|
12396
|
+
* `page`/`pageSize` bound the response only; every family is evaluated in
|
|
12397
|
+
* full before the issue list is sliced. `check`/`severity` narrow the issue
|
|
12398
|
+
* list server-side, before pagination — filtering a single page in the
|
|
12399
|
+
* client cannot find a match that lives on a later one. `summary` and
|
|
12400
|
+
* `checks` are always workspace-global.
|
|
12401
|
+
*/
|
|
12402
|
+
async getConfigurationHealth(wid, options) {
|
|
12403
|
+
const params = new URLSearchParams();
|
|
12404
|
+
if (options?.page !== void 0) params.append("page", options.page.toString());
|
|
12405
|
+
if (options?.pageSize !== void 0) params.append("pageSize", options.pageSize.toString());
|
|
12406
|
+
if (options?.check !== void 0) params.append("check", options.check);
|
|
12407
|
+
if (options?.severity !== void 0) params.append("severity", options.severity);
|
|
12408
|
+
const query = params.toString();
|
|
12409
|
+
return this.fetch(
|
|
12410
|
+
`w/${wid}/configuration-health${query ? `?${query}` : ""}`
|
|
12411
|
+
);
|
|
12412
|
+
}
|
|
12255
12413
|
};
|
|
12256
12414
|
TeamsAppsApi = class extends BaseApiClient {
|
|
12257
12415
|
/**
|
|
@@ -12438,6 +12596,180 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12438
12596
|
return this.fetch(`w/${wid}/motd${query ? `?${query}` : ""}`);
|
|
12439
12597
|
}
|
|
12440
12598
|
};
|
|
12599
|
+
InterventionRequestsApi = class extends BaseApiClient {
|
|
12600
|
+
/** List intervention requests in a workspace, newest first. */
|
|
12601
|
+
async getInterventionRequests(wid, params = {}) {
|
|
12602
|
+
const query = new URLSearchParams();
|
|
12603
|
+
if (params.kind) query.set("kind", params.kind);
|
|
12604
|
+
if (params.openOnly) query.set("openOnly", "true");
|
|
12605
|
+
if (params.chatId !== void 0) query.set("chatId", String(params.chatId));
|
|
12606
|
+
if (params.unroutedOnly) query.set("unroutedOnly", "true");
|
|
12607
|
+
if (params.limit !== void 0) query.set("limit", String(params.limit));
|
|
12608
|
+
const qs = query.toString();
|
|
12609
|
+
return this.fetch(
|
|
12610
|
+
`w/${wid}/intervention-requests${qs ? `?${qs}` : ""}`
|
|
12611
|
+
);
|
|
12612
|
+
}
|
|
12613
|
+
};
|
|
12614
|
+
MetricsApi = class extends BaseApiClient {
|
|
12615
|
+
/** List metric definitions in the workspace, paginated. */
|
|
12616
|
+
async listMetrics(wid, params) {
|
|
12617
|
+
const q = new URLSearchParams();
|
|
12618
|
+
if (params?.page !== void 0) q.set("page", String(params.page));
|
|
12619
|
+
if (params?.pageSize !== void 0) q.set("pageSize", String(params.pageSize));
|
|
12620
|
+
if (params?.includeArchived !== void 0)
|
|
12621
|
+
q.set("includeArchived", String(params.includeArchived));
|
|
12622
|
+
if (params?.source) q.set("source", params.source);
|
|
12623
|
+
const qs = q.toString() ? `?${q.toString()}` : "";
|
|
12624
|
+
return this.fetch(`w/${wid}/metrics${qs}`);
|
|
12625
|
+
}
|
|
12626
|
+
async getMetric(wid, id) {
|
|
12627
|
+
return this.fetch(`w/${wid}/metrics/${id}`);
|
|
12628
|
+
}
|
|
12629
|
+
async createMetric(wid, data) {
|
|
12630
|
+
return this.fetch(`w/${wid}/metrics`, {
|
|
12631
|
+
method: "POST",
|
|
12632
|
+
body: JSON.stringify(data)
|
|
12633
|
+
});
|
|
12634
|
+
}
|
|
12635
|
+
async updateMetric(wid, id, data) {
|
|
12636
|
+
return this.fetch(`w/${wid}/metrics/${id}`, {
|
|
12637
|
+
method: "PUT",
|
|
12638
|
+
body: JSON.stringify(data)
|
|
12639
|
+
});
|
|
12640
|
+
}
|
|
12641
|
+
/** Soft-archive a metric (observations retained). */
|
|
12642
|
+
async deleteMetric(wid, id) {
|
|
12643
|
+
return this.fetch(`w/${wid}/metrics/${id}`, { method: "DELETE" });
|
|
12644
|
+
}
|
|
12645
|
+
async listMetricObservations(wid, metricId, params) {
|
|
12646
|
+
const q = new URLSearchParams();
|
|
12647
|
+
q.set("start", params.start);
|
|
12648
|
+
q.set("end", params.end);
|
|
12649
|
+
if (params.page !== void 0) q.set("page", String(params.page));
|
|
12650
|
+
if (params.pageSize !== void 0) q.set("pageSize", String(params.pageSize));
|
|
12651
|
+
return this.fetch(
|
|
12652
|
+
`w/${wid}/metrics/${metricId}/observations?${q.toString()}`
|
|
12653
|
+
);
|
|
12654
|
+
}
|
|
12655
|
+
async getMetricSeries(wid, metricId, params) {
|
|
12656
|
+
const q = new URLSearchParams();
|
|
12657
|
+
q.set("start", params.start);
|
|
12658
|
+
q.set("end", params.end);
|
|
12659
|
+
if (params.bucket) q.set("bucket", params.bucket);
|
|
12660
|
+
if (params.aggregation) q.set("aggregation", params.aggregation);
|
|
12661
|
+
return this.fetch(
|
|
12662
|
+
`w/${wid}/metrics/${metricId}/series?${q.toString()}`
|
|
12663
|
+
);
|
|
12664
|
+
}
|
|
12665
|
+
/** On-demand compute of enabled chat-source metrics for one chat. */
|
|
12666
|
+
async computeChatMetrics(wid, data) {
|
|
12667
|
+
return this.fetch(`w/${wid}/metrics/compute-for-chat`, {
|
|
12668
|
+
method: "POST",
|
|
12669
|
+
body: JSON.stringify(data)
|
|
12670
|
+
});
|
|
12671
|
+
}
|
|
12672
|
+
};
|
|
12673
|
+
TrackedLinksApi = class extends BaseApiClient {
|
|
12674
|
+
/** Header counters plus whether shortening is configured and enabled. */
|
|
12675
|
+
async getTrackedLinkSummary(wid, options = {}) {
|
|
12676
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
12677
|
+
return this.fetch(
|
|
12678
|
+
`w/${wid}/tracked-links/summary${suffix(params)}`
|
|
12679
|
+
);
|
|
12680
|
+
}
|
|
12681
|
+
/**
|
|
12682
|
+
* Known destination URLs, most recent first. Powers the "Clicked link"
|
|
12683
|
+
* member-filter autocomplete, so it stays unaggregated and cheap.
|
|
12684
|
+
*/
|
|
12685
|
+
async getTrackedLinkDestinations(wid, options = {}) {
|
|
12686
|
+
const params = new URLSearchParams();
|
|
12687
|
+
if (options.q) params.append("q", options.q);
|
|
12688
|
+
if (options.limit !== void 0) params.append("limit", String(options.limit));
|
|
12689
|
+
return this.fetch(
|
|
12690
|
+
`w/${wid}/tracked-links/destinations${suffix(params)}`
|
|
12691
|
+
);
|
|
12692
|
+
}
|
|
12693
|
+
/**
|
|
12694
|
+
* Register a destination an author can reference as `{{links.<key>}}`.
|
|
12695
|
+
*
|
|
12696
|
+
* The URL is deduplicated server-side, so registering one the workspace
|
|
12697
|
+
* already knows adopts that destination — including a row the retired
|
|
12698
|
+
* auto-harvest left unnamed, whose click history then carries forward
|
|
12699
|
+
* under the new key. Registering a URL that already has a *different* key
|
|
12700
|
+
* is a 409: renaming is what `updateTrackedLinkDestination` is for.
|
|
12701
|
+
*
|
|
12702
|
+
* Keys use the same grammar as snippet keys: lowercase letters, digits,
|
|
12703
|
+
* underscores and dots, starting with a letter (`intake_form`,
|
|
12704
|
+
* `docs.privacy`). No hyphens — Jinja2 reads `links.spring-2026` as
|
|
12705
|
+
* subtraction.
|
|
12706
|
+
*/
|
|
12707
|
+
async createTrackedLinkDestination(wid, data) {
|
|
12708
|
+
return this.fetch(`w/${wid}/tracked-links/destinations`, {
|
|
12709
|
+
method: "POST",
|
|
12710
|
+
body: JSON.stringify(data)
|
|
12711
|
+
});
|
|
12712
|
+
}
|
|
12713
|
+
/**
|
|
12714
|
+
* Re-key or relabel a destination.
|
|
12715
|
+
*
|
|
12716
|
+
* Changing `key` breaks templates: `{{links.old}}` stops resolving and the
|
|
12717
|
+
* message ships without its link. Relabelling (`name`) is always safe.
|
|
12718
|
+
* Passing `key: null` releases the handle so another destination can take
|
|
12719
|
+
* it — the non-destructive alternative to deleting, which would take the
|
|
12720
|
+
* click history with it. The URL is not editable.
|
|
12721
|
+
*/
|
|
12722
|
+
async updateTrackedLinkDestination(wid, destinationId, data) {
|
|
12723
|
+
return this.fetch(
|
|
12724
|
+
`w/${wid}/tracked-links/destinations/${destinationId}`,
|
|
12725
|
+
{ method: "PUT", body: JSON.stringify(data) }
|
|
12726
|
+
);
|
|
12727
|
+
}
|
|
12728
|
+
/** Per-destination sent / clicks / unique clickers / CTR for the window. */
|
|
12729
|
+
async getTrackedLinkStats(wid, options = {}) {
|
|
12730
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
12731
|
+
if (options.page !== void 0) params.append("page", String(options.page));
|
|
12732
|
+
if (options.pageSize !== void 0) params.append("pageSize", String(options.pageSize));
|
|
12733
|
+
if (options.q) params.append("q", options.q);
|
|
12734
|
+
if (options.sortBy) params.append("sortBy", options.sortBy);
|
|
12735
|
+
if (options.sortOrder) params.append("sortOrder", options.sortOrder);
|
|
12736
|
+
return this.fetch(
|
|
12737
|
+
`w/${wid}/tracked-links${suffix(params)}`
|
|
12738
|
+
);
|
|
12739
|
+
}
|
|
12740
|
+
/** Clicks over time for the current filter selection. */
|
|
12741
|
+
async getTrackedLinkTimeseries(wid, options = {}) {
|
|
12742
|
+
const params = withFilters(new URLSearchParams(), options);
|
|
12743
|
+
if (options.destinationId !== void 0) {
|
|
12744
|
+
params.append("destinationId", String(options.destinationId));
|
|
12745
|
+
}
|
|
12746
|
+
if (options.granularity) params.append("granularity", options.granularity);
|
|
12747
|
+
if (options.tz) params.append("tz", options.tz);
|
|
12748
|
+
return this.fetch(
|
|
12749
|
+
`w/${wid}/tracked-links/timeseries${suffix(params)}`
|
|
12750
|
+
);
|
|
12751
|
+
}
|
|
12752
|
+
/**
|
|
12753
|
+
* Delete one destination: its short links stop resolving and its recorded
|
|
12754
|
+
* clicks are removed.
|
|
12755
|
+
*
|
|
12756
|
+
* Turning the workspace setting off only stops NEW links being minted —
|
|
12757
|
+
* links already delivered to members keep working. This is the deliberate
|
|
12758
|
+
* way to break them.
|
|
12759
|
+
*/
|
|
12760
|
+
async deleteTrackedLinkDestination(wid, destinationId) {
|
|
12761
|
+
return this.fetch(
|
|
12762
|
+
`w/${wid}/tracked-links/destinations/${destinationId}`,
|
|
12763
|
+
{ method: "DELETE" }
|
|
12764
|
+
);
|
|
12765
|
+
}
|
|
12766
|
+
/** Delete every destination, its links, and its clicks. Irreversible. */
|
|
12767
|
+
async clearTrackedLinkDestinations(wid) {
|
|
12768
|
+
return this.fetch(`w/${wid}/tracked-links/destinations`, {
|
|
12769
|
+
method: "DELETE"
|
|
12770
|
+
});
|
|
12771
|
+
}
|
|
12772
|
+
};
|
|
12441
12773
|
WORKSPACE_METHOD_NAMES = [
|
|
12442
12774
|
"activateWorkflowRevision",
|
|
12443
12775
|
"addGroupMember",
|
|
@@ -12472,6 +12804,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12472
12804
|
"checkSiteSlugAvailability",
|
|
12473
12805
|
"clearConnectionMemberExclusion",
|
|
12474
12806
|
"clearMemberSwitch",
|
|
12807
|
+
"clearTrackedLinkDestinations",
|
|
12475
12808
|
"clickWorkspaceSupportRequestResource",
|
|
12476
12809
|
"cloneDataType",
|
|
12477
12810
|
"cloneTask",
|
|
@@ -12530,7 +12863,6 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12530
12863
|
"createMemberMemory",
|
|
12531
12864
|
"createMemberRole",
|
|
12532
12865
|
"createMenuItem",
|
|
12533
|
-
"createMilestone",
|
|
12534
12866
|
"createNotificationRule",
|
|
12535
12867
|
"createOperatorGroup",
|
|
12536
12868
|
"createPage",
|
|
@@ -12547,6 +12879,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12547
12879
|
"createSupervisor",
|
|
12548
12880
|
"createTask",
|
|
12549
12881
|
"createTeamsApp",
|
|
12882
|
+
"createTrackedLinkDestination",
|
|
12550
12883
|
"createWorkflow",
|
|
12551
12884
|
"createWorkflowContributor",
|
|
12552
12885
|
"createWorkflowFromTemplate",
|
|
@@ -12596,7 +12929,6 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12596
12929
|
"deleteMemberMemory",
|
|
12597
12930
|
"deleteMemberRole",
|
|
12598
12931
|
"deleteMenuItem",
|
|
12599
|
-
"deleteMilestone",
|
|
12600
12932
|
"deleteMondayConnection",
|
|
12601
12933
|
"deleteNotificationRule",
|
|
12602
12934
|
"deleteOperatorGroup",
|
|
@@ -12612,6 +12944,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12612
12944
|
"deleteSupervisor",
|
|
12613
12945
|
"deleteTask",
|
|
12614
12946
|
"deleteTeamsApp",
|
|
12947
|
+
"deleteTrackedLinkDestination",
|
|
12615
12948
|
"deleteWidgetDomain",
|
|
12616
12949
|
"deleteWorkflow",
|
|
12617
12950
|
"deleteWorkflowContributor",
|
|
@@ -12736,6 +13069,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12736
13069
|
"getChatModelOverride",
|
|
12737
13070
|
"getChatPhoneCalls",
|
|
12738
13071
|
"getChatSkills",
|
|
13072
|
+
"getManagerSkills",
|
|
12739
13073
|
"getChatTodos",
|
|
12740
13074
|
"getChatTokenUsage",
|
|
12741
13075
|
"getChatToolCallMessages",
|
|
@@ -12745,6 +13079,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12745
13079
|
"getChatsNeedsResponse",
|
|
12746
13080
|
"getChildThreadMessages",
|
|
12747
13081
|
"getClientWorkspace",
|
|
13082
|
+
"getConfigurationHealth",
|
|
12748
13083
|
"getConfluenceStatus",
|
|
12749
13084
|
"getConnectionSyncCapabilities",
|
|
12750
13085
|
"getConnectionSyncCheckpoint",
|
|
@@ -12871,6 +13206,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12871
13206
|
"getMemberMemory",
|
|
12872
13207
|
"getMemberRecordCounts",
|
|
12873
13208
|
"getMemberRole",
|
|
13209
|
+
"getMemberRoleCleanupPlan",
|
|
12874
13210
|
"getMemberRoleByUuid",
|
|
12875
13211
|
"getMemberRoles",
|
|
12876
13212
|
"getMemberSyncLinks",
|
|
@@ -12879,8 +13215,6 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12879
13215
|
"getMembersMessageActivity",
|
|
12880
13216
|
"getMenuItems",
|
|
12881
13217
|
"getMessageTiming",
|
|
12882
|
-
"getMilestone",
|
|
12883
|
-
"getMilestones",
|
|
12884
13218
|
"getMondayConnectionBoardColumns",
|
|
12885
13219
|
"getMondayConnectionBoardGroups",
|
|
12886
13220
|
"getMondayConnectionBoards",
|
|
@@ -12916,6 +13250,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12916
13250
|
"getPublicFolder",
|
|
12917
13251
|
"getPublicFolderFiles",
|
|
12918
13252
|
"getPublicProducts",
|
|
13253
|
+
"previewPromoCode",
|
|
12919
13254
|
"getQualification",
|
|
12920
13255
|
"getQualifications",
|
|
12921
13256
|
"getRecordingInfo",
|
|
@@ -12962,6 +13297,10 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
12962
13297
|
"getTool",
|
|
12963
13298
|
"getToolCallNames",
|
|
12964
13299
|
"getToolkits",
|
|
13300
|
+
"getTrackedLinkDestinations",
|
|
13301
|
+
"getTrackedLinkStats",
|
|
13302
|
+
"getTrackedLinkSummary",
|
|
13303
|
+
"getTrackedLinkTimeseries",
|
|
12965
13304
|
"getUnreadNotificationCount",
|
|
12966
13305
|
"getUsageDashboard",
|
|
12967
13306
|
"getVariableRegistry",
|
|
@@ -13038,6 +13377,14 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13038
13377
|
"listHealthiePatients",
|
|
13039
13378
|
"listHealthieProviders",
|
|
13040
13379
|
"listPersonas",
|
|
13380
|
+
"listMetrics",
|
|
13381
|
+
"getMetric",
|
|
13382
|
+
"createMetric",
|
|
13383
|
+
"updateMetric",
|
|
13384
|
+
"deleteMetric",
|
|
13385
|
+
"listMetricObservations",
|
|
13386
|
+
"getMetricSeries",
|
|
13387
|
+
"computeChatMetrics",
|
|
13041
13388
|
"listPushSubscriptions",
|
|
13042
13389
|
"listSalesforceObjects",
|
|
13043
13390
|
"listScenarios",
|
|
@@ -13048,6 +13395,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13048
13395
|
"markEmailAsRead",
|
|
13049
13396
|
"markEmailAsUnread",
|
|
13050
13397
|
"markNotificationAsRead",
|
|
13398
|
+
"mergeMemberRoles",
|
|
13051
13399
|
"previewImportMembers",
|
|
13052
13400
|
"previewImportWorkspace",
|
|
13053
13401
|
"previewRoutineWorkflowAccess",
|
|
@@ -13176,7 +13524,6 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13176
13524
|
"updateMemberLabel",
|
|
13177
13525
|
"updateMemberRole",
|
|
13178
13526
|
"updateMenuItem",
|
|
13179
|
-
"updateMilestone",
|
|
13180
13527
|
"updateMondaySyncConfig",
|
|
13181
13528
|
"updateNotificationRule",
|
|
13182
13529
|
"updateOperatorGroup",
|
|
@@ -13196,6 +13543,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13196
13543
|
"updateTask",
|
|
13197
13544
|
"updateTeamsApp",
|
|
13198
13545
|
"updateThemeSettings",
|
|
13546
|
+
"updateTrackedLinkDestination",
|
|
13199
13547
|
"uploadFile",
|
|
13200
13548
|
"updateVoicemailStatus",
|
|
13201
13549
|
"updateWorkflow",
|
|
@@ -13245,6 +13593,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13245
13593
|
getChatTokenUsage;
|
|
13246
13594
|
getChatTodos;
|
|
13247
13595
|
getChatSkills;
|
|
13596
|
+
getManagerSkills;
|
|
13248
13597
|
getChatsNeedsResponse;
|
|
13249
13598
|
getChatsDailyCreationStats;
|
|
13250
13599
|
getToolCallNames;
|
|
@@ -13362,6 +13711,8 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13362
13711
|
createMemberRole;
|
|
13363
13712
|
updateMemberRole;
|
|
13364
13713
|
deleteMemberRole;
|
|
13714
|
+
getMemberRoleCleanupPlan;
|
|
13715
|
+
mergeMemberRoles;
|
|
13365
13716
|
// Member Fields
|
|
13366
13717
|
getMemberFields;
|
|
13367
13718
|
getMemberFieldDefinitions;
|
|
@@ -13422,6 +13773,15 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13422
13773
|
createPersona;
|
|
13423
13774
|
updatePersona;
|
|
13424
13775
|
deletePersona;
|
|
13776
|
+
// Metrics API (customer-defined outcome metrics)
|
|
13777
|
+
listMetrics;
|
|
13778
|
+
getMetric;
|
|
13779
|
+
createMetric;
|
|
13780
|
+
updateMetric;
|
|
13781
|
+
deleteMetric;
|
|
13782
|
+
listMetricObservations;
|
|
13783
|
+
getMetricSeries;
|
|
13784
|
+
computeChatMetrics;
|
|
13425
13785
|
// Dashboards API
|
|
13426
13786
|
getDashboards;
|
|
13427
13787
|
getDashboard;
|
|
@@ -13430,8 +13790,18 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13430
13790
|
deleteDashboard;
|
|
13431
13791
|
getDashboardChannelStats;
|
|
13432
13792
|
getDashboardWorkflowAssignmentStats;
|
|
13793
|
+
getConfigurationHealth;
|
|
13433
13794
|
// MOTD API
|
|
13434
13795
|
getMotd;
|
|
13796
|
+
// Tracked Links analytics (#10934)
|
|
13797
|
+
getTrackedLinkSummary;
|
|
13798
|
+
getTrackedLinkDestinations;
|
|
13799
|
+
getTrackedLinkStats;
|
|
13800
|
+
getTrackedLinkTimeseries;
|
|
13801
|
+
createTrackedLinkDestination;
|
|
13802
|
+
updateTrackedLinkDestination;
|
|
13803
|
+
deleteTrackedLinkDestination;
|
|
13804
|
+
clearTrackedLinkDestinations;
|
|
13435
13805
|
// Journeys API
|
|
13436
13806
|
getJourneys;
|
|
13437
13807
|
getJourney;
|
|
@@ -13536,6 +13906,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13536
13906
|
getProduct;
|
|
13537
13907
|
getWorkspaceProduct;
|
|
13538
13908
|
getPublicProducts;
|
|
13909
|
+
previewPromoCode;
|
|
13539
13910
|
getPublicProduct;
|
|
13540
13911
|
createProduct;
|
|
13541
13912
|
updateProduct;
|
|
@@ -13573,6 +13944,11 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13573
13944
|
updateBusinessProfile;
|
|
13574
13945
|
submitBusinessProfile;
|
|
13575
13946
|
cancelBusinessProfile;
|
|
13947
|
+
listLegalEntities;
|
|
13948
|
+
getLegalEntity;
|
|
13949
|
+
createLegalEntity;
|
|
13950
|
+
getVoiceTrustProducts;
|
|
13951
|
+
syncVoiceTrustProducts;
|
|
13576
13952
|
createOrganizationWorkspace;
|
|
13577
13953
|
getOrgBillingCustomer;
|
|
13578
13954
|
getVapidPublicKey;
|
|
@@ -13834,11 +14210,6 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13834
14210
|
linkCalendarToGoogle;
|
|
13835
14211
|
unlinkCalendarFromGoogle;
|
|
13836
14212
|
syncCalendarWithGoogle;
|
|
13837
|
-
getMilestones;
|
|
13838
|
-
getMilestone;
|
|
13839
|
-
createMilestone;
|
|
13840
|
-
updateMilestone;
|
|
13841
|
-
deleteMilestone;
|
|
13842
14213
|
// Communications API
|
|
13843
14214
|
getPhoneNumbers;
|
|
13844
14215
|
getAvailablePhoneNumbers;
|
|
@@ -13890,6 +14261,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
13890
14261
|
getSTTModels;
|
|
13891
14262
|
getTTSModels;
|
|
13892
14263
|
getVoiceModels;
|
|
14264
|
+
getVoicePresets;
|
|
13893
14265
|
getAllModels;
|
|
13894
14266
|
getCustomToolkits;
|
|
13895
14267
|
getCustomToolkit;
|
|
@@ -14217,9 +14589,11 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
14217
14589
|
bindAgentsMethods(this, apis.agents);
|
|
14218
14590
|
bindQualificationsMethods(this, apis.qualifications);
|
|
14219
14591
|
bindPersonasMethods(this, apis.personas);
|
|
14592
|
+
bindMetricsMethods(this, apis.metrics);
|
|
14220
14593
|
bindQueriesMethods(this, apis.queries);
|
|
14221
14594
|
bindDashboardsMethods(this, apis.dashboards);
|
|
14222
14595
|
bindMotdMethods(this, apis.motd);
|
|
14596
|
+
bindTrackedLinksMethods(this, apis.trackedLinks);
|
|
14223
14597
|
bindJourneysMethods(this, apis.journeys);
|
|
14224
14598
|
bindExperimentsMethods(this, apis.experiments);
|
|
14225
14599
|
bindOperatorMethods(this, apis.operatorGroups);
|
|
@@ -14232,7 +14606,7 @@ var init_chunk_QTJQTTIR = __esm({
|
|
|
14232
14606
|
bindFilesMethods(this, apis.files);
|
|
14233
14607
|
bindEventsMethods(this, apis.events);
|
|
14234
14608
|
bindWorkflowsMethods(this, apis.workflows, apis.workflowNotes, apis.voice, apis.supervisors);
|
|
14235
|
-
bindCalendarsMethods(this, apis.calendars
|
|
14609
|
+
bindCalendarsMethods(this, apis.calendars);
|
|
14236
14610
|
bindCommunicationsMethods(this, apis.phoneNumbers, apis.inboxes, apis.notificationRules);
|
|
14237
14611
|
bindToolkitsMethods(
|
|
14238
14612
|
this,
|
|
@@ -14405,9 +14779,9 @@ var init_chunk_2YLKG4TT = __esm({
|
|
|
14405
14779
|
var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS;
|
|
14406
14780
|
var init_dist = __esm({
|
|
14407
14781
|
"../sdk/dist/index.js"() {
|
|
14408
|
-
|
|
14782
|
+
init_chunk_CEFOCGYO();
|
|
14409
14783
|
init_chunk_2YLKG4TT();
|
|
14410
|
-
|
|
14784
|
+
init_chunk_PJFEGUHM();
|
|
14411
14785
|
SEARCHABLE_EVENT_RULE_SOURCE_FIELDS = [
|
|
14412
14786
|
"taskId",
|
|
14413
14787
|
"dataTypeId",
|
|
@@ -16268,6 +16642,19 @@ var COMMON_ARGS = [
|
|
|
16268
16642
|
{ name: "id", description: "Entity ID" },
|
|
16269
16643
|
{ name: "uuid", description: "Entity UUID" }
|
|
16270
16644
|
];
|
|
16645
|
+
var ORG_UUID_ARG = {
|
|
16646
|
+
name: "org-uuid",
|
|
16647
|
+
aliases: ["org"],
|
|
16648
|
+
description: "Organization UUID or ID",
|
|
16649
|
+
required: true
|
|
16650
|
+
};
|
|
16651
|
+
function requireOrgRef(args) {
|
|
16652
|
+
const val = args["org-uuid"] ?? args.org;
|
|
16653
|
+
if (typeof val !== "string" || !val) {
|
|
16654
|
+
throw new CLIError("Missing required argument: --org-uuid");
|
|
16655
|
+
}
|
|
16656
|
+
return val;
|
|
16657
|
+
}
|
|
16271
16658
|
function parseArgs(defs, argv) {
|
|
16272
16659
|
const allDefs = [...defs, ...COMMON_ARGS];
|
|
16273
16660
|
const result3 = {};
|
|
@@ -16640,8 +17027,8 @@ function crudCommands(config) {
|
|
|
16640
17027
|
requiresWorkspace ? [hctx.workspace, id, cascade] : [id, cascade],
|
|
16641
17028
|
resolveClient
|
|
16642
17029
|
);
|
|
16643
|
-
const
|
|
16644
|
-
process.stdout.write(`Deleted ${entityName} ${id}${
|
|
17030
|
+
const suffix2 = result3 && typeof result3 === "object" && "deletedTaskCount" in result3 && result3.deletedTaskCount ? ` and ${result3.deletedTaskCount} child entities` : "";
|
|
17031
|
+
process.stdout.write(`Deleted ${entityName} ${id}${suffix2}
|
|
16645
17032
|
`);
|
|
16646
17033
|
} else {
|
|
16647
17034
|
await callApiWithId(
|
|
@@ -16779,8 +17166,8 @@ var CommandRegistry = class {
|
|
|
16779
17166
|
const key = cmd.path.join(" ");
|
|
16780
17167
|
this.commands.set(key, cmd);
|
|
16781
17168
|
}
|
|
16782
|
-
registerCommands(
|
|
16783
|
-
for (const cmd of
|
|
17169
|
+
registerCommands(commands4) {
|
|
17170
|
+
for (const cmd of commands4) {
|
|
16784
17171
|
this.registerCommand(cmd);
|
|
16785
17172
|
}
|
|
16786
17173
|
}
|
|
@@ -17159,6 +17546,43 @@ var agentTasksDomain = {
|
|
|
17159
17546
|
// src/domains/agents.ts
|
|
17160
17547
|
init_output();
|
|
17161
17548
|
var COLUMNS = [COL.id(), COL.uuid(), COL.name(), COL.status(), COL.created()];
|
|
17549
|
+
var AGENT_FIELD_REFERENCE = `
|
|
17550
|
+
Field reference for --data JSON (create/update):
|
|
17551
|
+
|
|
17552
|
+
Required on create
|
|
17553
|
+
name (string) Display name
|
|
17554
|
+
chatModelId (string) Text chat model ID (see \`gr ai-models chat\`)
|
|
17555
|
+
e.g. "aws:bedrock:claude-4-5-haiku"
|
|
17556
|
+
|
|
17557
|
+
Optional
|
|
17558
|
+
description (string) Short summary shown in listings
|
|
17559
|
+
systemPrompt (string) Base instructions / identity
|
|
17560
|
+
chatModelConfig (object|null) Chat model overrides (temperature, thinking, \u2026)
|
|
17561
|
+
realtimeModelId (string|null) Voice/realtime model (see \`gr ai-models realtime\`)
|
|
17562
|
+
e.g. "xai:realtime:voice-agent-2" (Grok Voice Think Fast 2)
|
|
17563
|
+
Native models auto-fill tts=native + default voice when
|
|
17564
|
+
realtimeModelConfig is omitted.
|
|
17565
|
+
realtimeModelConfig (object|null) Realtime config. Native example:
|
|
17566
|
+
{"ttsModel":"native","voiceModel":"xai:voice:eve"}
|
|
17567
|
+
Composable (custom:realtime:composable) needs
|
|
17568
|
+
voiceModel + ttsModel + inferenceModel.
|
|
17569
|
+
memberRoleId (number) Role id (omit to use the default Agent role)
|
|
17570
|
+
email / phone / externalId Optional contact fields
|
|
17571
|
+
labelIds (number[]) Member label ids
|
|
17572
|
+
codeInterpreterEnabled (bool)
|
|
17573
|
+
maxDailyActions (number|null)
|
|
17574
|
+
|
|
17575
|
+
Attach an agent\u2019s models/identity to a workflow (draft), then publish:
|
|
17576
|
+
gr workflows update --id <wf> -d '{"copyFromAgentId": <agentId>}'
|
|
17577
|
+
gr workflows publish --id <wf>
|
|
17578
|
+
|
|
17579
|
+
One-shot workflow voice WITHOUT creating an agent (preferred for "use Grok Voice 2"):
|
|
17580
|
+
gr workflows update --id <wf> -d '{"realtimeModelId":"xai:realtime:voice-agent-2"}'
|
|
17581
|
+
gr workflows publish --id <wf>
|
|
17582
|
+
|
|
17583
|
+
List models:
|
|
17584
|
+
gr ai-models chat | realtime | voice
|
|
17585
|
+
`;
|
|
17162
17586
|
var agentsDomain = {
|
|
17163
17587
|
name: "agents",
|
|
17164
17588
|
description: "Manage agents",
|
|
@@ -17175,9 +17599,16 @@ var agentsDomain = {
|
|
|
17175
17599
|
unarchiveMethod: "unarchiveAgent",
|
|
17176
17600
|
columns: COLUMNS,
|
|
17177
17601
|
paginationSupport: "full",
|
|
17178
|
-
|
|
17602
|
+
createHelp: `Create an agent
|
|
17603
|
+
${AGENT_FIELD_REFERENCE}`,
|
|
17604
|
+
updateHelp: `Update an agent. All fields optional.
|
|
17605
|
+
${AGENT_FIELD_REFERENCE}`,
|
|
17606
|
+
createExamples: [
|
|
17607
|
+
`gr agents create -d '{"name":"Support","chatModelId":"aws:bedrock:claude-4-5-haiku","realtimeModelId":"xai:realtime:voice-agent-2"}'`,
|
|
17608
|
+
"gr agents create --file agent.json"
|
|
17609
|
+
],
|
|
17179
17610
|
updateExamples: [
|
|
17180
|
-
`gr agents update --id 42
|
|
17611
|
+
`gr agents update --id 42 -d '{"realtimeModelId":"xai:realtime:voice-agent-2"}'`,
|
|
17181
17612
|
"gr agents update --id 42 --file agent.json"
|
|
17182
17613
|
]
|
|
17183
17614
|
})
|
|
@@ -17255,6 +17686,42 @@ var FEEDBACK_COLUMNS = [
|
|
|
17255
17686
|
},
|
|
17256
17687
|
COL.created()
|
|
17257
17688
|
];
|
|
17689
|
+
async function respondWithValue(ctx, workspace, args) {
|
|
17690
|
+
const chatId = requireIdOrUuidFrom(args, "chat-id", "id");
|
|
17691
|
+
const chat = await requireAuth(ctx).apiClient.getChat(workspace, chatId);
|
|
17692
|
+
const interrupt = chat?.interrupt;
|
|
17693
|
+
if (!interrupt || !interrupt.interruptId) {
|
|
17694
|
+
throw new Error("No pending interrupt on this chat.");
|
|
17695
|
+
}
|
|
17696
|
+
const raw = args.value;
|
|
17697
|
+
if (typeof raw !== "string" || !raw.length) {
|
|
17698
|
+
throw new Error(
|
|
17699
|
+
`A --value is required. For a form pass the field map as JSON, e.g. --value '{"channels":"sms,voice","days":"2"}'; for a choice list pass the chosen value.`
|
|
17700
|
+
);
|
|
17701
|
+
}
|
|
17702
|
+
const url = `${ctx.envConfig.apiUrl}/api/v2/w/${workspace}/chats/${chat.id}/inference/hitl`;
|
|
17703
|
+
const response = await fetch(url, {
|
|
17704
|
+
method: "POST",
|
|
17705
|
+
headers: {
|
|
17706
|
+
Authorization: `Bearer ${requireAuth(ctx).accessToken}`,
|
|
17707
|
+
"Content-Type": "application/json"
|
|
17708
|
+
},
|
|
17709
|
+
body: JSON.stringify({ chosenValue: raw, interruptId: interrupt.interruptId })
|
|
17710
|
+
});
|
|
17711
|
+
if (!response.ok) {
|
|
17712
|
+
throw new Error(
|
|
17713
|
+
`Resume failed (${response.status}): ${(await response.text()).slice(0, 400)}`
|
|
17714
|
+
);
|
|
17715
|
+
}
|
|
17716
|
+
outputSingle(
|
|
17717
|
+
{
|
|
17718
|
+
status: "resumed",
|
|
17719
|
+
chatId: chat.id,
|
|
17720
|
+
next: `gr chats inspect --id ${chat.id} -w ${workspace}`
|
|
17721
|
+
},
|
|
17722
|
+
ctx
|
|
17723
|
+
);
|
|
17724
|
+
}
|
|
17258
17725
|
async function respondToInterrupt(ctx, workspace, args, decisionType) {
|
|
17259
17726
|
const chatId = requireIdOrUuidFrom(args, "chat-id", "id");
|
|
17260
17727
|
const chat = await requireAuth(ctx).apiClient.getChat(workspace, chatId);
|
|
@@ -17287,6 +17754,27 @@ async function respondToInterrupt(ctx, workspace, args, decisionType) {
|
|
|
17287
17754
|
if (streamError) throw new Error(`Inference error: ${streamError}`);
|
|
17288
17755
|
outputSingle({ role: "assistant", content: buffered }, ctx, MESSAGE_COLUMNS2);
|
|
17289
17756
|
}
|
|
17757
|
+
function isDevProfile(env) {
|
|
17758
|
+
return env === "dev" || env === "development" || env === "local";
|
|
17759
|
+
}
|
|
17760
|
+
function isLocalApiOrigin(apiUrl) {
|
|
17761
|
+
if (!apiUrl) return false;
|
|
17762
|
+
try {
|
|
17763
|
+
const host = new URL(apiUrl).hostname.replace(/^\[|\]$/g, "");
|
|
17764
|
+
return host === "localhost" || host === "127.0.0.1" || host === "::1" || host.endsWith(".gravityrail.test");
|
|
17765
|
+
} catch {
|
|
17766
|
+
return false;
|
|
17767
|
+
}
|
|
17768
|
+
}
|
|
17769
|
+
async function shouldRedactChatContent(ctx, apiClient, workspace) {
|
|
17770
|
+
if (isDevProfile(ctx.env) && isLocalApiOrigin(ctx.envConfig?.apiUrl)) return false;
|
|
17771
|
+
try {
|
|
17772
|
+
const ws = await apiClient.getWorkspace(workspace);
|
|
17773
|
+
return ws.phiPostureDecision !== "allow_non_phi";
|
|
17774
|
+
} catch {
|
|
17775
|
+
return true;
|
|
17776
|
+
}
|
|
17777
|
+
}
|
|
17290
17778
|
var chatsDomain = {
|
|
17291
17779
|
name: "chats",
|
|
17292
17780
|
description: "Manage chats",
|
|
@@ -17483,6 +17971,28 @@ var chatsDomain = {
|
|
|
17483
17971
|
await respondToInterrupt(ctx, workspace, args, decisionType);
|
|
17484
17972
|
}
|
|
17485
17973
|
},
|
|
17974
|
+
{
|
|
17975
|
+
path: ["chats", "interrupt", "respond"],
|
|
17976
|
+
description: "Answer a chat's pending UI interrupt (form or choice list) with a value, and stream the continued reply.",
|
|
17977
|
+
mutates: true,
|
|
17978
|
+
requiresWorkspace: true,
|
|
17979
|
+
args: [
|
|
17980
|
+
{
|
|
17981
|
+
name: "chat-id",
|
|
17982
|
+
aliases: ["id"],
|
|
17983
|
+
description: "Chat ID (numeric id preferred; uuid accepted)",
|
|
17984
|
+
required: true
|
|
17985
|
+
},
|
|
17986
|
+
{
|
|
17987
|
+
name: "value",
|
|
17988
|
+
description: `The answer. For a form, the field map as JSON (e.g. '{"channels":"sms,voice","days":"2"}'); for a choice list, the chosen value.`,
|
|
17989
|
+
required: true
|
|
17990
|
+
}
|
|
17991
|
+
],
|
|
17992
|
+
handler: async ({ ctx, workspace, args }) => {
|
|
17993
|
+
await respondWithValue(ctx, workspace, args);
|
|
17994
|
+
}
|
|
17995
|
+
},
|
|
17486
17996
|
{
|
|
17487
17997
|
path: ["chats", "interrupt", "deny"],
|
|
17488
17998
|
description: "Reject a chat's pending approval request with a reason.",
|
|
@@ -17513,7 +18023,17 @@ var chatsDomain = {
|
|
|
17513
18023
|
description: "Chat ID (numeric id preferred; uuid accepted)",
|
|
17514
18024
|
required: true
|
|
17515
18025
|
},
|
|
17516
|
-
{ name: "stream", description: "Stream the AI response via AG-UI", isFlag: true }
|
|
18026
|
+
{ name: "stream", description: "Stream the AI response via AG-UI", isFlag: true },
|
|
18027
|
+
{
|
|
18028
|
+
// Read by the handler below since this command was written, but
|
|
18029
|
+
// never declared — so `--auto-approve` parsed as nothing and the
|
|
18030
|
+
// turn stopped on every tool call anyway. Driving a manager turn
|
|
18031
|
+
// from the CLI meant approving each exec by hand, which is why
|
|
18032
|
+
// multi-turn QA was impractical.
|
|
18033
|
+
name: "auto-approve",
|
|
18034
|
+
description: "Approve tool calls automatically for this turn (development QA). Capability round-trips (screenshots, browser, forms) still prompt.",
|
|
18035
|
+
isFlag: true
|
|
18036
|
+
}
|
|
17517
18037
|
],
|
|
17518
18038
|
handler: async ({ ctx, workspace, args, data }) => {
|
|
17519
18039
|
const content = typeof data === "string" ? data : data?.content;
|
|
@@ -17548,7 +18068,11 @@ var chatsDomain = {
|
|
|
17548
18068
|
);
|
|
17549
18069
|
process.stdout.write("\n");
|
|
17550
18070
|
if (!streamed.trim()) {
|
|
17551
|
-
await printPendingApproval(ctx, workspace, chatId)
|
|
18071
|
+
if (!await printPendingApproval(ctx, workspace, chatId)) {
|
|
18072
|
+
throw new Error(
|
|
18073
|
+
`No response was produced for chat ${chatId}, and no approval is pending. The inference stream ended without emitting anything \u2014 usually the turn never started.`
|
|
18074
|
+
);
|
|
18075
|
+
}
|
|
17552
18076
|
}
|
|
17553
18077
|
} else {
|
|
17554
18078
|
const aguiClient = new AGUIClient({
|
|
@@ -17578,6 +18102,9 @@ var chatsDomain = {
|
|
|
17578
18102
|
chatId
|
|
17579
18103
|
);
|
|
17580
18104
|
if (await printPendingApproval(ctx, workspace, chatId, chat)) return;
|
|
18105
|
+
throw new Error(
|
|
18106
|
+
`No response was produced for chat ${chatId}, and no approval is pending. The inference stream ended without emitting anything \u2014 usually the turn never started. Check the API log for "Inference stream timed out for key inference:${workspace}:${chatId}" and the temporal-worker log for an "inference-${workspace}-${chatId}" workflow.`
|
|
18107
|
+
);
|
|
17581
18108
|
}
|
|
17582
18109
|
outputSingle(
|
|
17583
18110
|
{
|
|
@@ -17720,6 +18247,8 @@ var chatsDomain = {
|
|
|
17720
18247
|
authed.apiClient.getChat(workspace, chatId),
|
|
17721
18248
|
authed.apiClient.getChatMessages(workspace, chatId)
|
|
17722
18249
|
]);
|
|
18250
|
+
const redact = await shouldRedactChatContent(ctx, authed.apiClient, workspace);
|
|
18251
|
+
const hide = (value) => redact ? "[REDACTED]" : value;
|
|
17723
18252
|
const result3 = {
|
|
17724
18253
|
chat: {
|
|
17725
18254
|
id: chat.id,
|
|
@@ -17735,7 +18264,7 @@ var chatsDomain = {
|
|
|
17735
18264
|
// field projections (#20262). Always an array so the key
|
|
17736
18265
|
// survives JSON serialization even when the API omits it.
|
|
17737
18266
|
participants: (chat.participants ?? []).map((p) => ({
|
|
17738
|
-
name:
|
|
18267
|
+
name: hide(p.name),
|
|
17739
18268
|
role: p.role,
|
|
17740
18269
|
memberId: p.memberId ?? null,
|
|
17741
18270
|
memberType: p.memberType ?? null
|
|
@@ -17743,11 +18272,13 @@ var chatsDomain = {
|
|
|
17743
18272
|
},
|
|
17744
18273
|
// Deliberate allow-list — never spread the API message. PHI
|
|
17745
18274
|
// lives in content and (if ever added) sttMetadata.words
|
|
17746
|
-
// (#21973)
|
|
18275
|
+
// (#21973), so nothing beyond these three keys is emitted; the
|
|
18276
|
+
// content itself is gated on posture (see
|
|
18277
|
+
// shouldRedactChatContent), not blanket-hidden.
|
|
17747
18278
|
messages: messages.map((m) => ({
|
|
17748
18279
|
id: m.id,
|
|
17749
18280
|
role: m.role,
|
|
17750
|
-
content:
|
|
18281
|
+
content: hide(m.content)
|
|
17751
18282
|
}))
|
|
17752
18283
|
};
|
|
17753
18284
|
const assignmentId = chat.assignmentId;
|
|
@@ -17765,7 +18296,7 @@ var chatsDomain = {
|
|
|
17765
18296
|
dataRecords: assignment.dataRecords?.map((dr) => ({
|
|
17766
18297
|
id: dr.id,
|
|
17767
18298
|
dataTypeId: dr.dataTypeId,
|
|
17768
|
-
fieldValues:
|
|
18299
|
+
fieldValues: hide(dr.fieldValues)
|
|
17769
18300
|
}))
|
|
17770
18301
|
};
|
|
17771
18302
|
}
|
|
@@ -18161,8 +18692,26 @@ Core
|
|
|
18161
18692
|
name (string) Display name
|
|
18162
18693
|
description (string, optional)
|
|
18163
18694
|
defaultPhoneNumberId (number|null) Outbound caller ID (workspace phone id)
|
|
18695
|
+
defaultInboxId (number|null) Default inbox for inbound messaging
|
|
18164
18696
|
permissions (object, optional) Workflow-level permission flags
|
|
18165
18697
|
|
|
18698
|
+
Assistant / models (live on the DRAFT revision \u2014 publish to go live)
|
|
18699
|
+
assistantName (string) Display name for the workflow assistant
|
|
18700
|
+
assistantIdentity (string) Persona / identity instructions
|
|
18701
|
+
chatModelId (string) Text chat model (see \`gr ai-models chat\`)
|
|
18702
|
+
chatModelConfig (object|null) Chat model overrides
|
|
18703
|
+
realtimeModelId (string|null) Voice/realtime model (see \`gr ai-models realtime\`)
|
|
18704
|
+
One-shot voice example:
|
|
18705
|
+
{"realtimeModelId":"xai:realtime:voice-agent-2"}
|
|
18706
|
+
Native models auto-fill tts=native + default voice
|
|
18707
|
+
(xAI \u2192 xai:voice:eve). Optional explicit config:
|
|
18708
|
+
{"realtimeModelId":"xai:realtime:voice-agent-2",
|
|
18709
|
+
"realtimeModelConfig":{"ttsModel":"native",
|
|
18710
|
+
"voiceModel":"xai:voice:ara"}}
|
|
18711
|
+
realtimeModelConfig (object|null) Realtime config; omit for provider defaults
|
|
18712
|
+
copyFromAgentId (number) Copy full assistant settings from an agent
|
|
18713
|
+
copyFromWorkflowRevisionId (number) Copy assistant settings from a revision
|
|
18714
|
+
|
|
18166
18715
|
Member role access (memberRoleAccess)
|
|
18167
18716
|
Array of objects, NOT bare role ids:
|
|
18168
18717
|
[{"memberRoleId": 6, "accessMode": 1}]
|
|
@@ -18188,6 +18737,9 @@ Use the dedicated commands:
|
|
|
18188
18737
|
workflows revisions edit Branch a published revision back into the draft
|
|
18189
18738
|
workflows revisions diff Compare two revisions
|
|
18190
18739
|
workflows revisions update Edit a revision's label / publish notes
|
|
18740
|
+
|
|
18741
|
+
After changing assistant/realtime fields, publish so live traffic picks them up:
|
|
18742
|
+
gr workflows publish --id <workflowId>
|
|
18191
18743
|
`;
|
|
18192
18744
|
|
|
18193
18745
|
// src/domains/workflows.ts
|
|
@@ -19104,8 +19656,6 @@ Provisioning started. Watch it come up with:
|
|
|
19104
19656
|
"inboxes",
|
|
19105
19657
|
"routines",
|
|
19106
19658
|
"memberFilters",
|
|
19107
|
-
"milestones",
|
|
19108
|
-
"milestoneGoals",
|
|
19109
19659
|
"customToolkits",
|
|
19110
19660
|
"customTools",
|
|
19111
19661
|
"pages",
|
|
@@ -19186,8 +19736,6 @@ Provisioning started. Watch it come up with:
|
|
|
19186
19736
|
"inboxes",
|
|
19187
19737
|
"routines",
|
|
19188
19738
|
"memberFilters",
|
|
19189
|
-
"milestones",
|
|
19190
|
-
"milestoneGoals",
|
|
19191
19739
|
"customToolkits",
|
|
19192
19740
|
"customTools",
|
|
19193
19741
|
"pages",
|
|
@@ -21599,9 +22147,160 @@ var journeysDomain = {
|
|
|
21599
22147
|
]
|
|
21600
22148
|
};
|
|
21601
22149
|
|
|
21602
|
-
// src/domains/
|
|
22150
|
+
// src/domains/metrics.ts
|
|
21603
22151
|
init_output();
|
|
22152
|
+
init_context();
|
|
22153
|
+
init_errors();
|
|
21604
22154
|
var COLUMNS11 = [
|
|
22155
|
+
COL.id(),
|
|
22156
|
+
COL.name(),
|
|
22157
|
+
{ header: "SLUG", getValue: (item) => item.slug ?? "" },
|
|
22158
|
+
{ header: "TYPE", getValue: (item) => item.metricType ?? "" },
|
|
22159
|
+
{ header: "SOURCE", getValue: (item) => item.source ?? "" },
|
|
22160
|
+
{ header: "UNIT", getValue: (item) => item.unit ?? "" },
|
|
22161
|
+
{
|
|
22162
|
+
header: "ENABLED",
|
|
22163
|
+
getValue: (item) => item.enabled ? "yes" : "no"
|
|
22164
|
+
},
|
|
22165
|
+
COL.created()
|
|
22166
|
+
];
|
|
22167
|
+
var OBS_COLUMNS = [
|
|
22168
|
+
COL.id(),
|
|
22169
|
+
{ header: "VALUE", getValue: (item) => String(item.value ?? "") },
|
|
22170
|
+
{ header: "OBSERVED_AT", getValue: (item) => item.observedAt ?? "" },
|
|
22171
|
+
{
|
|
22172
|
+
header: "CHAT_ID",
|
|
22173
|
+
getValue: (item) => item.chatId != null ? String(item.chatId) : ""
|
|
22174
|
+
},
|
|
22175
|
+
{
|
|
22176
|
+
header: "MEMBER_ID",
|
|
22177
|
+
getValue: (item) => item.memberId != null ? String(item.memberId) : ""
|
|
22178
|
+
}
|
|
22179
|
+
];
|
|
22180
|
+
var metricsDomain = {
|
|
22181
|
+
name: "metrics",
|
|
22182
|
+
description: "Customer-defined outcome metrics (CEL expression or LLM rubric) with time-series readout",
|
|
22183
|
+
commands: [
|
|
22184
|
+
...crudCommands({
|
|
22185
|
+
prefix: ["metrics"],
|
|
22186
|
+
entityName: "metric",
|
|
22187
|
+
listMethod: "listMetrics",
|
|
22188
|
+
getMethod: "getMetric",
|
|
22189
|
+
createMethod: "createMetric",
|
|
22190
|
+
updateMethod: "updateMetric",
|
|
22191
|
+
deleteMethod: "deleteMetric",
|
|
22192
|
+
columns: COLUMNS11,
|
|
22193
|
+
paginationSupport: "full",
|
|
22194
|
+
createExamples: [
|
|
22195
|
+
`yarn gr metrics create -w $WID --allow-write --data '{"name":"SMS Channel Rate","metricType":"expression","celExpression":"chat.channel == \\"phone-sms\\"","unit":"rate"}'`,
|
|
22196
|
+
`yarn gr metrics create -w $WID --allow-write --data '{"name":"Qualified Engagement","metricType":"rubric","evaluationPrompt":"Did the user show buying intent?","unit":"rate"}'`
|
|
22197
|
+
],
|
|
22198
|
+
createHelp: "Create a metric definition. metricType is expression (CEL) or rubric (LLM). MVP source is chat only."
|
|
22199
|
+
}),
|
|
22200
|
+
{
|
|
22201
|
+
path: ["metrics", "observations"],
|
|
22202
|
+
description: "List raw observations for a metric in a date range (may include PHI reason)",
|
|
22203
|
+
args: [
|
|
22204
|
+
{ name: "id", required: true, description: "Metric ID" },
|
|
22205
|
+
{
|
|
22206
|
+
name: "start",
|
|
22207
|
+
required: true,
|
|
22208
|
+
description: "ISO-8601 inclusive lower bound on observed_at"
|
|
22209
|
+
},
|
|
22210
|
+
{
|
|
22211
|
+
name: "end",
|
|
22212
|
+
required: true,
|
|
22213
|
+
description: "ISO-8601 exclusive upper bound on observed_at"
|
|
22214
|
+
},
|
|
22215
|
+
{ name: "page", description: "Page number (default 1)" },
|
|
22216
|
+
{ name: "page-size", description: "Page size (default 100)" }
|
|
22217
|
+
],
|
|
22218
|
+
requiresWorkspace: true,
|
|
22219
|
+
examples: [
|
|
22220
|
+
"yarn gr metrics observations --id 1 --start 2026-07-01T00:00:00Z --end 2026-08-01T00:00:00Z"
|
|
22221
|
+
],
|
|
22222
|
+
handler: async (hctx) => {
|
|
22223
|
+
const client = requireAuth(hctx.ctx).apiClient;
|
|
22224
|
+
const id = requireNumber(hctx.args, "id");
|
|
22225
|
+
const start = requireString(hctx.args, "start");
|
|
22226
|
+
const end = requireString(hctx.args, "end");
|
|
22227
|
+
const page = hctx.args["page"] != null ? Number(hctx.args["page"]) : void 0;
|
|
22228
|
+
const pageSize = hctx.args["page-size"] != null ? Number(hctx.args["page-size"]) : void 0;
|
|
22229
|
+
const result3 = await client.listMetricObservations(hctx.workspace, id, {
|
|
22230
|
+
start,
|
|
22231
|
+
end,
|
|
22232
|
+
page,
|
|
22233
|
+
pageSize
|
|
22234
|
+
});
|
|
22235
|
+
outputData(result3.items ?? result3, hctx.ctx, OBS_COLUMNS);
|
|
22236
|
+
}
|
|
22237
|
+
},
|
|
22238
|
+
{
|
|
22239
|
+
path: ["metrics", "series"],
|
|
22240
|
+
description: "Time-bucketed aggregation for a metric (numeric only)",
|
|
22241
|
+
args: [
|
|
22242
|
+
{ name: "id", required: true, description: "Metric ID" },
|
|
22243
|
+
{
|
|
22244
|
+
name: "start",
|
|
22245
|
+
required: true,
|
|
22246
|
+
description: "ISO-8601 inclusive lower bound on observed_at"
|
|
22247
|
+
},
|
|
22248
|
+
{
|
|
22249
|
+
name: "end",
|
|
22250
|
+
required: true,
|
|
22251
|
+
description: "ISO-8601 exclusive upper bound on observed_at"
|
|
22252
|
+
},
|
|
22253
|
+
{ name: "bucket", description: "day | week (default day)" },
|
|
22254
|
+
{
|
|
22255
|
+
name: "aggregation",
|
|
22256
|
+
description: "avg | sum | count | rate (default avg)"
|
|
22257
|
+
}
|
|
22258
|
+
],
|
|
22259
|
+
requiresWorkspace: true,
|
|
22260
|
+
examples: [
|
|
22261
|
+
"yarn gr metrics series --id 1 --start 2026-07-01T00:00:00Z --end 2026-08-01T00:00:00Z --bucket day"
|
|
22262
|
+
],
|
|
22263
|
+
handler: async (hctx) => {
|
|
22264
|
+
const client = requireAuth(hctx.ctx).apiClient;
|
|
22265
|
+
const id = requireNumber(hctx.args, "id");
|
|
22266
|
+
const result3 = await client.getMetricSeries(hctx.workspace, id, {
|
|
22267
|
+
start: requireString(hctx.args, "start"),
|
|
22268
|
+
end: requireString(hctx.args, "end"),
|
|
22269
|
+
bucket: hctx.args["bucket"] ?? "day",
|
|
22270
|
+
aggregation: hctx.args["aggregation"] ?? "avg"
|
|
22271
|
+
});
|
|
22272
|
+
outputSingle(result3, hctx.ctx);
|
|
22273
|
+
}
|
|
22274
|
+
},
|
|
22275
|
+
{
|
|
22276
|
+
path: ["metrics", "compute-for-chat"],
|
|
22277
|
+
description: "On-demand evaluate enabled chat-source metrics for one chat (writes observations + dual-write feedback)",
|
|
22278
|
+
args: [
|
|
22279
|
+
{
|
|
22280
|
+
name: "chat-id",
|
|
22281
|
+
required: true,
|
|
22282
|
+
description: "Chat ID to evaluate"
|
|
22283
|
+
}
|
|
22284
|
+
],
|
|
22285
|
+
requiresWorkspace: true,
|
|
22286
|
+
mutates: true,
|
|
22287
|
+
examples: ["yarn gr metrics compute-for-chat --chat-id 42 --allow-write"],
|
|
22288
|
+
handler: async (hctx) => {
|
|
22289
|
+
const client = requireAuth(hctx.ctx).apiClient;
|
|
22290
|
+
const chatId = requireNumber(hctx.args, "chat-id");
|
|
22291
|
+
if (chatId < 1) {
|
|
22292
|
+
throw new CLIError("--chat-id must be a positive number");
|
|
22293
|
+
}
|
|
22294
|
+
const result3 = await client.computeChatMetrics(hctx.workspace, { chatId });
|
|
22295
|
+
outputSingle(result3, hctx.ctx);
|
|
22296
|
+
}
|
|
22297
|
+
}
|
|
22298
|
+
]
|
|
22299
|
+
};
|
|
22300
|
+
|
|
22301
|
+
// src/domains/personas.ts
|
|
22302
|
+
init_output();
|
|
22303
|
+
var COLUMNS12 = [
|
|
21605
22304
|
COL.id(),
|
|
21606
22305
|
COL.name(),
|
|
21607
22306
|
{ header: "AGE", getValue: (item) => item.age != null ? String(item.age) : "" },
|
|
@@ -21631,7 +22330,7 @@ var personasDomain = {
|
|
|
21631
22330
|
createMethod: "createPersona",
|
|
21632
22331
|
updateMethod: "updatePersona",
|
|
21633
22332
|
deleteMethod: "deletePersona",
|
|
21634
|
-
columns:
|
|
22333
|
+
columns: COLUMNS12,
|
|
21635
22334
|
paginationSupport: "full"
|
|
21636
22335
|
})
|
|
21637
22336
|
]
|
|
@@ -21690,11 +22389,11 @@ function shuffleInPlace(items) {
|
|
|
21690
22389
|
}
|
|
21691
22390
|
return items;
|
|
21692
22391
|
}
|
|
21693
|
-
function buildModelEvalBatchJobs(scenarios, models, rounds, warmup) {
|
|
22392
|
+
function buildModelEvalBatchJobs(scenarios, models, rounds, warmup, realtimeModels = []) {
|
|
21694
22393
|
if (scenarios.length === 0) {
|
|
21695
22394
|
throw new CLIError("At least one scenario is required");
|
|
21696
22395
|
}
|
|
21697
|
-
if (models.length === 0) {
|
|
22396
|
+
if (models.length === 0 && realtimeModels.length === 0) {
|
|
21698
22397
|
throw new CLIError("At least one model is required");
|
|
21699
22398
|
}
|
|
21700
22399
|
if (rounds < 1) {
|
|
@@ -21715,12 +22414,60 @@ function buildModelEvalBatchJobs(scenarios, models, rounds, warmup) {
|
|
|
21715
22414
|
modelId
|
|
21716
22415
|
});
|
|
21717
22416
|
}
|
|
22417
|
+
for (const modelId of realtimeModels) {
|
|
22418
|
+
roundJobs.push({
|
|
22419
|
+
round,
|
|
22420
|
+
warmup: warm,
|
|
22421
|
+
scenarioId: scenario.id,
|
|
22422
|
+
scenarioSlug: scenario.slug,
|
|
22423
|
+
scenarioName: scenario.name,
|
|
22424
|
+
modelId,
|
|
22425
|
+
realtime: true
|
|
22426
|
+
});
|
|
22427
|
+
}
|
|
21718
22428
|
}
|
|
21719
22429
|
shuffleInPlace(roundJobs);
|
|
21720
22430
|
jobs.push(...roundJobs);
|
|
21721
22431
|
}
|
|
21722
22432
|
return jobs;
|
|
21723
22433
|
}
|
|
22434
|
+
var REALTIME_AUDIO_USD_PER_MIN = {
|
|
22435
|
+
"xai:realtime:voice-agent": 0.05,
|
|
22436
|
+
// Grok Voice Think Fast 1
|
|
22437
|
+
"xai:realtime:voice-agent-2": 0.08
|
|
22438
|
+
// Grok Voice Think Fast 2
|
|
22439
|
+
};
|
|
22440
|
+
var DEFAULT_REALTIME_AUDIO_USD_PER_MIN = 0.08;
|
|
22441
|
+
var EST_AUDIO_MIN_PER_RUN = 3;
|
|
22442
|
+
var EST_TEXT_USD_PER_RUN = 0.012;
|
|
22443
|
+
function realtimeAudioUsdPerMin(modelId) {
|
|
22444
|
+
return REALTIME_AUDIO_USD_PER_MIN[modelId] ?? DEFAULT_REALTIME_AUDIO_USD_PER_MIN;
|
|
22445
|
+
}
|
|
22446
|
+
function estimateRealtimeRunCostUsd(modelId) {
|
|
22447
|
+
return EST_AUDIO_MIN_PER_RUN * realtimeAudioUsdPerMin(modelId) + EST_TEXT_USD_PER_RUN;
|
|
22448
|
+
}
|
|
22449
|
+
function projectRealtimeBatchCostUsd(jobs) {
|
|
22450
|
+
return jobs.filter((j) => j.realtime).reduce((sum, j) => sum + estimateRealtimeRunCostUsd(j.modelId), 0);
|
|
22451
|
+
}
|
|
22452
|
+
function actualRealtimeRowCostUsd(row, modelId) {
|
|
22453
|
+
const summary = row.timing_summary;
|
|
22454
|
+
const audioMs = summary ? summary["audio_output_ms_total"] : void 0;
|
|
22455
|
+
if (typeof audioMs === "number" && Number.isFinite(audioMs) && audioMs >= 0) {
|
|
22456
|
+
return audioMs / 6e4 * realtimeAudioUsdPerMin(modelId) + EST_TEXT_USD_PER_RUN;
|
|
22457
|
+
}
|
|
22458
|
+
return estimateRealtimeRunCostUsd(modelId);
|
|
22459
|
+
}
|
|
22460
|
+
function parseMaxBudgetUsd(raw, flagName) {
|
|
22461
|
+
if (raw === void 0 || raw === null || raw === "") {
|
|
22462
|
+
return void 0;
|
|
22463
|
+
}
|
|
22464
|
+
const value = Number(raw);
|
|
22465
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
22466
|
+
throw new CLIError(`${flagName} must be a positive number of USD`);
|
|
22467
|
+
}
|
|
22468
|
+
return value;
|
|
22469
|
+
}
|
|
22470
|
+
var REALTIME_MAX_CONCURRENCY = 4;
|
|
21724
22471
|
function summarizeCriterionResults(run) {
|
|
21725
22472
|
if (!run.criterionResults?.length) return void 0;
|
|
21726
22473
|
return run.criterionResults.map((c) => ({
|
|
@@ -21729,7 +22476,7 @@ function summarizeCriterionResults(run) {
|
|
|
21729
22476
|
score: c.score ?? null
|
|
21730
22477
|
}));
|
|
21731
22478
|
}
|
|
21732
|
-
function runToBatchRow(job, workflowId, run, error) {
|
|
22479
|
+
function runToBatchRow(job, workflowId, run, error, batchLabel) {
|
|
21733
22480
|
return {
|
|
21734
22481
|
ts: (/* @__PURE__ */ new Date()).toISOString(),
|
|
21735
22482
|
round: job.round,
|
|
@@ -21739,6 +22486,8 @@ function runToBatchRow(job, workflowId, run, error) {
|
|
|
21739
22486
|
scenario_slug: job.scenarioSlug,
|
|
21740
22487
|
scenario_name: job.scenarioName,
|
|
21741
22488
|
model_id: job.modelId,
|
|
22489
|
+
...job.realtime ? { realtime_model_id: job.modelId } : {},
|
|
22490
|
+
...batchLabel ? { batch_label: batchLabel } : {},
|
|
21742
22491
|
run_id: run?.id,
|
|
21743
22492
|
error,
|
|
21744
22493
|
failure_reason: run?.failureReason ?? null,
|
|
@@ -21793,7 +22542,10 @@ async function executeModelEvalJob(api, options, job, waitTimeoutMs, pollMs, sle
|
|
|
21793
22542
|
const started = await api.startTestChatRun(options.workspace, options.workflowId, {
|
|
21794
22543
|
scenarioId: job.scenarioId,
|
|
21795
22544
|
driver: DriverMode.AUTO,
|
|
21796
|
-
|
|
22545
|
+
...job.realtime ? {
|
|
22546
|
+
assistantRealtimeModelId: job.modelId,
|
|
22547
|
+
...options.realtimeConfig ? { assistantRealtimeModelConfig: options.realtimeConfig } : {}
|
|
22548
|
+
} : { assistantChatModelId: job.modelId }
|
|
21797
22549
|
});
|
|
21798
22550
|
let run = await waitForRunTerminal(
|
|
21799
22551
|
api,
|
|
@@ -21814,10 +22566,10 @@ async function executeModelEvalJob(api, options, job, waitTimeoutMs, pollMs, sle
|
|
|
21814
22566
|
sleep
|
|
21815
22567
|
);
|
|
21816
22568
|
}
|
|
21817
|
-
return runToBatchRow(job, options.workflowId, run);
|
|
22569
|
+
return runToBatchRow(job, options.workflowId, run, void 0, options.batchLabel);
|
|
21818
22570
|
} catch (e) {
|
|
21819
22571
|
const message = e instanceof Error ? e.message : String(e);
|
|
21820
|
-
return runToBatchRow(job, options.workflowId, null, message);
|
|
22572
|
+
return runToBatchRow(job, options.workflowId, null, message, options.batchLabel);
|
|
21821
22573
|
}
|
|
21822
22574
|
}
|
|
21823
22575
|
function createSpacingGate(spacingSec, sleep) {
|
|
@@ -21835,56 +22587,99 @@ function createSpacingGate(spacingSec, sleep) {
|
|
|
21835
22587
|
}
|
|
21836
22588
|
async function executeModelEvalBatch(api, options) {
|
|
21837
22589
|
const sleep = options.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
|
|
21838
|
-
const concurrency = options.concurrency ?? 1;
|
|
21839
22590
|
const jobs = buildModelEvalBatchJobs(
|
|
21840
22591
|
options.scenarios,
|
|
21841
22592
|
options.models,
|
|
21842
22593
|
options.rounds,
|
|
21843
|
-
options.warmup
|
|
22594
|
+
options.warmup,
|
|
22595
|
+
options.realtimeModels ?? []
|
|
21844
22596
|
);
|
|
21845
22597
|
const waitTimeoutMs = options.waitTimeoutSec * 1e3;
|
|
21846
22598
|
const pollMs = options.pollIntervalSec * 1e3;
|
|
21847
22599
|
const rows = [];
|
|
21848
22600
|
let stopBatch = false;
|
|
22601
|
+
let budgetStopped = false;
|
|
22602
|
+
let actualSpendUsd = 0;
|
|
21849
22603
|
const awaitSpacing = createSpacingGate(options.spacingSec, sleep);
|
|
22604
|
+
const emitProgress = (line) => {
|
|
22605
|
+
if (options.onProgress) {
|
|
22606
|
+
options.onProgress(line);
|
|
22607
|
+
} else {
|
|
22608
|
+
process.stdout.write(`${line}
|
|
22609
|
+
`);
|
|
22610
|
+
}
|
|
22611
|
+
};
|
|
22612
|
+
const realtimeJobCount = jobs.filter((j) => j.realtime).length;
|
|
22613
|
+
let concurrency = options.concurrency ?? 1;
|
|
22614
|
+
if (realtimeJobCount > 0 && concurrency > REALTIME_MAX_CONCURRENCY) {
|
|
22615
|
+
emitProgress(
|
|
22616
|
+
`concurrency clamped ${concurrency} -> ${REALTIME_MAX_CONCURRENCY} (realtime models share the provider session pool)`
|
|
22617
|
+
);
|
|
22618
|
+
concurrency = REALTIME_MAX_CONCURRENCY;
|
|
22619
|
+
}
|
|
22620
|
+
if (realtimeJobCount > 0) {
|
|
22621
|
+
const projectedUsd = projectRealtimeBatchCostUsd(jobs);
|
|
22622
|
+
const cap = options.maxBudgetUsd;
|
|
22623
|
+
emitProgress(
|
|
22624
|
+
`realtime budget: projected ~$${projectedUsd.toFixed(2)} for ${realtimeJobCount} realtime run(s)${cap != null ? ` (cap $${cap.toFixed(2)})` : ""}`
|
|
22625
|
+
);
|
|
22626
|
+
if (cap != null && projectedUsd > cap) {
|
|
22627
|
+
throw new CLIError(
|
|
22628
|
+
`Batch aborted before dispatch: projected realtime cost $${projectedUsd.toFixed(2)} exceeds --max-budget-usd $${cap.toFixed(2)}. Reduce rounds/scenarios/models or raise the cap.`
|
|
22629
|
+
);
|
|
22630
|
+
}
|
|
22631
|
+
}
|
|
21850
22632
|
const recordRow = (job, row) => {
|
|
21851
22633
|
rows.push(row);
|
|
21852
22634
|
if (options.outPath) {
|
|
21853
22635
|
appendFileSync(options.outPath, `${JSON.stringify(row)}
|
|
21854
22636
|
`);
|
|
21855
22637
|
}
|
|
21856
|
-
|
|
21857
|
-
if (options.onProgress) {
|
|
21858
|
-
options.onProgress(progress);
|
|
21859
|
-
} else {
|
|
21860
|
-
process.stdout.write(`${progress}
|
|
21861
|
-
`);
|
|
21862
|
-
}
|
|
22638
|
+
emitProgress(formatBatchProgressLine(job, row));
|
|
21863
22639
|
};
|
|
22640
|
+
const makeSkippedRow = (job) => ({
|
|
22641
|
+
...runToBatchRow(
|
|
22642
|
+
job,
|
|
22643
|
+
options.workflowId,
|
|
22644
|
+
null,
|
|
22645
|
+
budgetStopped ? "batch stopped: realtime budget cap reached" : "batch aborted before start",
|
|
22646
|
+
options.batchLabel
|
|
22647
|
+
),
|
|
22648
|
+
batch_skipped: true
|
|
22649
|
+
});
|
|
21864
22650
|
const runOne = async (job) => {
|
|
21865
22651
|
await awaitSpacing();
|
|
21866
22652
|
if (stopBatch) {
|
|
21867
|
-
return
|
|
21868
|
-
...runToBatchRow(job, options.workflowId, null, "batch aborted before start"),
|
|
21869
|
-
batch_skipped: true
|
|
21870
|
-
};
|
|
22653
|
+
return makeSkippedRow(job);
|
|
21871
22654
|
}
|
|
21872
22655
|
const row = await executeModelEvalJob(api, options, job, waitTimeoutMs, pollMs, sleep);
|
|
21873
22656
|
if (isConfigurationBlockerFailure(row.failure_reason)) {
|
|
21874
22657
|
stopBatch = true;
|
|
21875
22658
|
}
|
|
22659
|
+
if (job.realtime && !row.batch_skipped) {
|
|
22660
|
+
actualSpendUsd += actualRealtimeRowCostUsd(row, job.modelId);
|
|
22661
|
+
if (options.maxBudgetUsd != null && actualSpendUsd >= options.maxBudgetUsd && !stopBatch) {
|
|
22662
|
+
stopBatch = true;
|
|
22663
|
+
budgetStopped = true;
|
|
22664
|
+
emitProgress(
|
|
22665
|
+
`realtime budget: actual spend ~$${actualSpendUsd.toFixed(2)} reached cap $${options.maxBudgetUsd.toFixed(2)} \u2014 stopping dispatch`
|
|
22666
|
+
);
|
|
22667
|
+
}
|
|
22668
|
+
}
|
|
21876
22669
|
return row;
|
|
21877
22670
|
};
|
|
21878
22671
|
if (concurrency <= 1) {
|
|
21879
|
-
|
|
22672
|
+
let stoppedAt = jobs.length;
|
|
22673
|
+
for (const [index, job] of jobs.entries()) {
|
|
21880
22674
|
if (stopBatch) {
|
|
22675
|
+
stoppedAt = index;
|
|
21881
22676
|
break;
|
|
21882
22677
|
}
|
|
21883
22678
|
const row = await runOne(job);
|
|
21884
22679
|
recordRow(job, row);
|
|
21885
|
-
|
|
21886
|
-
|
|
21887
|
-
|
|
22680
|
+
}
|
|
22681
|
+
for (const job of jobs.slice(stoppedAt)) {
|
|
22682
|
+
recordRow(job, makeSkippedRow(job));
|
|
21888
22683
|
}
|
|
21889
22684
|
} else {
|
|
21890
22685
|
const results = new Array(jobs.length);
|
|
@@ -21900,6 +22695,9 @@ async function executeModelEvalBatch(api, options) {
|
|
|
21900
22695
|
return;
|
|
21901
22696
|
}
|
|
21902
22697
|
const job = jobs[index];
|
|
22698
|
+
if (job === void 0) {
|
|
22699
|
+
return;
|
|
22700
|
+
}
|
|
21903
22701
|
const row = await runOne(job);
|
|
21904
22702
|
results[index] = row;
|
|
21905
22703
|
recordRow(job, row);
|
|
@@ -21908,20 +22706,19 @@ async function executeModelEvalBatch(api, options) {
|
|
|
21908
22706
|
const workers = Array.from({ length: Math.min(concurrency, jobs.length) }, () => worker());
|
|
21909
22707
|
await Promise.all(workers);
|
|
21910
22708
|
if (stopBatch) {
|
|
21911
|
-
|
|
22709
|
+
jobs.forEach((job, index) => {
|
|
21912
22710
|
if (results[index] !== void 0) {
|
|
21913
|
-
|
|
22711
|
+
return;
|
|
21914
22712
|
}
|
|
21915
|
-
const
|
|
21916
|
-
const skipped = {
|
|
21917
|
-
...runToBatchRow(job, options.workflowId, null, "batch aborted before start"),
|
|
21918
|
-
batch_skipped: true
|
|
21919
|
-
};
|
|
22713
|
+
const skipped = makeSkippedRow(job);
|
|
21920
22714
|
results[index] = skipped;
|
|
21921
22715
|
recordRow(job, skipped);
|
|
21922
|
-
}
|
|
22716
|
+
});
|
|
21923
22717
|
}
|
|
21924
22718
|
}
|
|
22719
|
+
if (realtimeJobCount > 0) {
|
|
22720
|
+
emitProgress(`realtime budget: total actual spend ~$${actualSpendUsd.toFixed(2)}`);
|
|
22721
|
+
}
|
|
21925
22722
|
const blockerRow = rows.find((r) => isConfigurationBlockerFailure(r.failure_reason));
|
|
21926
22723
|
if (blockerRow) {
|
|
21927
22724
|
throw new CLIError(
|
|
@@ -22223,9 +23020,29 @@ var qualificationsDomain = {
|
|
|
22223
23020
|
{ name: "workflow-id", description: "Workflow ID", required: true },
|
|
22224
23021
|
{
|
|
22225
23022
|
name: "models",
|
|
22226
|
-
description: "Comma-separated assistant chat model IDs",
|
|
23023
|
+
description: "Comma-separated assistant chat model IDs (optional with --realtime-models)",
|
|
22227
23024
|
alias: "m",
|
|
22228
|
-
required:
|
|
23025
|
+
required: false
|
|
23026
|
+
},
|
|
23027
|
+
{
|
|
23028
|
+
name: "realtime-models",
|
|
23029
|
+
description: "Comma-separated native realtime model IDs (each forwarded as assistantRealtimeModelId)",
|
|
23030
|
+
required: false
|
|
23031
|
+
},
|
|
23032
|
+
{
|
|
23033
|
+
name: "realtime-config",
|
|
23034
|
+
description: "JSON object forwarded as assistantRealtimeModelConfig on realtime jobs",
|
|
23035
|
+
required: false
|
|
23036
|
+
},
|
|
23037
|
+
{
|
|
23038
|
+
name: "batch-label",
|
|
23039
|
+
description: "Label recorded on every JSONL row for cross-batch comparison",
|
|
23040
|
+
required: false
|
|
23041
|
+
},
|
|
23042
|
+
{
|
|
23043
|
+
name: "max-budget-usd",
|
|
23044
|
+
description: "Dispatch cap in USD on realtime spend: abort if pre-flight projection exceeds it, stop dispatching when actuals cross it (in-flight runs still finish and bill)",
|
|
23045
|
+
required: false
|
|
22229
23046
|
},
|
|
22230
23047
|
{
|
|
22231
23048
|
name: "scenario-ids",
|
|
@@ -22265,7 +23082,31 @@ var qualificationsDomain = {
|
|
|
22265
23082
|
{ name: "out", description: "Append JSONL rows to this file" }
|
|
22266
23083
|
],
|
|
22267
23084
|
handler: async ({ ctx, workspace, args }) => {
|
|
22268
|
-
const models = parseCommaSeparatedList(
|
|
23085
|
+
const models = args.models ? parseCommaSeparatedList(String(args.models), "--models") : [];
|
|
23086
|
+
const realtimeModels = args["realtime-models"] ? parseCommaSeparatedList(String(args["realtime-models"]), "--realtime-models") : [];
|
|
23087
|
+
if (models.length === 0 && realtimeModels.length === 0) {
|
|
23088
|
+
throw new CLIError("Specify --models and/or --realtime-models");
|
|
23089
|
+
}
|
|
23090
|
+
let realtimeConfig;
|
|
23091
|
+
if (args["realtime-config"]) {
|
|
23092
|
+
if (realtimeModels.length === 0) {
|
|
23093
|
+
throw new CLIError("--realtime-config requires --realtime-models");
|
|
23094
|
+
}
|
|
23095
|
+
let parsed;
|
|
23096
|
+
try {
|
|
23097
|
+
parsed = JSON.parse(String(args["realtime-config"]));
|
|
23098
|
+
} catch {
|
|
23099
|
+
throw new CLIError("--realtime-config is not valid JSON");
|
|
23100
|
+
}
|
|
23101
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
23102
|
+
throw new CLIError(
|
|
23103
|
+
"--realtime-config must be a JSON object (not an array or null)"
|
|
23104
|
+
);
|
|
23105
|
+
}
|
|
23106
|
+
realtimeConfig = parsed;
|
|
23107
|
+
}
|
|
23108
|
+
const batchLabel = args["batch-label"] ? String(args["batch-label"]) : void 0;
|
|
23109
|
+
const maxBudgetUsd = parseMaxBudgetUsd(args["max-budget-usd"], "--max-budget-usd");
|
|
22269
23110
|
const allScenarios = Boolean(args["all-scenarios"]);
|
|
22270
23111
|
const scenarioIdsRaw = args["scenario-ids"];
|
|
22271
23112
|
if (allScenarios && scenarioIdsRaw) {
|
|
@@ -22306,6 +23147,10 @@ var qualificationsDomain = {
|
|
|
22306
23147
|
workspace,
|
|
22307
23148
|
workflowId,
|
|
22308
23149
|
models,
|
|
23150
|
+
realtimeModels,
|
|
23151
|
+
realtimeConfig,
|
|
23152
|
+
batchLabel,
|
|
23153
|
+
maxBudgetUsd,
|
|
22309
23154
|
scenarios,
|
|
22310
23155
|
rounds,
|
|
22311
23156
|
warmup,
|
|
@@ -22622,7 +23467,7 @@ Relations (relationMatch): ${relations.join(", ")}`);
|
|
|
22622
23467
|
};
|
|
22623
23468
|
init_output();
|
|
22624
23469
|
init_context();
|
|
22625
|
-
var
|
|
23470
|
+
var COLUMNS13 = [
|
|
22626
23471
|
COL.id(),
|
|
22627
23472
|
COL.name(),
|
|
22628
23473
|
{ header: "SLUG", getValue: (item) => item.slug ?? "" },
|
|
@@ -22676,7 +23521,7 @@ var sitesDomain = {
|
|
|
22676
23521
|
createMethod: "createSite",
|
|
22677
23522
|
updateMethod: "updateSite",
|
|
22678
23523
|
deleteMethod: "deleteSite",
|
|
22679
|
-
columns:
|
|
23524
|
+
columns: COLUMNS13
|
|
22680
23525
|
}),
|
|
22681
23526
|
// Pages sub-resource
|
|
22682
23527
|
{
|
|
@@ -23350,7 +24195,7 @@ var abilitiesDomain = {
|
|
|
23350
24195
|
init_output();
|
|
23351
24196
|
init_pagination();
|
|
23352
24197
|
init_context();
|
|
23353
|
-
var
|
|
24198
|
+
var COLUMNS14 = [
|
|
23354
24199
|
COL.id(),
|
|
23355
24200
|
COL.status(),
|
|
23356
24201
|
{ header: "GRANTOR", getValue: (item) => String(item.grantorMemberId ?? "") },
|
|
@@ -23367,7 +24212,7 @@ var accessGrantsDomain = {
|
|
|
23367
24212
|
requiresWorkspace: true,
|
|
23368
24213
|
handler: async ({ ctx, workspace }) => {
|
|
23369
24214
|
const result3 = await requireAuth(ctx).apiClient.getAccessGrants(workspace);
|
|
23370
|
-
outputData(listResult(result3, false), ctx,
|
|
24215
|
+
outputData(listResult(result3, false), ctx, COLUMNS14);
|
|
23371
24216
|
}
|
|
23372
24217
|
},
|
|
23373
24218
|
{
|
|
@@ -23380,7 +24225,7 @@ var accessGrantsDomain = {
|
|
|
23380
24225
|
workspace,
|
|
23381
24226
|
requireString(args, "id")
|
|
23382
24227
|
);
|
|
23383
|
-
outputSingle(result3, ctx,
|
|
24228
|
+
outputSingle(result3, ctx, COLUMNS14);
|
|
23384
24229
|
}
|
|
23385
24230
|
},
|
|
23386
24231
|
{
|
|
@@ -23393,7 +24238,7 @@ var accessGrantsDomain = {
|
|
|
23393
24238
|
workspace,
|
|
23394
24239
|
data
|
|
23395
24240
|
);
|
|
23396
|
-
outputSingle(result3, ctx,
|
|
24241
|
+
outputSingle(result3, ctx, COLUMNS14);
|
|
23397
24242
|
}
|
|
23398
24243
|
},
|
|
23399
24244
|
{
|
|
@@ -23404,7 +24249,7 @@ var accessGrantsDomain = {
|
|
|
23404
24249
|
const result3 = await requireAuth(ctx).apiClient.getMyReceivedGrants(workspace, {
|
|
23405
24250
|
pageSize: 200
|
|
23406
24251
|
});
|
|
23407
|
-
outputData(listResult(result3, false), ctx,
|
|
24252
|
+
outputData(listResult(result3, false), ctx, COLUMNS14);
|
|
23408
24253
|
}
|
|
23409
24254
|
},
|
|
23410
24255
|
{
|
|
@@ -23415,7 +24260,7 @@ var accessGrantsDomain = {
|
|
|
23415
24260
|
const result3 = await requireAuth(ctx).apiClient.getMyGivenGrants(workspace, {
|
|
23416
24261
|
pageSize: 200
|
|
23417
24262
|
});
|
|
23418
|
-
outputData(listResult(result3, false), ctx,
|
|
24263
|
+
outputData(listResult(result3, false), ctx, COLUMNS14);
|
|
23419
24264
|
}
|
|
23420
24265
|
},
|
|
23421
24266
|
{
|
|
@@ -23430,7 +24275,7 @@ var accessGrantsDomain = {
|
|
|
23430
24275
|
requireString(args, "id"),
|
|
23431
24276
|
data ?? {}
|
|
23432
24277
|
);
|
|
23433
|
-
outputSingle(result3, ctx,
|
|
24278
|
+
outputSingle(result3, ctx, COLUMNS14);
|
|
23434
24279
|
}
|
|
23435
24280
|
},
|
|
23436
24281
|
{
|
|
@@ -23445,7 +24290,7 @@ var accessGrantsDomain = {
|
|
|
23445
24290
|
requireString(args, "id"),
|
|
23446
24291
|
data ?? {}
|
|
23447
24292
|
);
|
|
23448
|
-
outputSingle(result3, ctx,
|
|
24293
|
+
outputSingle(result3, ctx, COLUMNS14);
|
|
23449
24294
|
}
|
|
23450
24295
|
},
|
|
23451
24296
|
{
|
|
@@ -23458,7 +24303,7 @@ var accessGrantsDomain = {
|
|
|
23458
24303
|
workspace,
|
|
23459
24304
|
requireNumber(args, "member-id")
|
|
23460
24305
|
);
|
|
23461
|
-
outputData(listResult(result3, false), ctx,
|
|
24306
|
+
outputData(listResult(result3, false), ctx, COLUMNS14);
|
|
23462
24307
|
}
|
|
23463
24308
|
},
|
|
23464
24309
|
{
|
|
@@ -23483,7 +24328,7 @@ var accessGrantsDomain = {
|
|
|
23483
24328
|
pageSize: 200
|
|
23484
24329
|
}
|
|
23485
24330
|
);
|
|
23486
|
-
outputData(listResult(result3, false), ctx,
|
|
24331
|
+
outputData(listResult(result3, false), ctx, COLUMNS14);
|
|
23487
24332
|
}
|
|
23488
24333
|
}
|
|
23489
24334
|
]
|
|
@@ -23492,7 +24337,7 @@ var accessGrantsDomain = {
|
|
|
23492
24337
|
// src/domains/ai-models.ts
|
|
23493
24338
|
init_output();
|
|
23494
24339
|
init_context();
|
|
23495
|
-
var
|
|
24340
|
+
var COLUMNS15 = [
|
|
23496
24341
|
{ header: "ID", getValue: (item) => String(item.id ?? item.modelId ?? "") },
|
|
23497
24342
|
{ header: "NAME", getValue: (item) => item.name ?? item.displayName ?? "" },
|
|
23498
24343
|
{ header: "PROVIDER", getValue: (item) => item.provider ?? "" },
|
|
@@ -23500,7 +24345,7 @@ var COLUMNS14 = [
|
|
|
23500
24345
|
];
|
|
23501
24346
|
var aiModelsDomain = {
|
|
23502
24347
|
name: "ai-models",
|
|
23503
|
-
description:
|
|
24348
|
+
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
24349
|
commands: [
|
|
23505
24350
|
{
|
|
23506
24351
|
path: ["ai-models", "list"],
|
|
@@ -23508,34 +24353,34 @@ var aiModelsDomain = {
|
|
|
23508
24353
|
requiresWorkspace: false,
|
|
23509
24354
|
handler: async ({ ctx }) => {
|
|
23510
24355
|
const result3 = await requireAuth(ctx).apiClient.getAllModels();
|
|
23511
|
-
outputData(result3, ctx,
|
|
24356
|
+
outputData(result3, ctx, COLUMNS15);
|
|
23512
24357
|
}
|
|
23513
24358
|
},
|
|
23514
24359
|
{
|
|
23515
24360
|
path: ["ai-models", "chat"],
|
|
23516
|
-
description: "List chat models",
|
|
24361
|
+
description: "List chat models (use as chatModelId on agents/workflows)",
|
|
23517
24362
|
requiresWorkspace: false,
|
|
23518
24363
|
handler: async ({ ctx }) => {
|
|
23519
24364
|
const result3 = await requireAuth(ctx).apiClient.getChatModels();
|
|
23520
|
-
outputData(result3, ctx,
|
|
24365
|
+
outputData(result3, ctx, COLUMNS15);
|
|
23521
24366
|
}
|
|
23522
24367
|
},
|
|
23523
24368
|
{
|
|
23524
24369
|
path: ["ai-models", "realtime"],
|
|
23525
|
-
description: "List realtime
|
|
24370
|
+
description: "List realtime/voice stacks (use as realtimeModelId). e.g. xai:realtime:voice-agent-2 = Grok Voice Think Fast 2",
|
|
23526
24371
|
requiresWorkspace: false,
|
|
23527
24372
|
handler: async ({ ctx }) => {
|
|
23528
24373
|
const result3 = await requireAuth(ctx).apiClient.getRealtimeModels();
|
|
23529
|
-
outputData(result3, ctx,
|
|
24374
|
+
outputData(result3, ctx, COLUMNS15);
|
|
23530
24375
|
}
|
|
23531
24376
|
},
|
|
23532
24377
|
{
|
|
23533
24378
|
path: ["ai-models", "voice"],
|
|
23534
|
-
description: "List voice
|
|
24379
|
+
description: "List speaker voices (use as realtimeModelConfig.voiceModel). Match provider to the realtime model (xai:voice:* with xAI realtime)",
|
|
23535
24380
|
requiresWorkspace: false,
|
|
23536
24381
|
handler: async ({ ctx }) => {
|
|
23537
24382
|
const result3 = await requireAuth(ctx).apiClient.getVoiceModels();
|
|
23538
|
-
outputData(result3, ctx,
|
|
24383
|
+
outputData(result3, ctx, COLUMNS15);
|
|
23539
24384
|
}
|
|
23540
24385
|
}
|
|
23541
24386
|
]
|
|
@@ -23544,7 +24389,7 @@ var aiModelsDomain = {
|
|
|
23544
24389
|
// src/domains/api-keys.ts
|
|
23545
24390
|
init_output();
|
|
23546
24391
|
init_context();
|
|
23547
|
-
var
|
|
24392
|
+
var COLUMNS16 = [
|
|
23548
24393
|
COL.id(),
|
|
23549
24394
|
COL.name(),
|
|
23550
24395
|
{ header: "PREFIX", getValue: (item) => item.prefix ?? "" },
|
|
@@ -23567,7 +24412,7 @@ var apiKeysDomain = {
|
|
|
23567
24412
|
requiresWorkspace: true,
|
|
23568
24413
|
handler: async ({ ctx, workspace }) => {
|
|
23569
24414
|
const result3 = await requireAuth(ctx).apiClient.getApiKeys(workspace);
|
|
23570
|
-
outputData(result3, ctx,
|
|
24415
|
+
outputData(result3, ctx, COLUMNS16);
|
|
23571
24416
|
}
|
|
23572
24417
|
},
|
|
23573
24418
|
{
|
|
@@ -23602,7 +24447,7 @@ var apiKeysDomain = {
|
|
|
23602
24447
|
requiresWorkspace: false,
|
|
23603
24448
|
handler: async ({ ctx }) => {
|
|
23604
24449
|
const result3 = await requireAuth(ctx).apiClient.getGlobalApiKeys();
|
|
23605
|
-
outputData(result3, ctx,
|
|
24450
|
+
outputData(result3, ctx, COLUMNS16);
|
|
23606
24451
|
}
|
|
23607
24452
|
},
|
|
23608
24453
|
{
|
|
@@ -24268,7 +25113,7 @@ var conciergeDomain = {
|
|
|
24268
25113
|
init_errors();
|
|
24269
25114
|
init_output();
|
|
24270
25115
|
init_context();
|
|
24271
|
-
var
|
|
25116
|
+
var COLUMNS17 = [COL.id(), COL.name(), COL.description(), COL.enabled()];
|
|
24272
25117
|
var TOOL_COLUMNS2 = [COL.id(), COL.name(), COL.description()];
|
|
24273
25118
|
var customToolkitsDomain = {
|
|
24274
25119
|
name: "custom-toolkits",
|
|
@@ -24282,7 +25127,7 @@ var customToolkitsDomain = {
|
|
|
24282
25127
|
createMethod: "createCustomToolkit",
|
|
24283
25128
|
updateMethod: "updateCustomToolkit",
|
|
24284
25129
|
deleteMethod: "deleteCustomToolkit",
|
|
24285
|
-
columns:
|
|
25130
|
+
columns: COLUMNS17
|
|
24286
25131
|
}),
|
|
24287
25132
|
{
|
|
24288
25133
|
path: ["custom-toolkits", "enable"],
|
|
@@ -24295,7 +25140,7 @@ var customToolkitsDomain = {
|
|
|
24295
25140
|
workspace,
|
|
24296
25141
|
requireNumber(args, "id")
|
|
24297
25142
|
);
|
|
24298
|
-
outputSingle(result3, ctx,
|
|
25143
|
+
outputSingle(result3, ctx, COLUMNS17);
|
|
24299
25144
|
}
|
|
24300
25145
|
},
|
|
24301
25146
|
{
|
|
@@ -24309,7 +25154,7 @@ var customToolkitsDomain = {
|
|
|
24309
25154
|
workspace,
|
|
24310
25155
|
requireNumber(args, "id")
|
|
24311
25156
|
);
|
|
24312
|
-
outputSingle(result3, ctx,
|
|
25157
|
+
outputSingle(result3, ctx, COLUMNS17);
|
|
24313
25158
|
}
|
|
24314
25159
|
},
|
|
24315
25160
|
// Tools — nested resource requiring toolkitId
|
|
@@ -24427,7 +25272,7 @@ var docsDomain = {
|
|
|
24427
25272
|
// src/domains/features.ts
|
|
24428
25273
|
init_output();
|
|
24429
25274
|
init_context();
|
|
24430
|
-
var
|
|
25275
|
+
var COLUMNS18 = [
|
|
24431
25276
|
{ header: "SLUG", getValue: (item) => item.slug ?? "" },
|
|
24432
25277
|
COL.name(),
|
|
24433
25278
|
COL.description()
|
|
@@ -24442,7 +25287,7 @@ var featuresDomain = {
|
|
|
24442
25287
|
requiresWorkspace: false,
|
|
24443
25288
|
handler: async ({ ctx }) => {
|
|
24444
25289
|
const result3 = await requireAuth(ctx).apiClient.getFeatureRegistry();
|
|
24445
|
-
outputData(result3, ctx,
|
|
25290
|
+
outputData(result3, ctx, COLUMNS18);
|
|
24446
25291
|
}
|
|
24447
25292
|
},
|
|
24448
25293
|
{
|
|
@@ -24454,7 +25299,7 @@ var featuresDomain = {
|
|
|
24454
25299
|
const result3 = await requireAuth(ctx).apiClient.getFeatureBySlug(
|
|
24455
25300
|
requireString(args, "slug")
|
|
24456
25301
|
);
|
|
24457
|
-
outputSingle(result3, ctx,
|
|
25302
|
+
outputSingle(result3, ctx, COLUMNS18);
|
|
24458
25303
|
}
|
|
24459
25304
|
},
|
|
24460
25305
|
{
|
|
@@ -24463,7 +25308,7 @@ var featuresDomain = {
|
|
|
24463
25308
|
requiresWorkspace: true,
|
|
24464
25309
|
handler: async ({ ctx }) => {
|
|
24465
25310
|
const result3 = await requireAuth(ctx).apiClient.getAvailableWorkspaceFeatures();
|
|
24466
|
-
outputData(result3, ctx,
|
|
25311
|
+
outputData(result3, ctx, COLUMNS18);
|
|
24467
25312
|
}
|
|
24468
25313
|
}
|
|
24469
25314
|
]
|
|
@@ -24472,7 +25317,7 @@ var featuresDomain = {
|
|
|
24472
25317
|
// src/domains/inboxes.ts
|
|
24473
25318
|
init_output();
|
|
24474
25319
|
init_context();
|
|
24475
|
-
var
|
|
25320
|
+
var COLUMNS19 = [
|
|
24476
25321
|
COL.id(),
|
|
24477
25322
|
COL.name(),
|
|
24478
25323
|
{ header: "EMAIL", getValue: (item) => item.emailAddress ?? "" },
|
|
@@ -24497,7 +25342,7 @@ var inboxesDomain = {
|
|
|
24497
25342
|
createMethod: "createInbox",
|
|
24498
25343
|
updateMethod: "updateInbox",
|
|
24499
25344
|
deleteMethod: "deleteInbox",
|
|
24500
|
-
columns:
|
|
25345
|
+
columns: COLUMNS19
|
|
24501
25346
|
}),
|
|
24502
25347
|
{
|
|
24503
25348
|
path: ["inboxes", "emails", "list"],
|
|
@@ -24584,7 +25429,7 @@ var inboxesDomain = {
|
|
|
24584
25429
|
// src/domains/mcp-servers.ts
|
|
24585
25430
|
init_output();
|
|
24586
25431
|
init_context();
|
|
24587
|
-
var
|
|
25432
|
+
var COLUMNS20 = [
|
|
24588
25433
|
COL.id(),
|
|
24589
25434
|
COL.name(),
|
|
24590
25435
|
{ header: "URL", getValue: (item) => item.url ?? "" },
|
|
@@ -24602,7 +25447,7 @@ var mcpServersDomain = {
|
|
|
24602
25447
|
createMethod: "createMcpServer",
|
|
24603
25448
|
updateMethod: "updateMcpServer",
|
|
24604
25449
|
deleteMethod: "deleteMcpServer",
|
|
24605
|
-
columns:
|
|
25450
|
+
columns: COLUMNS20
|
|
24606
25451
|
}),
|
|
24607
25452
|
{
|
|
24608
25453
|
path: ["mcp-servers", "enable"],
|
|
@@ -24615,7 +25460,7 @@ var mcpServersDomain = {
|
|
|
24615
25460
|
workspace,
|
|
24616
25461
|
requireNumber(args, "id")
|
|
24617
25462
|
);
|
|
24618
|
-
outputSingle(result3, ctx,
|
|
25463
|
+
outputSingle(result3, ctx, COLUMNS20);
|
|
24619
25464
|
}
|
|
24620
25465
|
},
|
|
24621
25466
|
{
|
|
@@ -24629,7 +25474,7 @@ var mcpServersDomain = {
|
|
|
24629
25474
|
workspace,
|
|
24630
25475
|
requireNumber(args, "id")
|
|
24631
25476
|
);
|
|
24632
|
-
outputSingle(result3, ctx,
|
|
25477
|
+
outputSingle(result3, ctx, COLUMNS20);
|
|
24633
25478
|
}
|
|
24634
25479
|
},
|
|
24635
25480
|
{
|
|
@@ -24652,7 +25497,7 @@ var mcpServersDomain = {
|
|
|
24652
25497
|
init_output();
|
|
24653
25498
|
init_pagination();
|
|
24654
25499
|
init_context();
|
|
24655
|
-
var
|
|
25500
|
+
var COLUMNS21 = [
|
|
24656
25501
|
{ header: "KEY", getValue: (item) => item.key ?? "" },
|
|
24657
25502
|
{ header: "TYPE", getValue: (item) => item.type ?? "basic" },
|
|
24658
25503
|
{ header: "DESCRIPTION", getValue: (item) => truncate(item.description ?? "", 60) },
|
|
@@ -24686,7 +25531,7 @@ var memberMemoriesDomain = {
|
|
|
24686
25531
|
type,
|
|
24687
25532
|
query
|
|
24688
25533
|
});
|
|
24689
|
-
outputData(listResult(result3, false), ctx,
|
|
25534
|
+
outputData(listResult(result3, false), ctx, COLUMNS21);
|
|
24690
25535
|
}
|
|
24691
25536
|
},
|
|
24692
25537
|
{
|
|
@@ -24705,7 +25550,7 @@ var memberMemoriesDomain = {
|
|
|
24705
25550
|
memberId,
|
|
24706
25551
|
key
|
|
24707
25552
|
);
|
|
24708
|
-
outputData(result3, ctx,
|
|
25553
|
+
outputData(result3, ctx, COLUMNS21);
|
|
24709
25554
|
}
|
|
24710
25555
|
},
|
|
24711
25556
|
{
|
|
@@ -24736,7 +25581,7 @@ var memberMemoriesDomain = {
|
|
|
24736
25581
|
...priority !== void 0 && { priority }
|
|
24737
25582
|
}
|
|
24738
25583
|
);
|
|
24739
|
-
outputData(result3, ctx,
|
|
25584
|
+
outputData(result3, ctx, COLUMNS21);
|
|
24740
25585
|
}
|
|
24741
25586
|
},
|
|
24742
25587
|
{
|
|
@@ -24769,35 +25614,58 @@ var memberMemoriesDomain = {
|
|
|
24769
25614
|
]
|
|
24770
25615
|
};
|
|
24771
25616
|
|
|
24772
|
-
// src/domains/
|
|
25617
|
+
// src/domains/intervention-requests.ts
|
|
24773
25618
|
init_output();
|
|
24774
|
-
var
|
|
25619
|
+
var COLUMNS22 = [
|
|
24775
25620
|
COL.id(),
|
|
24776
|
-
|
|
24777
|
-
|
|
24778
|
-
{
|
|
25621
|
+
{ header: "KIND", getValue: (item) => item.kind ?? "" },
|
|
25622
|
+
{ header: "CHAT", getValue: (item) => item.chatId ?? "" },
|
|
25623
|
+
{
|
|
25624
|
+
header: "STATUS",
|
|
25625
|
+
getValue: (item) => item.resolvedAt ? item.resolution ?? "resolved" : "open"
|
|
25626
|
+
},
|
|
25627
|
+
// Zero is the interesting value: the intervention was requested and nobody
|
|
25628
|
+
// was told, which is what `--unrouted` filters for.
|
|
25629
|
+
{ header: "NOTIFIED", getValue: (item) => item.notifiedCount ?? 0 },
|
|
25630
|
+
{ header: "REASON", getValue: (item) => item.reasonCode ?? "" },
|
|
25631
|
+
{ header: "CREATED", getValue: (item) => item.createdAt ?? "" }
|
|
24779
25632
|
];
|
|
24780
|
-
var
|
|
24781
|
-
name: "
|
|
24782
|
-
description: "
|
|
25633
|
+
var interventionRequestsDomain = {
|
|
25634
|
+
name: "interventions",
|
|
25635
|
+
description: "Inspect intervention requests \u2014 escalations and other asks for a person",
|
|
24783
25636
|
commands: [
|
|
24784
|
-
|
|
24785
|
-
|
|
24786
|
-
|
|
24787
|
-
|
|
24788
|
-
|
|
24789
|
-
|
|
24790
|
-
|
|
24791
|
-
|
|
24792
|
-
|
|
24793
|
-
|
|
24794
|
-
|
|
25637
|
+
{
|
|
25638
|
+
path: ["interventions", "list"],
|
|
25639
|
+
description: "List intervention requests (escalations etc). Newest first. Read-only.",
|
|
25640
|
+
requiresWorkspace: true,
|
|
25641
|
+
args: [
|
|
25642
|
+
{ name: "kind", description: "escalation | contributor_input | approval" },
|
|
25643
|
+
{ name: "open", description: "Only unresolved requests", isFlag: true },
|
|
25644
|
+
{ name: "chat-id", description: "Only requests for this chat" },
|
|
25645
|
+
{
|
|
25646
|
+
name: "unrouted",
|
|
25647
|
+
description: "Only requests that notified NOBODY \u2014 escalations that reached no one",
|
|
25648
|
+
isFlag: true
|
|
25649
|
+
},
|
|
25650
|
+
{ name: "limit", description: "Max rows (default 50, max 200)" }
|
|
25651
|
+
],
|
|
25652
|
+
handler: async ({ ctx, workspace, args, requireAuth: requireAuth2, outputData: outputData2 }) => {
|
|
25653
|
+
const result3 = await requireAuth2(ctx).apiClient.getInterventionRequests(workspace, {
|
|
25654
|
+
kind: args["kind"],
|
|
25655
|
+
openOnly: Boolean(args["open"]),
|
|
25656
|
+
chatId: args["chat-id"] ? Number(args["chat-id"]) : void 0,
|
|
25657
|
+
unroutedOnly: Boolean(args["unrouted"]),
|
|
25658
|
+
limit: args["limit"] ? Number(args["limit"]) : void 0
|
|
25659
|
+
});
|
|
25660
|
+
outputData2(result3, ctx, COLUMNS22);
|
|
25661
|
+
}
|
|
25662
|
+
}
|
|
24795
25663
|
]
|
|
24796
25664
|
};
|
|
24797
25665
|
|
|
24798
25666
|
// src/domains/notification-rules.ts
|
|
24799
25667
|
init_output();
|
|
24800
|
-
var
|
|
25668
|
+
var COLUMNS23 = [
|
|
24801
25669
|
COL.id(),
|
|
24802
25670
|
COL.name(),
|
|
24803
25671
|
{ header: "TYPE", getValue: (item) => item.noticeType ?? "" },
|
|
@@ -24814,7 +25682,7 @@ var notificationRulesDomain = {
|
|
|
24814
25682
|
createMethod: "createNotificationRule",
|
|
24815
25683
|
updateMethod: "updateNotificationRule",
|
|
24816
25684
|
deleteMethod: "deleteNotificationRule",
|
|
24817
|
-
columns:
|
|
25685
|
+
columns: COLUMNS23
|
|
24818
25686
|
})
|
|
24819
25687
|
]
|
|
24820
25688
|
};
|
|
@@ -24878,7 +25746,7 @@ var oauthDomain = {
|
|
|
24878
25746
|
// src/domains/operator-groups.ts
|
|
24879
25747
|
init_output();
|
|
24880
25748
|
init_context();
|
|
24881
|
-
var
|
|
25749
|
+
var COLUMNS24 = [COL.id(), COL.name(), COL.description()];
|
|
24882
25750
|
var operatorGroupsDomain = {
|
|
24883
25751
|
name: "operator-groups",
|
|
24884
25752
|
description: "Manage operator groups",
|
|
@@ -24891,7 +25759,7 @@ var operatorGroupsDomain = {
|
|
|
24891
25759
|
createMethod: "createOperatorGroup",
|
|
24892
25760
|
updateMethod: "updateOperatorGroup",
|
|
24893
25761
|
deleteMethod: "deleteOperatorGroup",
|
|
24894
|
-
columns:
|
|
25762
|
+
columns: COLUMNS24
|
|
24895
25763
|
}),
|
|
24896
25764
|
{
|
|
24897
25765
|
path: ["operator-groups", "add-member"],
|
|
@@ -24972,13 +25840,6 @@ var ORG_DOMAIN_COLUMNS = [
|
|
|
24972
25840
|
maxWidth: 80
|
|
24973
25841
|
}
|
|
24974
25842
|
];
|
|
24975
|
-
function requireOrgId(args) {
|
|
24976
|
-
const val = args["org-uuid"] ?? args.org;
|
|
24977
|
-
if (typeof val !== "string" || !val) {
|
|
24978
|
-
throw new CLIError("Missing required argument: --org-uuid");
|
|
24979
|
-
}
|
|
24980
|
-
return val;
|
|
24981
|
-
}
|
|
24982
25843
|
function requireDomainUuid(args) {
|
|
24983
25844
|
const val = args["domain-uuid"] ?? args.uuid;
|
|
24984
25845
|
if (typeof val !== "string" || !val) {
|
|
@@ -24993,7 +25854,7 @@ function requireDomain(args) {
|
|
|
24993
25854
|
}
|
|
24994
25855
|
return val;
|
|
24995
25856
|
}
|
|
24996
|
-
var
|
|
25857
|
+
var ORG_UUID_ARG2 = {
|
|
24997
25858
|
name: "org-uuid",
|
|
24998
25859
|
aliases: ["org"],
|
|
24999
25860
|
description: "Organization UUID or ID",
|
|
@@ -25014,13 +25875,13 @@ function emailVerifyCommand(path4, description) {
|
|
|
25014
25875
|
description,
|
|
25015
25876
|
mutates: true,
|
|
25016
25877
|
requiresWorkspace: false,
|
|
25017
|
-
args: [
|
|
25878
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25018
25879
|
examples: [
|
|
25019
25880
|
`yarn gr ${path4.join(" ")} --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID --allow-write`
|
|
25020
25881
|
],
|
|
25021
25882
|
handler: async (hctx) => {
|
|
25022
25883
|
const result3 = await requireAuth(hctx.ctx).apiClient.verifyOrgDomainEmail(
|
|
25023
|
-
|
|
25884
|
+
requireOrgRef(hctx.args),
|
|
25024
25885
|
requireDomainUuid(hctx.args)
|
|
25025
25886
|
);
|
|
25026
25887
|
outputSingle(result3, hctx.ctx);
|
|
@@ -25033,13 +25894,13 @@ function siteVerifyCommand(path4, description) {
|
|
|
25033
25894
|
description,
|
|
25034
25895
|
mutates: true,
|
|
25035
25896
|
requiresWorkspace: false,
|
|
25036
|
-
args: [
|
|
25897
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25037
25898
|
examples: [
|
|
25038
25899
|
`yarn gr ${path4.join(" ")} --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID --allow-write`
|
|
25039
25900
|
],
|
|
25040
25901
|
handler: async (hctx) => {
|
|
25041
25902
|
const result3 = await requireAuth(hctx.ctx).apiClient.verifyOrgDomainSite(
|
|
25042
|
-
|
|
25903
|
+
requireOrgRef(hctx.args),
|
|
25043
25904
|
requireDomainUuid(hctx.args)
|
|
25044
25905
|
);
|
|
25045
25906
|
outputSingle(result3, hctx.ctx);
|
|
@@ -25053,7 +25914,7 @@ function registerDomainCommand(path4) {
|
|
|
25053
25914
|
mutates: true,
|
|
25054
25915
|
requiresWorkspace: false,
|
|
25055
25916
|
args: [
|
|
25056
|
-
|
|
25917
|
+
ORG_UUID_ARG2,
|
|
25057
25918
|
{ name: "domain", description: "Domain to register, e.g. example.com", required: true }
|
|
25058
25919
|
],
|
|
25059
25920
|
examples: [
|
|
@@ -25061,7 +25922,7 @@ function registerDomainCommand(path4) {
|
|
|
25061
25922
|
],
|
|
25062
25923
|
handler: async (hctx) => {
|
|
25063
25924
|
const result3 = await requireAuth(hctx.ctx).apiClient.registerOrgDomain(
|
|
25064
|
-
|
|
25925
|
+
requireOrgRef(hctx.args),
|
|
25065
25926
|
requireDomain(hctx.args)
|
|
25066
25927
|
);
|
|
25067
25928
|
outputSingle(result3, hctx.ctx, ORG_DOMAIN_COLUMNS);
|
|
@@ -25073,11 +25934,11 @@ var domainCommands = [
|
|
|
25073
25934
|
path: ["org", "domains", "list"],
|
|
25074
25935
|
description: "List domains registered to an organization",
|
|
25075
25936
|
requiresWorkspace: false,
|
|
25076
|
-
args: [
|
|
25937
|
+
args: [ORG_UUID_ARG2],
|
|
25077
25938
|
examples: ["yarn gr org domains list --org-uuid $ORG_UUID"],
|
|
25078
25939
|
handler: async (hctx) => {
|
|
25079
25940
|
const result3 = await requireAuth(hctx.ctx).apiClient.listOrgDomains(
|
|
25080
|
-
|
|
25941
|
+
requireOrgRef(hctx.args)
|
|
25081
25942
|
);
|
|
25082
25943
|
outputData(result3, hctx.ctx, ORG_DOMAIN_COLUMNS);
|
|
25083
25944
|
}
|
|
@@ -25086,11 +25947,11 @@ var domainCommands = [
|
|
|
25086
25947
|
path: ["org", "domains", "get"],
|
|
25087
25948
|
description: "Get a registered organization domain",
|
|
25088
25949
|
requiresWorkspace: false,
|
|
25089
|
-
args: [
|
|
25950
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25090
25951
|
examples: ["yarn gr org domains get --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID"],
|
|
25091
25952
|
handler: async (hctx) => {
|
|
25092
25953
|
const result3 = await requireAuth(hctx.ctx).apiClient.getOrgDomain(
|
|
25093
|
-
|
|
25954
|
+
requireOrgRef(hctx.args),
|
|
25094
25955
|
requireDomainUuid(hctx.args)
|
|
25095
25956
|
);
|
|
25096
25957
|
outputSingle(result3, hctx.ctx, ORG_DOMAIN_COLUMNS);
|
|
@@ -25103,13 +25964,13 @@ var domainCommands = [
|
|
|
25103
25964
|
description: "Verify domain ownership by checking the _gravity-verify TXT record",
|
|
25104
25965
|
mutates: true,
|
|
25105
25966
|
requiresWorkspace: false,
|
|
25106
|
-
args: [
|
|
25967
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25107
25968
|
examples: [
|
|
25108
25969
|
"yarn gr org domains verify-ownership --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID --allow-write"
|
|
25109
25970
|
],
|
|
25110
25971
|
handler: async (hctx) => {
|
|
25111
25972
|
const result3 = await requireAuth(hctx.ctx).apiClient.verifyOrgDomainOwnership(
|
|
25112
|
-
|
|
25973
|
+
requireOrgRef(hctx.args),
|
|
25113
25974
|
requireDomainUuid(hctx.args)
|
|
25114
25975
|
);
|
|
25115
25976
|
outputSingle(result3, hctx.ctx);
|
|
@@ -25120,13 +25981,16 @@ var domainCommands = [
|
|
|
25120
25981
|
description: "Delete a registered organization domain",
|
|
25121
25982
|
mutates: true,
|
|
25122
25983
|
requiresWorkspace: false,
|
|
25123
|
-
args: [
|
|
25984
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25124
25985
|
examples: [
|
|
25125
25986
|
"yarn gr org domains delete --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID --allow-write"
|
|
25126
25987
|
],
|
|
25127
25988
|
handler: async (hctx) => {
|
|
25128
25989
|
const domainUuid = requireDomainUuid(hctx.args);
|
|
25129
|
-
await requireAuth(hctx.ctx).apiClient.deleteOrgDomain(
|
|
25990
|
+
await requireAuth(hctx.ctx).apiClient.deleteOrgDomain(
|
|
25991
|
+
requireOrgRef(hctx.args),
|
|
25992
|
+
domainUuid
|
|
25993
|
+
);
|
|
25130
25994
|
process.stdout.write(`Deleted org domain ${domainUuid}
|
|
25131
25995
|
`);
|
|
25132
25996
|
}
|
|
@@ -25136,13 +26000,13 @@ var domainCommands = [
|
|
|
25136
26000
|
description: "Enable email DNS records on a verified organization domain",
|
|
25137
26001
|
mutates: true,
|
|
25138
26002
|
requiresWorkspace: false,
|
|
25139
|
-
args: [
|
|
26003
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25140
26004
|
examples: [
|
|
25141
26005
|
"yarn gr org domains email enable --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID --allow-write"
|
|
25142
26006
|
],
|
|
25143
26007
|
handler: async (hctx) => {
|
|
25144
26008
|
const result3 = await requireAuth(hctx.ctx).apiClient.enableOrgDomainEmail(
|
|
25145
|
-
|
|
26009
|
+
requireOrgRef(hctx.args),
|
|
25146
26010
|
requireDomainUuid(hctx.args)
|
|
25147
26011
|
);
|
|
25148
26012
|
outputSingle(result3, hctx.ctx);
|
|
@@ -25152,11 +26016,11 @@ var domainCommands = [
|
|
|
25152
26016
|
path: ["org", "domains", "email", "get"],
|
|
25153
26017
|
description: "Get email DNS setup and status for an organization domain",
|
|
25154
26018
|
requiresWorkspace: false,
|
|
25155
|
-
args: [
|
|
26019
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25156
26020
|
examples: ["yarn gr org domains email get --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID"],
|
|
25157
26021
|
handler: async (hctx) => {
|
|
25158
26022
|
const result3 = await requireAuth(hctx.ctx).apiClient.getOrgDomainEmail(
|
|
25159
|
-
|
|
26023
|
+
requireOrgRef(hctx.args),
|
|
25160
26024
|
requireDomainUuid(hctx.args)
|
|
25161
26025
|
);
|
|
25162
26026
|
outputSingle(result3, hctx.ctx);
|
|
@@ -25176,7 +26040,7 @@ var domainCommands = [
|
|
|
25176
26040
|
mutates: true,
|
|
25177
26041
|
requiresWorkspace: false,
|
|
25178
26042
|
args: [
|
|
25179
|
-
|
|
26043
|
+
ORG_UUID_ARG2,
|
|
25180
26044
|
DOMAIN_UUID_ARG,
|
|
25181
26045
|
{
|
|
25182
26046
|
name: "confirm",
|
|
@@ -25190,7 +26054,7 @@ var domainCommands = [
|
|
|
25190
26054
|
handler: async (hctx) => {
|
|
25191
26055
|
const domainUuid = requireDomainUuid(hctx.args);
|
|
25192
26056
|
const result3 = await requireAuth(hctx.ctx).apiClient.disableOrgDomainEmail(
|
|
25193
|
-
|
|
26057
|
+
requireOrgRef(hctx.args),
|
|
25194
26058
|
domainUuid,
|
|
25195
26059
|
hctx.args.confirm === true
|
|
25196
26060
|
);
|
|
@@ -25213,13 +26077,13 @@ var domainCommands = [
|
|
|
25213
26077
|
description: "Enable custom site CNAME verification on a verified organization domain",
|
|
25214
26078
|
mutates: true,
|
|
25215
26079
|
requiresWorkspace: false,
|
|
25216
|
-
args: [
|
|
26080
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25217
26081
|
examples: [
|
|
25218
26082
|
"yarn gr org domains site enable --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID --allow-write"
|
|
25219
26083
|
],
|
|
25220
26084
|
handler: async (hctx) => {
|
|
25221
26085
|
const result3 = await requireAuth(hctx.ctx).apiClient.enableOrgDomainSite(
|
|
25222
|
-
|
|
26086
|
+
requireOrgRef(hctx.args),
|
|
25223
26087
|
requireDomainUuid(hctx.args)
|
|
25224
26088
|
);
|
|
25225
26089
|
outputSingle(result3, hctx.ctx);
|
|
@@ -25229,11 +26093,11 @@ var domainCommands = [
|
|
|
25229
26093
|
path: ["org", "domains", "site", "get"],
|
|
25230
26094
|
description: "Get custom site CNAME setup and status for an organization domain",
|
|
25231
26095
|
requiresWorkspace: false,
|
|
25232
|
-
args: [
|
|
26096
|
+
args: [ORG_UUID_ARG2, DOMAIN_UUID_ARG],
|
|
25233
26097
|
examples: ["yarn gr org domains site get --org-uuid $ORG_UUID --domain-uuid $DOMAIN_UUID"],
|
|
25234
26098
|
handler: async (hctx) => {
|
|
25235
26099
|
const result3 = await requireAuth(hctx.ctx).apiClient.getOrgDomainSite(
|
|
25236
|
-
|
|
26100
|
+
requireOrgRef(hctx.args),
|
|
25237
26101
|
requireDomainUuid(hctx.args)
|
|
25238
26102
|
);
|
|
25239
26103
|
outputSingle(result3, hctx.ctx);
|
|
@@ -25253,7 +26117,7 @@ var domainCommands = [
|
|
|
25253
26117
|
mutates: true,
|
|
25254
26118
|
requiresWorkspace: false,
|
|
25255
26119
|
args: [
|
|
25256
|
-
|
|
26120
|
+
ORG_UUID_ARG2,
|
|
25257
26121
|
DOMAIN_UUID_ARG,
|
|
25258
26122
|
{
|
|
25259
26123
|
name: "confirm",
|
|
@@ -25267,7 +26131,7 @@ var domainCommands = [
|
|
|
25267
26131
|
handler: async (hctx) => {
|
|
25268
26132
|
const domainUuid = requireDomainUuid(hctx.args);
|
|
25269
26133
|
const result3 = await requireAuth(hctx.ctx).apiClient.disableOrgDomainSite(
|
|
25270
|
-
|
|
26134
|
+
requireOrgRef(hctx.args),
|
|
25271
26135
|
domainUuid,
|
|
25272
26136
|
hctx.args.confirm === true
|
|
25273
26137
|
);
|
|
@@ -25302,6 +26166,229 @@ var orgDomain = {
|
|
|
25302
26166
|
]
|
|
25303
26167
|
};
|
|
25304
26168
|
|
|
26169
|
+
// src/domains/org-legal-entities.ts
|
|
26170
|
+
init_context();
|
|
26171
|
+
init_errors();
|
|
26172
|
+
init_output();
|
|
26173
|
+
var LEGAL_ENTITY_COLUMNS = [
|
|
26174
|
+
{ header: "UUID", getValue: (e) => e.uuid ?? "" },
|
|
26175
|
+
{ header: "LEGAL NAME", getValue: (e) => e.legalName ?? "" },
|
|
26176
|
+
{ header: "PRIMARY", getValue: (e) => e.isPrimary ? "yes" : "" },
|
|
26177
|
+
{ header: "ID TYPE", getValue: (e) => e.registrationIdentifierType ?? "" },
|
|
26178
|
+
{ header: "PROFILE SID", getValue: (e) => e.customerProfileSid ?? "" },
|
|
26179
|
+
// The CACHED status hint. `org business-profile get` reads Twilio live.
|
|
26180
|
+
{ header: "PROFILE STATUS (cached)", getValue: (e) => e.customerProfileStatus ?? "" }
|
|
26181
|
+
];
|
|
26182
|
+
var LEGAL_ENTITY_UUID_ARG = {
|
|
26183
|
+
name: "legal-entity-uuid",
|
|
26184
|
+
aliases: ["legal-entity", "entity-uuid"],
|
|
26185
|
+
description: "Legal entity UUID (omit to use the org primary entity)",
|
|
26186
|
+
required: false
|
|
26187
|
+
};
|
|
26188
|
+
var TRUST_PRODUCT_ENTITY_UUID_ARG = { ...LEGAL_ENTITY_UUID_ARG, required: true };
|
|
26189
|
+
var TRUST_PRODUCT_COLUMNS = [
|
|
26190
|
+
{ header: "PRODUCT", getValue: (p) => p.product ?? "" },
|
|
26191
|
+
{ header: "STATUS", getValue: (p) => p.status ?? "(none)" },
|
|
26192
|
+
{ header: "TRUST PRODUCT SID", getValue: (p) => p.trustProductSid ?? "(none)" },
|
|
26193
|
+
// CNAM only; blank for the other two rather than absent, so the column lines up.
|
|
26194
|
+
{ header: "DISPLAY NAME", getValue: (p) => p.displayName ?? "" }
|
|
26195
|
+
];
|
|
26196
|
+
function optionalEntityUuid(args) {
|
|
26197
|
+
const val = args["legal-entity-uuid"] ?? args["legal-entity"] ?? args["entity-uuid"];
|
|
26198
|
+
return typeof val === "string" && val ? val : void 0;
|
|
26199
|
+
}
|
|
26200
|
+
function requireEntityUuid(args) {
|
|
26201
|
+
const val = optionalEntityUuid(args);
|
|
26202
|
+
if (!val) {
|
|
26203
|
+
throw new CLIError("Missing required argument: --legal-entity-uuid");
|
|
26204
|
+
}
|
|
26205
|
+
return val;
|
|
26206
|
+
}
|
|
26207
|
+
function requireBody(data) {
|
|
26208
|
+
if (data && typeof data === "object" && !Array.isArray(data)) return data;
|
|
26209
|
+
throw new CLIError(
|
|
26210
|
+
`Missing or invalid --data. Pass a JSON object, e.g. --data '{"key":"value"}' (or --file body.json). Arrays are not accepted.`
|
|
26211
|
+
);
|
|
26212
|
+
}
|
|
26213
|
+
function submittability(profile) {
|
|
26214
|
+
if (profile.evaluationStatus === "compliant") return "yes";
|
|
26215
|
+
if (profile.evaluationStatus === "noncompliant") return "no (noncompliant)";
|
|
26216
|
+
if (profile.status && profile.status !== "draft") return `n/a (${profile.status})`;
|
|
26217
|
+
return "no (never evaluated)";
|
|
26218
|
+
}
|
|
26219
|
+
var commands2 = [
|
|
26220
|
+
{
|
|
26221
|
+
path: ["org", "legal-entities", "list"],
|
|
26222
|
+
description: "List an org's legal entities (one Twilio Customer Profile each). Requires org admin \u2014 staff join via `gr admin organizations join --role platform_support`.",
|
|
26223
|
+
requiresWorkspace: false,
|
|
26224
|
+
args: [ORG_UUID_ARG],
|
|
26225
|
+
examples: ["yarn gr org legal-entities list --org-uuid $ORG_UUID"],
|
|
26226
|
+
handler: async (hctx) => {
|
|
26227
|
+
const result3 = await requireAuth(hctx.ctx).apiClient.listLegalEntities(
|
|
26228
|
+
requireOrgRef(hctx.args)
|
|
26229
|
+
);
|
|
26230
|
+
outputData(result3.legalEntities ?? [], hctx.ctx, LEGAL_ENTITY_COLUMNS);
|
|
26231
|
+
}
|
|
26232
|
+
},
|
|
26233
|
+
{
|
|
26234
|
+
path: ["org", "legal-entities", "get"],
|
|
26235
|
+
description: "Get one legal entity",
|
|
26236
|
+
requiresWorkspace: false,
|
|
26237
|
+
args: [ORG_UUID_ARG, { ...LEGAL_ENTITY_UUID_ARG, required: true }],
|
|
26238
|
+
examples: [
|
|
26239
|
+
"yarn gr org legal-entities get --org-uuid $ORG_UUID --legal-entity-uuid $ENTITY_UUID"
|
|
26240
|
+
],
|
|
26241
|
+
handler: async (hctx) => {
|
|
26242
|
+
const result3 = await requireAuth(hctx.ctx).apiClient.getLegalEntity(
|
|
26243
|
+
requireOrgRef(hctx.args),
|
|
26244
|
+
requireEntityUuid(hctx.args)
|
|
26245
|
+
);
|
|
26246
|
+
outputSingle(result3, hctx.ctx);
|
|
26247
|
+
}
|
|
26248
|
+
},
|
|
26249
|
+
{
|
|
26250
|
+
path: ["org", "legal-entities", "create"],
|
|
26251
|
+
description: "Create a legal entity (its business profile is filled in separately)",
|
|
26252
|
+
mutates: true,
|
|
26253
|
+
requiresWorkspace: false,
|
|
26254
|
+
args: [ORG_UUID_ARG],
|
|
26255
|
+
examples: [
|
|
26256
|
+
`yarn gr org legal-entities create --org-uuid $ORG_UUID --data '{"legalName":"Acme Health"}' --allow-write`
|
|
26257
|
+
],
|
|
26258
|
+
handler: async (hctx) => {
|
|
26259
|
+
const result3 = await requireAuth(hctx.ctx).apiClient.createLegalEntity(
|
|
26260
|
+
requireOrgRef(hctx.args),
|
|
26261
|
+
requireBody(hctx.data)
|
|
26262
|
+
);
|
|
26263
|
+
outputSingle(result3, hctx.ctx);
|
|
26264
|
+
}
|
|
26265
|
+
},
|
|
26266
|
+
{
|
|
26267
|
+
path: ["org", "business-profile", "get"],
|
|
26268
|
+
description: "Read a legal entity's business profile LIVE from Twilio. SUBMITTABLE is derived from evaluationStatus, not status.",
|
|
26269
|
+
requiresWorkspace: false,
|
|
26270
|
+
args: [ORG_UUID_ARG, LEGAL_ENTITY_UUID_ARG],
|
|
26271
|
+
examples: ["yarn gr org business-profile get --org-uuid $ORG_UUID"],
|
|
26272
|
+
handler: async (hctx) => {
|
|
26273
|
+
const profile = await requireAuth(hctx.ctx).apiClient.getBusinessProfile(
|
|
26274
|
+
requireOrgRef(hctx.args),
|
|
26275
|
+
optionalEntityUuid(hctx.args)
|
|
26276
|
+
);
|
|
26277
|
+
outputSingle(
|
|
26278
|
+
hctx.ctx.outputFormat === "json" ? profile : {
|
|
26279
|
+
status: profile.status ?? "(none)",
|
|
26280
|
+
evaluationStatus: profile.evaluationStatus ?? "(not evaluated)",
|
|
26281
|
+
SUBMITTABLE: submittability(profile),
|
|
26282
|
+
customerProfileSid: profile.customerProfileSid ?? "(none)",
|
|
26283
|
+
legalName: profile.businessInfo?.legalName ?? "(missing)",
|
|
26284
|
+
authorizedReps: (profile.authorizedReps ?? []).length,
|
|
26285
|
+
hasAddress: profile.address ? "yes" : "no",
|
|
26286
|
+
failureReasons: (profile.failureReasons ?? []).join("; ") || "(none)",
|
|
26287
|
+
profileRecoveryFailed: profile.profileRecoveryFailed ? "YES" : "no"
|
|
26288
|
+
},
|
|
26289
|
+
hctx.ctx
|
|
26290
|
+
);
|
|
26291
|
+
}
|
|
26292
|
+
},
|
|
26293
|
+
{
|
|
26294
|
+
path: ["org", "business-profile", "update"],
|
|
26295
|
+
description: "Upsert the business profile (idempotent via cached SIDs). Returns the fresh compliance evaluation.",
|
|
26296
|
+
mutates: true,
|
|
26297
|
+
requiresWorkspace: false,
|
|
26298
|
+
args: [ORG_UUID_ARG, LEGAL_ENTITY_UUID_ARG],
|
|
26299
|
+
examples: [
|
|
26300
|
+
"yarn gr org business-profile update --org-uuid $ORG_UUID --file profile.json --allow-write"
|
|
26301
|
+
],
|
|
26302
|
+
handler: async (hctx) => {
|
|
26303
|
+
const result3 = await requireAuth(hctx.ctx).apiClient.updateBusinessProfile(
|
|
26304
|
+
requireOrgRef(hctx.args),
|
|
26305
|
+
requireBody(hctx.data),
|
|
26306
|
+
optionalEntityUuid(hctx.args)
|
|
26307
|
+
);
|
|
26308
|
+
outputSingle(result3, hctx.ctx);
|
|
26309
|
+
}
|
|
26310
|
+
},
|
|
26311
|
+
{
|
|
26312
|
+
path: ["org", "business-profile", "submit"],
|
|
26313
|
+
description: "Submit the business profile to Twilio for review. Free \u2014 the paid step is brand registration, which is separate. 412 if not currently compliant, 409 if a review is already in flight.",
|
|
26314
|
+
mutates: true,
|
|
26315
|
+
requiresWorkspace: false,
|
|
26316
|
+
args: [ORG_UUID_ARG, LEGAL_ENTITY_UUID_ARG],
|
|
26317
|
+
examples: ["yarn gr org business-profile submit --org-uuid $ORG_UUID --allow-write"],
|
|
26318
|
+
handler: async (hctx) => {
|
|
26319
|
+
const result3 = await requireAuth(hctx.ctx).apiClient.submitBusinessProfile(
|
|
26320
|
+
requireOrgRef(hctx.args),
|
|
26321
|
+
optionalEntityUuid(hctx.args)
|
|
26322
|
+
);
|
|
26323
|
+
outputSingle(result3, hctx.ctx);
|
|
26324
|
+
}
|
|
26325
|
+
},
|
|
26326
|
+
{
|
|
26327
|
+
path: ["org", "business-profile", "cancel"],
|
|
26328
|
+
description: "Cancel an in-flight Twilio review, resetting the profile to draft so it can be edited and resubmitted",
|
|
26329
|
+
mutates: true,
|
|
26330
|
+
requiresWorkspace: false,
|
|
26331
|
+
args: [ORG_UUID_ARG, LEGAL_ENTITY_UUID_ARG],
|
|
26332
|
+
examples: ["yarn gr org business-profile cancel --org-uuid $ORG_UUID --allow-write"],
|
|
26333
|
+
handler: async (hctx) => {
|
|
26334
|
+
const result3 = await requireAuth(hctx.ctx).apiClient.cancelBusinessProfile(
|
|
26335
|
+
requireOrgRef(hctx.args),
|
|
26336
|
+
optionalEntityUuid(hctx.args)
|
|
26337
|
+
);
|
|
26338
|
+
outputSingle(result3, hctx.ctx);
|
|
26339
|
+
}
|
|
26340
|
+
},
|
|
26341
|
+
{
|
|
26342
|
+
path: ["org", "trust-products", "list"],
|
|
26343
|
+
description: "Read an entity's CACHED voice trust product state (CNAM / SHAKEN-STIR / Voice Integrity) from trust_hub_state. No Twilio calls \u2014 run `sync` to reconcile.",
|
|
26344
|
+
requiresWorkspace: false,
|
|
26345
|
+
args: [ORG_UUID_ARG, TRUST_PRODUCT_ENTITY_UUID_ARG],
|
|
26346
|
+
examples: [
|
|
26347
|
+
"yarn gr org trust-products list --org-uuid $ORG_UUID --legal-entity-uuid $ENTITY_UUID --env prod"
|
|
26348
|
+
],
|
|
26349
|
+
handler: async (hctx) => {
|
|
26350
|
+
const result3 = await requireAuth(hctx.ctx).apiClient.getVoiceTrustProducts(
|
|
26351
|
+
requireOrgRef(hctx.args),
|
|
26352
|
+
requireEntityUuid(hctx.args)
|
|
26353
|
+
);
|
|
26354
|
+
outputData(result3.products, hctx.ctx, TRUST_PRODUCT_COLUMNS);
|
|
26355
|
+
}
|
|
26356
|
+
},
|
|
26357
|
+
{
|
|
26358
|
+
path: ["org", "trust-products", "sync"],
|
|
26359
|
+
description: "Reconcile voice trust products against Twilio: claim products staged outside the app and refresh non-terminal statuses. This is the prerequisite for `admin phone-numbers migrate`, whose preflight reads the cached state. 409 if another Trust Hub operation holds the org lock \u2014 retry shortly.",
|
|
26360
|
+
// Writes trust_hub_state and calls Twilio. Read-only in business terms
|
|
26361
|
+
// (it discovers, it does not create or submit), but it mutates our cache,
|
|
26362
|
+
// so it takes --allow-write like every other state-changing verb.
|
|
26363
|
+
mutates: true,
|
|
26364
|
+
requiresWorkspace: false,
|
|
26365
|
+
args: [ORG_UUID_ARG, TRUST_PRODUCT_ENTITY_UUID_ARG],
|
|
26366
|
+
examples: [
|
|
26367
|
+
"yarn gr org trust-products sync --org-uuid $ORG_UUID --legal-entity-uuid $ENTITY_UUID --env prod --allow-write"
|
|
26368
|
+
],
|
|
26369
|
+
handler: async (hctx) => {
|
|
26370
|
+
const result3 = await requireAuth(hctx.ctx).apiClient.syncVoiceTrustProducts(
|
|
26371
|
+
requireOrgRef(hctx.args),
|
|
26372
|
+
requireEntityUuid(hctx.args)
|
|
26373
|
+
);
|
|
26374
|
+
if (hctx.ctx.outputFormat !== "table") {
|
|
26375
|
+
outputSingle(result3, hctx.ctx);
|
|
26376
|
+
return;
|
|
26377
|
+
}
|
|
26378
|
+
const discovered = result3.discovered ?? [];
|
|
26379
|
+
console.log(
|
|
26380
|
+
discovered.length > 0 ? `Discovered ${discovered.length} product(s): ${discovered.join(", ")}` : "No new products discovered \u2014 already up to date."
|
|
26381
|
+
);
|
|
26382
|
+
outputData(result3.products, hctx.ctx, TRUST_PRODUCT_COLUMNS);
|
|
26383
|
+
}
|
|
26384
|
+
}
|
|
26385
|
+
];
|
|
26386
|
+
var orgLegalEntitiesDomain = {
|
|
26387
|
+
name: "org",
|
|
26388
|
+
description: "Legal entities and business profiles (Twilio Customer Profiles)",
|
|
26389
|
+
commands: commands2
|
|
26390
|
+
};
|
|
26391
|
+
|
|
25305
26392
|
// src/domains/org-phone-numbers.ts
|
|
25306
26393
|
init_dist();
|
|
25307
26394
|
init_context();
|
|
@@ -25326,14 +26413,7 @@ var AVAILABLE_PHONE_COLUMNS = [
|
|
|
25326
26413
|
{ header: "Region", getValue: (p) => p.region ?? "" },
|
|
25327
26414
|
{ header: "Type", getValue: (p) => p.phoneNumberType ?? "" }
|
|
25328
26415
|
];
|
|
25329
|
-
|
|
25330
|
-
const val = args["org-uuid"] ?? args["org"];
|
|
25331
|
-
if (typeof val !== "string" || !val) {
|
|
25332
|
-
throw new CLIError("Missing required argument: --org-uuid");
|
|
25333
|
-
}
|
|
25334
|
-
return val;
|
|
25335
|
-
}
|
|
25336
|
-
var commands2 = [
|
|
26416
|
+
var commands3 = [
|
|
25337
26417
|
{
|
|
25338
26418
|
path: ["org", "phone-numbers", "list"],
|
|
25339
26419
|
description: "List all phone numbers owned by an organization",
|
|
@@ -25343,7 +26423,7 @@ var commands2 = [
|
|
|
25343
26423
|
requiresWorkspace: false,
|
|
25344
26424
|
columns: PROVIDER_PHONE_COLUMNS,
|
|
25345
26425
|
handler: async (hctx) => {
|
|
25346
|
-
const orgUuid =
|
|
26426
|
+
const orgUuid = requireOrgRef(hctx.args);
|
|
25347
26427
|
const result3 = await getOrgApi(hctx).listPhoneNumbers(orgUuid);
|
|
25348
26428
|
outputData(result3, hctx.ctx, PROVIDER_PHONE_COLUMNS);
|
|
25349
26429
|
}
|
|
@@ -25366,7 +26446,7 @@ var commands2 = [
|
|
|
25366
26446
|
requiresWorkspace: false,
|
|
25367
26447
|
columns: AVAILABLE_PHONE_COLUMNS,
|
|
25368
26448
|
handler: async (hctx) => {
|
|
25369
|
-
const orgUuid =
|
|
26449
|
+
const orgUuid = requireOrgRef(hctx.args);
|
|
25370
26450
|
const result3 = await getOrgApi(hctx).searchPhoneNumbers(orgUuid, {
|
|
25371
26451
|
country: hctx.args.country ?? "US",
|
|
25372
26452
|
numberType: hctx.args["number-type"] ?? "local",
|
|
@@ -25402,7 +26482,7 @@ var commands2 = [
|
|
|
25402
26482
|
requiresWorkspace: false,
|
|
25403
26483
|
columns: PROVIDER_PHONE_COLUMNS,
|
|
25404
26484
|
handler: async (hctx) => {
|
|
25405
|
-
const orgUuid =
|
|
26485
|
+
const orgUuid = requireOrgRef(hctx.args);
|
|
25406
26486
|
const phoneNumber = hctx.args["phone-number"];
|
|
25407
26487
|
if (!phoneNumber) throw new CLIError("Missing required argument: --phone-number");
|
|
25408
26488
|
const numberType = hctx.args["number-type"] ?? "local";
|
|
@@ -25431,7 +26511,7 @@ var commands2 = [
|
|
|
25431
26511
|
requiresWorkspace: false,
|
|
25432
26512
|
columns: PROVIDER_PHONE_COLUMNS,
|
|
25433
26513
|
handler: async (hctx) => {
|
|
25434
|
-
const orgUuid =
|
|
26514
|
+
const orgUuid = requireOrgRef(hctx.args);
|
|
25435
26515
|
const providerPhoneUuid = hctx.args["provider-phone-uuid"];
|
|
25436
26516
|
const workspaceUuid = hctx.args["workspace-uuid"];
|
|
25437
26517
|
if (!providerPhoneUuid)
|
|
@@ -25463,7 +26543,7 @@ Create a workspace phone linked to this provider number (sets Twilio webhooks):
|
|
|
25463
26543
|
requiresWorkspace: false,
|
|
25464
26544
|
columns: PROVIDER_PHONE_COLUMNS,
|
|
25465
26545
|
handler: async (hctx) => {
|
|
25466
|
-
const orgUuid =
|
|
26546
|
+
const orgUuid = requireOrgRef(hctx.args);
|
|
25467
26547
|
const providerPhoneUuid = hctx.args["provider-phone-uuid"];
|
|
25468
26548
|
const newWorkspaceUuid = hctx.args["new-workspace-uuid"];
|
|
25469
26549
|
if (!providerPhoneUuid)
|
|
@@ -25489,7 +26569,7 @@ Create a workspace phone linked to this provider number (sets Twilio webhooks):
|
|
|
25489
26569
|
requiresWorkspace: false,
|
|
25490
26570
|
columns: PROVIDER_PHONE_COLUMNS,
|
|
25491
26571
|
handler: async (hctx) => {
|
|
25492
|
-
const orgUuid =
|
|
26572
|
+
const orgUuid = requireOrgRef(hctx.args);
|
|
25493
26573
|
const providerPhoneUuid = hctx.args["provider-phone-uuid"];
|
|
25494
26574
|
if (!providerPhoneUuid)
|
|
25495
26575
|
throw new CLIError("Missing required argument: --provider-phone-uuid");
|
|
@@ -25507,7 +26587,7 @@ Create a workspace phone linked to this provider number (sets Twilio webhooks):
|
|
|
25507
26587
|
],
|
|
25508
26588
|
requiresWorkspace: false,
|
|
25509
26589
|
handler: async (hctx) => {
|
|
25510
|
-
const orgUuid =
|
|
26590
|
+
const orgUuid = requireOrgRef(hctx.args);
|
|
25511
26591
|
const providerPhoneUuid = hctx.args["provider-phone-uuid"];
|
|
25512
26592
|
if (!providerPhoneUuid)
|
|
25513
26593
|
throw new CLIError("Missing required argument: --provider-phone-uuid");
|
|
@@ -25519,7 +26599,7 @@ Create a workspace phone linked to this provider number (sets Twilio webhooks):
|
|
|
25519
26599
|
var orgPhoneNumbersDomain = {
|
|
25520
26600
|
name: "org",
|
|
25521
26601
|
description: "Organization management",
|
|
25522
|
-
commands:
|
|
26602
|
+
commands: commands3
|
|
25523
26603
|
};
|
|
25524
26604
|
|
|
25525
26605
|
// src/domains/phone-numbers.ts
|
|
@@ -28434,7 +29514,7 @@ function requireCallerRole(args, flag) {
|
|
|
28434
29514
|
}
|
|
28435
29515
|
return role;
|
|
28436
29516
|
}
|
|
28437
|
-
var
|
|
29517
|
+
var COLUMNS25 = [
|
|
28438
29518
|
COL.id(),
|
|
28439
29519
|
{ header: "NUMBER", getValue: (item) => item.phoneNumber ?? item.number ?? "" },
|
|
28440
29520
|
{ header: "LABEL", getValue: (item) => item.label ?? item.name ?? "" },
|
|
@@ -28461,7 +29541,7 @@ var phoneNumbersDomain = {
|
|
|
28461
29541
|
entityName: "phone number",
|
|
28462
29542
|
listMethod: "getPhoneNumbers",
|
|
28463
29543
|
archiveMethod: "archivePhoneNumber",
|
|
28464
|
-
columns:
|
|
29544
|
+
columns: COLUMNS25
|
|
28465
29545
|
}),
|
|
28466
29546
|
{
|
|
28467
29547
|
path: ["phone-numbers", "get"],
|
|
@@ -28511,7 +29591,7 @@ ${PHONE_NUMBER_FIELD_REFERENCE}`,
|
|
|
28511
29591
|
);
|
|
28512
29592
|
const record = asPhoneRecord(result3);
|
|
28513
29593
|
const warnings = collectPhoneNumberWarnings(record);
|
|
28514
|
-
outputData([record], ctx,
|
|
29594
|
+
outputData([record], ctx, COLUMNS25);
|
|
28515
29595
|
if (warnings.length > 0) {
|
|
28516
29596
|
process.stderr.write("\nWarnings after create:\n");
|
|
28517
29597
|
for (const w of warnings) {
|
|
@@ -28543,7 +29623,7 @@ ${PHONE_NUMBER_FIELD_REFERENCE}`,
|
|
|
28543
29623
|
id,
|
|
28544
29624
|
data
|
|
28545
29625
|
);
|
|
28546
|
-
outputData([result3], ctx,
|
|
29626
|
+
outputData([result3], ctx, COLUMNS25);
|
|
28547
29627
|
} catch (err) {
|
|
28548
29628
|
return enrichPhoneNumberApiError(err);
|
|
28549
29629
|
}
|
|
@@ -28831,7 +29911,7 @@ ${formatRoutingSimulation(sim, phone)}
|
|
|
28831
29911
|
requiresWorkspace: true,
|
|
28832
29912
|
handler: async ({ ctx, workspace }) => {
|
|
28833
29913
|
const result3 = await requireAuth(ctx).apiClient.getAvailablePhoneNumbers(workspace);
|
|
28834
|
-
outputData(result3, ctx,
|
|
29914
|
+
outputData(result3, ctx, COLUMNS25);
|
|
28835
29915
|
}
|
|
28836
29916
|
},
|
|
28837
29917
|
{
|
|
@@ -28856,7 +29936,7 @@ ${formatRoutingSimulation(sim, phone)}
|
|
|
28856
29936
|
const id = requireNumberFrom(args, "phone-number-id", "id");
|
|
28857
29937
|
const providerPhoneUuid = requireString(args, "provider-phone-uuid");
|
|
28858
29938
|
const result3 = await auth.apiClient.linkPhoneNumber(workspace, id, providerPhoneUuid);
|
|
28859
|
-
outputData([result3], auth,
|
|
29939
|
+
outputData([result3], auth, COLUMNS25);
|
|
28860
29940
|
}
|
|
28861
29941
|
},
|
|
28862
29942
|
{
|
|
@@ -28869,7 +29949,7 @@ ${formatRoutingSimulation(sim, phone)}
|
|
|
28869
29949
|
workspace,
|
|
28870
29950
|
data
|
|
28871
29951
|
);
|
|
28872
|
-
outputData([result3], ctx,
|
|
29952
|
+
outputData([result3], ctx, COLUMNS25);
|
|
28873
29953
|
}
|
|
28874
29954
|
},
|
|
28875
29955
|
{
|
|
@@ -29021,7 +30101,7 @@ function normalizePronunciationUpdatePayload(data) {
|
|
|
29021
30101
|
}
|
|
29022
30102
|
|
|
29023
30103
|
// src/domains/pronunciations.ts
|
|
29024
|
-
var
|
|
30104
|
+
var COLUMNS26 = [
|
|
29025
30105
|
COL.id(),
|
|
29026
30106
|
{ header: "TERM", getValue: (item) => item.term ?? "" },
|
|
29027
30107
|
{ header: "RESPELLING", getValue: (item) => item.respelling ?? "" },
|
|
@@ -29043,7 +30123,7 @@ var pronunciationsDomain = {
|
|
|
29043
30123
|
const auth = requireAuth(ctx);
|
|
29044
30124
|
const orgUuid = await resolveOrgUuidFromWorkspace(auth.apiClient, workspace);
|
|
29045
30125
|
const result3 = await auth.apiClient.getPronunciationEntries(orgUuid);
|
|
29046
|
-
outputData(result3, ctx,
|
|
30126
|
+
outputData(result3, ctx, COLUMNS26);
|
|
29047
30127
|
}
|
|
29048
30128
|
},
|
|
29049
30129
|
{
|
|
@@ -29057,7 +30137,7 @@ var pronunciationsDomain = {
|
|
|
29057
30137
|
const orgUuid = await resolveOrgUuidFromWorkspace(auth.apiClient, workspace);
|
|
29058
30138
|
const payload = normalizePronunciationCreatePayload(data);
|
|
29059
30139
|
const result3 = await auth.apiClient.createPronunciationEntry(orgUuid, payload);
|
|
29060
|
-
outputSingle(result3, ctx,
|
|
30140
|
+
outputSingle(result3, ctx, COLUMNS26);
|
|
29061
30141
|
}
|
|
29062
30142
|
},
|
|
29063
30143
|
{
|
|
@@ -29075,7 +30155,7 @@ var pronunciationsDomain = {
|
|
|
29075
30155
|
requireNumber(args, "id"),
|
|
29076
30156
|
payload
|
|
29077
30157
|
);
|
|
29078
|
-
outputSingle(result3, ctx,
|
|
30158
|
+
outputSingle(result3, ctx, COLUMNS26);
|
|
29079
30159
|
}
|
|
29080
30160
|
},
|
|
29081
30161
|
{
|
|
@@ -29099,7 +30179,7 @@ var pronunciationsDomain = {
|
|
|
29099
30179
|
requiresWorkspace: true,
|
|
29100
30180
|
handler: async ({ ctx }) => {
|
|
29101
30181
|
const result3 = await requireAuth(ctx).apiClient.getMyPronunciations();
|
|
29102
|
-
outputData(result3, ctx,
|
|
30182
|
+
outputData(result3, ctx, COLUMNS26);
|
|
29103
30183
|
}
|
|
29104
30184
|
},
|
|
29105
30185
|
{
|
|
@@ -29110,7 +30190,7 @@ var pronunciationsDomain = {
|
|
|
29110
30190
|
handler: async ({ ctx, data }) => {
|
|
29111
30191
|
const payload = normalizePronunciationCreatePayload(data);
|
|
29112
30192
|
const result3 = await requireAuth(ctx).apiClient.createMyPronunciation(payload);
|
|
29113
|
-
outputSingle(result3, ctx,
|
|
30193
|
+
outputSingle(result3, ctx, COLUMNS26);
|
|
29114
30194
|
}
|
|
29115
30195
|
},
|
|
29116
30196
|
{
|
|
@@ -29417,7 +30497,7 @@ ${ROUTINE_FIELD_REFERENCE}`,
|
|
|
29417
30497
|
// src/domains/subscriptions.ts
|
|
29418
30498
|
init_output();
|
|
29419
30499
|
init_context();
|
|
29420
|
-
var
|
|
30500
|
+
var COLUMNS27 = [
|
|
29421
30501
|
COL.id(),
|
|
29422
30502
|
COL.status(),
|
|
29423
30503
|
{ header: "PLAN", getValue: (item) => item.planName ?? item.plan ?? "" },
|
|
@@ -29433,7 +30513,7 @@ var subscriptionsDomain = {
|
|
|
29433
30513
|
requiresWorkspace: false,
|
|
29434
30514
|
handler: async ({ ctx }) => {
|
|
29435
30515
|
const result3 = await requireAuth(ctx).apiClient.getSubscriptions();
|
|
29436
|
-
outputData(result3, ctx,
|
|
30516
|
+
outputData(result3, ctx, COLUMNS27);
|
|
29437
30517
|
}
|
|
29438
30518
|
},
|
|
29439
30519
|
{
|
|
@@ -29442,7 +30522,7 @@ var subscriptionsDomain = {
|
|
|
29442
30522
|
requiresWorkspace: true,
|
|
29443
30523
|
handler: async ({ ctx, workspace }) => {
|
|
29444
30524
|
const result3 = await requireAuth(ctx).apiClient.getWorkspaceSubscriptions(workspace);
|
|
29445
|
-
outputData(result3, ctx,
|
|
30525
|
+
outputData(result3, ctx, COLUMNS27);
|
|
29446
30526
|
}
|
|
29447
30527
|
},
|
|
29448
30528
|
{
|
|
@@ -29455,7 +30535,7 @@ var subscriptionsDomain = {
|
|
|
29455
30535
|
const result3 = await requireAuth(ctx).apiClient.cancelSubscription(
|
|
29456
30536
|
requireNumber(args, "id")
|
|
29457
30537
|
);
|
|
29458
|
-
outputSingle(result3, ctx,
|
|
30538
|
+
outputSingle(result3, ctx, COLUMNS27);
|
|
29459
30539
|
}
|
|
29460
30540
|
},
|
|
29461
30541
|
{
|
|
@@ -29467,7 +30547,7 @@ var subscriptionsDomain = {
|
|
|
29467
30547
|
const result3 = await requireAuth(ctx).apiClient.reactivateSubscription(
|
|
29468
30548
|
requireNumber(args, "id")
|
|
29469
30549
|
);
|
|
29470
|
-
outputSingle(result3, ctx,
|
|
30550
|
+
outputSingle(result3, ctx, COLUMNS27);
|
|
29471
30551
|
}
|
|
29472
30552
|
},
|
|
29473
30553
|
{
|
|
@@ -29481,7 +30561,7 @@ var subscriptionsDomain = {
|
|
|
29481
30561
|
requireNumber(args, "id"),
|
|
29482
30562
|
data
|
|
29483
30563
|
);
|
|
29484
|
-
outputSingle(result3, ctx,
|
|
30564
|
+
outputSingle(result3, ctx, COLUMNS27);
|
|
29485
30565
|
}
|
|
29486
30566
|
}
|
|
29487
30567
|
]
|
|
@@ -29740,7 +30820,7 @@ var supportDomain = {
|
|
|
29740
30820
|
|
|
29741
30821
|
// src/domains/supervisors.ts
|
|
29742
30822
|
init_output();
|
|
29743
|
-
var
|
|
30823
|
+
var COLUMNS28 = [
|
|
29744
30824
|
COL.id(),
|
|
29745
30825
|
COL.name(),
|
|
29746
30826
|
{ header: "TYPE", getValue: (item) => item.type ?? "" },
|
|
@@ -29758,7 +30838,7 @@ var supervisorsDomain = {
|
|
|
29758
30838
|
createMethod: "createSupervisor",
|
|
29759
30839
|
updateMethod: "updateSupervisor",
|
|
29760
30840
|
deleteMethod: "deleteSupervisor",
|
|
29761
|
-
columns:
|
|
30841
|
+
columns: COLUMNS28
|
|
29762
30842
|
})
|
|
29763
30843
|
]
|
|
29764
30844
|
};
|
|
@@ -30108,7 +31188,7 @@ var widgetDomainsDomain = {
|
|
|
30108
31188
|
}
|
|
30109
31189
|
],
|
|
30110
31190
|
examples: [
|
|
30111
|
-
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat,operator --allow-write",
|
|
31191
|
+
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat,operator-tools --allow-write",
|
|
30112
31192
|
"gr widget-domains enable -w $WID --domain <uuid> --widgets chat --allow-subdomains --port 4444 --allow-write"
|
|
30113
31193
|
],
|
|
30114
31194
|
handler: async ({ ctx, workspace, args }) => {
|
|
@@ -30154,7 +31234,7 @@ var widgetDomainsDomain = {
|
|
|
30154
31234
|
// src/domains/integrations/app-connections.ts
|
|
30155
31235
|
init_output();
|
|
30156
31236
|
init_context();
|
|
30157
|
-
var
|
|
31237
|
+
var COLUMNS29 = [
|
|
30158
31238
|
COL.id(),
|
|
30159
31239
|
COL.name(),
|
|
30160
31240
|
{ header: "TYPE", getValue: (item) => item.type ?? "" },
|
|
@@ -30195,7 +31275,7 @@ var appConnectionsDomain = {
|
|
|
30195
31275
|
requiresWorkspace: true,
|
|
30196
31276
|
handler: async ({ ctx, workspace }) => {
|
|
30197
31277
|
const result3 = await requireAuth(ctx).apiClient.listAvailableAppConnections(workspace);
|
|
30198
|
-
outputData(result3, ctx,
|
|
31278
|
+
outputData(result3, ctx, COLUMNS29);
|
|
30199
31279
|
}
|
|
30200
31280
|
},
|
|
30201
31281
|
{
|
|
@@ -30204,7 +31284,7 @@ var appConnectionsDomain = {
|
|
|
30204
31284
|
requiresWorkspace: true,
|
|
30205
31285
|
handler: async ({ ctx, workspace }) => {
|
|
30206
31286
|
const result3 = await requireAuth(ctx).apiClient.listAppConnections(workspace);
|
|
30207
|
-
outputData(result3, ctx,
|
|
31287
|
+
outputData(result3, ctx, COLUMNS29);
|
|
30208
31288
|
}
|
|
30209
31289
|
},
|
|
30210
31290
|
{
|
|
@@ -30228,7 +31308,7 @@ var appConnectionsDomain = {
|
|
|
30228
31308
|
const result3 = await requireAuth(ctx).apiClient.enablePlatformApp(workspace, {
|
|
30229
31309
|
slug: requireString(args, "slug")
|
|
30230
31310
|
});
|
|
30231
|
-
outputSingle(result3, ctx,
|
|
31311
|
+
outputSingle(result3, ctx, COLUMNS29);
|
|
30232
31312
|
}
|
|
30233
31313
|
},
|
|
30234
31314
|
{
|
|
@@ -30241,7 +31321,7 @@ var appConnectionsDomain = {
|
|
|
30241
31321
|
workspace,
|
|
30242
31322
|
requireString(args, "id")
|
|
30243
31323
|
);
|
|
30244
|
-
outputSingle(result3, ctx,
|
|
31324
|
+
outputSingle(result3, ctx, COLUMNS29);
|
|
30245
31325
|
}
|
|
30246
31326
|
},
|
|
30247
31327
|
{
|
|
@@ -30256,7 +31336,7 @@ var appConnectionsDomain = {
|
|
|
30256
31336
|
requireString(args, "id"),
|
|
30257
31337
|
data
|
|
30258
31338
|
);
|
|
30259
|
-
outputSingle(result3, ctx,
|
|
31339
|
+
outputSingle(result3, ctx, COLUMNS29);
|
|
30260
31340
|
}
|
|
30261
31341
|
},
|
|
30262
31342
|
{
|
|
@@ -30603,7 +31683,7 @@ var confluenceDomain = {
|
|
|
30603
31683
|
// src/domains/integrations/discord-bots.ts
|
|
30604
31684
|
init_output();
|
|
30605
31685
|
init_context();
|
|
30606
|
-
var
|
|
31686
|
+
var COLUMNS30 = [COL.id(), COL.name(), COL.status()];
|
|
30607
31687
|
var discordBotsDomain = {
|
|
30608
31688
|
name: "discord-bots",
|
|
30609
31689
|
description: "Manage Discord bot integrations",
|
|
@@ -30616,7 +31696,7 @@ var discordBotsDomain = {
|
|
|
30616
31696
|
createMethod: "createDiscordBot",
|
|
30617
31697
|
updateMethod: "updateDiscordBot",
|
|
30618
31698
|
deleteMethod: "deleteDiscordBot",
|
|
30619
|
-
columns:
|
|
31699
|
+
columns: COLUMNS30,
|
|
30620
31700
|
paginationSupport: "full"
|
|
30621
31701
|
}),
|
|
30622
31702
|
{
|
|
@@ -30678,7 +31758,7 @@ var discordBotsDomain = {
|
|
|
30678
31758
|
// src/domains/integrations/fhir-connections.ts
|
|
30679
31759
|
init_output();
|
|
30680
31760
|
init_context();
|
|
30681
|
-
var
|
|
31761
|
+
var COLUMNS31 = [
|
|
30682
31762
|
COL.id(),
|
|
30683
31763
|
COL.name(),
|
|
30684
31764
|
{ header: "URL", getValue: (item) => item.baseUrl ?? "" },
|
|
@@ -30696,7 +31776,7 @@ var fhirConnectionsDomain = {
|
|
|
30696
31776
|
createMethod: "createFhirConnection",
|
|
30697
31777
|
updateMethod: "updateFhirConnection",
|
|
30698
31778
|
deleteMethod: "deleteFhirConnection",
|
|
30699
|
-
columns:
|
|
31779
|
+
columns: COLUMNS31,
|
|
30700
31780
|
paginationSupport: "full"
|
|
30701
31781
|
}),
|
|
30702
31782
|
{
|
|
@@ -30719,7 +31799,7 @@ var fhirConnectionsDomain = {
|
|
|
30719
31799
|
init_context();
|
|
30720
31800
|
init_errors();
|
|
30721
31801
|
init_output();
|
|
30722
|
-
var
|
|
31802
|
+
var COLUMNS32 = [
|
|
30723
31803
|
{ header: "CONFIGURED", getValue: (i) => String(i.configured ?? false) },
|
|
30724
31804
|
{ header: "ENABLED", getValue: (i) => String(i.enabled ?? false) },
|
|
30725
31805
|
{ header: "HAS_KEY", getValue: (i) => String(i.hasApiKey ?? false) },
|
|
@@ -30748,7 +31828,7 @@ var patientSyncDomain = {
|
|
|
30748
31828
|
workspace,
|
|
30749
31829
|
data
|
|
30750
31830
|
);
|
|
30751
|
-
outputSingle(result3, ctx,
|
|
31831
|
+
outputSingle(result3, ctx, COLUMNS32);
|
|
30752
31832
|
}
|
|
30753
31833
|
},
|
|
30754
31834
|
{
|
|
@@ -30757,7 +31837,7 @@ var patientSyncDomain = {
|
|
|
30757
31837
|
requiresWorkspace: true,
|
|
30758
31838
|
handler: async ({ ctx, workspace }) => {
|
|
30759
31839
|
const result3 = await requireAuth(ctx).apiClient.getPatientSyncStatus(workspace);
|
|
30760
|
-
outputSingle(result3, ctx,
|
|
31840
|
+
outputSingle(result3, ctx, COLUMNS32);
|
|
30761
31841
|
}
|
|
30762
31842
|
},
|
|
30763
31843
|
{
|
|
@@ -31825,7 +32905,7 @@ var salesforceDomain = {
|
|
|
31825
32905
|
init_errors();
|
|
31826
32906
|
init_output();
|
|
31827
32907
|
init_context();
|
|
31828
|
-
var
|
|
32908
|
+
var COLUMNS33 = [COL.id(), COL.name(), COL.status()];
|
|
31829
32909
|
function addSlackUrls(data, apiUrl, workspaceUuid) {
|
|
31830
32910
|
const base = `${apiUrl}/api/v2/w/${workspaceUuid}/app-connections/slack`;
|
|
31831
32911
|
return {
|
|
@@ -31848,7 +32928,7 @@ var slackAppsDomain = {
|
|
|
31848
32928
|
entityName: "Slack app",
|
|
31849
32929
|
listMethod: "getSlackApps",
|
|
31850
32930
|
deleteMethod: "deleteSlackApp",
|
|
31851
|
-
columns:
|
|
32931
|
+
columns: COLUMNS33,
|
|
31852
32932
|
paginationSupport: "full"
|
|
31853
32933
|
}),
|
|
31854
32934
|
{
|
|
@@ -31937,7 +33017,7 @@ var slackAppsDomain = {
|
|
|
31937
33017
|
init_errors();
|
|
31938
33018
|
init_output();
|
|
31939
33019
|
init_context();
|
|
31940
|
-
var
|
|
33020
|
+
var COLUMNS34 = [COL.id(), COL.name(), COL.status()];
|
|
31941
33021
|
function addTeamsUrls(data, apiUrl, workspaceUuid) {
|
|
31942
33022
|
const base = `${apiUrl}/api/v2/w/${workspaceUuid}/app-connections/teams`;
|
|
31943
33023
|
return {
|
|
@@ -31958,7 +33038,7 @@ var teamsAppsDomain = {
|
|
|
31958
33038
|
entityName: "Teams app",
|
|
31959
33039
|
listMethod: "getTeamsApps",
|
|
31960
33040
|
deleteMethod: "deleteTeamsApp",
|
|
31961
|
-
columns:
|
|
33041
|
+
columns: COLUMNS34,
|
|
31962
33042
|
paginationSupport: "full"
|
|
31963
33043
|
}),
|
|
31964
33044
|
{
|
|
@@ -32064,6 +33144,7 @@ function registerPublicDomains(registry) {
|
|
|
32064
33144
|
registry.register(qualificationsDomain);
|
|
32065
33145
|
registry.register(queriesDomain);
|
|
32066
33146
|
registry.register(personasDomain);
|
|
33147
|
+
registry.register(metricsDomain);
|
|
32067
33148
|
registry.register(journeysDomain);
|
|
32068
33149
|
registry.register(abilitiesDomain);
|
|
32069
33150
|
registry.register(phoneNumbersDomain);
|
|
@@ -32071,10 +33152,10 @@ function registerPublicDomains(registry) {
|
|
|
32071
33152
|
registry.register(inboxesDomain);
|
|
32072
33153
|
registry.register(operatorGroupsDomain);
|
|
32073
33154
|
registry.register(accessGrantsDomain);
|
|
33155
|
+
registry.register(interventionRequestsDomain);
|
|
32074
33156
|
registry.register(notificationRulesDomain);
|
|
32075
33157
|
registry.register(supervisorsDomain);
|
|
32076
33158
|
registry.register(promptsDomain);
|
|
32077
|
-
registry.register(milestonesDomain);
|
|
32078
33159
|
registry.register(customToolkitsDomain);
|
|
32079
33160
|
registry.register(mcpServersDomain);
|
|
32080
33161
|
registry.register(apiKeysDomain);
|
|
@@ -32086,6 +33167,7 @@ function registerPublicDomains(registry) {
|
|
|
32086
33167
|
registry.register(featuresDomain);
|
|
32087
33168
|
registry.register(pronunciationsDomain);
|
|
32088
33169
|
registry.register(orgDomain);
|
|
33170
|
+
registry.register(orgLegalEntitiesDomain);
|
|
32089
33171
|
registry.register(orgPhoneNumbersDomain);
|
|
32090
33172
|
registry.register(authManageDomain);
|
|
32091
33173
|
registry.register(appsDomain);
|
|
@@ -35194,7 +36276,7 @@ async function authImportDevCommand(ctx, args) {
|
|
|
35194
36276
|
|
|
35195
36277
|
// src/commands/organizations.ts
|
|
35196
36278
|
init_output();
|
|
35197
|
-
var
|
|
36279
|
+
var COLUMNS35 = [
|
|
35198
36280
|
{ header: "NAME", getValue: (o) => o.organizationName || "", maxWidth: 35 },
|
|
35199
36281
|
{ header: "SLUG", getValue: (o) => o.organizationSlug || "", maxWidth: 25 },
|
|
35200
36282
|
{ header: "UUID", getValue: (o) => o.organizationUuid },
|
|
@@ -35202,7 +36284,7 @@ var COLUMNS34 = [
|
|
|
35202
36284
|
];
|
|
35203
36285
|
async function organizationsListCommand(ctx) {
|
|
35204
36286
|
const organizations = await ctx.apiClient.getMyOrganizations();
|
|
35205
|
-
outputData(organizations, ctx,
|
|
36287
|
+
outputData(organizations, ctx, COLUMNS35);
|
|
35206
36288
|
}
|
|
35207
36289
|
|
|
35208
36290
|
// src/commands/whoami.ts
|
|
@@ -35527,7 +36609,7 @@ init_concierge_api();
|
|
|
35527
36609
|
|
|
35528
36610
|
// package.json
|
|
35529
36611
|
var package_default = {
|
|
35530
|
-
version: "0.
|
|
36612
|
+
version: "0.17.0"};
|
|
35531
36613
|
|
|
35532
36614
|
// src/gr.ts
|
|
35533
36615
|
var VERSION = package_default.version;
|