@sekolaos/shared-api 0.0.0-stage → 1.1.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 (172) hide show
  1. package/dist/chunk-2FTS6JMO.cjs +66 -0
  2. package/dist/chunk-2FTS6JMO.cjs.map +1 -0
  3. package/dist/chunk-3RS57C3E.cjs +90 -0
  4. package/dist/chunk-3RS57C3E.cjs.map +1 -0
  5. package/dist/chunk-4ECXVAIQ.cjs +50 -0
  6. package/dist/chunk-4ECXVAIQ.cjs.map +1 -0
  7. package/dist/chunk-4T52ABA5.js +63 -0
  8. package/dist/chunk-4T52ABA5.js.map +1 -0
  9. package/dist/chunk-6JGO2CUT.js +52 -0
  10. package/dist/chunk-6JGO2CUT.js.map +1 -0
  11. package/dist/chunk-6UCHRWSL.js +43 -0
  12. package/dist/chunk-6UCHRWSL.js.map +1 -0
  13. package/dist/chunk-AGNLUQKT.cjs +52 -0
  14. package/dist/chunk-AGNLUQKT.cjs.map +1 -0
  15. package/dist/chunk-AGPMQFZM.js +3 -0
  16. package/dist/chunk-AGPMQFZM.js.map +1 -0
  17. package/dist/chunk-ALMSFTRM.js +66 -0
  18. package/dist/chunk-ALMSFTRM.js.map +1 -0
  19. package/dist/chunk-AOBHBJ2G.cjs +89 -0
  20. package/dist/chunk-AOBHBJ2G.cjs.map +1 -0
  21. package/dist/chunk-BOASJ3VG.cjs +31 -0
  22. package/dist/chunk-BOASJ3VG.cjs.map +1 -0
  23. package/dist/chunk-CBTITLRR.js +43 -0
  24. package/dist/chunk-CBTITLRR.js.map +1 -0
  25. package/dist/chunk-CP46K2UB.cjs +74 -0
  26. package/dist/chunk-CP46K2UB.cjs.map +1 -0
  27. package/dist/chunk-DMEWJ56D.js +76 -0
  28. package/dist/chunk-DMEWJ56D.js.map +1 -0
  29. package/dist/chunk-DNNK2DMM.cjs +119 -0
  30. package/dist/chunk-DNNK2DMM.cjs.map +1 -0
  31. package/dist/chunk-GKKJMRCL.js +75 -0
  32. package/dist/chunk-GKKJMRCL.js.map +1 -0
  33. package/dist/chunk-GRBBLS5Y.js +77 -0
  34. package/dist/chunk-GRBBLS5Y.js.map +1 -0
  35. package/dist/chunk-GRXFSXG5.js +124 -0
  36. package/dist/chunk-GRXFSXG5.js.map +1 -0
  37. package/dist/chunk-GUJVCKEN.js +102 -0
  38. package/dist/chunk-GUJVCKEN.js.map +1 -0
  39. package/dist/chunk-LA7MRXWR.js +77 -0
  40. package/dist/chunk-LA7MRXWR.js.map +1 -0
  41. package/dist/chunk-MRFGUSN2.js +20 -0
  42. package/dist/chunk-MRFGUSN2.js.map +1 -0
  43. package/dist/chunk-NBVPN4KL.cjs +23 -0
  44. package/dist/chunk-NBVPN4KL.cjs.map +1 -0
  45. package/dist/chunk-NGFFI4XQ.cjs +61 -0
  46. package/dist/chunk-NGFFI4XQ.cjs.map +1 -0
  47. package/dist/chunk-OKSRSOYJ.cjs +88 -0
  48. package/dist/chunk-OKSRSOYJ.cjs.map +1 -0
  49. package/dist/chunk-PPK3HQOY.cjs +134 -0
  50. package/dist/chunk-PPK3HQOY.cjs.map +1 -0
  51. package/dist/chunk-QJSOSQ7M.cjs +23 -0
  52. package/dist/chunk-QJSOSQ7M.cjs.map +1 -0
  53. package/dist/chunk-R37QQTQS.cjs +64 -0
  54. package/dist/chunk-R37QQTQS.cjs.map +1 -0
  55. package/dist/chunk-R7ACSDOA.cjs +114 -0
  56. package/dist/chunk-R7ACSDOA.cjs.map +1 -0
  57. package/dist/chunk-S6QFHKCE.js +99 -0
  58. package/dist/chunk-S6QFHKCE.js.map +1 -0
  59. package/dist/chunk-TSLEYQKD.cjs +92 -0
  60. package/dist/chunk-TSLEYQKD.cjs.map +1 -0
  61. package/dist/chunk-WF63F6RJ.cjs +4 -0
  62. package/dist/chunk-WF63F6RJ.cjs.map +1 -0
  63. package/dist/chunk-XU5UEIBL.js +43 -0
  64. package/dist/chunk-XU5UEIBL.js.map +1 -0
  65. package/dist/chunk-XVG5Z6B5.cjs +79 -0
  66. package/dist/chunk-XVG5Z6B5.cjs.map +1 -0
  67. package/dist/chunk-YA2KONBB.js +20 -0
  68. package/dist/chunk-YA2KONBB.js.map +1 -0
  69. package/dist/chunk-YK7QFPBF.js +55 -0
  70. package/dist/chunk-YK7QFPBF.js.map +1 -0
  71. package/dist/chunk-YTF4Z7I4.js +26 -0
  72. package/dist/chunk-YTF4Z7I4.js.map +1 -0
  73. package/dist/client/index.cjs +62 -0
  74. package/dist/client/index.cjs.map +1 -0
  75. package/dist/client/index.d.cts +28 -0
  76. package/dist/client/index.d.ts +28 -0
  77. package/dist/client/index.js +5 -0
  78. package/dist/client/index.js.map +1 -0
  79. package/dist/index.cjs +620 -0
  80. package/dist/index.cjs.map +1 -0
  81. package/dist/index.d.cts +39 -0
  82. package/dist/index.d.ts +39 -0
  83. package/dist/index.js +21 -0
  84. package/dist/index.js.map +1 -0
  85. package/dist/keys/index.cjs +56 -0
  86. package/dist/keys/index.cjs.map +1 -0
  87. package/dist/keys/index.d.cts +64 -0
  88. package/dist/keys/index.d.ts +64 -0
  89. package/dist/keys/index.js +3 -0
  90. package/dist/keys/index.js.map +1 -0
  91. package/dist/modules/academic/index.cjs +44 -0
  92. package/dist/modules/academic/index.cjs.map +1 -0
  93. package/dist/modules/academic/index.d.cts +54 -0
  94. package/dist/modules/academic/index.d.ts +54 -0
  95. package/dist/modules/academic/index.js +7 -0
  96. package/dist/modules/academic/index.js.map +1 -0
  97. package/dist/modules/attendance/index.cjs +68 -0
  98. package/dist/modules/attendance/index.cjs.map +1 -0
  99. package/dist/modules/attendance/index.d.cts +135 -0
  100. package/dist/modules/attendance/index.d.ts +135 -0
  101. package/dist/modules/attendance/index.js +7 -0
  102. package/dist/modules/attendance/index.js.map +1 -0
  103. package/dist/modules/auth/index.cjs +52 -0
  104. package/dist/modules/auth/index.cjs.map +1 -0
  105. package/dist/modules/auth/index.d.cts +44 -0
  106. package/dist/modules/auth/index.d.ts +44 -0
  107. package/dist/modules/auth/index.js +7 -0
  108. package/dist/modules/auth/index.js.map +1 -0
  109. package/dist/modules/classroom/index.cjs +60 -0
  110. package/dist/modules/classroom/index.cjs.map +1 -0
  111. package/dist/modules/classroom/index.d.cts +84 -0
  112. package/dist/modules/classroom/index.d.ts +84 -0
  113. package/dist/modules/classroom/index.js +7 -0
  114. package/dist/modules/classroom/index.js.map +1 -0
  115. package/dist/modules/lead/index.cjs +44 -0
  116. package/dist/modules/lead/index.cjs.map +1 -0
  117. package/dist/modules/lead/index.d.cts +104 -0
  118. package/dist/modules/lead/index.d.ts +104 -0
  119. package/dist/modules/lead/index.js +7 -0
  120. package/dist/modules/lead/index.js.map +1 -0
  121. package/dist/modules/student/index.cjs +76 -0
  122. package/dist/modules/student/index.cjs.map +1 -0
  123. package/dist/modules/student/index.d.cts +125 -0
  124. package/dist/modules/student/index.d.ts +125 -0
  125. package/dist/modules/student/index.js +7 -0
  126. package/dist/modules/student/index.js.map +1 -0
  127. package/dist/modules/subject/index.cjs +36 -0
  128. package/dist/modules/subject/index.cjs.map +1 -0
  129. package/dist/modules/subject/index.d.cts +40 -0
  130. package/dist/modules/subject/index.d.ts +40 -0
  131. package/dist/modules/subject/index.js +7 -0
  132. package/dist/modules/subject/index.js.map +1 -0
  133. package/dist/modules/system/index.cjs +20 -0
  134. package/dist/modules/system/index.cjs.map +1 -0
  135. package/dist/modules/system/index.d.cts +14 -0
  136. package/dist/modules/system/index.d.ts +14 -0
  137. package/dist/modules/system/index.js +7 -0
  138. package/dist/modules/system/index.js.map +1 -0
  139. package/dist/modules/teaching-schedule/index.cjs +60 -0
  140. package/dist/modules/teaching-schedule/index.cjs.map +1 -0
  141. package/dist/modules/teaching-schedule/index.d.cts +97 -0
  142. package/dist/modules/teaching-schedule/index.d.ts +97 -0
  143. package/dist/modules/teaching-schedule/index.js +7 -0
  144. package/dist/modules/teaching-schedule/index.js.map +1 -0
  145. package/dist/modules/tenant/index.cjs +68 -0
  146. package/dist/modules/tenant/index.cjs.map +1 -0
  147. package/dist/modules/tenant/index.d.cts +113 -0
  148. package/dist/modules/tenant/index.d.ts +113 -0
  149. package/dist/modules/tenant/index.js +7 -0
  150. package/dist/modules/tenant/index.js.map +1 -0
  151. package/dist/modules/upload/index.cjs +27 -0
  152. package/dist/modules/upload/index.cjs.map +1 -0
  153. package/dist/modules/upload/index.d.cts +18 -0
  154. package/dist/modules/upload/index.d.ts +18 -0
  155. package/dist/modules/upload/index.js +6 -0
  156. package/dist/modules/upload/index.js.map +1 -0
  157. package/dist/modules/user/index.cjs +60 -0
  158. package/dist/modules/user/index.cjs.map +1 -0
  159. package/dist/modules/user/index.d.cts +117 -0
  160. package/dist/modules/user/index.d.ts +117 -0
  161. package/dist/modules/user/index.js +7 -0
  162. package/dist/modules/user/index.js.map +1 -0
  163. package/dist/provider.cjs +17 -0
  164. package/dist/provider.cjs.map +1 -0
  165. package/dist/provider.d.cts +15 -0
  166. package/dist/provider.d.ts +15 -0
  167. package/dist/provider.js +4 -0
  168. package/dist/provider.js.map +1 -0
  169. package/dist/types-BxV0BtVp.d.cts +89 -0
  170. package/dist/types-BxV0BtVp.d.ts +89 -0
  171. package/package.json +138 -6
  172. package/README.md +0 -3
