@carlonicora/nextjs-jsonapi 6.5.0 → 6.6.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 (77) hide show
  1. package/dist/{BlockNoteEditor-CT4XUXPC.js → BlockNoteEditor-E4V7AEG2.js} +19 -19
  2. package/dist/{BlockNoteEditor-CT4XUXPC.js.map → BlockNoteEditor-E4V7AEG2.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-M6UQRVRK.mjs → BlockNoteEditor-MWGVWNSE.mjs} +4 -4
  4. package/dist/{BlockNoteViewer-MFLWF3Y2.js → BlockNoteViewer-LGRKM7OA.js} +3 -3
  5. package/dist/{BlockNoteViewer-MFLWF3Y2.js.map → BlockNoteViewer-LGRKM7OA.js.map} +1 -1
  6. package/dist/{BlockNoteViewer-XZJ5Y7WN.mjs → BlockNoteViewer-VNU7WVN5.mjs} +2 -2
  7. package/dist/billing/index.js +492 -492
  8. package/dist/billing/index.mjs +3 -3
  9. package/dist/{chunk-3FD6Y734.mjs → chunk-7GB5MR77.mjs} +78 -1
  10. package/dist/chunk-7GB5MR77.mjs.map +1 -0
  11. package/dist/{chunk-ELQHE2DK.js → chunk-AEVLFZRK.js} +3 -3
  12. package/dist/{chunk-ELQHE2DK.js.map → chunk-AEVLFZRK.js.map} +1 -1
  13. package/dist/{chunk-DSGP6GC3.js → chunk-AMN2XDN5.js} +8 -8
  14. package/dist/{chunk-DSGP6GC3.js.map → chunk-AMN2XDN5.js.map} +1 -1
  15. package/dist/{chunk-QJIDORHM.js → chunk-F2MZ7GY6.js} +4 -4
  16. package/dist/{chunk-QJIDORHM.js.map → chunk-F2MZ7GY6.js.map} +1 -1
  17. package/dist/{chunk-TIT4CJYQ.mjs → chunk-IDV534SJ.mjs} +5 -5
  18. package/dist/{chunk-DYOSXIEL.mjs → chunk-IQ2XYAB5.mjs} +2 -2
  19. package/dist/{chunk-XZCCIKX3.js → chunk-OJAIKQR2.js} +79 -2
  20. package/dist/chunk-OJAIKQR2.js.map +1 -0
  21. package/dist/{chunk-O2TEUH5S.mjs → chunk-PDS57QPD.mjs} +2 -2
  22. package/dist/{chunk-Y7JIQNM6.js → chunk-R2XBVIO5.js} +870 -870
  23. package/dist/{chunk-Y7JIQNM6.js.map → chunk-R2XBVIO5.js.map} +1 -1
  24. package/dist/{chunk-RUJCWOJE.mjs → chunk-RSMBRI3E.mjs} +2 -2
  25. package/dist/client/index.js +4 -4
  26. package/dist/client/index.mjs +3 -3
  27. package/dist/components/index.js +4 -4
  28. package/dist/components/index.mjs +3 -3
  29. package/dist/contexts/index.js +4 -4
  30. package/dist/contexts/index.mjs +3 -3
  31. package/dist/core/index.d.mts +32 -3
  32. package/dist/core/index.d.ts +32 -3
  33. package/dist/core/index.js +6 -2
  34. package/dist/core/index.js.map +1 -1
  35. package/dist/core/index.mjs +5 -1
  36. package/dist/email-automations/index.js +92 -92
  37. package/dist/email-automations/index.mjs +3 -3
  38. package/dist/features/analytics/index.js +121 -121
  39. package/dist/features/analytics/index.mjs +4 -4
  40. package/dist/features/analytics/server.js +4 -4
  41. package/dist/features/analytics/server.mjs +2 -2
  42. package/dist/features/blog/index.js +150 -150
  43. package/dist/features/blog/index.mjs +3 -3
  44. package/dist/features/blog/server.js +16 -16
  45. package/dist/features/blog/server.mjs +1 -1
  46. package/dist/features/help/index.js +37 -37
  47. package/dist/features/help/index.mjs +3 -3
  48. package/dist/features/tokenusage/index.js +127 -127
  49. package/dist/features/tokenusage/index.mjs +4 -4
  50. package/dist/index.d.mts +2 -2
  51. package/dist/index.d.ts +2 -2
  52. package/dist/index.js +7 -3
  53. package/dist/index.js.map +1 -1
  54. package/dist/index.mjs +6 -2
  55. package/dist/{s3.service-CzFBDEuQ.d.mts → s3.service-BNBD9YTg.d.mts} +17 -1
  56. package/dist/{s3.service-BTCpmp5g.d.ts → s3.service-Da7C2gtt.d.ts} +17 -1
  57. package/dist/server/index.d.mts +1 -1
  58. package/dist/server/index.d.ts +1 -1
  59. package/dist/server/index.js +3 -3
  60. package/dist/server/index.mjs +2 -2
  61. package/package.json +1 -1
  62. package/src/core/index.ts +1 -0
  63. package/src/core/registry/ModuleRegistry.ts +2 -0
  64. package/src/features/auth/data/__tests__/pending-registration.spec.ts +37 -0
  65. package/src/features/auth/data/auth.service.ts +19 -0
  66. package/src/features/auth/data/index.ts +2 -0
  67. package/src/features/auth/data/pending-registration.interface.ts +10 -0
  68. package/src/features/auth/data/pending-registration.ts +57 -0
  69. package/src/features/auth/pending-registration.module.ts +9 -0
  70. package/dist/chunk-3FD6Y734.mjs.map +0 -1
  71. package/dist/chunk-XZCCIKX3.js.map +0 -1
  72. /package/dist/{BlockNoteEditor-M6UQRVRK.mjs.map → BlockNoteEditor-MWGVWNSE.mjs.map} +0 -0
  73. /package/dist/{BlockNoteViewer-XZJ5Y7WN.mjs.map → BlockNoteViewer-VNU7WVN5.mjs.map} +0 -0
  74. /package/dist/{chunk-TIT4CJYQ.mjs.map → chunk-IDV534SJ.mjs.map} +0 -0
  75. /package/dist/{chunk-DYOSXIEL.mjs.map → chunk-IQ2XYAB5.mjs.map} +0 -0
  76. /package/dist/{chunk-O2TEUH5S.mjs.map → chunk-PDS57QPD.mjs.map} +0 -0
  77. /package/dist/{chunk-RUJCWOJE.mjs.map → chunk-RSMBRI3E.mjs.map} +0 -0
