@builderbot/provider-evolution-api 1.2.7 → 1.2.8-alpha.1
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/LICENSE.md +21 -0
- package/dist/evolution/core.d.ts +16 -25
- package/dist/evolution/core.d.ts.map +1 -1
- package/dist/evolution/provider.d.ts +108 -19
- package/dist/evolution/provider.d.ts.map +1 -1
- package/dist/index.cjs +519 -589
- package/dist/interface/evolution.d.ts +13 -8
- package/dist/interface/evolution.d.ts.map +1 -1
- package/dist/types.d.ts +68 -191
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/download.d.ts +8 -0
- package/dist/utils/download.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -5
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +5 -9
- package/dist/utils/downloadFile.d.ts +0 -16
- package/dist/utils/downloadFile.d.ts.map +0 -1
- package/dist/utils/mediaUrl.d.ts +0 -3
- package/dist/utils/mediaUrl.d.ts.map +0 -1
- package/dist/utils/number.d.ts +0 -2
- package/dist/utils/number.d.ts.map +0 -1
- package/dist/utils/processIncomingMsg.d.ts +0 -3
- package/dist/utils/processIncomingMsg.d.ts.map +0 -1
- package/dist/utils/profile.d.ts +0 -4
- package/dist/utils/profile.d.ts.map +0 -1
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import type polka from 'polka';
|
|
2
2
|
export interface EvolutionInterface {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
indexHome?: polka.Middleware;
|
|
4
|
+
sendMessageEvoApi: (body: any, ruta: string) => Promise<any>;
|
|
5
|
+
sendMessageMeta: (body: any) => Promise<any>;
|
|
6
|
+
sendMessageToApi: (body: any, ruta?: string) => Promise<any>;
|
|
7
|
+
sendMessage: <K = any>(to: string, message: string, args?: any) => Promise<K>;
|
|
8
|
+
sendText: (to: string, message: string, context?: string | null) => Promise<any>;
|
|
9
|
+
sendImage: (to: string, mediaInput: string, caption?: string, context?: string | null) => Promise<any>;
|
|
10
|
+
sendVideo: (to: string, mediaUrl: string, mediaName?: string, caption?: string) => Promise<any>;
|
|
11
|
+
sendAudio: (to: string, mediaUrl: string, mediaName?: string, caption?: string) => Promise<any>;
|
|
12
|
+
sendMedia: (to: string, file: string, type: string) => Promise<any>;
|
|
13
|
+
sendFile: (to: string, file: string, caption?: string) => Promise<any>;
|
|
14
|
+
incomingMsg: (req: any, res: any) => void | Promise<void>;
|
|
10
15
|
}
|
|
11
16
|
//# sourceMappingURL=evolution.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evolution.d.ts","sourceRoot":"","sources":["../../src/interface/evolution.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evolution.d.ts","sourceRoot":"","sources":["../../src/interface/evolution.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,kBAAkB;IAE/B,SAAS,CAAC,EAAE,KAAK,CAAC,UAAU,CAAA;IAG5B,iBAAiB,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC5D,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC5C,gBAAgB,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAG5D,WAAW,EAAE,CAAC,CAAC,GAAG,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IAC7E,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAChF,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACtG,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC/F,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAC/F,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACnE,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACtE,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC5D"}
|
package/dist/types.d.ts
CHANGED
|
@@ -9,199 +9,76 @@ export declare class File {
|
|
|
9
9
|
caption?: string;
|
|
10
10
|
link?: string;
|
|
11
11
|
}
|
|
12
|
-
interface TemplateMessage {
|
|
13
|
-
name: string;
|
|
14
|
-
language: {
|
|
15
|
-
code: string;
|
|
16
|
-
};
|
|
17
|
-
components: TemplateComponent[];
|
|
18
|
-
}
|
|
19
|
-
interface TemplateComponent {
|
|
20
|
-
type: 'header' | 'body' | 'button';
|
|
21
|
-
parameters?: TemplateParameter[];
|
|
22
|
-
}
|
|
23
|
-
interface Section {
|
|
24
|
-
title: string;
|
|
25
|
-
rows: Row[];
|
|
26
|
-
}
|
|
27
|
-
interface Row {
|
|
28
|
-
id: string;
|
|
29
|
-
title: string;
|
|
30
|
-
description: string;
|
|
31
|
-
}
|
|
32
|
-
interface TemplateParameter {
|
|
33
|
-
type: string;
|
|
34
|
-
}
|
|
35
|
-
export interface MediaResponse {
|
|
36
|
-
url?: string;
|
|
37
|
-
}
|
|
38
|
-
export interface MetaList {
|
|
39
|
-
header: {
|
|
40
|
-
type: string;
|
|
41
|
-
text: string;
|
|
42
|
-
};
|
|
43
|
-
body: {
|
|
44
|
-
text: string;
|
|
45
|
-
};
|
|
46
|
-
footer: {
|
|
47
|
-
text: string;
|
|
48
|
-
};
|
|
49
|
-
action: {
|
|
50
|
-
button: string;
|
|
51
|
-
sections: Section[];
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
export interface EvolutionGlobalVendorArgs extends GlobalVendorArgs {
|
|
55
|
-
name: string;
|
|
56
|
-
apiKey: string;
|
|
57
|
-
baseURL: string;
|
|
58
|
-
instanceName: string;
|
|
59
|
-
}
|
|
60
|
-
export interface Order {
|
|
61
|
-
catalog_id: string;
|
|
62
|
-
product_items: string[];
|
|
63
|
-
}
|
|
64
|
-
export interface Contact {
|
|
65
|
-
profile: Profile;
|
|
66
|
-
wa_id: string;
|
|
67
|
-
name: string;
|
|
68
|
-
phones: string[];
|
|
69
|
-
}
|
|
70
|
-
export interface Message {
|
|
71
|
-
message_id?: string;
|
|
72
|
-
timestamp?: any;
|
|
73
|
-
type: string;
|
|
74
|
-
from: string;
|
|
75
|
-
to: string;
|
|
76
|
-
body: string;
|
|
77
|
-
pushName: string;
|
|
78
|
-
name: string;
|
|
79
|
-
url?: string;
|
|
80
|
-
fileData?: File | null;
|
|
81
|
-
payload?: string;
|
|
82
|
-
title_button_reply?: string;
|
|
83
|
-
title_list_reply?: string;
|
|
84
|
-
latitude?: number;
|
|
85
|
-
longitude?: number;
|
|
86
|
-
contacts?: Contact[];
|
|
87
|
-
nfm_reply?: string;
|
|
88
|
-
order?: Order;
|
|
89
|
-
id?: string;
|
|
90
|
-
caption?: string;
|
|
91
|
-
}
|
|
92
|
-
export interface ParamsIncomingMessage {
|
|
93
|
-
messageId?: string;
|
|
94
|
-
messageTimestamp?: any;
|
|
95
|
-
pushName: string;
|
|
96
|
-
to: string;
|
|
97
|
-
jwtToken: string;
|
|
98
|
-
numberId: string;
|
|
99
|
-
version: string;
|
|
100
|
-
message: any;
|
|
101
|
-
fileData?: File | null;
|
|
102
|
-
}
|
|
103
|
-
export type TextGenericParams = {
|
|
104
|
-
messaging_product: 'whatsapp';
|
|
105
|
-
recipient_type: string;
|
|
106
|
-
to: string;
|
|
107
|
-
type: string;
|
|
108
|
-
[key: string]: any;
|
|
109
|
-
};
|
|
110
|
-
export interface ParsedContact {
|
|
111
|
-
name: {
|
|
112
|
-
formatted_name: string;
|
|
113
|
-
first_name: string;
|
|
114
|
-
[key: string]: any;
|
|
115
|
-
};
|
|
116
|
-
phones: {
|
|
117
|
-
phone: string;
|
|
118
|
-
type: string;
|
|
119
|
-
[key: string]: any;
|
|
120
|
-
}[];
|
|
121
|
-
[key: string]: any;
|
|
122
|
-
}
|
|
123
|
-
export interface TextMessageBody {
|
|
124
|
-
messaging_product: string;
|
|
125
|
-
to: string;
|
|
126
|
-
type: string;
|
|
127
|
-
recipient_type?: string;
|
|
128
|
-
text?: {
|
|
129
|
-
preview_url: boolean;
|
|
130
|
-
body: string;
|
|
131
|
-
};
|
|
132
|
-
image?: File;
|
|
133
|
-
video?: File;
|
|
134
|
-
audio?: File;
|
|
135
|
-
document?: File;
|
|
136
|
-
interactive?: any;
|
|
137
|
-
contacts?: any[];
|
|
138
|
-
context?: string;
|
|
139
|
-
template?: TemplateMessage;
|
|
140
|
-
}
|
|
141
|
-
export interface Reaction {
|
|
142
|
-
message_id: string;
|
|
143
|
-
emoji: string;
|
|
144
|
-
}
|
|
145
|
-
export interface Localization {
|
|
146
|
-
long_number: string;
|
|
147
|
-
lat_number: string;
|
|
148
|
-
name: string;
|
|
149
|
-
address: string;
|
|
150
|
-
}
|
|
151
12
|
export interface SaveFileOptions {
|
|
152
13
|
path?: string;
|
|
153
14
|
}
|
|
154
|
-
export interface
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
export interface
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
export
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
export interface
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
15
|
+
export interface EvolutionGlobalVendorArgs extends GlobalVendorArgs {
|
|
16
|
+
participant?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Device metadata for message encryption
|
|
20
|
+
*/
|
|
21
|
+
export interface DeviceListMetadata {
|
|
22
|
+
senderKeyHash: string;
|
|
23
|
+
senderTimestamp: string;
|
|
24
|
+
recipientKeyHash: string;
|
|
25
|
+
recipientTimestamp: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Context information for a message
|
|
29
|
+
*/
|
|
30
|
+
export interface MessageContextInfo {
|
|
31
|
+
deviceListMetadata: DeviceListMetadata;
|
|
32
|
+
deviceListMetadataVersion: number;
|
|
33
|
+
messageSecret: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Types of messages that can be received
|
|
37
|
+
*/
|
|
38
|
+
export type MessageType = 'conversation' | 'imageMessage' | 'videoMessage' | 'audioMessage' | 'documentMessage' | 'stickerMessage' | 'contactMessage' | 'locationMessage' | 'extendedTextMessage' | 'buttonResponseMessage' | 'templateButtonReplyMessage' | 'listResponseMessage' | 'reactionMessage';
|
|
39
|
+
/**
|
|
40
|
+
* Possible sources for the webhook event
|
|
41
|
+
*/
|
|
42
|
+
export type MessageSource = 'android' | 'ios' | 'web' | 'desktop' | 'unknown';
|
|
43
|
+
/**
|
|
44
|
+
* Possible message content types in a webhook
|
|
45
|
+
*/
|
|
46
|
+
export interface WebhookMessage {
|
|
47
|
+
conversation?: string;
|
|
48
|
+
messageContextInfo?: MessageContextInfo;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Status of a message
|
|
52
|
+
*/
|
|
53
|
+
export type MessageStatus = 'PENDING' | 'SERVER_ACK' | 'DELIVERY_ACK' | 'READ' | 'PLAYED';
|
|
54
|
+
/**
|
|
55
|
+
* Main data payload of the webhook event
|
|
56
|
+
*/
|
|
57
|
+
export interface WebhookEventData {
|
|
58
|
+
key: WebhookEvent;
|
|
59
|
+
pushName: string;
|
|
60
|
+
status: MessageStatus;
|
|
61
|
+
message: WebhookMessage;
|
|
62
|
+
messageType: MessageType;
|
|
63
|
+
messageTimestamp: number;
|
|
64
|
+
instanceId: string;
|
|
65
|
+
source: MessageSource;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Event types supported by the webhook
|
|
69
|
+
*/
|
|
70
|
+
export type WebhookEventType = 'messages.upsert' | 'messages.update' | 'messages.delete' | 'presence.update' | 'contacts.update' | 'groups.update' | 'groups.upsert' | 'group-participants.update' | 'status.update';
|
|
71
|
+
/**
|
|
72
|
+
* Complete webhook event structure
|
|
73
|
+
*/
|
|
74
|
+
export interface WebhookEvent {
|
|
75
|
+
event: WebhookEventType;
|
|
76
|
+
instance: string;
|
|
77
|
+
data: WebhookEventData;
|
|
78
|
+
destination: string;
|
|
79
|
+
date_time: string;
|
|
80
|
+
sender: string;
|
|
81
|
+
server_url: string;
|
|
82
|
+
apikey: string;
|
|
205
83
|
}
|
|
206
|
-
export {};
|
|
207
84
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAGlE,qBAAa,IAAI;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAGD,MAAM,WAAW,yBAA0B,SAAQ,gBAAgB;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,CAAA;IACxB,kBAAkB,EAAE,MAAM,CAAA;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,yBAAyB,EAAE,MAAM,CAAA;IACjC,aAAa,EAAE,MAAM,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GACjB,cAAc,GACd,cAAc,GACd,cAAc,GACd,cAAc,GACd,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,GACjB,qBAAqB,GACrB,uBAAuB,GACvB,4BAA4B,GAC5B,qBAAqB,GACrB,iBAAiB,CAAA;AAEvB;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,CAAA;AAE7E;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;CAE1C;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEzF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,GAAG,EAAE,YAAY,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,aAAa,CAAA;IACrB,OAAO,EAAE,cAAc,CAAA;IACvB,WAAW,EAAE,WAAW,CAAA;IACxB,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,aAAa,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACtB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,2BAA2B,GAC3B,eAAe,CAAA;AAErB;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,KAAK,EAAE,gBAAgB,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,gBAAgB,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;CACjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Descargar archivo binario en tmp
|
|
3
|
+
* @param url - La URL del archivo a descargar
|
|
4
|
+
* @returns La ruta al archivo descargado
|
|
5
|
+
*/
|
|
6
|
+
declare const generalDownload: (url: string, pathToSave?: string, headers?: Record<string, any>) => Promise<string>;
|
|
7
|
+
export { generalDownload };
|
|
8
|
+
//# sourceMappingURL=download.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download.d.ts","sourceRoot":"","sources":["../../src/utils/download.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,QAAA,MAAM,eAAe,GAAU,KAAK,MAAM,EAAE,aAAa,MAAM,EAAE,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,OAAO,CAAC,MAAM,CA0E9G,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { downloadFile, fileTypeFromFile } from './downloadFile';
|
|
3
|
-
export { processIncomingMessage } from './processIncomingMsg';
|
|
4
|
-
export { getProfile } from './profile';
|
|
5
|
-
export { parseMetaNumber } from './number';
|
|
1
|
+
export { generalDownload } from './download';
|
|
6
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builderbot/provider-evolution-api",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8-alpha.1",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "aurik3 <aurik3@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/aurik3/bot-whatsapp#readme",
|
|
@@ -8,12 +8,6 @@
|
|
|
8
8
|
"main": "dist/index.cjs",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
10
|
"type": "module",
|
|
11
|
-
"exports": {
|
|
12
|
-
".": {
|
|
13
|
-
"import": "./dist/index.js",
|
|
14
|
-
"require": "./dist/index.cjs"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
11
|
"directories": {
|
|
18
12
|
"src": "src",
|
|
19
13
|
"test": "__tests__"
|
|
@@ -35,16 +29,18 @@
|
|
|
35
29
|
"url": "https://github.com/aurik3/bot-whatsapp/issues"
|
|
36
30
|
},
|
|
37
31
|
"dependencies": {
|
|
32
|
+
"@polka/parse": "1.0.0-next.0",
|
|
38
33
|
"axios": "^1.6.8",
|
|
39
34
|
"body-parser": "^1.20.2",
|
|
40
35
|
"file-type": "^19.0.0",
|
|
36
|
+
"follow-redirects": "^1.15.6",
|
|
41
37
|
"form-data": "^4.0.0",
|
|
42
38
|
"mime-types": "^2.1.35",
|
|
43
39
|
"polka": "^0.5.2",
|
|
44
40
|
"queue-promise": "^2.2.1"
|
|
45
41
|
},
|
|
46
42
|
"devDependencies": {
|
|
47
|
-
"@builderbot/bot": "
|
|
43
|
+
"@builderbot/bot": "^1.2.8-alpha.1",
|
|
48
44
|
"@jest/globals": "^29.7.0",
|
|
49
45
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
50
46
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -69,5 +65,5 @@
|
|
|
69
65
|
"tslib": "^2.6.2",
|
|
70
66
|
"tsm": "^2.3.0"
|
|
71
67
|
},
|
|
72
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "00f2004ac30bfa6e24438bc167cab16e649ad9c9"
|
|
73
69
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { AxiosResponse } from 'axios';
|
|
2
|
-
/**
|
|
3
|
-
* Extraer el mimetype from buffer
|
|
4
|
-
* @param response - La respuesta HTTP
|
|
5
|
-
* @returns Un objeto con el tipo y la extensión del archivo
|
|
6
|
-
*/
|
|
7
|
-
declare const fileTypeFromFile: (response: AxiosResponse) => Promise<{
|
|
8
|
-
type: string | null;
|
|
9
|
-
ext: string | false;
|
|
10
|
-
}>;
|
|
11
|
-
declare function downloadFile(url: string, Token: string): Promise<{
|
|
12
|
-
buffer: Buffer;
|
|
13
|
-
extension: string;
|
|
14
|
-
}>;
|
|
15
|
-
export { downloadFile, fileTypeFromFile };
|
|
16
|
-
//# sourceMappingURL=downloadFile.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloadFile.d.ts","sourceRoot":"","sources":["../../src/utils/downloadFile.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C;;;;GAIG;AACH,QAAA,MAAM,gBAAgB,GAAU,UAAU,aAAa,KAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAA;CAAE,CAO7G,CAAA;AAED,iBAAe,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAkBtG;AAED,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
|
package/dist/utils/mediaUrl.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mediaUrl.d.ts","sourceRoot":"","sources":["../../src/utils/mediaUrl.ts"],"names":[],"mappings":"AAKA,iBAAe,WAAW,CACtB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAe7B;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/utils/number.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/utils/number.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,KAAG,MAMhD,CAAA"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { Message, ParamsIncomingMessage as ParamsIncomingMessage } from '../types';
|
|
2
|
-
export declare const processIncomingMessage: ({ messageId, messageTimestamp, pushName, message, to, jwtToken, version, numberId, fileData, }: ParamsIncomingMessage) => Promise<Message>;
|
|
3
|
-
//# sourceMappingURL=processIncomingMsg.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"processIncomingMsg.d.ts","sourceRoot":"","sources":["../../src/utils/processIncomingMsg.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,IAAI,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEvF,eAAO,MAAM,sBAAsB,GAAU,gGAU1C,qBAAqB,KAAG,OAAO,CAAC,OAAO,CA2KzC,CAAA"}
|
package/dist/utils/profile.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/utils/profile.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,iBAAe,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAUpG;AAED,OAAO,EAAE,UAAU,EAAE,CAAA"}
|