@infuro/cms-core 1.0.72 → 1.0.73
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/admin.cjs +507 -109
- package/dist/admin.js +509 -111
- package/dist/api.cjs +33 -33
- package/dist/api.d.cts +13 -6
- package/dist/api.d.ts +13 -6
- package/dist/api.js +1 -1
- package/dist/auth.cjs +11 -11
- package/dist/auth.d.cts +15 -0
- package/dist/auth.d.ts +15 -0
- package/dist/auth.js +1 -1
- package/dist/{chunk-43UVXBEH.js → chunk-4LF5OGBF.js} +2459 -2039
- package/dist/{chunk-SCE2GIKH.js → chunk-DEGN4BTH.js} +9 -0
- package/dist/{chunk-CKTRA3Q2.cjs → chunk-F3FKBNMQ.cjs} +9 -0
- package/dist/{chunk-SRGDHASW.cjs → chunk-HQ3A43HO.cjs} +2458 -2038
- package/dist/index.cjs +217 -217
- package/dist/index.d.cts +31 -9
- package/dist/index.d.ts +31 -9
- package/dist/index.js +3 -3
- package/dist/migrations/1783400000000-MakeProductConfigTaxIdNullable.ts +40 -0
- package/package.json +1 -1
|
@@ -409,6 +409,7 @@ function sessionUserFromNextAuthUser(user) {
|
|
|
409
409
|
entityPerms,
|
|
410
410
|
adminAccess,
|
|
411
411
|
vendorIds,
|
|
412
|
+
vendorStores: user.vendorStores ?? [],
|
|
412
413
|
activeVendorId: user.activeVendorId ?? vendorIds[0] ?? null,
|
|
413
414
|
vendorRole,
|
|
414
415
|
vendorRoleId: user.vendorRoleId ?? null,
|
|
@@ -735,6 +736,7 @@ function getNextAuthOptions(config) {
|
|
|
735
736
|
token.entityPerms = u.entityPerms;
|
|
736
737
|
token.adminAccess = u.adminAccess;
|
|
737
738
|
token.vendorIds = u.vendorIds;
|
|
739
|
+
token.vendorStores = u.vendorStores;
|
|
738
740
|
token.activeVendorId = u.activeVendorId;
|
|
739
741
|
token.vendorRole = u.vendorRole;
|
|
740
742
|
token.vendorRoleId = u.vendorRoleId;
|
|
@@ -753,6 +755,12 @@ function getNextAuthOptions(config) {
|
|
|
753
755
|
if (typeof s.name === "string") t.name = s.name;
|
|
754
756
|
if (typeof s.email === "string") t.email = s.email;
|
|
755
757
|
if (typeof s.activeVendorId === "number") t.activeVendorId = s.activeVendorId;
|
|
758
|
+
if ("vendorStores" in s) t.vendorStores = s.vendorStores;
|
|
759
|
+
if ("vendorRole" in s) t.vendorRole = s.vendorRole;
|
|
760
|
+
if ("vendorRoleId" in s) t.vendorRoleId = s.vendorRoleId;
|
|
761
|
+
if ("vendorRoleName" in s) t.vendorRoleName = s.vendorRoleName;
|
|
762
|
+
if ("isVendorRoleOwner" in s) t.isVendorRoleOwner = s.isVendorRoleOwner;
|
|
763
|
+
if ("vendorEntityPerms" in s) t.vendorEntityPerms = s.vendorEntityPerms;
|
|
756
764
|
}
|
|
757
765
|
return token;
|
|
758
766
|
},
|
|
@@ -773,6 +781,7 @@ function getNextAuthOptions(config) {
|
|
|
773
781
|
session.user.entityPerms = t.entityPerms;
|
|
774
782
|
session.user.adminAccess = t.adminAccess;
|
|
775
783
|
session.user.vendorIds = t.vendorIds;
|
|
784
|
+
session.user.vendorStores = t.vendorStores;
|
|
776
785
|
session.user.activeVendorId = t.activeVendorId;
|
|
777
786
|
session.user.vendorRole = t.vendorRole;
|
|
778
787
|
session.user.vendorRoleId = t.vendorRoleId;
|
|
@@ -416,6 +416,7 @@ function sessionUserFromNextAuthUser(user) {
|
|
|
416
416
|
entityPerms,
|
|
417
417
|
adminAccess,
|
|
418
418
|
vendorIds,
|
|
419
|
+
vendorStores: user.vendorStores ?? [],
|
|
419
420
|
activeVendorId: user.activeVendorId ?? vendorIds[0] ?? null,
|
|
420
421
|
vendorRole,
|
|
421
422
|
vendorRoleId: user.vendorRoleId ?? null,
|
|
@@ -742,6 +743,7 @@ function getNextAuthOptions(config) {
|
|
|
742
743
|
token.entityPerms = u.entityPerms;
|
|
743
744
|
token.adminAccess = u.adminAccess;
|
|
744
745
|
token.vendorIds = u.vendorIds;
|
|
746
|
+
token.vendorStores = u.vendorStores;
|
|
745
747
|
token.activeVendorId = u.activeVendorId;
|
|
746
748
|
token.vendorRole = u.vendorRole;
|
|
747
749
|
token.vendorRoleId = u.vendorRoleId;
|
|
@@ -760,6 +762,12 @@ function getNextAuthOptions(config) {
|
|
|
760
762
|
if (typeof s.name === "string") t.name = s.name;
|
|
761
763
|
if (typeof s.email === "string") t.email = s.email;
|
|
762
764
|
if (typeof s.activeVendorId === "number") t.activeVendorId = s.activeVendorId;
|
|
765
|
+
if ("vendorStores" in s) t.vendorStores = s.vendorStores;
|
|
766
|
+
if ("vendorRole" in s) t.vendorRole = s.vendorRole;
|
|
767
|
+
if ("vendorRoleId" in s) t.vendorRoleId = s.vendorRoleId;
|
|
768
|
+
if ("vendorRoleName" in s) t.vendorRoleName = s.vendorRoleName;
|
|
769
|
+
if ("isVendorRoleOwner" in s) t.isVendorRoleOwner = s.isVendorRoleOwner;
|
|
770
|
+
if ("vendorEntityPerms" in s) t.vendorEntityPerms = s.vendorEntityPerms;
|
|
763
771
|
}
|
|
764
772
|
return token;
|
|
765
773
|
},
|
|
@@ -780,6 +788,7 @@ function getNextAuthOptions(config) {
|
|
|
780
788
|
session.user.entityPerms = t.entityPerms;
|
|
781
789
|
session.user.adminAccess = t.adminAccess;
|
|
782
790
|
session.user.vendorIds = t.vendorIds;
|
|
791
|
+
session.user.vendorStores = t.vendorStores;
|
|
783
792
|
session.user.activeVendorId = t.activeVendorId;
|
|
784
793
|
session.user.vendorRole = t.vendorRole;
|
|
785
794
|
session.user.vendorRoleId = t.vendorRoleId;
|