academe-kit 0.3.7 → 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.
@@ -1,16 +1,7 @@
1
- import type { AcademeApiClient } from './index';
2
- import type { components } from '../types/academe-api';
3
- type CreateUserBody = {
4
- firstName: string;
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?: number;
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: components["responses"]["BadRequest"];
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: CreateUserBody;
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 '../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';
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 './UserService';
25
- export { createReportService, type ReportService } from './ReportService';
26
- export { createClassroomService, type ClassroomService } from './ClassroomService';
27
- export { createOrganizationService, type OrganizationService } from './OrganizationService';
28
- export { createSerieService, type SerieService } from './SerieService';
29
- export { createShiftService, type ShiftService } from './ShiftService';
30
- export { createGuardianService, type GuardianService } from './GuardianService';
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";