meta-cloud-api 1.1.4 → 1.1.6
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/{common-CvPVD1o6.d.ts → api/flow/types/common.d.ts} +2 -2
- package/dist/{common-CvPVD1o6.d.ts.map → api/flow/types/common.d.ts.map} +1 -1
- package/dist/api/flow/types/common.js +51 -0
- package/dist/{common-C6FXBDm7.js.map → api/flow/types/common.js.map} +1 -1
- package/dist/api/flow/types/index.d.ts +1 -0
- package/dist/api/flow/types/index.js +1 -0
- package/dist/api/media/types/common.d.ts +32 -0
- package/dist/api/media/types/common.d.ts.map +1 -0
- package/dist/api/media/types/index.d.ts +1 -0
- package/dist/api/messages/types/common.d.ts +99 -0
- package/dist/api/messages/types/common.d.ts.map +1 -0
- package/dist/api/messages/types/contact.d.ts +54 -0
- package/dist/api/messages/types/contact.d.ts.map +1 -0
- package/dist/api/messages/types/index.d.ts +8 -0
- package/dist/api/messages/types/interactive.d.ts +182 -0
- package/dist/api/messages/types/interactive.d.ts.map +1 -0
- package/dist/api/messages/types/location.d.ts +16 -0
- package/dist/api/messages/types/location.d.ts.map +1 -0
- package/dist/api/messages/types/media.d.ts +55 -0
- package/dist/api/messages/types/media.d.ts.map +1 -0
- package/dist/api/messages/types/reaction.d.ts +17 -0
- package/dist/api/messages/types/reaction.d.ts.map +1 -0
- package/dist/api/messages/types/template.d.ts +72 -0
- package/dist/api/messages/types/template.d.ts.map +1 -0
- package/dist/api/messages/types/text.d.ts +17 -0
- package/dist/api/messages/types/text.d.ts.map +1 -0
- package/dist/api/phone/types/common.d.ts +83 -0
- package/dist/api/phone/types/common.d.ts.map +1 -0
- package/dist/api/phone/types/index.d.ts +1 -0
- package/dist/api/profile/types/common.d.ts +149 -0
- package/dist/api/profile/types/common.d.ts.map +1 -0
- package/dist/api/profile/types/index.d.ts +2 -0
- package/dist/api/profile/types/upload.d.ts +73 -0
- package/dist/api/profile/types/upload.d.ts.map +1 -0
- package/dist/api/qrCode/types/common.d.ts +28 -0
- package/dist/api/qrCode/types/common.d.ts.map +1 -0
- package/dist/api/qrCode/types/index.d.ts +1 -0
- package/dist/api/template/types/common.d.ts +155 -0
- package/dist/api/template/types/common.d.ts.map +1 -0
- package/dist/api/template/types/factory.d.ts +202 -0
- package/dist/api/template/types/factory.d.ts.map +1 -0
- package/dist/api/template/types/index.d.ts +2 -0
- package/dist/{index-CeTmbIXi.d.ts → api/waba/types/common.d.ts} +3 -61
- package/dist/api/waba/types/common.d.ts.map +1 -0
- package/dist/api/waba/types/common.js +44 -0
- package/dist/api/waba/types/common.js.map +1 -0
- package/dist/api/waba/types/index.d.ts +1 -0
- package/dist/api/waba/types/index.js +1 -0
- package/dist/chunk-PECeCxCb.js +15 -0
- package/dist/client.d.ts +25 -0
- package/dist/client.js +6 -0
- package/dist/{WebhookProcessor-Dq2Pa2cY.d.ts → core/webhook/types.d.ts} +74 -55
- package/dist/core/webhook/types.d.ts.map +1 -0
- package/dist/{base-CfDkvT1x.d.ts → enums.d.ts} +3 -142
- package/dist/enums.d.ts.map +1 -0
- package/dist/enums.js +681 -0
- package/dist/enums.js.map +1 -0
- package/dist/index.d.ts +4386 -21
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3436 -1
- package/dist/index.js.map +1 -1
- package/dist/types/base.d.ts +19 -0
- package/dist/types/base.d.ts.map +1 -0
- package/dist/types/config.d.ts +80 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/enums.d.ts +668 -0
- package/dist/types/enums.d.ts.map +1 -0
- package/dist/types/enums.js +681 -0
- package/dist/types/enums.js.map +1 -0
- package/dist/{index-DQkgkiB6.d.ts → types/httpsClient.d.ts} +3 -12
- package/dist/types/httpsClient.d.ts.map +1 -0
- package/dist/types/index.d.ts +24 -3
- package/dist/types/index.js +5 -1
- package/dist/types/logger.d.ts +11 -0
- package/dist/types/logger.d.ts.map +1 -0
- package/dist/types/request.d.ts +52 -0
- package/dist/types/request.d.ts.map +1 -0
- package/dist/utils/isMetaError.d.ts +23 -0
- package/dist/utils/isMetaError.d.ts.map +1 -0
- package/package.json +19 -22
- package/dist/WebhookProcessor-BUZFeZD_.js +0 -3
- package/dist/WebhookProcessor-BUZFeZD_.js.map +0 -1
- package/dist/WebhookProcessor-Dq2Pa2cY.d.ts.map +0 -1
- package/dist/api/encryption/index.d.ts +0 -3
- package/dist/api/encryption/index.js +0 -1
- package/dist/api/flow/index.d.ts +0 -5
- package/dist/api/flow/index.js +0 -1
- package/dist/api/index.d.ts +0 -17
- package/dist/api/index.js +0 -1
- package/dist/api/media/index.d.ts +0 -3
- package/dist/api/media/index.js +0 -1
- package/dist/api/messages/builders/index.d.ts +0 -539
- package/dist/api/messages/builders/index.d.ts.map +0 -1
- package/dist/api/messages/builders/index.js +0 -2
- package/dist/api/messages/builders/index.js.map +0 -1
- package/dist/api/messages/index.d.ts +0 -4
- package/dist/api/messages/index.js +0 -1
- package/dist/api/phone/index.d.ts +0 -3
- package/dist/api/phone/index.js +0 -1
- package/dist/api/profile/index.d.ts +0 -3
- package/dist/api/profile/index.js +0 -1
- package/dist/api/qrCode/index.d.ts +0 -3
- package/dist/api/qrCode/index.js +0 -1
- package/dist/api/registration/index.d.ts +0 -3
- package/dist/api/registration/index.js +0 -1
- package/dist/api/template/index.d.ts +0 -3
- package/dist/api/template/index.js +0 -1
- package/dist/api/twoStepVerification/index.d.ts +0 -3
- package/dist/api/twoStepVerification/index.js +0 -1
- package/dist/api/waba/index.d.ts +0 -3
- package/dist/api/waba/index.js +0 -1
- package/dist/api-8hRAOyaL.js +0 -1
- package/dist/base-CfDkvT1x.d.ts.map +0 -1
- package/dist/base-D-cXu_lA.js +0 -2
- package/dist/base-D-cXu_lA.js.map +0 -1
- package/dist/buildFieldsQueryString-Cr-jz3p0.js +0 -2
- package/dist/buildFieldsQueryString-Cr-jz3p0.js.map +0 -1
- package/dist/chunk-CTAAG5j7.js +0 -1
- package/dist/common-C6FXBDm7.js +0 -2
- package/dist/common-CVbsmD26.d.ts +0 -426
- package/dist/common-CVbsmD26.d.ts.map +0 -1
- package/dist/core/webhook/frameworks/express.d.ts +0 -20
- package/dist/core/webhook/frameworks/express.js +0 -1
- package/dist/core/webhook/frameworks/nextjs-app.d.ts +0 -45
- package/dist/core/webhook/frameworks/nextjs-app.d.ts.map +0 -1
- package/dist/core/webhook/frameworks/nextjs-app.js +0 -2
- package/dist/core/webhook/frameworks/nextjs-app.js.map +0 -1
- package/dist/core/webhook/frameworks/nextjs.d.ts +0 -20
- package/dist/core/webhook/frameworks/nextjs.js +0 -1
- package/dist/core/webhook/index.d.ts +0 -20
- package/dist/core/webhook/index.js +0 -1
- package/dist/core/whatsapp/index.d.ts +0 -18
- package/dist/core/whatsapp/index.js +0 -1
- package/dist/encryption-Cwc0xcVL.js +0 -2
- package/dist/encryption-Cwc0xcVL.js.map +0 -1
- package/dist/enums-CSUpFXb8.js +0 -2
- package/dist/enums-CSUpFXb8.js.map +0 -1
- package/dist/express-B6fQdflY.d.ts +0 -78
- package/dist/express-B6fQdflY.d.ts.map +0 -1
- package/dist/express-CrfNLYMM.js +0 -2
- package/dist/express-CrfNLYMM.js.map +0 -1
- package/dist/flow-CVes0Qus.js +0 -2
- package/dist/flow-CVes0Qus.js.map +0 -1
- package/dist/flowTypeGuards-Gn3-slCW.js +0 -2
- package/dist/flowTypeGuards-Gn3-slCW.js.map +0 -1
- package/dist/handler-BGqjZ0xg.js +0 -2
- package/dist/handler-BGqjZ0xg.js.map +0 -1
- package/dist/index-3KglHVAg.d.ts +0 -354
- package/dist/index-3KglHVAg.d.ts.map +0 -1
- package/dist/index-BNeg6hHx.d.ts +0 -99
- package/dist/index-BNeg6hHx.d.ts.map +0 -1
- package/dist/index-BiTq23oi.d.ts +0 -34
- package/dist/index-BiTq23oi.d.ts.map +0 -1
- package/dist/index-BmfnREgM.d.ts +0 -47
- package/dist/index-BmfnREgM.d.ts.map +0 -1
- package/dist/index-CaGffSja.d.ts +0 -24
- package/dist/index-CaGffSja.d.ts.map +0 -1
- package/dist/index-CeTmbIXi.d.ts.map +0 -1
- package/dist/index-CoyByMuM.d.ts +0 -137
- package/dist/index-CoyByMuM.d.ts.map +0 -1
- package/dist/index-CwujtcvH.d.ts +0 -370
- package/dist/index-CwujtcvH.d.ts.map +0 -1
- package/dist/index-DQ7z58xp.d.ts +0 -104
- package/dist/index-DQ7z58xp.d.ts.map +0 -1
- package/dist/index-DQkgkiB6.d.ts.map +0 -1
- package/dist/index-LKrIp3Oo.d.ts +0 -1
- package/dist/index-_-06JPan.d.ts +0 -143
- package/dist/index-_-06JPan.d.ts.map +0 -1
- package/dist/index-a_YS40Iv.d.ts +0 -91
- package/dist/index-a_YS40Iv.d.ts.map +0 -1
- package/dist/index-d7TLqtYh.d.ts +0 -171
- package/dist/index-d7TLqtYh.d.ts.map +0 -1
- package/dist/isMetaError-B3AglYeY.d.ts +0 -66
- package/dist/isMetaError-B3AglYeY.d.ts.map +0 -1
- package/dist/media-Dw5OGzDD.js +0 -2
- package/dist/media-Dw5OGzDD.js.map +0 -1
- package/dist/messages-h5-NW8QO.js +0 -2
- package/dist/messages-h5-NW8QO.js.map +0 -1
- package/dist/nextjs-DxRCL4t3.js +0 -2
- package/dist/nextjs-DxRCL4t3.js.map +0 -1
- package/dist/objectToQueryString-CAHI0qTs.js +0 -2
- package/dist/objectToQueryString-CAHI0qTs.js.map +0 -1
- package/dist/phone-CZyWLyWB.js +0 -2
- package/dist/phone-CZyWLyWB.js.map +0 -1
- package/dist/profile-Bb7GDP0n.js +0 -2
- package/dist/profile-Bb7GDP0n.js.map +0 -1
- package/dist/qrCode-CeZEtX9J.js +0 -2
- package/dist/qrCode-CeZEtX9J.js.map +0 -1
- package/dist/registration-BkjhC3xw.js +0 -2
- package/dist/registration-BkjhC3xw.js.map +0 -1
- package/dist/template-Bgy-BCXJ.js +0 -2
- package/dist/template-Bgy-BCXJ.js.map +0 -1
- package/dist/twoStepVerification-DYlYF_P5.js +0 -2
- package/dist/twoStepVerification-DYlYF_P5.js.map +0 -1
- package/dist/utils/index.d.ts +0 -43
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/version-BUuqrHc6.js +0 -3
- package/dist/version-BUuqrHc6.js.map +0 -1
- package/dist/waba-SF2W3z2U.js +0 -2
- package/dist/waba-SF2W3z2U.js.map +0 -1
- package/dist/webhook-D4DQ01Xq.js +0 -2
- package/dist/webhook-D4DQ01Xq.js.map +0 -1
- package/dist/whatsapp-B85mxH5f.js +0 -10
- package/dist/whatsapp-B85mxH5f.js.map +0 -1
|
@@ -1,426 +0,0 @@
|
|
|
1
|
-
import { BaseClass, ButtonPositionEnum, ComponentTypesEnum, CurrencyCodesEnum, GeneralRequestBody, InteractiveTypesEnum, LanguagesEnum, MessageTypesEnum, ParametersTypesEnum, SubTypeEnum } from "./base-CfDkvT1x.js";
|
|
2
|
-
|
|
3
|
-
//#region src/api/messages/types/text.d.ts
|
|
4
|
-
type TextObject = {
|
|
5
|
-
body: string;
|
|
6
|
-
preview_url?: boolean;
|
|
7
|
-
};
|
|
8
|
-
interface TextMessageParams extends MessageRequestParams<TextObject | string> {
|
|
9
|
-
previewUrl?: boolean;
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/api/messages/types/template.d.ts
|
|
13
|
-
type LanguageObject = {
|
|
14
|
-
policy: 'deterministic';
|
|
15
|
-
code: LanguagesEnum;
|
|
16
|
-
};
|
|
17
|
-
type ParametersObject<T extends ParametersTypesEnum> = {
|
|
18
|
-
type: T;
|
|
19
|
-
};
|
|
20
|
-
type SimpleTextObject$1 = {
|
|
21
|
-
text: string;
|
|
22
|
-
};
|
|
23
|
-
type TextParametersObject = ParametersObject<ParametersTypesEnum.Text> & SimpleTextObject$1;
|
|
24
|
-
type CouponCodeParametersObject = ParametersObject<ParametersTypesEnum.CouponCode> & {
|
|
25
|
-
coupon_code: string;
|
|
26
|
-
};
|
|
27
|
-
type CurrencyObject = {
|
|
28
|
-
fallback_value: string;
|
|
29
|
-
code: CurrencyCodesEnum;
|
|
30
|
-
amount_1000: number;
|
|
31
|
-
};
|
|
32
|
-
type CurrencyParametersObject = ParametersObject<ParametersTypesEnum.Currency> & {
|
|
33
|
-
currency: CurrencyObject;
|
|
34
|
-
};
|
|
35
|
-
type DateTimeObject = {
|
|
36
|
-
fallback_value: string;
|
|
37
|
-
};
|
|
38
|
-
type DateTimeParametersObject = ParametersObject<ParametersTypesEnum.Currency> & {
|
|
39
|
-
date_time: DateTimeObject;
|
|
40
|
-
};
|
|
41
|
-
type DocumentMediaObject$2 = {
|
|
42
|
-
id?: string;
|
|
43
|
-
link?: string;
|
|
44
|
-
caption?: string;
|
|
45
|
-
filename?: string;
|
|
46
|
-
};
|
|
47
|
-
type ImageMediaObject$2 = {
|
|
48
|
-
id?: string;
|
|
49
|
-
link?: string;
|
|
50
|
-
caption?: string;
|
|
51
|
-
};
|
|
52
|
-
type VideoMediaObject$2 = {
|
|
53
|
-
id?: string;
|
|
54
|
-
link?: string;
|
|
55
|
-
caption?: string;
|
|
56
|
-
};
|
|
57
|
-
type DocumentParametersObject = ParametersObject<ParametersTypesEnum.Document> & DocumentMediaObject$2;
|
|
58
|
-
type ImageParametersObject = ParametersObject<ParametersTypesEnum.Image> & ImageMediaObject$2;
|
|
59
|
-
type VideoParametersObject = ParametersObject<ParametersTypesEnum.Video> & VideoMediaObject$2;
|
|
60
|
-
type ComponentObject<T extends ComponentTypesEnum> = {
|
|
61
|
-
type: T;
|
|
62
|
-
parameters: (CurrencyParametersObject | DateTimeParametersObject | DocumentParametersObject | ImageParametersObject | TextParametersObject | VideoParametersObject | CouponCodeParametersObject)[];
|
|
63
|
-
};
|
|
64
|
-
type ButtonComponentObject = ComponentObject<ComponentTypesEnum.Button> & {
|
|
65
|
-
parameters?: (TextParametersObject | PayloadParametersObject)[];
|
|
66
|
-
sub_type: SubTypeEnum;
|
|
67
|
-
index: ButtonPositionEnum;
|
|
68
|
-
};
|
|
69
|
-
type PayloadParametersObject = ParametersObject<ParametersTypesEnum.Payload> & {
|
|
70
|
-
payload: string;
|
|
71
|
-
};
|
|
72
|
-
type MessageTemplateObject<T extends ComponentTypesEnum> = {
|
|
73
|
-
name: string;
|
|
74
|
-
language: LanguageObject;
|
|
75
|
-
components?: (ComponentObject<T> | ButtonComponentObject)[];
|
|
76
|
-
};
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/api/messages/types/media.d.ts
|
|
79
|
-
type MetaMediaObject = {
|
|
80
|
-
id: string;
|
|
81
|
-
link?: never;
|
|
82
|
-
};
|
|
83
|
-
type HostedMediaObject = {
|
|
84
|
-
id?: never;
|
|
85
|
-
link: string;
|
|
86
|
-
};
|
|
87
|
-
type AudioMediaObject = MetaMediaObject | HostedMediaObject;
|
|
88
|
-
type MetaDocumentMediaObject = MetaMediaObject & {
|
|
89
|
-
caption?: string;
|
|
90
|
-
filename?: string;
|
|
91
|
-
};
|
|
92
|
-
type HostedDocumentMediaObject = HostedMediaObject & {
|
|
93
|
-
caption?: string;
|
|
94
|
-
filename?: string;
|
|
95
|
-
};
|
|
96
|
-
type DocumentMediaObject$1 = MetaDocumentMediaObject | HostedDocumentMediaObject;
|
|
97
|
-
type MetaImageMediaObject = MetaMediaObject & {
|
|
98
|
-
caption?: string;
|
|
99
|
-
};
|
|
100
|
-
type HostedImageMediaObject = HostedMediaObject & {
|
|
101
|
-
caption?: string;
|
|
102
|
-
};
|
|
103
|
-
type ImageMediaObject$1 = MetaImageMediaObject | HostedImageMediaObject;
|
|
104
|
-
type MetaVideoMediaObject = MetaMediaObject & {
|
|
105
|
-
caption?: string;
|
|
106
|
-
};
|
|
107
|
-
type HostedVideoMediaObject = HostedMediaObject & {
|
|
108
|
-
caption?: string;
|
|
109
|
-
};
|
|
110
|
-
type VideoMediaObject$1 = MetaVideoMediaObject | HostedVideoMediaObject;
|
|
111
|
-
type StickerMediaObject = MetaMediaObject | HostedMediaObject;
|
|
112
|
-
//#endregion
|
|
113
|
-
//#region src/api/messages/types/contact.d.ts
|
|
114
|
-
type AddressesObject = {
|
|
115
|
-
street?: string;
|
|
116
|
-
city?: string;
|
|
117
|
-
state?: string;
|
|
118
|
-
zip?: string;
|
|
119
|
-
country?: string;
|
|
120
|
-
country_code?: string;
|
|
121
|
-
type?: 'HOME' | 'WORK' | string;
|
|
122
|
-
};
|
|
123
|
-
type EmailObject = {
|
|
124
|
-
email?: string;
|
|
125
|
-
type?: 'HOME' | 'WORK' | string;
|
|
126
|
-
};
|
|
127
|
-
type NameObject = {
|
|
128
|
-
formatted_name: string;
|
|
129
|
-
first_name?: string;
|
|
130
|
-
last_name?: string;
|
|
131
|
-
middle_name?: string;
|
|
132
|
-
suffix?: string;
|
|
133
|
-
prefix?: string;
|
|
134
|
-
};
|
|
135
|
-
type OrgObject = {
|
|
136
|
-
company?: string;
|
|
137
|
-
department?: string;
|
|
138
|
-
title?: string;
|
|
139
|
-
};
|
|
140
|
-
type PhoneObject = {
|
|
141
|
-
phone?: 'PHONE_NUMBER';
|
|
142
|
-
type?: 'CELL' | 'MAIN' | 'IPHONE' | 'HOME' | 'WORK' | string;
|
|
143
|
-
wa_id?: string;
|
|
144
|
-
};
|
|
145
|
-
type URLObject = {
|
|
146
|
-
url?: string;
|
|
147
|
-
type?: 'HOME' | 'WORK' | string;
|
|
148
|
-
};
|
|
149
|
-
type ContactObject = {
|
|
150
|
-
addresses?: AddressesObject[];
|
|
151
|
-
birthday?: `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
|
|
152
|
-
emails?: EmailObject[];
|
|
153
|
-
name: NameObject;
|
|
154
|
-
org?: OrgObject;
|
|
155
|
-
phones?: PhoneObject[];
|
|
156
|
-
urls?: URLObject[];
|
|
157
|
-
};
|
|
158
|
-
//#endregion
|
|
159
|
-
//#region src/api/messages/types/location.d.ts
|
|
160
|
-
type LocationObject = {
|
|
161
|
-
longitude: number;
|
|
162
|
-
latitude: number;
|
|
163
|
-
name?: string;
|
|
164
|
-
address?: string;
|
|
165
|
-
};
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region src/api/messages/types/interactive.d.ts
|
|
168
|
-
type DocumentMediaObject = {
|
|
169
|
-
id?: string;
|
|
170
|
-
link?: string;
|
|
171
|
-
caption?: string;
|
|
172
|
-
filename?: string;
|
|
173
|
-
};
|
|
174
|
-
type ImageMediaObject = {
|
|
175
|
-
id?: string;
|
|
176
|
-
link?: string;
|
|
177
|
-
caption?: string;
|
|
178
|
-
};
|
|
179
|
-
type VideoMediaObject = {
|
|
180
|
-
id?: string;
|
|
181
|
-
link?: string;
|
|
182
|
-
caption?: string;
|
|
183
|
-
};
|
|
184
|
-
type ProductObject = {
|
|
185
|
-
product_retailer_id: string;
|
|
186
|
-
};
|
|
187
|
-
type SimpleTextObject = {
|
|
188
|
-
text: string;
|
|
189
|
-
};
|
|
190
|
-
type RowObject = {
|
|
191
|
-
id: string;
|
|
192
|
-
title: string;
|
|
193
|
-
description?: string;
|
|
194
|
-
};
|
|
195
|
-
type MultiProductSectionObject = {
|
|
196
|
-
product_items: ProductObject[];
|
|
197
|
-
rows?: never;
|
|
198
|
-
title?: string;
|
|
199
|
-
};
|
|
200
|
-
type ListSectionObject = {
|
|
201
|
-
product_items?: never;
|
|
202
|
-
rows: RowObject[];
|
|
203
|
-
title?: string;
|
|
204
|
-
};
|
|
205
|
-
type SectionObject = MultiProductSectionObject | ListSectionObject;
|
|
206
|
-
type ButtonObject = {
|
|
207
|
-
title: string;
|
|
208
|
-
id: string;
|
|
209
|
-
};
|
|
210
|
-
type ReplyButtonObject = {
|
|
211
|
-
type: 'reply';
|
|
212
|
-
reply: ButtonObject;
|
|
213
|
-
};
|
|
214
|
-
type ActionObject = {
|
|
215
|
-
buttons?: ReplyButtonObject[];
|
|
216
|
-
catalog_id?: string;
|
|
217
|
-
product_retailer_id?: string;
|
|
218
|
-
sections?: SectionObject[];
|
|
219
|
-
};
|
|
220
|
-
type HeaderObject = {
|
|
221
|
-
type: 'document' | 'image' | 'text' | 'video';
|
|
222
|
-
document?: DocumentMediaObject;
|
|
223
|
-
image?: ImageMediaObject;
|
|
224
|
-
text?: string;
|
|
225
|
-
video?: VideoMediaObject;
|
|
226
|
-
};
|
|
227
|
-
type ButtonInteractiveObject = {
|
|
228
|
-
type: InteractiveTypesEnum.Button;
|
|
229
|
-
body: SimpleTextObject;
|
|
230
|
-
footer?: SimpleTextObject;
|
|
231
|
-
header?: HeaderObject;
|
|
232
|
-
action: ActionObject;
|
|
233
|
-
};
|
|
234
|
-
type ListInteractiveObject = {
|
|
235
|
-
type: InteractiveTypesEnum.List;
|
|
236
|
-
body: SimpleTextObject;
|
|
237
|
-
footer?: SimpleTextObject;
|
|
238
|
-
header?: HeaderObject;
|
|
239
|
-
action: ActionObject;
|
|
240
|
-
};
|
|
241
|
-
type ProductInteractiveObject = {
|
|
242
|
-
type: InteractiveTypesEnum.Product;
|
|
243
|
-
body?: SimpleTextObject;
|
|
244
|
-
footer?: SimpleTextObject;
|
|
245
|
-
header?: HeaderObject;
|
|
246
|
-
action: ActionObject;
|
|
247
|
-
};
|
|
248
|
-
type ProductListInteractiveObject = {
|
|
249
|
-
type: InteractiveTypesEnum.ProductList;
|
|
250
|
-
body: SimpleTextObject;
|
|
251
|
-
footer?: SimpleTextObject;
|
|
252
|
-
header: HeaderObject;
|
|
253
|
-
action: ActionObject;
|
|
254
|
-
};
|
|
255
|
-
type CtaUrlParameters = {
|
|
256
|
-
display_text: string;
|
|
257
|
-
url: string;
|
|
258
|
-
};
|
|
259
|
-
type CtaUrlActionObject = {
|
|
260
|
-
name: 'cta_url';
|
|
261
|
-
parameters: CtaUrlParameters;
|
|
262
|
-
};
|
|
263
|
-
type CtaUrlInteractiveObject = {
|
|
264
|
-
type: InteractiveTypesEnum.CtaUrl;
|
|
265
|
-
body?: SimpleTextObject;
|
|
266
|
-
footer?: SimpleTextObject;
|
|
267
|
-
header?: HeaderObject;
|
|
268
|
-
action: CtaUrlActionObject;
|
|
269
|
-
};
|
|
270
|
-
type LocationRequestActionObject = {
|
|
271
|
-
name: 'send_location';
|
|
272
|
-
};
|
|
273
|
-
type LocationRequestInteractiveObject = {
|
|
274
|
-
type: InteractiveTypesEnum.LocationRequest;
|
|
275
|
-
body: SimpleTextObject;
|
|
276
|
-
footer?: SimpleTextObject;
|
|
277
|
-
header?: HeaderObject;
|
|
278
|
-
action: LocationRequestActionObject;
|
|
279
|
-
};
|
|
280
|
-
type AddressValues = {
|
|
281
|
-
name?: string;
|
|
282
|
-
phone_number?: string;
|
|
283
|
-
in_pin_code?: string;
|
|
284
|
-
house_number?: string;
|
|
285
|
-
floor_number?: string;
|
|
286
|
-
tower_number?: string;
|
|
287
|
-
building_name?: string;
|
|
288
|
-
address?: string;
|
|
289
|
-
landmark_area?: string;
|
|
290
|
-
city?: string;
|
|
291
|
-
state?: string;
|
|
292
|
-
};
|
|
293
|
-
type SavedAddress = {
|
|
294
|
-
id: string;
|
|
295
|
-
value: AddressValues;
|
|
296
|
-
};
|
|
297
|
-
type ValidationErrors = { [key in keyof AddressValues]?: string };
|
|
298
|
-
type AddressMessageParameters = {
|
|
299
|
-
country: string;
|
|
300
|
-
values?: AddressValues;
|
|
301
|
-
saved_addresses?: SavedAddress[];
|
|
302
|
-
validation_errors?: ValidationErrors;
|
|
303
|
-
};
|
|
304
|
-
type AddressMessageActionObject = {
|
|
305
|
-
name: 'address_message';
|
|
306
|
-
parameters: AddressMessageParameters;
|
|
307
|
-
};
|
|
308
|
-
type AddressMessageInteractiveObject = {
|
|
309
|
-
type: InteractiveTypesEnum.AddressMessage;
|
|
310
|
-
body: SimpleTextObject;
|
|
311
|
-
footer?: SimpleTextObject;
|
|
312
|
-
header?: HeaderObject;
|
|
313
|
-
action: AddressMessageActionObject;
|
|
314
|
-
};
|
|
315
|
-
type FlowParameters = {
|
|
316
|
-
flow_message_version: string;
|
|
317
|
-
flow_id?: string;
|
|
318
|
-
flow_name?: string;
|
|
319
|
-
flow_cta: string;
|
|
320
|
-
mode?: 'draft' | 'published';
|
|
321
|
-
flow_token: string;
|
|
322
|
-
flow_action: 'navigate' | 'data_exchange';
|
|
323
|
-
flow_action_payload?: {
|
|
324
|
-
screen?: string;
|
|
325
|
-
data?: Record<string, string>;
|
|
326
|
-
};
|
|
327
|
-
};
|
|
328
|
-
type FlowActionObject = {
|
|
329
|
-
name: 'flow';
|
|
330
|
-
parameters: FlowParameters;
|
|
331
|
-
};
|
|
332
|
-
type FlowInteractiveObject = {
|
|
333
|
-
type: InteractiveTypesEnum.Flow;
|
|
334
|
-
body: SimpleTextObject;
|
|
335
|
-
footer?: SimpleTextObject;
|
|
336
|
-
header?: HeaderObject;
|
|
337
|
-
action: FlowActionObject;
|
|
338
|
-
};
|
|
339
|
-
type InteractiveObject = ButtonInteractiveObject | ListInteractiveObject | ProductInteractiveObject | ProductListInteractiveObject | CtaUrlInteractiveObject | LocationRequestInteractiveObject | AddressMessageInteractiveObject | FlowInteractiveObject;
|
|
340
|
-
//#endregion
|
|
341
|
-
//#region src/api/messages/types/reaction.d.ts
|
|
342
|
-
interface ReactionParams {
|
|
343
|
-
messageId: string;
|
|
344
|
-
emoji: string;
|
|
345
|
-
to: string;
|
|
346
|
-
}
|
|
347
|
-
//#endregion
|
|
348
|
-
//#region src/api/messages/types/common.d.ts
|
|
349
|
-
type GeneralMessageBody = GeneralRequestBody & {
|
|
350
|
-
/**
|
|
351
|
-
* The Meta messaging product name.
|
|
352
|
-
* @default 'whatsapp'
|
|
353
|
-
*/
|
|
354
|
-
messaging_product: 'whatsapp';
|
|
355
|
-
};
|
|
356
|
-
type ConTextObject = {
|
|
357
|
-
message_id: string;
|
|
358
|
-
};
|
|
359
|
-
type MessageRequestBody<T extends MessageTypesEnum> = GeneralMessageBody & {
|
|
360
|
-
recipient_type?: string;
|
|
361
|
-
to: string;
|
|
362
|
-
context?: ConTextObject;
|
|
363
|
-
type?: T;
|
|
364
|
-
};
|
|
365
|
-
interface MessageRequestParams<T> {
|
|
366
|
-
body: T;
|
|
367
|
-
to: string;
|
|
368
|
-
replyMessageId?: string;
|
|
369
|
-
}
|
|
370
|
-
interface StatusParams {
|
|
371
|
-
status: string;
|
|
372
|
-
messageId: string;
|
|
373
|
-
typingIndicator?: {
|
|
374
|
-
type: string;
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
type MessagesResponse = GeneralMessageBody & {
|
|
378
|
-
contacts: [{
|
|
379
|
-
input: string;
|
|
380
|
-
wa_id: string;
|
|
381
|
-
}];
|
|
382
|
-
messages: [{
|
|
383
|
-
id: string;
|
|
384
|
-
}];
|
|
385
|
-
};
|
|
386
|
-
declare class MessagesClass extends BaseClass {
|
|
387
|
-
text(params: TextMessageParams): Promise<MessagesResponse>;
|
|
388
|
-
template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<MessagesResponse>;
|
|
389
|
-
audio(params: MessageRequestParams<AudioMediaObject>): Promise<MessagesResponse>;
|
|
390
|
-
document(params: MessageRequestParams<DocumentMediaObject$1>): Promise<MessagesResponse>;
|
|
391
|
-
image(params: MessageRequestParams<ImageMediaObject$1>): Promise<MessagesResponse>;
|
|
392
|
-
video(params: MessageRequestParams<VideoMediaObject$1>): Promise<MessagesResponse>;
|
|
393
|
-
sticker(params: MessageRequestParams<StickerMediaObject>): Promise<MessagesResponse>;
|
|
394
|
-
contacts(params: MessageRequestParams<[ContactObject]>): Promise<MessagesResponse>;
|
|
395
|
-
location(params: MessageRequestParams<LocationObject>): Promise<MessagesResponse>;
|
|
396
|
-
interactive(params: MessageRequestParams<InteractiveObject>): Promise<MessagesResponse>;
|
|
397
|
-
interactiveList(params: MessageRequestParams<InteractiveObject & {
|
|
398
|
-
type: InteractiveTypesEnum.List;
|
|
399
|
-
}>): Promise<MessagesResponse>;
|
|
400
|
-
interactiveCtaUrl(params: MessageRequestParams<InteractiveObject & {
|
|
401
|
-
type: InteractiveTypesEnum.CtaUrl;
|
|
402
|
-
}>): Promise<MessagesResponse>;
|
|
403
|
-
interactiveLocationRequest(params: MessageRequestParams<InteractiveObject & {
|
|
404
|
-
type: InteractiveTypesEnum.LocationRequest;
|
|
405
|
-
}>): Promise<MessagesResponse>;
|
|
406
|
-
interactiveAddressMessage(params: MessageRequestParams<InteractiveObject & {
|
|
407
|
-
type: InteractiveTypesEnum.AddressMessage;
|
|
408
|
-
}>): Promise<MessagesResponse>;
|
|
409
|
-
interactiveReplyButtons(params: MessageRequestParams<InteractiveObject & {
|
|
410
|
-
type: InteractiveTypesEnum.Button;
|
|
411
|
-
}>): Promise<MessagesResponse>;
|
|
412
|
-
interactiveFlow(params: MessageRequestParams<InteractiveObject & {
|
|
413
|
-
type: InteractiveTypesEnum.Flow;
|
|
414
|
-
}>): Promise<MessagesResponse>;
|
|
415
|
-
reaction(params: ReactionParams): Promise<MessagesResponse>;
|
|
416
|
-
markAsRead(params: {
|
|
417
|
-
messageId: string;
|
|
418
|
-
}): Promise<MessagesResponse>;
|
|
419
|
-
showTypingIndicator(params: {
|
|
420
|
-
messageId: string;
|
|
421
|
-
}): Promise<MessagesResponse>;
|
|
422
|
-
status(params: StatusParams): Promise<MessagesResponse>;
|
|
423
|
-
}
|
|
424
|
-
//#endregion
|
|
425
|
-
export { AddressesObject, AudioMediaObject, ContactObject, DocumentMediaObject$1 as DocumentMediaObject, GeneralMessageBody, ImageMediaObject$1 as ImageMediaObject, InteractiveObject, LocationObject, MessageRequestBody, MessageRequestParams, MessageTemplateObject, MessagesClass, MessagesResponse, NameObject, ReactionParams, StatusParams, StickerMediaObject, TextMessageParams, TextObject, VideoMediaObject$1 as VideoMediaObject };
|
|
426
|
-
//# sourceMappingURL=common-CVbsmD26.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common-CVbsmD26.d.ts","names":[],"sources":["../src/api/messages/types/text.ts","../src/api/messages/types/template.ts","../src/api/messages/types/media.ts","../src/api/messages/types/contact.ts","../src/api/messages/types/location.ts","../src/api/messages/types/interactive.ts","../src/api/messages/types/reaction.ts","../src/api/messages/types/common.ts"],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,CAAA;UAAuB,CAAA,MAAA,EMuC3B,cNvC2B,CAAA,EM0CkB,ON1ClB,CM0C0B,gBN1C1B,CAAA;YAC3B,CAAA,MAAA,EAAA;IACH,SAAA,EAAA,MAAA;EAAkB,CAAA,CAAA,EMyCkB,ONzClB,CMyC0B,gBNzC1B,CAAA;EAGxB,mBAAA,CAAA,MAAuB,EAAA;IAAA,SAAA,EAAA,MAAA;MMuC4B,ONvCR,CMuCgB,gBNvCI,CAAA;QAArC,CAAA,MAAA,EMwCZ,YNxCY,CAAA,EMwCG,ONxCH,CMwCW,gBNxCX,CAAA"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "../../../base-CfDkvT1x.js";
|
|
2
|
-
import "../../../index-CaGffSja.js";
|
|
3
|
-
import "../../../index-DQkgkiB6.js";
|
|
4
|
-
import "../../../common-CvPVD1o6.js";
|
|
5
|
-
import "../../../index-CoyByMuM.js";
|
|
6
|
-
import "../../../index-a_YS40Iv.js";
|
|
7
|
-
import "../../../common-CVbsmD26.js";
|
|
8
|
-
import "../../../index-d7TLqtYh.js";
|
|
9
|
-
import "../../../index-_-06JPan.js";
|
|
10
|
-
import "../../../index-3KglHVAg.js";
|
|
11
|
-
import "../../../index-BNeg6hHx.js";
|
|
12
|
-
import "../../../index-BmfnREgM.js";
|
|
13
|
-
import "../../../index-CwujtcvH.js";
|
|
14
|
-
import "../../../index-BiTq23oi.js";
|
|
15
|
-
import "../../../index-CeTmbIXi.js";
|
|
16
|
-
import "../../../index-LKrIp3Oo.js";
|
|
17
|
-
import "../../../index-DQ7z58xp.js";
|
|
18
|
-
import "../../../WebhookProcessor-Dq2Pa2cY.js";
|
|
19
|
-
import { ExpressRequest, ExpressResponse, ExpressWebhookConfig, NextFunction, webhookHandler } from "../../../express-B6fQdflY.js";
|
|
20
|
-
export { ExpressRequest, ExpressResponse, ExpressWebhookConfig, NextFunction, webhookHandler };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../../enums-CSUpFXb8.js";import"../../../version-BUuqrHc6.js";import"../../../whatsapp-B85mxH5f.js";import"../../../base-D-cXu_lA.js";import"../../../encryption-Cwc0xcVL.js";import"../../../flow-CVes0Qus.js";import"../../../common-C6FXBDm7.js";import"../../../media-Dw5OGzDD.js";import"../../../messages-h5-NW8QO.js";import"../../../objectToQueryString-CAHI0qTs.js";import"../../../phone-CZyWLyWB.js";import"../../../buildFieldsQueryString-Cr-jz3p0.js";import"../../../profile-Bb7GDP0n.js";import"../../../qrCode-CeZEtX9J.js";import"../../../registration-BkjhC3xw.js";import"../../../template-Bgy-BCXJ.js";import"../../../twoStepVerification-DYlYF_P5.js";import"../../../waba-SF2W3z2U.js";import"../../../api-8hRAOyaL.js";import"../../../flowTypeGuards-Gn3-slCW.js";import"../../../WebhookProcessor-BUZFeZD_.js";import"../../../handler-BGqjZ0xg.js";import{webhookHandler as e}from"../../../express-CrfNLYMM.js";export{e as webhookHandler};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { WhatsAppConfig } from "../../../base-CfDkvT1x.js";
|
|
2
|
-
import "../../../index-CaGffSja.js";
|
|
3
|
-
import "../../../index-DQkgkiB6.js";
|
|
4
|
-
import "../../../common-CvPVD1o6.js";
|
|
5
|
-
import "../../../index-CoyByMuM.js";
|
|
6
|
-
import "../../../index-a_YS40Iv.js";
|
|
7
|
-
import "../../../common-CVbsmD26.js";
|
|
8
|
-
import "../../../index-d7TLqtYh.js";
|
|
9
|
-
import "../../../index-_-06JPan.js";
|
|
10
|
-
import "../../../index-3KglHVAg.js";
|
|
11
|
-
import "../../../index-BNeg6hHx.js";
|
|
12
|
-
import "../../../index-BmfnREgM.js";
|
|
13
|
-
import "../../../index-CwujtcvH.js";
|
|
14
|
-
import "../../../index-BiTq23oi.js";
|
|
15
|
-
import "../../../index-CeTmbIXi.js";
|
|
16
|
-
import "../../../index-LKrIp3Oo.js";
|
|
17
|
-
import "../../../index-DQ7z58xp.js";
|
|
18
|
-
import { WebhookProcessor } from "../../../WebhookProcessor-Dq2Pa2cY.js";
|
|
19
|
-
|
|
20
|
-
//#region src/core/webhook/frameworks/nextjs-app.d.ts
|
|
21
|
-
interface NextRequest extends Request {
|
|
22
|
-
nextUrl: {
|
|
23
|
-
searchParams: URLSearchParams;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
interface NextResponse {
|
|
27
|
-
json(data: any): NextResponse;
|
|
28
|
-
}
|
|
29
|
-
interface NextJsAppWebhookConfig extends WhatsAppConfig {}
|
|
30
|
-
declare function webhookHandler(config: NextJsAppWebhookConfig): {
|
|
31
|
-
GET: (request: NextRequest) => Promise<Response>;
|
|
32
|
-
POST: (request: NextRequest) => Promise<Response>;
|
|
33
|
-
webhook: {
|
|
34
|
-
GET: (request: NextRequest) => Promise<Response>;
|
|
35
|
-
POST: (request: NextRequest) => Promise<Response>;
|
|
36
|
-
};
|
|
37
|
-
flow: {
|
|
38
|
-
GET: (request: NextRequest) => Promise<Response>;
|
|
39
|
-
POST: (request: NextRequest) => Promise<Response>;
|
|
40
|
-
};
|
|
41
|
-
processor: WebhookProcessor;
|
|
42
|
-
};
|
|
43
|
-
//#endregion
|
|
44
|
-
export { NextJsAppWebhookConfig, NextRequest, NextResponse, webhookHandler };
|
|
45
|
-
//# sourceMappingURL=nextjs-app.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-app.d.ts","names":[],"sources":["../../../../src/core/webhook/frameworks/nextjs-app.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;UAIiB,WAAA,SAAoB;;kBAEf;;;UAIL,YAAA;mBACI;;UAGJ,sBAAA,SAA+B;iBAIhC,cAAA,SAAuB;iBAKV,gBAAW,QAAA;kBAoBV,gBAAW,QAAA;;mBAiBR,gBAAW,QAAA;oBAkBV,gBAAW,QAAA;;;IA1E5B,GAAA,EAAA,CAAA,OAAY,EA0FI,WA1FJ,EAAA,GA0Fe,OA1Ff,CA0Fe,QA1Ff,CAAA;IAAA,IAAA,EAAA,CAAA,OAAA,EAwGK,WAxGL,EAAA,GAwGgB,OAxGhB,CAwGgB,QAxGhB,CAAA;;WAAQ,kBAAA;CAAO"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../../../enums-CSUpFXb8.js";import"../../../version-BUuqrHc6.js";import"../../../whatsapp-B85mxH5f.js";import"../../../base-D-cXu_lA.js";import"../../../encryption-Cwc0xcVL.js";import"../../../flow-CVes0Qus.js";import"../../../common-C6FXBDm7.js";import"../../../media-Dw5OGzDD.js";import"../../../messages-h5-NW8QO.js";import"../../../objectToQueryString-CAHI0qTs.js";import"../../../phone-CZyWLyWB.js";import"../../../buildFieldsQueryString-Cr-jz3p0.js";import"../../../profile-Bb7GDP0n.js";import"../../../qrCode-CeZEtX9J.js";import"../../../registration-BkjhC3xw.js";import"../../../template-Bgy-BCXJ.js";import"../../../twoStepVerification-DYlYF_P5.js";import"../../../waba-SF2W3z2U.js";import"../../../api-8hRAOyaL.js";import"../../../flowTypeGuards-Gn3-slCW.js";import{WebhookProcessor as e}from"../../../WebhookProcessor-BUZFeZD_.js";function t(t){let n=new e(t);return{GET:async e=>{try{let{searchParams:t}=new URL(e.url),r=t.get(`hub.mode`),i=t.get(`hub.verify_token`),a=t.get(`hub.challenge`),o=await n.processVerification(r,i,a);return new Response(o.body,{status:o.status,headers:o.headers})}catch(e){return console.error(`Webhook verification error:`,e),new Response(`Internal Server Error`,{status:500})}},POST:async e=>{try{let t=await n.processWebhook(e);return new Response(t.body,{status:t.status,headers:t.headers})}catch(e){return console.error(`Webhook processing error:`,e),new Response(`Internal Server Error`,{status:500})}},webhook:{GET:async e=>{try{let{searchParams:t}=new URL(e.url),r=t.get(`hub.mode`),i=t.get(`hub.verify_token`),a=t.get(`hub.challenge`),o=await n.processVerification(r,i,a);return new Response(o.body,{status:o.status,headers:o.headers})}catch(e){return console.error(`Webhook verification error:`,e),new Response(`Internal Server Error`,{status:500})}},POST:async e=>{try{let t=await n.processWebhook(e);return new Response(t.body,{status:t.status,headers:t.headers})}catch(e){return console.error(`Webhook processing error:`,e),new Response(`Internal Server Error`,{status:500})}}},flow:{GET:async e=>{try{let t=await n.processFlow(e);return Response.json(t.body,{status:t.status,headers:t.headers})}catch(e){return console.error(`Flow GET error:`,e),new Response(`Internal Server Error`,{status:500})}},POST:async e=>{try{let t=await n.processFlow(e);return Response.json(t.body,{status:t.status,headers:t.headers})}catch(e){return console.error(`Flow POST error:`,e),new Response(`Internal Server Error`,{status:500})}}},processor:n}}export{t as webhookHandler};
|
|
2
|
-
//# sourceMappingURL=nextjs-app.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nextjs-app.js","names":[],"sources":["../../../../src/core/webhook/frameworks/nextjs-app.ts"],"sourcesContent":["import { WhatsAppConfig } from '../../../types/config';\nimport { WebhookProcessor } from '../WebhookProcessor';\n\n// Define Next.js types locally to avoid requiring Next.js as a dependency\nexport interface NextRequest extends Request {\n nextUrl: {\n searchParams: URLSearchParams;\n };\n}\n\nexport interface NextResponse {\n json(data: any): NextResponse;\n}\n\nexport interface NextJsAppWebhookConfig extends WhatsAppConfig {\n // App Router specific config (currently none, but interface reserved for future use)\n}\n\nexport function webhookHandler(config: NextJsAppWebhookConfig) {\n const processor = new WebhookProcessor(config);\n\n return {\n // Clean GET/POST handlers following whatsapp-api-js methodology\n GET: async (request: NextRequest) => {\n try {\n const { searchParams } = new URL(request.url);\n const mode = searchParams.get('hub.mode');\n const token = searchParams.get('hub.verify_token');\n const challenge = searchParams.get('hub.challenge');\n\n const result = await processor.processVerification(mode, token, challenge);\n\n // Return plain text response for webhook verification\n return new Response(result.body, {\n status: result.status,\n headers: result.headers,\n });\n } catch (error) {\n console.error('Webhook verification error:', error);\n return new Response('Internal Server Error', { status: 500 });\n }\n },\n\n POST: async (request: NextRequest) => {\n try {\n const result = await processor.processWebhook(request);\n\n // Return JSON response for webhook processing\n return new Response(result.body, {\n status: result.status,\n headers: result.headers,\n });\n } catch (error) {\n console.error('Webhook processing error:', error);\n return new Response('Internal Server Error', { status: 500 });\n }\n },\n\n // Legacy webhook object for backward compatibility\n webhook: {\n GET: async (request: NextRequest) => {\n try {\n const { searchParams } = new URL(request.url);\n const mode = searchParams.get('hub.mode');\n const token = searchParams.get('hub.verify_token');\n const challenge = searchParams.get('hub.challenge');\n\n const result = await processor.processVerification(mode, token, challenge);\n return new Response(result.body, {\n status: result.status,\n headers: result.headers,\n });\n } catch (error) {\n console.error('Webhook verification error:', error);\n return new Response('Internal Server Error', { status: 500 });\n }\n },\n\n POST: async (request: NextRequest) => {\n try {\n const result = await processor.processWebhook(request);\n return new Response(result.body, {\n status: result.status,\n headers: result.headers,\n });\n } catch (error) {\n console.error('Webhook processing error:', error);\n return new Response('Internal Server Error', { status: 500 });\n }\n },\n },\n\n // Flow handler for App Router\n flow: {\n GET: async (request: NextRequest) => {\n try {\n const result = await processor.processFlow(request);\n\n return Response.json(result.body, {\n status: result.status,\n headers: result.headers,\n });\n } catch (error) {\n console.error('Flow GET error:', error);\n return new Response('Internal Server Error', { status: 500 });\n }\n },\n\n POST: async (request: NextRequest) => {\n try {\n const result = await processor.processFlow(request);\n\n return Response.json(result.body, {\n status: result.status,\n headers: result.headers,\n });\n } catch (error) {\n console.error('Flow POST error:', error);\n return new Response('Internal Server Error', { status: 500 });\n }\n },\n },\n\n // Expose processor for handler registration\n processor,\n };\n}\n"],"mappings":"i1BAkBA,SAAgB,EAAe,EAAgC,CAC3D,IAAM,EAAY,IAAI,EAAiB,EAAO,CAE9C,MAAO,CAEH,IAAK,KAAO,IAAyB,CACjC,GAAI,CACA,GAAM,CAAE,gBAAiB,IAAI,IAAI,EAAQ,IAAI,CACvC,EAAO,EAAa,IAAI,WAAW,CACnC,EAAQ,EAAa,IAAI,mBAAmB,CAC5C,EAAY,EAAa,IAAI,gBAAgB,CAE7C,EAAS,MAAM,EAAU,oBAAoB,EAAM,EAAO,EAAU,CAG1E,OAAO,IAAI,SAAS,EAAO,KAAM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AEnD,OAAO,SAAS,KAAK,EAAO,KAAM,CAC9B,OAAQ,EAAO,OACf,QAAS,EAAO,QACnB,CAAC,OACG,EAAO,CAEZ,OADA,QAAQ,MAAM,kBAAmB,EAAM,CAChC,IAAI,SAAS,wBAAyB,CAAE,OAAQ,IAAK,CAAC,GAIrE,KAAM,KAAO,IAAyB,CAClC,GAAI,CACA,IAAM,EAAS,MAAM,EAAU,YAAY,EAAQ,CAEnD,OAAO,SAAS,KAAK,EAAO,KAAM,CAC9B,OAAQ,EAAO,OACf,QAAS,EAAO,QACnB,CAAC,OACG,EAAO,CAEZ,OADA,QAAQ,MAAM,mBAAoB,EAAM,CACjC,IAAI,SAAS,wBAAyB,CAAE,OAAQ,IAAK,CAAC,GAGxE,CAGD,YACH"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "../../../base-CfDkvT1x.js";
|
|
2
|
-
import "../../../index-CaGffSja.js";
|
|
3
|
-
import "../../../index-DQkgkiB6.js";
|
|
4
|
-
import "../../../common-CvPVD1o6.js";
|
|
5
|
-
import "../../../index-CoyByMuM.js";
|
|
6
|
-
import "../../../index-a_YS40Iv.js";
|
|
7
|
-
import "../../../common-CVbsmD26.js";
|
|
8
|
-
import "../../../index-d7TLqtYh.js";
|
|
9
|
-
import "../../../index-_-06JPan.js";
|
|
10
|
-
import "../../../index-3KglHVAg.js";
|
|
11
|
-
import "../../../index-BNeg6hHx.js";
|
|
12
|
-
import "../../../index-BmfnREgM.js";
|
|
13
|
-
import "../../../index-CwujtcvH.js";
|
|
14
|
-
import "../../../index-BiTq23oi.js";
|
|
15
|
-
import "../../../index-CeTmbIXi.js";
|
|
16
|
-
import "../../../index-LKrIp3Oo.js";
|
|
17
|
-
import "../../../index-DQ7z58xp.js";
|
|
18
|
-
import "../../../WebhookProcessor-Dq2Pa2cY.js";
|
|
19
|
-
import { BaseApiRequest, BaseApiResponse, NextJsWebhookConfig, webhookHandler$1 as webhookHandler } from "../../../express-B6fQdflY.js";
|
|
20
|
-
export { BaseApiRequest, BaseApiResponse, NextJsWebhookConfig, webhookHandler };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../../enums-CSUpFXb8.js";import"../../../version-BUuqrHc6.js";import"../../../whatsapp-B85mxH5f.js";import"../../../base-D-cXu_lA.js";import"../../../encryption-Cwc0xcVL.js";import"../../../flow-CVes0Qus.js";import"../../../common-C6FXBDm7.js";import"../../../media-Dw5OGzDD.js";import"../../../messages-h5-NW8QO.js";import"../../../objectToQueryString-CAHI0qTs.js";import"../../../phone-CZyWLyWB.js";import"../../../buildFieldsQueryString-Cr-jz3p0.js";import"../../../profile-Bb7GDP0n.js";import"../../../qrCode-CeZEtX9J.js";import"../../../registration-BkjhC3xw.js";import"../../../template-Bgy-BCXJ.js";import"../../../twoStepVerification-DYlYF_P5.js";import"../../../waba-SF2W3z2U.js";import"../../../api-8hRAOyaL.js";import"../../../flowTypeGuards-Gn3-slCW.js";import"../../../WebhookProcessor-BUZFeZD_.js";import"../../../handler-BGqjZ0xg.js";import{webhookHandler as e}from"../../../nextjs-DxRCL4t3.js";export{e as webhookHandler};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import "../../base-CfDkvT1x.js";
|
|
2
|
-
import "../../index-CaGffSja.js";
|
|
3
|
-
import "../../index-DQkgkiB6.js";
|
|
4
|
-
import "../../common-CvPVD1o6.js";
|
|
5
|
-
import "../../index-CoyByMuM.js";
|
|
6
|
-
import "../../index-a_YS40Iv.js";
|
|
7
|
-
import "../../common-CVbsmD26.js";
|
|
8
|
-
import "../../index-d7TLqtYh.js";
|
|
9
|
-
import "../../index-_-06JPan.js";
|
|
10
|
-
import "../../index-3KglHVAg.js";
|
|
11
|
-
import "../../index-BNeg6hHx.js";
|
|
12
|
-
import "../../index-BmfnREgM.js";
|
|
13
|
-
import "../../index-CwujtcvH.js";
|
|
14
|
-
import "../../index-BiTq23oi.js";
|
|
15
|
-
import "../../index-CeTmbIXi.js";
|
|
16
|
-
import "../../index-LKrIp3Oo.js";
|
|
17
|
-
import "../../index-DQ7z58xp.js";
|
|
18
|
-
import { FlowHandler, MessageHandler, MessageStatus, WebhookContact, WebhookEvent, WebhookMessage, WebhookProcessor, WebhookResponse, constructFullUrl, processFlowRequest, processWebhookMessages } from "../../WebhookProcessor-Dq2Pa2cY.js";
|
|
19
|
-
import { ExpressRequest, ExpressResponse, ExpressWebhookConfig, NextFunction, NextJsWebhookConfig, generateXHub256Sig, webhookHandler, webhookHandler$1 } from "../../express-B6fQdflY.js";
|
|
20
|
-
export { ExpressRequest, ExpressResponse, webhookHandler as ExpressWebhook, ExpressWebhookConfig, FlowHandler, MessageHandler, MessageStatus, NextFunction, webhookHandler$1 as NextJsWebhook, NextJsWebhookConfig, WebhookContact, WebhookEvent, WebhookMessage, WebhookProcessor, WebhookResponse, constructFullUrl, generateXHub256Sig, processFlowRequest, processWebhookMessages };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../version-BUuqrHc6.js";import"../../whatsapp-B85mxH5f.js";import"../../base-D-cXu_lA.js";import"../../encryption-Cwc0xcVL.js";import"../../flow-CVes0Qus.js";import"../../common-C6FXBDm7.js";import"../../media-Dw5OGzDD.js";import"../../messages-h5-NW8QO.js";import"../../objectToQueryString-CAHI0qTs.js";import"../../phone-CZyWLyWB.js";import"../../buildFieldsQueryString-Cr-jz3p0.js";import"../../profile-Bb7GDP0n.js";import"../../qrCode-CeZEtX9J.js";import"../../registration-BkjhC3xw.js";import"../../template-Bgy-BCXJ.js";import"../../twoStepVerification-DYlYF_P5.js";import"../../waba-SF2W3z2U.js";import"../../api-8hRAOyaL.js";import"../../flowTypeGuards-Gn3-slCW.js";import{WebhookProcessor as e,constructFullUrl as t,processFlowRequest as n,processWebhookMessages as r}from"../../WebhookProcessor-BUZFeZD_.js";import"../../handler-BGqjZ0xg.js";import{webhookHandler as i}from"../../express-CrfNLYMM.js";import{webhookHandler as a}from"../../nextjs-DxRCL4t3.js";import{generateXHub256Sig as o}from"../../webhook-D4DQ01Xq.js";export{i as ExpressWebhook,a as NextJsWebhook,e as WebhookProcessor,t as constructFullUrl,o as generateXHub256Sig,n as processFlowRequest,r as processWebhookMessages};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import "../../base-CfDkvT1x.js";
|
|
2
|
-
import "../../index-CaGffSja.js";
|
|
3
|
-
import "../../index-DQkgkiB6.js";
|
|
4
|
-
import "../../common-CvPVD1o6.js";
|
|
5
|
-
import "../../index-CoyByMuM.js";
|
|
6
|
-
import "../../index-a_YS40Iv.js";
|
|
7
|
-
import "../../common-CVbsmD26.js";
|
|
8
|
-
import "../../index-d7TLqtYh.js";
|
|
9
|
-
import "../../index-_-06JPan.js";
|
|
10
|
-
import "../../index-3KglHVAg.js";
|
|
11
|
-
import "../../index-BNeg6hHx.js";
|
|
12
|
-
import "../../index-BmfnREgM.js";
|
|
13
|
-
import "../../index-CwujtcvH.js";
|
|
14
|
-
import "../../index-BiTq23oi.js";
|
|
15
|
-
import "../../index-CeTmbIXi.js";
|
|
16
|
-
import "../../index-LKrIp3Oo.js";
|
|
17
|
-
import { WhatsApp, WhatsAppClass } from "../../index-DQ7z58xp.js";
|
|
18
|
-
export { WhatsApp, WhatsAppClass };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../../enums-CSUpFXb8.js";import"../../version-BUuqrHc6.js";import{WhatsApp as e}from"../../whatsapp-B85mxH5f.js";import"../../base-D-cXu_lA.js";import"../../encryption-Cwc0xcVL.js";import"../../flow-CVes0Qus.js";import"../../common-C6FXBDm7.js";import"../../media-Dw5OGzDD.js";import"../../messages-h5-NW8QO.js";import"../../objectToQueryString-CAHI0qTs.js";import"../../phone-CZyWLyWB.js";import"../../buildFieldsQueryString-Cr-jz3p0.js";import"../../profile-Bb7GDP0n.js";import"../../qrCode-CeZEtX9J.js";import"../../registration-BkjhC3xw.js";import"../../template-Bgy-BCXJ.js";import"../../twoStepVerification-DYlYF_P5.js";import"../../waba-SF2W3z2U.js";import"../../api-8hRAOyaL.js";export{e as WhatsApp};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{HttpMethodsEnum as e,WabaConfigEnum as t}from"./enums-CSUpFXb8.js";import{BaseAPI as n}from"./base-D-cXu_lA.js";var r=class extends n{endpoint=`whatsapp_business_encryption`;constructor(e,t){super(e,t)}async getEncryptionPublicKey(){return this.sendJson(e.Get,`${this.config[t.PhoneNumberId]}/${this.endpoint}`,this.config[t.RequestTimeout],null)}async setEncryptionPublicKey(n){let r=new FormData;return r.append(`business_public_key`,n),this.sendJson(e.Post,`${this.config[t.PhoneNumberId]}/${this.endpoint}`,this.config[t.RequestTimeout],r)}},i=r;export{r as EncryptionApi,i as encryption_default};
|
|
2
|
-
//# sourceMappingURL=encryption-Cwc0xcVL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encryption-Cwc0xcVL.js","names":[],"sources":["../src/api/encryption/EncryptionApi.ts","../src/api/encryption/index.ts"],"sourcesContent":["import { BaseAPI } from '../../types/base';\nimport type { WabaConfigType } from '../../types/config';\nimport { HttpMethodsEnum, WabaConfigEnum } from '../../types/enums';\nimport type { RequesterClass, ResponseSuccess } from '../../types/request';\nimport type { EncryptionClass, EncryptionPublicKeyResponse } from './types';\n\nexport default class EncryptionApi extends BaseAPI implements EncryptionClass {\n private readonly endpoint = 'whatsapp_business_encryption';\n\n constructor(config: WabaConfigType, client: RequesterClass) {\n super(config, client);\n }\n\n async getEncryptionPublicKey(): Promise<EncryptionPublicKeyResponse> {\n return this.sendJson(\n HttpMethodsEnum.Get,\n `${this.config[WabaConfigEnum.PhoneNumberId]}/${this.endpoint}`,\n this.config[WabaConfigEnum.RequestTimeout],\n null,\n );\n }\n\n async setEncryptionPublicKey(businessPublicKey: string): Promise<ResponseSuccess> {\n const formData = new FormData();\n formData.append('business_public_key', businessPublicKey);\n\n return this.sendJson(\n HttpMethodsEnum.Post,\n `${this.config[WabaConfigEnum.PhoneNumberId]}/${this.endpoint}`,\n this.config[WabaConfigEnum.RequestTimeout],\n formData,\n );\n }\n}\n","import EncryptionApi from './EncryptionApi';\nexport default EncryptionApi;\nexport { EncryptionApi };\nexport type { EncryptionClass, EncryptionPublicKeyResponse } from './types';\n"],"mappings":"uHAMA,IAAqB,EAArB,cAA2C,CAAmC,CAC1E,SAA4B,+BAE5B,YAAY,EAAwB,EAAwB,CACxD,MAAM,EAAQ,EAAO,CAGzB,MAAM,wBAA+D,CACjE,OAAO,KAAK,SACR,EAAgB,IAChB,GAAG,KAAK,OAAO,EAAe,eAAe,GAAG,KAAK,WACrD,KAAK,OAAO,EAAe,gBAC3B,KACH,CAGL,MAAM,uBAAuB,EAAqD,CAC9E,IAAM,EAAW,IAAI,SAGrB,OAFA,EAAS,OAAO,sBAAuB,EAAkB,CAElD,KAAK,SACR,EAAgB,KAChB,GAAG,KAAK,OAAO,EAAe,eAAe,GAAG,KAAK,WACrD,KAAK,OAAO,EAAe,gBAC3B,EACH,GC9BT,EAAe"}
|