@carlonicora/nextjs-jsonapi 1.25.1 → 1.26.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/dist/{BlockNoteEditor-UNVKGZ2G.mjs → BlockNoteEditor-6SN4V76A.mjs} +3 -3
- package/dist/{BlockNoteEditor-7WAWEZVW.js → BlockNoteEditor-F7V7MVIU.js} +13 -13
- package/dist/{BlockNoteEditor-7WAWEZVW.js.map → BlockNoteEditor-F7V7MVIU.js.map} +1 -1
- package/dist/billing/index.js +342 -342
- package/dist/billing/index.mjs +2 -2
- package/dist/{chunk-O3LLMGP7.js → chunk-2VZZFQP4.js} +74 -63
- package/dist/chunk-2VZZFQP4.js.map +1 -0
- package/dist/{chunk-6BDOZDZ3.mjs → chunk-ACMJFZO7.mjs} +1552 -1389
- package/dist/chunk-ACMJFZO7.mjs.map +1 -0
- package/dist/{chunk-LNBT2YPZ.mjs → chunk-NAB52T2P.mjs} +20 -9
- package/dist/chunk-NAB52T2P.mjs.map +1 -0
- package/dist/{chunk-JI6BDV7L.js → chunk-RK64POSH.js} +864 -701
- package/dist/chunk-RK64POSH.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 +3 -3
- package/dist/client/index.mjs +2 -2
- package/dist/components/index.d.mts +20 -3
- package/dist/components/index.d.ts +20 -3
- package/dist/components/index.js +5 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +4 -2
- package/dist/{config-D_91hrI-.d.ts → config-B4pZpLT9.d.ts} +1 -1
- package/dist/{config-h0hNLceh.d.mts → config-DT1K-t6I.d.mts} +1 -1
- package/dist/{content.interface-QcsFR5Ad.d.mts → content.interface-B2Ldg0vg.d.mts} +1 -1
- package/dist/{content.interface-CUIEQ0jk.d.ts → content.interface-D8NHv3DX.d.ts} +1 -1
- package/dist/contexts/index.d.mts +4 -2
- package/dist/contexts/index.d.ts +4 -2
- package/dist/contexts/index.js +3 -3
- package/dist/contexts/index.mjs +2 -2
- package/dist/core/index.d.mts +11 -7
- package/dist/core/index.d.ts +11 -7
- package/dist/core/index.js +2 -2
- package/dist/core/index.mjs +1 -1
- package/dist/index.d.mts +4 -5
- package/dist/index.d.ts +4 -5
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{notification.interface-blT8r47t.d.mts → notification.interface-DEn-Yp_b.d.mts} +6 -3
- package/dist/{notification.interface-D7_g5SnS.d.ts → notification.interface-H0L9WBge.d.ts} +6 -3
- package/dist/{s3.service-DSDfcr0S.d.mts → s3.service-BNytYanU.d.mts} +2 -2
- package/dist/{s3.service-B83hUhqV.d.ts → s3.service-C7f_Ygz5.d.ts} +2 -2
- package/dist/server/index.d.mts +3 -4
- package/dist/server/index.d.ts +3 -4
- package/dist/server/index.js +18 -25
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +1 -8
- package/dist/server/index.mjs.map +1 -1
- package/dist/{useSocket-B5M_a4bD.d.mts → useSocket-BcnThTD0.d.mts} +1 -1
- package/dist/{useSocket-Dd03muLJ.d.ts → useSocket-QZTOCzRF.d.ts} +1 -1
- package/package.json +1 -1
- package/src/components/navigations/Header.tsx +34 -2
- package/src/features/auth/components/forms/RefreshUser.tsx +1 -2
- package/src/features/auth/config.ts +0 -1
- package/src/features/auth/data/auth.service.ts +1 -3
- package/src/features/auth/utils/AuthCookies.ts +0 -14
- package/src/features/company/components/details/TokenStatusIndicator.tsx +136 -0
- package/src/features/company/components/details/index.ts +1 -0
- package/src/features/company/components/forms/index.ts +0 -1
- package/src/features/company/data/company.interface.ts +6 -3
- package/src/features/company/data/company.ts +21 -9
- package/src/features/user/contexts/CurrentUserContext.tsx +57 -2
- package/src/server/ServerSession.ts +0 -10
- package/dist/chunk-6BDOZDZ3.mjs.map +0 -1
- package/dist/chunk-JI6BDV7L.js.map +0 -1
- package/dist/chunk-LNBT2YPZ.mjs.map +0 -1
- package/dist/chunk-O3LLMGP7.js.map +0 -1
- package/src/features/company/components/forms/CompanyLicense.tsx +0 -208
- /package/dist/{BlockNoteEditor-UNVKGZ2G.mjs.map → BlockNoteEditor-6SN4V76A.mjs.map} +0 -0
|
@@ -2277,7 +2277,6 @@ var AuthService = class extends AbstractService {
|
|
|
2277
2277
|
refreshToken: auth.refreshToken,
|
|
2278
2278
|
userId: auth.user.id,
|
|
2279
2279
|
companyId: auth.user.company?.id,
|
|
2280
|
-
licenseExpirationDate: auth.user.company?.licenseExpirationDate,
|
|
2281
2280
|
roles: auth.user.roles.map((role) => role.id),
|
|
2282
2281
|
features: auth.user.company?.features?.map((feature) => feature.id) ?? [],
|
|
2283
2282
|
modules: auth.user.modules.map((module) => ({
|
|
@@ -2364,7 +2363,6 @@ var AuthService = class extends AbstractService {
|
|
|
2364
2363
|
refreshToken: auth.refreshToken,
|
|
2365
2364
|
userId: auth.user.id,
|
|
2366
2365
|
companyId: auth.user.company?.id,
|
|
2367
|
-
licenseExpirationDate: auth.user.company?.licenseExpirationDate,
|
|
2368
2366
|
roles: auth.user.roles.map((role) => role.id),
|
|
2369
2367
|
features: auth.user.company?.features?.map((feature) => feature.id) ?? [],
|
|
2370
2368
|
modules: auth.user.modules.map((module) => ({
|
|
@@ -3755,7 +3753,9 @@ var Company = class extends AbstractApiData {
|
|
|
3755
3753
|
_logo;
|
|
3756
3754
|
_logoUrl;
|
|
3757
3755
|
_configurations;
|
|
3758
|
-
|
|
3756
|
+
_monthlyTokens = 0;
|
|
3757
|
+
_availableMonthlyTokens = 0;
|
|
3758
|
+
_availableExtraTokens = 0;
|
|
3759
3759
|
_features;
|
|
3760
3760
|
_modules;
|
|
3761
3761
|
get name() {
|
|
@@ -3768,8 +3768,14 @@ var Company = class extends AbstractApiData {
|
|
|
3768
3768
|
get logoUrl() {
|
|
3769
3769
|
return this._logoUrl;
|
|
3770
3770
|
}
|
|
3771
|
-
get
|
|
3772
|
-
return this.
|
|
3771
|
+
get monthlyTokens() {
|
|
3772
|
+
return this._monthlyTokens ?? 0;
|
|
3773
|
+
}
|
|
3774
|
+
get availableMonthlyTokens() {
|
|
3775
|
+
return this._availableMonthlyTokens ?? 0;
|
|
3776
|
+
}
|
|
3777
|
+
get availableExtraTokens() {
|
|
3778
|
+
return this._availableExtraTokens ?? 0;
|
|
3773
3779
|
}
|
|
3774
3780
|
get features() {
|
|
3775
3781
|
return this._features ?? [];
|
|
@@ -3786,7 +3792,9 @@ var Company = class extends AbstractApiData {
|
|
|
3786
3792
|
this._configurations = data.jsonApi.attributes.configurations ? JSON.parse(data.jsonApi.attributes.configurations) : void 0;
|
|
3787
3793
|
this._logo = data.jsonApi.attributes.logo;
|
|
3788
3794
|
this._logoUrl = data.jsonApi.attributes.logoUrl;
|
|
3789
|
-
this.
|
|
3795
|
+
this._monthlyTokens = data.jsonApi.attributes.monthlyTokens ?? 0;
|
|
3796
|
+
this._availableMonthlyTokens = data.jsonApi.attributes.availableMonthlyTokens ?? 0;
|
|
3797
|
+
this._availableExtraTokens = data.jsonApi.attributes.availableExtraTokens ?? 0;
|
|
3790
3798
|
this._features = this._readIncluded(data, "features", Modules.Feature);
|
|
3791
3799
|
this._modules = this._readIncluded(data, "modules", Modules.Module);
|
|
3792
3800
|
return this;
|
|
@@ -3805,8 +3813,11 @@ var Company = class extends AbstractApiData {
|
|
|
3805
3813
|
if (data.name) response.data.attributes.name = data.name;
|
|
3806
3814
|
if (data.configurations) response.data.attributes.configurations = JSON.stringify(data.configurations);
|
|
3807
3815
|
if (data.logo) response.data.attributes.logo = data.logo;
|
|
3808
|
-
if (data.
|
|
3809
|
-
if (data.
|
|
3816
|
+
if (data.monthlyTokens !== void 0) response.data.attributes.monthlyTokens = data.monthlyTokens;
|
|
3817
|
+
if (data.availableMonthlyTokens !== void 0)
|
|
3818
|
+
response.data.attributes.availableMonthlyTokens = data.availableMonthlyTokens;
|
|
3819
|
+
if (data.availableExtraTokens !== void 0)
|
|
3820
|
+
response.data.attributes.availableExtraTokens = data.availableExtraTokens;
|
|
3810
3821
|
if (data.featureIds && data.featureIds.length > 0) {
|
|
3811
3822
|
response.data.relationships.features = {
|
|
3812
3823
|
data: data.featureIds.map((featureId) => ({
|
|
@@ -5283,4 +5294,4 @@ export {
|
|
|
5283
5294
|
AVAILABLE_OAUTH_SCOPES,
|
|
5284
5295
|
DEFAULT_GRANT_TYPES
|
|
5285
5296
|
};
|
|
5286
|
-
//# sourceMappingURL=chunk-
|
|
5297
|
+
//# sourceMappingURL=chunk-NAB52T2P.mjs.map
|