academe-kit 0.9.1 → 0.9.3

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.
@@ -145,6 +145,51 @@ export declare function createCertificateService(apiClient: AcademeApiClient): {
145
145
  };
146
146
  };
147
147
  }, `${string}/${string}`>>;
148
+ /**
149
+ * Download all certificates of a given user as a single merged PDF
150
+ */
151
+ downloadAll(userId: string): Promise<import("openapi-fetch").FetchResponse<{
152
+ parameters: {
153
+ query?: never;
154
+ header?: never;
155
+ path: {
156
+ userId: string;
157
+ };
158
+ cookie?: never;
159
+ };
160
+ requestBody?: never;
161
+ responses: {
162
+ 200: {
163
+ headers: {
164
+ "Content-Disposition"?: string;
165
+ [name: string]: unknown;
166
+ };
167
+ content: {
168
+ "application/pdf": string;
169
+ };
170
+ };
171
+ 401: components["responses"]["Unauthorized"];
172
+ 404: {
173
+ headers: {
174
+ [name: string]: unknown;
175
+ };
176
+ content: {
177
+ "application/json": {
178
+ status?: string;
179
+ message?: string;
180
+ };
181
+ };
182
+ };
183
+ 500: components["responses"]["ServerError"];
184
+ };
185
+ }, {
186
+ params: {
187
+ path: {
188
+ userId: string;
189
+ };
190
+ };
191
+ parseAs: "blob";
192
+ }, `${string}/${string}`>>;
148
193
  /**
149
194
  * Download certificate PDF
150
195
  */
@@ -178,6 +223,7 @@ export declare function createCertificateService(apiClient: AcademeApiClient): {
178
223
  id: string;
179
224
  };
180
225
  };
226
+ parseAs: "blob";
181
227
  }, `${string}/${string}`>>;
182
228
  /**
183
229
  * Create a new certificate
@@ -16,6 +16,7 @@ type UpdateCurriculumGridDto = components["schemas"]["UpdateCurriculumGridDto"];
16
16
  type CreateCurriculumPeriodDto = components["schemas"]["CreateCurriculumPeriodDto"];
17
17
  type UpdateCurriculumPeriodDto = components["schemas"]["UpdateCurriculumPeriodDto"];
18
18
  type GetInstitutionUsersQuery = paths["/institutions/{institutionId}/users"]["get"]["parameters"]["query"];
19
+ type GetInstitutionClassroomsQuery = paths["/institutions/{institutionId}/classrooms"]["get"]["parameters"]["query"];
19
20
  export declare function createInstitutionService(apiClient: AcademeApiClient): {
20
21
  getAll(): Promise<import("openapi-fetch").FetchResponse<{
21
22
  parameters: {
@@ -331,9 +332,7 @@ export declare function createInstitutionService(apiClient: AcademeApiClient): {
331
332
  productId?: string;
332
333
  };
333
334
  }, `${string}/${string}`>>;
334
- getClassrooms(institutionId: string, options?: {
335
- includeUserCount?: boolean;
336
- }): Promise<import("openapi-fetch").FetchResponse<{
335
+ getClassrooms(institutionId: string, options?: GetInstitutionClassroomsQuery): Promise<import("openapi-fetch").FetchResponse<{
337
336
  parameters: {
338
337
  query?: {
339
338
  includeUserCount?: boolean;
@@ -1038,6 +1038,68 @@ export interface paths {
1038
1038
  patch?: never;
1039
1039
  trace?: never;
1040
1040
  };
1041
+ "/certificates/{userId}/download-all": {
1042
+ parameters: {
1043
+ query?: never;
1044
+ header?: never;
1045
+ path?: never;
1046
+ cookie?: never;
1047
+ };
1048
+ /**
1049
+ * Download all certificates of a user as a single PDF
1050
+ * @description Downloads all certificates of the given user merged into a single PDF file.
1051
+ * Each certificate occupies one page in the resulting file.
1052
+ * PDFs are downloaded from S3 in parallel and merged using pdf-lib.
1053
+ */
1054
+ get: {
1055
+ parameters: {
1056
+ query?: never;
1057
+ header?: never;
1058
+ path: {
1059
+ /** @description ID of the user whose certificates will be downloaded */
1060
+ userId: string;
1061
+ };
1062
+ cookie?: never;
1063
+ };
1064
+ requestBody?: never;
1065
+ responses: {
1066
+ /** @description Merged PDF file containing all user certificates */
1067
+ 200: {
1068
+ headers: {
1069
+ /** @description attachment; filename="Meus-Certificados.pdf" */
1070
+ "Content-Disposition"?: string;
1071
+ [name: string]: unknown;
1072
+ };
1073
+ content: {
1074
+ "application/pdf": string;
1075
+ };
1076
+ };
1077
+ 401: components["responses"]["Unauthorized"];
1078
+ /** @description No certificates found for the user */
1079
+ 404: {
1080
+ headers: {
1081
+ [name: string]: unknown;
1082
+ };
1083
+ content: {
1084
+ "application/json": {
1085
+ /** @example error */
1086
+ status?: string;
1087
+ /** @example No certificates found for this user */
1088
+ message?: string;
1089
+ };
1090
+ };
1091
+ };
1092
+ 500: components["responses"]["ServerError"];
1093
+ };
1094
+ };
1095
+ put?: never;
1096
+ post?: never;
1097
+ delete?: never;
1098
+ options?: never;
1099
+ head?: never;
1100
+ patch?: never;
1101
+ trace?: never;
1102
+ };
1041
1103
  "/certificates": {
1042
1104
  parameters: {
1043
1105
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "academe-kit",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "type": "module",
5
5
  "description": "Official React SDK for Academe ecosystem - Authentication, protected routes, API services, and UI components for educational management applications",
6
6
  "main": "dist/index.cjs",