academe-kit 0.3.6 → 0.3.8
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 +8036 -3255
- package/dist/index.esm.js +347 -48
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +346 -47
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +19 -19
- package/dist/types/roles/applications.d.ts +5 -0
- package/dist/types/services/AuthService.d.ts +132 -0
- package/dist/types/services/CertificateService.d.ts +221 -0
- package/dist/types/services/ClassroomService.d.ts +55 -4
- package/dist/types/services/GroupService.d.ts +515 -0
- package/dist/types/services/InstitutionService.d.ts +26 -19
- package/dist/types/services/QuizService.d.ts +223 -0
- package/dist/types/services/SeatCodeService.d.ts +456 -0
- package/dist/types/services/UserService.d.ts +112 -16
- package/dist/types/services/index.d.ts +32 -17
- package/dist/types/types/academe-api.d.ts +3598 -534
- package/dist/types/types/index.d.ts +18 -9
- package/package.json +1 -1
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import type { AcademeApiClient } from
|
|
2
|
-
import type { components } from
|
|
3
|
-
type CreateUserBody =
|
|
4
|
-
|
|
5
|
-
lastName: string;
|
|
6
|
-
email: string;
|
|
7
|
-
password: string;
|
|
8
|
-
phone?: string;
|
|
9
|
-
document?: number;
|
|
10
|
-
gender?: 'male' | 'female' | 'other';
|
|
11
|
-
birthdate?: string;
|
|
12
|
-
};
|
|
13
|
-
type UpdateUserDto = components['schemas']['UpdateUserDto'];
|
|
1
|
+
import type { AcademeApiClient } from "./index";
|
|
2
|
+
import type { components } from "../types/academe-api";
|
|
3
|
+
type CreateUserBody = components["schemas"]["CreateUserDto"];
|
|
4
|
+
type UpdateUserDto = components["schemas"]["UpdateUserDto"];
|
|
14
5
|
type GetUsersParams = {
|
|
15
6
|
email?: string;
|
|
16
7
|
document?: number;
|
|
@@ -163,9 +154,12 @@ export declare function createUserService(apiClient: AcademeApiClient): {
|
|
|
163
154
|
email: string;
|
|
164
155
|
password: string;
|
|
165
156
|
phone?: string;
|
|
166
|
-
document
|
|
157
|
+
document: string;
|
|
167
158
|
gender?: "male" | "female" | "other";
|
|
168
159
|
birthdate?: string;
|
|
160
|
+
seatCodeId?: string;
|
|
161
|
+
groupId?: string;
|
|
162
|
+
institutionId?: string;
|
|
169
163
|
};
|
|
170
164
|
};
|
|
171
165
|
};
|
|
@@ -181,8 +175,99 @@ export declare function createUserService(apiClient: AcademeApiClient): {
|
|
|
181
175
|
};
|
|
182
176
|
};
|
|
183
177
|
};
|
|
184
|
-
400:
|
|
178
|
+
400: {
|
|
179
|
+
headers: {
|
|
180
|
+
[name: string]: unknown;
|
|
181
|
+
};
|
|
182
|
+
content: {
|
|
183
|
+
"application/json": components["schemas"]["Error"];
|
|
184
|
+
};
|
|
185
|
+
};
|
|
185
186
|
401: components["responses"]["Unauthorized"];
|
|
187
|
+
404: {
|
|
188
|
+
headers: {
|
|
189
|
+
[name: string]: unknown;
|
|
190
|
+
};
|
|
191
|
+
content: {
|
|
192
|
+
"application/json": components["schemas"]["Error"];
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
409: {
|
|
196
|
+
headers: {
|
|
197
|
+
[name: string]: unknown;
|
|
198
|
+
};
|
|
199
|
+
content: {
|
|
200
|
+
"application/json": components["schemas"]["Error"];
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
500: components["responses"]["ServerError"];
|
|
204
|
+
};
|
|
205
|
+
}, {
|
|
206
|
+
body: {
|
|
207
|
+
firstName: string;
|
|
208
|
+
lastName: string;
|
|
209
|
+
email: string;
|
|
210
|
+
password: string;
|
|
211
|
+
phone?: string;
|
|
212
|
+
document: string;
|
|
213
|
+
gender?: "male" | "female" | "other";
|
|
214
|
+
birthdate?: string;
|
|
215
|
+
groupId?: string;
|
|
216
|
+
institutionId?: string;
|
|
217
|
+
};
|
|
218
|
+
}, `${string}/${string}`>>;
|
|
219
|
+
createPublicUser(body: CreateUserBody): Promise<import("openapi-fetch").FetchResponse<{
|
|
220
|
+
parameters: {
|
|
221
|
+
query?: never;
|
|
222
|
+
header?: never;
|
|
223
|
+
path?: never;
|
|
224
|
+
cookie?: never;
|
|
225
|
+
};
|
|
226
|
+
requestBody: {
|
|
227
|
+
content: {
|
|
228
|
+
"application/json": {
|
|
229
|
+
firstName: string;
|
|
230
|
+
lastName: string;
|
|
231
|
+
email: string;
|
|
232
|
+
password: string;
|
|
233
|
+
phone?: string;
|
|
234
|
+
document: string;
|
|
235
|
+
gender?: "male" | "female" | "other";
|
|
236
|
+
birthdate?: string;
|
|
237
|
+
seatCodeId?: string;
|
|
238
|
+
groupId?: string;
|
|
239
|
+
institutionId?: string;
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
responses: {
|
|
244
|
+
201: {
|
|
245
|
+
headers: {
|
|
246
|
+
[name: string]: unknown;
|
|
247
|
+
};
|
|
248
|
+
content: {
|
|
249
|
+
"application/json": {
|
|
250
|
+
status?: string;
|
|
251
|
+
data?: components["schemas"]["User"];
|
|
252
|
+
};
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
400: {
|
|
256
|
+
headers: {
|
|
257
|
+
[name: string]: unknown;
|
|
258
|
+
};
|
|
259
|
+
content: {
|
|
260
|
+
"application/json": components["schemas"]["Error"];
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
404: {
|
|
264
|
+
headers: {
|
|
265
|
+
[name: string]: unknown;
|
|
266
|
+
};
|
|
267
|
+
content: {
|
|
268
|
+
"application/json": components["schemas"]["Error"];
|
|
269
|
+
};
|
|
270
|
+
};
|
|
186
271
|
409: {
|
|
187
272
|
headers: {
|
|
188
273
|
[name: string]: unknown;
|
|
@@ -194,7 +279,18 @@ export declare function createUserService(apiClient: AcademeApiClient): {
|
|
|
194
279
|
500: components["responses"]["ServerError"];
|
|
195
280
|
};
|
|
196
281
|
}, {
|
|
197
|
-
body:
|
|
282
|
+
body: {
|
|
283
|
+
firstName: string;
|
|
284
|
+
lastName: string;
|
|
285
|
+
email: string;
|
|
286
|
+
password: string;
|
|
287
|
+
phone?: string;
|
|
288
|
+
document: string;
|
|
289
|
+
gender?: "male" | "female" | "other";
|
|
290
|
+
birthdate?: string;
|
|
291
|
+
groupId?: string;
|
|
292
|
+
institutionId?: string;
|
|
293
|
+
};
|
|
198
294
|
}, `${string}/${string}`>>;
|
|
199
295
|
/**
|
|
200
296
|
* Update user information
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import type { paths } from
|
|
2
|
-
import createClient from
|
|
3
|
-
import { type UserService } from
|
|
4
|
-
import { type InstitutionService } from
|
|
5
|
-
import { type ReportService } from
|
|
6
|
-
import { type ClassroomService } from
|
|
7
|
-
import { type OrganizationService } from
|
|
8
|
-
import { type SerieService } from
|
|
9
|
-
import { type ShiftService } from
|
|
10
|
-
import { type GuardianService } from
|
|
1
|
+
import type { paths } from "../types/academe-api";
|
|
2
|
+
import createClient from "openapi-fetch";
|
|
3
|
+
import { type UserService } from "./UserService";
|
|
4
|
+
import { type InstitutionService } from "./InstitutionService";
|
|
5
|
+
import { type ReportService } from "./ReportService";
|
|
6
|
+
import { type ClassroomService } from "./ClassroomService";
|
|
7
|
+
import { type OrganizationService } from "./OrganizationService";
|
|
8
|
+
import { type SerieService } from "./SerieService";
|
|
9
|
+
import { type ShiftService } from "./ShiftService";
|
|
10
|
+
import { type GuardianService } from "./GuardianService";
|
|
11
|
+
import { type AuthService } from "./AuthService";
|
|
12
|
+
import { type GroupService } from "./GroupService";
|
|
13
|
+
import { type QuizService } from "./QuizService";
|
|
14
|
+
import { type CertificateService } from "./CertificateService";
|
|
15
|
+
import { type SeatCodeService } from "./SeatCodeService";
|
|
11
16
|
export type AcademeApiClient = ReturnType<typeof createClient<paths>>;
|
|
12
17
|
export declare function createAcademeApiClient(baseUrl: string): AcademeApiClient;
|
|
13
18
|
export interface AcademeServices {
|
|
@@ -19,12 +24,22 @@ export interface AcademeServices {
|
|
|
19
24
|
serie: SerieService;
|
|
20
25
|
shift: ShiftService;
|
|
21
26
|
guardian: GuardianService;
|
|
27
|
+
auth: AuthService;
|
|
28
|
+
group: GroupService;
|
|
29
|
+
quiz: QuizService;
|
|
30
|
+
certificate: CertificateService;
|
|
31
|
+
seatCode: SeatCodeService;
|
|
22
32
|
}
|
|
23
33
|
export declare function createAcademeServices(apiClient: AcademeApiClient): AcademeServices;
|
|
24
|
-
export { createUserService, type UserService } from
|
|
25
|
-
export { createReportService, type ReportService } from
|
|
26
|
-
export { createClassroomService, type ClassroomService } from
|
|
27
|
-
export { createOrganizationService, type OrganizationService } from
|
|
28
|
-
export { createSerieService, type SerieService } from
|
|
29
|
-
export { createShiftService, type ShiftService } from
|
|
30
|
-
export { createGuardianService, type GuardianService } from
|
|
34
|
+
export { createUserService, type UserService } from "./UserService";
|
|
35
|
+
export { createReportService, type ReportService } from "./ReportService";
|
|
36
|
+
export { createClassroomService, type ClassroomService, } from "./ClassroomService";
|
|
37
|
+
export { createOrganizationService, type OrganizationService, } from "./OrganizationService";
|
|
38
|
+
export { createSerieService, type SerieService } from "./SerieService";
|
|
39
|
+
export { createShiftService, type ShiftService } from "./ShiftService";
|
|
40
|
+
export { createGuardianService, type GuardianService } from "./GuardianService";
|
|
41
|
+
export { createAuthService, type AuthService } from "./AuthService";
|
|
42
|
+
export { createGroupService, type GroupService } from "./GroupService";
|
|
43
|
+
export { createQuizService, type QuizService } from "./QuizService";
|
|
44
|
+
export { createCertificateService, type CertificateService } from "./CertificateService";
|
|
45
|
+
export { createSeatCodeService, type SeatCodeService } from "./SeatCodeService";
|