@in.pulse-crm/sdk 2.14.7 → 2.14.8

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.
@@ -35,5 +35,6 @@ declare class FilesClient extends ApiClient {
35
35
  */
36
36
  deleteFile(id: number): Promise<void>;
37
37
  uploadWabaMedia(instance: string, wabaMediaId: string): Promise<File>;
38
+ getWabaMedia(fileId: number): Promise<string>;
38
39
  }
39
40
  export default FilesClient;
@@ -73,5 +73,10 @@ class FilesClient extends api_client_1.default {
73
73
  const response = await this.ax.post(`/api/waba`, { instance, wabaMediaId });
74
74
  return response.data.data;
75
75
  }
76
+ async getWabaMedia(fileId) {
77
+ const response = await this.ax.post(`/api/waba/get-media-id`, { fileId });
78
+ const mediaId = response.data.data.mediaId;
79
+ return mediaId;
80
+ }
76
81
  }
77
82
  exports.default = FilesClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in.pulse-crm/sdk",
3
- "version": "2.14.7",
3
+ "version": "2.14.8",
4
4
  "description": "SDKs for abstraction of api consumption of in.pulse-crm application",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -88,6 +88,13 @@ class FilesClient extends ApiClient {
88
88
  return response.data.data;
89
89
 
90
90
  }
91
+
92
+ public async getWabaMedia(fileId: number) {
93
+ const response = await this.ax.post<DataResponse<{ mediaId: string }>>(`/api/waba/get-media-id`, { fileId });
94
+ const mediaId = response.data.data.mediaId;
95
+
96
+ return mediaId;
97
+ }
91
98
  }
92
99
 
93
100
  export default FilesClient;