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