@hexclave/js 1.0.25 → 1.0.27

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 (72) hide show
  1. package/dist/dev-tool/dev-tool-core.js +1 -1
  2. package/dist/dev-tool/dev-tool-core.js.map +1 -1
  3. package/dist/esm/dev-tool/dev-tool-core.js +1 -1
  4. package/dist/esm/dev-tool/dev-tool-core.js.map +1 -1
  5. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +6 -0
  6. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  7. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +29 -1
  8. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  9. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -0
  10. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
  11. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +9 -8
  12. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  13. package/dist/esm/lib/hexclave-app/apps/implementations/common.js +1 -1
  14. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts +1 -0
  15. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
  16. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +44 -19
  17. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
  18. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js +97 -8
  19. package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
  20. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts +2 -1
  21. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
  22. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
  23. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
  24. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  25. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  26. package/dist/esm/lib/hexclave-app/index.d.ts +2 -1
  27. package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts +27 -0
  28. package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts.map +1 -0
  29. package/dist/esm/lib/hexclave-app/plan-usage/index.js +1 -0
  30. package/dist/esm/lib/hexclave-app/projects/index.d.ts +1 -0
  31. package/dist/esm/lib/hexclave-app/projects/index.d.ts.map +1 -1
  32. package/dist/esm/lib/hexclave-app/projects/index.js.map +1 -1
  33. package/dist/index.d.ts +2 -1
  34. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +6 -0
  35. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  36. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +29 -1
  37. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  38. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -0
  39. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
  40. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +9 -8
  41. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  42. package/dist/lib/hexclave-app/apps/implementations/common.js +1 -1
  43. package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts +1 -0
  44. package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
  45. package/dist/lib/hexclave-app/apps/implementations/session-replay.js +43 -18
  46. package/dist/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
  47. package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js +97 -8
  48. package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
  49. package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +2 -1
  50. package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
  51. package/dist/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
  52. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
  53. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  54. package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  55. package/dist/lib/hexclave-app/index.d.ts +2 -1
  56. package/dist/lib/hexclave-app/plan-usage/index.d.ts +27 -0
  57. package/dist/lib/hexclave-app/plan-usage/index.d.ts.map +1 -0
  58. package/dist/lib/hexclave-app/plan-usage/index.js +0 -0
  59. package/dist/lib/hexclave-app/projects/index.d.ts +1 -0
  60. package/dist/lib/hexclave-app/projects/index.d.ts.map +1 -1
  61. package/dist/lib/hexclave-app/projects/index.js.map +1 -1
  62. package/package.json +2 -2
  63. package/src/dev-tool/dev-tool-core.ts +1 -1
  64. package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +34 -1
  65. package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +9 -8
  66. package/src/lib/hexclave-app/apps/implementations/session-replay.test.ts +123 -4
  67. package/src/lib/hexclave-app/apps/implementations/session-replay.ts +63 -29
  68. package/src/lib/hexclave-app/apps/interfaces/admin-app.ts +2 -0
  69. package/src/lib/hexclave-app/apps/interfaces/client-app.ts +1 -0
  70. package/src/lib/hexclave-app/index.ts +8 -0
  71. package/src/lib/hexclave-app/plan-usage/index.ts +29 -0
  72. package/src/lib/hexclave-app/projects/index.ts +1 -0
