@sekolaos/shared-api 1.1.1 → 1.3.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 (129) hide show
  1. package/dist/{chunk-3RS57C3E.cjs → chunk-23XAR4OH.cjs} +33 -25
  2. package/dist/chunk-23XAR4OH.cjs.map +1 -0
  3. package/dist/{chunk-YTF4Z7I4.js → chunk-2ZN6MTBE.js} +3 -3
  4. package/dist/{chunk-YTF4Z7I4.js.map → chunk-2ZN6MTBE.js.map} +1 -1
  5. package/dist/{chunk-QJSOSQ7M.cjs → chunk-3TOBH3YY.cjs} +8 -3
  6. package/dist/chunk-3TOBH3YY.cjs.map +1 -0
  7. package/dist/chunk-5KSKHZWB.cjs +16 -0
  8. package/dist/chunk-5KSKHZWB.cjs.map +1 -0
  9. package/dist/{chunk-AOBHBJ2G.cjs → chunk-AMKVNGY4.cjs} +18 -15
  10. package/dist/chunk-AMKVNGY4.cjs.map +1 -0
  11. package/dist/{chunk-R37QQTQS.cjs → chunk-BBJBCD2K.cjs} +8 -8
  12. package/dist/{chunk-R37QQTQS.cjs.map → chunk-BBJBCD2K.cjs.map} +1 -1
  13. package/dist/{chunk-RMU634GQ.js → chunk-CSEMYBBZ.js} +4 -4
  14. package/dist/{chunk-RMU634GQ.js.map → chunk-CSEMYBBZ.js.map} +1 -1
  15. package/dist/{chunk-6UCHRWSL.js → chunk-DATSHIPR.js} +4 -4
  16. package/dist/{chunk-6UCHRWSL.js.map → chunk-DATSHIPR.js.map} +1 -1
  17. package/dist/{chunk-DMEWJ56D.js → chunk-FVPR2MOB.js} +11 -8
  18. package/dist/chunk-FVPR2MOB.js.map +1 -0
  19. package/dist/chunk-H3CE34TG.js +14 -0
  20. package/dist/chunk-H3CE34TG.js.map +1 -0
  21. package/dist/{chunk-XVG5Z6B5.cjs → chunk-HISL2IF2.cjs} +4 -3
  22. package/dist/chunk-HISL2IF2.cjs.map +1 -0
  23. package/dist/{chunk-S6QFHKCE.js → chunk-ID3UGFZZ.js} +14 -11
  24. package/dist/chunk-ID3UGFZZ.js.map +1 -0
  25. package/dist/chunk-JGCFIGB3.js +129 -0
  26. package/dist/chunk-JGCFIGB3.js.map +1 -0
  27. package/dist/{chunk-R7ACSDOA.cjs → chunk-JVX37TC5.cjs} +19 -16
  28. package/dist/chunk-JVX37TC5.cjs.map +1 -0
  29. package/dist/{chunk-CBIDGS35.cjs → chunk-KB4TZTAC.cjs} +11 -11
  30. package/dist/{chunk-CBIDGS35.cjs.map → chunk-KB4TZTAC.cjs.map} +1 -1
  31. package/dist/{chunk-TSLEYQKD.cjs → chunk-LS4ZQRFS.cjs} +13 -13
  32. package/dist/{chunk-TSLEYQKD.cjs.map → chunk-LS4ZQRFS.cjs.map} +1 -1
  33. package/dist/{chunk-4ECXVAIQ.cjs → chunk-N4OBLYCQ.cjs} +8 -8
  34. package/dist/{chunk-4ECXVAIQ.cjs.map → chunk-N4OBLYCQ.cjs.map} +1 -1
  35. package/dist/{chunk-ZHCA7HVE.js → chunk-NCENQB6W.js} +10 -8
  36. package/dist/chunk-NCENQB6W.js.map +1 -0
  37. package/dist/{chunk-LA7MRXWR.js → chunk-NPR4GLFZ.js} +4 -4
  38. package/dist/{chunk-LA7MRXWR.js.map → chunk-NPR4GLFZ.js.map} +1 -1
  39. package/dist/chunk-OVHSXH7Z.cjs +102 -0
  40. package/dist/chunk-OVHSXH7Z.cjs.map +1 -0
  41. package/dist/chunk-PMN2DTYF.js +89 -0
  42. package/dist/chunk-PMN2DTYF.js.map +1 -0
  43. package/dist/{chunk-XU5UEIBL.js → chunk-PQFTPOP4.js} +4 -4
  44. package/dist/{chunk-XU5UEIBL.js.map → chunk-PQFTPOP4.js.map} +1 -1
  45. package/dist/{chunk-MRFGUSN2.js → chunk-Q5ZX6TKB.js} +8 -3
  46. package/dist/chunk-Q5ZX6TKB.js.map +1 -0
  47. package/dist/{chunk-GRBBLS5Y.js → chunk-RDW4IZWK.js} +30 -22
  48. package/dist/chunk-RDW4IZWK.js.map +1 -0
  49. package/dist/{chunk-YK7QFPBF.js → chunk-ROK2DEVT.js} +4 -4
  50. package/dist/{chunk-YK7QFPBF.js.map → chunk-ROK2DEVT.js.map} +1 -1
  51. package/dist/{chunk-AGNLUQKT.cjs → chunk-SBBVQ3Z2.cjs} +7 -7
  52. package/dist/{chunk-AGNLUQKT.cjs.map → chunk-SBBVQ3Z2.cjs.map} +1 -1
  53. package/dist/{chunk-BOASJ3VG.cjs → chunk-TO5MBW6Z.cjs} +4 -4
  54. package/dist/{chunk-BOASJ3VG.cjs.map → chunk-TO5MBW6Z.cjs.map} +1 -1
  55. package/dist/{chunk-YA2KONBB.js → chunk-U7YG2GA7.js} +4 -4
  56. package/dist/{chunk-YA2KONBB.js.map → chunk-U7YG2GA7.js.map} +1 -1
  57. package/dist/chunk-XINNTOCO.cjs +151 -0
  58. package/dist/chunk-XINNTOCO.cjs.map +1 -0
  59. package/dist/{chunk-ALMSFTRM.js → chunk-XNH67ORL.js} +4 -3
  60. package/dist/chunk-XNH67ORL.js.map +1 -0
  61. package/dist/{chunk-5C4JMJ6P.cjs → chunk-Y4YURM53.cjs} +19 -17
  62. package/dist/chunk-Y4YURM53.cjs.map +1 -0
  63. package/dist/{chunk-NBVPN4KL.cjs → chunk-ZPEEFUEC.cjs} +6 -6
  64. package/dist/{chunk-NBVPN4KL.cjs.map → chunk-ZPEEFUEC.cjs.map} +1 -1
  65. package/dist/index.cjs +280 -182
  66. package/dist/index.d.cts +9 -3
  67. package/dist/index.d.ts +9 -3
  68. package/dist/index.js +16 -14
  69. package/dist/keys/index.cjs +18 -13
  70. package/dist/keys/index.d.cts +14 -1
  71. package/dist/keys/index.d.ts +14 -1
  72. package/dist/keys/index.js +2 -1
  73. package/dist/modules/academic/index.cjs +12 -11
  74. package/dist/modules/academic/index.js +4 -3
  75. package/dist/modules/attendance/index.cjs +18 -17
  76. package/dist/modules/attendance/index.d.cts +6 -5
  77. package/dist/modules/attendance/index.d.ts +6 -5
  78. package/dist/modules/attendance/index.js +4 -3
  79. package/dist/modules/auth/index.cjs +22 -13
  80. package/dist/modules/auth/index.d.cts +112 -15
  81. package/dist/modules/auth/index.d.ts +112 -15
  82. package/dist/modules/auth/index.js +4 -3
  83. package/dist/modules/classroom/index.cjs +16 -15
  84. package/dist/modules/classroom/index.d.cts +3 -1
  85. package/dist/modules/classroom/index.d.ts +3 -1
  86. package/dist/modules/classroom/index.js +4 -3
  87. package/dist/modules/lead/index.cjs +12 -11
  88. package/dist/modules/lead/index.js +4 -3
  89. package/dist/modules/platform-admin/index.cjs +96 -0
  90. package/dist/modules/platform-admin/index.cjs.map +1 -0
  91. package/dist/modules/platform-admin/index.d.cts +125 -0
  92. package/dist/modules/platform-admin/index.d.ts +125 -0
  93. package/dist/modules/platform-admin/index.js +7 -0
  94. package/dist/modules/platform-admin/index.js.map +1 -0
  95. package/dist/modules/student/index.cjs +20 -19
  96. package/dist/modules/student/index.d.cts +4 -2
  97. package/dist/modules/student/index.d.ts +4 -2
  98. package/dist/modules/student/index.js +4 -3
  99. package/dist/modules/subject/index.cjs +10 -9
  100. package/dist/modules/subject/index.js +4 -3
  101. package/dist/modules/system/index.cjs +6 -5
  102. package/dist/modules/system/index.js +4 -3
  103. package/dist/modules/teaching-schedule/index.cjs +16 -15
  104. package/dist/modules/teaching-schedule/index.d.cts +12 -7
  105. package/dist/modules/teaching-schedule/index.d.ts +12 -7
  106. package/dist/modules/teaching-schedule/index.js +4 -3
  107. package/dist/modules/tenant/index.cjs +18 -17
  108. package/dist/modules/tenant/index.js +4 -3
  109. package/dist/modules/upload/index.cjs +6 -6
  110. package/dist/modules/upload/index.js +2 -2
  111. package/dist/modules/user/index.cjs +16 -15
  112. package/dist/modules/user/index.js +4 -3
  113. package/package.json +2 -2
  114. package/dist/chunk-3RS57C3E.cjs.map +0 -1
  115. package/dist/chunk-4T52ABA5.js +0 -63
  116. package/dist/chunk-4T52ABA5.js.map +0 -1
  117. package/dist/chunk-5C4JMJ6P.cjs.map +0 -1
  118. package/dist/chunk-ALMSFTRM.js.map +0 -1
  119. package/dist/chunk-AOBHBJ2G.cjs.map +0 -1
  120. package/dist/chunk-CP46K2UB.cjs +0 -74
  121. package/dist/chunk-CP46K2UB.cjs.map +0 -1
  122. package/dist/chunk-DMEWJ56D.js.map +0 -1
  123. package/dist/chunk-GRBBLS5Y.js.map +0 -1
  124. package/dist/chunk-MRFGUSN2.js.map +0 -1
  125. package/dist/chunk-QJSOSQ7M.cjs.map +0 -1
  126. package/dist/chunk-R7ACSDOA.cjs.map +0 -1
  127. package/dist/chunk-S6QFHKCE.js.map +0 -1
  128. package/dist/chunk-XVG5Z6B5.cjs.map +0 -1
  129. 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 { AuthSession, Tenant, ChangePasswordRequest, LoginRequest, SwitchRoleRequest } from '@sekolaos/shared-schema';
