@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.
- package/dist/dev-tool/dev-tool-core.js +1 -1
- package/dist/dev-tool/dev-tool-core.js.map +1 -1
- package/dist/esm/dev-tool/dev-tool-core.js +1 -1
- package/dist/esm/dev-tool/dev-tool-core.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +6 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +29 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +9 -8
- package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/common.js +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js +44 -19
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js +97 -8
- package/dist/esm/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts +2 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/esm/lib/hexclave-app/index.d.ts +2 -1
- package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts +27 -0
- package/dist/esm/lib/hexclave-app/plan-usage/index.d.ts.map +1 -0
- package/dist/esm/lib/hexclave-app/plan-usage/index.js +1 -0
- package/dist/esm/lib/hexclave-app/projects/index.d.ts +1 -0
- package/dist/esm/lib/hexclave-app/projects/index.d.ts.map +1 -1
- package/dist/esm/lib/hexclave-app/projects/index.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +6 -0
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +29 -1
- package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +9 -8
- package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/common.js +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/implementations/session-replay.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.js +43 -18
- package/dist/lib/hexclave-app/apps/implementations/session-replay.js.map +1 -1
- package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js +97 -8
- package/dist/lib/hexclave-app/apps/implementations/session-replay.test.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +2 -1
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +1 -0
- package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
- package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
- package/dist/lib/hexclave-app/index.d.ts +2 -1
- package/dist/lib/hexclave-app/plan-usage/index.d.ts +27 -0
- package/dist/lib/hexclave-app/plan-usage/index.d.ts.map +1 -0
- package/dist/lib/hexclave-app/plan-usage/index.js +0 -0
- package/dist/lib/hexclave-app/projects/index.d.ts +1 -0
- package/dist/lib/hexclave-app/projects/index.d.ts.map +1 -1
- package/dist/lib/hexclave-app/projects/index.js.map +1 -1
- package/package.json +2 -2
- package/src/dev-tool/dev-tool-core.ts +1 -1
- package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +34 -1
- package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +9 -8
- package/src/lib/hexclave-app/apps/implementations/session-replay.test.ts +123 -4
- package/src/lib/hexclave-app/apps/implementations/session-replay.ts +63 -29
- package/src/lib/hexclave-app/apps/interfaces/admin-app.ts +2 -0
- package/src/lib/hexclave-app/apps/interfaces/client-app.ts +1 -0
- package/src/lib/hexclave-app/index.ts +8 -0
- package/src/lib/hexclave-app/plan-usage/index.ts +29 -0
- 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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({
|