@@ -134,7 +134,7 @@ var _HexclaveClientAppImplIncomplete = class _HexclaveClientAppImplIncomplete {
134
134
  const location = await getNewOAuthProviderOrScopeUrl(this._interface, {
135
135
  provider: options.providerId,
136
136
  redirectUrl: this._getOAuthCallbackRedirectUri(),
137
- errorRedirectUrl: this.urls.error,
137
+ errorRedirectUrl: this._getUrls().error,
138
138
  providerScope: mergeScopeStrings(options.scope || "", (this._oauthScopesOnSignIn[options.providerId] ?? []).join(" "))
139
139
  }, options.session);
140
140
  await this._redirectTo({ url: location });
@@ -245,7 +245,7 @@ var _HexclaveClientAppImplIncomplete = class _HexclaveClientAppImplIncomplete {
245
245
  const location = await getNewOAuthProviderOrScopeUrl(this._interface, {
246
246
  provider,
247
247
  redirectUrl: this._getOAuthCallbackRedirectUri(),
248
- errorRedirectUrl: this.urls.error,
248
+ errorRedirectUrl: this._getUrls().error,
249
249
  providerScope: mergeScopeStrings(scopeString, (this._oauthScopesOnSignIn[provider] ?? []).join(" "))
250
250
  }, session);
251
251
  await this._redirectTo({ url: location });
@@ -488,7 +488,7 @@ var _HexclaveClientAppImplIncomplete = class _HexclaveClientAppImplIncomplete {
488
488
  return currentUrl.searchParams.has("code") && currentUrl.searchParams.has("state") && currentUrl.searchParams.has(nestedCrossDomainAuthQueryParams.refreshTokenId);
489
489
  }
490
490
  _getOAuthCallbackRedirectUri() {
491
- if (!this._isOAuthCallbackUrlHosted()) return this.urls.oauthCallback;
491
+ if (!this._isOAuthCallbackUrlHosted()) return this._getUrls().oauthCallback;
492
492
  if (typeof window === "undefined") throw new HexclaveAssertionError("Hosted OAuth callback URLs require a browser environment to use the current URL as the redirect URI");
493
493
  const currentUrl = new URL(window.location.href);
494
494
  for (const param of oauthCallbackResponseQueryParams) currentUrl.searchParams.delete(param);
@@ -1994,10 +1994,10 @@ var _HexclaveClientAppImplIncomplete = class _HexclaveClientAppImplIncomplete {
1994
1994
  return await this._redirectToHandler("mfa", options);
1995
1995
  }
1996
1996
  async sendForgotPasswordEmail(email, options) {
1997
- return await this._interface.sendForgotPasswordEmail(email, options?.callbackUrl ?? constructRedirectUrl(this.urls.passwordReset, "callbackUrl"));
1997
+ return await this._interface.sendForgotPasswordEmail(email, options?.callbackUrl ?? constructRedirectUrl(this._getUrls().passwordReset, "callbackUrl"));
1998
1998
  }
1999
1999
  async sendMagicLinkEmail(email, options) {
2000
- const callbackUrl = options?.callbackUrl ?? constructRedirectUrl(this.urls.magicLinkCallback, "callbackUrl");
2000
+ const callbackUrl = options?.callbackUrl ?? constructRedirectUrl(this._getUrls().magicLinkCallback, "callbackUrl");
2001
2001
  return await this._executeResultWithBotChallengeFlow({
2002
2002
  action: "send_magic_link_email",
2003
2003
  execute: async (challenge) => {
@@ -2137,7 +2137,7 @@ var _HexclaveClientAppImplIncomplete = class _HexclaveClientAppImplIncomplete {
2137
2137
  return await this._interface.authorizeOAuth({
2138
2138
  provider,
2139
2139
  redirectUrl: constructRedirectUrl(this._getOAuthCallbackRedirectUri(), "redirectUrl"),
2140
- errorRedirectUrl: constructRedirectUrl(this.urls.error, "errorRedirectUrl"),
2140
+ errorRedirectUrl: constructRedirectUrl(this._getUrls().error, "errorRedirectUrl"),
2141
2141
  afterCallbackRedirectUrl,
2142
2142
  type: "authenticate",
2143
2143
  providerScope: this._oauthScopesOnSignIn[provider]?.join(" "),
@@ -2210,7 +2210,7 @@ var _HexclaveClientAppImplIncomplete = class _HexclaveClientAppImplIncomplete {
2210
2210
  if (options.noVerificationCallback && options.verificationCallbackUrl) throw new HexclaveAssertionError("verificationCallbackUrl is not allowed when noVerificationCallback is true");
2211
2211
  this._ensurePersistentTokenStore();
2212
2212
  const session = await this._getSession();
2213
- const emailVerificationRedirectUrl = options.noVerificationCallback ? void 0 : options.verificationCallbackUrl ?? constructRedirectUrl(this.urls.emailVerification, "verificationCallbackUrl");
2213
+ const emailVerificationRedirectUrl = options.noVerificationCallback ? void 0 : options.verificationCallbackUrl ?? constructRedirectUrl(this._getUrls().emailVerification, "verificationCallbackUrl");
2214
2214
  const executeSignUp = async (challenge) => {
2215
2215
  let result = await this._interface.signUpWithCredential(options.email, options.password, emailVerificationRedirectUrl, session, this._toInterfaceBotChallengeInput(challenge));
2216
2216
  if (result.status === "error" && result.error instanceof KnownErrors.RedirectUrlNotWhitelisted && emailVerificationRedirectUrl !== void 0) {
@@ -2304,7 +2304,7 @@ var _HexclaveClientAppImplIncomplete = class _HexclaveClientAppImplIncomplete {
2304
2304
  const pollingCode = initResult.polling_code;
2305
2305
  const loginCode = initResult.login_code;
2306
2306
  const url = buildCliAuthConfirmUrl({
2307
- cliAuthConfirmUrl: this.urls.cliAuthConfirm,
2307
+ cliAuthConfirmUrl: this._getUrls().cliAuthConfirm,
2308
2308
  appUrl: options.appUrl,
2309
2309
  loginCode
2310
2310
  });
@@ -2573,6 +2573,7 @@ var _HexclaveClientAppImplIncomplete = class _HexclaveClientAppImplIncomplete {
2573
2573
  sendRequest: async (path, requestOptions, requestType = "client") => {
2574
2574
  return await this._interface.sendClientRequest(path, requestOptions, await this._getSession(), requestType);
2575
2575
  },
2576
+ getUrls: () => this._getUrls(),
2576
2577
  getRedirectMethod: () => this._redirectMethod ?? throwErr("Redirect method should have been initialized in the Stack client app constructor"),
2577
2578
  redirectToUrl: async (url, options) => {
2578
2579
  await this._redirectTo({