academe-kit 0.9.3 → 0.9.5

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 (39) hide show
  1. package/dist/index.cjs +1119 -4
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.ts +9147 -5349
  4. package/dist/index.esm.js +1118 -6
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/types/components/CosmicDecor/CosmicDecor.d.ts +10 -0
  7. package/dist/types/components/CosmicDecor/index.d.ts +2 -0
  8. package/dist/types/components/CosmicDecor/planets/astronaut.d.ts +2 -0
  9. package/dist/types/components/CosmicDecor/planets/black-hole.d.ts +2 -0
  10. package/dist/types/components/CosmicDecor/planets/earth.d.ts +2 -0
  11. package/dist/types/components/CosmicDecor/planets/giant.d.ts +2 -0
  12. package/dist/types/components/CosmicDecor/planets/index.d.ts +10 -0
  13. package/dist/types/components/CosmicDecor/planets/moon.d.ts +2 -0
  14. package/dist/types/components/CosmicDecor/planets/neptune.d.ts +2 -0
  15. package/dist/types/components/CosmicDecor/planets/satellite.d.ts +2 -0
  16. package/dist/types/components/CosmicDecor/planets/saturn.d.ts +2 -0
  17. package/dist/types/components/CosmicDecor/planets/sun.d.ts +2 -0
  18. package/dist/types/components/CosmicDecor/planets/types.d.ts +4 -0
  19. package/dist/types/components/CosmicStarsCanvas/CosmicStarsCanvas.d.ts +5 -0
  20. package/dist/types/components/CosmicStarsCanvas/index.d.ts +2 -0
  21. package/dist/types/components/JourneyStep/JourneyStep.d.ts +20 -0
  22. package/dist/types/components/JourneyStep/frames/circle-laurel.d.ts +2 -0
  23. package/dist/types/components/JourneyStep/frames/hexagon-ribbon.d.ts +2 -0
  24. package/dist/types/components/JourneyStep/frames/hexagon-wings.d.ts +2 -0
  25. package/dist/types/components/JourneyStep/frames/index.d.ts +4 -0
  26. package/dist/types/components/JourneyStep/frames/pentagon-crown.d.ts +2 -0
  27. package/dist/types/components/JourneyStep/frames/pentagon.d.ts +2 -0
  28. package/dist/types/components/JourneyStep/frames/shield-wings.d.ts +2 -0
  29. package/dist/types/components/JourneyStep/frames/types.d.ts +34 -0
  30. package/dist/types/components/JourneyStep/frames/utils.d.ts +23 -0
  31. package/dist/types/components/JourneyStep/index.d.ts +3 -0
  32. package/dist/types/index.d.ts +6 -0
  33. package/dist/types/services/CertificateService.d.ts +14 -166
  34. package/dist/types/services/ChallengeService.d.ts +748 -0
  35. package/dist/types/services/StepService.d.ts +215 -0
  36. package/dist/types/services/index.d.ts +6 -0
  37. package/dist/types/services/userService.d.ts +3 -56
  38. package/dist/types/types/academe-api.d.ts +4186 -1179
  39. package/package.json +6 -2
