@carlonicora/nextjs-jsonapi 1.40.0 → 1.41.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/README.md +3 -3
- package/dist/AuthComponent-BuWc2C4g.d.ts +28 -0
- package/dist/AuthComponent-fLVGdvSr.d.mts +28 -0
- package/dist/{BlockNoteEditor-EKY4AHVK.mjs → BlockNoteEditor-B3RQ4VQ7.mjs} +5 -5
- package/dist/{BlockNoteEditor-4G3L3LSF.js → BlockNoteEditor-VUAWVZF4.js} +15 -15
- package/dist/{BlockNoteEditor-4G3L3LSF.js.map → BlockNoteEditor-VUAWVZF4.js.map} +1 -1
- package/dist/JsonApiRequest-MUPAO7DI.js +24 -0
- package/dist/{JsonApiRequest-GR3L56A5.js.map → JsonApiRequest-MUPAO7DI.js.map} +1 -1
- package/dist/{JsonApiRequest-K5BRU7RE.mjs → JsonApiRequest-XCQHVVYD.mjs} +2 -2
- package/dist/auth.interface-8XglqHir.d.mts +33 -0
- package/dist/auth.interface-BJGKQ0zr.d.ts +33 -0
- package/dist/billing/index.js +409 -415
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +4 -10
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-BAOP6PTD.mjs → chunk-BJNQZGMN.mjs} +1618 -666
- package/dist/chunk-BJNQZGMN.mjs.map +1 -0
- package/dist/{chunk-U4MTVHOC.mjs → chunk-GCQUTWZ2.mjs} +11 -4
- package/dist/{chunk-U4MTVHOC.mjs.map → chunk-GCQUTWZ2.mjs.map} +1 -1
- package/dist/{chunk-ZNGEVB5M.js → chunk-L5F5ZN5F.js} +960 -140
- package/dist/chunk-L5F5ZN5F.js.map +1 -0
- package/dist/{chunk-RRIYLEY6.mjs → chunk-LBIC4GJK.mjs} +2 -2
- package/dist/{chunk-T5YYOT4Z.js → chunk-OODZEX6P.js} +3 -3
- package/dist/{chunk-T5YYOT4Z.js.map → chunk-OODZEX6P.js.map} +1 -1
- package/dist/{chunk-GVN7XC3U.mjs → chunk-PHNL4QUF.mjs} +835 -15
- package/dist/chunk-PHNL4QUF.mjs.map +1 -0
- package/dist/{chunk-GKY5DAIH.js → chunk-QPWHMXE2.js} +1505 -553
- package/dist/chunk-QPWHMXE2.js.map +1 -0
- package/dist/{chunk-FM6WRAN5.js → chunk-WLS4D6VG.js} +12 -5
- package/dist/chunk-WLS4D6VG.js.map +1 -0
- package/dist/client/index.d.mts +4 -4
- package/dist/client/index.d.ts +4 -4
- package/dist/client/index.js +5 -5
- package/dist/client/index.mjs +4 -4
- package/dist/components/index.d.mts +69 -8
- package/dist/components/index.d.ts +69 -8
- package/dist/components/index.js +27 -5
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +26 -4
- package/dist/{config-BxwhHdCD.d.mts → config-BW5u1e9P.d.mts} +1 -1
- package/dist/{config-BbaBV_yk.d.ts → config-BozK5PY0.d.ts} +1 -1
- package/dist/{content.interface-CgUu4771.d.ts → content.interface-CpCDB1Uk.d.ts} +1 -1
- package/dist/{content.interface-CWV0q4lZ.d.mts → content.interface-b-mzkL_q.d.mts} +1 -1
- package/dist/contexts/index.d.mts +2 -2
- package/dist/contexts/index.d.ts +2 -2
- package/dist/contexts/index.js +5 -5
- package/dist/contexts/index.mjs +4 -4
- package/dist/core/index.d.mts +407 -7
- package/dist/core/index.d.ts +407 -7
- package/dist/core/index.js +61 -3
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +60 -2
- package/dist/index.d.mts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +62 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -3
- package/dist/{notification.interface-XARGKJAq.d.ts → notification.interface-CR2PuV6Y.d.ts} +1 -0
- package/dist/{notification.interface-DIln2r7X.d.mts → notification.interface-D241WNUx.d.mts} +1 -0
- package/dist/{s3.service-BoOF5-ln.d.mts → s3.service-D0rbmLFp.d.mts} +10 -31
- package/dist/{s3.service-Mxo-7wQ6.d.ts → s3.service-DOwqcUDT.d.ts} +10 -31
- package/dist/scripts/generate-web-module/generator.js +26 -26
- package/dist/scripts/generate-web-module/generator.js.map +1 -1
- package/dist/scripts/generate-web-module/utils/file-writer.js +9 -9
- package/dist/scripts/generate-web-module/utils/file-writer.js.map +1 -1
- package/dist/server/index.d.mts +4 -3
- package/dist/server/index.d.ts +4 -3
- package/dist/server/index.js +12 -12
- package/dist/server/index.mjs +2 -2
- package/dist/{useSocket-awibcC9B.d.ts → useSocket-CC8SkXdm.d.ts} +1 -1
- package/dist/{useSocket-BILAdmZ0.d.mts → useSocket-CttIHn2P.d.mts} +1 -1
- package/package.json +4 -1
- package/scripts/generate-web-module/generator.ts +26 -26
- package/scripts/generate-web-module/utils/file-writer.ts +9 -9
- package/src/components/pages/PageContentContainer.tsx +22 -9
- package/src/core/abstracts/AbstractService.ts +2 -0
- package/src/core/factories/JsonApiDataFactory.ts +2 -1
- package/src/core/index.ts +14 -0
- package/src/core/registry/DataClassRegistry.ts +7 -1
- package/src/core/registry/ModuleRegistry.ts +15 -0
- package/src/features/auth/backup-code-verify.module.ts +9 -0
- package/src/features/auth/components/containers/SecurityContainer.tsx +11 -0
- package/src/features/auth/components/containers/index.ts +1 -0
- package/src/features/auth/components/forms/Login.tsx +15 -3
- package/src/features/auth/components/forms/Register.tsx +1 -9
- package/src/features/auth/components/forms/TwoFactorChallenge.tsx +202 -0
- package/src/features/auth/components/forms/index.ts +1 -0
- package/src/features/auth/components/index.ts +1 -0
- package/src/features/auth/components/two-factor/BackupCodesDialog.tsx +148 -0
- package/src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx +74 -0
- package/src/features/auth/components/two-factor/PasskeyButton.tsx +59 -0
- package/src/features/auth/components/two-factor/PasskeyList.tsx +172 -0
- package/src/features/auth/components/two-factor/PasskeySetupDialog.tsx +105 -0
- package/src/features/auth/components/two-factor/TotpAuthenticatorList.tsx +104 -0
- package/src/features/auth/components/two-factor/TotpInput.tsx +90 -0
- package/src/features/auth/components/two-factor/TotpSetupDialog.tsx +161 -0
- package/src/features/auth/components/two-factor/TwoFactorSettings.tsx +175 -0
- package/src/features/auth/components/two-factor/index.ts +9 -0
- package/src/features/auth/contexts/AuthContext.tsx +9 -0
- package/src/features/auth/data/auth.service.ts +18 -1
- package/src/features/auth/data/backup-code-verify.ts +20 -0
- package/src/features/auth/data/index.ts +21 -0
- package/src/features/auth/data/passkey-authentication-options.interface.ts +7 -0
- package/src/features/auth/data/passkey-authentication-options.ts +37 -0
- package/src/features/auth/data/passkey-registration-options.ts +46 -0
- package/src/features/auth/data/passkey-registration-verify.ts +62 -0
- package/src/features/auth/data/passkey-rename.ts +20 -0
- package/src/features/auth/data/passkey-verify-login.ts +23 -0
- package/src/features/auth/data/passkey.interface.ts +9 -0
- package/src/features/auth/data/passkey.ts +40 -0
- package/src/features/auth/data/totp-authenticator.interface.ts +7 -0
- package/src/features/auth/data/totp-authenticator.ts +28 -0
- package/src/features/auth/data/totp-setup.interface.ts +5 -0
- package/src/features/auth/data/totp-setup.ts +48 -0
- package/src/features/auth/data/totp-verify-login.ts +20 -0
- package/src/features/auth/data/totp-verify.ts +22 -0
- package/src/features/auth/data/two-factor-challenge.interface.ts +7 -0
- package/src/features/auth/data/two-factor-challenge.ts +45 -0
- package/src/features/auth/data/two-factor-enable.ts +20 -0
- package/src/features/auth/data/two-factor-status.interface.ts +11 -0
- package/src/features/auth/data/two-factor-status.ts +40 -0
- package/src/features/auth/data/two-factor.service.ts +331 -0
- package/src/features/auth/enums/AuthComponent.ts +1 -0
- package/src/features/auth/index.ts +13 -0
- package/src/features/auth/passkey-authentication-options.module.ts +9 -0
- package/src/features/auth/passkey-registration-options.module.ts +9 -0
- package/src/features/auth/passkey-registration-verify.module.ts +9 -0
- package/src/features/auth/passkey-rename.module.ts +9 -0
- package/src/features/auth/passkey-verify-login.module.ts +9 -0
- package/src/features/auth/passkey.module.ts +9 -0
- package/src/features/auth/totp-authenticator.module.ts +9 -0
- package/src/features/auth/totp-setup.module.ts +9 -0
- package/src/features/auth/totp-verify-login.module.ts +9 -0
- package/src/features/auth/totp-verify.module.ts +9 -0
- package/src/features/auth/two-factor-challenge.module.ts +9 -0
- package/src/features/auth/two-factor-enable.module.ts +9 -0
- package/src/features/auth/two-factor-status.module.ts +9 -0
- package/src/features/billing/modules/billing.module.ts +1 -0
- package/src/features/billing/stripe-customer/stripe-customer.module.ts +1 -0
- package/src/features/billing/stripe-customer/stripe-payment-method.module.ts +1 -0
- package/src/features/billing/stripe-invoice/stripe-invoice.module.ts +1 -0
- package/src/features/billing/stripe-price/stripe-price.module.ts +1 -0
- package/src/features/billing/stripe-product/stripe-product.module.ts +1 -0
- package/src/features/billing/stripe-promotion-code/stripe-promotion-code.module.ts +1 -0
- package/src/features/billing/stripe-subscription/data/stripe-subscription.ts +0 -5
- package/src/features/billing/stripe-subscription/hooks/useSubscriptionWizard.ts +0 -8
- package/src/features/billing/stripe-subscription/stripe-subscription.module.ts +1 -0
- package/src/features/billing/stripe-usage/stripe-usage.module.ts +1 -0
- package/src/features/user/data/user.interface.ts +1 -0
- package/src/features/user/data/user.ts +6 -0
- package/src/features/waitlist/data/WaitlistService.ts +1 -8
- package/src/features/waitlist/waitlist-stats.module.ts +1 -0
- package/src/shadcnui/ui/resizable.tsx +33 -11
- package/src/unified/JsonApiRequest.ts +2 -1
- package/dist/AuthComponent-hxOPs9o8.d.mts +0 -11
- package/dist/AuthComponent-hxOPs9o8.d.ts +0 -11
- package/dist/JsonApiRequest-GR3L56A5.js +0 -24
- package/dist/chunk-BAOP6PTD.mjs.map +0 -1
- package/dist/chunk-FM6WRAN5.js.map +0 -1
- package/dist/chunk-GKY5DAIH.js.map +0 -1
- package/dist/chunk-GVN7XC3U.mjs.map +0 -1
- package/dist/chunk-ZNGEVB5M.js.map +0 -1
- /package/dist/{BlockNoteEditor-EKY4AHVK.mjs.map → BlockNoteEditor-B3RQ4VQ7.mjs.map} +0 -0
- /package/dist/{JsonApiRequest-K5BRU7RE.mjs.map → JsonApiRequest-XCQHVVYD.mjs.map} +0 -0
- /package/dist/{chunk-RRIYLEY6.mjs.map → chunk-LBIC4GJK.mjs.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16; var _class17; var _class18; var _class19; var _class20; var _class21; var _class22;
|
|
2
2
|
|
|
3
3
|
var _chunkLXKSUWAVjs = require('./chunk-LXKSUWAV.js');
|
|
4
4
|
|
|
@@ -14,7 +14,7 @@ var _chunkIBS6NI7Djs = require('./chunk-IBS6NI7D.js');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkWLS4D6VGjs = require('./chunk-WLS4D6VG.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
|
|
@@ -25,12 +25,12 @@ var RehydrationFactory = class {
|
|
|
25
25
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "RehydrationFactory");
|
|
26
26
|
}
|
|
27
27
|
static rehydrate(classKey, data) {
|
|
28
|
-
const factoryClass =
|
|
28
|
+
const factoryClass = _chunkWLS4D6VGjs.DataClassRegistry.get(classKey);
|
|
29
29
|
const instance = new factoryClass();
|
|
30
30
|
return instance.rehydrate(data);
|
|
31
31
|
}
|
|
32
32
|
static rehydrateList(classKey, data) {
|
|
33
|
-
const factoryClass =
|
|
33
|
+
const factoryClass = _chunkWLS4D6VGjs.DataClassRegistry.get(classKey);
|
|
34
34
|
const response = data.map((item) => {
|
|
35
35
|
const instance = new factoryClass();
|
|
36
36
|
return instance.rehydrate(item);
|
|
@@ -283,7 +283,7 @@ var AbstractService = class {
|
|
|
283
283
|
* Make an API call with automatic environment detection and error handling.
|
|
284
284
|
*/
|
|
285
285
|
static async callApi(params) {
|
|
286
|
-
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
286
|
+
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-MUPAO7DI.js")));
|
|
287
287
|
let apiResponse;
|
|
288
288
|
let language = "en";
|
|
289
289
|
if (typeof window === "undefined") {
|
|
@@ -310,7 +310,8 @@ var AbstractService = class {
|
|
|
310
310
|
overridesJsonApiCreation: params.overridesJsonApiCreation,
|
|
311
311
|
language,
|
|
312
312
|
responseType: params.responseType,
|
|
313
|
-
files: params.files
|
|
313
|
+
files: params.files,
|
|
314
|
+
token: params.token
|
|
314
315
|
});
|
|
315
316
|
break;
|
|
316
317
|
case "PUT" /* PUT */:
|
|
@@ -372,7 +373,7 @@ var AbstractService = class {
|
|
|
372
373
|
* Make an API call and return both data and meta from the response.
|
|
373
374
|
*/
|
|
374
375
|
static async callApiWithMeta(params) {
|
|
375
|
-
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
376
|
+
const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-MUPAO7DI.js")));
|
|
376
377
|
let apiResponse;
|
|
377
378
|
let language = "en";
|
|
378
379
|
if (typeof window === "undefined") {
|
|
@@ -457,7 +458,7 @@ var AbstractService = class {
|
|
|
457
458
|
* Get raw JSON:API response data without deserialization.
|
|
458
459
|
*/
|
|
459
460
|
static async getRawData(params) {
|
|
460
|
-
const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-
|
|
461
|
+
const { JsonApiGet: JsonApiGet2 } = await Promise.resolve().then(() => _interopRequireWildcard(require("./JsonApiRequest-MUPAO7DI.js")));
|
|
461
462
|
let language = "en";
|
|
462
463
|
if (typeof window === "undefined") {
|
|
463
464
|
const { getLocale } = await Promise.resolve().then(() => _interopRequireWildcard(require("next-intl/server")));
|
|
@@ -491,7 +492,7 @@ var _clientConfig = null;
|
|
|
491
492
|
function configureClientJsonApi(config) {
|
|
492
493
|
_clientConfig = config;
|
|
493
494
|
if (config.bootstrapper) {
|
|
494
|
-
|
|
495
|
+
_chunkWLS4D6VGjs.setBootstrapper.call(void 0, config.bootstrapper);
|
|
495
496
|
config.bootstrapper();
|
|
496
497
|
}
|
|
497
498
|
}
|
|
@@ -548,7 +549,7 @@ async function ClientJsonApiGet(params) {
|
|
|
548
549
|
language: params.language,
|
|
549
550
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _17 => _17.additionalHeaders])
|
|
550
551
|
});
|
|
551
|
-
return
|
|
552
|
+
return _chunkWLS4D6VGjs.translateResponse.call(void 0, {
|
|
552
553
|
classKey: params.classKey,
|
|
553
554
|
apiResponse,
|
|
554
555
|
companyId: params.companyId,
|
|
@@ -569,7 +570,7 @@ async function ClientJsonApiPost(params) {
|
|
|
569
570
|
if (!body) {
|
|
570
571
|
body = {};
|
|
571
572
|
} else if (params.overridesJsonApiCreation !== true) {
|
|
572
|
-
body =
|
|
573
|
+
body = _chunkWLS4D6VGjs.JsonApiDataFactory.create(params.classKey, body);
|
|
573
574
|
}
|
|
574
575
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
575
576
|
method: "POST",
|
|
@@ -581,7 +582,7 @@ async function ClientJsonApiPost(params) {
|
|
|
581
582
|
language: params.language,
|
|
582
583
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _18 => _18.additionalHeaders])
|
|
583
584
|
});
|
|
584
|
-
return
|
|
585
|
+
return _chunkWLS4D6VGjs.translateResponse.call(void 0, {
|
|
585
586
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
586
587
|
apiResponse,
|
|
587
588
|
companyId: params.companyId,
|
|
@@ -596,7 +597,7 @@ async function ClientJsonApiPut(params) {
|
|
|
596
597
|
if (!body) {
|
|
597
598
|
body = {};
|
|
598
599
|
} else {
|
|
599
|
-
body =
|
|
600
|
+
body = _chunkWLS4D6VGjs.JsonApiDataFactory.create(params.classKey, body);
|
|
600
601
|
}
|
|
601
602
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
602
603
|
method: "PUT",
|
|
@@ -608,7 +609,7 @@ async function ClientJsonApiPut(params) {
|
|
|
608
609
|
language: params.language,
|
|
609
610
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _19 => _19.additionalHeaders])
|
|
610
611
|
});
|
|
611
|
-
return
|
|
612
|
+
return _chunkWLS4D6VGjs.translateResponse.call(void 0, {
|
|
612
613
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
613
614
|
apiResponse,
|
|
614
615
|
companyId: params.companyId,
|
|
@@ -623,7 +624,7 @@ async function ClientJsonApiPatch(params) {
|
|
|
623
624
|
if (!body) {
|
|
624
625
|
body = {};
|
|
625
626
|
} else if (params.overridesJsonApiCreation !== true) {
|
|
626
|
-
body =
|
|
627
|
+
body = _chunkWLS4D6VGjs.JsonApiDataFactory.create(params.classKey, body);
|
|
627
628
|
}
|
|
628
629
|
const apiResponse = await _chunkIBS6NI7Djs.directFetch.call(void 0, {
|
|
629
630
|
method: "PATCH",
|
|
@@ -635,7 +636,7 @@ async function ClientJsonApiPatch(params) {
|
|
|
635
636
|
language: params.language,
|
|
636
637
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _20 => _20.additionalHeaders])
|
|
637
638
|
});
|
|
638
|
-
return
|
|
639
|
+
return _chunkWLS4D6VGjs.translateResponse.call(void 0, {
|
|
639
640
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
640
641
|
apiResponse,
|
|
641
642
|
companyId: params.companyId,
|
|
@@ -654,7 +655,7 @@ async function ClientJsonApiDelete(params) {
|
|
|
654
655
|
language: params.language,
|
|
655
656
|
additionalHeaders: _optionalChain([_clientConfig, 'optionalAccess', _21 => _21.additionalHeaders])
|
|
656
657
|
});
|
|
657
|
-
return
|
|
658
|
+
return _chunkWLS4D6VGjs.translateResponse.call(void 0, {
|
|
658
659
|
classKey: _nullishCoalesce(params.responseType, () => ( params.classKey)),
|
|
659
660
|
apiResponse,
|
|
660
661
|
companyId: params.companyId,
|
|
@@ -859,7 +860,7 @@ var ModuleRegistrar = (_class = class {
|
|
|
859
860
|
}).map((key) => modulesClass[key]);
|
|
860
861
|
data.forEach((item) => {
|
|
861
862
|
if (item && item.model) {
|
|
862
|
-
|
|
863
|
+
_chunkWLS4D6VGjs.DataClassRegistry.registerObjectClass(item, item.model);
|
|
863
864
|
}
|
|
864
865
|
});
|
|
865
866
|
this._isBootstrapped = true;
|
|
@@ -869,7 +870,7 @@ var ModuleRegistrar = (_class = class {
|
|
|
869
870
|
*/
|
|
870
871
|
static reset() {
|
|
871
872
|
this._isBootstrapped = false;
|
|
872
|
-
|
|
873
|
+
_chunkWLS4D6VGjs.DataClassRegistry.clear();
|
|
873
874
|
}
|
|
874
875
|
}, _class.__initStatic(), _class);
|
|
875
876
|
|
|
@@ -892,20 +893,20 @@ var ModuleRegistryClass = class {
|
|
|
892
893
|
get(name) {
|
|
893
894
|
let module = this._modules.get(name);
|
|
894
895
|
if (!module) {
|
|
895
|
-
const didBootstrap =
|
|
896
|
+
const didBootstrap = _chunkWLS4D6VGjs.tryBootstrap.call(void 0, );
|
|
896
897
|
if (didBootstrap) {
|
|
897
898
|
module = this._modules.get(name);
|
|
898
899
|
}
|
|
899
900
|
}
|
|
900
901
|
if (!module) {
|
|
901
|
-
const hint =
|
|
902
|
+
const hint = _chunkWLS4D6VGjs.hasBootstrapper.call(void 0, ) ? "Bootstrap was called but module still not found. Check module registration." : "No bootstrapper registered. Ensure configureJsonApi({ bootstrapper }) is called before accessing modules.";
|
|
902
903
|
throw new Error(`Module "${String(name)}" not registered. ${hint}`);
|
|
903
904
|
}
|
|
904
905
|
return module;
|
|
905
906
|
}
|
|
906
907
|
findByName(moduleName) {
|
|
907
908
|
if (this._modules.size === 0) {
|
|
908
|
-
|
|
909
|
+
_chunkWLS4D6VGjs.tryBootstrap.call(void 0, );
|
|
909
910
|
}
|
|
910
911
|
for (const module of this._modules.values()) {
|
|
911
912
|
if (module.name === moduleName) {
|
|
@@ -917,7 +918,7 @@ var ModuleRegistryClass = class {
|
|
|
917
918
|
findByModelName(modelName) {
|
|
918
919
|
let module = this._modules.get(modelName);
|
|
919
920
|
if (!module) {
|
|
920
|
-
const didBootstrap =
|
|
921
|
+
const didBootstrap = _chunkWLS4D6VGjs.tryBootstrap.call(void 0, );
|
|
921
922
|
if (didBootstrap) {
|
|
922
923
|
module = this._modules.get(modelName);
|
|
923
924
|
}
|
|
@@ -2236,6 +2237,456 @@ function getValueFromPath(obj, path, userId) {
|
|
|
2236
2237
|
}
|
|
2237
2238
|
_chunk7QVYU63Ejs.__name.call(void 0, getValueFromPath, "getValueFromPath");
|
|
2238
2239
|
|
|
2240
|
+
// src/features/auth/data/totp-authenticator.ts
|
|
2241
|
+
var TotpAuthenticator = (_class3 = class extends AbstractApiData {constructor(...args) { super(...args); _class3.prototype.__init.call(this);_class3.prototype.__init2.call(this); }
|
|
2242
|
+
static {
|
|
2243
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "TotpAuthenticator");
|
|
2244
|
+
}
|
|
2245
|
+
__init() {this._name = ""}
|
|
2246
|
+
__init2() {this._verified = false}
|
|
2247
|
+
|
|
2248
|
+
get name() {
|
|
2249
|
+
return this._name;
|
|
2250
|
+
}
|
|
2251
|
+
get verified() {
|
|
2252
|
+
return this._verified;
|
|
2253
|
+
}
|
|
2254
|
+
get lastUsedAt() {
|
|
2255
|
+
return this._lastUsedAt;
|
|
2256
|
+
}
|
|
2257
|
+
rehydrate(data) {
|
|
2258
|
+
super.rehydrate(data);
|
|
2259
|
+
this._name = _nullishCoalesce(data.jsonApi.attributes.name, () => ( ""));
|
|
2260
|
+
this._verified = _nullishCoalesce(data.jsonApi.attributes.verified, () => ( false));
|
|
2261
|
+
this._lastUsedAt = data.jsonApi.attributes.lastUsedAt ? new Date(data.jsonApi.attributes.lastUsedAt) : void 0;
|
|
2262
|
+
return this;
|
|
2263
|
+
}
|
|
2264
|
+
}, _class3);
|
|
2265
|
+
|
|
2266
|
+
// src/features/auth/totp-authenticator.module.ts
|
|
2267
|
+
var TotpAuthenticatorModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2268
|
+
name: "totp-authenticators",
|
|
2269
|
+
pageUrl: "/totp-authenticators",
|
|
2270
|
+
model: TotpAuthenticator
|
|
2271
|
+
}), "TotpAuthenticatorModule");
|
|
2272
|
+
|
|
2273
|
+
// src/features/auth/data/totp-setup.ts
|
|
2274
|
+
var TotpSetup = (_class4 = class extends AbstractApiData {constructor(...args2) { super(...args2); _class4.prototype.__init3.call(this);_class4.prototype.__init4.call(this);_class4.prototype.__init5.call(this); }
|
|
2275
|
+
static {
|
|
2276
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "TotpSetup");
|
|
2277
|
+
}
|
|
2278
|
+
__init3() {this._qrCodeUri = ""}
|
|
2279
|
+
__init4() {this._secret = ""}
|
|
2280
|
+
__init5() {this._authenticatorId = ""}
|
|
2281
|
+
get qrCodeUri() {
|
|
2282
|
+
return this._qrCodeUri;
|
|
2283
|
+
}
|
|
2284
|
+
get secret() {
|
|
2285
|
+
return this._secret;
|
|
2286
|
+
}
|
|
2287
|
+
get authenticatorId() {
|
|
2288
|
+
return this._authenticatorId;
|
|
2289
|
+
}
|
|
2290
|
+
rehydrate(data) {
|
|
2291
|
+
super.rehydrate(data);
|
|
2292
|
+
this._qrCodeUri = _nullishCoalesce(data.jsonApi.attributes.qrCodeUri, () => ( ""));
|
|
2293
|
+
this._secret = _nullishCoalesce(data.jsonApi.attributes.secret, () => ( ""));
|
|
2294
|
+
this._authenticatorId = _nullishCoalesce(data.jsonApi.id, () => ( ""));
|
|
2295
|
+
return this;
|
|
2296
|
+
}
|
|
2297
|
+
createJsonApi(data) {
|
|
2298
|
+
return {
|
|
2299
|
+
data: {
|
|
2300
|
+
type: "totp-authenticators",
|
|
2301
|
+
id: data.id,
|
|
2302
|
+
attributes: {
|
|
2303
|
+
name: data.name,
|
|
2304
|
+
accountName: data.accountName
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
};
|
|
2308
|
+
}
|
|
2309
|
+
}, _class4);
|
|
2310
|
+
|
|
2311
|
+
// src/features/auth/totp-setup.module.ts
|
|
2312
|
+
var TotpSetupModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2313
|
+
name: "totp-setup",
|
|
2314
|
+
pageUrl: "/totp-setup",
|
|
2315
|
+
model: TotpSetup
|
|
2316
|
+
}), "TotpSetupModule");
|
|
2317
|
+
|
|
2318
|
+
// src/features/auth/data/totp-verify.ts
|
|
2319
|
+
var TotpVerify = class extends AbstractApiData {
|
|
2320
|
+
static {
|
|
2321
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "TotpVerify");
|
|
2322
|
+
}
|
|
2323
|
+
createJsonApi(data) {
|
|
2324
|
+
return {
|
|
2325
|
+
data: {
|
|
2326
|
+
type: "totp-authenticators",
|
|
2327
|
+
id: data.id,
|
|
2328
|
+
attributes: {
|
|
2329
|
+
authenticatorId: data.authenticatorId,
|
|
2330
|
+
code: data.code
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
};
|
|
2334
|
+
}
|
|
2335
|
+
};
|
|
2336
|
+
|
|
2337
|
+
// src/features/auth/totp-verify.module.ts
|
|
2338
|
+
var TotpVerifyModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2339
|
+
name: "totp-verify",
|
|
2340
|
+
pageUrl: "/totp-verify",
|
|
2341
|
+
model: TotpVerify
|
|
2342
|
+
}), "TotpVerifyModule");
|
|
2343
|
+
|
|
2344
|
+
// src/features/auth/data/totp-verify-login.ts
|
|
2345
|
+
var TotpVerifyLogin = class extends AbstractApiData {
|
|
2346
|
+
static {
|
|
2347
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "TotpVerifyLogin");
|
|
2348
|
+
}
|
|
2349
|
+
createJsonApi(data) {
|
|
2350
|
+
return {
|
|
2351
|
+
data: {
|
|
2352
|
+
type: "totp-authenticators",
|
|
2353
|
+
id: data.id,
|
|
2354
|
+
attributes: {
|
|
2355
|
+
code: data.code
|
|
2356
|
+
}
|
|
2357
|
+
}
|
|
2358
|
+
};
|
|
2359
|
+
}
|
|
2360
|
+
};
|
|
2361
|
+
|
|
2362
|
+
// src/features/auth/totp-verify-login.module.ts
|
|
2363
|
+
var TotpVerifyLoginModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2364
|
+
name: "totp-verify-login",
|
|
2365
|
+
pageUrl: "/totp-verify-login",
|
|
2366
|
+
model: TotpVerifyLogin
|
|
2367
|
+
}), "TotpVerifyLoginModule");
|
|
2368
|
+
|
|
2369
|
+
// src/features/auth/data/passkey.ts
|
|
2370
|
+
var Passkey = (_class5 = class extends AbstractApiData {constructor(...args3) { super(...args3); _class5.prototype.__init6.call(this);_class5.prototype.__init7.call(this);_class5.prototype.__init8.call(this);_class5.prototype.__init9.call(this); }
|
|
2371
|
+
static {
|
|
2372
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "Passkey");
|
|
2373
|
+
}
|
|
2374
|
+
__init6() {this._name = ""}
|
|
2375
|
+
__init7() {this._credentialId = ""}
|
|
2376
|
+
__init8() {this._deviceType = ""}
|
|
2377
|
+
__init9() {this._backedUp = false}
|
|
2378
|
+
|
|
2379
|
+
get name() {
|
|
2380
|
+
return this._name;
|
|
2381
|
+
}
|
|
2382
|
+
get credentialId() {
|
|
2383
|
+
return this._credentialId;
|
|
2384
|
+
}
|
|
2385
|
+
get deviceType() {
|
|
2386
|
+
return this._deviceType;
|
|
2387
|
+
}
|
|
2388
|
+
get backedUp() {
|
|
2389
|
+
return this._backedUp;
|
|
2390
|
+
}
|
|
2391
|
+
get lastUsedAt() {
|
|
2392
|
+
return this._lastUsedAt;
|
|
2393
|
+
}
|
|
2394
|
+
rehydrate(data) {
|
|
2395
|
+
super.rehydrate(data);
|
|
2396
|
+
this._name = _nullishCoalesce(data.jsonApi.attributes.name, () => ( ""));
|
|
2397
|
+
this._credentialId = _nullishCoalesce(data.jsonApi.attributes.credentialId, () => ( ""));
|
|
2398
|
+
this._deviceType = _nullishCoalesce(data.jsonApi.attributes.deviceType, () => ( ""));
|
|
2399
|
+
this._backedUp = _nullishCoalesce(data.jsonApi.attributes.backedUp, () => ( false));
|
|
2400
|
+
this._lastUsedAt = data.jsonApi.attributes.lastUsedAt ? new Date(data.jsonApi.attributes.lastUsedAt) : void 0;
|
|
2401
|
+
return this;
|
|
2402
|
+
}
|
|
2403
|
+
}, _class5);
|
|
2404
|
+
|
|
2405
|
+
// src/features/auth/passkey.module.ts
|
|
2406
|
+
var PasskeyModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2407
|
+
name: "passkeys",
|
|
2408
|
+
pageUrl: "/passkeys",
|
|
2409
|
+
model: Passkey
|
|
2410
|
+
}), "PasskeyModule");
|
|
2411
|
+
|
|
2412
|
+
// src/features/auth/data/passkey-registration-options.ts
|
|
2413
|
+
var PasskeyRegistrationOptions = (_class6 = class extends AbstractApiData {constructor(...args4) { super(...args4); _class6.prototype.__init10.call(this);_class6.prototype.__init11.call(this); }
|
|
2414
|
+
static {
|
|
2415
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "PasskeyRegistrationOptions");
|
|
2416
|
+
}
|
|
2417
|
+
__init10() {this._pendingId = ""}
|
|
2418
|
+
__init11() {this._options = {}}
|
|
2419
|
+
get pendingId() {
|
|
2420
|
+
return this._pendingId;
|
|
2421
|
+
}
|
|
2422
|
+
get options() {
|
|
2423
|
+
return this._options;
|
|
2424
|
+
}
|
|
2425
|
+
rehydrate(data) {
|
|
2426
|
+
super.rehydrate(data);
|
|
2427
|
+
this._pendingId = _nullishCoalesce(data.jsonApi.attributes.pendingId, () => ( this.id));
|
|
2428
|
+
this._options = _nullishCoalesce(data.jsonApi.attributes.options, () => ( {}));
|
|
2429
|
+
return this;
|
|
2430
|
+
}
|
|
2431
|
+
createJsonApi(data) {
|
|
2432
|
+
return {
|
|
2433
|
+
data: {
|
|
2434
|
+
type: "passkeys",
|
|
2435
|
+
id: data.id,
|
|
2436
|
+
attributes: {
|
|
2437
|
+
userName: data.userName,
|
|
2438
|
+
userDisplayName: data.userDisplayName
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
};
|
|
2442
|
+
}
|
|
2443
|
+
}, _class6);
|
|
2444
|
+
|
|
2445
|
+
// src/features/auth/passkey-registration-options.module.ts
|
|
2446
|
+
var PasskeyRegistrationOptionsModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2447
|
+
name: "passkey-registration-options",
|
|
2448
|
+
pageUrl: "/passkeys",
|
|
2449
|
+
model: PasskeyRegistrationOptions
|
|
2450
|
+
}), "PasskeyRegistrationOptionsModule");
|
|
2451
|
+
|
|
2452
|
+
// src/features/auth/data/passkey-registration-verify.ts
|
|
2453
|
+
var PasskeyRegistrationVerify = (_class7 = class extends AbstractApiData {constructor(...args5) { super(...args5); _class7.prototype.__init12.call(this);_class7.prototype.__init13.call(this);_class7.prototype.__init14.call(this);_class7.prototype.__init15.call(this); }
|
|
2454
|
+
static {
|
|
2455
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "PasskeyRegistrationVerify");
|
|
2456
|
+
}
|
|
2457
|
+
__init12() {this._name = ""}
|
|
2458
|
+
__init13() {this._credentialId = ""}
|
|
2459
|
+
__init14() {this._deviceType = ""}
|
|
2460
|
+
__init15() {this._backedUp = false}
|
|
2461
|
+
|
|
2462
|
+
get name() {
|
|
2463
|
+
return this._name;
|
|
2464
|
+
}
|
|
2465
|
+
get credentialId() {
|
|
2466
|
+
return this._credentialId;
|
|
2467
|
+
}
|
|
2468
|
+
get deviceType() {
|
|
2469
|
+
return this._deviceType;
|
|
2470
|
+
}
|
|
2471
|
+
get backedUp() {
|
|
2472
|
+
return this._backedUp;
|
|
2473
|
+
}
|
|
2474
|
+
get lastUsedAt() {
|
|
2475
|
+
return this._lastUsedAt;
|
|
2476
|
+
}
|
|
2477
|
+
rehydrate(data) {
|
|
2478
|
+
super.rehydrate(data);
|
|
2479
|
+
this._name = _nullishCoalesce(data.jsonApi.attributes.name, () => ( ""));
|
|
2480
|
+
this._credentialId = _nullishCoalesce(data.jsonApi.attributes.credentialId, () => ( ""));
|
|
2481
|
+
this._deviceType = _nullishCoalesce(data.jsonApi.attributes.deviceType, () => ( ""));
|
|
2482
|
+
this._backedUp = _nullishCoalesce(data.jsonApi.attributes.backedUp, () => ( false));
|
|
2483
|
+
this._lastUsedAt = data.jsonApi.attributes.lastUsedAt ? new Date(data.jsonApi.attributes.lastUsedAt) : void 0;
|
|
2484
|
+
return this;
|
|
2485
|
+
}
|
|
2486
|
+
createJsonApi(data) {
|
|
2487
|
+
return {
|
|
2488
|
+
data: {
|
|
2489
|
+
type: "passkeys",
|
|
2490
|
+
id: data.id,
|
|
2491
|
+
attributes: {
|
|
2492
|
+
pendingId: data.pendingId,
|
|
2493
|
+
name: data.name,
|
|
2494
|
+
response: data.response
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
};
|
|
2498
|
+
}
|
|
2499
|
+
}, _class7);
|
|
2500
|
+
|
|
2501
|
+
// src/features/auth/passkey-registration-verify.module.ts
|
|
2502
|
+
var PasskeyRegistrationVerifyModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2503
|
+
name: "passkey-registration-verify",
|
|
2504
|
+
pageUrl: "/passkeys",
|
|
2505
|
+
model: PasskeyRegistrationVerify
|
|
2506
|
+
}), "PasskeyRegistrationVerifyModule");
|
|
2507
|
+
|
|
2508
|
+
// src/features/auth/data/passkey-rename.ts
|
|
2509
|
+
var PasskeyRename = class extends AbstractApiData {
|
|
2510
|
+
static {
|
|
2511
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "PasskeyRename");
|
|
2512
|
+
}
|
|
2513
|
+
createJsonApi(data) {
|
|
2514
|
+
return {
|
|
2515
|
+
data: {
|
|
2516
|
+
type: "passkeys",
|
|
2517
|
+
id: data.id,
|
|
2518
|
+
attributes: {
|
|
2519
|
+
name: data.name
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
};
|
|
2523
|
+
}
|
|
2524
|
+
};
|
|
2525
|
+
|
|
2526
|
+
// src/features/auth/passkey-rename.module.ts
|
|
2527
|
+
var PasskeyRenameModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2528
|
+
name: "passkey-rename",
|
|
2529
|
+
pageUrl: "/passkeys-rename",
|
|
2530
|
+
model: PasskeyRename
|
|
2531
|
+
}), "PasskeyRenameModule");
|
|
2532
|
+
|
|
2533
|
+
// src/features/auth/data/passkey-verify-login.ts
|
|
2534
|
+
var PasskeyVerifyLogin = class extends AbstractApiData {
|
|
2535
|
+
static {
|
|
2536
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "PasskeyVerifyLogin");
|
|
2537
|
+
}
|
|
2538
|
+
createJsonApi(data) {
|
|
2539
|
+
return {
|
|
2540
|
+
data: {
|
|
2541
|
+
type: "passkeys",
|
|
2542
|
+
id: data.id,
|
|
2543
|
+
attributes: {
|
|
2544
|
+
pendingId: data.pendingId,
|
|
2545
|
+
response: data.response
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
};
|
|
2549
|
+
}
|
|
2550
|
+
};
|
|
2551
|
+
|
|
2552
|
+
// src/features/auth/passkey-verify-login.module.ts
|
|
2553
|
+
var PasskeyVerifyLoginModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2554
|
+
name: "passkey-verify-login",
|
|
2555
|
+
pageUrl: "/passkeys",
|
|
2556
|
+
model: PasskeyVerifyLogin
|
|
2557
|
+
}), "PasskeyVerifyLoginModule");
|
|
2558
|
+
|
|
2559
|
+
// src/features/auth/data/passkey-authentication-options.ts
|
|
2560
|
+
var PasskeyAuthenticationOptions = (_class8 = class extends AbstractApiData {constructor(...args6) { super(...args6); _class8.prototype.__init16.call(this);_class8.prototype.__init17.call(this); }
|
|
2561
|
+
static {
|
|
2562
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "PasskeyAuthenticationOptions");
|
|
2563
|
+
}
|
|
2564
|
+
__init16() {this._pendingId = ""}
|
|
2565
|
+
__init17() {this._options = {}}
|
|
2566
|
+
get pendingId() {
|
|
2567
|
+
return this._pendingId;
|
|
2568
|
+
}
|
|
2569
|
+
get options() {
|
|
2570
|
+
return this._options;
|
|
2571
|
+
}
|
|
2572
|
+
rehydrate(data) {
|
|
2573
|
+
super.rehydrate(data);
|
|
2574
|
+
this._pendingId = _nullishCoalesce(_nullishCoalesce(data.jsonApi.attributes.pendingId, () => ( this.id)), () => ( ""));
|
|
2575
|
+
this._options = _nullishCoalesce(data.jsonApi.attributes.options, () => ( {}));
|
|
2576
|
+
return this;
|
|
2577
|
+
}
|
|
2578
|
+
createJsonApi(data) {
|
|
2579
|
+
return {
|
|
2580
|
+
data: {
|
|
2581
|
+
type: "passkey-authentication-options",
|
|
2582
|
+
id: data.id,
|
|
2583
|
+
attributes: {}
|
|
2584
|
+
}
|
|
2585
|
+
};
|
|
2586
|
+
}
|
|
2587
|
+
}, _class8);
|
|
2588
|
+
|
|
2589
|
+
// src/features/auth/passkey-authentication-options.module.ts
|
|
2590
|
+
var PasskeyAuthenticationOptionsModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2591
|
+
name: "passkey-authentication-options",
|
|
2592
|
+
pageUrl: "/passkeys",
|
|
2593
|
+
model: PasskeyAuthenticationOptions
|
|
2594
|
+
}), "PasskeyAuthenticationOptionsModule");
|
|
2595
|
+
|
|
2596
|
+
// src/features/auth/data/two-factor-enable.ts
|
|
2597
|
+
var TwoFactorEnable = class extends AbstractApiData {
|
|
2598
|
+
static {
|
|
2599
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "TwoFactorEnable");
|
|
2600
|
+
}
|
|
2601
|
+
createJsonApi(data) {
|
|
2602
|
+
return {
|
|
2603
|
+
data: {
|
|
2604
|
+
type: "two-factor-configs",
|
|
2605
|
+
id: data.id,
|
|
2606
|
+
attributes: {
|
|
2607
|
+
preferredMethod: data.preferredMethod
|
|
2608
|
+
}
|
|
2609
|
+
}
|
|
2610
|
+
};
|
|
2611
|
+
}
|
|
2612
|
+
};
|
|
2613
|
+
|
|
2614
|
+
// src/features/auth/two-factor-enable.module.ts
|
|
2615
|
+
var TwoFactorEnableModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2616
|
+
name: "two-factor-enable",
|
|
2617
|
+
pageUrl: "/two-factor-enable",
|
|
2618
|
+
model: TwoFactorEnable
|
|
2619
|
+
}), "TwoFactorEnableModule");
|
|
2620
|
+
|
|
2621
|
+
// src/features/auth/data/two-factor-challenge.ts
|
|
2622
|
+
var TwoFactorChallenge = (_class9 = class extends AbstractApiData {constructor(...args7) { super(...args7); _class9.prototype.__init18.call(this);_class9.prototype.__init19.call(this);_class9.prototype.__init20.call(this); }
|
|
2623
|
+
static {
|
|
2624
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "TwoFactorChallenge");
|
|
2625
|
+
}
|
|
2626
|
+
__init18() {this._pendingToken = ""}
|
|
2627
|
+
__init19() {this._availableMethods = []}
|
|
2628
|
+
__init20() {this._expiresAt = /* @__PURE__ */ new Date()}
|
|
2629
|
+
get pendingToken() {
|
|
2630
|
+
return this._pendingToken;
|
|
2631
|
+
}
|
|
2632
|
+
get availableMethods() {
|
|
2633
|
+
return this._availableMethods;
|
|
2634
|
+
}
|
|
2635
|
+
get expiresAt() {
|
|
2636
|
+
return this._expiresAt;
|
|
2637
|
+
}
|
|
2638
|
+
rehydrate(data) {
|
|
2639
|
+
super.rehydrate(data);
|
|
2640
|
+
this._pendingToken = _nullishCoalesce(data.jsonApi.attributes.pendingToken, () => ( ""));
|
|
2641
|
+
this._availableMethods = _nullishCoalesce(data.jsonApi.attributes.availableMethods, () => ( []));
|
|
2642
|
+
this._expiresAt = data.jsonApi.attributes.expiresAt ? new Date(data.jsonApi.attributes.expiresAt) : /* @__PURE__ */ new Date();
|
|
2643
|
+
return this;
|
|
2644
|
+
}
|
|
2645
|
+
createJsonApi(data) {
|
|
2646
|
+
return {
|
|
2647
|
+
data: {
|
|
2648
|
+
type: "two-factor-configs",
|
|
2649
|
+
id: data.id,
|
|
2650
|
+
attributes: {
|
|
2651
|
+
method: data.method
|
|
2652
|
+
}
|
|
2653
|
+
}
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
}, _class9);
|
|
2657
|
+
|
|
2658
|
+
// src/features/auth/two-factor-challenge.module.ts
|
|
2659
|
+
var TwoFactorChallengeModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2660
|
+
name: "two-factor-challenge",
|
|
2661
|
+
pageUrl: "/two-factor-challenge",
|
|
2662
|
+
model: TwoFactorChallenge
|
|
2663
|
+
}), "TwoFactorChallengeModule");
|
|
2664
|
+
|
|
2665
|
+
// src/features/auth/data/backup-code-verify.ts
|
|
2666
|
+
var BackupCodeVerify = class extends AbstractApiData {
|
|
2667
|
+
static {
|
|
2668
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "BackupCodeVerify");
|
|
2669
|
+
}
|
|
2670
|
+
createJsonApi(data) {
|
|
2671
|
+
return {
|
|
2672
|
+
data: {
|
|
2673
|
+
type: "backup-codes",
|
|
2674
|
+
id: data.id,
|
|
2675
|
+
attributes: {
|
|
2676
|
+
code: data.code
|
|
2677
|
+
}
|
|
2678
|
+
}
|
|
2679
|
+
};
|
|
2680
|
+
}
|
|
2681
|
+
};
|
|
2682
|
+
|
|
2683
|
+
// src/features/auth/backup-code-verify.module.ts
|
|
2684
|
+
var BackupCodeVerifyModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2685
|
+
name: "backup-codes",
|
|
2686
|
+
pageUrl: "/backup-codes",
|
|
2687
|
+
model: BackupCodeVerify
|
|
2688
|
+
}), "BackupCodeVerifyModule");
|
|
2689
|
+
|
|
2239
2690
|
// src/features/auth/config.ts
|
|
2240
2691
|
var _tokenHandler = null;
|
|
2241
2692
|
function configureAuth(handler) {
|
|
@@ -2301,13 +2752,20 @@ var AuthService = class extends AbstractService {
|
|
|
2301
2752
|
}
|
|
2302
2753
|
static async login(params) {
|
|
2303
2754
|
const language = params.language || "en-US";
|
|
2304
|
-
const apiResponse = await
|
|
2755
|
+
const apiResponse = await _chunkWLS4D6VGjs.JsonApiPost.call(void 0, {
|
|
2305
2756
|
classKey: Modules.Auth,
|
|
2306
2757
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "login" }).generate(),
|
|
2307
2758
|
body: { email: params.email, password: params.password },
|
|
2308
2759
|
language
|
|
2309
2760
|
});
|
|
2310
2761
|
if (!apiResponse.ok) throw new Error(apiResponse.error);
|
|
2762
|
+
if (_optionalChain([apiResponse, 'access', _44 => _44.raw, 'optionalAccess', _45 => _45.data, 'optionalAccess', _46 => _46.type]) === "two-factor-challenge") {
|
|
2763
|
+
const challenge = rehydrate(Modules.TwoFactorChallenge, {
|
|
2764
|
+
jsonApi: apiResponse.raw.data,
|
|
2765
|
+
included: _nullishCoalesce(apiResponse.raw.included, () => ( []))
|
|
2766
|
+
});
|
|
2767
|
+
return challenge;
|
|
2768
|
+
}
|
|
2311
2769
|
const auth = apiResponse.data;
|
|
2312
2770
|
const handler = getTokenHandler();
|
|
2313
2771
|
if (handler) {
|
|
@@ -2315,9 +2773,9 @@ var AuthService = class extends AbstractService {
|
|
|
2315
2773
|
token: auth.token,
|
|
2316
2774
|
refreshToken: auth.refreshToken,
|
|
2317
2775
|
userId: auth.user.id,
|
|
2318
|
-
companyId: _optionalChain([auth, 'access',
|
|
2776
|
+
companyId: _optionalChain([auth, 'access', _47 => _47.user, 'access', _48 => _48.company, 'optionalAccess', _49 => _49.id]),
|
|
2319
2777
|
roles: auth.user.roles.map((role) => role.id),
|
|
2320
|
-
features: _nullishCoalesce(_optionalChain([auth, 'access',
|
|
2778
|
+
features: _nullishCoalesce(_optionalChain([auth, 'access', _50 => _50.user, 'access', _51 => _51.company, 'optionalAccess', _52 => _52.features, 'optionalAccess', _53 => _53.map, 'call', _54 => _54((feature) => feature.id)]), () => ( [])),
|
|
2321
2779
|
modules: auth.user.modules.map((module) => ({
|
|
2322
2780
|
id: module.id,
|
|
2323
2781
|
permissions: module.permissions
|
|
@@ -2327,8 +2785,8 @@ var AuthService = class extends AbstractService {
|
|
|
2327
2785
|
return auth.user;
|
|
2328
2786
|
}
|
|
2329
2787
|
static async logout(params) {
|
|
2330
|
-
const language = _optionalChain([params, 'optionalAccess',
|
|
2331
|
-
await
|
|
2788
|
+
const language = _optionalChain([params, 'optionalAccess', _55 => _55.language]) || "en-US";
|
|
2789
|
+
await _chunkWLS4D6VGjs.JsonApiDelete.call(void 0, {
|
|
2332
2790
|
classKey: Modules.Auth,
|
|
2333
2791
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth }).generate(),
|
|
2334
2792
|
language
|
|
@@ -2340,7 +2798,7 @@ var AuthService = class extends AbstractService {
|
|
|
2340
2798
|
}
|
|
2341
2799
|
static async initialiseForgotPassword(params) {
|
|
2342
2800
|
const language = params.language || "en-US";
|
|
2343
|
-
const response = await
|
|
2801
|
+
const response = await _chunkWLS4D6VGjs.JsonApiPost.call(void 0, {
|
|
2344
2802
|
classKey: Modules.Auth,
|
|
2345
2803
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "forgot" }).generate(),
|
|
2346
2804
|
body: { email: params.email },
|
|
@@ -2369,7 +2827,7 @@ var AuthService = class extends AbstractService {
|
|
|
2369
2827
|
}
|
|
2370
2828
|
static async validateCode(params) {
|
|
2371
2829
|
const language = params.language || "en-US";
|
|
2372
|
-
const apiResponse = await
|
|
2830
|
+
const apiResponse = await _chunkWLS4D6VGjs.JsonApiGet.call(void 0, {
|
|
2373
2831
|
classKey: Modules.Auth,
|
|
2374
2832
|
endpoint: new EndpointCreator({ endpoint: Modules.Auth, id: "validate", childEndpoint: params.code }).generate(),
|
|
2375
2833
|
language
|
|
@@ -2401,9 +2859,9 @@ var AuthService = class extends AbstractService {
|
|
|
2401
2859
|
token: auth.token,
|
|
2402
2860
|
refreshToken: auth.refreshToken,
|
|
2403
2861
|
userId: auth.user.id,
|
|
2404
|
-
companyId: _optionalChain([auth, 'access',
|
|
2862
|
+
companyId: _optionalChain([auth, 'access', _56 => _56.user, 'access', _57 => _57.company, 'optionalAccess', _58 => _58.id]),
|
|
2405
2863
|
roles: auth.user.roles.map((role) => role.id),
|
|
2406
|
-
features: _nullishCoalesce(_optionalChain([auth, 'access',
|
|
2864
|
+
features: _nullishCoalesce(_optionalChain([auth, 'access', _59 => _59.user, 'access', _60 => _60.company, 'optionalAccess', _61 => _61.features, 'optionalAccess', _62 => _62.map, 'call', _63 => _63((feature) => feature.id)]), () => ( [])),
|
|
2407
2865
|
modules: auth.user.modules.map((module) => ({
|
|
2408
2866
|
id: module.id,
|
|
2409
2867
|
permissions: module.permissions
|
|
@@ -2413,7 +2871,7 @@ var AuthService = class extends AbstractService {
|
|
|
2413
2871
|
}
|
|
2414
2872
|
static async completeOAuthRegistration(params) {
|
|
2415
2873
|
const endpoint = new EndpointCreator({ endpoint: Modules.Auth, id: "oauth", childEndpoint: "complete" });
|
|
2416
|
-
const response = await
|
|
2874
|
+
const response = await _chunkWLS4D6VGjs.JsonApiPost.call(void 0, {
|
|
2417
2875
|
classKey: Modules.Auth,
|
|
2418
2876
|
endpoint: endpoint.generate(),
|
|
2419
2877
|
body: params,
|
|
@@ -2425,6 +2883,324 @@ var AuthService = class extends AbstractService {
|
|
|
2425
2883
|
}
|
|
2426
2884
|
};
|
|
2427
2885
|
|
|
2886
|
+
// src/features/auth/data/two-factor-status.ts
|
|
2887
|
+
var TwoFactorStatus = (_class10 = class extends AbstractApiData {constructor(...args8) { super(...args8); _class10.prototype.__init21.call(this);_class10.prototype.__init22.call(this);_class10.prototype.__init23.call(this);_class10.prototype.__init24.call(this); }
|
|
2888
|
+
static {
|
|
2889
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "TwoFactorStatus");
|
|
2890
|
+
}
|
|
2891
|
+
__init21() {this._isEnabled = false}
|
|
2892
|
+
|
|
2893
|
+
__init22() {this._totpAuthenticators = []}
|
|
2894
|
+
__init23() {this._passkeys = []}
|
|
2895
|
+
__init24() {this._backupCodesCount = 0}
|
|
2896
|
+
get isEnabled() {
|
|
2897
|
+
return this._isEnabled;
|
|
2898
|
+
}
|
|
2899
|
+
get preferredMethod() {
|
|
2900
|
+
return this._preferredMethod;
|
|
2901
|
+
}
|
|
2902
|
+
get totpAuthenticators() {
|
|
2903
|
+
return this._totpAuthenticators;
|
|
2904
|
+
}
|
|
2905
|
+
get passkeys() {
|
|
2906
|
+
return this._passkeys;
|
|
2907
|
+
}
|
|
2908
|
+
get backupCodesCount() {
|
|
2909
|
+
return this._backupCodesCount;
|
|
2910
|
+
}
|
|
2911
|
+
rehydrate(data) {
|
|
2912
|
+
super.rehydrate(data);
|
|
2913
|
+
this._isEnabled = _nullishCoalesce(data.jsonApi.attributes.isEnabled, () => ( false));
|
|
2914
|
+
this._preferredMethod = data.jsonApi.attributes.preferredMethod;
|
|
2915
|
+
this._backupCodesCount = _nullishCoalesce(data.jsonApi.attributes.backupCodesCount, () => ( 0));
|
|
2916
|
+
return this;
|
|
2917
|
+
}
|
|
2918
|
+
}, _class10);
|
|
2919
|
+
|
|
2920
|
+
// src/features/auth/data/two-factor.service.ts
|
|
2921
|
+
var TwoFactorService = class extends AbstractService {
|
|
2922
|
+
static {
|
|
2923
|
+
_chunk7QVYU63Ejs.__name.call(void 0, this, "TwoFactorService");
|
|
2924
|
+
}
|
|
2925
|
+
// ============================================================
|
|
2926
|
+
// Status
|
|
2927
|
+
// ============================================================
|
|
2928
|
+
static async getStatus() {
|
|
2929
|
+
return this.callApi({
|
|
2930
|
+
type: Modules.TwoFactorStatus,
|
|
2931
|
+
method: "GET" /* GET */,
|
|
2932
|
+
endpoint: new EndpointCreator({
|
|
2933
|
+
endpoint: Modules.Auth,
|
|
2934
|
+
id: "two-factor",
|
|
2935
|
+
childEndpoint: "status"
|
|
2936
|
+
}).generate()
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
static async enable(params) {
|
|
2940
|
+
await this.callApi({
|
|
2941
|
+
type: Modules.TwoFactorEnable,
|
|
2942
|
+
method: "POST" /* POST */,
|
|
2943
|
+
endpoint: new EndpointCreator({
|
|
2944
|
+
endpoint: Modules.Auth,
|
|
2945
|
+
id: "two-factor",
|
|
2946
|
+
childEndpoint: "enable"
|
|
2947
|
+
}).generate(),
|
|
2948
|
+
input: params
|
|
2949
|
+
});
|
|
2950
|
+
}
|
|
2951
|
+
static async disable(params) {
|
|
2952
|
+
await this.callApi({
|
|
2953
|
+
type: Modules.Auth,
|
|
2954
|
+
method: "POST" /* POST */,
|
|
2955
|
+
endpoint: new EndpointCreator({
|
|
2956
|
+
endpoint: Modules.Auth,
|
|
2957
|
+
id: "two-factor",
|
|
2958
|
+
childEndpoint: "disable"
|
|
2959
|
+
}).generate(),
|
|
2960
|
+
input: { code: params.code }
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
// ============================================================
|
|
2964
|
+
// TOTP
|
|
2965
|
+
// ============================================================
|
|
2966
|
+
static async setupTotp(params) {
|
|
2967
|
+
return this.callApi({
|
|
2968
|
+
type: Modules.TotpSetup,
|
|
2969
|
+
method: "POST" /* POST */,
|
|
2970
|
+
endpoint: new EndpointCreator({
|
|
2971
|
+
endpoint: Modules.Auth,
|
|
2972
|
+
id: "totp",
|
|
2973
|
+
childEndpoint: "setup"
|
|
2974
|
+
}).generate(),
|
|
2975
|
+
input: params
|
|
2976
|
+
});
|
|
2977
|
+
}
|
|
2978
|
+
static async verifyTotpSetup(params) {
|
|
2979
|
+
await this.callApi({
|
|
2980
|
+
type: Modules.TotpVerify,
|
|
2981
|
+
method: "POST" /* POST */,
|
|
2982
|
+
endpoint: new EndpointCreator({
|
|
2983
|
+
endpoint: Modules.Auth,
|
|
2984
|
+
id: "totp",
|
|
2985
|
+
childEndpoint: "verify-setup"
|
|
2986
|
+
}).generate(),
|
|
2987
|
+
input: params
|
|
2988
|
+
});
|
|
2989
|
+
}
|
|
2990
|
+
static async listTotpAuthenticators() {
|
|
2991
|
+
return this.callApi({
|
|
2992
|
+
type: Modules.TotpAuthenticator,
|
|
2993
|
+
method: "GET" /* GET */,
|
|
2994
|
+
endpoint: new EndpointCreator({
|
|
2995
|
+
endpoint: Modules.Auth,
|
|
2996
|
+
id: "totp",
|
|
2997
|
+
childEndpoint: "authenticators"
|
|
2998
|
+
}).generate()
|
|
2999
|
+
});
|
|
3000
|
+
}
|
|
3001
|
+
static async deleteTotpAuthenticator(params) {
|
|
3002
|
+
await this.callApi({
|
|
3003
|
+
type: Modules.Auth,
|
|
3004
|
+
method: "DELETE" /* DELETE */,
|
|
3005
|
+
endpoint: new EndpointCreator({
|
|
3006
|
+
endpoint: Modules.Auth,
|
|
3007
|
+
id: "totp",
|
|
3008
|
+
childEndpoint: "authenticators",
|
|
3009
|
+
childId: params.id
|
|
3010
|
+
}).generate()
|
|
3011
|
+
});
|
|
3012
|
+
}
|
|
3013
|
+
// ============================================================
|
|
3014
|
+
// Passkeys
|
|
3015
|
+
// ============================================================
|
|
3016
|
+
static async getPasskeyRegistrationOptions(params) {
|
|
3017
|
+
return this.callApi({
|
|
3018
|
+
type: Modules.PasskeyRegistrationOptions,
|
|
3019
|
+
method: "POST" /* POST */,
|
|
3020
|
+
endpoint: new EndpointCreator({
|
|
3021
|
+
endpoint: Modules.Auth,
|
|
3022
|
+
id: "passkey",
|
|
3023
|
+
childEndpoint: "register",
|
|
3024
|
+
childId: "options"
|
|
3025
|
+
}).generate(),
|
|
3026
|
+
input: params
|
|
3027
|
+
});
|
|
3028
|
+
}
|
|
3029
|
+
static async verifyPasskeyRegistration(params) {
|
|
3030
|
+
return this.callApi({
|
|
3031
|
+
type: Modules.PasskeyRegistrationVerify,
|
|
3032
|
+
method: "POST" /* POST */,
|
|
3033
|
+
endpoint: new EndpointCreator({
|
|
3034
|
+
endpoint: Modules.Auth,
|
|
3035
|
+
id: "passkey",
|
|
3036
|
+
childEndpoint: "register",
|
|
3037
|
+
childId: "verify"
|
|
3038
|
+
}).generate(),
|
|
3039
|
+
input: params
|
|
3040
|
+
});
|
|
3041
|
+
}
|
|
3042
|
+
static async listPasskeys() {
|
|
3043
|
+
return this.callApi({
|
|
3044
|
+
type: Modules.Passkey,
|
|
3045
|
+
method: "GET" /* GET */,
|
|
3046
|
+
endpoint: new EndpointCreator({
|
|
3047
|
+
endpoint: Modules.Auth,
|
|
3048
|
+
id: "passkeys"
|
|
3049
|
+
}).generate()
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3052
|
+
static async deletePasskey(params) {
|
|
3053
|
+
await this.callApi({
|
|
3054
|
+
type: Modules.Auth,
|
|
3055
|
+
method: "DELETE" /* DELETE */,
|
|
3056
|
+
endpoint: new EndpointCreator({
|
|
3057
|
+
endpoint: Modules.Auth,
|
|
3058
|
+
id: "passkeys",
|
|
3059
|
+
childEndpoint: params.id
|
|
3060
|
+
}).generate()
|
|
3061
|
+
});
|
|
3062
|
+
}
|
|
3063
|
+
static async renamePasskey(params) {
|
|
3064
|
+
return this.callApi({
|
|
3065
|
+
type: Modules.PasskeyRename,
|
|
3066
|
+
method: "PATCH" /* PATCH */,
|
|
3067
|
+
endpoint: new EndpointCreator({
|
|
3068
|
+
endpoint: Modules.Auth,
|
|
3069
|
+
id: "passkeys",
|
|
3070
|
+
childEndpoint: params.id
|
|
3071
|
+
}).generate(),
|
|
3072
|
+
input: { id: params.id, name: params.name }
|
|
3073
|
+
});
|
|
3074
|
+
}
|
|
3075
|
+
// ============================================================
|
|
3076
|
+
// Backup Codes
|
|
3077
|
+
// ============================================================
|
|
3078
|
+
static async generateBackupCodes() {
|
|
3079
|
+
const response = await this.callApi({
|
|
3080
|
+
type: Modules.Auth,
|
|
3081
|
+
method: "POST" /* POST */,
|
|
3082
|
+
endpoint: new EndpointCreator({
|
|
3083
|
+
endpoint: Modules.Auth,
|
|
3084
|
+
id: "backup-codes",
|
|
3085
|
+
childEndpoint: "generate"
|
|
3086
|
+
}).generate()
|
|
3087
|
+
});
|
|
3088
|
+
return response.codes;
|
|
3089
|
+
}
|
|
3090
|
+
static async getBackupCodesCount() {
|
|
3091
|
+
const response = await this.callApi({
|
|
3092
|
+
type: Modules.Auth,
|
|
3093
|
+
method: "GET" /* GET */,
|
|
3094
|
+
endpoint: new EndpointCreator({
|
|
3095
|
+
endpoint: Modules.Auth,
|
|
3096
|
+
id: "backup-codes",
|
|
3097
|
+
childEndpoint: "count"
|
|
3098
|
+
}).generate()
|
|
3099
|
+
});
|
|
3100
|
+
return response.count;
|
|
3101
|
+
}
|
|
3102
|
+
// ============================================================
|
|
3103
|
+
// Login 2FA Verification
|
|
3104
|
+
// ============================================================
|
|
3105
|
+
static async handleSuccessfulAuth(auth) {
|
|
3106
|
+
const handler = getTokenHandler();
|
|
3107
|
+
if (handler) {
|
|
3108
|
+
await handler.updateToken({
|
|
3109
|
+
token: auth.token,
|
|
3110
|
+
refreshToken: auth.refreshToken,
|
|
3111
|
+
userId: auth.user.id,
|
|
3112
|
+
companyId: _optionalChain([auth, 'access', _64 => _64.user, 'access', _65 => _65.company, 'optionalAccess', _66 => _66.id]),
|
|
3113
|
+
roles: auth.user.roles.map((role) => role.id),
|
|
3114
|
+
features: _nullishCoalesce(_optionalChain([auth, 'access', _67 => _67.user, 'access', _68 => _68.company, 'optionalAccess', _69 => _69.features, 'optionalAccess', _70 => _70.map, 'call', _71 => _71((feature) => feature.id)]), () => ( [])),
|
|
3115
|
+
modules: auth.user.modules.map((module) => ({
|
|
3116
|
+
id: module.id,
|
|
3117
|
+
permissions: module.permissions
|
|
3118
|
+
}))
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
3121
|
+
return auth;
|
|
3122
|
+
}
|
|
3123
|
+
static async getChallenge(params) {
|
|
3124
|
+
return this.callApi({
|
|
3125
|
+
type: Modules.TwoFactorChallenge,
|
|
3126
|
+
method: "POST" /* POST */,
|
|
3127
|
+
endpoint: new EndpointCreator({
|
|
3128
|
+
endpoint: Modules.Auth,
|
|
3129
|
+
id: "two-factor",
|
|
3130
|
+
childEndpoint: "challenge"
|
|
3131
|
+
}).generate(),
|
|
3132
|
+
input: { id: params.id, method: params.method }
|
|
3133
|
+
});
|
|
3134
|
+
}
|
|
3135
|
+
static async verifyTotp(params) {
|
|
3136
|
+
const auth = await this.callApi({
|
|
3137
|
+
type: Modules.TotpVerifyLogin,
|
|
3138
|
+
// Request: { type: "totp-authenticators", attributes: { code } }
|
|
3139
|
+
responseType: Modules.Auth,
|
|
3140
|
+
// Response: Auth with user relationship
|
|
3141
|
+
method: "POST" /* POST */,
|
|
3142
|
+
endpoint: new EndpointCreator({
|
|
3143
|
+
endpoint: Modules.Auth,
|
|
3144
|
+
id: "two-factor",
|
|
3145
|
+
childEndpoint: "verify",
|
|
3146
|
+
childId: "totp"
|
|
3147
|
+
}).generate(),
|
|
3148
|
+
input: { id: params.id, code: params.code },
|
|
3149
|
+
token: params.pendingToken
|
|
3150
|
+
});
|
|
3151
|
+
return this.handleSuccessfulAuth(auth);
|
|
3152
|
+
}
|
|
3153
|
+
static async getPasskeyAuthOptions(params) {
|
|
3154
|
+
return this.callApi({
|
|
3155
|
+
type: Modules.PasskeyAuthenticationOptions,
|
|
3156
|
+
method: "POST" /* POST */,
|
|
3157
|
+
endpoint: new EndpointCreator({
|
|
3158
|
+
endpoint: Modules.Auth,
|
|
3159
|
+
id: "two-factor",
|
|
3160
|
+
childEndpoint: "verify/passkey",
|
|
3161
|
+
childId: "options"
|
|
3162
|
+
}).generate(),
|
|
3163
|
+
token: params.pendingToken
|
|
3164
|
+
});
|
|
3165
|
+
}
|
|
3166
|
+
static async verifyPasskey(params) {
|
|
3167
|
+
const auth = await this.callApi({
|
|
3168
|
+
type: Modules.PasskeyVerifyLogin,
|
|
3169
|
+
// Request: passkey verification format
|
|
3170
|
+
responseType: Modules.Auth,
|
|
3171
|
+
// Response: Auth with user relationship
|
|
3172
|
+
method: "POST" /* POST */,
|
|
3173
|
+
endpoint: new EndpointCreator({
|
|
3174
|
+
endpoint: Modules.Auth,
|
|
3175
|
+
id: "two-factor",
|
|
3176
|
+
childEndpoint: "verify",
|
|
3177
|
+
childId: "passkey"
|
|
3178
|
+
}).generate(),
|
|
3179
|
+
input: { id: params.id, pendingId: params.pendingId, response: params.credential },
|
|
3180
|
+
token: params.pendingToken
|
|
3181
|
+
});
|
|
3182
|
+
return this.handleSuccessfulAuth(auth);
|
|
3183
|
+
}
|
|
3184
|
+
static async verifyBackupCode(params) {
|
|
3185
|
+
const auth = await this.callApi({
|
|
3186
|
+
type: Modules.BackupCodeVerify,
|
|
3187
|
+
// Request: backup code verification format
|
|
3188
|
+
responseType: Modules.Auth,
|
|
3189
|
+
// Response: Auth with user relationship
|
|
3190
|
+
method: "POST" /* POST */,
|
|
3191
|
+
endpoint: new EndpointCreator({
|
|
3192
|
+
endpoint: Modules.Auth,
|
|
3193
|
+
id: "two-factor",
|
|
3194
|
+
childEndpoint: "verify",
|
|
3195
|
+
childId: "backup"
|
|
3196
|
+
}).generate(),
|
|
3197
|
+
input: { id: params.id, code: params.code },
|
|
3198
|
+
token: params.pendingToken
|
|
3199
|
+
});
|
|
3200
|
+
return this.handleSuccessfulAuth(auth);
|
|
3201
|
+
}
|
|
3202
|
+
};
|
|
3203
|
+
|
|
2428
3204
|
// src/features/auth/enums/AuthComponent.ts
|
|
2429
3205
|
var AuthComponent = /* @__PURE__ */ ((AuthComponent2) => {
|
|
2430
3206
|
AuthComponent2[AuthComponent2["Login"] = 0] = "Login";
|
|
@@ -2434,6 +3210,7 @@ var AuthComponent = /* @__PURE__ */ ((AuthComponent2) => {
|
|
|
2434
3210
|
AuthComponent2[AuthComponent2["AcceptInvitation"] = 4] = "AcceptInvitation";
|
|
2435
3211
|
AuthComponent2[AuthComponent2["Register"] = 5] = "Register";
|
|
2436
3212
|
AuthComponent2[AuthComponent2["Landing"] = 6] = "Landing";
|
|
3213
|
+
AuthComponent2["TwoFactorChallenge"] = "2fa_challenge";
|
|
2437
3214
|
return AuthComponent2;
|
|
2438
3215
|
})(AuthComponent || {});
|
|
2439
3216
|
|
|
@@ -2444,6 +3221,13 @@ var AuthModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory)
|
|
|
2444
3221
|
model: Auth
|
|
2445
3222
|
}), "AuthModule");
|
|
2446
3223
|
|
|
3224
|
+
// src/features/auth/two-factor-status.module.ts
|
|
3225
|
+
var TwoFactorStatusModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
3226
|
+
name: "two-factor-status",
|
|
3227
|
+
pageUrl: "/two-factor-status",
|
|
3228
|
+
model: TwoFactorStatus
|
|
3229
|
+
}), "TwoFactorStatusModule");
|
|
3230
|
+
|
|
2447
3231
|
// src/features/billing/data/billing.service.ts
|
|
2448
3232
|
var BillingService = class extends AbstractService {
|
|
2449
3233
|
static {
|
|
@@ -2465,8 +3249,8 @@ var BillingService = class extends AbstractService {
|
|
|
2465
3249
|
type: Modules.StripeUsage,
|
|
2466
3250
|
method: "GET" /* GET */,
|
|
2467
3251
|
endpoint: endpoint.generate(),
|
|
2468
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
2469
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
3252
|
+
next: _optionalChain([params, 'optionalAccess', _72 => _72.next]),
|
|
3253
|
+
previous: _optionalChain([params, 'optionalAccess', _73 => _73.prev])
|
|
2470
3254
|
});
|
|
2471
3255
|
}
|
|
2472
3256
|
/**
|
|
@@ -2505,6 +3289,7 @@ var Billing = class extends AbstractApiData {
|
|
|
2505
3289
|
// src/features/billing/modules/billing.module.ts
|
|
2506
3290
|
var BillingModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2507
3291
|
name: "billing",
|
|
3292
|
+
pageUrl: "/billing",
|
|
2508
3293
|
model: Billing,
|
|
2509
3294
|
moduleId: "3266b307-5a9a-46f9-b78d-631f672f8735"
|
|
2510
3295
|
}), "BillingModule");
|
|
@@ -2566,7 +3351,7 @@ var PaymentMethod = class extends AbstractApiData {
|
|
|
2566
3351
|
};
|
|
2567
3352
|
|
|
2568
3353
|
// src/features/billing/stripe-customer/data/stripe-customer.ts
|
|
2569
|
-
var StripeCustomer = (
|
|
3354
|
+
var StripeCustomer = (_class11 = class extends AbstractApiData {constructor(...args9) { super(...args9); _class11.prototype.__init25.call(this); }
|
|
2570
3355
|
static {
|
|
2571
3356
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "StripeCustomer");
|
|
2572
3357
|
}
|
|
@@ -2576,7 +3361,7 @@ var StripeCustomer = (_class3 = class extends AbstractApiData {constructor(...ar
|
|
|
2576
3361
|
|
|
2577
3362
|
|
|
2578
3363
|
|
|
2579
|
-
|
|
3364
|
+
__init25() {this._delinquent = false}
|
|
2580
3365
|
|
|
2581
3366
|
get stripeCustomerId() {
|
|
2582
3367
|
if (!this._stripeCustomerId) throw new Error("stripeCustomerId is not defined");
|
|
@@ -2618,7 +3403,7 @@ var StripeCustomer = (_class3 = class extends AbstractApiData {constructor(...ar
|
|
|
2618
3403
|
createJsonApi(_data) {
|
|
2619
3404
|
throw new Error("BillingCustomer is managed by Stripe and cannot be created directly");
|
|
2620
3405
|
}
|
|
2621
|
-
},
|
|
3406
|
+
}, _class11);
|
|
2622
3407
|
|
|
2623
3408
|
// src/features/billing/stripe-customer/data/stripe-customer.service.ts
|
|
2624
3409
|
var StripeCustomerService = class extends AbstractService {
|
|
@@ -2697,8 +3482,8 @@ var StripeCustomerService = class extends AbstractService {
|
|
|
2697
3482
|
type: Modules.StripePaymentMethod,
|
|
2698
3483
|
method: "GET" /* GET */,
|
|
2699
3484
|
endpoint: endpoint.generate(),
|
|
2700
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
2701
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
3485
|
+
next: _optionalChain([params, 'optionalAccess', _74 => _74.next]),
|
|
3486
|
+
previous: _optionalChain([params, 'optionalAccess', _75 => _75.prev])
|
|
2702
3487
|
});
|
|
2703
3488
|
}
|
|
2704
3489
|
/**
|
|
@@ -2734,6 +3519,7 @@ var StripeCustomerService = class extends AbstractService {
|
|
|
2734
3519
|
// src/features/billing/stripe-customer/stripe-customer.module.ts
|
|
2735
3520
|
var StripeCustomerModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2736
3521
|
name: "stripe-customers",
|
|
3522
|
+
pageUrl: "/stripe-customers",
|
|
2737
3523
|
model: StripeCustomer,
|
|
2738
3524
|
moduleId: "25a80cb3-bf18-47fd-963a-639212519920"
|
|
2739
3525
|
}), "StripeCustomerModule");
|
|
@@ -2741,12 +3527,13 @@ var StripeCustomerModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
|
|
|
2741
3527
|
// src/features/billing/stripe-customer/stripe-payment-method.module.ts
|
|
2742
3528
|
var StripePaymentMethodModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2743
3529
|
name: "stripe-payment-methods",
|
|
3530
|
+
pageUrl: "/stripe-payment-methods",
|
|
2744
3531
|
model: PaymentMethod,
|
|
2745
3532
|
moduleId: "e8f7d6c5-b4a3-4928-8170-1f2e3d4c5b6a"
|
|
2746
3533
|
}), "StripePaymentMethodModule");
|
|
2747
3534
|
|
|
2748
3535
|
// src/features/billing/stripe-invoice/data/stripe-invoice.ts
|
|
2749
|
-
var StripeInvoice = (
|
|
3536
|
+
var StripeInvoice = (_class12 = class extends AbstractApiData {constructor(...args10) { super(...args10); _class12.prototype.__init26.call(this);_class12.prototype.__init27.call(this);_class12.prototype.__init28.call(this); }
|
|
2750
3537
|
static {
|
|
2751
3538
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "StripeInvoice");
|
|
2752
3539
|
}
|
|
@@ -2767,11 +3554,11 @@ var StripeInvoice = (_class4 = class extends AbstractApiData {constructor(...arg
|
|
|
2767
3554
|
|
|
2768
3555
|
|
|
2769
3556
|
|
|
2770
|
-
|
|
2771
|
-
|
|
3557
|
+
__init26() {this._attemptCount = 0}
|
|
3558
|
+
__init27() {this._attempted = false}
|
|
2772
3559
|
|
|
2773
3560
|
|
|
2774
|
-
|
|
3561
|
+
__init28() {this._paid = false}
|
|
2775
3562
|
|
|
2776
3563
|
get stripeInvoiceId() {
|
|
2777
3564
|
if (!this._stripeInvoiceId) throw new Error("stripeInvoiceId is not defined");
|
|
@@ -2886,7 +3673,7 @@ var StripeInvoice = (_class4 = class extends AbstractApiData {constructor(...arg
|
|
|
2886
3673
|
createJsonApi(_data) {
|
|
2887
3674
|
throw new Error("Invoice is managed by Stripe and cannot be created directly");
|
|
2888
3675
|
}
|
|
2889
|
-
},
|
|
3676
|
+
}, _class12);
|
|
2890
3677
|
|
|
2891
3678
|
// src/features/billing/stripe-invoice/data/stripe-invoice.interface.ts
|
|
2892
3679
|
var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
|
|
@@ -2910,15 +3697,15 @@ var StripeInvoiceService = class extends AbstractService {
|
|
|
2910
3697
|
const endpoint = new EndpointCreator({
|
|
2911
3698
|
endpoint: Modules.StripeInvoice
|
|
2912
3699
|
});
|
|
2913
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
3700
|
+
if (_optionalChain([params, 'optionalAccess', _76 => _76.status])) {
|
|
2914
3701
|
endpoint.addAdditionalParam("status", params.status);
|
|
2915
3702
|
}
|
|
2916
3703
|
return this.callApi({
|
|
2917
3704
|
type: Modules.StripeInvoice,
|
|
2918
3705
|
method: "GET" /* GET */,
|
|
2919
3706
|
endpoint: endpoint.generate(),
|
|
2920
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
2921
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
3707
|
+
next: _optionalChain([params, 'optionalAccess', _77 => _77.next]),
|
|
3708
|
+
previous: _optionalChain([params, 'optionalAccess', _78 => _78.prev])
|
|
2922
3709
|
});
|
|
2923
3710
|
}
|
|
2924
3711
|
/**
|
|
@@ -2954,19 +3741,20 @@ var StripeInvoiceService = class extends AbstractService {
|
|
|
2954
3741
|
// src/features/billing/stripe-invoice/stripe-invoice.module.ts
|
|
2955
3742
|
var StripeInvoiceModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
2956
3743
|
name: "stripe-invoices",
|
|
3744
|
+
pageUrl: "/stripe-invoices",
|
|
2957
3745
|
model: StripeInvoice,
|
|
2958
3746
|
moduleId: "37c73b8b-d3b1-4e5e-8fcb-a66d8ecfc05b"
|
|
2959
3747
|
}), "StripeInvoiceModule");
|
|
2960
3748
|
|
|
2961
3749
|
// src/features/billing/stripe-price/data/stripe-price.ts
|
|
2962
|
-
var StripePrice = (
|
|
3750
|
+
var StripePrice = (_class13 = class extends AbstractApiData {constructor(...args11) { super(...args11); _class13.prototype.__init29.call(this);_class13.prototype.__init30.call(this); }
|
|
2963
3751
|
static {
|
|
2964
3752
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "StripePrice");
|
|
2965
3753
|
}
|
|
2966
3754
|
|
|
2967
3755
|
|
|
2968
3756
|
|
|
2969
|
-
|
|
3757
|
+
__init29() {this._active = true}
|
|
2970
3758
|
|
|
2971
3759
|
|
|
2972
3760
|
|
|
@@ -2978,7 +3766,7 @@ var StripePrice = (_class5 = class extends AbstractApiData {constructor(...args3
|
|
|
2978
3766
|
|
|
2979
3767
|
|
|
2980
3768
|
|
|
2981
|
-
|
|
3769
|
+
__init30() {this._priceFeatures = []}
|
|
2982
3770
|
// Platform Feature entities
|
|
2983
3771
|
get stripePriceId() {
|
|
2984
3772
|
if (!this._stripePriceId) throw new Error("stripePriceId is not defined");
|
|
@@ -3108,7 +3896,7 @@ var StripePrice = (_class5 = class extends AbstractApiData {constructor(...args3
|
|
|
3108
3896
|
}
|
|
3109
3897
|
return response;
|
|
3110
3898
|
}
|
|
3111
|
-
},
|
|
3899
|
+
}, _class13);
|
|
3112
3900
|
|
|
3113
3901
|
// src/features/billing/stripe-price/data/stripe-price.service.ts
|
|
3114
3902
|
var StripePriceService = class extends AbstractService {
|
|
@@ -3122,18 +3910,18 @@ var StripePriceService = class extends AbstractService {
|
|
|
3122
3910
|
const endpoint = new EndpointCreator({
|
|
3123
3911
|
endpoint: Modules.StripePrice
|
|
3124
3912
|
});
|
|
3125
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
3913
|
+
if (_optionalChain([params, 'optionalAccess', _79 => _79.productId])) {
|
|
3126
3914
|
endpoint.addAdditionalParam("productId", params.productId);
|
|
3127
3915
|
}
|
|
3128
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
3916
|
+
if (_optionalChain([params, 'optionalAccess', _80 => _80.active]) !== void 0) {
|
|
3129
3917
|
endpoint.addAdditionalParam("active", params.active.toString());
|
|
3130
3918
|
}
|
|
3131
3919
|
return this.callApi({
|
|
3132
3920
|
type: Modules.StripePrice,
|
|
3133
3921
|
method: "GET" /* GET */,
|
|
3134
3922
|
endpoint: endpoint.generate(),
|
|
3135
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
3136
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
3923
|
+
next: _optionalChain([params, 'optionalAccess', _81 => _81.next]),
|
|
3924
|
+
previous: _optionalChain([params, 'optionalAccess', _82 => _82.prev])
|
|
3137
3925
|
});
|
|
3138
3926
|
}
|
|
3139
3927
|
/**
|
|
@@ -3218,21 +4006,22 @@ var StripePriceService = class extends AbstractService {
|
|
|
3218
4006
|
// src/features/billing/stripe-price/stripe-price.module.ts
|
|
3219
4007
|
var StripePriceModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
3220
4008
|
name: "stripe-prices",
|
|
4009
|
+
pageUrl: "/stripe-prices",
|
|
3221
4010
|
model: StripePrice,
|
|
3222
4011
|
moduleId: "a7d3e5f1-8c9b-4a2e-b6d7-3f1c8e9a4b5d"
|
|
3223
4012
|
}), "StripePriceModule");
|
|
3224
4013
|
|
|
3225
4014
|
// src/features/billing/stripe-product/data/stripe-product.ts
|
|
3226
|
-
var StripeProduct = (
|
|
4015
|
+
var StripeProduct = (_class14 = class extends AbstractApiData {constructor(...args12) { super(...args12); _class14.prototype.__init31.call(this);_class14.prototype.__init32.call(this); }
|
|
3227
4016
|
static {
|
|
3228
4017
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "StripeProduct");
|
|
3229
4018
|
}
|
|
3230
4019
|
|
|
3231
4020
|
|
|
3232
4021
|
|
|
3233
|
-
|
|
4022
|
+
__init31() {this._active = true}
|
|
3234
4023
|
|
|
3235
|
-
|
|
4024
|
+
__init32() {this._stripePrices = []}
|
|
3236
4025
|
get stripeProductId() {
|
|
3237
4026
|
if (!this._stripeProductId) throw new Error("stripeProductId is not defined");
|
|
3238
4027
|
return this._stripeProductId;
|
|
@@ -3277,7 +4066,7 @@ var StripeProduct = (_class6 = class extends AbstractApiData {constructor(...arg
|
|
|
3277
4066
|
if (data.metadata) response.data.attributes.metadata = data.metadata;
|
|
3278
4067
|
return response;
|
|
3279
4068
|
}
|
|
3280
|
-
},
|
|
4069
|
+
}, _class14);
|
|
3281
4070
|
|
|
3282
4071
|
// src/features/billing/stripe-product/data/stripe-product.service.ts
|
|
3283
4072
|
var StripeProductService = class extends AbstractService {
|
|
@@ -3291,15 +4080,15 @@ var StripeProductService = class extends AbstractService {
|
|
|
3291
4080
|
const endpoint = new EndpointCreator({
|
|
3292
4081
|
endpoint: Modules.StripeProduct
|
|
3293
4082
|
});
|
|
3294
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
4083
|
+
if (_optionalChain([params, 'optionalAccess', _83 => _83.active]) !== void 0) {
|
|
3295
4084
|
endpoint.addAdditionalParam("active", params.active.toString());
|
|
3296
4085
|
}
|
|
3297
4086
|
return this.callApi({
|
|
3298
4087
|
type: Modules.StripeProduct,
|
|
3299
4088
|
method: "GET" /* GET */,
|
|
3300
4089
|
endpoint: endpoint.generate(),
|
|
3301
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
3302
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
4090
|
+
next: _optionalChain([params, 'optionalAccess', _84 => _84.next]),
|
|
4091
|
+
previous: _optionalChain([params, 'optionalAccess', _85 => _85.prev])
|
|
3303
4092
|
});
|
|
3304
4093
|
}
|
|
3305
4094
|
/**
|
|
@@ -3380,12 +4169,13 @@ var StripeProductService = class extends AbstractService {
|
|
|
3380
4169
|
// src/features/billing/stripe-product/stripe-product.module.ts
|
|
3381
4170
|
var StripeProductModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
3382
4171
|
name: "stripe-products",
|
|
4172
|
+
pageUrl: "/stripe-products",
|
|
3383
4173
|
model: StripeProduct,
|
|
3384
4174
|
moduleId: "f8c4a1e9-3b2d-4f7a-9e5c-1d8a6b3c9f2e"
|
|
3385
4175
|
}), "StripeProductModule");
|
|
3386
4176
|
|
|
3387
4177
|
// src/features/billing/stripe-subscription/data/stripe-subscription.ts
|
|
3388
|
-
var StripeSubscription = (
|
|
4178
|
+
var StripeSubscription = (_class15 = class extends AbstractApiData {constructor(...args13) { super(...args13); _class15.prototype.__init33.call(this); }
|
|
3389
4179
|
static {
|
|
3390
4180
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "StripeSubscription");
|
|
3391
4181
|
}
|
|
@@ -3393,7 +4183,7 @@ var StripeSubscription = (_class7 = class extends AbstractApiData {constructor(.
|
|
|
3393
4183
|
|
|
3394
4184
|
|
|
3395
4185
|
|
|
3396
|
-
|
|
4186
|
+
__init33() {this._cancelAtPeriodEnd = false}
|
|
3397
4187
|
|
|
3398
4188
|
|
|
3399
4189
|
|
|
@@ -3443,8 +4233,6 @@ var StripeSubscription = (_class7 = class extends AbstractApiData {constructor(.
|
|
|
3443
4233
|
return this;
|
|
3444
4234
|
}
|
|
3445
4235
|
createJsonApi(data) {
|
|
3446
|
-
console.log("[StripeSubscription.createJsonApi] Input data:", JSON.stringify(data, null, 2));
|
|
3447
|
-
console.log("[StripeSubscription.createJsonApi] promotionCode in input:", data.promotionCode);
|
|
3448
4236
|
const response = {
|
|
3449
4237
|
data: {
|
|
3450
4238
|
type: Modules.StripeSubscription.name,
|
|
@@ -3483,10 +4271,9 @@ var StripeSubscription = (_class7 = class extends AbstractApiData {constructor(.
|
|
|
3483
4271
|
if (data.promotionCode) {
|
|
3484
4272
|
response.data.attributes.promotionCode = data.promotionCode;
|
|
3485
4273
|
}
|
|
3486
|
-
console.log("[StripeSubscription.createJsonApi] Final response:", JSON.stringify(response, null, 2));
|
|
3487
4274
|
return response;
|
|
3488
4275
|
}
|
|
3489
|
-
},
|
|
4276
|
+
}, _class15);
|
|
3490
4277
|
|
|
3491
4278
|
// src/features/billing/stripe-subscription/data/stripe-subscription.interface.ts
|
|
3492
4279
|
var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
|
|
@@ -3520,8 +4307,8 @@ var StripeSubscriptionService = class extends AbstractService {
|
|
|
3520
4307
|
type: Modules.StripeSubscription,
|
|
3521
4308
|
method: "GET" /* GET */,
|
|
3522
4309
|
endpoint: endpoint.generate(),
|
|
3523
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
3524
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
4310
|
+
next: _optionalChain([params, 'optionalAccess', _86 => _86.next]),
|
|
4311
|
+
previous: _optionalChain([params, 'optionalAccess', _87 => _87.prev])
|
|
3525
4312
|
});
|
|
3526
4313
|
}
|
|
3527
4314
|
/**
|
|
@@ -3663,6 +4450,7 @@ var StripeSubscriptionService = class extends AbstractService {
|
|
|
3663
4450
|
// src/features/billing/stripe-subscription/stripe-subscription.module.ts
|
|
3664
4451
|
var StripeSubscriptionModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
3665
4452
|
name: "stripe-subscriptions",
|
|
4453
|
+
pageUrl: "/stripe-subscriptions",
|
|
3666
4454
|
model: StripeSubscription,
|
|
3667
4455
|
moduleId: "5e8797ef-650b-4dd5-ac79-a2e530a6c7ba"
|
|
3668
4456
|
}), "StripeSubscriptionModule");
|
|
@@ -3747,8 +4535,8 @@ var StripeUsageService = class extends AbstractService {
|
|
|
3747
4535
|
type: Modules.StripeUsage,
|
|
3748
4536
|
method: "GET" /* GET */,
|
|
3749
4537
|
endpoint: endpoint.generate(),
|
|
3750
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
3751
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
4538
|
+
next: _optionalChain([params, 'optionalAccess', _88 => _88.next]),
|
|
4539
|
+
previous: _optionalChain([params, 'optionalAccess', _89 => _89.prev])
|
|
3752
4540
|
});
|
|
3753
4541
|
}
|
|
3754
4542
|
/**
|
|
@@ -3796,8 +4584,8 @@ var StripeUsageService = class extends AbstractService {
|
|
|
3796
4584
|
type: Modules.StripeUsage,
|
|
3797
4585
|
method: "GET" /* GET */,
|
|
3798
4586
|
endpoint: endpoint.generate(),
|
|
3799
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
3800
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
4587
|
+
next: _optionalChain([params, 'optionalAccess', _90 => _90.next]),
|
|
4588
|
+
previous: _optionalChain([params, 'optionalAccess', _91 => _91.prev])
|
|
3801
4589
|
});
|
|
3802
4590
|
}
|
|
3803
4591
|
/**
|
|
@@ -3826,6 +4614,7 @@ var StripeUsageService = class extends AbstractService {
|
|
|
3826
4614
|
// src/features/billing/stripe-usage/stripe-usage.module.ts
|
|
3827
4615
|
var StripeUsageModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
3828
4616
|
name: "stripe-usage-records",
|
|
4617
|
+
pageUrl: "/stripe-usage-records",
|
|
3829
4618
|
model: StripeUsage,
|
|
3830
4619
|
moduleId: "c2e9f4a6-1d7b-4e3a-8f5c-9b2d6a1e7f3c"
|
|
3831
4620
|
}), "StripeUsageModule");
|
|
@@ -3845,7 +4634,7 @@ var StripePromotionCodeService = class {
|
|
|
3845
4634
|
* @returns Validation result with discount details if valid
|
|
3846
4635
|
*/
|
|
3847
4636
|
static async validatePromotionCode(params) {
|
|
3848
|
-
const response = await
|
|
4637
|
+
const response = await _chunkWLS4D6VGjs.JsonApiPost.call(void 0, {
|
|
3849
4638
|
classKey: Modules.StripePromotionCode,
|
|
3850
4639
|
endpoint: `${STRIPE_PROMOTION_CODE_ENDPOINT}/validate`,
|
|
3851
4640
|
body: {
|
|
@@ -3883,13 +4672,13 @@ var StripePromotionCodeService = class {
|
|
|
3883
4672
|
};
|
|
3884
4673
|
|
|
3885
4674
|
// src/features/billing/stripe-promotion-code/data/stripe-promotion-code.ts
|
|
3886
|
-
var StripePromotionCode = (
|
|
4675
|
+
var StripePromotionCode = (_class16 = class extends AbstractApiData {constructor(...args14) { super(...args14); _class16.prototype.__init34.call(this);_class16.prototype.__init35.call(this); }
|
|
3887
4676
|
static {
|
|
3888
4677
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "StripePromotionCode");
|
|
3889
4678
|
}
|
|
3890
|
-
|
|
4679
|
+
__init34() {this._valid = false}
|
|
3891
4680
|
|
|
3892
|
-
|
|
4681
|
+
__init35() {this._code = ""}
|
|
3893
4682
|
|
|
3894
4683
|
|
|
3895
4684
|
|
|
@@ -3936,17 +4725,18 @@ var StripePromotionCode = (_class8 = class extends AbstractApiData {constructor(
|
|
|
3936
4725
|
this._errorMessage = data.jsonApi.attributes.errorMessage;
|
|
3937
4726
|
return this;
|
|
3938
4727
|
}
|
|
3939
|
-
},
|
|
4728
|
+
}, _class16);
|
|
3940
4729
|
|
|
3941
4730
|
// src/features/billing/stripe-promotion-code/stripe-promotion-code.module.ts
|
|
3942
4731
|
var StripePromotionCodeModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
3943
4732
|
name: "stripe-promotion-codes",
|
|
4733
|
+
pageUrl: "/stripe-promotion-codes",
|
|
3944
4734
|
model: StripePromotionCode,
|
|
3945
4735
|
moduleId: "b8e4f6a2-9d0c-5b3f-c7e8-4g2d9f0a5c6e"
|
|
3946
4736
|
}), "StripePromotionCodeModule");
|
|
3947
4737
|
|
|
3948
4738
|
// src/features/company/data/company.ts
|
|
3949
|
-
var Company = (
|
|
4739
|
+
var Company = (_class17 = class extends AbstractApiData {constructor(...args15) { super(...args15); _class17.prototype.__init36.call(this);_class17.prototype.__init37.call(this);_class17.prototype.__init38.call(this);_class17.prototype.__init39.call(this); }
|
|
3950
4740
|
static {
|
|
3951
4741
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Company");
|
|
3952
4742
|
}
|
|
@@ -3954,10 +4744,10 @@ var Company = (_class9 = class extends AbstractApiData {constructor(...args7) {
|
|
|
3954
4744
|
|
|
3955
4745
|
|
|
3956
4746
|
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
4747
|
+
__init36() {this._isActiveSubscription = false}
|
|
4748
|
+
__init37() {this._monthlyTokens = 0}
|
|
4749
|
+
__init38() {this._availableMonthlyTokens = 0}
|
|
4750
|
+
__init39() {this._availableExtraTokens = 0}
|
|
3961
4751
|
|
|
3962
4752
|
|
|
3963
4753
|
get name() {
|
|
@@ -4042,7 +4832,7 @@ var Company = (_class9 = class extends AbstractApiData {constructor(...args7) {
|
|
|
4042
4832
|
}
|
|
4043
4833
|
return response;
|
|
4044
4834
|
}
|
|
4045
|
-
},
|
|
4835
|
+
}, _class17);
|
|
4046
4836
|
|
|
4047
4837
|
// src/features/company/data/company.fields.ts
|
|
4048
4838
|
var CompanyFields = /* @__PURE__ */ ((CompanyFields2) => {
|
|
@@ -4231,8 +5021,8 @@ var ContentService = class extends AbstractService {
|
|
|
4231
5021
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
4232
5022
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
4233
5023
|
}
|
|
4234
|
-
if (_optionalChain([Modules, 'access',
|
|
4235
|
-
if (_optionalChain([Modules, 'access',
|
|
5024
|
+
if (_optionalChain([Modules, 'access', _92 => _92.Content, 'access', _93 => _93.inclusions, 'optionalAccess', _94 => _94.lists, 'optionalAccess', _95 => _95.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
|
|
5025
|
+
if (_optionalChain([Modules, 'access', _96 => _96.Content, 'access', _97 => _97.inclusions, 'optionalAccess', _98 => _98.lists, 'optionalAccess', _99 => _99.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
|
|
4236
5026
|
return this.callApi({
|
|
4237
5027
|
type: Modules.Content,
|
|
4238
5028
|
method: "GET" /* GET */,
|
|
@@ -4246,8 +5036,8 @@ var ContentService = class extends AbstractService {
|
|
|
4246
5036
|
id: params.id,
|
|
4247
5037
|
childEndpoint: "relevance"
|
|
4248
5038
|
});
|
|
4249
|
-
if (_optionalChain([Modules, 'access',
|
|
4250
|
-
if (_optionalChain([Modules, 'access',
|
|
5039
|
+
if (_optionalChain([Modules, 'access', _100 => _100.Content, 'access', _101 => _101.inclusions, 'optionalAccess', _102 => _102.lists, 'optionalAccess', _103 => _103.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
|
|
5040
|
+
if (_optionalChain([Modules, 'access', _104 => _104.Content, 'access', _105 => _105.inclusions, 'optionalAccess', _106 => _106.lists, 'optionalAccess', _107 => _107.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
|
|
4251
5041
|
return this.callApi({
|
|
4252
5042
|
type: Modules.Content,
|
|
4253
5043
|
method: "GET" /* GET */,
|
|
@@ -4263,8 +5053,8 @@ var ContentService = class extends AbstractService {
|
|
|
4263
5053
|
});
|
|
4264
5054
|
if (params.fetchAll) endpoint.addAdditionalParam("fetchAll", "true");
|
|
4265
5055
|
if (params.search) endpoint.addAdditionalParam("search", params.search);
|
|
4266
|
-
if (_optionalChain([Modules, 'access',
|
|
4267
|
-
if (_optionalChain([Modules, 'access',
|
|
5056
|
+
if (_optionalChain([Modules, 'access', _108 => _108.Content, 'access', _109 => _109.inclusions, 'optionalAccess', _110 => _110.lists, 'optionalAccess', _111 => _111.fields])) endpoint.limitToFields(Modules.Content.inclusions.lists.fields);
|
|
5057
|
+
if (_optionalChain([Modules, 'access', _112 => _112.Content, 'access', _113 => _113.inclusions, 'optionalAccess', _114 => _114.lists, 'optionalAccess', _115 => _115.types])) endpoint.limitToType(Modules.Content.inclusions.lists.types);
|
|
4268
5058
|
return this.callApi({
|
|
4269
5059
|
type: Modules.Content,
|
|
4270
5060
|
method: "GET" /* GET */,
|
|
@@ -4292,13 +5082,13 @@ var ContentModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factor
|
|
|
4292
5082
|
}), "ContentModule");
|
|
4293
5083
|
|
|
4294
5084
|
// src/features/feature/data/feature.ts
|
|
4295
|
-
var Feature = (
|
|
5085
|
+
var Feature = (_class18 = class extends AbstractApiData {constructor(...args16) { super(...args16); _class18.prototype.__init40.call(this); }
|
|
4296
5086
|
static {
|
|
4297
5087
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Feature");
|
|
4298
5088
|
}
|
|
4299
5089
|
|
|
4300
5090
|
|
|
4301
|
-
|
|
5091
|
+
__init40() {this._modules = []}
|
|
4302
5092
|
get name() {
|
|
4303
5093
|
return _nullishCoalesce(this._name, () => ( ""));
|
|
4304
5094
|
}
|
|
@@ -4315,7 +5105,7 @@ var Feature = (_class10 = class extends AbstractApiData {constructor(...args8) {
|
|
|
4315
5105
|
this._modules = this._readIncluded(data, `modules`, Modules.Module);
|
|
4316
5106
|
return this;
|
|
4317
5107
|
}
|
|
4318
|
-
},
|
|
5108
|
+
}, _class18);
|
|
4319
5109
|
|
|
4320
5110
|
// src/features/feature/data/feature.service.ts
|
|
4321
5111
|
var FeatureService = class extends AbstractService {
|
|
@@ -4766,7 +5556,7 @@ var S3Service = class extends AbstractService {
|
|
|
4766
5556
|
};
|
|
4767
5557
|
|
|
4768
5558
|
// src/features/user/data/user.ts
|
|
4769
|
-
var User = (
|
|
5559
|
+
var User = (_class19 = class extends AbstractApiData {constructor(...args17) { super(...args17); _class19.prototype.__init41.call(this);_class19.prototype.__init42.call(this);_class19.prototype.__init43.call(this); }
|
|
4770
5560
|
static {
|
|
4771
5561
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "User");
|
|
4772
5562
|
}
|
|
@@ -4780,11 +5570,12 @@ var User = (_class11 = class extends AbstractApiData {constructor(...args9) { su
|
|
|
4780
5570
|
|
|
4781
5571
|
|
|
4782
5572
|
|
|
5573
|
+
__init41() {this._twoFactorEnabled = false}
|
|
4783
5574
|
|
|
4784
5575
|
|
|
4785
|
-
|
|
5576
|
+
__init42() {this._roles = []}
|
|
4786
5577
|
|
|
4787
|
-
|
|
5578
|
+
__init43() {this._modules = []}
|
|
4788
5579
|
get searchResult() {
|
|
4789
5580
|
return _nullishCoalesce(this._name, () => ( ""));
|
|
4790
5581
|
}
|
|
@@ -4821,6 +5612,9 @@ var User = (_class11 = class extends AbstractApiData {constructor(...args9) { su
|
|
|
4821
5612
|
get isDeleted() {
|
|
4822
5613
|
return _nullishCoalesce(this._isDeleted, () => ( false));
|
|
4823
5614
|
}
|
|
5615
|
+
get twoFactorEnabled() {
|
|
5616
|
+
return this._twoFactorEnabled;
|
|
5617
|
+
}
|
|
4824
5618
|
get lastLogin() {
|
|
4825
5619
|
return this._lastLogin;
|
|
4826
5620
|
}
|
|
@@ -4845,6 +5639,7 @@ var User = (_class11 = class extends AbstractApiData {constructor(...args9) { su
|
|
|
4845
5639
|
this._avatarUrl = data.jsonApi.attributes.avatarUrl;
|
|
4846
5640
|
this._isActivated = data.jsonApi.meta.isActive;
|
|
4847
5641
|
this._isDeleted = data.jsonApi.meta.isDeleted;
|
|
5642
|
+
this._twoFactorEnabled = _nullishCoalesce(data.jsonApi.attributes.twoFactorEnabled, () => ( false));
|
|
4848
5643
|
this._lastLogin = data.jsonApi.meta.lastLogin ? new Date(data.jsonApi.meta.lastLogin) : void 0;
|
|
4849
5644
|
this._relevance = data.jsonApi.meta.relevance;
|
|
4850
5645
|
this._roles = this._readIncluded(data, "roles", Modules.Role);
|
|
@@ -4892,7 +5687,7 @@ var User = (_class11 = class extends AbstractApiData {constructor(...args9) { su
|
|
|
4892
5687
|
}
|
|
4893
5688
|
return response;
|
|
4894
5689
|
}
|
|
4895
|
-
},
|
|
5690
|
+
}, _class19);
|
|
4896
5691
|
|
|
4897
5692
|
// src/features/user/data/user.fields.ts
|
|
4898
5693
|
var UserFields = /* @__PURE__ */ ((UserFields2) => {
|
|
@@ -4961,8 +5756,8 @@ var UserService = class extends AbstractService {
|
|
|
4961
5756
|
id: params.id,
|
|
4962
5757
|
childEndpoint: "user-relevance"
|
|
4963
5758
|
});
|
|
4964
|
-
if (_optionalChain([Modules, 'access',
|
|
4965
|
-
if (_optionalChain([Modules, 'access',
|
|
5759
|
+
if (_optionalChain([Modules, 'access', _116 => _116.User, 'access', _117 => _117.inclusions, 'optionalAccess', _118 => _118.lists, 'optionalAccess', _119 => _119.fields])) endpoint.limitToFields(Modules.User.inclusions.lists.fields);
|
|
5760
|
+
if (_optionalChain([Modules, 'access', _120 => _120.User, 'access', _121 => _121.inclusions, 'optionalAccess', _122 => _122.lists, 'optionalAccess', _123 => _123.types])) endpoint.limitToType(Modules.User.inclusions.lists.types);
|
|
4966
5761
|
return this.callApi({
|
|
4967
5762
|
type: Modules.User,
|
|
4968
5763
|
method: "GET" /* GET */,
|
|
@@ -5111,18 +5906,18 @@ var UserModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory)
|
|
|
5111
5906
|
}), "UserModule");
|
|
5112
5907
|
|
|
5113
5908
|
// src/features/oauth/data/oauth.ts
|
|
5114
|
-
var OAuthClient = (
|
|
5909
|
+
var OAuthClient = (_class20 = class extends AbstractApiData {constructor(...args18) { super(...args18); _class20.prototype.__init44.call(this);_class20.prototype.__init45.call(this);_class20.prototype.__init46.call(this);_class20.prototype.__init47.call(this);_class20.prototype.__init48.call(this); }
|
|
5115
5910
|
static {
|
|
5116
5911
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "OAuthClient");
|
|
5117
5912
|
}
|
|
5118
5913
|
|
|
5119
5914
|
|
|
5120
5915
|
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5916
|
+
__init44() {this._redirectUris = []}
|
|
5917
|
+
__init45() {this._allowedScopes = []}
|
|
5918
|
+
__init46() {this._allowedGrantTypes = []}
|
|
5919
|
+
__init47() {this._isConfidential = true}
|
|
5920
|
+
__init48() {this._isActive = true}
|
|
5126
5921
|
get clientId() {
|
|
5127
5922
|
return _nullishCoalesce(this._clientId, () => ( this.id));
|
|
5128
5923
|
}
|
|
@@ -5178,7 +5973,7 @@ var OAuthClient = (_class12 = class extends AbstractApiData {constructor(...args
|
|
|
5178
5973
|
if (data.isActive !== void 0) response.data.attributes.isActive = data.isActive;
|
|
5179
5974
|
return response;
|
|
5180
5975
|
}
|
|
5181
|
-
},
|
|
5976
|
+
}, _class20);
|
|
5182
5977
|
|
|
5183
5978
|
// src/features/oauth/oauth.module.ts
|
|
5184
5979
|
var OAuthModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
@@ -5203,7 +5998,7 @@ var OAuthService = class extends AbstractService {
|
|
|
5203
5998
|
type: Modules.OAuth,
|
|
5204
5999
|
method: "GET" /* GET */,
|
|
5205
6000
|
endpoint: new EndpointCreator({ endpoint: "oauth/clients" }).generate(),
|
|
5206
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
6001
|
+
next: _optionalChain([params, 'optionalAccess', _124 => _124.next])
|
|
5207
6002
|
});
|
|
5208
6003
|
}
|
|
5209
6004
|
/**
|
|
@@ -5229,7 +6024,7 @@ var OAuthService = class extends AbstractService {
|
|
|
5229
6024
|
});
|
|
5230
6025
|
return {
|
|
5231
6026
|
client: result.data,
|
|
5232
|
-
clientSecret: _optionalChain([result, 'access',
|
|
6027
|
+
clientSecret: _optionalChain([result, 'access', _125 => _125.meta, 'optionalAccess', _126 => _126.clientSecret])
|
|
5233
6028
|
};
|
|
5234
6029
|
}
|
|
5235
6030
|
/**
|
|
@@ -5268,7 +6063,7 @@ var OAuthService = class extends AbstractService {
|
|
|
5268
6063
|
}).generate()
|
|
5269
6064
|
});
|
|
5270
6065
|
return {
|
|
5271
|
-
clientSecret: _optionalChain([result, 'access',
|
|
6066
|
+
clientSecret: _optionalChain([result, 'access', _127 => _127.meta, 'optionalAccess', _128 => _128.clientSecret])
|
|
5272
6067
|
};
|
|
5273
6068
|
}
|
|
5274
6069
|
// ==========================================
|
|
@@ -5312,7 +6107,7 @@ var OAuthService = class extends AbstractService {
|
|
|
5312
6107
|
overridesJsonApiCreation: true
|
|
5313
6108
|
});
|
|
5314
6109
|
return {
|
|
5315
|
-
redirectUrl: _optionalChain([result, 'access',
|
|
6110
|
+
redirectUrl: _optionalChain([result, 'access', _129 => _129.meta, 'optionalAccess', _130 => _130.redirectUrl])
|
|
5316
6111
|
};
|
|
5317
6112
|
}
|
|
5318
6113
|
/**
|
|
@@ -5332,7 +6127,7 @@ var OAuthService = class extends AbstractService {
|
|
|
5332
6127
|
overridesJsonApiCreation: true
|
|
5333
6128
|
});
|
|
5334
6129
|
return {
|
|
5335
|
-
redirectUrl: _optionalChain([result, 'access',
|
|
6130
|
+
redirectUrl: _optionalChain([result, 'access', _131 => _131.meta, 'optionalAccess', _132 => _132.redirectUrl])
|
|
5336
6131
|
};
|
|
5337
6132
|
}
|
|
5338
6133
|
};
|
|
@@ -5392,17 +6187,17 @@ var AVAILABLE_OAUTH_SCOPES = Object.values(OAUTH_SCOPE_DISPLAY);
|
|
|
5392
6187
|
var DEFAULT_GRANT_TYPES = ["authorization_code", "refresh_token"];
|
|
5393
6188
|
|
|
5394
6189
|
// src/features/waitlist/data/Waitlist.ts
|
|
5395
|
-
var Waitlist = (
|
|
6190
|
+
var Waitlist = (_class21 = class extends AbstractApiData {constructor(...args19) { super(...args19); _class21.prototype.__init49.call(this);_class21.prototype.__init50.call(this); }
|
|
5396
6191
|
static {
|
|
5397
6192
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "Waitlist");
|
|
5398
6193
|
}
|
|
5399
6194
|
|
|
5400
|
-
|
|
6195
|
+
__init49() {this._gdprConsent = false}
|
|
5401
6196
|
|
|
5402
6197
|
|
|
5403
6198
|
|
|
5404
6199
|
|
|
5405
|
-
|
|
6200
|
+
__init50() {this._status = "pending"}
|
|
5406
6201
|
|
|
5407
6202
|
|
|
5408
6203
|
|
|
@@ -5476,7 +6271,7 @@ var Waitlist = (_class13 = class extends AbstractApiData {constructor(...args11)
|
|
|
5476
6271
|
}
|
|
5477
6272
|
return response;
|
|
5478
6273
|
}
|
|
5479
|
-
},
|
|
6274
|
+
}, _class21);
|
|
5480
6275
|
|
|
5481
6276
|
// src/features/waitlist/data/WaitlistService.ts
|
|
5482
6277
|
var WaitlistService = class extends AbstractService {
|
|
@@ -5516,15 +6311,15 @@ var WaitlistService = class extends AbstractService {
|
|
|
5516
6311
|
*/
|
|
5517
6312
|
static async findMany(params) {
|
|
5518
6313
|
const endpoint = new EndpointCreator({ endpoint: Modules.Waitlist });
|
|
5519
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
5520
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
5521
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
6314
|
+
if (_optionalChain([params, 'optionalAccess', _133 => _133.status])) endpoint.addAdditionalParam("status", params.status);
|
|
6315
|
+
if (_optionalChain([params, 'optionalAccess', _134 => _134.search])) endpoint.addAdditionalParam("search", params.search);
|
|
6316
|
+
if (_optionalChain([params, 'optionalAccess', _135 => _135.fetchAll])) endpoint.addAdditionalParam("fetchAll", "true");
|
|
5522
6317
|
return this.callApi({
|
|
5523
6318
|
type: Modules.Waitlist,
|
|
5524
6319
|
method: "GET" /* GET */,
|
|
5525
6320
|
endpoint: endpoint.generate(),
|
|
5526
|
-
next: _optionalChain([params, 'optionalAccess',
|
|
5527
|
-
previous: _optionalChain([params, 'optionalAccess',
|
|
6321
|
+
next: _optionalChain([params, 'optionalAccess', _136 => _136.next]),
|
|
6322
|
+
previous: _optionalChain([params, 'optionalAccess', _137 => _137.prev])
|
|
5528
6323
|
});
|
|
5529
6324
|
}
|
|
5530
6325
|
/**
|
|
@@ -5581,43 +6376,38 @@ var WaitlistService = class extends AbstractService {
|
|
|
5581
6376
|
* Validate invite code (public) - calls auth endpoint
|
|
5582
6377
|
*/
|
|
5583
6378
|
static async validateInvite(code) {
|
|
5584
|
-
console.log("[WaitlistService.validateInvite] Starting validation for code:", code);
|
|
5585
6379
|
try {
|
|
5586
6380
|
const endpoint = new EndpointCreator({
|
|
5587
6381
|
endpoint: Modules.Waitlist,
|
|
5588
6382
|
childEndpoint: "invite",
|
|
5589
6383
|
childId: code
|
|
5590
6384
|
});
|
|
5591
|
-
console.log("[WaitlistService.validateInvite] Calling endpoint:", endpoint.generate());
|
|
5592
6385
|
const response = await this.callApiWithMeta({
|
|
5593
6386
|
type: Modules.Auth,
|
|
5594
6387
|
method: "GET" /* GET */,
|
|
5595
6388
|
endpoint: endpoint.generate()
|
|
5596
6389
|
});
|
|
5597
|
-
|
|
5598
|
-
const attributes = _optionalChain([response, 'access', _127 => _127.data, 'optionalAccess', _128 => _128._jsonApi, 'optionalAccess', _129 => _129.attributes]);
|
|
5599
|
-
console.log("[WaitlistService.validateInvite] Parsed attributes:", JSON.stringify(attributes));
|
|
6390
|
+
const attributes = _optionalChain([response, 'access', _138 => _138.data, 'optionalAccess', _139 => _139._jsonApi, 'optionalAccess', _140 => _140.attributes]);
|
|
5600
6391
|
return {
|
|
5601
|
-
email: _optionalChain([attributes, 'optionalAccess',
|
|
5602
|
-
valid: _nullishCoalesce(_optionalChain([attributes, 'optionalAccess',
|
|
6392
|
+
email: _optionalChain([attributes, 'optionalAccess', _141 => _141.email]),
|
|
6393
|
+
valid: _nullishCoalesce(_optionalChain([attributes, 'optionalAccess', _142 => _142.valid]), () => ( false))
|
|
5603
6394
|
};
|
|
5604
|
-
} catch (
|
|
5605
|
-
console.error("[WaitlistService.validateInvite] Error:", error);
|
|
6395
|
+
} catch (_error) {
|
|
5606
6396
|
return null;
|
|
5607
6397
|
}
|
|
5608
6398
|
}
|
|
5609
6399
|
};
|
|
5610
6400
|
|
|
5611
6401
|
// src/features/waitlist/data/waitlist-stats.ts
|
|
5612
|
-
var WaitlistStats = (
|
|
6402
|
+
var WaitlistStats = (_class22 = class extends AbstractApiData {constructor(...args20) { super(...args20); _class22.prototype.__init51.call(this);_class22.prototype.__init52.call(this);_class22.prototype.__init53.call(this);_class22.prototype.__init54.call(this);_class22.prototype.__init55.call(this); }
|
|
5613
6403
|
static {
|
|
5614
6404
|
_chunk7QVYU63Ejs.__name.call(void 0, this, "WaitlistStats");
|
|
5615
6405
|
}
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
6406
|
+
__init51() {this._pending = 0}
|
|
6407
|
+
__init52() {this._confirmed = 0}
|
|
6408
|
+
__init53() {this._invited = 0}
|
|
6409
|
+
__init54() {this._registered = 0}
|
|
6410
|
+
__init55() {this._total = 0}
|
|
5621
6411
|
get pending() {
|
|
5622
6412
|
return this._pending;
|
|
5623
6413
|
}
|
|
@@ -5646,7 +6436,7 @@ var WaitlistStats = (_class14 = class extends AbstractApiData {constructor(...ar
|
|
|
5646
6436
|
createJsonApi(_data) {
|
|
5647
6437
|
throw new Error("WaitlistStats is read-only and cannot be created");
|
|
5648
6438
|
}
|
|
5649
|
-
},
|
|
6439
|
+
}, _class22);
|
|
5650
6440
|
|
|
5651
6441
|
// src/features/waitlist/waitlist.module.ts
|
|
5652
6442
|
var WaitlistModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
@@ -5658,6 +6448,7 @@ var WaitlistModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (facto
|
|
|
5658
6448
|
// src/features/waitlist/waitlist-stats.module.ts
|
|
5659
6449
|
var WaitlistStatsModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (factory) => factory({
|
|
5660
6450
|
name: "waitlist-stats",
|
|
6451
|
+
pageUrl: "/waitlist-stats",
|
|
5661
6452
|
model: WaitlistStats
|
|
5662
6453
|
}), "WaitlistStatsModule");
|
|
5663
6454
|
|
|
@@ -5794,5 +6585,34 @@ var WaitlistStatsModule = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
|
|
|
5794
6585
|
|
|
5795
6586
|
|
|
5796
6587
|
|
|
5797
|
-
|
|
5798
|
-
|
|
6588
|
+
|
|
6589
|
+
|
|
6590
|
+
|
|
6591
|
+
|
|
6592
|
+
|
|
6593
|
+
|
|
6594
|
+
|
|
6595
|
+
|
|
6596
|
+
|
|
6597
|
+
|
|
6598
|
+
|
|
6599
|
+
|
|
6600
|
+
|
|
6601
|
+
|
|
6602
|
+
|
|
6603
|
+
|
|
6604
|
+
|
|
6605
|
+
|
|
6606
|
+
|
|
6607
|
+
|
|
6608
|
+
|
|
6609
|
+
|
|
6610
|
+
|
|
6611
|
+
|
|
6612
|
+
|
|
6613
|
+
|
|
6614
|
+
|
|
6615
|
+
|
|
6616
|
+
|
|
6617
|
+
exports.RehydrationFactory = RehydrationFactory; exports.AbstractApiData = AbstractApiData; exports.HttpMethod = HttpMethod; exports.getLastApiTotal = getLastApiTotal; exports.clearLastApiTotal = clearLastApiTotal; exports.setGlobalErrorHandler = setGlobalErrorHandler; exports.getGlobalErrorHandler = getGlobalErrorHandler; exports.AbstractService = AbstractService; exports.configureClientJsonApi = configureClientJsonApi; exports.getClientApiUrl = getClientApiUrl; exports.getClientAppUrl = getClientAppUrl; exports.getClientTrackablePages = getClientTrackablePages; exports.ClientJsonApiGet = ClientJsonApiGet; exports.ClientJsonApiPost = ClientJsonApiPost; exports.ClientJsonApiPut = ClientJsonApiPut; exports.ClientJsonApiPatch = ClientJsonApiPatch; exports.ClientJsonApiDelete = ClientJsonApiDelete; exports.ClientHttpMethod = ClientHttpMethod; exports.setClientGlobalErrorHandler = setClientGlobalErrorHandler; exports.getClientGlobalErrorHandler = getClientGlobalErrorHandler; exports.ClientAbstractService = ClientAbstractService; exports.ModuleRegistrar = ModuleRegistrar; exports.ModuleRegistry = ModuleRegistry; exports.Modules = Modules; exports.EndpointCreator = EndpointCreator; exports.createJsonApiInclusion = createJsonApiInclusion; exports.rehydrate = rehydrate; exports.rehydrateList = rehydrateList; exports.cn = cn; exports.composeRefs = composeRefs; exports.useComposedRefs = useComposedRefs; exports.useIsMobile = useIsMobile; exports.formatDate = formatDate; exports.exists = exists; exports.TableOptions = TableOptions; exports.getTableOptions = getTableOptions; exports.getTableComponents = getTableComponents; exports.userObjectSchema = userObjectSchema; exports.entityObjectSchema = entityObjectSchema; exports.BlockNoteDiffUtil = BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = BlockNoteWordDiffRendererUtil; exports.getIconByModule = getIconByModule; exports.getIcon = getIcon; exports.getIconByModuleName = getIconByModuleName; exports.getLucideIcon = getLucideIcon; exports.getLucideIconByModule = getLucideIconByModule; exports.getLucideIconByModuleName = getLucideIconByModuleName; exports.showToast = showToast; exports.showError = showError; exports.dismissToast = dismissToast; exports.showCustomToast = showCustomToast; exports.Action = Action; exports.checkPermissions = checkPermissions; exports.checkPermissionsFromServer = checkPermissionsFromServer; exports.getValueFromPath = getValueFromPath; exports.TotpAuthenticator = TotpAuthenticator; exports.TotpAuthenticatorModule = TotpAuthenticatorModule; exports.TotpSetup = TotpSetup; exports.TotpSetupModule = TotpSetupModule; exports.TotpVerify = TotpVerify; exports.TotpVerifyModule = TotpVerifyModule; exports.TotpVerifyLogin = TotpVerifyLogin; exports.TotpVerifyLoginModule = TotpVerifyLoginModule; exports.Passkey = Passkey; exports.PasskeyModule = PasskeyModule; exports.PasskeyRegistrationOptions = PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = PasskeyRegistrationVerifyModule; exports.PasskeyRename = PasskeyRename; exports.PasskeyRenameModule = PasskeyRenameModule; exports.PasskeyVerifyLogin = PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = PasskeyVerifyLoginModule; exports.PasskeyAuthenticationOptions = PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = PasskeyAuthenticationOptionsModule; exports.TwoFactorEnable = TwoFactorEnable; exports.TwoFactorEnableModule = TwoFactorEnableModule; exports.TwoFactorChallenge = TwoFactorChallenge; exports.TwoFactorChallengeModule = TwoFactorChallengeModule; exports.BackupCodeVerify = BackupCodeVerify; exports.BackupCodeVerifyModule = BackupCodeVerifyModule; exports.configureAuth = configureAuth; exports.getTokenHandler = getTokenHandler; exports.Auth = Auth; exports.AuthService = AuthService; exports.TwoFactorStatus = TwoFactorStatus; exports.TwoFactorService = TwoFactorService; exports.AuthComponent = AuthComponent; exports.AuthModule = AuthModule; exports.TwoFactorStatusModule = TwoFactorStatusModule; exports.BillingService = BillingService; exports.Billing = Billing; exports.BillingModule = BillingModule; exports.PaymentMethod = PaymentMethod; exports.StripeCustomer = StripeCustomer; exports.StripeCustomerService = StripeCustomerService; exports.StripeCustomerModule = StripeCustomerModule; exports.StripePaymentMethodModule = StripePaymentMethodModule; exports.StripeInvoice = StripeInvoice; exports.InvoiceStatus = InvoiceStatus; exports.StripeInvoiceService = StripeInvoiceService; exports.StripeInvoiceModule = StripeInvoiceModule; exports.StripePrice = StripePrice; exports.StripePriceService = StripePriceService; exports.StripePriceModule = StripePriceModule; exports.StripeProduct = StripeProduct; exports.StripeProductService = StripeProductService; exports.StripeProductModule = StripeProductModule; exports.StripeSubscription = StripeSubscription; exports.SubscriptionStatus = SubscriptionStatus; exports.StripeSubscriptionService = StripeSubscriptionService; exports.StripeSubscriptionModule = StripeSubscriptionModule; exports.StripeUsage = StripeUsage; exports.StripeUsageService = StripeUsageService; exports.StripeUsageModule = StripeUsageModule; exports.StripePromotionCodeService = StripePromotionCodeService; exports.StripePromotionCode = StripePromotionCode; exports.StripePromotionCodeModule = StripePromotionCodeModule; exports.Company = Company; exports.CompanyFields = CompanyFields; exports.CompanyService = CompanyService; exports.CompanyModule = CompanyModule; exports.Content = Content; exports.ContentFields = ContentFields; exports.ContentService = ContentService; exports.ContentModule = ContentModule; exports.Feature = Feature; exports.FeatureService = FeatureService; exports.FeatureModule = FeatureModule; exports.Module = Module; exports.ModuleModule = ModuleModule; exports.Notification = Notification; exports.NotificationFields = NotificationFields; exports.NotificationService = NotificationService; exports.NotificationModule = NotificationModule; exports.Push = Push; exports.PushService = PushService; exports.PushModule = PushModule; exports.Role = Role; exports.RoleFields = RoleFields; exports.RoleService = RoleService; exports.RoleModule = RoleModule; exports.S3 = S3; exports.S3Module = S3Module; exports.S3Service = S3Service; exports.User = User; exports.UserFields = UserFields; exports.UserService = UserService; exports.AuthorModule = AuthorModule; exports.UserModule = UserModule; exports.OAuthClient = OAuthClient; exports.OAuthModule = OAuthModule; exports.OAuthService = OAuthService; exports.OAUTH_SCOPE_DISPLAY = OAUTH_SCOPE_DISPLAY; exports.AVAILABLE_OAUTH_SCOPES = AVAILABLE_OAUTH_SCOPES; exports.DEFAULT_GRANT_TYPES = DEFAULT_GRANT_TYPES; exports.Waitlist = Waitlist; exports.WaitlistService = WaitlistService; exports.WaitlistStats = WaitlistStats; exports.WaitlistModule = WaitlistModule; exports.WaitlistStatsModule = WaitlistStatsModule;
|
|
6618
|
+
//# sourceMappingURL=chunk-L5F5ZN5F.js.map
|