@sekolaos/shared-api 1.1.1 → 1.2.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/{chunk-4ECXVAIQ.cjs → chunk-2IFQLECT.cjs} +6 -6
- package/dist/{chunk-4ECXVAIQ.cjs.map → chunk-2IFQLECT.cjs.map} +1 -1
- package/dist/{chunk-TSLEYQKD.cjs → chunk-6TPAWAST.cjs} +11 -11
- package/dist/{chunk-TSLEYQKD.cjs.map → chunk-6TPAWAST.cjs.map} +1 -1
- package/dist/{chunk-5C4JMJ6P.cjs → chunk-7XRQ255H.cjs} +17 -15
- package/dist/chunk-7XRQ255H.cjs.map +1 -0
- package/dist/{chunk-S6QFHKCE.js → chunk-A5QDNC7Y.js} +13 -10
- package/dist/chunk-A5QDNC7Y.js.map +1 -0
- package/dist/{chunk-XU5UEIBL.js → chunk-ANLONSKR.js} +3 -3
- package/dist/{chunk-XU5UEIBL.js.map → chunk-ANLONSKR.js.map} +1 -1
- package/dist/chunk-BQDHQTPK.js +89 -0
- package/dist/chunk-BQDHQTPK.js.map +1 -0
- package/dist/{chunk-CBIDGS35.cjs → chunk-DBKYIIPQ.cjs} +9 -9
- package/dist/{chunk-CBIDGS35.cjs.map → chunk-DBKYIIPQ.cjs.map} +1 -1
- package/dist/{chunk-R7ACSDOA.cjs → chunk-DUULXOBJ.cjs} +17 -14
- package/dist/chunk-DUULXOBJ.cjs.map +1 -0
- package/dist/{chunk-NBVPN4KL.cjs → chunk-DYBHD45V.cjs} +4 -4
- package/dist/{chunk-NBVPN4KL.cjs.map → chunk-DYBHD45V.cjs.map} +1 -1
- package/dist/{chunk-CP46K2UB.cjs → chunk-HTGZJQNS.cjs} +45 -17
- package/dist/chunk-HTGZJQNS.cjs.map +1 -0
- package/dist/{chunk-AGNLUQKT.cjs → chunk-JZP57ZKZ.cjs} +5 -5
- package/dist/{chunk-AGNLUQKT.cjs.map → chunk-JZP57ZKZ.cjs.map} +1 -1
- package/dist/{chunk-6UCHRWSL.js → chunk-LMSX35HO.js} +3 -3
- package/dist/{chunk-6UCHRWSL.js.map → chunk-LMSX35HO.js.map} +1 -1
- package/dist/{chunk-RMU634GQ.js → chunk-LNGJA2UL.js} +3 -3
- package/dist/{chunk-RMU634GQ.js.map → chunk-LNGJA2UL.js.map} +1 -1
- package/dist/{chunk-XVG5Z6B5.cjs → chunk-N7CHJ3EM.cjs} +4 -3
- package/dist/{chunk-XVG5Z6B5.cjs.map → chunk-N7CHJ3EM.cjs.map} +1 -1
- package/dist/{chunk-ALMSFTRM.js → chunk-PDMQWMZM.js} +4 -3
- package/dist/{chunk-ALMSFTRM.js.map → chunk-PDMQWMZM.js.map} +1 -1
- package/dist/{chunk-ZHCA7HVE.js → chunk-S7N3GQOE.js} +9 -7
- package/dist/chunk-S7N3GQOE.js.map +1 -0
- package/dist/{chunk-R37QQTQS.cjs → chunk-SSPEC3OA.cjs} +6 -6
- package/dist/{chunk-R37QQTQS.cjs.map → chunk-SSPEC3OA.cjs.map} +1 -1
- package/dist/{chunk-3RS57C3E.cjs → chunk-T2TWWLVZ.cjs} +31 -23
- package/dist/chunk-T2TWWLVZ.cjs.map +1 -0
- package/dist/{chunk-YK7QFPBF.js → chunk-T6NCBXWC.js} +3 -3
- package/dist/{chunk-YK7QFPBF.js.map → chunk-T6NCBXWC.js.map} +1 -1
- package/dist/{chunk-LA7MRXWR.js → chunk-WMH2DW3N.js} +3 -3
- package/dist/{chunk-LA7MRXWR.js.map → chunk-WMH2DW3N.js.map} +1 -1
- package/dist/{chunk-AOBHBJ2G.cjs → chunk-WPMDE5ZF.cjs} +16 -13
- package/dist/chunk-WPMDE5ZF.cjs.map +1 -0
- package/dist/{chunk-DMEWJ56D.js → chunk-XOFGB2GD.js} +10 -7
- package/dist/chunk-XOFGB2GD.js.map +1 -0
- package/dist/{chunk-YA2KONBB.js → chunk-ZDBSD2VY.js} +3 -3
- package/dist/{chunk-YA2KONBB.js.map → chunk-ZDBSD2VY.js.map} +1 -1
- package/dist/{chunk-GRBBLS5Y.js → chunk-ZPJ5WHAK.js} +29 -21
- package/dist/chunk-ZPJ5WHAK.js.map +1 -0
- package/dist/index.cjs +146 -138
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -12
- package/dist/keys/index.cjs +13 -13
- package/dist/keys/index.d.cts +1 -0
- package/dist/keys/index.d.ts +1 -0
- package/dist/keys/index.js +1 -1
- package/dist/modules/academic/index.cjs +10 -10
- package/dist/modules/academic/index.js +2 -2
- package/dist/modules/attendance/index.cjs +16 -16
- package/dist/modules/attendance/index.d.cts +6 -5
- package/dist/modules/attendance/index.d.ts +6 -5
- package/dist/modules/attendance/index.js +2 -2
- package/dist/modules/auth/index.cjs +20 -12
- package/dist/modules/auth/index.d.cts +112 -15
- package/dist/modules/auth/index.d.ts +112 -15
- package/dist/modules/auth/index.js +2 -2
- package/dist/modules/classroom/index.cjs +14 -14
- package/dist/modules/classroom/index.d.cts +3 -1
- package/dist/modules/classroom/index.d.ts +3 -1
- package/dist/modules/classroom/index.js +2 -2
- package/dist/modules/lead/index.cjs +10 -10
- package/dist/modules/lead/index.js +2 -2
- package/dist/modules/student/index.cjs +18 -18
- package/dist/modules/student/index.d.cts +4 -2
- package/dist/modules/student/index.d.ts +4 -2
- package/dist/modules/student/index.js +2 -2
- package/dist/modules/subject/index.cjs +8 -8
- package/dist/modules/subject/index.js +2 -2
- package/dist/modules/system/index.cjs +4 -4
- package/dist/modules/system/index.js +2 -2
- package/dist/modules/teaching-schedule/index.cjs +14 -14
- package/dist/modules/teaching-schedule/index.d.cts +12 -7
- package/dist/modules/teaching-schedule/index.d.ts +12 -7
- package/dist/modules/teaching-schedule/index.js +2 -2
- package/dist/modules/tenant/index.cjs +16 -16
- package/dist/modules/tenant/index.js +2 -2
- package/dist/modules/user/index.cjs +14 -14
- package/dist/modules/user/index.js +2 -2
- package/package.json +137 -138
- package/dist/chunk-3RS57C3E.cjs.map +0 -1
- package/dist/chunk-4T52ABA5.js +0 -63
- package/dist/chunk-4T52ABA5.js.map +0 -1
- package/dist/chunk-5C4JMJ6P.cjs.map +0 -1
- package/dist/chunk-AOBHBJ2G.cjs.map +0 -1
- package/dist/chunk-CP46K2UB.cjs.map +0 -1
- package/dist/chunk-DMEWJ56D.js.map +0 -1
- package/dist/chunk-GRBBLS5Y.js.map +0 -1
- package/dist/chunk-R7ACSDOA.cjs.map +0 -1
- package/dist/chunk-S6QFHKCE.js.map +0 -1
- package/dist/chunk-ZHCA7HVE.js.map +0 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { M as MutationOptionsCustom, S as SekolaosApiError, Q as QueryOptionsWithoutKey } from '../../types-BxV0BtVp.cjs';
|
|
3
|
+
import { AuthSession, Tenant, ChangePasswordRequest, LoginRequest, LoginResponse, SelectTenantRequest, SwitchRoleRequest } from '@sekolaos/shared-schema';
|
|
4
|
+
export { AuthSession, ChangePasswordRequest, LoginRequest, LoginResponse, Role, SelectTenantRequest, SwitchRoleRequest, TenantOption, UserProfile } from '@sekolaos/shared-schema';
|
|
5
|
+
import 'axios';
|
|
4
6
|
|
|
5
7
|
interface AuthUserSummary {
|
|
6
8
|
id: string;
|
|
@@ -8,37 +10,132 @@ interface AuthUserSummary {
|
|
|
8
10
|
email: string | null;
|
|
9
11
|
fullName: string;
|
|
10
12
|
}
|
|
11
|
-
/** Payload `
|
|
13
|
+
/** Payload `GET /auth/me`: sesi + profil ringkas user + tenant aktif. */
|
|
12
14
|
interface AuthSessionPayload {
|
|
13
15
|
session: AuthSession;
|
|
14
16
|
user: AuthUserSummary;
|
|
15
17
|
tenant: Tenant;
|
|
16
18
|
}
|
|
17
|
-
declare function login(payload: LoginRequest): Promise<
|
|
18
|
-
declare function
|
|
19
|
+
declare function login(payload: LoginRequest): Promise<LoginResponse>;
|
|
20
|
+
declare function selectTenant(payload: SelectTenantRequest): Promise<LoginResponse>;
|
|
21
|
+
declare function switchRole(payload: SwitchRoleRequest): Promise<AuthSession>;
|
|
19
22
|
declare function logout(): Promise<void>;
|
|
20
|
-
declare function getMe(): Promise<
|
|
23
|
+
declare function getMe(): Promise<AuthSession>;
|
|
21
24
|
declare function changePassword(payload: ChangePasswordRequest): Promise<{
|
|
22
25
|
message: string;
|
|
23
26
|
}>;
|
|
24
|
-
declare function useMe(options?: {
|
|
27
|
+
declare function useMe(options?: QueryOptionsWithoutKey<AuthSession> & {
|
|
25
28
|
enabled?: boolean;
|
|
26
|
-
}): _tanstack_react_query.UseQueryResult<
|
|
27
|
-
|
|
29
|
+
}): _tanstack_react_query.UseQueryResult<{
|
|
30
|
+
tenantId: string;
|
|
31
|
+
userId: string;
|
|
32
|
+
tenantSlug: string;
|
|
33
|
+
activeAcademicYearId: string;
|
|
34
|
+
activeRole: {
|
|
35
|
+
permissions: Record<string, string[]>;
|
|
36
|
+
roleId: string;
|
|
37
|
+
roleName: string;
|
|
38
|
+
roleSlug: string;
|
|
39
|
+
};
|
|
40
|
+
availableRoles: {
|
|
41
|
+
permissions: Record<string, string[]>;
|
|
42
|
+
roleId: string;
|
|
43
|
+
roleName: string;
|
|
44
|
+
roleSlug: string;
|
|
45
|
+
}[];
|
|
46
|
+
}, SekolaosApiError>;
|
|
47
|
+
declare function useLogin(options?: MutationOptionsCustom<LoginResponse, LoginRequest>): _tanstack_react_query.UseMutationResult<{
|
|
48
|
+
status: "SUCCESS" | "REQUIRES_TENANT_SELECTION" | "REQUIRES_ROLE_SELECTION";
|
|
49
|
+
session?: {
|
|
50
|
+
tenantId: string;
|
|
51
|
+
userId: string;
|
|
52
|
+
tenantSlug: string;
|
|
53
|
+
activeAcademicYearId: string;
|
|
54
|
+
activeRole: {
|
|
55
|
+
permissions: Record<string, string[]>;
|
|
56
|
+
roleId: string;
|
|
57
|
+
roleName: string;
|
|
58
|
+
roleSlug: string;
|
|
59
|
+
};
|
|
60
|
+
availableRoles: {
|
|
61
|
+
permissions: Record<string, string[]>;
|
|
62
|
+
roleId: string;
|
|
63
|
+
roleName: string;
|
|
64
|
+
roleSlug: string;
|
|
65
|
+
}[];
|
|
66
|
+
} | undefined;
|
|
67
|
+
availableTenants?: {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
slug: string;
|
|
71
|
+
npsn?: string | null | undefined;
|
|
72
|
+
logoUrl?: string | null | undefined;
|
|
73
|
+
}[] | undefined;
|
|
74
|
+
preAuthToken?: string | undefined;
|
|
75
|
+
}, SekolaosApiError, {
|
|
28
76
|
usernameOrEmail: string;
|
|
29
77
|
password: string;
|
|
30
|
-
tenantSlug?: string | undefined;
|
|
31
78
|
}, unknown>;
|
|
32
|
-
declare function
|
|
79
|
+
declare function useSelectTenant(options?: MutationOptionsCustom<LoginResponse, SelectTenantRequest>): _tanstack_react_query.UseMutationResult<{
|
|
80
|
+
status: "SUCCESS" | "REQUIRES_TENANT_SELECTION" | "REQUIRES_ROLE_SELECTION";
|
|
81
|
+
session?: {
|
|
82
|
+
tenantId: string;
|
|
83
|
+
userId: string;
|
|
84
|
+
tenantSlug: string;
|
|
85
|
+
activeAcademicYearId: string;
|
|
86
|
+
activeRole: {
|
|
87
|
+
permissions: Record<string, string[]>;
|
|
88
|
+
roleId: string;
|
|
89
|
+
roleName: string;
|
|
90
|
+
roleSlug: string;
|
|
91
|
+
};
|
|
92
|
+
availableRoles: {
|
|
93
|
+
permissions: Record<string, string[]>;
|
|
94
|
+
roleId: string;
|
|
95
|
+
roleName: string;
|
|
96
|
+
roleSlug: string;
|
|
97
|
+
}[];
|
|
98
|
+
} | undefined;
|
|
99
|
+
availableTenants?: {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
slug: string;
|
|
103
|
+
npsn?: string | null | undefined;
|
|
104
|
+
logoUrl?: string | null | undefined;
|
|
105
|
+
}[] | undefined;
|
|
106
|
+
preAuthToken?: string | undefined;
|
|
107
|
+
}, SekolaosApiError, {
|
|
108
|
+
tenantId: string;
|
|
109
|
+
}, unknown>;
|
|
110
|
+
declare function useSwitchRole(options?: MutationOptionsCustom<AuthSession, SwitchRoleRequest>): _tanstack_react_query.UseMutationResult<{
|
|
111
|
+
tenantId: string;
|
|
112
|
+
userId: string;
|
|
113
|
+
tenantSlug: string;
|
|
114
|
+
activeAcademicYearId: string;
|
|
115
|
+
activeRole: {
|
|
116
|
+
permissions: Record<string, string[]>;
|
|
117
|
+
roleId: string;
|
|
118
|
+
roleName: string;
|
|
119
|
+
roleSlug: string;
|
|
120
|
+
};
|
|
121
|
+
availableRoles: {
|
|
122
|
+
permissions: Record<string, string[]>;
|
|
123
|
+
roleId: string;
|
|
124
|
+
roleName: string;
|
|
125
|
+
roleSlug: string;
|
|
126
|
+
}[];
|
|
127
|
+
}, SekolaosApiError, {
|
|
33
128
|
academicYearId: string;
|
|
34
129
|
targetRoleId: string;
|
|
35
130
|
}, unknown>;
|
|
36
|
-
declare function useLogout(): _tanstack_react_query.UseMutationResult<void,
|
|
37
|
-
declare function useChangePassword(
|
|
131
|
+
declare function useLogout(options?: MutationOptionsCustom<void, void>): _tanstack_react_query.UseMutationResult<void, SekolaosApiError, void, unknown>;
|
|
132
|
+
declare function useChangePassword(options?: MutationOptionsCustom<{
|
|
133
|
+
message: string;
|
|
134
|
+
}, ChangePasswordRequest>): _tanstack_react_query.UseMutationResult<{
|
|
38
135
|
message: string;
|
|
39
|
-
},
|
|
136
|
+
}, SekolaosApiError, {
|
|
40
137
|
currentPassword: string;
|
|
41
138
|
newPassword: string;
|
|
42
139
|
}, unknown>;
|
|
43
140
|
|
|
44
|
-
export { type AuthSessionPayload, type AuthUserSummary, changePassword, getMe, login, logout, switchRole, useChangePassword, useLogin, useLogout, useMe, useSwitchRole };
|
|
141
|
+
export { type AuthSessionPayload, type AuthUserSummary, changePassword, getMe, login, logout, selectTenant, switchRole, useChangePassword, useLogin, useLogout, useMe, useSelectTenant, useSwitchRole };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { M as MutationOptionsCustom, S as SekolaosApiError, Q as QueryOptionsWithoutKey } from '../../types-BxV0BtVp.js';
|
|
3
|
+
import { AuthSession, Tenant, ChangePasswordRequest, LoginRequest, LoginResponse, SelectTenantRequest, SwitchRoleRequest } from '@sekolaos/shared-schema';
|
|
4
|
+
export { AuthSession, ChangePasswordRequest, LoginRequest, LoginResponse, Role, SelectTenantRequest, SwitchRoleRequest, TenantOption, UserProfile } from '@sekolaos/shared-schema';
|
|
5
|
+
import 'axios';
|
|
4
6
|
|
|
5
7
|
interface AuthUserSummary {
|
|
6
8
|
id: string;
|
|
@@ -8,37 +10,132 @@ interface AuthUserSummary {
|
|
|
8
10
|
email: string | null;
|
|
9
11
|
fullName: string;
|
|
10
12
|
}
|
|
11
|
-
/** Payload `
|
|
13
|
+
/** Payload `GET /auth/me`: sesi + profil ringkas user + tenant aktif. */
|
|
12
14
|
interface AuthSessionPayload {
|
|
13
15
|
session: AuthSession;
|
|
14
16
|
user: AuthUserSummary;
|
|
15
17
|
tenant: Tenant;
|
|
16
18
|
}
|
|
17
|
-
declare function login(payload: LoginRequest): Promise<
|
|
18
|
-
declare function
|
|
19
|
+
declare function login(payload: LoginRequest): Promise<LoginResponse>;
|
|
20
|
+
declare function selectTenant(payload: SelectTenantRequest): Promise<LoginResponse>;
|
|
21
|
+
declare function switchRole(payload: SwitchRoleRequest): Promise<AuthSession>;
|
|
19
22
|
declare function logout(): Promise<void>;
|
|
20
|
-
declare function getMe(): Promise<
|
|
23
|
+
declare function getMe(): Promise<AuthSession>;
|
|
21
24
|
declare function changePassword(payload: ChangePasswordRequest): Promise<{
|
|
22
25
|
message: string;
|
|
23
26
|
}>;
|
|
24
|
-
declare function useMe(options?: {
|
|
27
|
+
declare function useMe(options?: QueryOptionsWithoutKey<AuthSession> & {
|
|
25
28
|
enabled?: boolean;
|
|
26
|
-
}): _tanstack_react_query.UseQueryResult<
|
|
27
|
-
|
|
29
|
+
}): _tanstack_react_query.UseQueryResult<{
|
|
30
|
+
tenantId: string;
|
|
31
|
+
userId: string;
|
|
32
|
+
tenantSlug: string;
|
|
33
|
+
activeAcademicYearId: string;
|
|
34
|
+
activeRole: {
|
|
35
|
+
permissions: Record<string, string[]>;
|
|
36
|
+
roleId: string;
|
|
37
|
+
roleName: string;
|
|
38
|
+
roleSlug: string;
|
|
39
|
+
};
|
|
40
|
+
availableRoles: {
|
|
41
|
+
permissions: Record<string, string[]>;
|
|
42
|
+
roleId: string;
|
|
43
|
+
roleName: string;
|
|
44
|
+
roleSlug: string;
|
|
45
|
+
}[];
|
|
46
|
+
}, SekolaosApiError>;
|
|
47
|
+
declare function useLogin(options?: MutationOptionsCustom<LoginResponse, LoginRequest>): _tanstack_react_query.UseMutationResult<{
|
|
48
|
+
status: "SUCCESS" | "REQUIRES_TENANT_SELECTION" | "REQUIRES_ROLE_SELECTION";
|
|
49
|
+
session?: {
|
|
50
|
+
tenantId: string;
|
|
51
|
+
userId: string;
|
|
52
|
+
tenantSlug: string;
|
|
53
|
+
activeAcademicYearId: string;
|
|
54
|
+
activeRole: {
|
|
55
|
+
permissions: Record<string, string[]>;
|
|
56
|
+
roleId: string;
|
|
57
|
+
roleName: string;
|
|
58
|
+
roleSlug: string;
|
|
59
|
+
};
|
|
60
|
+
availableRoles: {
|
|
61
|
+
permissions: Record<string, string[]>;
|
|
62
|
+
roleId: string;
|
|
63
|
+
roleName: string;
|
|
64
|
+
roleSlug: string;
|
|
65
|
+
}[];
|
|
66
|
+
} | undefined;
|
|
67
|
+
availableTenants?: {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
slug: string;
|
|
71
|
+
npsn?: string | null | undefined;
|
|
72
|
+
logoUrl?: string | null | undefined;
|
|
73
|
+
}[] | undefined;
|
|
74
|
+
preAuthToken?: string | undefined;
|
|
75
|
+
}, SekolaosApiError, {
|
|
28
76
|
usernameOrEmail: string;
|
|
29
77
|
password: string;
|
|
30
|
-
tenantSlug?: string | undefined;
|
|
31
78
|
}, unknown>;
|
|
32
|
-
declare function
|
|
79
|
+
declare function useSelectTenant(options?: MutationOptionsCustom<LoginResponse, SelectTenantRequest>): _tanstack_react_query.UseMutationResult<{
|
|
80
|
+
status: "SUCCESS" | "REQUIRES_TENANT_SELECTION" | "REQUIRES_ROLE_SELECTION";
|
|
81
|
+
session?: {
|
|
82
|
+
tenantId: string;
|
|
83
|
+
userId: string;
|
|
84
|
+
tenantSlug: string;
|
|
85
|
+
activeAcademicYearId: string;
|
|
86
|
+
activeRole: {
|
|
87
|
+
permissions: Record<string, string[]>;
|
|
88
|
+
roleId: string;
|
|
89
|
+
roleName: string;
|
|
90
|
+
roleSlug: string;
|
|
91
|
+
};
|
|
92
|
+
availableRoles: {
|
|
93
|
+
permissions: Record<string, string[]>;
|
|
94
|
+
roleId: string;
|
|
95
|
+
roleName: string;
|
|
96
|
+
roleSlug: string;
|
|
97
|
+
}[];
|
|
98
|
+
} | undefined;
|
|
99
|
+
availableTenants?: {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
slug: string;
|
|
103
|
+
npsn?: string | null | undefined;
|
|
104
|
+
logoUrl?: string | null | undefined;
|
|
105
|
+
}[] | undefined;
|
|
106
|
+
preAuthToken?: string | undefined;
|
|
107
|
+
}, SekolaosApiError, {
|
|
108
|
+
tenantId: string;
|
|
109
|
+
}, unknown>;
|
|
110
|
+
declare function useSwitchRole(options?: MutationOptionsCustom<AuthSession, SwitchRoleRequest>): _tanstack_react_query.UseMutationResult<{
|
|
111
|
+
tenantId: string;
|
|
112
|
+
userId: string;
|
|
113
|
+
tenantSlug: string;
|
|
114
|
+
activeAcademicYearId: string;
|
|
115
|
+
activeRole: {
|
|
116
|
+
permissions: Record<string, string[]>;
|
|
117
|
+
roleId: string;
|
|
118
|
+
roleName: string;
|
|
119
|
+
roleSlug: string;
|
|
120
|
+
};
|
|
121
|
+
availableRoles: {
|
|
122
|
+
permissions: Record<string, string[]>;
|
|
123
|
+
roleId: string;
|
|
124
|
+
roleName: string;
|
|
125
|
+
roleSlug: string;
|
|
126
|
+
}[];
|
|
127
|
+
}, SekolaosApiError, {
|
|
33
128
|
academicYearId: string;
|
|
34
129
|
targetRoleId: string;
|
|
35
130
|
}, unknown>;
|
|
36
|
-
declare function useLogout(): _tanstack_react_query.UseMutationResult<void,
|
|
37
|
-
declare function useChangePassword(
|
|
131
|
+
declare function useLogout(options?: MutationOptionsCustom<void, void>): _tanstack_react_query.UseMutationResult<void, SekolaosApiError, void, unknown>;
|
|
132
|
+
declare function useChangePassword(options?: MutationOptionsCustom<{
|
|
133
|
+
message: string;
|
|
134
|
+
}, ChangePasswordRequest>): _tanstack_react_query.UseMutationResult<{
|
|
38
135
|
message: string;
|
|
39
|
-
},
|
|
136
|
+
}, SekolaosApiError, {
|
|
40
137
|
currentPassword: string;
|
|
41
138
|
newPassword: string;
|
|
42
139
|
}, unknown>;
|
|
43
140
|
|
|
44
|
-
export { type AuthSessionPayload, type AuthUserSummary, changePassword, getMe, login, logout, switchRole, useChangePassword, useLogin, useLogout, useMe, useSwitchRole };
|
|
141
|
+
export { type AuthSessionPayload, type AuthUserSummary, changePassword, getMe, login, logout, selectTenant, switchRole, useChangePassword, useLogin, useLogout, useMe, useSelectTenant, useSwitchRole };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { changePassword, getMe, login, logout, switchRole, useChangePassword, useLogin, useLogout, useMe, useSwitchRole } from '../../chunk-
|
|
1
|
+
export { changePassword, getMe, login, logout, selectTenant, switchRole, useChangePassword, useLogin, useLogout, useMe, useSelectTenant, useSwitchRole } from '../../chunk-BQDHQTPK.js';
|
|
2
2
|
import '../../chunk-MRFGUSN2.js';
|
|
3
3
|
import '../../chunk-6JGO2CUT.js';
|
|
4
4
|
import '../../chunk-GRXFSXG5.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-PDMQWMZM.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWPMDE5ZF_cjs = require('../../chunk-WPMDE5ZF.cjs');
|
|
4
4
|
require('../../chunk-QJSOSQ7M.cjs');
|
|
5
5
|
require('../../chunk-NGFFI4XQ.cjs');
|
|
6
6
|
require('../../chunk-PPK3HQOY.cjs');
|
|
7
|
-
require('../../chunk-
|
|
7
|
+
require('../../chunk-N7CHJ3EM.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "createClassroom", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkWPMDE5ZF_cjs.createClassroom; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "getClassroom", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkWPMDE5ZF_cjs.getClassroom; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "getClassroomStudents", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkWPMDE5ZF_cjs.getClassroomStudents; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "listClassrooms", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkWPMDE5ZF_cjs.listClassrooms; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "promoteClassStudents", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkWPMDE5ZF_cjs.promoteClassStudents; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "updateClassroom", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkWPMDE5ZF_cjs.updateClassroom; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "useClassroom", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkWPMDE5ZF_cjs.useClassroom; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "useClassroomStudents", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkWPMDE5ZF_cjs.useClassroomStudents; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "useClassrooms", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkWPMDE5ZF_cjs.useClassrooms; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "useCreateClassroom", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkWPMDE5ZF_cjs.useCreateClassroom; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "usePromoteClassStudents", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkWPMDE5ZF_cjs.usePromoteClassStudents; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "useUpdateClassroom", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkWPMDE5ZF_cjs.useUpdateClassroom; }
|
|
58
58
|
});
|
|
59
59
|
//# sourceMappingURL=index.cjs.map
|
|
60
60
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { M as MutationOptionsCustom, S as SekolaosApiError } from '../../types-BxV0BtVp.cjs';
|
|
2
3
|
import { CreateClassroomInput, ClassRoom, Student, ClassroomListQuery, PromoteClassStudentsInput, UpdateClassroomInput } from '@sekolaos/shared-schema';
|
|
3
4
|
export { ClassRoom, ClassroomListQuery, CreateClassroomInput, PromoteClassStudentsInput, Student, UpdateClassroomInput } from '@sekolaos/shared-schema';
|
|
5
|
+
import 'axios';
|
|
4
6
|
|
|
5
7
|
declare function listClassrooms(params?: Partial<ClassroomListQuery>): Promise<ClassRoom[]>;
|
|
6
8
|
declare function getClassroom(id: string): Promise<ClassRoom>;
|
|
@@ -74,7 +76,7 @@ declare function useUpdateClassroom(): _tanstack_react_query.UseMutationResult<{
|
|
|
74
76
|
id: string;
|
|
75
77
|
payload: UpdateClassroomInput;
|
|
76
78
|
}, unknown>;
|
|
77
|
-
declare function usePromoteClassStudents(): _tanstack_react_query.UseMutationResult<void,
|
|
79
|
+
declare function usePromoteClassStudents(options?: MutationOptionsCustom<void, PromoteClassStudentsInput>): _tanstack_react_query.UseMutationResult<void, SekolaosApiError, {
|
|
78
80
|
sourceClassroomId: string;
|
|
79
81
|
targetClassroomId: string;
|
|
80
82
|
targetAcademicYearId: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { M as MutationOptionsCustom, S as SekolaosApiError } from '../../types-BxV0BtVp.js';
|
|
2
3
|
import { CreateClassroomInput, ClassRoom, Student, ClassroomListQuery, PromoteClassStudentsInput, UpdateClassroomInput } from '@sekolaos/shared-schema';
|
|
3
4
|
export { ClassRoom, ClassroomListQuery, CreateClassroomInput, PromoteClassStudentsInput, Student, UpdateClassroomInput } from '@sekolaos/shared-schema';
|
|
5
|
+
import 'axios';
|
|
4
6
|
|
|
5
7
|
declare function listClassrooms(params?: Partial<ClassroomListQuery>): Promise<ClassRoom[]>;
|
|
6
8
|
declare function getClassroom(id: string): Promise<ClassRoom>;
|
|
@@ -74,7 +76,7 @@ declare function useUpdateClassroom(): _tanstack_react_query.UseMutationResult<{
|
|
|
74
76
|
id: string;
|
|
75
77
|
payload: UpdateClassroomInput;
|
|
76
78
|
}, unknown>;
|
|
77
|
-
declare function usePromoteClassStudents(): _tanstack_react_query.UseMutationResult<void,
|
|
79
|
+
declare function usePromoteClassStudents(options?: MutationOptionsCustom<void, PromoteClassStudentsInput>): _tanstack_react_query.UseMutationResult<void, SekolaosApiError, {
|
|
78
80
|
sourceClassroomId: string;
|
|
79
81
|
targetClassroomId: string;
|
|
80
82
|
targetAcademicYearId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createClassroom, getClassroom, getClassroomStudents, listClassrooms, promoteClassStudents, updateClassroom, useClassroom, useClassroomStudents, useClassrooms, useCreateClassroom, usePromoteClassStudents, useUpdateClassroom } from '../../chunk-
|
|
1
|
+
export { createClassroom, getClassroom, getClassroomStudents, listClassrooms, promoteClassStudents, updateClassroom, useClassroom, useClassroomStudents, useClassrooms, useCreateClassroom, usePromoteClassStudents, useUpdateClassroom } from '../../chunk-XOFGB2GD.js';
|
|
2
2
|
import '../../chunk-MRFGUSN2.js';
|
|
3
3
|
import '../../chunk-6JGO2CUT.js';
|
|
4
4
|
import '../../chunk-GRXFSXG5.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-PDMQWMZM.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkJZP57ZKZ_cjs = require('../../chunk-JZP57ZKZ.cjs');
|
|
4
4
|
require('../../chunk-QJSOSQ7M.cjs');
|
|
5
5
|
require('../../chunk-NGFFI4XQ.cjs');
|
|
6
6
|
require('../../chunk-PPK3HQOY.cjs');
|
|
7
|
-
require('../../chunk-
|
|
7
|
+
require('../../chunk-N7CHJ3EM.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "createLeadInquiry", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkJZP57ZKZ_cjs.createLeadInquiry; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "listLeads", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkJZP57ZKZ_cjs.listLeads; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "requestDemoSchedule", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkJZP57ZKZ_cjs.requestDemoSchedule; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "updateLeadStatus", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkJZP57ZKZ_cjs.updateLeadStatus; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "useCreateLeadInquiry", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkJZP57ZKZ_cjs.useCreateLeadInquiry; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "useLeads", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkJZP57ZKZ_cjs.useLeads; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "useRequestDemoSchedule", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkJZP57ZKZ_cjs.useRequestDemoSchedule; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "useUpdateLeadStatus", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkJZP57ZKZ_cjs.useUpdateLeadStatus; }
|
|
42
42
|
});
|
|
43
43
|
//# sourceMappingURL=index.cjs.map
|
|
44
44
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createLeadInquiry, listLeads, requestDemoSchedule, updateLeadStatus, useCreateLeadInquiry, useLeads, useRequestDemoSchedule, useUpdateLeadStatus } from '../../chunk-
|
|
1
|
+
export { createLeadInquiry, listLeads, requestDemoSchedule, updateLeadStatus, useCreateLeadInquiry, useLeads, useRequestDemoSchedule, useUpdateLeadStatus } from '../../chunk-LMSX35HO.js';
|
|
2
2
|
import '../../chunk-MRFGUSN2.js';
|
|
3
3
|
import '../../chunk-6JGO2CUT.js';
|
|
4
4
|
import '../../chunk-GRXFSXG5.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-PDMQWMZM.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7XRQ255H_cjs = require('../../chunk-7XRQ255H.cjs');
|
|
4
4
|
require('../../chunk-QJSOSQ7M.cjs');
|
|
5
5
|
require('../../chunk-NGFFI4XQ.cjs');
|
|
6
6
|
require('../../chunk-PPK3HQOY.cjs');
|
|
7
|
-
require('../../chunk-
|
|
7
|
+
require('../../chunk-N7CHJ3EM.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "bulkImportStudents", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunk7XRQ255H_cjs.bulkImportStudents; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "createStudent", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunk7XRQ255H_cjs.createStudent; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "deleteStudent", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunk7XRQ255H_cjs.deleteStudent; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "getStudent", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunk7XRQ255H_cjs.getStudent; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "getStudentKioskCache", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunk7XRQ255H_cjs.getStudentKioskCache; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "getStudentQrPayload", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunk7XRQ255H_cjs.getStudentQrPayload; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "listStudents", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunk7XRQ255H_cjs.listStudents; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "updateStudent", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunk7XRQ255H_cjs.updateStudent; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "useBulkImportStudents", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunk7XRQ255H_cjs.useBulkImportStudents; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "useCreateStudent", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunk7XRQ255H_cjs.useCreateStudent; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "useDeleteStudent", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunk7XRQ255H_cjs.useDeleteStudent; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "useStudent", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk7XRQ255H_cjs.useStudent; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "useStudentKioskCache", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk7XRQ255H_cjs.useStudentKioskCache; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "useStudentQrCode", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunk7XRQ255H_cjs.useStudentQrCode; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "useStudents", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunk7XRQ255H_cjs.useStudents; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "useUpdateStudent", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunk7XRQ255H_cjs.useUpdateStudent; }
|
|
74
74
|
});
|
|
75
75
|
//# sourceMappingURL=index.cjs.map
|
|
76
76
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { M as MutationOptionsCustom, S as SekolaosApiError } from '../../types-BxV0BtVp.cjs';
|
|
2
3
|
import { BulkImportStudentRequest, BulkImportStudentResponse, CreateStudentInput, Student, StudentOfflineCache, StudentQrPayload, StudentListQuery, UpdateStudentInput } from '@sekolaos/shared-schema';
|
|
3
4
|
export { BulkImportStudentRequest, BulkImportStudentResponse, CreateStudentInput, Student, StudentListQuery, StudentOfflineCache, StudentQrPayload, UpdateStudentInput } from '@sekolaos/shared-schema';
|
|
5
|
+
import 'axios';
|
|
4
6
|
|
|
5
7
|
declare function listStudents(params?: Partial<StudentListQuery>): Promise<Student[]>;
|
|
6
8
|
declare function getStudent(id: string): Promise<Student>;
|
|
@@ -100,7 +102,7 @@ declare function useUpdateStudent(): _tanstack_react_query.UseMutationResult<{
|
|
|
100
102
|
payload: UpdateStudentInput;
|
|
101
103
|
}, unknown>;
|
|
102
104
|
declare function useDeleteStudent(): _tanstack_react_query.UseMutationResult<void, Error, string, unknown>;
|
|
103
|
-
declare function useBulkImportStudents(): _tanstack_react_query.UseMutationResult<{
|
|
105
|
+
declare function useBulkImportStudents(options?: MutationOptionsCustom<BulkImportStudentResponse, BulkImportStudentRequest>): _tanstack_react_query.UseMutationResult<{
|
|
104
106
|
errors: {
|
|
105
107
|
message: string;
|
|
106
108
|
row: number;
|
|
@@ -109,7 +111,7 @@ declare function useBulkImportStudents(): _tanstack_react_query.UseMutationResul
|
|
|
109
111
|
totalProcessed: number;
|
|
110
112
|
totalSuccess: number;
|
|
111
113
|
totalFailed: number;
|
|
112
|
-
},
|
|
114
|
+
}, SekolaosApiError, {
|
|
113
115
|
academicYearId: string;
|
|
114
116
|
students: {
|
|
115
117
|
fullName: string;
|