@gamastudio/sendwave-provider 0.0.7-dev1 → 0.0.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamastudio/sendwave-provider",
3
- "version": "0.0.7-dev1",
3
+ "version": "0.0.8",
4
4
  "description": "Librería para interactuar con Sendwave usando configuración dinámica.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -126,7 +126,6 @@ class SenderMessage {
126
126
  let mediaType;
127
127
  // If mediaType is already specified (from sendImage, sendVideo, etc), use it
128
128
  if (data.mediaType) {
129
- console.log(`[SendMedia] Using predefined mediaType: ${data.mediaType}`);
130
129
  // Just validate size and get media content without detection
131
130
  if (detectorMedia_1.detectorMedia.isRemoteUrl(data.url)) {
132
131
  // For remote URLs, validate size and use URL directly
@@ -151,13 +150,11 @@ class SenderMessage {
151
150
  }
152
151
  else {
153
152
  // If no mediaType specified, detect it (for generic sendMedia calls)
154
- console.log(`[SendMedia] Auto-detecting mediaType for: ${data.url}`);
155
153
  const result = await detectorMedia_1.detectorMedia.processMedia(data.url);
156
154
  media = result.media;
157
155
  mimeType = result.mimeType;
158
156
  mediaType = result.mediaType;
159
157
  }
160
- console.log(`[SendMedia] Final - MediaType: ${mediaType}, MimeType: ${mimeType}`);
161
158
  return await ((_c = this.sendwaveApi) === null || _c === void 0 ? void 0 : _c.post(`/message/sendMedia/${(_d = this.globalVendorArgs) === null || _d === void 0 ? void 0 : _d.name}`, {
162
159
  number: data.from.split("@")[0],
163
160
  caption: data.text,
@@ -191,12 +188,12 @@ class SenderMessage {
191
188
  }
192
189
  getDefaultMimeType(mediaType) {
193
190
  const defaults = {
194
- image: 'image/jpeg',
195
- video: 'video/mp4',
196
- audio: 'audio/mpeg',
197
- document: 'application/octet-stream'
191
+ image: "image/jpeg",
192
+ video: "video/mp4",
193
+ audio: "audio/mpeg",
194
+ document: "application/octet-stream",
198
195
  };
199
- return defaults[mediaType] || 'application/octet-stream';
196
+ return (defaults[mediaType] || "application/octet-stream");
200
197
  }
201
198
  async sendFile(data) {
202
199
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gamastudio/sendwave-provider",
3
- "version": "0.0.7-dev1",
3
+ "version": "0.0.8",
4
4
  "description": "Librería para interactuar con Sendwave usando configuración dinámica.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",