academe-kit 0.3.8 → 0.3.9
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.d.ts +372 -362
- package/dist/index.esm.js +47 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +47 -0
- package/dist/index.js.map +1 -1
- package/dist/types/services/InstitutionService.d.ts +1 -0
- package/dist/types/services/ProductService.d.ts +225 -0
- package/dist/types/services/UserService.d.ts +2 -0
- package/dist/types/services/index.d.ts +3 -0
- package/dist/types/types/academe-api.d.ts +145 -362
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5202,6 +5202,52 @@ function createSeatCodeService(apiClient) {
|
|
|
5202
5202
|
};
|
|
5203
5203
|
}
|
|
5204
5204
|
|
|
5205
|
+
function createProductService(apiClient) {
|
|
5206
|
+
return {
|
|
5207
|
+
/**
|
|
5208
|
+
* List all products with optional filters
|
|
5209
|
+
*/
|
|
5210
|
+
getProducts(params) {
|
|
5211
|
+
return apiClient.GET("/products", {
|
|
5212
|
+
params: { query: params },
|
|
5213
|
+
});
|
|
5214
|
+
},
|
|
5215
|
+
/**
|
|
5216
|
+
* Get product by ID
|
|
5217
|
+
*/
|
|
5218
|
+
getProductById(id) {
|
|
5219
|
+
return apiClient.GET("/products/{id}", {
|
|
5220
|
+
params: { path: { id } },
|
|
5221
|
+
});
|
|
5222
|
+
},
|
|
5223
|
+
/**
|
|
5224
|
+
* Create a new product
|
|
5225
|
+
*/
|
|
5226
|
+
createProduct(body) {
|
|
5227
|
+
return apiClient.POST("/products", {
|
|
5228
|
+
body,
|
|
5229
|
+
});
|
|
5230
|
+
},
|
|
5231
|
+
/**
|
|
5232
|
+
* Update product information
|
|
5233
|
+
*/
|
|
5234
|
+
updateProduct(id, body) {
|
|
5235
|
+
return apiClient.PATCH("/products/{id}", {
|
|
5236
|
+
params: { path: { id } },
|
|
5237
|
+
body,
|
|
5238
|
+
});
|
|
5239
|
+
},
|
|
5240
|
+
/**
|
|
5241
|
+
* Delete product
|
|
5242
|
+
*/
|
|
5243
|
+
deleteProduct(id) {
|
|
5244
|
+
return apiClient.DELETE("/products/{id}", {
|
|
5245
|
+
params: { path: { id } },
|
|
5246
|
+
});
|
|
5247
|
+
},
|
|
5248
|
+
};
|
|
5249
|
+
}
|
|
5250
|
+
|
|
5205
5251
|
function createAcademeApiClient(baseUrl) {
|
|
5206
5252
|
return createClient({ baseUrl });
|
|
5207
5253
|
}
|
|
@@ -5220,6 +5266,7 @@ function createAcademeServices(apiClient) {
|
|
|
5220
5266
|
quiz: createQuizService(apiClient),
|
|
5221
5267
|
certificate: createCertificateService(apiClient),
|
|
5222
5268
|
seatCode: createSeatCodeService(apiClient),
|
|
5269
|
+
product: createProductService(apiClient),
|
|
5223
5270
|
};
|
|
5224
5271
|
}
|
|
5225
5272
|
|