@gravity-rail/sdk 0.50.0 → 0.53.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/{chat-interaction-CmGKKlnL.d.ts → chat-interaction-CklXa8iQ.d.cts} +390 -215
- package/dist/{chat-interaction-THDGF4ko.d.cts → chat-interaction-Dei_j8Sd.d.ts} +390 -215
- package/dist/{chunk-QRZVXPR4.js → chunk-6F4YJJKQ.js} +21 -6
- package/dist/chunk-6F4YJJKQ.js.map +1 -0
- package/dist/{chunk-TGL72KPS.js → chunk-GCN4OMYU.js} +3 -3
- package/dist/chunk-GCN4OMYU.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 +21 -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 +21 -6
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +12 -6
- package/dist/internal.d.ts +12 -6
- package/dist/internal.js +2 -2
- package/dist/{member-import-9zHkUjcn.d.cts → member-import-BtTWfQ46.d.cts} +1 -1
- package/dist/{member-import-ocJ_K474.d.ts → member-import-Do6D2g14.d.ts} +1 -1
- package/dist/{path-DZbDwvpS.d.cts → path-D1ZCbboc.d.cts} +5 -5
- package/dist/{path-BQgkft9c.d.ts → path-DKPLfZj4.d.ts} +5 -5
- package/dist/schemas.cjs +34 -1
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +1677 -1677
- package/dist/schemas.d.ts +1677 -1677
- package/dist/schemas.js +33 -1
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-DsNsbco5.d.cts → tasks-JweebIce.d.cts} +171 -58
- package/dist/{tasks-DsNsbco5.d.ts → tasks-JweebIce.d.ts} +171 -58
- package/package.json +1 -1
- package/dist/chunk-QRZVXPR4.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) {
|
|
@@ -14323,6 +14335,7 @@ var WORKSPACE_METHOD_NAMES = [
|
|
|
14323
14335
|
"createWorkflowNote",
|
|
14324
14336
|
"createWorkflowOutboundVoiceChat",
|
|
14325
14337
|
"createWorkspaceMember",
|
|
14338
|
+
"createWorkspaceRealtimeLoginToken",
|
|
14326
14339
|
"createWorkspaceSupportRequest",
|
|
14327
14340
|
"deleteAbility",
|
|
14328
14341
|
"deleteAgent",
|
|
@@ -15534,6 +15547,7 @@ function bindAuthMethods(target, auth, assignments) {
|
|
|
15534
15547
|
target.requestCrossDomainToken = auth.requestCrossDomainToken.bind(auth);
|
|
15535
15548
|
target.exchangeToken = auth.exchangeToken.bind(auth);
|
|
15536
15549
|
target.createRealtimeLoginToken = auth.createRealtimeLoginToken.bind(auth);
|
|
15550
|
+
target.createWorkspaceRealtimeLoginToken = auth.createWorkspaceRealtimeLoginToken.bind(auth);
|
|
15537
15551
|
target.getDomainMapping = auth.getDomainMapping.bind(auth);
|
|
15538
15552
|
target.createSignup = auth.createSignup.bind(auth);
|
|
15539
15553
|
target.createAccount = auth.emailPasswordSignup.bind(auth);
|
|
@@ -16978,6 +16992,7 @@ var GravityRailClient = class {
|
|
|
16978
16992
|
requestCrossDomainToken;
|
|
16979
16993
|
exchangeToken;
|
|
16980
16994
|
createRealtimeLoginToken;
|
|
16995
|
+
createWorkspaceRealtimeLoginToken;
|
|
16981
16996
|
getDomainMapping;
|
|
16982
16997
|
createSignup;
|
|
16983
16998
|
createAccount;
|