@builderbot/provider-meta 1.0.29-alpha.0 → 1.0.31-alpha.0
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 +158 -6
- package/dist/interface/meta.d.ts +7 -2
- package/dist/interface/meta.d.ts.map +1 -1
- package/dist/meta/core.d.ts.map +1 -1
- package/dist/meta/provider.d.ts +7 -2
- package/dist/meta/provider.d.ts.map +1 -1
- package/dist/types.d.ts +62 -19
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/processIncomingMsg.d.ts +1 -1
- package/dist/utils/processIncomingMsg.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -12169,7 +12169,7 @@ async function getMediaUrl(version, IdMedia, numberId, Token) {
|
|
|
12169
12169
|
}
|
|
12170
12170
|
}
|
|
12171
12171
|
|
|
12172
|
-
const processIncomingMessage = async ({ pushName, message, to, jwtToken, version, numberId, }) => {
|
|
12172
|
+
const processIncomingMessage = async ({ messageId, messageTimestamp, pushName, message, to, jwtToken, version, numberId, }) => {
|
|
12173
12173
|
let responseObj;
|
|
12174
12174
|
switch (message.type) {
|
|
12175
12175
|
case 'text': {
|
|
@@ -12319,7 +12319,11 @@ const processIncomingMessage = async ({ pushName, message, to, jwtToken, version
|
|
|
12319
12319
|
break;
|
|
12320
12320
|
}
|
|
12321
12321
|
}
|
|
12322
|
-
return
|
|
12322
|
+
return {
|
|
12323
|
+
...responseObj,
|
|
12324
|
+
message_id: messageId,
|
|
12325
|
+
timestamp: messageTimestamp,
|
|
12326
|
+
};
|
|
12323
12327
|
};
|
|
12324
12328
|
|
|
12325
12329
|
/**
|
|
@@ -12370,7 +12374,7 @@ class MetaCoreVendor extends EventEmitter {
|
|
|
12370
12374
|
*/
|
|
12371
12375
|
this.incomingMsg = async (req, res) => {
|
|
12372
12376
|
const globalVendorArgs = req['globalVendorArgs'] ?? null;
|
|
12373
|
-
const
|
|
12377
|
+
const body = req?.body;
|
|
12374
12378
|
const { jwtToken, numberId, version } = globalVendorArgs;
|
|
12375
12379
|
const someErrors = this.extractStatus(body);
|
|
12376
12380
|
const findError = someErrors.find((s) => s.status === 'failed');
|
|
@@ -12383,7 +12387,9 @@ class MetaCoreVendor extends EventEmitter {
|
|
|
12383
12387
|
return res.end(JSON.stringify(someErrors));
|
|
12384
12388
|
}
|
|
12385
12389
|
const messages = body?.entry?.[0]?.changes?.[0]?.value?.messages;
|
|
12386
|
-
const contacts =
|
|
12390
|
+
const contacts = body?.entry?.[0]?.changes?.[0]?.value?.contacts;
|
|
12391
|
+
const messageId = body?.entry?.[0]?.changes?.[0]?.value?.messages?.[0]?.id;
|
|
12392
|
+
const messageTimestamp = body?.entry?.[0]?.changes?.[0]?.value?.messages?.[0]?.timestamp;
|
|
12387
12393
|
if (!messages?.length) {
|
|
12388
12394
|
res.statusCode = 200;
|
|
12389
12395
|
res.end('empty endpoint');
|
|
@@ -12394,6 +12400,8 @@ class MetaCoreVendor extends EventEmitter {
|
|
|
12394
12400
|
const to = body.entry[0].changes[0].value?.metadata?.display_phone_number;
|
|
12395
12401
|
const pushName = contact?.profile?.name;
|
|
12396
12402
|
const response = await processIncomingMessage({
|
|
12403
|
+
messageId,
|
|
12404
|
+
messageTimestamp,
|
|
12397
12405
|
to,
|
|
12398
12406
|
pushName,
|
|
12399
12407
|
message,
|
|
@@ -12592,6 +12600,20 @@ class MetaProvider extends bot.ProviderClass {
|
|
|
12592
12600
|
};
|
|
12593
12601
|
return this.sendMessageMeta(body);
|
|
12594
12602
|
};
|
|
12603
|
+
this.sendImageUrl = async (to, url, caption = '') => {
|
|
12604
|
+
to = parseMetaNumber(to);
|
|
12605
|
+
const body = {
|
|
12606
|
+
messaging_product: 'whatsapp',
|
|
12607
|
+
recipient_type: 'individual',
|
|
12608
|
+
to,
|
|
12609
|
+
type: 'image',
|
|
12610
|
+
image: {
|
|
12611
|
+
link: url,
|
|
12612
|
+
caption
|
|
12613
|
+
},
|
|
12614
|
+
};
|
|
12615
|
+
return this.sendMessageMeta(body);
|
|
12616
|
+
};
|
|
12595
12617
|
this.sendVideo = async (to, pathVideo = null, caption) => {
|
|
12596
12618
|
to = parseMetaNumber(to);
|
|
12597
12619
|
if (!pathVideo)
|
|
@@ -12619,6 +12641,20 @@ class MetaProvider extends bot.ProviderClass {
|
|
|
12619
12641
|
};
|
|
12620
12642
|
return this.sendMessageMeta(body);
|
|
12621
12643
|
};
|
|
12644
|
+
this.sendVideoUrl = async (to, url, caption = '') => {
|
|
12645
|
+
to = parseMetaNumber(to);
|
|
12646
|
+
const body = {
|
|
12647
|
+
messaging_product: 'whatsapp',
|
|
12648
|
+
recipient_type: 'individual',
|
|
12649
|
+
to,
|
|
12650
|
+
type: 'video',
|
|
12651
|
+
video: {
|
|
12652
|
+
link: url,
|
|
12653
|
+
caption
|
|
12654
|
+
},
|
|
12655
|
+
};
|
|
12656
|
+
return this.sendMessageMeta(body);
|
|
12657
|
+
};
|
|
12622
12658
|
this.sendMedia = async (to, text = '', mediaInput) => {
|
|
12623
12659
|
to = parseMetaNumber(to);
|
|
12624
12660
|
const fileDownloaded = await bot.utils.generalDownload(mediaInput);
|
|
@@ -12646,6 +12682,41 @@ class MetaProvider extends bot.ProviderClass {
|
|
|
12646
12682
|
};
|
|
12647
12683
|
return this.sendMessageMeta(body);
|
|
12648
12684
|
};
|
|
12685
|
+
this.sendListComplete = async (to, header, text, footer, button, list) => {
|
|
12686
|
+
to = parseMetaNumber(to);
|
|
12687
|
+
const parseList = list.map((list) => ({
|
|
12688
|
+
title: list.title,
|
|
12689
|
+
rows: list.rows.map((row) => ({
|
|
12690
|
+
id: row.id,
|
|
12691
|
+
title: row.title,
|
|
12692
|
+
description: row.description,
|
|
12693
|
+
})),
|
|
12694
|
+
}));
|
|
12695
|
+
const body = {
|
|
12696
|
+
messaging_product: 'whatsapp',
|
|
12697
|
+
recipient_type: 'individual',
|
|
12698
|
+
to,
|
|
12699
|
+
type: 'interactive',
|
|
12700
|
+
interactive: {
|
|
12701
|
+
type: 'list',
|
|
12702
|
+
header: {
|
|
12703
|
+
type: 'text',
|
|
12704
|
+
text: header,
|
|
12705
|
+
},
|
|
12706
|
+
body: {
|
|
12707
|
+
text: text,
|
|
12708
|
+
},
|
|
12709
|
+
footer: {
|
|
12710
|
+
text: footer,
|
|
12711
|
+
},
|
|
12712
|
+
action: {
|
|
12713
|
+
button: button,
|
|
12714
|
+
sections: parseList,
|
|
12715
|
+
},
|
|
12716
|
+
},
|
|
12717
|
+
};
|
|
12718
|
+
return this.sendMessageMeta(body);
|
|
12719
|
+
};
|
|
12649
12720
|
this.sendButtons = async (to, buttons = [], text) => {
|
|
12650
12721
|
to = parseMetaNumber(to);
|
|
12651
12722
|
const parseButtons = buttons.map((btn, i) => ({
|
|
@@ -12695,9 +12766,90 @@ class MetaProvider extends bot.ProviderClass {
|
|
|
12695
12766
|
};
|
|
12696
12767
|
return this.sendMessageMeta(body);
|
|
12697
12768
|
};
|
|
12698
|
-
this.
|
|
12769
|
+
this.sendButtonsMedia = async (to, media_type, buttons = [], text, url) => {
|
|
12699
12770
|
to = parseMetaNumber(to);
|
|
12700
|
-
const
|
|
12771
|
+
const parseButtons = buttons.map((btn, i) => ({
|
|
12772
|
+
type: 'reply',
|
|
12773
|
+
reply: {
|
|
12774
|
+
id: `btn-${i}`,
|
|
12775
|
+
title: btn.body.slice(0, 15),
|
|
12776
|
+
},
|
|
12777
|
+
}));
|
|
12778
|
+
const body = {
|
|
12779
|
+
messaging_product: 'whatsapp',
|
|
12780
|
+
recipient_type: 'individual',
|
|
12781
|
+
to,
|
|
12782
|
+
type: 'interactive',
|
|
12783
|
+
interactive: {
|
|
12784
|
+
type: 'button',
|
|
12785
|
+
header: {
|
|
12786
|
+
type: media_type,
|
|
12787
|
+
[media_type === 'video' ? 'video' : 'image']: {
|
|
12788
|
+
link: url
|
|
12789
|
+
}
|
|
12790
|
+
},
|
|
12791
|
+
body: {
|
|
12792
|
+
text
|
|
12793
|
+
},
|
|
12794
|
+
action: {
|
|
12795
|
+
buttons: parseButtons
|
|
12796
|
+
}
|
|
12797
|
+
}
|
|
12798
|
+
};
|
|
12799
|
+
return this.sendMessageMeta(body);
|
|
12800
|
+
};
|
|
12801
|
+
this.sendTemplate = async (to, template, languageCode, components = []) => {
|
|
12802
|
+
to = parseMetaNumber(to);
|
|
12803
|
+
const body = {
|
|
12804
|
+
messaging_product: 'whatsapp',
|
|
12805
|
+
recipient_type: 'individual',
|
|
12806
|
+
to,
|
|
12807
|
+
type: 'template',
|
|
12808
|
+
template: {
|
|
12809
|
+
name: template,
|
|
12810
|
+
language: {
|
|
12811
|
+
code: languageCode // ---> examples: es_Mx, en_Us
|
|
12812
|
+
},
|
|
12813
|
+
components: components.length > 0 ? components : []
|
|
12814
|
+
}
|
|
12815
|
+
};
|
|
12816
|
+
return this.sendMessageMeta(body);
|
|
12817
|
+
};
|
|
12818
|
+
this.sendFlow = async (to, headerText, bodyText, footerText, flowID, flowCta, screenName, data = {}) => {
|
|
12819
|
+
to = parseMetaNumber(to);
|
|
12820
|
+
const body = {
|
|
12821
|
+
messaging_product: 'whatsapp',
|
|
12822
|
+
to,
|
|
12823
|
+
recipient_type: 'individual',
|
|
12824
|
+
type: 'interactive',
|
|
12825
|
+
interactive: {
|
|
12826
|
+
type: 'flow',
|
|
12827
|
+
header: {
|
|
12828
|
+
type: 'text',
|
|
12829
|
+
text: headerText,
|
|
12830
|
+
},
|
|
12831
|
+
body: {
|
|
12832
|
+
text: bodyText
|
|
12833
|
+
},
|
|
12834
|
+
footer: {
|
|
12835
|
+
text: footerText,
|
|
12836
|
+
},
|
|
12837
|
+
action: {
|
|
12838
|
+
name: 'flow',
|
|
12839
|
+
parameters: {
|
|
12840
|
+
flow_message_version: '3',
|
|
12841
|
+
flow_action: 'navigate',
|
|
12842
|
+
flow_token: '<FLOW_TOKEN>', // opcional para cifrado con endpoint
|
|
12843
|
+
flow_id: flowID,
|
|
12844
|
+
flow_cta: flowCta, // open flow! -> mensaje del boton
|
|
12845
|
+
flow_action_payload: {
|
|
12846
|
+
screen: screenName,
|
|
12847
|
+
data: Array.isArray(data) && data.length > 0 ? data : { '<CUSTOM_KEY>': '<CUSTOM_VALUE>' }
|
|
12848
|
+
}
|
|
12849
|
+
}
|
|
12850
|
+
}
|
|
12851
|
+
}
|
|
12852
|
+
};
|
|
12701
12853
|
return this.sendMessageMeta(body);
|
|
12702
12854
|
};
|
|
12703
12855
|
this.sendContacts = async (to, contacts = []) => {
|
package/dist/interface/meta.d.ts
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
import type { SendOptions, BotContext, Button } from '@builderbot/bot/dist/types';
|
|
2
2
|
|
|
3
|
-
import type { TextMessageBody, Reaction, Localization, Message, SaveFileOptions, MetaList
|
|
3
|
+
import type { TextMessageBody, Reaction, Localization, Message, SaveFileOptions, MetaList } from '../types';
|
|
4
4
|
export interface MetaInterface {
|
|
5
5
|
sendMessageMeta: (body: TextMessageBody) => void;
|
|
6
6
|
sendMessageToApi: (body: TextMessageBody) => Promise<any>;
|
|
7
7
|
sendText: (to: string, message: string) => Promise<any>;
|
|
8
8
|
sendImage: (to: string, mediaInput: string | null, caption: string) => Promise<any>;
|
|
9
|
+
sendImageUrl: (to: string, url: string, caption: string) => Promise<void>;
|
|
9
10
|
sendVideo: (to: string, pathVideo: string | null, caption: string) => Promise<any>;
|
|
11
|
+
sendVideoUrl: (to: string, url: string, caption: string) => Promise<void>;
|
|
10
12
|
sendMedia: (to: string, text: string, mediaInput: string) => Promise<any>;
|
|
11
13
|
sendList: (to: string, list: MetaList) => Promise<any>;
|
|
14
|
+
sendListComplete: (to: string, header: string, text: string, footer: string, button: string, list: Record<string, any>) => Promise<void>;
|
|
12
15
|
sendButtons: (to: string, buttons: Button[], text: string) => Promise<any>;
|
|
13
16
|
sendButtonUrl: (to: string, button: Button & {
|
|
14
17
|
url: string;
|
|
15
18
|
}, text: string) => Promise<any>;
|
|
16
|
-
|
|
19
|
+
sendButtonsMedia: (to: string, media_type: string, buttons: Button[], text: string, mediaInput: string) => Promise<any>;
|
|
20
|
+
sendTemplate: (to: string, template: string, languageCode: string, components: Record<string, any>) => Promise<any>;
|
|
21
|
+
sendFlow: (to: string, headerText: string, bodyText: string, footerText: string, flowID: string, flowCta: string, screenName: string, data: Record<string, any>) => Promise<void>;
|
|
17
22
|
sendContacts: (to: string, contact: any[]) => Promise<any>;
|
|
18
23
|
sendCatalog: (number: any, bodyText: any, itemCatalogId: any) => Promise<any>;
|
|
19
24
|
sendMessage: (number: string, message: string, options?: SendOptions) => Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../src/interface/meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjF,OAAO,KAAK,EACR,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,eAAe,EACf,QAAQ,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../src/interface/meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEjF,OAAO,KAAK,EACR,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,eAAe,EACf,QAAQ,EACX,MAAM,UAAU,CAAA;AAEjB,MAAM,WAAW,aAAa;IAC1B,eAAe,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAA;IAChD,gBAAgB,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACzD,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IACvD,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU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;IACtE,QAAQ,EAAE,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,GAAG,UAAU,CAAC,EAAE,OAAO,CAAC,EAAE,eAAe,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IAC5F,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;IAClF,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;CACpD"}
|
package/dist/meta/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/meta/core.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAEtC,OAAO,KAAK,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/meta/core.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,aAAa,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,KAAK,MAAM,eAAe,CAAA;AAEtC,OAAO,KAAK,EAAE,OAAO,EAAyC,MAAM,UAAU,CAAA;AAG9E;;;GAGG;AACH,qBAAa,cAAe,SAAQ,YAAY;IAC5C,KAAK,EAAE,KAAK,CAAA;IAEZ;;;OAGG;gBACS,MAAM,EAAE,KAAK;IAKzB;;;OAGG;IACI,SAAS,EAAE,KAAK,CAAC,UAAU,CAEjC;IAED;;;;;;OAMG;IACI,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAI9E,OAAO,CAAC,aAAa;IAwBrB;;;OAGG;IACI,WAAW,EAAE,KAAK,CAAC,UAAU,CAqBnC;IAED;;;OAGG;IACI,WAAW,EAAE,KAAK,CAAC,UAAU,CAgDnC;IAED;;;;OAIG;IACI,cAAc,YAAa,OAAO,KAAG,QAAQ,IAAI,CAAC,CASxD;CACJ"}
|
package/dist/meta/provider.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { BotContext, Button, SendOptions } from '@builderbot/bot/dist/types
|
|
|
4
4
|
import type Queue from 'queue-promise';
|
|
5
5
|
|
|
6
6
|
import type { MetaInterface } from '../interface/meta';
|
|
7
|
-
import type { MetaGlobalVendorArgs, Localization, Message, MetaList, ParsedContact, Reaction, SaveFileOptions,
|
|
7
|
+
import type { MetaGlobalVendorArgs, Localization, Message, MetaList, ParsedContact, Reaction, SaveFileOptions, TextMessageBody } from '../types';
|
|
8
8
|
declare class MetaProvider extends ProviderClass<MetaInterface> implements MetaInterface {
|
|
9
9
|
vendor: Vendor<any>;
|
|
10
10
|
queue: Queue;
|
|
@@ -25,14 +25,19 @@ declare class MetaProvider extends ProviderClass<MetaInterface> implements MetaI
|
|
|
25
25
|
func: (payload: any) => void;
|
|
26
26
|
}[];
|
|
27
27
|
sendImage: (to: string, mediaInput: any, caption: string) => Promise<void>;
|
|
28
|
+
sendImageUrl: (to: string, url: string, caption?: string) => Promise<void>;
|
|
28
29
|
sendVideo: (to: string, pathVideo: any, caption: string) => Promise<void>;
|
|
30
|
+
sendVideoUrl: (to: string, url: string, caption?: string) => Promise<void>;
|
|
29
31
|
sendMedia: (to: string, text: string, mediaInput: string) => Promise<void>;
|
|
30
32
|
sendList: (to: string, list: MetaList) => Promise<void>;
|
|
33
|
+
sendListComplete: (to: string, header: string, text: string, footer: string, button: string, list: Record<string, any>) => Promise<void>;
|
|
31
34
|
sendButtons: (to: string, buttons: Button[], text: string) => Promise<void>;
|
|
32
35
|
sendButtonUrl: (to: string, button: Button & {
|
|
33
36
|
url: string;
|
|
34
37
|
}, text: string) => Promise<any>;
|
|
35
|
-
|
|
38
|
+
sendButtonsMedia: (to: string, media_type: string, buttons: any[], text: string, url: string) => Promise<void>;
|
|
39
|
+
sendTemplate: (to: string, template: string, languageCode: string, components?: any[]) => Promise<void>;
|
|
40
|
+
sendFlow: (to: string, headerText: string, bodyText: string, footerText: string, flowID: string, flowCta: string, screenName: string, data?: {}) => Promise<void>;
|
|
36
41
|
sendContacts: (to: string, contacts?: ParsedContact[]) => Promise<void>;
|
|
37
42
|
sendCatalog: (to: string, text: string, itemCatalogId: string) => Promise<void>;
|
|
38
43
|
sendMessage: (to: string, message: string, options?: SendOptions) => Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/meta/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kDAAkD,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAQjF,OAAO,KAAK,MAAM,eAAe,CAAA;AAGjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACtD,OAAO,KAAK,EACR,oBAAoB,EACpB,YAAY,EACZ,OAAO,EACP,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/meta/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAS,MAAM,iBAAiB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kDAAkD,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAQjF,OAAO,KAAK,MAAM,eAAe,CAAA;AAGjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAA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OAAa,MAAM,cAAc,MAAM,wBAAsB,MAAM,OAAO,MAAM,mBA+B/F;IAED,YAAY,OAAc,MAAM,YAAY,MAAM,gBAAgB,MAAM,uCAgBvE;IAED,QAAQ,OAAc,MAAM,cAAc,MAAM,YAAY,MAAM,cAAc,MAAM,UAAU,MAAM,WAAY,MAAM,cAAc,MAAM,8BAoC3I;IAED,YAAY,OAAc,MAAM,aAAY,aAAa,EAAE,mBAU1D;IAED,WAAW,OAAc,MAAM,QAAQ,MAAM,iBAAiB,MAAM,mBAqBnE;IAED,WAAW,OAAc,MAAM,WAAW,MAAM,YAAY,WAAW,KAAG,QAAQ,GAAG,CAAC,CAMrF;IAED,QAAQ,OAAc,MAAM,4BAA8B,MAAM,mBAqC/D;IAED,SAAS,OAAc,MAAM,oCAyC5B;IAED,YAAY,OAAc,MAAM,SAAS,QAAQ,mBAahD;IAED,YAAY,OAAc,MAAM,gBAAgB,YAAY,mBAe3D;IAED,QAAQ,OAAc,MAAM,WAAW,MAAM,mBAa5C;IAED,eAAe,SAAU,eAAe,KAAG,IAAI,CAE9C;IAED,gBAAgB,SAAgB,eAAe,KAAG,QAAQ,GAAG,CAAC,CAa7D;CACJ;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -2,10 +2,6 @@ import type { GlobalVendorArgs } from '@builderbot/bot/dist/types';
|
|
|
2
2
|
export interface MediaResponse {
|
|
3
3
|
url?: string;
|
|
4
4
|
}
|
|
5
|
-
export interface Contact {
|
|
6
|
-
name: string;
|
|
7
|
-
phones: string[];
|
|
8
|
-
}
|
|
9
5
|
export interface MetaList {
|
|
10
6
|
header: {
|
|
11
7
|
type: string;
|
|
@@ -40,6 +36,8 @@ export interface Order {
|
|
|
40
36
|
product_items: string[];
|
|
41
37
|
}
|
|
42
38
|
export interface Message {
|
|
39
|
+
message_id?: string;
|
|
40
|
+
timestamp?: any;
|
|
43
41
|
type: string;
|
|
44
42
|
from: string;
|
|
45
43
|
to: string;
|
|
@@ -57,6 +55,8 @@ export interface Message {
|
|
|
57
55
|
id?: string;
|
|
58
56
|
}
|
|
59
57
|
export interface ParamsIncomingMessage {
|
|
58
|
+
messageId?: string;
|
|
59
|
+
messageTimestamp?: any;
|
|
60
60
|
pushName: string;
|
|
61
61
|
to: string;
|
|
62
62
|
jwtToken: string;
|
|
@@ -93,30 +93,32 @@ export interface TextMessageBody {
|
|
|
93
93
|
preview_url: boolean;
|
|
94
94
|
body: string;
|
|
95
95
|
};
|
|
96
|
-
image?:
|
|
97
|
-
|
|
98
|
-
caption: string;
|
|
99
|
-
};
|
|
100
|
-
video?: {
|
|
101
|
-
id: string;
|
|
102
|
-
caption: string;
|
|
103
|
-
};
|
|
96
|
+
image?: Image;
|
|
97
|
+
video?: Video;
|
|
104
98
|
interactive?: any;
|
|
105
99
|
contacts?: any[];
|
|
106
100
|
template?: TemplateMessage;
|
|
107
101
|
}
|
|
102
|
+
interface Image {
|
|
103
|
+
id?: string;
|
|
104
|
+
caption?: string;
|
|
105
|
+
link?: string;
|
|
106
|
+
}
|
|
107
|
+
interface Video {
|
|
108
|
+
id?: string;
|
|
109
|
+
caption?: string;
|
|
110
|
+
link?: string;
|
|
111
|
+
}
|
|
108
112
|
interface TemplateMessage {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
code: string;
|
|
113
|
-
};
|
|
114
|
-
components: TemplateComponent[];
|
|
113
|
+
name: string;
|
|
114
|
+
language: {
|
|
115
|
+
code: string;
|
|
115
116
|
};
|
|
117
|
+
components: TemplateComponent[];
|
|
116
118
|
}
|
|
117
119
|
interface TemplateComponent {
|
|
118
120
|
type: 'header' | 'body' | 'button';
|
|
119
|
-
parameters
|
|
121
|
+
parameters?: TemplateParameter[];
|
|
120
122
|
}
|
|
121
123
|
interface TemplateParameter {
|
|
122
124
|
type: string;
|
|
@@ -145,5 +147,46 @@ export interface WhatsAppProfile {
|
|
|
145
147
|
};
|
|
146
148
|
id: string;
|
|
147
149
|
}
|
|
150
|
+
export interface incomingMessage {
|
|
151
|
+
object: string;
|
|
152
|
+
entry: Entry[];
|
|
153
|
+
}
|
|
154
|
+
export interface Entry {
|
|
155
|
+
id: string;
|
|
156
|
+
changes: Change[];
|
|
157
|
+
}
|
|
158
|
+
export interface Change {
|
|
159
|
+
value: Value;
|
|
160
|
+
field: string;
|
|
161
|
+
}
|
|
162
|
+
export interface Value {
|
|
163
|
+
messaging_product: string;
|
|
164
|
+
metadata: Metadata;
|
|
165
|
+
contacts: Contact[];
|
|
166
|
+
messages: MessageFromMeta[];
|
|
167
|
+
}
|
|
168
|
+
export interface Metadata {
|
|
169
|
+
display_phone_number: string;
|
|
170
|
+
phone_number_id: string;
|
|
171
|
+
}
|
|
172
|
+
export interface Contact {
|
|
173
|
+
profile: Profile;
|
|
174
|
+
wa_id: string;
|
|
175
|
+
name: string;
|
|
176
|
+
phones: string[];
|
|
177
|
+
}
|
|
178
|
+
export interface Profile {
|
|
179
|
+
name: string;
|
|
180
|
+
}
|
|
181
|
+
export interface MessageFromMeta {
|
|
182
|
+
from: string;
|
|
183
|
+
id: string;
|
|
184
|
+
timestamp: string;
|
|
185
|
+
text: Text;
|
|
186
|
+
type: string;
|
|
187
|
+
}
|
|
188
|
+
export interface Text {
|
|
189
|
+
body: string;
|
|
190
|
+
}
|
|
148
191
|
export {};
|
|
149
192
|
//# 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;AAElE,MAAM,WAAW,aAAa;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAA;CACf;AACD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBA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AAA;CACf"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Message, ParamsIncomingMessage as ParamsIncomingMessage } from '../types';
|
|
2
|
-
export declare const processIncomingMessage: ({ pushName, message, to, jwtToken, version, numberId, }: ParamsIncomingMessage) => Promise<Message>;
|
|
2
|
+
export declare const processIncomingMessage: ({ messageId, messageTimestamp, pushName, message, to, jwtToken, version, numberId, }: ParamsIncomingMessage) => Promise<Message>;
|
|
3
3
|
//# sourceMappingURL=processIncomingMsg.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,yFAShC,qBAAqB,KAAG,QAAQ,OAAO,CA+JzC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builderbot/provider-meta",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.31-alpha.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "vicente1992 <vic_ortiz20@hotmail.es>",
|
|
6
6
|
"homepage": "https://github.com/vicente1992/bot-whatsapp#readme",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"queue-promise": "^2.2.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@builderbot/bot": "^1.0.
|
|
41
|
+
"@builderbot/bot": "^1.0.31-alpha.0",
|
|
42
42
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
43
43
|
"@rollup/plugin-json": "^6.1.0",
|
|
44
44
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"tslib": "^2.6.2",
|
|
58
58
|
"tsm": "^2.3.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "e00e308495c6142562aec45453a0d2019c2d6e09"
|
|
61
61
|
}
|