@carlonicora/nextjs-jsonapi 1.40.1 → 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.
Files changed (165) hide show
  1. package/README.md +3 -3
  2. package/dist/AuthComponent-BuWc2C4g.d.ts +28 -0
  3. package/dist/AuthComponent-fLVGdvSr.d.mts +28 -0
  4. package/dist/{BlockNoteEditor-EKY4AHVK.mjs → BlockNoteEditor-B3RQ4VQ7.mjs} +5 -5
  5. package/dist/{BlockNoteEditor-4G3L3LSF.js → BlockNoteEditor-VUAWVZF4.js} +15 -15
  6. package/dist/{BlockNoteEditor-4G3L3LSF.js.map → BlockNoteEditor-VUAWVZF4.js.map} +1 -1
  7. package/dist/JsonApiRequest-MUPAO7DI.js +24 -0
  8. package/dist/{JsonApiRequest-GR3L56A5.js.map → JsonApiRequest-MUPAO7DI.js.map} +1 -1
  9. package/dist/{JsonApiRequest-K5BRU7RE.mjs → JsonApiRequest-XCQHVVYD.mjs} +2 -2
  10. package/dist/auth.interface-8XglqHir.d.mts +33 -0
  11. package/dist/auth.interface-BJGKQ0zr.d.ts +33 -0
  12. package/dist/billing/index.js +409 -415
  13. package/dist/billing/index.js.map +1 -1
  14. package/dist/billing/index.mjs +4 -10
  15. package/dist/billing/index.mjs.map +1 -1
  16. package/dist/{chunk-BAOP6PTD.mjs → chunk-BJNQZGMN.mjs} +1618 -666
  17. package/dist/chunk-BJNQZGMN.mjs.map +1 -0
  18. package/dist/{chunk-U4MTVHOC.mjs → chunk-GCQUTWZ2.mjs} +11 -4
  19. package/dist/{chunk-U4MTVHOC.mjs.map → chunk-GCQUTWZ2.mjs.map} +1 -1
  20. package/dist/{chunk-ZNGEVB5M.js → chunk-L5F5ZN5F.js} +960 -140
  21. package/dist/chunk-L5F5ZN5F.js.map +1 -0
  22. package/dist/{chunk-RRIYLEY6.mjs → chunk-LBIC4GJK.mjs} +2 -2
  23. package/dist/{chunk-T5YYOT4Z.js → chunk-OODZEX6P.js} +3 -3
  24. package/dist/{chunk-T5YYOT4Z.js.map → chunk-OODZEX6P.js.map} +1 -1
  25. package/dist/{chunk-GVN7XC3U.mjs → chunk-PHNL4QUF.mjs} +835 -15
  26. package/dist/chunk-PHNL4QUF.mjs.map +1 -0
  27. package/dist/{chunk-GKY5DAIH.js → chunk-QPWHMXE2.js} +1505 -553
  28. package/dist/chunk-QPWHMXE2.js.map +1 -0
  29. package/dist/{chunk-FM6WRAN5.js → chunk-WLS4D6VG.js} +12 -5
  30. package/dist/chunk-WLS4D6VG.js.map +1 -0
  31. package/dist/client/index.d.mts +4 -4
  32. package/dist/client/index.d.ts +4 -4
  33. package/dist/client/index.js +5 -5
  34. package/dist/client/index.mjs +4 -4
  35. package/dist/components/index.d.mts +69 -8
  36. package/dist/components/index.d.ts +69 -8
  37. package/dist/components/index.js +27 -5
  38. package/dist/components/index.js.map +1 -1
  39. package/dist/components/index.mjs +26 -4
  40. package/dist/{config-BxwhHdCD.d.mts → config-BW5u1e9P.d.mts} +1 -1
  41. package/dist/{config-BbaBV_yk.d.ts → config-BozK5PY0.d.ts} +1 -1
  42. package/dist/{content.interface-CgUu4771.d.ts → content.interface-CpCDB1Uk.d.ts} +1 -1
  43. package/dist/{content.interface-CWV0q4lZ.d.mts → content.interface-b-mzkL_q.d.mts} +1 -1
  44. package/dist/contexts/index.d.mts +2 -2
  45. package/dist/contexts/index.d.ts +2 -2
  46. package/dist/contexts/index.js +5 -5
  47. package/dist/contexts/index.mjs +4 -4
  48. package/dist/core/index.d.mts +407 -7
  49. package/dist/core/index.d.ts +407 -7
  50. package/dist/core/index.js +61 -3
  51. package/dist/core/index.js.map +1 -1
  52. package/dist/core/index.mjs +60 -2
  53. package/dist/index.d.mts +8 -6
  54. package/dist/index.d.ts +8 -6
  55. package/dist/index.js +62 -4
  56. package/dist/index.js.map +1 -1
  57. package/dist/index.mjs +61 -3
  58. package/dist/{notification.interface-XARGKJAq.d.ts → notification.interface-CR2PuV6Y.d.ts} +1 -0
  59. package/dist/{notification.interface-DIln2r7X.d.mts → notification.interface-D241WNUx.d.mts} +1 -0
  60. package/dist/{s3.service-BoOF5-ln.d.mts → s3.service-D0rbmLFp.d.mts} +10 -31
  61. package/dist/{s3.service-Mxo-7wQ6.d.ts → s3.service-DOwqcUDT.d.ts} +10 -31
  62. package/dist/scripts/generate-web-module/generator.js +26 -26
  63. package/dist/scripts/generate-web-module/generator.js.map +1 -1
  64. package/dist/scripts/generate-web-module/utils/file-writer.js +9 -9
  65. package/dist/scripts/generate-web-module/utils/file-writer.js.map +1 -1
  66. package/dist/server/index.d.mts +4 -3
  67. package/dist/server/index.d.ts +4 -3
  68. package/dist/server/index.js +12 -12
  69. package/dist/server/index.mjs +2 -2
  70. package/dist/{useSocket-awibcC9B.d.ts → useSocket-CC8SkXdm.d.ts} +1 -1
  71. package/dist/{useSocket-BILAdmZ0.d.mts → useSocket-CttIHn2P.d.mts} +1 -1
  72. package/package.json +4 -1
  73. package/scripts/generate-web-module/generator.ts +26 -26
  74. package/scripts/generate-web-module/utils/file-writer.ts +9 -9
  75. package/src/components/pages/PageContentContainer.tsx +22 -9
  76. package/src/core/abstracts/AbstractService.ts +2 -0
  77. package/src/core/factories/JsonApiDataFactory.ts +2 -1
  78. package/src/core/index.ts +14 -0
  79. package/src/core/registry/DataClassRegistry.ts +7 -1
  80. package/src/core/registry/ModuleRegistry.ts +15 -0
  81. package/src/features/auth/backup-code-verify.module.ts +9 -0
  82. package/src/features/auth/components/containers/SecurityContainer.tsx +11 -0
  83. package/src/features/auth/components/containers/index.ts +1 -0
  84. package/src/features/auth/components/forms/Login.tsx +15 -3
  85. package/src/features/auth/components/forms/Register.tsx +1 -9
  86. package/src/features/auth/components/forms/TwoFactorChallenge.tsx +202 -0
  87. package/src/features/auth/components/forms/index.ts +1 -0
  88. package/src/features/auth/components/index.ts +1 -0
  89. package/src/features/auth/components/two-factor/BackupCodesDialog.tsx +148 -0
  90. package/src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx +74 -0
  91. package/src/features/auth/components/two-factor/PasskeyButton.tsx +59 -0
  92. package/src/features/auth/components/two-factor/PasskeyList.tsx +172 -0
  93. package/src/features/auth/components/two-factor/PasskeySetupDialog.tsx +105 -0
  94. package/src/features/auth/components/two-factor/TotpAuthenticatorList.tsx +104 -0
  95. package/src/features/auth/components/two-factor/TotpInput.tsx +90 -0
  96. package/src/features/auth/components/two-factor/TotpSetupDialog.tsx +161 -0
  97. package/src/features/auth/components/two-factor/TwoFactorSettings.tsx +175 -0
  98. package/src/features/auth/components/two-factor/index.ts +9 -0
  99. package/src/features/auth/contexts/AuthContext.tsx +9 -0
  100. package/src/features/auth/data/auth.service.ts +18 -1
  101. package/src/features/auth/data/backup-code-verify.ts +20 -0
  102. package/src/features/auth/data/index.ts +21 -0
  103. package/src/features/auth/data/passkey-authentication-options.interface.ts +7 -0
  104. package/src/features/auth/data/passkey-authentication-options.ts +37 -0
  105. package/src/features/auth/data/passkey-registration-options.ts +46 -0
  106. package/src/features/auth/data/passkey-registration-verify.ts +62 -0
  107. package/src/features/auth/data/passkey-rename.ts +20 -0
  108. package/src/features/auth/data/passkey-verify-login.ts +23 -0
  109. package/src/features/auth/data/passkey.interface.ts +9 -0
  110. package/src/features/auth/data/passkey.ts +40 -0
  111. package/src/features/auth/data/totp-authenticator.interface.ts +7 -0
  112. package/src/features/auth/data/totp-authenticator.ts +28 -0
  113. package/src/features/auth/data/totp-setup.interface.ts +5 -0
  114. package/src/features/auth/data/totp-setup.ts +48 -0
  115. package/src/features/auth/data/totp-verify-login.ts +20 -0
  116. package/src/features/auth/data/totp-verify.ts +22 -0
  117. package/src/features/auth/data/two-factor-challenge.interface.ts +7 -0
  118. package/src/features/auth/data/two-factor-challenge.ts +45 -0
  119. package/src/features/auth/data/two-factor-enable.ts +20 -0
  120. package/src/features/auth/data/two-factor-status.interface.ts +11 -0
  121. package/src/features/auth/data/two-factor-status.ts +40 -0
  122. package/src/features/auth/data/two-factor.service.ts +331 -0
  123. package/src/features/auth/enums/AuthComponent.ts +1 -0
  124. package/src/features/auth/index.ts +13 -0
  125. package/src/features/auth/passkey-authentication-options.module.ts +9 -0
  126. package/src/features/auth/passkey-registration-options.module.ts +9 -0
  127. package/src/features/auth/passkey-registration-verify.module.ts +9 -0
  128. package/src/features/auth/passkey-rename.module.ts +9 -0
  129. package/src/features/auth/passkey-verify-login.module.ts +9 -0
  130. package/src/features/auth/passkey.module.ts +9 -0
  131. package/src/features/auth/totp-authenticator.module.ts +9 -0
  132. package/src/features/auth/totp-setup.module.ts +9 -0
  133. package/src/features/auth/totp-verify-login.module.ts +9 -0
  134. package/src/features/auth/totp-verify.module.ts +9 -0
  135. package/src/features/auth/two-factor-challenge.module.ts +9 -0
  136. package/src/features/auth/two-factor-enable.module.ts +9 -0
  137. package/src/features/auth/two-factor-status.module.ts +9 -0
  138. package/src/features/billing/modules/billing.module.ts +1 -0
  139. package/src/features/billing/stripe-customer/stripe-customer.module.ts +1 -0
  140. package/src/features/billing/stripe-customer/stripe-payment-method.module.ts +1 -0
  141. package/src/features/billing/stripe-invoice/stripe-invoice.module.ts +1 -0
  142. package/src/features/billing/stripe-price/stripe-price.module.ts +1 -0
  143. package/src/features/billing/stripe-product/stripe-product.module.ts +1 -0
  144. package/src/features/billing/stripe-promotion-code/stripe-promotion-code.module.ts +1 -0
  145. package/src/features/billing/stripe-subscription/data/stripe-subscription.ts +0 -5
  146. package/src/features/billing/stripe-subscription/hooks/useSubscriptionWizard.ts +0 -8
  147. package/src/features/billing/stripe-subscription/stripe-subscription.module.ts +1 -0
  148. package/src/features/billing/stripe-usage/stripe-usage.module.ts +1 -0
  149. package/src/features/user/data/user.interface.ts +1 -0
  150. package/src/features/user/data/user.ts +6 -0
  151. package/src/features/waitlist/data/WaitlistService.ts +1 -8
  152. package/src/features/waitlist/waitlist-stats.module.ts +1 -0
  153. package/src/shadcnui/ui/resizable.tsx +33 -11
  154. package/src/unified/JsonApiRequest.ts +2 -1
  155. package/dist/AuthComponent-hxOPs9o8.d.mts +0 -11
  156. package/dist/AuthComponent-hxOPs9o8.d.ts +0 -11
  157. package/dist/JsonApiRequest-GR3L56A5.js +0 -24
  158. package/dist/chunk-BAOP6PTD.mjs.map +0 -1
  159. package/dist/chunk-FM6WRAN5.js.map +0 -1
  160. package/dist/chunk-GKY5DAIH.js.map +0 -1
  161. package/dist/chunk-GVN7XC3U.mjs.map +0 -1
  162. package/dist/chunk-ZNGEVB5M.js.map +0 -1
  163. /package/dist/{BlockNoteEditor-EKY4AHVK.mjs.map → BlockNoteEditor-B3RQ4VQ7.mjs.map} +0 -0
  164. /package/dist/{JsonApiRequest-K5BRU7RE.mjs.map → JsonApiRequest-XCQHVVYD.mjs.map} +0 -0
  165. /package/dist/{chunk-RRIYLEY6.mjs.map → chunk-LBIC4GJK.mjs.map} +0 -0
