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.
- package/dist/index.cjs +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +110 -3
- package/dist/index.esm.js +10 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/services/CertificateService.d.ts +46 -0
- package/dist/types/services/InstitutionService.d.ts +2 -3
- package/dist/types/types/academe-api.d.ts +62 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1087,6 +1087,68 @@ interface paths {
|
|
|
1087
1087
|
patch?: never;
|
|
1088
1088
|
trace?: never;
|
|
1089
1089
|
};
|
|
1090
|
+
"/certificates/{userId}/download-all": {
|
|
1091
|
+
parameters: {
|
|
1092
|
+
query?: never;
|
|
1093
|
+
header?: never;
|
|
1094
|
+
path?: never;
|
|
1095
|
+
cookie?: never;
|
|
1096
|
+
};
|
|
1097
|
+
/**
|
|
1098
|
+
* Download all certificates of a user as a single PDF
|
|
1099
|
+
* @description Downloads all certificates of the given user merged into a single PDF file.
|
|
1100
|
+
* Each certificate occupies one page in the resulting file.
|
|
1101
|
+
* PDFs are downloaded from S3 in parallel and merged using pdf-lib.
|
|
1102
|
+
*/
|
|
1103
|
+
get: {
|
|
1104
|
+
parameters: {
|
|
1105
|
+
query?: never;
|
|
1106
|
+
header?: never;
|
|
1107
|
+
path: {
|
|
1108
|
+
/** @description ID of the user whose certificates will be downloaded */
|
|
1109
|
+
userId: string;
|
|
1110
|
+
};
|
|
1111
|
+
cookie?: never;
|
|
1112
|
+
};
|
|
1113
|
+
requestBody?: never;
|
|
1114
|
+
responses: {
|
|
1115
|
+
/** @description Merged PDF file containing all user certificates */
|
|
1116
|
+
200: {
|
|
1117
|
+
headers: {
|
|
1118
|
+
/** @description attachment; filename="Meus-Certificados.pdf" */
|
|
1119
|
+
"Content-Disposition"?: string;
|
|
1120
|
+
[name: string]: unknown;
|
|
1121
|
+
};
|
|
1122
|
+
content: {
|
|
1123
|
+
"application/pdf": string;
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
1126
|
+
401: components["responses"]["Unauthorized"];
|
|
1127
|
+
/** @description No certificates found for the user */
|
|
1128
|
+
404: {
|
|
1129
|
+
headers: {
|
|
1130
|
+
[name: string]: unknown;
|
|
1131
|
+
};
|
|
1132
|
+
content: {
|
|
1133
|
+
"application/json": {
|
|
1134
|
+
/** @example error */
|
|
1135
|
+
status?: string;
|
|
1136
|
+
/** @example No certificates found for this user */
|
|
1137
|
+
message?: string;
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
};
|
|
1141
|
+
500: components["responses"]["ServerError"];
|
|
1142
|
+
};
|
|
1143
|
+
};
|
|
1144
|
+
put?: never;
|
|
1145
|
+
post?: never;
|
|
1146
|
+
delete?: never;
|
|
1147
|
+
options?: never;
|
|
1148
|
+
head?: never;
|
|
1149
|
+
patch?: never;
|
|
1150
|
+
trace?: never;
|
|
1151
|
+
};
|
|
1090
1152
|
"/certificates": {
|
|
1091
1153
|
parameters: {
|
|
1092
1154
|
query?: never;
|
|
@@ -13948,6 +14010,7 @@ type UpdateCurriculumGridDto = components["schemas"]["UpdateCurriculumGridDto"];
|
|
|
13948
14010
|
type CreateCurriculumPeriodDto = components["schemas"]["CreateCurriculumPeriodDto"];
|
|
13949
14011
|
type UpdateCurriculumPeriodDto = components["schemas"]["UpdateCurriculumPeriodDto"];
|
|
13950
14012
|
type GetInstitutionUsersQuery = paths["/institutions/{institutionId}/users"]["get"]["parameters"]["query"];
|
|
14013
|
+
type GetInstitutionClassroomsQuery = paths["/institutions/{institutionId}/classrooms"]["get"]["parameters"]["query"];
|
|
13951
14014
|
declare function createInstitutionService(apiClient: AcademeApiClient): {
|
|
13952
14015
|
getAll(): Promise<openapi_fetch.FetchResponse<{
|
|
13953
14016
|
parameters: {
|
|
@@ -14263,9 +14326,7 @@ declare function createInstitutionService(apiClient: AcademeApiClient): {
|
|
|
14263
14326
|
productId?: string;
|
|
14264
14327
|
};
|
|
14265
14328
|
}, `${string}/${string}`>>;
|
|
14266
|
-
getClassrooms(institutionId: string, options?: {
|
|
14267
|
-
includeUserCount?: boolean;
|
|
14268
|
-
}): Promise<openapi_fetch.FetchResponse<{
|
|
14329
|
+
getClassrooms(institutionId: string, options?: GetInstitutionClassroomsQuery): Promise<openapi_fetch.FetchResponse<{
|
|
14269
14330
|
parameters: {
|
|
14270
14331
|
query?: {
|
|
14271
14332
|
includeUserCount?: boolean;
|
|
@@ -19201,6 +19262,51 @@ declare function createCertificateService(apiClient: AcademeApiClient): {
|
|
|
19201
19262
|
};
|
|
19202
19263
|
};
|
|
19203
19264
|
}, `${string}/${string}`>>;
|
|
19265
|
+
/**
|
|
19266
|
+
* Download all certificates of a given user as a single merged PDF
|
|
19267
|
+
*/
|
|
19268
|
+
downloadAll(userId: string): Promise<openapi_fetch.FetchResponse<{
|
|
19269
|
+
parameters: {
|
|
19270
|
+
query?: never;
|
|
19271
|
+
header?: never;
|
|
19272
|
+
path: {
|
|
19273
|
+
userId: string;
|
|
19274
|
+
};
|
|
19275
|
+
cookie?: never;
|
|
19276
|
+
};
|
|
19277
|
+
requestBody?: never;
|
|
19278
|
+
responses: {
|
|
19279
|
+
200: {
|
|
19280
|
+
headers: {
|
|
19281
|
+
"Content-Disposition"?: string;
|
|
19282
|
+
[name: string]: unknown;
|
|
19283
|
+
};
|
|
19284
|
+
content: {
|
|
19285
|
+
"application/pdf": string;
|
|
19286
|
+
};
|
|
19287
|
+
};
|
|
19288
|
+
401: components["responses"]["Unauthorized"];
|
|
19289
|
+
404: {
|
|
19290
|
+
headers: {
|
|
19291
|
+
[name: string]: unknown;
|
|
19292
|
+
};
|
|
19293
|
+
content: {
|
|
19294
|
+
"application/json": {
|
|
19295
|
+
status?: string;
|
|
19296
|
+
message?: string;
|
|
19297
|
+
};
|
|
19298
|
+
};
|
|
19299
|
+
};
|
|
19300
|
+
500: components["responses"]["ServerError"];
|
|
19301
|
+
};
|
|
19302
|
+
}, {
|
|
19303
|
+
params: {
|
|
19304
|
+
path: {
|
|
19305
|
+
userId: string;
|
|
19306
|
+
};
|
|
19307
|
+
};
|
|
19308
|
+
parseAs: "blob";
|
|
19309
|
+
}, `${string}/${string}`>>;
|
|
19204
19310
|
/**
|
|
19205
19311
|
* Download certificate PDF
|
|
19206
19312
|
*/
|
|
@@ -19234,6 +19340,7 @@ declare function createCertificateService(apiClient: AcademeApiClient): {
|
|
|
19234
19340
|
id: string;
|
|
19235
19341
|
};
|
|
19236
19342
|
};
|
|
19343
|
+
parseAs: "blob";
|
|
19237
19344
|
}, `${string}/${string}`>>;
|
|
19238
19345
|
/**
|
|
19239
19346
|
* Create a new certificate
|
package/dist/index.esm.js
CHANGED
|
@@ -5563,12 +5563,22 @@ function createCertificateService(apiClient) {
|
|
|
5563
5563
|
params: { path: { id } },
|
|
5564
5564
|
});
|
|
5565
5565
|
},
|
|
5566
|
+
/**
|
|
5567
|
+
* Download all certificates of a given user as a single merged PDF
|
|
5568
|
+
*/
|
|
5569
|
+
downloadAll(userId) {
|
|
5570
|
+
return apiClient.GET("/certificates/{userId}/download-all", {
|
|
5571
|
+
params: { path: { userId } },
|
|
5572
|
+
parseAs: 'blob',
|
|
5573
|
+
});
|
|
5574
|
+
},
|
|
5566
5575
|
/**
|
|
5567
5576
|
* Download certificate PDF
|
|
5568
5577
|
*/
|
|
5569
5578
|
download(id) {
|
|
5570
5579
|
return apiClient.GET("/certificates/{id}/download", {
|
|
5571
5580
|
params: { path: { id } },
|
|
5581
|
+
parseAs: 'blob',
|
|
5572
5582
|
});
|
|
5573
5583
|
},
|
|
5574
5584
|
/**
|