3
- export { AuthSession, ChangePasswordRequest, LoginRequest, Role, SwitchRoleRequest, UserProfile } from '@sekolaos/shared-schema';
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 `POST /auth/login`, `POST /auth/switch-role`, dan `GET /auth/me`. */
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<AuthSessionPayload>;
18
- declare function switchRole(payload: SwitchRoleRequest): Promise<AuthSessionPayload>;
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<AuthSessionPayload>;
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<AuthSessionPayload, Error>;
27
- declare function useLogin(): _tanstack_react_query.UseMutationResult<AuthSessionPayload, Error, {
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 useSwitchRole(): _tanstack_react_query.UseMutationResult<AuthSessionPayload, Error, {
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, Error, void, unknown>;
37
- declare function useChangePassword(): _tanstack_react_query.UseMutationResult<{
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
- }, Error, {
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 { AuthSession, Tenant, ChangePasswordRequest, LoginRequest, SwitchRoleRequest } from '@sekolaos/shared-schema';
3
- export { AuthSession, ChangePasswordRequest, LoginRequest, Role, SwitchRoleRequest, UserProfile } from '@sekolaos/shared-schema';
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 `POST /auth/login`, `POST /auth/switch-role`, dan `GET /auth/me`. */
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<AuthSessionPayload>;
18
- declare function switchRole(payload: SwitchRoleRequest): Promise<AuthSessionPayload>;
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<AuthSessionPayload>;
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<AuthSessionPayload, Error>;
27
- declare function useLogin(): _tanstack_react_query.UseMutationResult<AuthSessionPayload, Error, {
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 useSwitchRole(): _tanstack_react_query.UseMutationResult<AuthSessionPayload, Error, {
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, Error, void, unknown>;
37
- declare function useChangePassword(): _tanstack_react_query.UseMutationResult<{
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
- }, Error, {
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,8 @@
1
- export { changePassword, getMe, login, logout, switchRole, useChangePassword, useLogin, useLogout, useMe, useSwitchRole } from '../../chunk-4T52ABA5.js';
2
- import '../../chunk-MRFGUSN2.js';
1
+ export { changePassword, getMe, login, logout, selectTenant, switchRole, useChangePassword, useLogin, useLogout, useMe, useSelectTenant, useSwitchRole } from '../../chunk-PMN2DTYF.js';
2
+ import '../../chunk-Q5ZX6TKB.js';
3
3
  import '../../chunk-6JGO2CUT.js';
4
4
  import '../../chunk-GRXFSXG5.js';
5
- import '../../chunk-ALMSFTRM.js';
5
+ import '../../chunk-XNH67ORL.js';
6
+ import '../../chunk-H3CE34TG.js';
6
7
  //# sourceMappingURL=index.js.map
7
8
  //# sourceMappingURL=index.js.map
@@ -1,60 +1,61 @@
1
1
  'use strict';
2
2
 
3
- var chunkAOBHBJ2G_cjs = require('../../chunk-AOBHBJ2G.cjs');
4
- require('../../chunk-QJSOSQ7M.cjs');
3
+ var chunkAMKVNGY4_cjs = require('../../chunk-AMKVNGY4.cjs');
4
+ require('../../chunk-3TOBH3YY.cjs');
5
5
  require('../../chunk-NGFFI4XQ.cjs');
6
6
  require('../../chunk-PPK3HQOY.cjs');
7
- require('../../chunk-XVG5Z6B5.cjs');
7
+ require('../../chunk-HISL2IF2.cjs');
8
+ require('../../chunk-5KSKHZWB.cjs');
8
9
 
9
10
 
10
11
 
11
12
  Object.defineProperty(exports, "createClassroom", {
12
13
  enumerable: true,
13
- get: function () { return chunkAOBHBJ2G_cjs.createClassroom; }
14
+ get: function () { return chunkAMKVNGY4_cjs.createClassroom; }
14
15
  });
15
16
  Object.defineProperty(exports, "getClassroom", {
16
17
  enumerable: true,
17
- get: function () { return chunkAOBHBJ2G_cjs.getClassroom; }
18
+ get: function () { return chunkAMKVNGY4_cjs.getClassroom; }
18
19
  });
19
20
  Object.defineProperty(exports, "getClassroomStudents", {
20
21
  enumerable: true,
21
- get: function () { return chunkAOBHBJ2G_cjs.getClassroomStudents; }
22
+ get: function () { return chunkAMKVNGY4_cjs.getClassroomStudents; }
22
23
  });
23
24
  Object.defineProperty(exports, "listClassrooms", {
24
25
  enumerable: true,
25
- get: function () { return chunkAOBHBJ2G_cjs.listClassrooms; }
26
+ get: function () { return chunkAMKVNGY4_cjs.listClassrooms; }
26
27
  });
27
28
  Object.defineProperty(exports, "promoteClassStudents", {
28
29
  enumerable: true,
29
- get: function () { return chunkAOBHBJ2G_cjs.promoteClassStudents; }
30
+ get: function () { return chunkAMKVNGY4_cjs.promoteClassStudents; }
30
31
  });
31
32
  Object.defineProperty(exports, "updateClassroom", {
32
33
  enumerable: true,
33
- get: function () { return chunkAOBHBJ2G_cjs.updateClassroom; }
34
+ get: function () { return chunkAMKVNGY4_cjs.updateClassroom; }
34
35
  });
35
36
  Object.defineProperty(exports, "useClassroom", {
36
37
  enumerable: true,
37
- get: function () { return chunkAOBHBJ2G_cjs.useClassroom; }
38
+ get: function () { return chunkAMKVNGY4_cjs.useClassroom; }
38
39
  });
39
40
  Object.defineProperty(exports, "useClassroomStudents", {
40
41
  enumerable: true,
41
- get: function () { return chunkAOBHBJ2G_cjs.useClassroomStudents; }
42
+ get: function () { return chunkAMKVNGY4_cjs.useClassroomStudents; }
42
43
  });
43
44
  Object.defineProperty(exports, "useClassrooms", {
44
45
  enumerable: true,
45
- get: function () { return chunkAOBHBJ2G_cjs.useClassrooms; }
46
+ get: function () { return chunkAMKVNGY4_cjs.useClassrooms; }
46
47
  });
47
48
  Object.defineProperty(exports, "useCreateClassroom", {
48
49
  enumerable: true,
49
- get: function () { return chunkAOBHBJ2G_cjs.useCreateClassroom; }
50
+ get: function () { return chunkAMKVNGY4_cjs.useCreateClassroom; }
50
51
  });
51
52
  Object.defineProperty(exports, "usePromoteClassStudents", {
52
53
  enumerable: true,
53
- get: function () { return chunkAOBHBJ2G_cjs.usePromoteClassStudents; }
54
+ get: function () { return chunkAMKVNGY4_cjs.usePromoteClassStudents; }
54
55
  });
55
56
  Object.defineProperty(exports, "useUpdateClassroom", {
56
57
  enumerable: true,
57
- get: function () { return chunkAOBHBJ2G_cjs.useUpdateClassroom; }
58
+ get: function () { return chunkAMKVNGY4_cjs.useUpdateClassroom; }
58
59
  });
59
60
  //# sourceMappingURL=index.cjs.map
60
61
  //# 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, Error, {
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, Error, {
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,8 @@
1
- export { createClassroom, getClassroom, getClassroomStudents, listClassrooms, promoteClassStudents, updateClassroom, useClassroom, useClassroomStudents, useClassrooms, useCreateClassroom, usePromoteClassStudents, useUpdateClassroom } from '../../chunk-DMEWJ56D.js';
2
- import '../../chunk-MRFGUSN2.js';
1
+ export { createClassroom, getClassroom, getClassroomStudents, listClassrooms, promoteClassStudents, updateClassroom, useClassroom, useClassroomStudents, useClassrooms, useCreateClassroom, usePromoteClassStudents, useUpdateClassroom } from '../../chunk-FVPR2MOB.js';
2
+ import '../../chunk-Q5ZX6TKB.js';
3
3
  import '../../chunk-6JGO2CUT.js';
4
4
  import '../../chunk-GRXFSXG5.js';
5
- import '../../chunk-ALMSFTRM.js';
5
+ import '../../chunk-XNH67ORL.js';
6
+ import '../../chunk-H3CE34TG.js';
6
7
  //# sourceMappingURL=index.js.map
7
8
  //# sourceMappingURL=index.js.map
@@ -1,44 +1,45 @@
1
1
  'use strict';
2
2
 
3
- var chunkAGNLUQKT_cjs = require('../../chunk-AGNLUQKT.cjs');
4
- require('../../chunk-QJSOSQ7M.cjs');
3
+ var chunkSBBVQ3Z2_cjs = require('../../chunk-SBBVQ3Z2.cjs');
4
+ require('../../chunk-3TOBH3YY.cjs');
5
5
  require('../../chunk-NGFFI4XQ.cjs');
6
6
  require('../../chunk-PPK3HQOY.cjs');
7
- require('../../chunk-XVG5Z6B5.cjs');
7
+ require('../../chunk-HISL2IF2.cjs');
8
+ require('../../chunk-5KSKHZWB.cjs');
8
9
 
9
10
 
10
11
 
11
12
  Object.defineProperty(exports, "createLeadInquiry", {
12
13
  enumerable: true,
13
- get: function () { return chunkAGNLUQKT_cjs.createLeadInquiry; }
14
+ get: function () { return chunkSBBVQ3Z2_cjs.createLeadInquiry; }
14
15
  });
15
16
  Object.defineProperty(exports, "listLeads", {
16
17
  enumerable: true,
17
- get: function () { return chunkAGNLUQKT_cjs.listLeads; }
18
+ get: function () { return chunkSBBVQ3Z2_cjs.listLeads; }
18
19
  });
19
20
  Object.defineProperty(exports, "requestDemoSchedule", {
20
21
  enumerable: true,
21
- get: function () { return chunkAGNLUQKT_cjs.requestDemoSchedule; }
22
+ get: function () { return chunkSBBVQ3Z2_cjs.requestDemoSchedule; }
22
23
  });
23
24
  Object.defineProperty(exports, "updateLeadStatus", {
24
25
  enumerable: true,
25
- get: function () { return chunkAGNLUQKT_cjs.updateLeadStatus; }
26
+ get: function () { return chunkSBBVQ3Z2_cjs.updateLeadStatus; }
26
27
  });
27
28
  Object.defineProperty(exports, "useCreateLeadInquiry", {
28
29
  enumerable: true,
29
- get: function () { return chunkAGNLUQKT_cjs.useCreateLeadInquiry; }
30
+ get: function () { return chunkSBBVQ3Z2_cjs.useCreateLeadInquiry; }
30
31
  });
31
32
  Object.defineProperty(exports, "useLeads", {
32
33
  enumerable: true,
33
- get: function () { return chunkAGNLUQKT_cjs.useLeads; }
34
+ get: function () { return chunkSBBVQ3Z2_cjs.useLeads; }
34
35
  });
35
36
  Object.defineProperty(exports, "useRequestDemoSchedule", {
36
37
  enumerable: true,
37
- get: function () { return chunkAGNLUQKT_cjs.useRequestDemoSchedule; }
38
+ get: function () { return chunkSBBVQ3Z2_cjs.useRequestDemoSchedule; }
38
39
  });
39
40
  Object.defineProperty(exports, "useUpdateLeadStatus", {
40
41
  enumerable: true,
41
- get: function () { return chunkAGNLUQKT_cjs.useUpdateLeadStatus; }
42
+ get: function () { return chunkSBBVQ3Z2_cjs.useUpdateLeadStatus; }
42
43
  });
43
44
  //# sourceMappingURL=index.cjs.map
44
45
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,8 @@
1
- export { createLeadInquiry, listLeads, requestDemoSchedule, updateLeadStatus, useCreateLeadInquiry, useLeads, useRequestDemoSchedule, useUpdateLeadStatus } from '../../chunk-6UCHRWSL.js';
2
- import '../../chunk-MRFGUSN2.js';
1
+ export { createLeadInquiry, listLeads, requestDemoSchedule, updateLeadStatus, useCreateLeadInquiry, useLeads, useRequestDemoSchedule, useUpdateLeadStatus } from '../../chunk-DATSHIPR.js';
2
+ import '../../chunk-Q5ZX6TKB.js';
3
3
  import '../../chunk-6JGO2CUT.js';
4
4
  import '../../chunk-GRXFSXG5.js';
5
- import '../../chunk-ALMSFTRM.js';
5
+ import '../../chunk-XNH67ORL.js';
6
+ import '../../chunk-H3CE34TG.js';
6
7
  //# sourceMappingURL=index.js.map
7
8
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,96 @@
1
+ 'use strict';
2
+
3
+ var chunkXINNTOCO_cjs = require('../../chunk-XINNTOCO.cjs');
4
+ require('../../chunk-3TOBH3YY.cjs');
5
+ require('../../chunk-NGFFI4XQ.cjs');
6
+ require('../../chunk-PPK3HQOY.cjs');
7
+ require('../../chunk-5KSKHZWB.cjs');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "createImpersonationToken", {
12
+ enumerable: true,
13
+ get: function () { return chunkXINNTOCO_cjs.createImpersonationToken; }
14
+ });
15
+ Object.defineProperty(exports, "getPlatformAuditLogs", {
16
+ enumerable: true,
17
+ get: function () { return chunkXINNTOCO_cjs.getPlatformAuditLogs; }
18
+ });
19
+ Object.defineProperty(exports, "getPlatformLeads", {
20
+ enumerable: true,
21
+ get: function () { return chunkXINNTOCO_cjs.getPlatformLeads; }
22
+ });
23
+ Object.defineProperty(exports, "getPlatformMe", {
24
+ enumerable: true,
25
+ get: function () { return chunkXINNTOCO_cjs.getPlatformMe; }
26
+ });
27
+ Object.defineProperty(exports, "getPlatformMetrics", {
28
+ enumerable: true,
29
+ get: function () { return chunkXINNTOCO_cjs.getPlatformMetrics; }
30
+ });
31
+ Object.defineProperty(exports, "getPlatformTenants", {
32
+ enumerable: true,
33
+ get: function () { return chunkXINNTOCO_cjs.getPlatformTenants; }
34
+ });
35
+ Object.defineProperty(exports, "platformAdminLogin", {
36
+ enumerable: true,
37
+ get: function () { return chunkXINNTOCO_cjs.platformAdminLogin; }
38
+ });
39
+ Object.defineProperty(exports, "platformAdminLogout", {
40
+ enumerable: true,
41
+ get: function () { return chunkXINNTOCO_cjs.platformAdminLogout; }
42
+ });
43
+ Object.defineProperty(exports, "provisionTenant", {
44
+ enumerable: true,
45
+ get: function () { return chunkXINNTOCO_cjs.provisionTenant; }
46
+ });
47
+ Object.defineProperty(exports, "updatePlatformLeadStatus", {
48
+ enumerable: true,
49
+ get: function () { return chunkXINNTOCO_cjs.updatePlatformLeadStatus; }
50
+ });
51
+ Object.defineProperty(exports, "updatePlatformTenantModules", {
52
+ enumerable: true,
53
+ get: function () { return chunkXINNTOCO_cjs.updatePlatformTenantModules; }
54
+ });
55
+ Object.defineProperty(exports, "updatePlatformTenantStatus", {
56
+ enumerable: true,
57
+ get: function () { return chunkXINNTOCO_cjs.updatePlatformTenantStatus; }
58
+ });
59
+ Object.defineProperty(exports, "useImpersonateTenantMutation", {
60
+ enumerable: true,
61
+ get: function () { return chunkXINNTOCO_cjs.useImpersonateTenantMutation; }
62
+ });
63
+ Object.defineProperty(exports, "usePlatformLeads", {
64
+ enumerable: true,
65
+ get: function () { return chunkXINNTOCO_cjs.usePlatformLeads; }
66
+ });
67
+ Object.defineProperty(exports, "usePlatformMe", {
68
+ enumerable: true,
69
+ get: function () { return chunkXINNTOCO_cjs.usePlatformMe; }
70
+ });
71
+ Object.defineProperty(exports, "usePlatformMetrics", {
72
+ enumerable: true,
73
+ get: function () { return chunkXINNTOCO_cjs.usePlatformMetrics; }
74
+ });
75
+ Object.defineProperty(exports, "usePlatformTenants", {
76
+ enumerable: true,
77
+ get: function () { return chunkXINNTOCO_cjs.usePlatformTenants; }
78
+ });
79
+ Object.defineProperty(exports, "useProvisionTenantMutation", {
80
+ enumerable: true,
81
+ get: function () { return chunkXINNTOCO_cjs.useProvisionTenantMutation; }
82
+ });
83
+ Object.defineProperty(exports, "useUpdatePlatformLeadStatusMutation", {
84
+ enumerable: true,
85
+ get: function () { return chunkXINNTOCO_cjs.useUpdatePlatformLeadStatusMutation; }
86
+ });
87
+ Object.defineProperty(exports, "useUpdatePlatformTenantModulesMutation", {
88
+ enumerable: true,
89
+ get: function () { return chunkXINNTOCO_cjs.useUpdatePlatformTenantModulesMutation; }
90
+ });
91
+ Object.defineProperty(exports, "useUpdatePlatformTenantStatusMutation", {
92
+ enumerable: true,
93
+ get: function () { return chunkXINNTOCO_cjs.useUpdatePlatformTenantStatusMutation; }
94
+ });
95
+ //# sourceMappingURL=index.cjs.map
96
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}