@gravity-rail/cli 0.43.0 → 0.45.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/README.md +4 -5
- package/dist/gr.js +116 -185
- package/dist/gr.js.map +1 -1
- package/dist/lib.js +35 -4
- package/dist/lib.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -633,13 +633,12 @@ gr bundles install -w "$CONSUMER" --bundle "$BUNDLE" --allow-write
|
|
|
633
633
|
gr bundles policy -w "$CONSUMER" --installation "$INSTALLATION" --set auto --allow-write
|
|
634
634
|
gr bundles readiness -w "$CONSUMER" --installation "$INSTALLATION"
|
|
635
635
|
|
|
636
|
-
#
|
|
637
|
-
gr
|
|
638
|
-
--data '{"name":"My customized Workflow"}' --allow-write
|
|
636
|
+
# Edit the installed Workflows: detach the Bundle. Updates stop.
|
|
637
|
+
gr bundles unsubscribe -w "$CONSUMER" --installation "$INSTALLATION" --allow-write
|
|
639
638
|
```
|
|
640
639
|
|
|
641
640
|
Installation creates the **consumer's local** Workflow ID and UUID; use those for
|
|
642
|
-
consumer reads and
|
|
641
|
+
consumer reads. Detaching keeps them and makes the Workflows editable. Installation and policy changes require
|
|
643
642
|
`workflows:admin` in the destination plus publisher access;
|
|
644
643
|
organization-admin status is not an additional requirement.
|
|
645
644
|
When a Bundle upgrade changes an installed Form schema, the acting administrator
|
|
@@ -664,7 +663,7 @@ not revoke the Bundle subscription.
|
|
|
664
663
|
| Install the latest version (initially pinned) | `bundles install --bundle <uuid>` |
|
|
665
664
|
| Follow new releases | `bundles policy --installation <uuid> --set auto` |
|
|
666
665
|
| Hold the installed release | `bundles policy --installation <uuid> --set pinned` |
|
|
667
|
-
|
|
|
666
|
+
| Detach: stop updates, keep installed content, make its Workflows editable | `bundles unsubscribe --installation <uuid>` |
|
|
668
667
|
| Preview an upgrade | `bundles preview --installation <uuid> --to 2` |
|
|
669
668
|
| Apply an upgrade | `bundles upgrade --installation <uuid> --to 2` |
|
|
670
669
|
| Inspect missing local dependencies | `bundles readiness --installation <uuid>` |
|
package/dist/gr.js
CHANGED
|
@@ -3205,7 +3205,7 @@ var init_libphonenumber_js = __esm({
|
|
|
3205
3205
|
}
|
|
3206
3206
|
});
|
|
3207
3207
|
|
|
3208
|
-
// ../sdk/dist/chunk-
|
|
3208
|
+
// ../sdk/dist/chunk-STN3ZOEX.js
|
|
3209
3209
|
function resourceWorkflowsPath(wid, ...segments) {
|
|
3210
3210
|
const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
|
|
3211
3211
|
const base = `w/${encodeURIComponent(wid)}/resource-workflows`;
|
|
@@ -3223,9 +3223,6 @@ function pageQuery(params) {
|
|
|
3223
3223
|
const qs = query.toString();
|
|
3224
3224
|
return qs ? `?${qs}` : "";
|
|
3225
3225
|
}
|
|
3226
|
-
function refusalCode(value) {
|
|
3227
|
-
return typeof value === "string" && REFUSAL_CODES.includes(value) ? value : void 0;
|
|
3228
|
-
}
|
|
3229
3226
|
function installationsPath(wid, ...segments) {
|
|
3230
3227
|
const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
|
|
3231
3228
|
const base = `w/${encodeURIComponent(wid)}/installations`;
|
|
@@ -3418,7 +3415,6 @@ function createApiModules(apiKey, baseUrl3, customFetch) {
|
|
|
3418
3415
|
auth: new AuthApi(apiKey, baseUrl3, customFetch),
|
|
3419
3416
|
builders: new BuildersApi(apiKey, baseUrl3, customFetch),
|
|
3420
3417
|
bundles: new BundlesApi(apiKey, baseUrl3, customFetch),
|
|
3421
|
-
demos: new DemosApi(apiKey, baseUrl3, customFetch),
|
|
3422
3418
|
installations: new InstallationsApi(apiKey, baseUrl3, customFetch),
|
|
3423
3419
|
calendars: new CalendarsApi(apiKey, baseUrl3, customFetch),
|
|
3424
3420
|
calls: new CallsApi(apiKey, baseUrl3, customFetch),
|
|
@@ -4072,6 +4068,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
|
|
|
4072
4068
|
target.getWorkflowTaskAssignmentStats = workflows.getWorkflowTaskAssignmentStats.bind(workflows);
|
|
4073
4069
|
target.getTaskChats = workflows.getTaskChats.bind(workflows);
|
|
4074
4070
|
target.getWorkflowConfigValidation = workflows.getWorkflowConfigValidation.bind(workflows);
|
|
4071
|
+
target.getWorkflowPromptClassifications = workflows.getWorkflowPromptClassifications.bind(workflows);
|
|
4075
4072
|
target.getWorkflowNotes = workflowNotes.getWorkflowNotes.bind(workflowNotes);
|
|
4076
4073
|
target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
|
|
4077
4074
|
target.updateWorkflowNote = workflowNotes.updateWorkflowNote.bind(workflowNotes);
|
|
@@ -4508,6 +4505,7 @@ function bindOrgMethods(target, org) {
|
|
|
4508
4505
|
target.updateOrganizationMember = org.updateOrganizationMember.bind(org);
|
|
4509
4506
|
target.listOrgWebhookEndpoints = org.listOrgWebhookEndpoints.bind(org);
|
|
4510
4507
|
target.getOrgWebhookEndpoint = org.getOrgWebhookEndpoint.bind(org);
|
|
4508
|
+
target.updateOrgWebhookEndpoint = org.updateOrgWebhookEndpoint.bind(org);
|
|
4511
4509
|
}
|
|
4512
4510
|
function bindPronunciationsMethods(target, pronunciations) {
|
|
4513
4511
|
target.getPronunciationEntries = pronunciations.getPronunciationEntries.bind(pronunciations);
|
|
@@ -4550,15 +4548,6 @@ function bindBundlesMethods(target, bundles, resourceWorkflows) {
|
|
|
4550
4548
|
target.revokeBundleGrant = bundles.revokeBundleGrant.bind(bundles);
|
|
4551
4549
|
target.listResourceWorkflows = resourceWorkflows.listResourceWorkflows.bind(resourceWorkflows);
|
|
4552
4550
|
}
|
|
4553
|
-
function bindDemosMethods(target, demos) {
|
|
4554
|
-
target.getDemo = demos.getDemo.bind(demos);
|
|
4555
|
-
target.startDemoSession = demos.startDemoSession.bind(demos);
|
|
4556
|
-
target.sendDemoSessionSms = demos.sendDemoSessionSms.bind(demos);
|
|
4557
|
-
target.sendDemoSessionEmail = demos.sendDemoSessionEmail.bind(demos);
|
|
4558
|
-
target.placeDemoSessionCall = demos.placeDemoSessionCall.bind(demos);
|
|
4559
|
-
target.getDemoSessionTimeline = demos.getDemoSessionTimeline.bind(demos);
|
|
4560
|
-
target.endDemoSession = demos.endDemoSession.bind(demos);
|
|
4561
|
-
}
|
|
4562
4551
|
function bindInstallationsMethods(target, installations) {
|
|
4563
4552
|
target.preflightBundleInstallation = installations.preflightBundleInstallation.bind(installations);
|
|
4564
4553
|
target.installBundle = installations.installBundle.bind(installations);
|
|
@@ -4628,10 +4617,10 @@ function bindQualificationsMethods(target, qualifications) {
|
|
|
4628
4617
|
target.listTestChatRuns = qualifications.listTestChatRuns.bind(qualifications);
|
|
4629
4618
|
target.listScenarioHealthSummaries = qualifications.listScenarioHealthSummaries.bind(qualifications);
|
|
4630
4619
|
target.getTestChatRun = qualifications.getTestChatRun.bind(qualifications);
|
|
4631
|
-
target.
|
|
4632
|
-
target.
|
|
4633
|
-
target.
|
|
4634
|
-
target.
|
|
4620
|
+
target.listChatCapturedEffects = qualifications.listChatCapturedEffects.bind(qualifications);
|
|
4621
|
+
target.listChatRecordChanges = qualifications.listChatRecordChanges.bind(qualifications);
|
|
4622
|
+
target.takeTestChatRunEmailTurn = qualifications.takeTestChatRunEmailTurn.bind(qualifications);
|
|
4623
|
+
target.takeTestChatRunSmsTurn = qualifications.takeTestChatRunSmsTurn.bind(qualifications);
|
|
4635
4624
|
target.startTestChatRun = qualifications.startTestChatRun.bind(qualifications);
|
|
4636
4625
|
target.evaluateTestChatRun = qualifications.evaluateTestChatRun.bind(qualifications);
|
|
4637
4626
|
target.endTestChatRun = qualifications.endTestChatRun.bind(qualifications);
|
|
@@ -4724,9 +4713,9 @@ function getRevisionState(workflow, revision) {
|
|
|
4724
4713
|
state: revision?.publishedAt != null ? "published" : "draft"
|
|
4725
4714
|
};
|
|
4726
4715
|
}
|
|
4727
|
-
var AbilitiesApi, ResourceWorkflowsApi, BundlesApi,
|
|
4728
|
-
var
|
|
4729
|
-
"../sdk/dist/chunk-
|
|
4716
|
+
var AbilitiesApi, ResourceWorkflowsApi, BundlesApi, InstallationsApi, 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, RoutingRulesApi, SalesforceApi, ConnectionSyncApi, HubspotApi, SitesApi, SubscriptionsApi, SupportRequestsApi, CustomersApi, ResellersApi, SupervisorsApi, TasksApi, TemplatesApi, ToolkitsApi, JourneysApi, WorkflowsApi, WorkflowNotesApi, EventRuleObjectType, EventRuleEventType, EventRuleActionType, DriverMode, MEMBER_RELATIONSHIP_KINDS, WorkspaceInvitationsApi, WorkspacesApi, DashboardsApi, DevicesApi, TeamsAppsApi, ExperimentsApi, PatientSyncConnectionsApi, ActivityApi, MotdApi, InterventionRequestsApi, MetricsApi, ProjectsApi, TrackedLinksApi, WORKSPACE_METHOD_NAMES, WORKSPACE_METHOD_NAME_SET, GravityRailClient, WIDGET_SLUGS, CHAT_TYPES, BUILTIN_ASSISTANT_CHAT_TYPES, MEMBER_AGENT_CHAT_TYPES, ActivityGrain, ActivityGroupBy, ActivityOpenItemOrder, ActivityWindowBasis;
|
|
4717
|
+
var init_chunk_STN3ZOEX = __esm({
|
|
4718
|
+
"../sdk/dist/chunk-STN3ZOEX.js"() {
|
|
4730
4719
|
init_chunk_67QXTQVL();
|
|
4731
4720
|
init_libphonenumber_js();
|
|
4732
4721
|
AbilitiesApi = class extends BaseApiClient {
|
|
@@ -4965,109 +4954,6 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
4965
4954
|
});
|
|
4966
4955
|
}
|
|
4967
4956
|
};
|
|
4968
|
-
DemoRefusalCode = {
|
|
4969
|
-
session_expired: "session_expired",
|
|
4970
|
-
session_capped: "session_capped",
|
|
4971
|
-
calls_capped: "calls_capped",
|
|
4972
|
-
session_ended: "session_ended",
|
|
4973
|
-
destination_not_allowed: "destination_not_allowed",
|
|
4974
|
-
sender_cannot_send: "sender_cannot_send",
|
|
4975
|
-
demo_not_available: "demo_not_available"
|
|
4976
|
-
};
|
|
4977
|
-
REFUSAL_CODES = Object.values(DemoRefusalCode);
|
|
4978
|
-
DemoRequestError = class extends ApiError {
|
|
4979
|
-
code;
|
|
4980
|
-
constructor(message, statusCode, code) {
|
|
4981
|
-
super(message, statusCode);
|
|
4982
|
-
this.name = "DemoRequestError";
|
|
4983
|
-
this.code = code;
|
|
4984
|
-
}
|
|
4985
|
-
};
|
|
4986
|
-
DemosApi = class extends BaseApiClient {
|
|
4987
|
-
/** Whether a Bundle has a Demo, and what a visitor may contact in it. Needs no session. */
|
|
4988
|
-
async getDemo(bundleUuid2) {
|
|
4989
|
-
return this.anonymous(`demos/${encodeURIComponent(bundleUuid2)}`, {
|
|
4990
|
-
method: "GET"
|
|
4991
|
-
});
|
|
4992
|
-
}
|
|
4993
|
-
/** Start a Demo session. Needs no session; `recaptchaToken` is required where reCAPTCHA is enforced. */
|
|
4994
|
-
async startDemoSession(bundleUuid2, data = {}) {
|
|
4995
|
-
return this.anonymous(
|
|
4996
|
-
`demos/${encodeURIComponent(bundleUuid2)}/sessions`,
|
|
4997
|
-
{ method: "POST", body: JSON.stringify(data) }
|
|
4998
|
-
);
|
|
4999
|
-
}
|
|
5000
|
-
/** Text one of the Demo's numbers as the session's Persona. */
|
|
5001
|
-
async sendDemoSessionSms(sessionToken, data) {
|
|
5002
|
-
return this.anonymous(
|
|
5003
|
-
"demos/sessions/sms",
|
|
5004
|
-
{ method: "POST", body: JSON.stringify(data) },
|
|
5005
|
-
sessionToken
|
|
5006
|
-
);
|
|
5007
|
-
}
|
|
5008
|
-
/** Email one of the Demo's inboxes as the session's Persona. Returns after the Agent's turn. */
|
|
5009
|
-
async sendDemoSessionEmail(sessionToken, data) {
|
|
5010
|
-
return this.anonymous(
|
|
5011
|
-
"demos/sessions/email",
|
|
5012
|
-
{ method: "POST", body: JSON.stringify(data) },
|
|
5013
|
-
sessionToken
|
|
5014
|
-
);
|
|
5015
|
-
}
|
|
5016
|
-
/**
|
|
5017
|
-
* Call one of the Demo's numbers as the session's Persona.
|
|
5018
|
-
*
|
|
5019
|
-
* For an `answered` call, `join` holds what a browser opens the call with:
|
|
5020
|
-
* the web voice socket `url`, a single-use login `token` for this call's
|
|
5021
|
-
* Chat, and `chatId`. Send them in `voice.login`. For a `not_answered`
|
|
5022
|
-
* call, `notAnsweredBranch` says what the number does and nothing connects.
|
|
5023
|
-
*/
|
|
5024
|
-
async placeDemoSessionCall(sessionToken, data) {
|
|
5025
|
-
return this.anonymous(
|
|
5026
|
-
"demos/sessions/call",
|
|
5027
|
-
{ method: "POST", body: JSON.stringify(data) },
|
|
5028
|
-
sessionToken
|
|
5029
|
-
);
|
|
5030
|
-
}
|
|
5031
|
-
/**
|
|
5032
|
-
* The session's own messages, oldest first, and its state. `after` returns
|
|
5033
|
-
* only the rows after that row id, so a poll reads what is new.
|
|
5034
|
-
*/
|
|
5035
|
-
async getDemoSessionTimeline(sessionToken, params) {
|
|
5036
|
-
const query = params?.after !== void 0 ? `?after=${encodeURIComponent(params.after)}` : "";
|
|
5037
|
-
return this.anonymous(
|
|
5038
|
-
`demos/sessions/timeline${query}`,
|
|
5039
|
-
{ method: "GET" },
|
|
5040
|
-
sessionToken
|
|
5041
|
-
);
|
|
5042
|
-
}
|
|
5043
|
-
/** End the session. Nothing further is captured on it. */
|
|
5044
|
-
async endDemoSession(sessionToken) {
|
|
5045
|
-
return this.anonymous(
|
|
5046
|
-
"demos/sessions/end",
|
|
5047
|
-
{ method: "POST" },
|
|
5048
|
-
sessionToken
|
|
5049
|
-
);
|
|
5050
|
-
}
|
|
5051
|
-
/**
|
|
5052
|
-
* A request that carries the Demo session token, or no credential at all.
|
|
5053
|
-
* It never sends this client's API key or the browser's cookies.
|
|
5054
|
-
*/
|
|
5055
|
-
async anonymous(endpoint, init, sessionToken) {
|
|
5056
|
-
const headers2 = new Headers({ "Content-Type": "application/json" });
|
|
5057
|
-
if (sessionToken) headers2.set("Authorization", `Bearer ${sessionToken}`);
|
|
5058
|
-
const response = await this.fetchFunction(`${this.baseUrl}/api/v2/${endpoint}`, {
|
|
5059
|
-
...init,
|
|
5060
|
-
headers: headers2,
|
|
5061
|
-
credentials: "omit"
|
|
5062
|
-
});
|
|
5063
|
-
if (!response.ok) {
|
|
5064
|
-
const body = await response.json().catch(() => ({}));
|
|
5065
|
-
const detail = typeof body.detail === "string" ? body.detail : `Request failed (${response.status})`;
|
|
5066
|
-
throw new DemoRequestError(detail, response.status, refusalCode(body.code));
|
|
5067
|
-
}
|
|
5068
|
-
return await response.json();
|
|
5069
|
-
}
|
|
5070
|
-
};
|
|
5071
4957
|
InstallationsApi = class extends BaseApiClient {
|
|
5072
4958
|
/** Inspect one published release and its selected example dependencies. */
|
|
5073
4959
|
async preflightBundleInstallation(wid, bundleUuid2, data) {
|
|
@@ -5088,9 +4974,18 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
5088
4974
|
{ method: "POST", body: JSON.stringify(data) }
|
|
5089
4975
|
);
|
|
5090
4976
|
}
|
|
5091
|
-
/**
|
|
5092
|
-
|
|
5093
|
-
|
|
4977
|
+
/**
|
|
4978
|
+
* Every attached installation this workspace holds, oldest first.
|
|
4979
|
+
*
|
|
4980
|
+
* With `includeDetached`, detached installations are listed too
|
|
4981
|
+
* (`subscribed: false`). A detached Bundle cannot be installed again at the
|
|
4982
|
+
* version its row holds.
|
|
4983
|
+
*/
|
|
4984
|
+
async listInstallations(wid, options = {}) {
|
|
4985
|
+
const path4 = installationsPath(wid);
|
|
4986
|
+
return this.fetch(
|
|
4987
|
+
options.includeDetached ? `${path4}?includeDetached=true` : path4
|
|
4988
|
+
);
|
|
5094
4989
|
}
|
|
5095
4990
|
async getInstallation(wid, installationUuid2) {
|
|
5096
4991
|
return this.fetch(installationsPath(wid, installationUuid2));
|
|
@@ -11415,34 +11310,34 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
11415
11310
|
return this.fetch(`w/${wid}/qualifications/test-chat-runs/${runId}`);
|
|
11416
11311
|
}
|
|
11417
11312
|
/**
|
|
11418
|
-
* What a test run
|
|
11419
|
-
* notification and escalation it prepared,
|
|
11420
|
-
*
|
|
11421
|
-
*
|
|
11422
|
-
*
|
|
11313
|
+
* What a test run sent and received on other channels: each SMS, WhatsApp
|
|
11314
|
+
* message, email, call, notification and escalation it prepared, and each
|
|
11315
|
+
* message its Persona sent to the workspace, with content, oldest first.
|
|
11316
|
+
* `chatId` is the run's Chat. The list covers the whole run, including the
|
|
11317
|
+
* other Chats it produced. One entry per Member reached, naming the Member
|
|
11318
|
+
* and the workspace phone number or inbox used. Nothing in the list was
|
|
11319
|
+
* delivered. `truncated` means the list is incomplete. A Chat that is not
|
|
11320
|
+
* a test run's Chat has an empty list. Read access is the Chat's own.
|
|
11423
11321
|
*/
|
|
11424
|
-
async
|
|
11425
|
-
return this.fetch(
|
|
11426
|
-
`w/${wid}/qualifications/test-chat-runs/${runId}/captured-effects`
|
|
11427
|
-
);
|
|
11428
|
-
}
|
|
11429
|
-
async startTestChatRun(wid, workflowId, data = {}) {
|
|
11430
|
-
return this.fetch(
|
|
11431
|
-
`w/${wid}/qualifications/workflows/${workflowId}/test-chat-runs`,
|
|
11432
|
-
{
|
|
11433
|
-
method: "POST",
|
|
11434
|
-
body: JSON.stringify(data)
|
|
11435
|
-
}
|
|
11436
|
-
);
|
|
11322
|
+
async listChatCapturedEffects(wid, chatId) {
|
|
11323
|
+
return this.fetch(`w/${wid}/chats/${chatId}/captured-effects`);
|
|
11437
11324
|
}
|
|
11438
11325
|
/**
|
|
11439
|
-
*
|
|
11440
|
-
*
|
|
11441
|
-
*
|
|
11326
|
+
* What a test run did to its test Member's records: each record created,
|
|
11327
|
+
* each update and each deletion from the run's start, oldest first, with
|
|
11328
|
+
* the fields touched and their values before and after. `chatId` is the
|
|
11329
|
+
* run's Chat. A scenario's seeded records are the first changes. One entry
|
|
11330
|
+
* per operation on one record, naming the Form and the Member who acted.
|
|
11331
|
+
* `truncated` means the list is incomplete. A Chat that is not a test
|
|
11332
|
+
* run's Chat has an empty list. Requires `records:read` and read access to
|
|
11333
|
+
* the Chat; a Form, record or field the caller may not read is left out.
|
|
11442
11334
|
*/
|
|
11443
|
-
async
|
|
11335
|
+
async listChatRecordChanges(wid, chatId) {
|
|
11336
|
+
return this.fetch(`w/${wid}/chats/${chatId}/record-changes`);
|
|
11337
|
+
}
|
|
11338
|
+
async startTestChatRun(wid, workflowId, data = {}) {
|
|
11444
11339
|
return this.fetch(
|
|
11445
|
-
`w/${wid}/qualifications/test-chat-runs
|
|
11340
|
+
`w/${wid}/qualifications/workflows/${workflowId}/test-chat-runs`,
|
|
11446
11341
|
{
|
|
11447
11342
|
method: "POST",
|
|
11448
11343
|
body: JSON.stringify(data)
|
|
@@ -11450,13 +11345,14 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
11450
11345
|
);
|
|
11451
11346
|
}
|
|
11452
11347
|
/**
|
|
11453
|
-
*
|
|
11454
|
-
*
|
|
11455
|
-
*
|
|
11348
|
+
* Take an email turn in the run's own Chat as its Persona. The email is a
|
|
11349
|
+
* Message of that Chat and the email Agent turn runs on it; no Inbox and no
|
|
11350
|
+
* routing is involved. The call returns after the Agent's turn with the
|
|
11351
|
+
* reply the run captured, which is never sent.
|
|
11456
11352
|
*/
|
|
11457
|
-
async
|
|
11353
|
+
async takeTestChatRunEmailTurn(wid, runId, data) {
|
|
11458
11354
|
return this.fetch(
|
|
11459
|
-
`w/${wid}/qualifications/test-chat-runs/${runId}/
|
|
11355
|
+
`w/${wid}/qualifications/test-chat-runs/${runId}/persona-turn/email`,
|
|
11460
11356
|
{
|
|
11461
11357
|
method: "POST",
|
|
11462
11358
|
body: JSON.stringify(data)
|
|
@@ -11464,15 +11360,14 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
11464
11360
|
);
|
|
11465
11361
|
}
|
|
11466
11362
|
/**
|
|
11467
|
-
*
|
|
11468
|
-
*
|
|
11469
|
-
*
|
|
11470
|
-
*
|
|
11471
|
-
* nothing is run. No carrier is dialed.
|
|
11363
|
+
* Take a text turn in the run's own Chat as its Persona. The text is a
|
|
11364
|
+
* Message of that Chat and the SMS turn runs on it; no workspace phone
|
|
11365
|
+
* number and no routing is involved. The call returns after the Agent's
|
|
11366
|
+
* turn with the reply the run captured, which is never sent.
|
|
11472
11367
|
*/
|
|
11473
|
-
async
|
|
11368
|
+
async takeTestChatRunSmsTurn(wid, runId, data) {
|
|
11474
11369
|
return this.fetch(
|
|
11475
|
-
`w/${wid}/qualifications/test-chat-runs/${runId}/
|
|
11370
|
+
`w/${wid}/qualifications/test-chat-runs/${runId}/persona-turn/sms`,
|
|
11476
11371
|
{
|
|
11477
11372
|
method: "POST",
|
|
11478
11373
|
body: JSON.stringify(data)
|
|
@@ -13366,6 +13261,17 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
13366
13261
|
`w/${wid}/workflows/${workflowId}/validate-config`
|
|
13367
13262
|
);
|
|
13368
13263
|
}
|
|
13264
|
+
/**
|
|
13265
|
+
* Classify the prompts of a Workflow's draft revision.
|
|
13266
|
+
*
|
|
13267
|
+
* A decision model reads each Task that has a prompt and reports which
|
|
13268
|
+
* prompt classifications probably apply. Each call asks the model again.
|
|
13269
|
+
*/
|
|
13270
|
+
async getWorkflowPromptClassifications(wid, workflowId) {
|
|
13271
|
+
return this.fetch(
|
|
13272
|
+
`w/${wid}/workflows/${workflowId}/prompt-classifications`
|
|
13273
|
+
);
|
|
13274
|
+
}
|
|
13369
13275
|
/**
|
|
13370
13276
|
* Replay automatic routing for a Chat without performing the transition.
|
|
13371
13277
|
*
|
|
@@ -15904,6 +15810,7 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
15904
15810
|
"getWorkflowActivity",
|
|
15905
15811
|
"getWorkflowConfigValidation",
|
|
15906
15812
|
"getWorkflowFeedback",
|
|
15813
|
+
"getWorkflowPromptClassifications",
|
|
15907
15814
|
"getWorkflowContributors",
|
|
15908
15815
|
"getWorkflowDeletionPreview",
|
|
15909
15816
|
"getWorkflowDiagram",
|
|
@@ -15999,10 +15906,10 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
15999
15906
|
"listSalesforceObjects",
|
|
16000
15907
|
"listScenarioHealthSummaries",
|
|
16001
15908
|
"listScenarios",
|
|
16002
|
-
"
|
|
16003
|
-
"
|
|
16004
|
-
"
|
|
16005
|
-
"
|
|
15909
|
+
"listChatCapturedEffects",
|
|
15910
|
+
"listChatRecordChanges",
|
|
15911
|
+
"takeTestChatRunEmailTurn",
|
|
15912
|
+
"takeTestChatRunSmsTurn",
|
|
16006
15913
|
"listTestChatRuns",
|
|
16007
15914
|
"listWidgetDomains",
|
|
16008
15915
|
"listWorkspaceInvitationsAdmin",
|
|
@@ -16433,10 +16340,10 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
16433
16340
|
listTestChatRuns;
|
|
16434
16341
|
listScenarioHealthSummaries;
|
|
16435
16342
|
getTestChatRun;
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16439
|
-
|
|
16343
|
+
listChatCapturedEffects;
|
|
16344
|
+
listChatRecordChanges;
|
|
16345
|
+
takeTestChatRunEmailTurn;
|
|
16346
|
+
takeTestChatRunSmsTurn;
|
|
16440
16347
|
startTestChatRun;
|
|
16441
16348
|
evaluateTestChatRun;
|
|
16442
16349
|
endTestChatRun;
|
|
@@ -16548,14 +16455,6 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
16548
16455
|
createJourneyNote;
|
|
16549
16456
|
updateJourneyNote;
|
|
16550
16457
|
deleteJourneyNote;
|
|
16551
|
-
// Demos API
|
|
16552
|
-
getDemo;
|
|
16553
|
-
startDemoSession;
|
|
16554
|
-
sendDemoSessionSms;
|
|
16555
|
-
sendDemoSessionEmail;
|
|
16556
|
-
placeDemoSessionCall;
|
|
16557
|
-
getDemoSessionTimeline;
|
|
16558
|
-
endDemoSession;
|
|
16559
16458
|
updateBundle;
|
|
16560
16459
|
listBundleInstallations;
|
|
16561
16460
|
// Bundles API
|
|
@@ -16733,6 +16632,7 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
16733
16632
|
updateOrganizationMember;
|
|
16734
16633
|
listOrgWebhookEndpoints;
|
|
16735
16634
|
getOrgWebhookEndpoint;
|
|
16635
|
+
updateOrgWebhookEndpoint;
|
|
16736
16636
|
getVapidPublicKey;
|
|
16737
16637
|
registerPushSubscription;
|
|
16738
16638
|
unregisterPushSubscription;
|
|
@@ -16941,6 +16841,7 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
16941
16841
|
getWorkflowTaskAssignmentStats;
|
|
16942
16842
|
getTaskChats;
|
|
16943
16843
|
getWorkflowConfigValidation;
|
|
16844
|
+
getWorkflowPromptClassifications;
|
|
16944
16845
|
getWorkflowNotes;
|
|
16945
16846
|
createWorkflowNote;
|
|
16946
16847
|
updateWorkflowNote;
|
|
@@ -17418,7 +17319,6 @@ var init_chunk_G32MQGJD = __esm({
|
|
|
17418
17319
|
bindTrackedLinksMethods(this, apis.trackedLinks);
|
|
17419
17320
|
bindJourneysMethods(this, apis.journeys);
|
|
17420
17321
|
bindBundlesMethods(this, apis.bundles, apis.resourceWorkflows);
|
|
17421
|
-
bindDemosMethods(this, apis.demos);
|
|
17422
17322
|
bindInstallationsMethods(this, apis.installations);
|
|
17423
17323
|
bindExperimentsMethods(this, apis.experiments);
|
|
17424
17324
|
bindOperatorMethods(this, apis.operatorGroups);
|
|
@@ -17649,7 +17549,7 @@ var init_chunk_6KPGCPGW = __esm({
|
|
|
17649
17549
|
var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS, ActivityEventType, EntityKind;
|
|
17650
17550
|
var init_dist = __esm({
|
|
17651
17551
|
"../sdk/dist/index.js"() {
|
|
17652
|
-
|
|
17552
|
+
init_chunk_STN3ZOEX();
|
|
17653
17553
|
init_chunk_72SWNLVD();
|
|
17654
17554
|
init_chunk_6KPGCPGW();
|
|
17655
17555
|
init_chunk_67QXTQVL();
|
|
@@ -36949,7 +36849,41 @@ var ORG_WEBHOOK_COLUMNS = [
|
|
|
36949
36849
|
maxWidth: 80
|
|
36950
36850
|
}
|
|
36951
36851
|
];
|
|
36852
|
+
function requireWebhookEndpointUuid(args) {
|
|
36853
|
+
const value = args["endpoint-uuid"] ?? args.id;
|
|
36854
|
+
if (typeof value !== "string" || !value.trim()) {
|
|
36855
|
+
throw new CLIError("Missing required argument: --endpoint-uuid");
|
|
36856
|
+
}
|
|
36857
|
+
return value.trim();
|
|
36858
|
+
}
|
|
36859
|
+
function webhookStatusCommand(action) {
|
|
36860
|
+
const status = action === "pause" ? "paused" : "active";
|
|
36861
|
+
return {
|
|
36862
|
+
path: ["org", "webhooks", action],
|
|
36863
|
+
description: `${action === "pause" ? "Pause" : "Resume"} one organization webhook endpoint. Requires organization admin access. Pausing retains the endpoint and delivery history; resuming can deliver held events.`,
|
|
36864
|
+
mutates: true,
|
|
36865
|
+
requiresWorkspace: false,
|
|
36866
|
+
args: [
|
|
36867
|
+
ORG_UUID_ARG2,
|
|
36868
|
+
{ name: "endpoint-uuid", aliases: ["id"], description: "Endpoint UUID", required: true }
|
|
36869
|
+
],
|
|
36870
|
+
examples: [
|
|
36871
|
+
`yarn gr org webhooks ${action} --org-uuid $ORG_UUID --endpoint-uuid $ENDPOINT_UUID --allow-write`
|
|
36872
|
+
],
|
|
36873
|
+
handler: async (hctx) => {
|
|
36874
|
+
const endpointUuid = requireWebhookEndpointUuid(hctx.args);
|
|
36875
|
+
const result2 = await requireAuth(hctx.ctx).apiClient.updateOrgWebhookEndpoint(
|
|
36876
|
+
requireOrgRef(hctx.args),
|
|
36877
|
+
endpointUuid,
|
|
36878
|
+
{ status }
|
|
36879
|
+
);
|
|
36880
|
+
outputSingle(result2, hctx.ctx, ORG_WEBHOOK_COLUMNS);
|
|
36881
|
+
}
|
|
36882
|
+
};
|
|
36883
|
+
}
|
|
36952
36884
|
var webhookCommands = [
|
|
36885
|
+
webhookStatusCommand("pause"),
|
|
36886
|
+
webhookStatusCommand("resume"),
|
|
36953
36887
|
{
|
|
36954
36888
|
path: ["org", "webhooks", "list"],
|
|
36955
36889
|
description: "List an organization's webhook endpoints (read-only). Each row carries the destination host fingerprint and a masked signing secret, never the URL or a usable secret.",
|
|
@@ -36973,10 +36907,7 @@ var webhookCommands = [
|
|
|
36973
36907
|
],
|
|
36974
36908
|
examples: ["yarn gr org webhooks get --org $ORG_UUID --endpoint-uuid $ENDPOINT_UUID"],
|
|
36975
36909
|
handler: async (hctx) => {
|
|
36976
|
-
const endpointUuid = hctx.args
|
|
36977
|
-
if (typeof endpointUuid !== "string" || !endpointUuid) {
|
|
36978
|
-
throw new CLIError("Missing required argument: --endpoint-uuid");
|
|
36979
|
-
}
|
|
36910
|
+
const endpointUuid = requireWebhookEndpointUuid(hctx.args);
|
|
36980
36911
|
const result2 = await requireAuth(hctx.ctx).apiClient.getOrgWebhookEndpoint(
|
|
36981
36912
|
requireOrgRef(hctx.args),
|
|
36982
36913
|
endpointUuid
|
|
@@ -46348,7 +46279,7 @@ init_concierge_api();
|
|
|
46348
46279
|
|
|
46349
46280
|
// package.json
|
|
46350
46281
|
var package_default = {
|
|
46351
|
-
version: "0.
|
|
46282
|
+
version: "0.45.0"};
|
|
46352
46283
|
|
|
46353
46284
|
// src/gr.ts
|
|
46354
46285
|
var VERSION = package_default.version;
|