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.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