@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.
Files changed (35) hide show
  1. package/dist/{chat-interaction-CmGKKlnL.d.ts → chat-interaction-CklXa8iQ.d.cts} +390 -215
  2. package/dist/{chat-interaction-THDGF4ko.d.cts → chat-interaction-Dei_j8Sd.d.ts} +390 -215
  3. package/dist/{chunk-QRZVXPR4.js → chunk-6F4YJJKQ.js} +21 -6
  4. package/dist/chunk-6F4YJJKQ.js.map +1 -0
  5. package/dist/{chunk-TGL72KPS.js → chunk-GCN4OMYU.js} +3 -3
  6. package/dist/chunk-GCN4OMYU.js.map +1 -0
  7. package/dist/helpers.cjs.map +1 -1
  8. package/dist/helpers.d.cts +4 -4
  9. package/dist/helpers.d.ts +4 -4
  10. package/dist/helpers.js +1 -1
  11. package/dist/index.cjs +21 -6
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +6 -6
  14. package/dist/index.d.ts +6 -6
  15. package/dist/index.js +2 -2
  16. package/dist/internal.cjs +21 -6
  17. package/dist/internal.cjs.map +1 -1
  18. package/dist/internal.d.cts +12 -6
  19. package/dist/internal.d.ts +12 -6
  20. package/dist/internal.js +2 -2
  21. package/dist/{member-import-9zHkUjcn.d.cts → member-import-BtTWfQ46.d.cts} +1 -1
  22. package/dist/{member-import-ocJ_K474.d.ts → member-import-Do6D2g14.d.ts} +1 -1
  23. package/dist/{path-DZbDwvpS.d.cts → path-D1ZCbboc.d.cts} +5 -5
  24. package/dist/{path-BQgkft9c.d.ts → path-DKPLfZj4.d.ts} +5 -5
  25. package/dist/schemas.cjs +34 -1
  26. package/dist/schemas.cjs.map +1 -1
  27. package/dist/schemas.d.cts +1677 -1677
  28. package/dist/schemas.d.ts +1677 -1677
  29. package/dist/schemas.js +33 -1
  30. package/dist/schemas.js.map +1 -1
  31. package/dist/{tasks-DsNsbco5.d.cts → tasks-JweebIce.d.cts} +171 -58
  32. package/dist/{tasks-DsNsbco5.d.ts → tasks-JweebIce.d.ts} +171 -58
  33. package/package.json +1 -1
  34. package/dist/chunk-QRZVXPR4.js.map +0 -1
  35. package/dist/chunk-TGL72KPS.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ApiError,
3
3
  BaseApiClient
4
- } from "./chunk-TGL72KPS.js";
4
+ } from "./chunk-GCN4OMYU.js";
5
5
 
6
6
  // src/api/abilities.ts
7
7
  var AbilitiesApi = class extends BaseApiClient {
@@ -967,7 +967,7 @@ var AuthApi = class extends BaseApiClient {
967
967
  isSignUp
968
968
  })
969
969
  });
970
- if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
970
+ if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
971
971
  const completeResponse = await fetch(`/api/auth/complete`, {
972
972
  method: "POST",
973
973
  headers: { "Content-Type": "application/json" },
@@ -1056,6 +1056,18 @@ var AuthApi = class extends BaseApiClient {
1056
1056
  body: JSON.stringify({})
1057
1057
  });
1058
1058
  }
1059
+ /**
1060
+ * Mint a single-use realtime login token (`gr_wst_`) bound to one
1061
+ * workspace, with this client's credential. A credential narrower than the
1062
+ * full browser session (a Site session, a device, a widget session) mints
1063
+ * this kind; it opens only that workspace's sockets. Call once per connect
1064
+ * attempt.
1065
+ */
1066
+ async createWorkspaceRealtimeLoginToken(workspaceUuid) {
1067
+ return this.fetch(`w/${workspaceUuid}/realtime/ws-token`, {
1068
+ method: "POST"
1069
+ });
1070
+ }
1059
1071
  /** Get the organization and workspace mapping for a custom domain. */
1060
1072
  async getDomainMapping(customDomain) {
1061
1073
  return this.fetch(`s/mapping/${customDomain}`);
@@ -1096,7 +1108,7 @@ var AuthApi = class extends BaseApiClient {
1096
1108
  method: "POST",
1097
1109
  body: JSON.stringify({ email, code, organizationUuid })
1098
1110
  });
1099
- if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
1111
+ if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
1100
1112
  const completeResponse = await fetch(`/api/auth/complete`, {
1101
1113
  method: "POST",
1102
1114
  headers: { "Content-Type": "application/json" },
@@ -7688,7 +7700,7 @@ var SitesApi = class extends BaseApiClient {
7688
7700
  method: "POST",
7689
7701
  body: JSON.stringify({ code, phoneNumber, email })
7690
7702
  });
7691
- if (!verifyResponse.requiresTwoFactor && verifyResponse.token) {
7703
+ if (!verifyResponse.requiresTwoFactor && verifyResponse.token && verifyResponse.sessionKind !== "widget") {
7692
7704
  const completeResponse = await fetch(`/api/auth/complete`, {
7693
7705
  method: "POST",
7694
7706
  headers: { "Content-Type": "application/json" },
@@ -8939,7 +8951,7 @@ var WorkflowsApi = class extends BaseApiClient {
8939
8951
  * Classify the prompts of a Workflow's draft revision.
8940
8952
  *
8941
8953
  * A decision model reads each live Task with Workflow or Task instructions
8942
- * and reports which
8954
+ * or an active outgoing Choice prompt and reports which
8943
8955
  * prompt classifications probably apply. Each call asks the model again.
8944
8956
  */
8945
8957
  async getWorkflowPromptClassifications(wid, workflowId) {
@@ -11998,6 +12010,7 @@ var WORKSPACE_METHOD_NAMES = [
11998
12010
  "createWorkflowNote",
11999
12011
  "createWorkflowOutboundVoiceChat",
12000
12012
  "createWorkspaceMember",
12013
+ "createWorkspaceRealtimeLoginToken",
12001
12014
  "createWorkspaceSupportRequest",
12002
12015
  "deleteAbility",
12003
12016
  "deleteAgent",
@@ -13209,6 +13222,7 @@ function bindAuthMethods(target, auth, assignments) {
13209
13222
  target.requestCrossDomainToken = auth.requestCrossDomainToken.bind(auth);
13210
13223
  target.exchangeToken = auth.exchangeToken.bind(auth);
13211
13224
  target.createRealtimeLoginToken = auth.createRealtimeLoginToken.bind(auth);
13225
+ target.createWorkspaceRealtimeLoginToken = auth.createWorkspaceRealtimeLoginToken.bind(auth);
13212
13226
  target.getDomainMapping = auth.getDomainMapping.bind(auth);
13213
13227
  target.createSignup = auth.createSignup.bind(auth);
13214
13228
  target.createAccount = auth.emailPasswordSignup.bind(auth);
@@ -14653,6 +14667,7 @@ var GravityRailClient = class {
14653
14667
  requestCrossDomainToken;
14654
14668
  exchangeToken;
14655
14669
  createRealtimeLoginToken;
14670
+ createWorkspaceRealtimeLoginToken;
14656
14671
  getDomainMapping;
14657
14672
  createSignup;
14658
14673
  createAccount;
@@ -17123,4 +17138,4 @@ export {
17123
17138
  pathDraftFromStorage,
17124
17139
  pathDraftToStorage
17125
17140
  };
17126
- //# sourceMappingURL=chunk-QRZVXPR4.js.map
17141
+ //# sourceMappingURL=chunk-6F4YJJKQ.js.map