@in.pulse-crm/sdk 2.2.10 → 2.2.12

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.
@@ -34,7 +34,7 @@ class FilesClient extends api_client_1.default {
34
34
  const form = new FormData();
35
35
  form.append("instance", props.instance);
36
36
  form.append("dirType", props.dirType);
37
- form.append("file", new Blob([props.buffer]), props.fileName);
37
+ form.append("file", new Blob([props.buffer], { type: props.mimeType }), props.fileName);
38
38
  const response = await this.httpClient.post("/api/files", form, {
39
39
  headers: { "Content-Type": "multipart/form-data" },
40
40
  });
@@ -16,7 +16,7 @@ export interface WppMessage {
16
16
  from: string;
17
17
  to: string;
18
18
  type: string;
19
- quotedId?: string | null;
19
+ quotedId?: number | null;
20
20
  chatId?: number | null;
21
21
  contactId?: number | null;
22
22
  body: string;
@@ -54,14 +54,7 @@ export interface WppWallet {
54
54
  id: number;
55
55
  name: string;
56
56
  }
57
- export declare enum WppMessageStatus {
58
- PENDING = "PENDING",
59
- SENT = "SENT",
60
- RECEIVED = "RECEIVED",
61
- READ = "READ",
62
- DOWNLOADED = "DOWNLOADED",
63
- ERROR = "ERROR"
64
- }
57
+ export type WppMessageStatus = "PENDING" | "SENT" | "RECEIVED" | "READ" | "DOWNLOADED" | "ERROR";
65
58
  export declare enum WppChatType {
66
59
  RECEPTIVE = "RECEPTIVE",
67
60
  ACTIVE = "ACTIVE"
@@ -1,16 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WppChatPriority = exports.WppChatType = exports.WppMessageStatus = void 0;
4
- // Enums
5
- var WppMessageStatus;
6
- (function (WppMessageStatus) {
7
- WppMessageStatus["PENDING"] = "PENDING";
8
- WppMessageStatus["SENT"] = "SENT";
9
- WppMessageStatus["RECEIVED"] = "RECEIVED";
10
- WppMessageStatus["READ"] = "READ";
11
- WppMessageStatus["DOWNLOADED"] = "DOWNLOADED";
12
- WppMessageStatus["ERROR"] = "ERROR";
13
- })(WppMessageStatus || (exports.WppMessageStatus = WppMessageStatus = {}));
3
+ exports.WppChatPriority = exports.WppChatType = void 0;
14
4
  var WppChatType;
15
5
  (function (WppChatType) {
16
6
  WppChatType["RECEPTIVE"] = "RECEPTIVE";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@in.pulse-crm/sdk",
3
- "version": "2.2.10",
3
+ "version": "2.2.12",
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",
@@ -35,7 +35,7 @@ class FilesClient extends ApiClient {
35
35
  const form = new FormData();
36
36
  form.append("instance", props.instance);
37
37
  form.append("dirType", props.dirType);
38
- form.append("file", new Blob([props.buffer]), props.fileName);
38
+ form.append("file", new Blob([props.buffer], { type: props.mimeType }), props.fileName);
39
39
 
40
40
  const response = await this.httpClient.post<DataResponse<File>>(
41
41
  "/api/files",
@@ -18,7 +18,7 @@ export interface WppMessage {
18
18
  from: string;
19
19
  to: string;
20
20
  type: string;
21
- quotedId?: string | null;
21
+ quotedId?: number | null;
22
22
  chatId?: number | null;
23
23
  contactId?: number | null;
24
24
  body: string;
@@ -61,14 +61,13 @@ export interface WppWallet {
61
61
  }
62
62
 
63
63
  // Enums
64
- export enum WppMessageStatus {
65
- PENDING = "PENDING",
66
- SENT = "SENT",
67
- RECEIVED = "RECEIVED",
68
- READ = "READ",
69
- DOWNLOADED = "DOWNLOADED",
70
- ERROR = "ERROR",
71
- }
64
+ export type WppMessageStatus =
65
+ | "PENDING"
66
+ | "SENT"
67
+ | "RECEIVED"
68
+ | "READ"
69
+ | "DOWNLOADED"
70
+ | "ERROR";
72
71
 
73
72
  export enum WppChatType {
74
73
  RECEPTIVE = "RECEPTIVE",