@@ -0,0 +1,215 @@
1
+ import type { AcademeApiClient } from "./index";
2
+ import type { paths } from "../types/academe-api";
3
+ type GetStepsParams = paths["/steps"]["get"]["parameters"]["query"];
4
+ type CreateStepBody = paths["/steps"]["post"]["requestBody"]["content"]["application/json"];
5
+ type UpdateStepBody = paths["/steps/{id}"]["patch"]["requestBody"]["content"]["application/json"];
6
+ export declare function createStepService(apiClient: AcademeApiClient): {
7
+ /**
8
+ * List the step catalog (filterable by type / isActive)
9
+ */
10
+ getAll(params?: GetStepsParams): Promise<import("openapi-fetch").FetchResponse<{
11
+ parameters: {
12
+ query?: {
13
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
14
+ isActive?: boolean;
15
+ };
16
+ header?: never;
17
+ path?: never;
18
+ cookie?: never;
19
+ };
20
+ requestBody?: never;
21
+ responses: {
22
+ 200: {
23
+ headers: {
24
+ [name: string]: unknown;
25
+ };
26
+ content: {
27
+ "application/json": {
28
+ status?: string;
29
+ data?: import("../types/academe-api").components["schemas"]["Step"][];
30
+ };
31
+ };
32
+ };
33
+ 401: import("../types/academe-api").components["responses"]["Unauthorized"];
34
+ 500: import("../types/academe-api").components["responses"]["ServerError"];
35
+ };
36
+ }, {
37
+ params: {
38
+ query: {
39
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
40
+ isActive?: boolean;
41
+ } | undefined;
42
+ };
43
+ }, `${string}/${string}`>>;
44
+ /**
45
+ * Get a step by ID
46
+ */
47
+ getById(id: string): Promise<import("openapi-fetch").FetchResponse<{
48
+ parameters: {
49
+ query?: never;
50
+ header?: never;
51
+ path: {
52
+ id: import("../types/academe-api").components["parameters"]["id"];
53
+ };
54
+ cookie?: never;
55
+ };
56
+ requestBody?: never;
57
+ responses: {
58
+ 200: {
59
+ headers: {
60
+ [name: string]: unknown;
61
+ };
62
+ content: {
63
+ "application/json": {
64
+ status?: string;
65
+ data?: import("../types/academe-api").components["schemas"]["Step"];
66
+ };
67
+ };
68
+ };
69
+ 400: import("../types/academe-api").components["responses"]["BadRequest"];
70
+ 401: import("../types/academe-api").components["responses"]["Unauthorized"];
71
+ 404: import("../types/academe-api").components["responses"]["NotFound"];
72
+ 500: import("../types/academe-api").components["responses"]["ServerError"];
73
+ };
74
+ }, {
75
+ params: {
76
+ path: {
77
+ id: string;
78
+ };
79
+ };
80
+ }, `${string}/${string}`>>;
81
+ /**
82
+ * Create a new step in the catalog
83
+ */
84
+ create(data: CreateStepBody): Promise<import("openapi-fetch").FetchResponse<{
85
+ parameters: {
86
+ query?: never;
87
+ header?: never;
88
+ path?: never;
89
+ cookie?: never;
90
+ };
91
+ requestBody: {
92
+ content: {
93
+ "application/json": {
94
+ name: string;
95
+ color: string;
96
+ icon: string;
97
+ type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
98
+ isActive?: boolean;
99
+ };
100
+ };
101
+ };
102
+ responses: {
103
+ 201: {
104
+ headers: {
105
+ [name: string]: unknown;
106
+ };
107
+ content: {
108
+ "application/json": {
109
+ status?: string;
110
+ data?: import("../types/academe-api").components["schemas"]["Step"];
111
+ };
112
+ };
113
+ };
114
+ 400: import("../types/academe-api").components["responses"]["BadRequest"];
115
+ 401: import("../types/academe-api").components["responses"]["Unauthorized"];
116
+ 500: import("../types/academe-api").components["responses"]["ServerError"];
117
+ };
118
+ }, {
119
+ body: {
120
+ name: string;
121
+ color: string;
122
+ icon: string;
123
+ type: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
124
+ isActive?: boolean;
125
+ };
126
+ }, `${string}/${string}`>>;
127
+ /**
128
+ * Update a step
129
+ */
130
+ update(id: string, data: UpdateStepBody): Promise<import("openapi-fetch").FetchResponse<{
131
+ parameters: {
132
+ query?: never;
133
+ header?: never;
134
+ path: {
135
+ id: import("../types/academe-api").components["parameters"]["id"];
136
+ };
137
+ cookie?: never;
138
+ };
139
+ requestBody: {
140
+ content: {
141
+ "application/json": {
142
+ name?: string;
143
+ color?: string;
144
+ icon?: string;
145
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
146
+ isActive?: boolean;
147
+ };
148
+ };
149
+ };
150
+ responses: {
151
+ 200: {
152
+ headers: {
153
+ [name: string]: unknown;
154
+ };
155
+ content: {
156
+ "application/json": {
157
+ status?: string;
158
+ data?: import("../types/academe-api").components["schemas"]["Step"];
159
+ };
160
+ };
161
+ };
162
+ 400: import("../types/academe-api").components["responses"]["BadRequest"];
163
+ 401: import("../types/academe-api").components["responses"]["Unauthorized"];
164
+ 404: import("../types/academe-api").components["responses"]["NotFound"];
165
+ 500: import("../types/academe-api").components["responses"]["ServerError"];
166
+ };
167
+ }, {
168
+ params: {
169
+ path: {
170
+ id: string;
171
+ };
172
+ };
173
+ body: {
174
+ name?: string;
175
+ color?: string;
176
+ icon?: string;
177
+ type?: "challenge" | "course" | "tutorial" | "publication" | "evaluation" | "certificate";
178
+ isActive?: boolean;
179
+ };
180
+ }, `${string}/${string}`>>;
181
+ /**
182
+ * Delete a step
183
+ */
184
+ delete(id: string): Promise<import("openapi-fetch").FetchResponse<{
185
+ parameters: {
186
+ query?: never;
187
+ header?: never;
188
+ path: {
189
+ id: import("../types/academe-api").components["parameters"]["id"];
190
+ };
191
+ cookie?: never;
192
+ };
193
+ requestBody?: never;
194
+ responses: {
195
+ 204: {
196
+ headers: {
197
+ [name: string]: unknown;
198
+ };
199
+ content?: never;
200
+ };
201
+ 400: import("../types/academe-api").components["responses"]["BadRequest"];
202
+ 401: import("../types/academe-api").components["responses"]["Unauthorized"];
203
+ 404: import("../types/academe-api").components["responses"]["NotFound"];
204
+ 500: import("../types/academe-api").components["responses"]["ServerError"];
205
+ };
206
+ }, {
207
+ params: {
208
+ path: {
209
+ id: string;
210
+ };
211
+ };
212
+ }, `${string}/${string}`>>;
213
+ };
214
+ export type StepService = ReturnType<typeof createStepService>;
215
+ export {};
@@ -18,6 +18,8 @@ import { type ProductService } from "./ProductService";
18
18
  import { type CourseService } from './CourseService';
