@shophost/react 2.0.26 → 2.0.28
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/admin-client.cjs +1 -1
- package/admin-client.js +3769 -3134
- package/components/admin/forms/access-form.d.ts +7 -0
- package/components/admin/partials/members-list/PendingInvitations.d.ts +2 -0
- package/components/admin/partials/members-list/columns.d.ts +3 -0
- package/components/admin/partials/members-list/index.d.ts +2 -0
- package/components/ui/data-table/DataTable.d.ts +1 -1
- package/components/ui/input/text-input.d.ts +8 -0
- package/package.json +3 -3
- package/react.css +1 -1
- package/router/resolve.d.ts +10 -0
- package/router/routes.d.ts +3 -0
- package/storefront/lib/better-auth.d.ts +28 -28
- package/views/settings/access/AccessInviteView.d.ts +1 -0
- package/views/settings/access/AccessListView.d.ts +1 -0
- package/views/settings/access/AccessMemberEditView.d.ts +1 -0
package/router/resolve.d.ts
CHANGED
|
@@ -61,6 +61,16 @@ export type RouteView = {
|
|
|
61
61
|
type: "shipping-method-edit";
|
|
62
62
|
orgId: string;
|
|
63
63
|
id: string;
|
|
64
|
+
} | {
|
|
65
|
+
type: "access-list";
|
|
66
|
+
orgId: string;
|
|
67
|
+
} | {
|
|
68
|
+
type: "access-invite";
|
|
69
|
+
orgId: string;
|
|
70
|
+
} | {
|
|
71
|
+
type: "access-member-edit";
|
|
72
|
+
orgId: string;
|
|
73
|
+
id: string;
|
|
64
74
|
} | {
|
|
65
75
|
type: "not-found";
|
|
66
76
|
};
|
package/router/routes.d.ts
CHANGED
|
@@ -21,5 +21,8 @@ export interface AdminRoutes {
|
|
|
21
21
|
settingsShippingMethods: (orgId: string) => string;
|
|
22
22
|
settingsShippingMethodCreate: (orgId: string) => string;
|
|
23
23
|
settingsShippingMethodEdit: (orgId: string, id: string) => string;
|
|
24
|
+
settingsAccess: (orgId: string) => string;
|
|
25
|
+
settingsAccessInvite: (orgId: string) => string;
|
|
26
|
+
settingsAccessMemberEdit: (orgId: string, id: string) => string;
|
|
24
27
|
}
|
|
25
28
|
export declare function createRoutes(basePath: string): AdminRoutes;
|
|
@@ -223,7 +223,7 @@ export declare const useSession: () => {
|
|
|
223
223
|
members: {
|
|
224
224
|
id: string;
|
|
225
225
|
organizationId: string;
|
|
226
|
-
role: "
|
|
226
|
+
role: "owner" | "admin" | "member";
|
|
227
227
|
createdAt: Date;
|
|
228
228
|
userId: string;
|
|
229
229
|
user: {
|
|
@@ -237,7 +237,7 @@ export declare const useSession: () => {
|
|
|
237
237
|
id: string;
|
|
238
238
|
organizationId: string;
|
|
239
239
|
email: string;
|
|
240
|
-
role: "
|
|
240
|
+
role: "owner" | "admin" | "member";
|
|
241
241
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
242
242
|
inviterId: string;
|
|
243
243
|
expiresAt: Date;
|
|
@@ -263,7 +263,7 @@ export declare const useSession: () => {
|
|
|
263
263
|
id: string;
|
|
264
264
|
organizationId: string;
|
|
265
265
|
email: string;
|
|
266
|
-
role: "
|
|
266
|
+
role: "owner" | "admin" | "member";
|
|
267
267
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
268
268
|
inviterId: string;
|
|
269
269
|
expiresAt: Date;
|
|
@@ -272,7 +272,7 @@ export declare const useSession: () => {
|
|
|
272
272
|
Member: {
|
|
273
273
|
id: string;
|
|
274
274
|
organizationId: string;
|
|
275
|
-
role: "
|
|
275
|
+
role: "owner" | "admin" | "member";
|
|
276
276
|
createdAt: Date;
|
|
277
277
|
userId: string;
|
|
278
278
|
user: {
|
|
@@ -291,7 +291,7 @@ export declare const useSession: () => {
|
|
|
291
291
|
};
|
|
292
292
|
};
|
|
293
293
|
organization: {
|
|
294
|
-
checkRolePermission: <R extends "
|
|
294
|
+
checkRolePermission: <R extends "owner" | "admin" | "member">(data: {
|
|
295
295
|
permissions: {
|
|
296
296
|
readonly organization?: ("delete" | "update")[] | undefined;
|
|
297
297
|
readonly member?: ("delete" | "create" | "update")[] | undefined;
|
|
@@ -320,7 +320,7 @@ export declare const useSession: () => {
|
|
|
320
320
|
members: {
|
|
321
321
|
id: string;
|
|
322
322
|
organizationId: string;
|
|
323
|
-
role: "
|
|
323
|
+
role: "owner" | "admin" | "member";
|
|
324
324
|
createdAt: Date;
|
|
325
325
|
userId: string;
|
|
326
326
|
user: {
|
|
@@ -334,7 +334,7 @@ export declare const useSession: () => {
|
|
|
334
334
|
id: string;
|
|
335
335
|
organizationId: string;
|
|
336
336
|
email: string;
|
|
337
|
-
role: "
|
|
337
|
+
role: "owner" | "admin" | "member";
|
|
338
338
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
339
339
|
inviterId: string;
|
|
340
340
|
expiresAt: Date;
|
|
@@ -620,7 +620,7 @@ export declare const useSession: () => {
|
|
|
620
620
|
members: {
|
|
621
621
|
id: string;
|
|
622
622
|
organizationId: string;
|
|
623
|
-
role: "
|
|
623
|
+
role: "owner" | "admin" | "member";
|
|
624
624
|
createdAt: Date;
|
|
625
625
|
userId: string;
|
|
626
626
|
user: {
|
|
@@ -634,7 +634,7 @@ export declare const useSession: () => {
|
|
|
634
634
|
id: string;
|
|
635
635
|
organizationId: string;
|
|
636
636
|
email: string;
|
|
637
|
-
role: "
|
|
637
|
+
role: "owner" | "admin" | "member";
|
|
638
638
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
639
639
|
inviterId: string;
|
|
640
640
|
expiresAt: Date;
|
|
@@ -667,7 +667,7 @@ export declare const useSession: () => {
|
|
|
667
667
|
members: {
|
|
668
668
|
id: string;
|
|
669
669
|
organizationId: string;
|
|
670
|
-
role: "
|
|
670
|
+
role: "owner" | "admin" | "member";
|
|
671
671
|
createdAt: Date;
|
|
672
672
|
userId: string;
|
|
673
673
|
user: {
|
|
@@ -681,7 +681,7 @@ export declare const useSession: () => {
|
|
|
681
681
|
id: string;
|
|
682
682
|
organizationId: string;
|
|
683
683
|
email: string;
|
|
684
|
-
role: "
|
|
684
|
+
role: "owner" | "admin" | "member";
|
|
685
685
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
686
686
|
inviterId: string;
|
|
687
687
|
expiresAt: Date;
|
|
@@ -716,12 +716,12 @@ export declare const useSession: () => {
|
|
|
716
716
|
} & {
|
|
717
717
|
inviteMember: <FetchOptions extends import('@better-auth/core').ClientFetchOption<Partial<{
|
|
718
718
|
email: string;
|
|
719
|
-
role: "
|
|
719
|
+
role: "owner" | "admin" | "member" | ("owner" | "admin" | "member")[];
|
|
720
720
|
organizationId?: string | undefined;
|
|
721
721
|
resend?: boolean | undefined;
|
|
722
722
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth/react').Prettify<{
|
|
723
723
|
email: string;
|
|
724
|
-
role: "
|
|
724
|
+
role: "owner" | "admin" | "member" | ("owner" | "admin" | "member")[];
|
|
725
725
|
organizationId?: string | undefined;
|
|
726
726
|
resend?: boolean | undefined;
|
|
727
727
|
} & {
|
|
@@ -730,7 +730,7 @@ export declare const useSession: () => {
|
|
|
730
730
|
id: string;
|
|
731
731
|
organizationId: string;
|
|
732
732
|
email: string;
|
|
733
|
-
role: "
|
|
733
|
+
role: "owner" | "admin" | "member";
|
|
734
734
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
735
735
|
inviterId: string;
|
|
736
736
|
expiresAt: Date;
|
|
@@ -739,7 +739,7 @@ export declare const useSession: () => {
|
|
|
739
739
|
id: string;
|
|
740
740
|
organizationId: string;
|
|
741
741
|
email: string;
|
|
742
|
-
role: "
|
|
742
|
+
role: "owner" | "admin" | "member";
|
|
743
743
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
744
744
|
inviterId: string;
|
|
745
745
|
expiresAt: Date;
|
|
@@ -759,7 +759,7 @@ export declare const useSession: () => {
|
|
|
759
759
|
id: string;
|
|
760
760
|
organizationId: string;
|
|
761
761
|
email: string;
|
|
762
|
-
role: "
|
|
762
|
+
role: "owner" | "admin" | "member";
|
|
763
763
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
764
764
|
inviterId: string;
|
|
765
765
|
expiresAt: Date;
|
|
@@ -780,7 +780,7 @@ export declare const useSession: () => {
|
|
|
780
780
|
id: string;
|
|
781
781
|
organizationId: string;
|
|
782
782
|
email: string;
|
|
783
|
-
role: "
|
|
783
|
+
role: "owner" | "admin" | "member";
|
|
784
784
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
785
785
|
inviterId: string;
|
|
786
786
|
expiresAt: Date;
|
|
@@ -809,7 +809,7 @@ export declare const useSession: () => {
|
|
|
809
809
|
id: string;
|
|
810
810
|
organizationId: string;
|
|
811
811
|
email: string;
|
|
812
|
-
role: "
|
|
812
|
+
role: "owner" | "admin" | "member";
|
|
813
813
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
814
814
|
inviterId: string;
|
|
815
815
|
expiresAt: Date;
|
|
@@ -857,7 +857,7 @@ export declare const useSession: () => {
|
|
|
857
857
|
id: string;
|
|
858
858
|
organizationId: string;
|
|
859
859
|
email: string;
|
|
860
|
-
role: "
|
|
860
|
+
role: "owner" | "admin" | "member";
|
|
861
861
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
862
862
|
inviterId: string;
|
|
863
863
|
expiresAt: Date;
|
|
@@ -873,7 +873,7 @@ export declare const useSession: () => {
|
|
|
873
873
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/react').BetterFetchResponse<NonNullable<Omit<{
|
|
874
874
|
id: string;
|
|
875
875
|
organizationId: string;
|
|
876
|
-
role: "
|
|
876
|
+
role: "owner" | "admin" | "member";
|
|
877
877
|
createdAt: Date;
|
|
878
878
|
userId: string;
|
|
879
879
|
user: {
|
|
@@ -929,7 +929,7 @@ export declare const useSession: () => {
|
|
|
929
929
|
member: {
|
|
930
930
|
id: string;
|
|
931
931
|
organizationId: string;
|
|
932
|
-
role: "
|
|
932
|
+
role: "owner" | "admin" | "member";
|
|
933
933
|
createdAt: Date;
|
|
934
934
|
userId: string;
|
|
935
935
|
user: {
|
|
@@ -945,11 +945,11 @@ export declare const useSession: () => {
|
|
|
945
945
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
946
946
|
} & {
|
|
947
947
|
updateMemberRole: <FetchOptions extends import('@better-auth/core').ClientFetchOption<Partial<{
|
|
948
|
-
role: import('@better-auth/core').LiteralString |
|
|
948
|
+
role: "owner" | "admin" | "member" | import('@better-auth/core').LiteralString | import('@better-auth/core').LiteralString[] | ("owner" | "admin" | "member")[];
|
|
949
949
|
memberId: string;
|
|
950
950
|
organizationId?: string | undefined;
|
|
951
951
|
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import('better-auth/react').Prettify<{
|
|
952
|
-
role: import('@better-auth/core').LiteralString |
|
|
952
|
+
role: "owner" | "admin" | "member" | import('@better-auth/core').LiteralString | import('@better-auth/core').LiteralString[] | ("owner" | "admin" | "member")[];
|
|
953
953
|
memberId: string;
|
|
954
954
|
organizationId?: string | undefined;
|
|
955
955
|
} & {
|
|
@@ -980,7 +980,7 @@ export declare const useSession: () => {
|
|
|
980
980
|
}>, data_1?: FetchOptions | undefined) => Promise<import('better-auth/react').BetterFetchResponse<NonNullable<Omit<{
|
|
981
981
|
id: string;
|
|
982
982
|
organizationId: string;
|
|
983
|
-
role: "
|
|
983
|
+
role: "owner" | "admin" | "member";
|
|
984
984
|
createdAt: Date;
|
|
985
985
|
userId: string;
|
|
986
986
|
user: {
|
|
@@ -1022,7 +1022,7 @@ export declare const useSession: () => {
|
|
|
1022
1022
|
id: string;
|
|
1023
1023
|
organizationId: string;
|
|
1024
1024
|
email: string;
|
|
1025
|
-
role: "
|
|
1025
|
+
role: "owner" | "admin" | "member";
|
|
1026
1026
|
status: import('better-auth/client/plugins').InvitationStatus;
|
|
1027
1027
|
inviterId: string;
|
|
1028
1028
|
expiresAt: Date;
|
|
@@ -1070,7 +1070,7 @@ export declare const useSession: () => {
|
|
|
1070
1070
|
members: ({
|
|
1071
1071
|
id: string;
|
|
1072
1072
|
organizationId: string;
|
|
1073
|
-
role: "
|
|
1073
|
+
role: "owner" | "admin" | "member";
|
|
1074
1074
|
createdAt: Date;
|
|
1075
1075
|
userId: string;
|
|
1076
1076
|
user: {
|
|
@@ -1105,7 +1105,7 @@ export declare const useSession: () => {
|
|
|
1105
1105
|
} | undefined;
|
|
1106
1106
|
fetchOptions?: FetchOptions | undefined;
|
|
1107
1107
|
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import('better-auth/react').BetterFetchResponse<{
|
|
1108
|
-
role: "
|
|
1108
|
+
role: "owner" | "admin" | "member";
|
|
1109
1109
|
}, {
|
|
1110
1110
|
code?: string | undefined;
|
|
1111
1111
|
message?: string | undefined;
|
|
@@ -1141,7 +1141,7 @@ export declare const useSession: () => {
|
|
|
1141
1141
|
message?: string | undefined;
|
|
1142
1142
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
1143
1143
|
} & {
|
|
1144
|
-
checkRolePermission: <R extends "
|
|
1144
|
+
checkRolePermission: <R extends "owner" | "admin" | "member">(data: {
|
|
1145
1145
|
permissions: {
|
|
1146
1146
|
readonly organization?: ("delete" | "update")[] | undefined;
|
|
1147
1147
|
readonly member?: ("delete" | "create" | "update")[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AccessInviteView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AccessListView(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AccessMemberEditView(): import("react/jsx-runtime").JSX.Element;
|