@gravity-rail/sdk 0.51.0 → 0.53.1
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 +89 -37
- package/dist/{chat-interaction-B5nj76yH.d.ts → chat-interaction-BDWwGHdp.d.cts} +37 -5
- package/dist/{chat-interaction-DvjO9WFC.d.cts → chat-interaction-pkhyXbVv.d.ts} +37 -5
- package/dist/{chunk-TGL72KPS.js → chunk-GCN4OMYU.js} +3 -3
- package/dist/chunk-GCN4OMYU.js.map +1 -0
- package/dist/{chunk-BW3E45QD.js → chunk-JRK77RT4.js} +31 -6
- package/dist/chunk-JRK77RT4.js.map +1 -0
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +4 -4
- package/dist/helpers.d.ts +4 -4
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +31 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +2 -2
- package/dist/internal.cjs +31 -6
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +5 -5
- package/dist/internal.d.ts +5 -5
- package/dist/internal.js +2 -2
- package/dist/{member-import-C1yjuxjL.d.cts → member-import-BtTWfQ46.d.cts} +1 -1
- package/dist/{member-import-C6WVvneJ.d.ts → member-import-Do6D2g14.d.ts} +1 -1
- package/dist/{path-CxQlFVf9.d.cts → path-J_F_cq4m.d.cts} +2 -2
- package/dist/{path-BoBhe09k.d.ts → path-UGcX8CEF.d.ts} +2 -2
- package/dist/schemas.d.cts +2 -2
- package/dist/schemas.d.ts +2 -2
- package/dist/{tasks-CKBDY-Ok.d.cts → tasks-JweebIce.d.cts} +8 -1
- package/dist/{tasks-CKBDY-Ok.d.ts → tasks-JweebIce.d.ts} +8 -1
- package/package.json +1 -1
- package/dist/chunk-BW3E45QD.js.map +0 -1
- package/dist/chunk-TGL72KPS.js.map +0 -1
package/dist/internal.cjs
CHANGED
|
@@ -3241,7 +3241,7 @@ var BaseApiClient = class {
|
|
|
3241
3241
|
this.enhancedAuthInProgress = this.enhancedAuthHandler();
|
|
3242
3242
|
try {
|
|
3243
3243
|
const newToken = await this.enhancedAuthInProgress;
|
|
3244
|
-
this.apiKey = newToken;
|
|
3244
|
+
if (this.apiKey) this.apiKey = newToken;
|
|
3245
3245
|
} finally {
|
|
3246
3246
|
this.enhancedAuthInProgress = null;
|
|
3247
3247
|
}
|
|
@@ -3352,7 +3352,7 @@ ${formattedErrors}`, response.status);
|
|
|
3352
3352
|
this.enhancedAuthInProgress = this.enhancedAuthHandler();
|
|
3353
3353
|
try {
|
|
3354
3354
|
const newToken = await this.enhancedAuthInProgress;
|
|
3355
|
-
this.apiKey = newToken;
|
|
3355
|
+
if (this.apiKey) this.apiKey = newToken;
|
|
3356
3356
|
} finally {
|
|
3357
3357
|
this.enhancedAuthInProgress = null;
|
|
3358
3358
|
}
|
|
@@ -4398,7 +4398,7 @@ var AuthApi = class extends BaseApiClient {
|
|
|
4398
4398
|
isSignUp
|
|
4399
4399
|
})
|
|
4400
4400
|
});
|
|
4401
|
-
if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
|
|
4401
|
+
if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
|
|
4402
4402
|
const completeResponse = await fetch(`/api/auth/complete`, {
|
|
4403
4403
|
method: "POST",
|
|
4404
4404
|
headers: { "Content-Type": "application/json" },
|
|
@@ -4487,6 +4487,18 @@ var AuthApi = class extends BaseApiClient {
|
|
|
4487
4487
|
body: JSON.stringify({})
|
|
4488
4488
|
});
|
|
4489
4489
|
}
|
|
4490
|
+
/**
|
|
4491
|
+
* Mint a single-use realtime login token (`gr_wst_`) bound to one
|
|
4492
|
+
* workspace, with this client's credential. A credential narrower than the
|
|
4493
|
+
* full browser session (a Site session, a device, a widget session) mints
|
|
4494
|
+
* this kind; it opens only that workspace's sockets. Call once per connect
|
|
4495
|
+
* attempt.
|
|
4496
|
+
*/
|
|
4497
|
+
async createWorkspaceRealtimeLoginToken(workspaceUuid) {
|
|
4498
|
+
return this.fetch(`w/${workspaceUuid}/realtime/ws-token`, {
|
|
4499
|
+
method: "POST"
|
|
4500
|
+
});
|
|
4501
|
+
}
|
|
4490
4502
|
/** Get the organization and workspace mapping for a custom domain. */
|
|
4491
4503
|
async getDomainMapping(customDomain) {
|
|
4492
4504
|
return this.fetch(`s/mapping/${customDomain}`);
|
|
@@ -4527,7 +4539,7 @@ var AuthApi = class extends BaseApiClient {
|
|
|
4527
4539
|
method: "POST",
|
|
4528
4540
|
body: JSON.stringify({ email, code, organizationUuid })
|
|
4529
4541
|
});
|
|
4530
|
-
if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
|
|
4542
|
+
if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
|
|
4531
4543
|
const completeResponse = await fetch(`/api/auth/complete`, {
|
|
4532
4544
|
method: "POST",
|
|
4533
4545
|
headers: { "Content-Type": "application/json" },
|
|
@@ -11761,7 +11773,7 @@ var SitesApi = class extends BaseApiClient {
|
|
|
11761
11773
|
method: "POST",
|
|
11762
11774
|
body: JSON.stringify({ code, phoneNumber, email })
|
|
11763
11775
|
});
|
|
11764
|
-
if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
|
|
11776
|
+
if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
|
|
11765
11777
|
const completeResponse = await fetch(`/api/auth/complete`, {
|
|
11766
11778
|
method: "POST",
|
|
11767
11779
|
headers: { "Content-Type": "application/json" },
|
|
@@ -13124,7 +13136,7 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
13124
13136
|
* Classify the prompts of a Workflow's draft revision.
|
|
13125
13137
|
*
|
|
13126
13138
|
* A decision model reads each live Task with Workflow or Task instructions
|
|
13127
|
-
* and reports which
|
|
13139
|
+
* or an active outgoing Choice prompt and reports which
|
|
13128
13140
|
* prompt classifications probably apply. Each call asks the model again.
|
|
13129
13141
|
*/
|
|
13130
13142
|
async getWorkflowPromptClassifications(wid, workflowId) {
|
|
@@ -13132,6 +13144,13 @@ var WorkflowsApi = class extends BaseApiClient {
|
|
|
13132
13144
|
`w/${wid}/workflows/${workflowId}/prompt-classifications`
|
|
13133
13145
|
);
|
|
13134
13146
|
}
|
|
13147
|
+
/** Review prompt diagnoses and report rebutted findings to Customer Success. */
|
|
13148
|
+
async reviewWorkflowPromptClassifications(wid, workflowId) {
|
|
13149
|
+
return this.fetch(
|
|
13150
|
+
`w/${wid}/workflows/${workflowId}/prompt-classifications`,
|
|
13151
|
+
{ method: "POST" }
|
|
13152
|
+
);
|
|
13153
|
+
}
|
|
13135
13154
|
/**
|
|
13136
13155
|
* Replay automatic routing for a Chat without performing the transition.
|
|
13137
13156
|
*
|
|
@@ -14323,6 +14342,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
14323
14342
|
"createWorkflowNote",
|
|
14324
14343
|
"createWorkflowOutboundVoiceChat",
|
|
14325
14344
|
"createWorkspaceMember",
|
|
14345
|
+
"createWorkspaceRealtimeLoginToken",
|
|
14326
14346
|
"createWorkspaceSupportRequest",
|
|
14327
14347
|
"deleteAbility",
|
|
14328
14348
|
"deleteAgent",
|
|
@@ -14804,6 +14824,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
14804
14824
|
"getWorkflowConfigValidation",
|
|
14805
14825
|
"getWorkflowFeedback",
|
|
14806
14826
|
"getWorkflowPromptClassifications",
|
|
14827
|
+
"reviewWorkflowPromptClassifications",
|
|
14807
14828
|
"getWorkflowContributors",
|
|
14808
14829
|
"getWorkflowDeletionPreview",
|
|
14809
14830
|
"getWorkflowDiagram",
|
|
@@ -15534,6 +15555,7 @@ function bindAuthMethods(target, auth, assignments) {
|
|
|
15534
15555
|
target.requestCrossDomainToken = auth.requestCrossDomainToken.bind(auth);
|
|
15535
15556
|
target.exchangeToken = auth.exchangeToken.bind(auth);
|
|
15536
15557
|
target.createRealtimeLoginToken = auth.createRealtimeLoginToken.bind(auth);
|
|
15558
|
+
target.createWorkspaceRealtimeLoginToken = auth.createWorkspaceRealtimeLoginToken.bind(auth);
|
|
15537
15559
|
target.getDomainMapping = auth.getDomainMapping.bind(auth);
|
|
15538
15560
|
target.createSignup = auth.createSignup.bind(auth);
|
|
15539
15561
|
target.createAccount = auth.emailPasswordSignup.bind(auth);
|
|
@@ -15738,6 +15760,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
|
|
|
15738
15760
|
target.getTaskChats = workflows.getTaskChats.bind(workflows);
|
|
15739
15761
|
target.getWorkflowConfigValidation = workflows.getWorkflowConfigValidation.bind(workflows);
|
|
15740
15762
|
target.getWorkflowPromptClassifications = workflows.getWorkflowPromptClassifications.bind(workflows);
|
|
15763
|
+
target.reviewWorkflowPromptClassifications = workflows.reviewWorkflowPromptClassifications.bind(workflows);
|
|
15741
15764
|
target.getWorkflowNotes = workflowNotes.getWorkflowNotes.bind(workflowNotes);
|
|
15742
15765
|
target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
|
|
15743
15766
|
target.updateWorkflowNote = workflowNotes.updateWorkflowNote.bind(workflowNotes);
|
|
@@ -16978,6 +17001,7 @@ var GravityRailClient = class {
|
|
|
16978
17001
|
requestCrossDomainToken;
|
|
16979
17002
|
exchangeToken;
|
|
16980
17003
|
createRealtimeLoginToken;
|
|
17004
|
+
createWorkspaceRealtimeLoginToken;
|
|
16981
17005
|
getDomainMapping;
|
|
16982
17006
|
createSignup;
|
|
16983
17007
|
createAccount;
|
|
@@ -17150,6 +17174,7 @@ var GravityRailClient = class {
|
|
|
17150
17174
|
getTaskChats;
|
|
17151
17175
|
getWorkflowConfigValidation;
|
|
17152
17176
|
getWorkflowPromptClassifications;
|
|
17177
|
+
reviewWorkflowPromptClassifications;
|
|
17153
17178
|
getWorkflowNotes;
|
|
17154
17179
|
createWorkflowNote;
|
|
17155
17180
|
updateWorkflowNote;
|