19
19
  import { type CategoryService } from './CategoryService';
20
20
  import { type StorageFileService } from './StorageFileService';
21
+ import { type ChallengeService } from './ChallengeService';
22
+ import { type StepService } from './StepService';
21
23
  export type AcademeApiClient = ReturnType<typeof createClient<paths>>;
22
24
  export declare function createAcademeApiClient(baseUrl: string): AcademeApiClient;
23
25
  export interface AcademeServices {
@@ -39,6 +41,8 @@ export interface AcademeServices {
39
41
  seatCode: SeatCodeService;
40
42
  product: ProductService;
41
43
  storageFile: StorageFileService;
44
+ challenge: ChallengeService;
45
+ step: StepService;
42
46
  }
43
47
  export declare function createAcademeServices(apiClient: AcademeApiClient): AcademeServices;
44
48
  export { createUserService, type UserService } from "./userService";
@@ -58,3 +62,5 @@ export { createProductService, type ProductService } from "./ProductService";
58
62
  export { createCourseService, type CourseService } from './CourseService';
59
63
  export { createCategoryService, type CategoryService } from './CategoryService';
60
64
  export { createStorageFileService, type StorageFileService } from './StorageFileService';
65
+ export { createChallengeService, type ChallengeService } from './ChallengeService';
66
+ export { createStepService, type StepService } from './StepService';
@@ -338,62 +338,9 @@ export declare function createUserService(apiClient: AcademeApiClient): {
338
338
  404: components["responses"]["NotFound"];
339
339
  500: components["responses"]["ServerError"];
340
340
  };
341
- }, import("openapi-fetch").FetchOptions<{
342
- parameters: {
343
- query?: never;
344
- header?: never;
345
- path?: never;
346
- cookie?: never;
347
- };
348
- requestBody: {
349
- content: {
350
- "application/json": {
351
- email?: string;
352
- firstName?: string;
353
- lastName?: string;
354
- phone?: string;
355
- document?: string;
356
- gender?: "male" | "female" | "other";
357
- birthdate?: string;
358
- avatarFileId?: string;
359
- address?: {
360
- address?: string;
361
- number?: number;
362
- zip?: string;
363
- neighborhood?: string;
364
- city?: string;
365
- state?: string;
366
- latitude?: number;
367
- longitude?: number;
368
- };
369
- pushToken?: {
370
- token: string;
371
- platform: "ios" | "android" | "web";
372
- deviceId?: string;
373
- provider?: "firebase" | "apns" | "fcm";
374
- };
375
- };
376
- };
377
- };
378
- responses: {
379
- 200: {
380
- headers: {
381
- [name: string]: unknown;
382
- };
383
- content: {
384
- "application/json": {
385
- status?: string;
386
- data?: components["schemas"]["User"];
387
- message?: string;
388
- };
389
- };
390
- };
391
- 400: components["responses"]["BadRequest"];
392
- 401: components["responses"]["Unauthorized"];
393
- 404: components["responses"]["NotFound"];
394
- 500: components["responses"]["ServerError"];
395
- };
396
- }>, `${string}/${string}`>>;
341
+ }, {
342
+ body: any;
343
+ }, `${string}/${string}`>>;
397
344
  /**
398
345
  * Delete user
399
346
  */