academe-kit 0.9.2 → 0.9.4
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 +214 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +26414 -9821
- package/dist/index.esm.js +214 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/types/services/CertificateService.d.ts +12744 -119
- package/dist/types/services/ChallengeService.d.ts +748 -0
- package/dist/types/services/StepService.d.ts +215 -0
- package/dist/types/services/index.d.ts +6 -0
- package/dist/types/types/academe-api.d.ts +4186 -1179
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5580,6 +5580,7 @@ function createCertificateService(apiClient) {
|
|
|
5580
5580
|
download(id) {
|
|
5581
5581
|
return apiClient.GET("/certificates/{id}/download", {
|
|
5582
5582
|
params: { path: { id } },
|
|
5583
|
+
parseAs: 'blob',
|
|
5583
5584
|
});
|
|
5584
5585
|
},
|
|
5585
5586
|
/**
|
|
@@ -6000,6 +6001,217 @@ function createStorageFileService(apiClient) {
|
|
|
6000
6001
|
};
|
|
6001
6002
|
}
|
|
6002
6003
|
|
|
6004
|
+
function createChallengeService(apiClient) {
|
|
6005
|
+
return {
|
|
6006
|
+
// ============================================================================
|
|
6007
|
+
// Challenges (Jornadas)
|
|
6008
|
+
// ============================================================================
|
|
6009
|
+
/**
|
|
6010
|
+
* List challenges with filters and pagination
|
|
6011
|
+
*/
|
|
6012
|
+
getAll(params) {
|
|
6013
|
+
return apiClient.GET("/challenges", {
|
|
6014
|
+
params: { query: params },
|
|
6015
|
+
});
|
|
6016
|
+
},
|
|
6017
|
+
/**
|
|
6018
|
+
* Get challenge by ID with full details (steps, media, deliverySteps, evaluationCriteria)
|
|
6019
|
+
*/
|
|
6020
|
+
getById(id) {
|
|
6021
|
+
return apiClient.GET("/challenges/{id}", {
|
|
6022
|
+
params: { path: { id } },
|
|
6023
|
+
});
|
|
6024
|
+
},
|
|
6025
|
+
/**
|
|
6026
|
+
* Create a new challenge
|
|
6027
|
+
*/
|
|
6028
|
+
create(data) {
|
|
6029
|
+
return apiClient.POST("/challenges", {
|
|
6030
|
+
body: data,
|
|
6031
|
+
});
|
|
6032
|
+
},
|
|
6033
|
+
/**
|
|
6034
|
+
* Update a challenge
|
|
6035
|
+
*/
|
|
6036
|
+
update(id, data) {
|
|
6037
|
+
return apiClient.PATCH("/challenges/{id}", {
|
|
6038
|
+
params: { path: { id } },
|
|
6039
|
+
body: data,
|
|
6040
|
+
});
|
|
6041
|
+
},
|
|
6042
|
+
/**
|
|
6043
|
+
* Soft-delete a challenge (sets is_active=false)
|
|
6044
|
+
*/
|
|
6045
|
+
delete(id) {
|
|
6046
|
+
return apiClient.DELETE("/challenges/{id}", {
|
|
6047
|
+
params: { path: { id } },
|
|
6048
|
+
});
|
|
6049
|
+
},
|
|
6050
|
+
/**
|
|
6051
|
+
* Clone a global template into an institution
|
|
6052
|
+
*/
|
|
6053
|
+
clone(id, data) {
|
|
6054
|
+
return apiClient.POST("/challenges/{id}/clone", {
|
|
6055
|
+
params: { path: { id } },
|
|
6056
|
+
body: data,
|
|
6057
|
+
});
|
|
6058
|
+
},
|
|
6059
|
+
// ============================================================================
|
|
6060
|
+
// Steps
|
|
6061
|
+
// ============================================================================
|
|
6062
|
+
/**
|
|
6063
|
+
* Add a step to the challenge
|
|
6064
|
+
*/
|
|
6065
|
+
addStep(challengeId, data) {
|
|
6066
|
+
return apiClient.POST("/challenges/{id}/steps", {
|
|
6067
|
+
params: { path: { id: challengeId } },
|
|
6068
|
+
body: data,
|
|
6069
|
+
});
|
|
6070
|
+
},
|
|
6071
|
+
/**
|
|
6072
|
+
* Update a challenge step
|
|
6073
|
+
*/
|
|
6074
|
+
updateStep(challengeId, stepId, data) {
|
|
6075
|
+
return apiClient.PATCH("/challenges/{id}/steps/{subId}", {
|
|
6076
|
+
params: { path: { id: challengeId, subId: stepId } },
|
|
6077
|
+
body: data,
|
|
6078
|
+
});
|
|
6079
|
+
},
|
|
6080
|
+
/**
|
|
6081
|
+
* Remove a challenge step
|
|
6082
|
+
*/
|
|
6083
|
+
removeStep(challengeId, stepId) {
|
|
6084
|
+
return apiClient.DELETE("/challenges/{id}/steps/{subId}", {
|
|
6085
|
+
params: { path: { id: challengeId, subId: stepId } },
|
|
6086
|
+
});
|
|
6087
|
+
},
|
|
6088
|
+
// ============================================================================
|
|
6089
|
+
// Media
|
|
6090
|
+
// ============================================================================
|
|
6091
|
+
/**
|
|
6092
|
+
* Attach a media file to the challenge
|
|
6093
|
+
*/
|
|
6094
|
+
addMedia(challengeId, data) {
|
|
6095
|
+
return apiClient.POST("/challenges/{id}/media", {
|
|
6096
|
+
params: { path: { id: challengeId } },
|
|
6097
|
+
body: data,
|
|
6098
|
+
});
|
|
6099
|
+
},
|
|
6100
|
+
/**
|
|
6101
|
+
* Remove a media item
|
|
6102
|
+
*/
|
|
6103
|
+
removeMedia(challengeId, mediaId) {
|
|
6104
|
+
return apiClient.DELETE("/challenges/{id}/media/{subId}", {
|
|
6105
|
+
params: { path: { id: challengeId, subId: mediaId } },
|
|
6106
|
+
});
|
|
6107
|
+
},
|
|
6108
|
+
// ============================================================================
|
|
6109
|
+
// Delivery Steps (checklist)
|
|
6110
|
+
// ============================================================================
|
|
6111
|
+
/**
|
|
6112
|
+
* Add a delivery checklist item
|
|
6113
|
+
*/
|
|
6114
|
+
addDeliveryStep(challengeId, data) {
|
|
6115
|
+
return apiClient.POST("/challenges/{id}/delivery-steps", {
|
|
6116
|
+
params: { path: { id: challengeId } },
|
|
6117
|
+
body: data,
|
|
6118
|
+
});
|
|
6119
|
+
},
|
|
6120
|
+
/**
|
|
6121
|
+
* Update a delivery checklist item
|
|
6122
|
+
*/
|
|
6123
|
+
updateDeliveryStep(challengeId, deliveryStepId, data) {
|
|
6124
|
+
return apiClient.PATCH("/challenges/{id}/delivery-steps/{subId}", {
|
|
6125
|
+
params: { path: { id: challengeId, subId: deliveryStepId } },
|
|
6126
|
+
body: data,
|
|
6127
|
+
});
|
|
6128
|
+
},
|
|
6129
|
+
/**
|
|
6130
|
+
* Remove a delivery checklist item
|
|
6131
|
+
*/
|
|
6132
|
+
removeDeliveryStep(challengeId, deliveryStepId) {
|
|
6133
|
+
return apiClient.DELETE("/challenges/{id}/delivery-steps/{subId}", {
|
|
6134
|
+
params: { path: { id: challengeId, subId: deliveryStepId } },
|
|
6135
|
+
});
|
|
6136
|
+
},
|
|
6137
|
+
// ============================================================================
|
|
6138
|
+
// Evaluation Criteria (rubric)
|
|
6139
|
+
// ============================================================================
|
|
6140
|
+
/**
|
|
6141
|
+
* Add an evaluation criterion
|
|
6142
|
+
*/
|
|
6143
|
+
addCriterion(challengeId, data) {
|
|
6144
|
+
return apiClient.POST("/challenges/{id}/evaluation-criteria", {
|
|
6145
|
+
params: { path: { id: challengeId } },
|
|
6146
|
+
body: data,
|
|
6147
|
+
});
|
|
6148
|
+
},
|
|
6149
|
+
/**
|
|
6150
|
+
* Update an evaluation criterion
|
|
6151
|
+
*/
|
|
6152
|
+
updateCriterion(challengeId, criterionId, data) {
|
|
6153
|
+
return apiClient.PATCH("/challenges/{id}/evaluation-criteria/{subId}", {
|
|
6154
|
+
params: { path: { id: challengeId, subId: criterionId } },
|
|
6155
|
+
body: data,
|
|
6156
|
+
});
|
|
6157
|
+
},
|
|
6158
|
+
/**
|
|
6159
|
+
* Remove an evaluation criterion
|
|
6160
|
+
*/
|
|
6161
|
+
removeCriterion(challengeId, criterionId) {
|
|
6162
|
+
return apiClient.DELETE("/challenges/{id}/evaluation-criteria/{subId}", {
|
|
6163
|
+
params: { path: { id: challengeId, subId: criterionId } },
|
|
6164
|
+
});
|
|
6165
|
+
},
|
|
6166
|
+
};
|
|
6167
|
+
}
|
|
6168
|
+
|
|
6169
|
+
function createStepService(apiClient) {
|
|
6170
|
+
return {
|
|
6171
|
+
/**
|
|
6172
|
+
* List the step catalog (filterable by type / isActive)
|
|
6173
|
+
*/
|
|
6174
|
+
getAll(params) {
|
|
6175
|
+
return apiClient.GET("/steps", {
|
|
6176
|
+
params: { query: params },
|
|
6177
|
+
});
|
|
6178
|
+
},
|
|
6179
|
+
/**
|
|
6180
|
+
* Get a step by ID
|
|
6181
|
+
*/
|
|
6182
|
+
getById(id) {
|
|
6183
|
+
return apiClient.GET("/steps/{id}", {
|
|
6184
|
+
params: { path: { id } },
|
|
6185
|
+
});
|
|
6186
|
+
},
|
|
6187
|
+
/**
|
|
6188
|
+
* Create a new step in the catalog
|
|
6189
|
+
*/
|
|
6190
|
+
create(data) {
|
|
6191
|
+
return apiClient.POST("/steps", {
|
|
6192
|
+
body: data,
|
|
6193
|
+
});
|
|
6194
|
+
},
|
|
6195
|
+
/**
|
|
6196
|
+
* Update a step
|
|
6197
|
+
*/
|
|
6198
|
+
update(id, data) {
|
|
6199
|
+
return apiClient.PATCH("/steps/{id}", {
|
|
6200
|
+
params: { path: { id } },
|
|
6201
|
+
body: data,
|
|
6202
|
+
});
|
|
6203
|
+
},
|
|
6204
|
+
/**
|
|
6205
|
+
* Delete a step
|
|
6206
|
+
*/
|
|
6207
|
+
delete(id) {
|
|
6208
|
+
return apiClient.DELETE("/steps/{id}", {
|
|
6209
|
+
params: { path: { id } },
|
|
6210
|
+
});
|
|
6211
|
+
},
|
|
6212
|
+
};
|
|
6213
|
+
}
|
|
6214
|
+
|
|
6003
6215
|
function createAcademeApiClient(baseUrl) {
|
|
6004
6216
|
return createClient({ baseUrl });
|
|
6005
6217
|
}
|
|
@@ -6023,6 +6235,8 @@ function createAcademeServices(apiClient) {
|
|
|
6023
6235
|
seatCode: createSeatCodeService(apiClient),
|
|
6024
6236
|
product: createProductService(apiClient),
|
|
6025
6237
|
storageFile: createStorageFileService(apiClient),
|
|
6238
|
+
challenge: createChallengeService(apiClient),
|
|
6239
|
+
step: createStepService(apiClient),
|
|
6026
6240
|
};
|
|
6027
6241
|
}
|
|
6028
6242
|
|