academe-kit 0.1.8 → 0.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/index.d.ts +9767 -62
- package/dist/index.esm.js +1080 -162
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1080 -160
- package/dist/index.js.map +1 -1
- package/dist/types/components/ProtectedApp/index.d.ts +1 -0
- package/dist/types/context/SecurityProvider/types.d.ts +7 -4
- package/dist/types/index.d.ts +7 -2
- package/dist/types/roles/backoffice.d.ts +2 -0
- package/dist/types/roles/dashboard.d.ts +2 -0
- package/dist/types/roles/global.d.ts +7 -0
- package/dist/types/services/ClassroomService.d.ts +270 -0
- package/dist/types/services/GuardianService.d.ts +309 -0
- package/dist/types/services/InstitutionService.d.ts +733 -0
- package/dist/types/services/OrganizationService.d.ts +216 -0
- package/dist/types/services/ReportService.d.ts +575 -0
- package/dist/types/services/SerieService.d.ts +214 -0
- package/dist/types/services/ShiftService.d.ts +214 -0
- package/dist/types/services/UserService.d.ts +438 -0
- package/dist/types/services/index.d.ts +30 -0
- package/dist/types/types/academe-api.d.ts +6769 -0
- package/dist/types/types/index.d.ts +8 -0
- package/package.json +5 -2
- package/dist/index.css +0 -5
- package/dist/types/hooks/useCurrentUser.d.ts +0 -82
- package/dist/types/services/userService.d.ts +0 -79
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import type { AcademeApiClient } from './index';
|
|
2
|
+
import type { components } from '../types/academe-api';
|
|
3
|
+
type CreateOrganizationDto = components['schemas']['CreateOrganizationDto'];
|
|
4
|
+
type UpdateOrganizationDto = components['schemas']['UpdateOrganizationDto'];
|
|
5
|
+
type GetOrganizationsParams = {
|
|
6
|
+
name?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
search?: string;
|
|
10
|
+
page?: number;
|
|
11
|
+
limit?: number;
|
|
12
|
+
};
|
|
13
|
+
export declare function createOrganizationService(apiClient: AcademeApiClient): {
|
|
14
|
+
/**
|
|
15
|
+
* List all organizations with optional filters
|
|
16
|
+
*/
|
|
17
|
+
getAll(params?: GetOrganizationsParams): Promise<import("openapi-fetch").FetchResponse<{
|
|
18
|
+
parameters: {
|
|
19
|
+
query?: {
|
|
20
|
+
name?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
isActive?: boolean;
|
|
23
|
+
search?: string;
|
|
24
|
+
page?: number;
|
|
25
|
+
limit?: number;
|
|
26
|
+
};
|
|
27
|
+
header?: never;
|
|
28
|
+
path?: never;
|
|
29
|
+
cookie?: never;
|
|
30
|
+
};
|
|
31
|
+
requestBody?: never;
|
|
32
|
+
responses: {
|
|
33
|
+
200: {
|
|
34
|
+
headers: {
|
|
35
|
+
[name: string]: unknown;
|
|
36
|
+
};
|
|
37
|
+
content: {
|
|
38
|
+
"application/json": {
|
|
39
|
+
status?: string;
|
|
40
|
+
data?: components["schemas"]["Organization"][];
|
|
41
|
+
meta?: {
|
|
42
|
+
total?: number;
|
|
43
|
+
page?: number;
|
|
44
|
+
limit?: number;
|
|
45
|
+
totalPages?: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
401: components["responses"]["Unauthorized"];
|
|
51
|
+
500: components["responses"]["ServerError"];
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
params: {
|
|
55
|
+
query: GetOrganizationsParams | undefined;
|
|
56
|
+
};
|
|
57
|
+
}, `${string}/${string}`>>;
|
|
58
|
+
/**
|
|
59
|
+
* Get organization by ID
|
|
60
|
+
*/
|
|
61
|
+
getById(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
62
|
+
parameters: {
|
|
63
|
+
query?: never;
|
|
64
|
+
header?: never;
|
|
65
|
+
path: {
|
|
66
|
+
id: components["parameters"]["id"];
|
|
67
|
+
};
|
|
68
|
+
cookie?: never;
|
|
69
|
+
};
|
|
70
|
+
requestBody?: never;
|
|
71
|
+
responses: {
|
|
72
|
+
200: {
|
|
73
|
+
headers: {
|
|
74
|
+
[name: string]: unknown;
|
|
75
|
+
};
|
|
76
|
+
content: {
|
|
77
|
+
"application/json": {
|
|
78
|
+
status?: string;
|
|
79
|
+
data?: components["schemas"]["Organization"];
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
400: components["responses"]["BadRequest"];
|
|
84
|
+
401: components["responses"]["Unauthorized"];
|
|
85
|
+
404: components["responses"]["NotFound"];
|
|
86
|
+
500: components["responses"]["ServerError"];
|
|
87
|
+
};
|
|
88
|
+
}, {
|
|
89
|
+
params: {
|
|
90
|
+
path: {
|
|
91
|
+
id: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
}, `${string}/${string}`>>;
|
|
95
|
+
/**
|
|
96
|
+
* Create a new organization
|
|
97
|
+
*/
|
|
98
|
+
create(body: CreateOrganizationDto): Promise<import("openapi-fetch").FetchResponse<{
|
|
99
|
+
parameters: {
|
|
100
|
+
query?: never;
|
|
101
|
+
header?: never;
|
|
102
|
+
path?: never;
|
|
103
|
+
cookie?: never;
|
|
104
|
+
};
|
|
105
|
+
requestBody: {
|
|
106
|
+
content: {
|
|
107
|
+
"application/json": components["schemas"]["CreateOrganizationDto"];
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
responses: {
|
|
111
|
+
201: {
|
|
112
|
+
headers: {
|
|
113
|
+
[name: string]: unknown;
|
|
114
|
+
};
|
|
115
|
+
content: {
|
|
116
|
+
"application/json": {
|
|
117
|
+
status?: string;
|
|
118
|
+
data?: components["schemas"]["Organization"];
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
400: components["responses"]["BadRequest"];
|
|
123
|
+
401: components["responses"]["Unauthorized"];
|
|
124
|
+
500: components["responses"]["ServerError"];
|
|
125
|
+
};
|
|
126
|
+
}, {
|
|
127
|
+
body: {
|
|
128
|
+
name: string;
|
|
129
|
+
parentId?: string;
|
|
130
|
+
type: string;
|
|
131
|
+
isActive: boolean;
|
|
132
|
+
};
|
|
133
|
+
}, `${string}/${string}`>>;
|
|
134
|
+
/**
|
|
135
|
+
* Update organization information
|
|
136
|
+
*/
|
|
137
|
+
update(id: string, body: UpdateOrganizationDto): Promise<import("openapi-fetch").FetchResponse<{
|
|
138
|
+
parameters: {
|
|
139
|
+
query?: never;
|
|
140
|
+
header?: never;
|
|
141
|
+
path: {
|
|
142
|
+
id: components["parameters"]["id"];
|
|
143
|
+
};
|
|
144
|
+
cookie?: never;
|
|
145
|
+
};
|
|
146
|
+
requestBody: {
|
|
147
|
+
content: {
|
|
148
|
+
"application/json": components["schemas"]["UpdateOrganizationDto"];
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
responses: {
|
|
152
|
+
200: {
|
|
153
|
+
headers: {
|
|
154
|
+
[name: string]: unknown;
|
|
155
|
+
};
|
|
156
|
+
content: {
|
|
157
|
+
"application/json": {
|
|
158
|
+
status?: string;
|
|
159
|
+
data?: components["schemas"]["Organization"];
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
400: components["responses"]["BadRequest"];
|
|
164
|
+
401: components["responses"]["Unauthorized"];
|
|
165
|
+
404: components["responses"]["NotFound"];
|
|
166
|
+
500: components["responses"]["ServerError"];
|
|
167
|
+
};
|
|
168
|
+
}, {
|
|
169
|
+
params: {
|
|
170
|
+
path: {
|
|
171
|
+
id: string;
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
body: {
|
|
175
|
+
name?: string;
|
|
176
|
+
parentId?: string;
|
|
177
|
+
type?: string;
|
|
178
|
+
isActive?: boolean;
|
|
179
|
+
};
|
|
180
|
+
}, `${string}/${string}`>>;
|
|
181
|
+
/**
|
|
182
|
+
* Delete organization
|
|
183
|
+
* Note: Cannot delete organizations with children
|
|
184
|
+
*/
|
|
185
|
+
delete(id: string): Promise<import("openapi-fetch").FetchResponse<{
|
|
186
|
+
parameters: {
|
|
187
|
+
query?: never;
|
|
188
|
+
header?: never;
|
|
189
|
+
path: {
|
|
190
|
+
id: components["parameters"]["id"];
|
|
191
|
+
};
|
|
192
|
+
cookie?: never;
|
|
193
|
+
};
|
|
194
|
+
requestBody?: never;
|
|
195
|
+
responses: {
|
|
196
|
+
204: {
|
|
197
|
+
headers: {
|
|
198
|
+
[name: string]: unknown;
|
|
199
|
+
};
|
|
200
|
+
content?: never;
|
|
201
|
+
};
|
|
202
|
+
400: components["responses"]["BadRequest"];
|
|
203
|
+
401: components["responses"]["Unauthorized"];
|
|
204
|
+
404: components["responses"]["NotFound"];
|
|
205
|
+
500: components["responses"]["ServerError"];
|
|
206
|
+
};
|
|
207
|
+
}, {
|
|
208
|
+
params: {
|
|
209
|
+
path: {
|
|
210
|
+
id: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
}, `${string}/${string}`>>;
|
|
214
|
+
};
|
|
215
|
+
export type OrganizationService = ReturnType<typeof createOrganizationService>;
|
|
216
|
+
export {};
|