@@ -14,7 +14,7 @@ import {
14
14
  setBootstrapper,
15
15
  translateResponse,
16
16
  tryBootstrap
17
- } from "./chunk-U4MTVHOC.mjs";
17
+ } from "./chunk-GCQUTWZ2.mjs";
18
18
  import {
19
19
  __name
20
20
  } from "./chunk-PAWJFY3S.mjs";
@@ -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 import("./JsonApiRequest-K5BRU7RE.mjs");
286
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-XCQHVVYD.mjs");
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 import("./JsonApiRequest-K5BRU7RE.mjs");
376
+ const { JsonApiGet: JsonApiGet2, JsonApiPost: JsonApiPost2, JsonApiPut, JsonApiPatch, JsonApiDelete: JsonApiDelete2 } = await import("./JsonApiRequest-XCQHVVYD.mjs");
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 import("./JsonApiRequest-K5BRU7RE.mjs");
461
+ const { JsonApiGet: JsonApiGet2 } = await import("./JsonApiRequest-XCQHVVYD.mjs");
461
462
  let language = "en";
462
463
  if (typeof window === "undefined") {
463
464
  const { getLocale } = await import("next-intl/server");
@@ -2236,6 +2237,456 @@ function getValueFromPath(obj, path, userId) {
2236
2237
  }
2237
2238
  __name(getValueFromPath, "getValueFromPath");
2238
2239
 
2240
+ // src/features/auth/data/totp-authenticator.ts
2241
+ var TotpAuthenticator = class extends AbstractApiData {
2242
+ static {
2243
+ __name(this, "TotpAuthenticator");
2244
+ }
2245
+ _name = "";
2246
+ _verified = false;
2247
+ _lastUsedAt;
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 = data.jsonApi.attributes.name ?? "";
2260
+ this._verified = 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
+ };
2265
+
2266
+ // src/features/auth/totp-authenticator.module.ts
2267
+ var TotpAuthenticatorModule = /* @__PURE__ */ __name((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 = class extends AbstractApiData {
2275
+ static {
2276
+ __name(this, "TotpSetup");
2277
+ }
2278
+ _qrCodeUri = "";
2279
+ _secret = "";
2280
+ _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 = data.jsonApi.attributes.qrCodeUri ?? "";
2293
+ this._secret = data.jsonApi.attributes.secret ?? "";
2294
+ this._authenticatorId = 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
+ };
2310
+
2311
+ // src/features/auth/totp-setup.module.ts
2312
+ var TotpSetupModule = /* @__PURE__ */ __name((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
+ __name(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__ */ __name((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
+ __name(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__ */ __name((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 = class extends AbstractApiData {
2371
+ static {
2372
+ __name(this, "Passkey");
2373
+ }
2374
+ _name = "";
2375
+ _credentialId = "";
2376
+ _deviceType = "";
2377
+ _backedUp = false;
2378
+ _lastUsedAt;
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 = data.jsonApi.attributes.name ?? "";
2397
+ this._credentialId = data.jsonApi.attributes.credentialId ?? "";
2398
+ this._deviceType = data.jsonApi.attributes.deviceType ?? "";
2399
+ this._backedUp = 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
+ };
2404
+
2405
+ // src/features/auth/passkey.module.ts
2406
+ var PasskeyModule = /* @__PURE__ */ __name((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 = class extends AbstractApiData {
2414
+ static {
2415
+ __name(this, "PasskeyRegistrationOptions");
2416
+ }
2417
+ _pendingId = "";
2418
+ _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 = data.jsonApi.attributes.pendingId ?? this.id;
2428
+ this._options = 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
+ };
2444
+
2445
+ // src/features/auth/passkey-registration-options.module.ts
2446
+ var PasskeyRegistrationOptionsModule = /* @__PURE__ */ __name((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 = class extends AbstractApiData {
2454
+ static {
2455
+ __name(this, "PasskeyRegistrationVerify");
2456
+ }
2457
+ _name = "";
2458
+ _credentialId = "";
2459
+ _deviceType = "";
2460
+ _backedUp = false;
2461
+ _lastUsedAt;
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 = data.jsonApi.attributes.name ?? "";
2480
+ this._credentialId = data.jsonApi.attributes.credentialId ?? "";
2481
+ this._deviceType = data.jsonApi.attributes.deviceType ?? "";
2482
+ this._backedUp = 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
+ };
2500
+
2501
+ // src/features/auth/passkey-registration-verify.module.ts
2502
+ var PasskeyRegistrationVerifyModule = /* @__PURE__ */ __name((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
+ __name(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__ */ __name((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
+ __name(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__ */ __name((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 = class extends AbstractApiData {
2561
+ static {
2562
+ __name(this, "PasskeyAuthenticationOptions");
2563
+ }
2564
+ _pendingId = "";
2565
+ _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 = data.jsonApi.attributes.pendingId ?? this.id ?? "";
2575
+ this._options = 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
+ };
2588
+
2589
+ // src/features/auth/passkey-authentication-options.module.ts
2590
+ var PasskeyAuthenticationOptionsModule = /* @__PURE__ */ __name((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
+ __name(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__ */ __name((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 = class extends AbstractApiData {
2623
+ static {
2624
+ __name(this, "TwoFactorChallenge");
2625
+ }
2626
+ _pendingToken = "";
2627
+ _availableMethods = [];
2628
+ _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 = data.jsonApi.attributes.pendingToken ?? "";
2641
+ this._availableMethods = 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
+ };
2657
+
2658
+ // src/features/auth/two-factor-challenge.module.ts
2659
+ var TwoFactorChallengeModule = /* @__PURE__ */ __name((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
+ __name(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__ */ __name((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) {
@@ -2308,6 +2759,13 @@ var AuthService = class extends AbstractService {
2308
2759
  language
2309
2760
  });
2310
2761
  if (!apiResponse.ok) throw new Error(apiResponse.error);
2762
+ if (apiResponse.raw?.data?.type === "two-factor-challenge") {
2763
+ const challenge = rehydrate(Modules.TwoFactorChallenge, {
2764
+ jsonApi: apiResponse.raw.data,
2765
+ included: apiResponse.raw.included ?? []
2766
+ });
2767
+ return challenge;
2768
+ }
2311
2769
  const auth = apiResponse.data;
2312
2770
  const handler = getTokenHandler();
2313
2771
  if (handler) {
@@ -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 = class extends AbstractApiData {
2888
+ static {
2889
+ __name(this, "TwoFactorStatus");
2890
+ }
2891
+ _isEnabled = false;
2892
+ _preferredMethod;
2893
+ _totpAuthenticators = [];
2894
+ _passkeys = [];
2895
+ _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 = data.jsonApi.attributes.isEnabled ?? false;
2914
+ this._preferredMethod = data.jsonApi.attributes.preferredMethod;
2915
+ this._backupCodesCount = data.jsonApi.attributes.backupCodesCount ?? 0;
2916
+ return this;
2917
+ }
2918
+ };
2919
+
2920
+ // src/features/auth/data/two-factor.service.ts
2921
+ var TwoFactorService = class extends AbstractService {
2922
+ static {
2923
+ __name(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: auth.user.company?.id,
3113
+ roles: auth.user.roles.map((role) => role.id),
3114
+ features: auth.user.company?.features?.map((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__ */ __name((factory) => factory({
2444
3221
  model: Auth
2445
3222
  }), "AuthModule");
2446
3223
 
3224
+ // src/features/auth/two-factor-status.module.ts
3225
+ var TwoFactorStatusModule = /* @__PURE__ */ __name((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 {
@@ -2505,6 +3289,7 @@ var Billing = class extends AbstractApiData {
2505
3289
  // src/features/billing/modules/billing.module.ts
2506
3290
  var BillingModule = /* @__PURE__ */ __name((factory) => factory({
2507
3291
  name: "billing",
3292
+ pageUrl: "/billing",
2508
3293
  model: Billing,
2509
3294
  moduleId: "3266b307-5a9a-46f9-b78d-631f672f8735"
2510
3295
  }), "BillingModule");
@@ -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__ */ __name((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,6 +3527,7 @@ var StripeCustomerModule = /* @__PURE__ */ __name((factory) => factory({
2741
3527
  // src/features/billing/stripe-customer/stripe-payment-method.module.ts
2742
3528
  var StripePaymentMethodModule = /* @__PURE__ */ __name((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");
@@ -2954,6 +3741,7 @@ var StripeInvoiceService = class extends AbstractService {
2954
3741
  // src/features/billing/stripe-invoice/stripe-invoice.module.ts
2955
3742
  var StripeInvoiceModule = /* @__PURE__ */ __name((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");
@@ -3218,6 +4006,7 @@ var StripePriceService = class extends AbstractService {
3218
4006
  // src/features/billing/stripe-price/stripe-price.module.ts
3219
4007
  var StripePriceModule = /* @__PURE__ */ __name((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");
@@ -3380,6 +4169,7 @@ var StripeProductService = class extends AbstractService {
3380
4169
  // src/features/billing/stripe-product/stripe-product.module.ts
3381
4170
  var StripeProductModule = /* @__PURE__ */ __name((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");
@@ -3443,8 +4233,6 @@ var StripeSubscription = class extends AbstractApiData {
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,7 +4271,6 @@ var StripeSubscription = class extends AbstractApiData {
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
  };
@@ -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__ */ __name((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");
@@ -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__ */ __name((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");
@@ -3941,6 +4730,7 @@ var StripePromotionCode = class extends AbstractApiData {
3941
4730
  // src/features/billing/stripe-promotion-code/stripe-promotion-code.module.ts
3942
4731
  var StripePromotionCodeModule = /* @__PURE__ */ __name((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");
@@ -4780,6 +5570,7 @@ var User = class extends AbstractApiData {
4780
5570
  _rate;
4781
5571
  _isActivated;
4782
5572
  _isDeleted;
5573
+ _twoFactorEnabled = false;
4783
5574
  _lastLogin;
4784
5575
  _relevance;
4785
5576
  _roles = [];
@@ -4821,6 +5612,9 @@ var User = class extends AbstractApiData {
4821
5612
  get isDeleted() {
4822
5613
  return 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 = class extends AbstractApiData {
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 = 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);
@@ -5581,28 +6376,23 @@ 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
- console.log("[WaitlistService.validateInvite] Response:", JSON.stringify(response));
5598
6390
  const attributes = response.data?._jsonApi?.attributes;
5599
- console.log("[WaitlistService.validateInvite] Parsed attributes:", JSON.stringify(attributes));
5600
6391
  return {
5601
6392
  email: attributes?.email,
5602
6393
  valid: attributes?.valid ?? false
5603
6394
  };
5604
- } catch (error) {
5605
- console.error("[WaitlistService.validateInvite] Error:", error);
6395
+ } catch (_error) {
5606
6396
  return null;
5607
6397
  }
5608
6398
  }
@@ -5658,6 +6448,7 @@ var WaitlistModule = /* @__PURE__ */ __name((factory) => factory({
5658
6448
  // src/features/waitlist/waitlist-stats.module.ts
5659
6449
  var WaitlistStatsModule = /* @__PURE__ */ __name((factory) => factory({
5660
6450
  name: "waitlist-stats",
6451
+ pageUrl: "/waitlist-stats",
5661
6452
  model: WaitlistStats
5662
6453
  }), "WaitlistStatsModule");
5663
6454
 
@@ -5717,12 +6508,41 @@ export {
5717
6508
  checkPermissions,
5718
6509
  checkPermissionsFromServer,
5719
6510
  getValueFromPath,
6511
+ TotpAuthenticator,
6512
+ TotpAuthenticatorModule,
6513
+ TotpSetup,
6514
+ TotpSetupModule,
6515
+ TotpVerify,
6516
+ TotpVerifyModule,
6517
+ TotpVerifyLogin,
6518
+ TotpVerifyLoginModule,
6519
+ Passkey,
6520
+ PasskeyModule,
6521
+ PasskeyRegistrationOptions,
6522
+ PasskeyRegistrationOptionsModule,
6523
+ PasskeyRegistrationVerify,
6524
+ PasskeyRegistrationVerifyModule,
6525
+ PasskeyRename,
6526
+ PasskeyRenameModule,
6527
+ PasskeyVerifyLogin,
6528
+ PasskeyVerifyLoginModule,
6529
+ PasskeyAuthenticationOptions,
6530
+ PasskeyAuthenticationOptionsModule,
6531
+ TwoFactorEnable,
6532
+ TwoFactorEnableModule,
6533
+ TwoFactorChallenge,
6534
+ TwoFactorChallengeModule,
6535
+ BackupCodeVerify,
6536
+ BackupCodeVerifyModule,
5720
6537
  configureAuth,
5721
6538
  getTokenHandler,
5722
6539
  Auth,
5723
6540
  AuthService,
6541
+ TwoFactorStatus,
6542
+ TwoFactorService,
5724
6543
  AuthComponent,
5725
6544
  AuthModule,
6545
+ TwoFactorStatusModule,
5726
6546
  BillingService,
5727
6547
  Billing,
5728
6548
  BillingModule,
@@ -5795,4 +6615,4 @@ export {
5795
6615
  WaitlistModule,
5796
6616
  WaitlistStatsModule
5797
6617
  };
5798
- //# sourceMappingURL=chunk-GVN7XC3U.mjs.map
6618
+ //# sourceMappingURL=chunk-PHNL4QUF.mjs.map