arky-sdk 0.3.32 → 0.3.33

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 CHANGED
@@ -375,7 +375,7 @@ var createMediaApi = (apiConfig) => {
375
375
  return {
376
376
  async uploadBusinessMedia(params, options) {
377
377
  const { files = [], urls = [] } = params;
378
- const url = `${apiConfig.baseUrl}/v1/businesses/${apiConfig.businessId}/upload`;
378
+ const url = `${apiConfig.baseUrl}/v1/businesses/${apiConfig.businessId}/media`;
379
379
  const formData = new FormData();
380
380
  files.forEach((file) => formData.append("files", file));
381
381
  urls.forEach((url2) => formData.append("files", url2));
@@ -395,11 +395,8 @@ var createMediaApi = (apiConfig) => {
395
395
  async deleteBusinessMedia(params, options) {
396
396
  const { id, mediaId } = params;
397
397
  return apiConfig.httpClient.delete(
398
- `/v1/businesses/${id}/upload`,
399
- {
400
- ...options,
401
- params: { mediaId }
402
- }
398
+ `/v1/businesses/${id}/media/${mediaId}`,
399
+ options
403
400
  );
404
401
  },
405
402
  async getBusinessMedia(params, options) {
@@ -414,6 +411,14 @@ var createMediaApi = (apiConfig) => {
414
411
  throw new Error(errorData?.message || "Failed to fetch media");
415
412
  }
416
413
  return await response.json();
414
+ },
415
+ async updateMedia(params, options) {
416
+ const { mediaId, ...updateData } = params;
417
+ return apiConfig.httpClient.put(
418
+ `/v1/businesses/${apiConfig.businessId}/media/${mediaId}`,
419
+ updateData,
420
+ options
421
+ );
417
422
  }
418
423
  };
419
424
  };