@@ -81,10 +81,10 @@ import {
81
81
  useCurrentUserContext,
82
82
  useDataListRetriever,
83
83
  usePageUrlGenerator
84
- } from "../chunk-TIT4CJYQ.mjs";
84
+ } from "../chunk-IDV534SJ.mjs";
85
85
  import {
86
86
  getStripePublishableKey
87
- } from "../chunk-RUJCWOJE.mjs";
87
+ } from "../chunk-RSMBRI3E.mjs";
88
88
  import {
89
89
  getRoleId
90
90
  } from "../chunk-PW42LRSL.mjs";
@@ -114,7 +114,7 @@ import {
114
114
  toPromotionCodeResult,
115
115
  useI18nLocale,
116
116
  useI18nRouter
117
- } from "../chunk-3FD6Y734.mjs";
117
+ } from "../chunk-7GB5MR77.mjs";
118
118
  import "../chunk-V5MI7RNB.mjs";
119
119
  import "../chunk-AUXK7QSA.mjs";
120
120
  import "../chunk-PI56A4DG.mjs";
@@ -3214,6 +3214,23 @@ var AuthService = class extends AbstractService {
3214
3214
  });
3215
3215
  }
3216
3216
  }
3217
+ /**
3218
+ * Reads an OAuth sign-up waiting for consent. Throws an Error carrying
3219
+ * `status` (404 when the pending registration expired); callers catch it.
3220
+ */
3221
+ static async findPendingRegistration(params) {
3222
+ return this.callApi({
3223
+ type: Modules.PendingRegistration,
3224
+ method: "GET" /* GET */,
3225
+ endpoint: new EndpointCreator({
3226
+ endpoint: Modules.Auth,
3227
+ id: "oauth",
3228
+ childEndpoint: Modules.PendingRegistration,
3229
+ childId: params.pendingId
3230
+ }).generate(),
3231
+ suppressGlobalError: true
3232
+ });
3233
+ }
3217
3234
  static async completeOAuthRegistration(params) {
3218
3235
  const endpoint = new EndpointCreator({ endpoint: Modules.Auth, id: "oauth", childEndpoint: "complete" });
3219
3236
  const response = await JsonApiPost({
@@ -3546,6 +3563,57 @@ var TwoFactorService = class extends AbstractService {
3546
3563
  }
3547
3564
  };
3548
3565
 
3566
+ // src/features/auth/data/pending-registration.ts
3567
+ var PendingRegistration = class extends AbstractApiData {
3568
+ static {
3569
+ __name(this, "PendingRegistration");
3570
+ }
3571
+ _name;
3572
+ _email;
3573
+ _avatar;
3574
+ _provider;
3575
+ _hasPass;
3576
+ _emailInUse;
3577
+ get name() {
3578
+ return this._name ?? "";
3579
+ }
3580
+ get email() {
3581
+ return this._email ?? "";
3582
+ }
3583
+ get avatar() {
3584
+ return this._avatar;
3585
+ }
3586
+ get provider() {
3587
+ return this._provider ?? "";
3588
+ }
3589
+ get hasPass() {
3590
+ return this._hasPass ?? false;
3591
+ }
3592
+ get emailInUse() {
3593
+ return this._emailInUse ?? false;
3594
+ }
3595
+ rehydrate(data) {
3596
+ super.rehydrate(data);
3597
+ this._name = data.jsonApi.attributes.name;
3598
+ this._email = data.jsonApi.attributes.email;
3599
+ this._avatar = data.jsonApi.attributes.avatar ?? void 0;
3600
+ this._provider = data.jsonApi.attributes.provider;
3601
+ this._hasPass = data.jsonApi.attributes.hasPass ?? false;
3602
+ this._emailInUse = data.jsonApi.attributes.emailInUse ?? false;
3603
+ return this;
3604
+ }
3605
+ /** Read-only resource: the payload only identifies it. */
3606
+ createJsonApi(data) {
3607
+ return {
3608
+ data: {
3609
+ type: Modules.PendingRegistration.name,
3610
+ id: data.id,
3611
+ attributes: {}
3612
+ }
3613
+ };
3614
+ }
3615
+ };
3616
+
3549
3617
  // src/features/auth/enums/AuthComponent.ts
3550
3618
  var AuthComponent = /* @__PURE__ */ ((AuthComponent2) => {
3551
3619
  AuthComponent2[AuthComponent2["Login"] = 0] = "Login";
@@ -3573,6 +3641,13 @@ var TwoFactorStatusModule = /* @__PURE__ */ __name((factory) => factory({
3573
3641
  model: TwoFactorStatus
3574
3642
  }), "TwoFactorStatusModule");
3575
3643
 
3644
+ // src/features/auth/pending-registration.module.ts
3645
+ var PendingRegistrationModule = /* @__PURE__ */ __name((factory) => factory({
3646
+ name: "pending-registrations",
3647
+ pageUrl: "/auth/consent",
3648
+ model: PendingRegistration
3649
+ }), "PendingRegistrationModule");
3650
+
3576
3651
  // src/features/billing/data/billing.service.ts
3577
3652
  var BillingService = class extends AbstractService {
3578
3653
  static {
@@ -12179,9 +12254,11 @@ export {
12179
12254
  AuthService,
12180
12255
  TwoFactorStatus,
12181
12256
  TwoFactorService,
12257
+ PendingRegistration,
12182
12258
  AuthComponent,
12183
12259
  AuthModule,
12184
12260
  TwoFactorStatusModule,
12261
+ PendingRegistrationModule,
12185
12262
  BillingService,
12186
12263
  Billing,
12187
12264
  SubscriptionStatus,
@@ -12392,4 +12469,4 @@ export {
12392
12469
  AuditLogService,
12393
12470
  AuditLogModule
12394
12471
  };
12395
- //# sourceMappingURL=chunk-3FD6Y734.mjs.map
12472
+ //# sourceMappingURL=chunk-7GB5MR77.mjs.map