@@ -0,0 +1,113 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { UpsertAttendanceShiftInput, CreateTenantInput, Tenant, ShiftTargetType, AttendanceShift, PortalModuleItem, UpdateTenantProfileInput } from '@sekolaos/shared-schema';
3
+ export { AttendanceShift, CreateTenantInput, PortalModuleItem, ShiftTargetType, Tenant, UpdateTenantProfileInput, UpsertAttendanceShiftInput } from '@sekolaos/shared-schema';
4
+
5
+ declare function getCurrentTenant(): Promise<Tenant>;
6
+ declare function getTenantModules(): Promise<PortalModuleItem[]>;
7
+ declare function updateCurrentTenant(payload: UpdateTenantProfileInput): Promise<Tenant>;
8
+ declare function listAttendanceShifts(params?: {
9
+ targetType?: ShiftTargetType;
10
+ }): Promise<AttendanceShift[]>;
11
+ declare function getAttendanceShift(targetType: ShiftTargetType): Promise<AttendanceShift>;
12
+ interface UpsertAttendanceShiftsPayload {
13
+ SISWA?: UpsertAttendanceShiftInput;
14
+ GURU?: UpsertAttendanceShiftInput;
15
+ }
16
+ declare function upsertAttendanceShifts(payload: UpsertAttendanceShiftsPayload): Promise<AttendanceShift[]>;
17
+ declare function createTenant(payload: CreateTenantInput): Promise<Tenant>;
18
+ declare function useCurrentTenant(): _tanstack_react_query.UseQueryResult<{
19
+ id: string;
20
+ name: string;
21
+ slug: string;
22
+ timezone: string;
23
+ createdAt: string;
24
+ updatedAt: string;
25
+ npsn?: string | null | undefined;
26
+ logoUrl?: string | null | undefined;
27
+ }, Error>;
28
+ declare function useTenantModules(): _tanstack_react_query.UseQueryResult<{
29
+ name: string;
30
+ isEnabled: boolean;
31
+ key: "MASTER" | "ATTENDANCE" | "FINANCE" | "ACADEMICS";
32
+ description: string;
33
+ icon: string;
34
+ url: string;
35
+ hasAccess: boolean;
36
+ expiresAt?: string | null | undefined;
37
+ }[], Error>;
38
+ declare function useAttendanceShifts(params?: {
39
+ targetType?: ShiftTargetType;
40
+ }): _tanstack_react_query.UseQueryResult<{
41
+ id: string;
42
+ tenantId: string;
43
+ targetType: "SISWA" | "GURU";
44
+ name: string;
45
+ checkInStart: string;
46
+ checkInEnd: string;
47
+ checkOutStart: string;
48
+ checkOutEnd: string;
49
+ lateToleranceMinutes?: number | undefined;
50
+ fridayCheckOutStart?: string | null | undefined;
51
+ fridayCheckOutEnd?: string | null | undefined;
52
+ }[], Error>;
53
+ declare function useAttendanceShift(targetType: ShiftTargetType): _tanstack_react_query.UseQueryResult<{
54
+ id: string;
55
+ tenantId: string;
56
+ targetType: "SISWA" | "GURU";
57
+ name: string;
58
+ checkInStart: string;
59
+ checkInEnd: string;
60
+ checkOutStart: string;
61
+ checkOutEnd: string;
62
+ lateToleranceMinutes?: number | undefined;
63
+ fridayCheckOutStart?: string | null | undefined;
64
+ fridayCheckOutEnd?: string | null | undefined;
65
+ }, Error>;
66
+ declare function useUpdateCurrentTenant(): _tanstack_react_query.UseMutationResult<{
67
+ id: string;
68
+ name: string;
69
+ slug: string;
70
+ timezone: string;
71
+ createdAt: string;
72
+ updatedAt: string;
73
+ npsn?: string | null | undefined;
74
+ logoUrl?: string | null | undefined;
75
+ }, Error, {
76
+ name?: string | undefined;
77
+ npsn?: string | null | undefined;
78
+ logoUrl?: string | null | undefined;
79
+ timezone?: string | undefined;
80
+ address?: string | null | undefined;
81
+ phone?: string | null | undefined;
82
+ }, unknown>;
83
+ declare function useUpsertAttendanceShifts(): _tanstack_react_query.UseMutationResult<{
84
+ id: string;
85
+ tenantId: string;
86
+ targetType: "SISWA" | "GURU";
87
+ name: string;
88
+ checkInStart: string;
89
+ checkInEnd: string;
90
+ checkOutStart: string;
91
+ checkOutEnd: string;
92
+ lateToleranceMinutes?: number | undefined;
93
+ fridayCheckOutStart?: string | null | undefined;
94
+ fridayCheckOutEnd?: string | null | undefined;
95
+ }[], Error, UpsertAttendanceShiftsPayload, unknown>;
96
+ declare function useCreateTenant(): _tanstack_react_query.UseMutationResult<{
97
+ id: string;
98
+ name: string;
99
+ slug: string;
100
+ timezone: string;
101
+ createdAt: string;
102
+ updatedAt: string;
103
+ npsn?: string | null | undefined;
104
+ logoUrl?: string | null | undefined;
105
+ }, Error, {
106
+ name: string;
107
+ slug: string;
108
+ timezone: string;
109
+ npsn?: string | null | undefined;
110
+ logoUrl?: string | null | undefined;
111
+ }, unknown>;
112
+
113
+ export { type UpsertAttendanceShiftsPayload, createTenant, getAttendanceShift, getCurrentTenant, getTenantModules, listAttendanceShifts, updateCurrentTenant, upsertAttendanceShifts, useAttendanceShift, useAttendanceShifts, useCreateTenant, useCurrentTenant, useTenantModules, useUpdateCurrentTenant, useUpsertAttendanceShifts };
@@ -0,0 +1,7 @@
1
+ export { createTenant, getAttendanceShift, getCurrentTenant, getTenantModules, listAttendanceShifts, updateCurrentTenant, upsertAttendanceShifts, useAttendanceShift, useAttendanceShifts, useCreateTenant, useCurrentTenant, useTenantModules, useUpdateCurrentTenant, useUpsertAttendanceShifts } from '../../chunk-LA7MRXWR.js';
2
+ import '../../chunk-MRFGUSN2.js';
3
+ import '../../chunk-6JGO2CUT.js';
4
+ import '../../chunk-GRXFSXG5.js';
5
+ import '../../chunk-ALMSFTRM.js';
6
+ //# sourceMappingURL=index.js.map
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ var chunkBOASJ3VG_cjs = require('../../chunk-BOASJ3VG.cjs');
4
+ require('../../chunk-QJSOSQ7M.cjs');
5
+ require('../../chunk-NGFFI4XQ.cjs');
6
+ require('../../chunk-PPK3HQOY.cjs');
7
+
8
+
9
+
10
+ Object.defineProperty(exports, "uploadStudentPhoto", {
11
+ enumerable: true,
12
+ get: function () { return chunkBOASJ3VG_cjs.uploadStudentPhoto; }
13
+ });
14
+ Object.defineProperty(exports, "uploadTenantLogo", {
15
+ enumerable: true,
16
+ get: function () { return chunkBOASJ3VG_cjs.uploadTenantLogo; }
17
+ });
18
+ Object.defineProperty(exports, "useUploadStudentPhoto", {
19
+ enumerable: true,
20
+ get: function () { return chunkBOASJ3VG_cjs.useUploadStudentPhoto; }
21
+ });
22
+ Object.defineProperty(exports, "useUploadTenantLogo", {
23
+ enumerable: true,
24
+ get: function () { return chunkBOASJ3VG_cjs.useUploadTenantLogo; }
25
+ });
26
+ //# sourceMappingURL=index.cjs.map
27
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,18 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+
3
+ /** `POST /uploads/tenant-logo` — butuh permission `tenant:update`. Maks. 2 MB (JPEG/PNG/WEBP). */
4
+ declare function uploadTenantLogo(file: File): Promise<{
5
+ logoUrl: string;
6
+ }>;
7
+ /** `POST /uploads/student-photo` — butuh permission `student:update`. Maks. 2 MB (JPEG/PNG/WEBP). */
8
+ declare function uploadStudentPhoto(file: File): Promise<{
9
+ photoUrl: string;
10
+ }>;
11
+ declare function useUploadTenantLogo(): _tanstack_react_query.UseMutationResult<{
12
+ logoUrl: string;
13
+ }, Error, File, unknown>;
14
+ declare function useUploadStudentPhoto(): _tanstack_react_query.UseMutationResult<{
15
+ photoUrl: string;
16
+ }, Error, File, unknown>;
17
+
18
+ export { uploadStudentPhoto, uploadTenantLogo, useUploadStudentPhoto, useUploadTenantLogo };
@@ -0,0 +1,18 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+
3
+ /** `POST /uploads/tenant-logo` — butuh permission `tenant:update`. Maks. 2 MB (JPEG/PNG/WEBP). */
4
+ declare function uploadTenantLogo(file: File): Promise<{
5
+ logoUrl: string;
6
+ }>;
7
+ /** `POST /uploads/student-photo` — butuh permission `student:update`. Maks. 2 MB (JPEG/PNG/WEBP). */
8
+ declare function uploadStudentPhoto(file: File): Promise<{
9
+ photoUrl: string;
10
+ }>;
11
+ declare function useUploadTenantLogo(): _tanstack_react_query.UseMutationResult<{
12
+ logoUrl: string;
13
+ }, Error, File, unknown>;
14
+ declare function useUploadStudentPhoto(): _tanstack_react_query.UseMutationResult<{
15
+ photoUrl: string;
16
+ }, Error, File, unknown>;
17
+
18
+ export { uploadStudentPhoto, uploadTenantLogo, useUploadStudentPhoto, useUploadTenantLogo };
@@ -0,0 +1,6 @@
1
+ export { uploadStudentPhoto, uploadTenantLogo, useUploadStudentPhoto, useUploadTenantLogo } from '../../chunk-YTF4Z7I4.js';
2
+ import '../../chunk-MRFGUSN2.js';
3
+ import '../../chunk-6JGO2CUT.js';
4
+ import '../../chunk-GRXFSXG5.js';
5
+ //# sourceMappingURL=index.js.map
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,60 @@
1
+ 'use strict';
2
+
3
+ var chunkOKSRSOYJ_cjs = require('../../chunk-OKSRSOYJ.cjs');
4
+ require('../../chunk-QJSOSQ7M.cjs');
5
+ require('../../chunk-NGFFI4XQ.cjs');
6
+ require('../../chunk-PPK3HQOY.cjs');
7
+ require('../../chunk-XVG5Z6B5.cjs');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "assignUserRoles", {
12
+ enumerable: true,
13
+ get: function () { return chunkOKSRSOYJ_cjs.assignUserRoles; }
14
+ });
15
+ Object.defineProperty(exports, "createTeacher", {
16
+ enumerable: true,
17
+ get: function () { return chunkOKSRSOYJ_cjs.createTeacher; }
18
+ });
19
+ Object.defineProperty(exports, "getTeacher", {
20
+ enumerable: true,
21
+ get: function () { return chunkOKSRSOYJ_cjs.getTeacher; }
22
+ });
23
+ Object.defineProperty(exports, "listRoles", {
24
+ enumerable: true,
25
+ get: function () { return chunkOKSRSOYJ_cjs.listRoles; }
26
+ });
27
+ Object.defineProperty(exports, "listTeachers", {
28
+ enumerable: true,
29
+ get: function () { return chunkOKSRSOYJ_cjs.listTeachers; }
30
+ });
31
+ Object.defineProperty(exports, "updateTeacher", {
32
+ enumerable: true,
33
+ get: function () { return chunkOKSRSOYJ_cjs.updateTeacher; }
34
+ });
35
+ Object.defineProperty(exports, "useAssignUserRoles", {
36
+ enumerable: true,
37
+ get: function () { return chunkOKSRSOYJ_cjs.useAssignUserRoles; }
38
+ });
39
+ Object.defineProperty(exports, "useCreateTeacher", {
40
+ enumerable: true,
41
+ get: function () { return chunkOKSRSOYJ_cjs.useCreateTeacher; }
42
+ });
43
+ Object.defineProperty(exports, "useRoles", {
44
+ enumerable: true,
45
+ get: function () { return chunkOKSRSOYJ_cjs.useRoles; }
46
+ });
47
+ Object.defineProperty(exports, "useTeacher", {
48
+ enumerable: true,
49
+ get: function () { return chunkOKSRSOYJ_cjs.useTeacher; }
50
+ });
51
+ Object.defineProperty(exports, "useTeachers", {
52
+ enumerable: true,
53
+ get: function () { return chunkOKSRSOYJ_cjs.useTeachers; }
54
+ });
55
+ Object.defineProperty(exports, "useUpdateTeacher", {
56
+ enumerable: true,
57
+ get: function () { return chunkOKSRSOYJ_cjs.useUpdateTeacher; }
58
+ });
59
+ //# sourceMappingURL=index.cjs.map
60
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -0,0 +1,117 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { AssignUserRolesRequest, UserProfile, CreateTeacherInput, Role, TeacherListQuery, User, UpdateTeacherInput } from '@sekolaos/shared-schema';
3
+ export { AssignUserRolesRequest, CreateTeacherInput, Role, TeacherListQuery, UpdateTeacherInput, User, UserProfile } from '@sekolaos/shared-schema';
4
+
5
+ declare function listRoles(): Promise<Role[]>;
6
+ declare function listTeachers(params?: Partial<TeacherListQuery>): Promise<User[]>;
7
+ declare function getTeacher(id: string): Promise<UserProfile>;
8
+ declare function createTeacher(payload: CreateTeacherInput): Promise<UserProfile>;
9
+ declare function updateTeacher(id: string, payload: UpdateTeacherInput): Promise<UserProfile>;
10
+ declare function assignUserRoles(payload: AssignUserRolesRequest): Promise<UserProfile>;
11
+ declare function useRoles(): _tanstack_react_query.UseQueryResult<{
12
+ id: string;
13
+ tenantId: string | null;
14
+ name: string;
15
+ slug: string;
16
+ permissions: Record<string, string[]>;
17
+ }[], Error>;
18
+ declare function useTeachers(params?: Partial<TeacherListQuery>): _tanstack_react_query.UseQueryResult<{
19
+ id: string;
20
+ tenantId: string;
21
+ isActive: boolean;
22
+ username: string;
23
+ fullName: string;
24
+ email?: string | null | undefined;
25
+ }[], Error>;
26
+ declare function useTeacher(id: string, options?: {
27
+ enabled?: boolean;
28
+ }): _tanstack_react_query.UseQueryResult<{
29
+ id: string;
30
+ tenantId: string;
31
+ createdAt: string;
32
+ updatedAt: string;
33
+ isActive: boolean;
34
+ username: string;
35
+ email: string;
36
+ fullName: string;
37
+ nip?: string | null | undefined;
38
+ phoneNumber?: string | null | undefined;
39
+ roles?: {
40
+ permissions: Record<string, string[]>;
41
+ roleId: string;
42
+ roleName: string;
43
+ roleSlug: string;
44
+ }[] | undefined;
45
+ }, Error>;
46
+ declare function useCreateTeacher(): _tanstack_react_query.UseMutationResult<{
47
+ id: string;
48
+ tenantId: string;
49
+ createdAt: string;
50
+ updatedAt: string;
51
+ isActive: boolean;
52
+ username: string;
53
+ email: string;
54
+ fullName: string;
55
+ nip?: string | null | undefined;
56
+ phoneNumber?: string | null | undefined;
57
+ roles?: {
58
+ permissions: Record<string, string[]>;
59
+ roleId: string;
60
+ roleName: string;
61
+ roleSlug: string;
62
+ }[] | undefined;
63
+ }, Error, {
64
+ academicYearId: string;
65
+ password: string;
66
+ username: string;
67
+ email: string;
68
+ fullName: string;
69
+ roleIds: string[];
70
+ nip?: string | null | undefined;
71
+ phoneNumber?: string | null | undefined;
72
+ }, unknown>;
73
+ declare function useUpdateTeacher(): _tanstack_react_query.UseMutationResult<{
74
+ id: string;
75
+ tenantId: string;
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ isActive: boolean;
79
+ username: string;
80
+ email: string;
81
+ fullName: string;
82
+ nip?: string | null | undefined;
83
+ phoneNumber?: string | null | undefined;
84
+ roles?: {
85
+ permissions: Record<string, string[]>;
86
+ roleId: string;
87
+ roleName: string;
88
+ roleSlug: string;
89
+ }[] | undefined;
90
+ }, Error, {
91
+ id: string;
92
+ payload: UpdateTeacherInput;
93
+ }, unknown>;
94
+ declare function useAssignUserRoles(): _tanstack_react_query.UseMutationResult<{
95
+ id: string;
96
+ tenantId: string;
97
+ createdAt: string;
98
+ updatedAt: string;
99
+ isActive: boolean;
100
+ username: string;
101
+ email: string;
102
+ fullName: string;
103
+ nip?: string | null | undefined;
104
+ phoneNumber?: string | null | undefined;
105
+ roles?: {
106
+ permissions: Record<string, string[]>;
107
+ roleId: string;
108
+ roleName: string;
109
+ roleSlug: string;
110
+ }[] | undefined;
111
+ }, Error, {
112
+ userId: string;
113
+ academicYearId: string;
114
+ roleIds: string[];
115
+ }, unknown>;
116
+
117
+ export { assignUserRoles, createTeacher, getTeacher, listRoles, listTeachers, updateTeacher, useAssignUserRoles, useCreateTeacher, useRoles, useTeacher, useTeachers, useUpdateTeacher };
@@ -0,0 +1,117 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+ import { AssignUserRolesRequest, UserProfile, CreateTeacherInput, Role, TeacherListQuery, User, UpdateTeacherInput } from '@sekolaos/shared-schema';
3
+ export { AssignUserRolesRequest, CreateTeacherInput, Role, TeacherListQuery, UpdateTeacherInput, User, UserProfile } from '@sekolaos/shared-schema';
4
+
5
+ declare function listRoles(): Promise<Role[]>;
6
+ declare function listTeachers(params?: Partial<TeacherListQuery>): Promise<User[]>;
7
+ declare function getTeacher(id: string): Promise<UserProfile>;
8
+ declare function createTeacher(payload: CreateTeacherInput): Promise<UserProfile>;
9
+ declare function updateTeacher(id: string, payload: UpdateTeacherInput): Promise<UserProfile>;
10
+ declare function assignUserRoles(payload: AssignUserRolesRequest): Promise<UserProfile>;
11
+ declare function useRoles(): _tanstack_react_query.UseQueryResult<{
12
+ id: string;
13
+ tenantId: string | null;
14
+ name: string;
15
+ slug: string;
16
+ permissions: Record<string, string[]>;
17
+ }[], Error>;
18
+ declare function useTeachers(params?: Partial<TeacherListQuery>): _tanstack_react_query.UseQueryResult<{
19
+ id: string;
20
+ tenantId: string;
21
+ isActive: boolean;
22
+ username: string;
23
+ fullName: string;
24
+ email?: string | null | undefined;
25
+ }[], Error>;
26
+ declare function useTeacher(id: string, options?: {
27
+ enabled?: boolean;
28
+ }): _tanstack_react_query.UseQueryResult<{
29
+ id: string;
30
+ tenantId: string;
31
+ createdAt: string;
32
+ updatedAt: string;
33
+ isActive: boolean;
34
+ username: string;
35
+ email: string;
36
+ fullName: string;
37
+ nip?: string | null | undefined;
38
+ phoneNumber?: string | null | undefined;
39
+ roles?: {
40
+ permissions: Record<string, string[]>;
41
+ roleId: string;
42
+ roleName: string;
43
+ roleSlug: string;
44
+ }[] | undefined;
45
+ }, Error>;
46
+ declare function useCreateTeacher(): _tanstack_react_query.UseMutationResult<{
47
+ id: string;
48
+ tenantId: string;
49
+ createdAt: string;
50
+ updatedAt: string;
51
+ isActive: boolean;
52
+ username: string;
53
+ email: string;
54
+ fullName: string;
55
+ nip?: string | null | undefined;
56
+ phoneNumber?: string | null | undefined;
57
+ roles?: {
58
+ permissions: Record<string, string[]>;
59
+ roleId: string;
60
+ roleName: string;
61
+ roleSlug: string;
62
+ }[] | undefined;
63
+ }, Error, {
64
+ academicYearId: string;
65
+ password: string;
66
+ username: string;
67
+ email: string;
68
+ fullName: string;
69
+ roleIds: string[];
70
+ nip?: string | null | undefined;
71
+ phoneNumber?: string | null | undefined;
72
+ }, unknown>;
73
+ declare function useUpdateTeacher(): _tanstack_react_query.UseMutationResult<{
74
+ id: string;
75
+ tenantId: string;
76
+ createdAt: string;
77
+ updatedAt: string;
78
+ isActive: boolean;
79
+ username: string;
80
+ email: string;
81
+ fullName: string;
82
+ nip?: string | null | undefined;
83
+ phoneNumber?: string | null | undefined;
84
+ roles?: {
85
+ permissions: Record<string, string[]>;
86
+ roleId: string;
87
+ roleName: string;
88
+ roleSlug: string;
89
+ }[] | undefined;
90
+ }, Error, {
91
+ id: string;
92
+ payload: UpdateTeacherInput;
93
+ }, unknown>;
94
+ declare function useAssignUserRoles(): _tanstack_react_query.UseMutationResult<{
95
+ id: string;
96
+ tenantId: string;
97
+ createdAt: string;
98
+ updatedAt: string;
99
+ isActive: boolean;
100
+ username: string;
101
+ email: string;
102
+ fullName: string;
103
+ nip?: string | null | undefined;
104
+ phoneNumber?: string | null | undefined;
105
+ roles?: {
106
+ permissions: Record<string, string[]>;
107
+ roleId: string;
108
+ roleName: string;
109
+ roleSlug: string;
110
+ }[] | undefined;
111
+ }, Error, {
112
+ userId: string;
113
+ academicYearId: string;
114
+ roleIds: string[];
115
+ }, unknown>;
116
+
117
+ export { assignUserRoles, createTeacher, getTeacher, listRoles, listTeachers, updateTeacher, useAssignUserRoles, useCreateTeacher, useRoles, useTeacher, useTeachers, useUpdateTeacher };
@@ -0,0 +1,7 @@
1
+ export { assignUserRoles, createTeacher, getTeacher, listRoles, listTeachers, updateTeacher, useAssignUserRoles, useCreateTeacher, useRoles, useTeacher, useTeachers, useUpdateTeacher } from '../../chunk-GKKJMRCL.js';
2
+ import '../../chunk-MRFGUSN2.js';
3
+ import '../../chunk-6JGO2CUT.js';
4
+ import '../../chunk-GRXFSXG5.js';
5
+ import '../../chunk-ALMSFTRM.js';
6
+ //# sourceMappingURL=index.js.map
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var chunk2FTS6JMO_cjs = require('./chunk-2FTS6JMO.cjs');
4
+ require('./chunk-PPK3HQOY.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "SekolaosQueryProvider", {
9
+ enumerable: true,
10
+ get: function () { return chunk2FTS6JMO_cjs.SekolaosQueryProvider; }
11
+ });
12
+ Object.defineProperty(exports, "createDefaultQueryClient", {
13
+ enumerable: true,
14
+ get: function () { return chunk2FTS6JMO_cjs.createDefaultQueryClient; }
15
+ });
16
+ //# sourceMappingURL=provider.cjs.map
17
+ //# sourceMappingURL=provider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"provider.cjs"}
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { QueryClient } from '@tanstack/react-query';
4
+ import { C as ClientConfig } from './types-BxV0BtVp.cjs';
5
+ import 'axios';
6
+
7
+ interface SekolaosQueryProviderProps {
8
+ children: React.ReactNode;
9
+ clientConfig?: Partial<ClientConfig>;
10
+ queryClient?: QueryClient;
11
+ }
12
+ declare function createDefaultQueryClient(): QueryClient;
13
+ declare function SekolaosQueryProvider({ children, clientConfig, queryClient, }: SekolaosQueryProviderProps): react_jsx_runtime.JSX.Element;
14
+
15
+ export { SekolaosQueryProvider, type SekolaosQueryProviderProps, createDefaultQueryClient };
@@ -0,0 +1,15 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { QueryClient } from '@tanstack/react-query';
4
+ import { C as ClientConfig } from './types-BxV0BtVp.js';
5
+ import 'axios';
6
+
7
+ interface SekolaosQueryProviderProps {
8
+ children: React.ReactNode;
9
+ clientConfig?: Partial<ClientConfig>;
10
+ queryClient?: QueryClient;
11
+ }
12
+ declare function createDefaultQueryClient(): QueryClient;
13
+ declare function SekolaosQueryProvider({ children, clientConfig, queryClient, }: SekolaosQueryProviderProps): react_jsx_runtime.JSX.Element;
14
+
15
+ export { SekolaosQueryProvider, type SekolaosQueryProviderProps, createDefaultQueryClient };
@@ -0,0 +1,4 @@
1
+ export { SekolaosQueryProvider, createDefaultQueryClient } from './chunk-CBTITLRR.js';
2
+ import './chunk-GRXFSXG5.js';
3
+ //# sourceMappingURL=provider.js.map
4
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"provider.js"}
@@ -0,0 +1,89 @@
1
+ import { UseMutationOptions, UseQueryOptions } from '@tanstack/react-query';
2
+ import { AxiosError, AxiosRequestConfig } from 'axios';
3
+
4
+ declare class SekolaosApiError extends Error {
5
+ readonly statusCode: number;
6
+ readonly errors: ApiErrorDetail[];
7
+ readonly isNetworkError: boolean;
8
+ readonly rawError?: AxiosError | undefined;
9
+ constructor(message: string, statusCode?: number, errors?: ApiErrorDetail[], isNetworkError?: boolean, rawError?: AxiosError | undefined);
10
+ /** HTTP 422 validation failure coming from the Zod validation middleware. */
11
+ get isValidationError(): boolean;
12
+ get isUnauthorized(): boolean;
13
+ get isForbidden(): boolean;
14
+ get isNotFound(): boolean;
15
+ /** Maps field-level validation errors into a `{ field: message }` record. */
16
+ toFieldErrors(): Record<string, string>;
17
+ static fromAxiosError(error: AxiosError<ApiErrorPayload>): SekolaosApiError;
18
+ /** Converts any thrown value into a `SekolaosApiError` instance. */
19
+ static normalize(error: unknown): SekolaosApiError;
20
+ }
21
+ interface RequestOptions {
22
+ /** Extra axios options (headers, signal, params, ...). */
23
+ config?: AxiosRequestConfig;
24
+ /** Query string parameters serialized by axios. */
25
+ params?: AxiosRequestConfig["params"];
26
+ /** Abort signal forwarded to axios for TanStack Query cancellation. */
27
+ signal?: AbortSignal;
28
+ }
29
+
30
+ interface BaseApiResponse<T> {
31
+ success: boolean;
32
+ message: string;
33
+ data: T;
34
+ /** Operator metadata emitted by the backend when available. */
35
+ meta?: Record<string, unknown>;
36
+ }
37
+ interface PaginationMeta {
38
+ currentPage: number;
39
+ pageSize: number;
40
+ totalItems: number;
41
+ totalPages: number;
42
+ }
43
+ /**
44
+ * The backend wraps paginated collections inside `data` (see
45
+ * `paginatedDataSchema` in `@sekolaos/shared-schema`).
46
+ */
47
+ interface PaginatedApiResponse<T> {
48
+ success: boolean;
49
+ message: string;
50
+ data: PaginatedData<T>;
51
+ meta?: Record<string, unknown>;
52
+ }
53
+ interface PaginatedData<T> {
54
+ items: T[];
55
+ meta: PaginationMeta;
56
+ }
57
+ /**
58
+ * `@sekolaos/shared-schema` declares `PaginatedData<T>` with a Zod schema
59
+ * constraint, so the client exposes an equivalent runtime-shaped alias.
60
+ */
61
+ type PaginatedResult<T> = PaginatedData<T>;
62
+ interface ApiErrorDetail {
63
+ field?: string;
64
+ message: string;
65
+ }
66
+ interface ApiErrorPayload {
67
+ success: false;
68
+ message: string;
69
+ errors?: ApiErrorDetail[];
70
+ meta?: Record<string, unknown>;
71
+ }
72
+ interface ClientConfig {
73
+ baseURL?: string;
74
+ timeout?: number;
75
+ bearerToken?: string;
76
+ withCredentials?: boolean;
77
+ onUnauthorized?: () => void;
78
+ onForbidden?: () => void;
79
+ }
80
+ interface UploadFileResult {
81
+ url: string;
82
+ fileName: string;
83
+ size: number;
84
+ mimeType: string;
85
+ }
86
+ type QueryOptionsWithoutKey<TData, TSelect = TData> = Omit<UseQueryOptions<TData, SekolaosApiError, TSelect>, "queryKey" | "queryFn">;
87
+ type MutationOptionsCustom<TData, TVariables, TContext = unknown> = UseMutationOptions<TData, SekolaosApiError, TVariables, TContext>;
88
+
89
+ export { type ApiErrorDetail as A, type BaseApiResponse as B, type ClientConfig as C, type MutationOptionsCustom as M, type PaginatedApiResponse as P, type QueryOptionsWithoutKey as Q, type RequestOptions as R, SekolaosApiError as S, type UploadFileResult as U, type ApiErrorPayload as a, type PaginatedData as b, type PaginatedResult as c, type PaginationMeta as d };