meta-cloud-api 1.1.2 → 1.1.4
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/WebhookProcessor-BUZFeZD_.js +3 -0
- package/dist/WebhookProcessor-BUZFeZD_.js.map +1 -0
- package/dist/WebhookProcessor-Dq2Pa2cY.d.ts +718 -0
- package/dist/WebhookProcessor-Dq2Pa2cY.d.ts.map +1 -0
- package/dist/api/encryption/index.d.ts +3 -10
- package/dist/api/encryption/index.js +1 -2
- package/dist/api/flow/index.d.ts +5 -11
- package/dist/api/flow/index.js +1 -2
- package/dist/api/index.d.ts +17 -18
- package/dist/api/index.js +1 -2
- package/dist/api/media/index.d.ts +3 -10
- package/dist/api/media/index.js +1 -2
- package/dist/api/messages/builders/index.d.ts +442 -439
- package/dist/api/messages/builders/index.d.ts.map +1 -0
- package/dist/api/messages/builders/index.js +1 -3
- package/dist/api/messages/builders/index.js.map +1 -1
- package/dist/api/messages/index.d.ts +4 -10
- package/dist/api/messages/index.js +1 -2
- package/dist/api/phone/index.d.ts +3 -10
- package/dist/api/phone/index.js +1 -2
- package/dist/api/profile/index.d.ts +3 -10
- package/dist/api/profile/index.js +1 -2
- package/dist/api/qrCode/index.d.ts +3 -10
- package/dist/api/qrCode/index.js +1 -2
- package/dist/api/registration/index.d.ts +3 -10
- package/dist/api/registration/index.js +1 -2
- package/dist/api/template/index.d.ts +3 -21
- package/dist/api/template/index.js +1 -2
- package/dist/api/twoStepVerification/index.d.ts +3 -10
- package/dist/api/twoStepVerification/index.js +1 -2
- package/dist/api/waba/index.d.ts +3 -10
- package/dist/api/waba/index.js +1 -2
- package/dist/api-8hRAOyaL.js +1 -0
- package/dist/base-CfDkvT1x.d.ts +807 -0
- package/dist/base-CfDkvT1x.d.ts.map +1 -0
- package/dist/base-D-cXu_lA.js +2 -0
- package/dist/base-D-cXu_lA.js.map +1 -0
- package/dist/buildFieldsQueryString-Cr-jz3p0.js +2 -0
- package/dist/buildFieldsQueryString-Cr-jz3p0.js.map +1 -0
- package/dist/chunk-CTAAG5j7.js +1 -0
- package/dist/common-C6FXBDm7.js +2 -0
- package/dist/common-C6FXBDm7.js.map +1 -0
- package/dist/common-CVbsmD26.d.ts +426 -0
- package/dist/common-CVbsmD26.d.ts.map +1 -0
- package/dist/common-CvPVD1o6.d.ts +406 -0
- package/dist/common-CvPVD1o6.d.ts.map +1 -0
- package/dist/core/webhook/frameworks/express.d.ts +20 -53
- package/dist/core/webhook/frameworks/express.js +1 -2
- package/dist/core/webhook/frameworks/nextjs-app.d.ts +36 -39
- package/dist/core/webhook/frameworks/nextjs-app.d.ts.map +1 -0
- package/dist/core/webhook/frameworks/nextjs-app.js +1 -1
- package/dist/core/webhook/frameworks/nextjs-app.js.map +1 -1
- package/dist/core/webhook/frameworks/nextjs.d.ts +20 -49
- package/dist/core/webhook/frameworks/nextjs.js +1 -2
- package/dist/core/webhook/index.d.ts +20 -29
- package/dist/core/webhook/index.js +1 -2
- package/dist/core/whatsapp/index.d.ts +18 -42
- package/dist/core/whatsapp/index.js +1 -2
- package/dist/encryption-Cwc0xcVL.js +2 -0
- package/dist/encryption-Cwc0xcVL.js.map +1 -0
- package/dist/enums-CSUpFXb8.js +2 -0
- package/dist/enums-CSUpFXb8.js.map +1 -0
- package/dist/express-B6fQdflY.d.ts +78 -0
- package/dist/express-B6fQdflY.d.ts.map +1 -0
- package/dist/express-CrfNLYMM.js +2 -0
- package/dist/express-CrfNLYMM.js.map +1 -0
- package/dist/flow-CVes0Qus.js +2 -0
- package/dist/flow-CVes0Qus.js.map +1 -0
- package/dist/flowTypeGuards-Gn3-slCW.js +2 -0
- package/dist/flowTypeGuards-Gn3-slCW.js.map +1 -0
- package/dist/handler-BGqjZ0xg.js +2 -0
- package/dist/handler-BGqjZ0xg.js.map +1 -0
- package/dist/index-3KglHVAg.d.ts +354 -0
- package/dist/index-3KglHVAg.d.ts.map +1 -0
- package/dist/index-BNeg6hHx.d.ts +99 -0
- package/dist/index-BNeg6hHx.d.ts.map +1 -0
- package/dist/index-BiTq23oi.d.ts +34 -0
- package/dist/index-BiTq23oi.d.ts.map +1 -0
- package/dist/index-BmfnREgM.d.ts +47 -0
- package/dist/index-BmfnREgM.d.ts.map +1 -0
- package/dist/index-CaGffSja.d.ts +24 -0
- package/dist/index-CaGffSja.d.ts.map +1 -0
- package/dist/index-CeTmbIXi.d.ts +180 -0
- package/dist/index-CeTmbIXi.d.ts.map +1 -0
- package/dist/index-CoyByMuM.d.ts +137 -0
- package/dist/index-CoyByMuM.d.ts.map +1 -0
- package/dist/index-CwujtcvH.d.ts +370 -0
- package/dist/index-CwujtcvH.d.ts.map +1 -0
- package/dist/index-DQ7z58xp.d.ts +104 -0
- package/dist/index-DQ7z58xp.d.ts.map +1 -0
- package/dist/index-DQkgkiB6.d.ts +30 -0
- package/dist/index-DQkgkiB6.d.ts.map +1 -0
- package/dist/index-LKrIp3Oo.d.ts +1 -0
- package/dist/index-_-06JPan.d.ts +143 -0
- package/dist/index-_-06JPan.d.ts.map +1 -0
- package/dist/index-a_YS40Iv.d.ts +91 -0
- package/dist/index-a_YS40Iv.d.ts.map +1 -0
- package/dist/index-d7TLqtYh.d.ts +171 -0
- package/dist/index-d7TLqtYh.d.ts.map +1 -0
- package/dist/index.d.ts +21 -27
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{isMetaError-CQLXyEL4.d.ts → isMetaError-B3AglYeY.d.ts} +28 -25
- package/dist/isMetaError-B3AglYeY.d.ts.map +1 -0
- package/dist/media-Dw5OGzDD.js +2 -0
- package/dist/media-Dw5OGzDD.js.map +1 -0
- package/dist/messages-h5-NW8QO.js +2 -0
- package/dist/messages-h5-NW8QO.js.map +1 -0
- package/dist/nextjs-DxRCL4t3.js +2 -0
- package/dist/nextjs-DxRCL4t3.js.map +1 -0
- package/dist/objectToQueryString-CAHI0qTs.js +2 -0
- package/dist/objectToQueryString-CAHI0qTs.js.map +1 -0
- package/dist/phone-CZyWLyWB.js +2 -0
- package/dist/phone-CZyWLyWB.js.map +1 -0
- package/dist/profile-Bb7GDP0n.js +2 -0
- package/dist/profile-Bb7GDP0n.js.map +1 -0
- package/dist/qrCode-CeZEtX9J.js +2 -0
- package/dist/qrCode-CeZEtX9J.js.map +1 -0
- package/dist/registration-BkjhC3xw.js +2 -0
- package/dist/registration-BkjhC3xw.js.map +1 -0
- package/dist/template-Bgy-BCXJ.js +2 -0
- package/dist/template-Bgy-BCXJ.js.map +1 -0
- package/dist/twoStepVerification-DYlYF_P5.js +2 -0
- package/dist/twoStepVerification-DYlYF_P5.js.map +1 -0
- package/dist/types/index.d.ts +3 -6
- package/dist/types/index.js +1 -2
- package/dist/utils/index.d.ts +23 -20
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +1 -2
- package/dist/version-BUuqrHc6.js +3 -0
- package/dist/version-BUuqrHc6.js.map +1 -0
- package/dist/waba-SF2W3z2U.js +2 -0
- package/dist/waba-SF2W3z2U.js.map +1 -0
- package/dist/webhook-D4DQ01Xq.js +2 -0
- package/dist/webhook-D4DQ01Xq.js.map +1 -0
- package/dist/whatsapp-B85mxH5f.js +10 -0
- package/dist/whatsapp-B85mxH5f.js.map +1 -0
- package/package.json +27 -125
- package/dist/BusinessProfileApi-C_sEOrWM.d.ts +0 -353
- package/dist/EncryptionApi-CcCfeK2b.d.ts +0 -22
- package/dist/FlowApi-DDHrFT_Q.d.ts +0 -136
- package/dist/MediaApi-CY9RVo7u.d.ts +0 -90
- package/dist/MessageApi-CX_jN8da.d.ts +0 -171
- package/dist/PhoneNumberApi-B-hY7g1M.d.ts +0 -142
- package/dist/QrCodeApi-DRICKN04.d.ts +0 -98
- package/dist/RegistrationApi-CFPzU1Vw.d.ts +0 -47
- package/dist/TemplateApi-D9Q_7cf3.d.ts +0 -161
- package/dist/TwoStepVerificationApi-C0jpAKfu.d.ts +0 -33
- package/dist/WabaApi-BfvpkpFr.d.ts +0 -175
- package/dist/WebhookProcessor-C3oUXCBl.d.ts +0 -707
- package/dist/WhatsApp-BG0rDhMn.d.ts +0 -82
- package/dist/api/encryption/index.js.map +0 -1
- package/dist/api/flow/index.js.map +0 -1
- package/dist/api/index.js.map +0 -1
- package/dist/api/media/index.js.map +0 -1
- package/dist/api/messages/index.js.map +0 -1
- package/dist/api/phone/index.js.map +0 -1
- package/dist/api/profile/index.js.map +0 -1
- package/dist/api/qrCode/index.js.map +0 -1
- package/dist/api/registration/index.js.map +0 -1
- package/dist/api/template/index.js.map +0 -1
- package/dist/api/twoStepVerification/index.js.map +0 -1
- package/dist/api/waba/index.js.map +0 -1
- package/dist/base-BV6DyzGS.d.ts +0 -18
- package/dist/chunk-5577QQ7V.js +0 -2
- package/dist/chunk-5577QQ7V.js.map +0 -1
- package/dist/chunk-6DFC5L3X.js +0 -2
- package/dist/chunk-6DFC5L3X.js.map +0 -1
- package/dist/chunk-7QBIZCJ4.js +0 -2
- package/dist/chunk-7QBIZCJ4.js.map +0 -1
- package/dist/chunk-AMHQGG6Z.js +0 -2
- package/dist/chunk-AMHQGG6Z.js.map +0 -1
- package/dist/chunk-BAOZ4U74.js +0 -10
- package/dist/chunk-BAOZ4U74.js.map +0 -1
- package/dist/chunk-CRZ7EUYR.js +0 -2
- package/dist/chunk-CRZ7EUYR.js.map +0 -1
- package/dist/chunk-FKXSL2JK.js +0 -3
- package/dist/chunk-FKXSL2JK.js.map +0 -1
- package/dist/chunk-FSKBLPGE.js +0 -2
- package/dist/chunk-FSKBLPGE.js.map +0 -1
- package/dist/chunk-GM63NGNV.js +0 -2
- package/dist/chunk-GM63NGNV.js.map +0 -1
- package/dist/chunk-IYSR44P6.js +0 -2
- package/dist/chunk-IYSR44P6.js.map +0 -1
- package/dist/chunk-J2JPTKU6.js +0 -2
- package/dist/chunk-J2JPTKU6.js.map +0 -1
- package/dist/chunk-JC6YMVID.js +0 -2
- package/dist/chunk-JC6YMVID.js.map +0 -1
- package/dist/chunk-JPAV644F.js +0 -2
- package/dist/chunk-JPAV644F.js.map +0 -1
- package/dist/chunk-JXCLRKQ7.js +0 -2
- package/dist/chunk-JXCLRKQ7.js.map +0 -1
- package/dist/chunk-KMAH6636.js +0 -2
- package/dist/chunk-KMAH6636.js.map +0 -1
- package/dist/chunk-L4ESAO2S.js +0 -2
- package/dist/chunk-L4ESAO2S.js.map +0 -1
- package/dist/chunk-LV3TULSI.js +0 -2
- package/dist/chunk-LV3TULSI.js.map +0 -1
- package/dist/chunk-MJEG3K4V.js +0 -2
- package/dist/chunk-MJEG3K4V.js.map +0 -1
- package/dist/chunk-PHPQ5HP3.js +0 -2
- package/dist/chunk-PHPQ5HP3.js.map +0 -1
- package/dist/chunk-RIL6QABY.js +0 -2
- package/dist/chunk-RIL6QABY.js.map +0 -1
- package/dist/chunk-RWCVPWRC.js +0 -2
- package/dist/chunk-RWCVPWRC.js.map +0 -1
- package/dist/chunk-SNNRWNGZ.js +0 -2
- package/dist/chunk-SNNRWNGZ.js.map +0 -1
- package/dist/chunk-U5FBZ6UB.js +0 -3
- package/dist/chunk-U5FBZ6UB.js.map +0 -1
- package/dist/chunk-VHAODWCN.js +0 -2
- package/dist/chunk-VHAODWCN.js.map +0 -1
- package/dist/chunk-ZMNXRMWK.js +0 -2
- package/dist/chunk-ZMNXRMWK.js.map +0 -1
- package/dist/common-B8kp4RdL.d.ts +0 -403
- package/dist/common-CGbls9Y8.d.ts +0 -425
- package/dist/core/webhook/frameworks/express.js.map +0 -1
- package/dist/core/webhook/frameworks/nextjs.js.map +0 -1
- package/dist/core/webhook/index.js.map +0 -1
- package/dist/core/whatsapp/index.js.map +0 -1
- package/dist/enums-DIimUG6s.d.ts +0 -707
- package/dist/factory-B37vOPki.d.ts +0 -200
- package/dist/handler-DbySwF0E.d.ts +0 -20
- package/dist/httpsClient-Cbd2Y6mg.d.ts +0 -19
- package/dist/logger-BdE0Vyim.d.ts +0 -9
- package/dist/request-CUjrMn8R.d.ts +0 -50
- package/dist/types/config.d.ts +0 -78
- package/dist/types/config.js +0 -2
- package/dist/types/config.js.map +0 -1
- package/dist/types/enums.d.ts +0 -1
- package/dist/types/enums.js +0 -2
- package/dist/types/enums.js.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/utils/index.js.map +0 -1
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { M as MessageTypesEnum, b as ComponentTypesEnum, f as InteractiveTypesEnum } from './enums-DIimUG6s.js';
|
|
4
|
-
import { e as RequesterClass } from './request-CUjrMn8R.js';
|
|
5
|
-
import { b as MessagesClass, A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, f as InteractiveObject, L as LocationObject, g as MessageTemplateObject, e as StickerMediaObject, d as TextObject, V as VideoMediaObject, M as MessageRequestBody, a as MessageRequestParams, c as MessagesResponse, T as TextMessageParams, S as StatusParams, R as ReactionParams } from './common-CGbls9Y8.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Maps each message type to its appropriate payload type
|
|
9
|
-
*/
|
|
10
|
-
type MessagePayloadType<T extends MessageTypesEnum> = T extends MessageTypesEnum.Audio ? AudioMediaObject : T extends MessageTypesEnum.Contacts ? [ContactObject] : T extends MessageTypesEnum.Document ? DocumentMediaObject : T extends MessageTypesEnum.Image ? ImageMediaObject : T extends MessageTypesEnum.Interactive ? InteractiveObject : T extends MessageTypesEnum.Location ? LocationObject : T extends MessageTypesEnum.Template ? MessageTemplateObject<ComponentTypesEnum> : T extends MessageTypesEnum.Sticker ? StickerMediaObject : T extends MessageTypesEnum.Text ? TextObject : T extends MessageTypesEnum.Video ? VideoMediaObject : T extends MessageTypesEnum.Reaction ? {
|
|
11
|
-
message_id: string;
|
|
12
|
-
emoji: string;
|
|
13
|
-
} : never;
|
|
14
|
-
declare class MessagesApi extends BaseAPI implements MessagesClass {
|
|
15
|
-
private readonly commonMethod;
|
|
16
|
-
private readonly commonEndpoint;
|
|
17
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
18
|
-
/**
|
|
19
|
-
* Builds the request body for WhatsApp API messages
|
|
20
|
-
* @param type The type of message to send
|
|
21
|
-
* @param payload The message payload object
|
|
22
|
-
* @param to The recipient's phone number
|
|
23
|
-
* @param replyMessageId Optional message ID to reply to
|
|
24
|
-
* @returns The formatted request body
|
|
25
|
-
*/
|
|
26
|
-
bodyBuilder<T extends MessageTypesEnum>(type: T, payload: MessagePayloadType<T>, to: string, replyMessageId?: string): MessageRequestBody<T>;
|
|
27
|
-
/**
|
|
28
|
-
* Sends a request to the WhatsApp API
|
|
29
|
-
* @param body The request body to send
|
|
30
|
-
* @returns Promise with the API response
|
|
31
|
-
*/
|
|
32
|
-
private send;
|
|
33
|
-
/**
|
|
34
|
-
* Sends an audio message via WhatsApp
|
|
35
|
-
* @param params The audio message parameter object
|
|
36
|
-
* @returns Promise with the message response
|
|
37
|
-
*/
|
|
38
|
-
audio(params: MessageRequestParams<AudioMediaObject>): Promise<MessagesResponse>;
|
|
39
|
-
/**
|
|
40
|
-
* Sends a contact card via WhatsApp
|
|
41
|
-
* @param params The contact message parameter object
|
|
42
|
-
* @returns Promise with the message response
|
|
43
|
-
*/
|
|
44
|
-
contacts(params: MessageRequestParams<[ContactObject]>): Promise<MessagesResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* Sends a document via WhatsApp
|
|
47
|
-
* @param params The document message parameter object
|
|
48
|
-
* @returns Promise with the message response
|
|
49
|
-
*/
|
|
50
|
-
document(params: MessageRequestParams<DocumentMediaObject>): Promise<MessagesResponse>;
|
|
51
|
-
/**
|
|
52
|
-
* Sends an image via WhatsApp
|
|
53
|
-
* @param params The image message parameter object
|
|
54
|
-
* @returns Promise with the message response
|
|
55
|
-
*/
|
|
56
|
-
image(params: MessageRequestParams<ImageMediaObject>): Promise<MessagesResponse>;
|
|
57
|
-
/**
|
|
58
|
-
* Sends an interactive message via WhatsApp
|
|
59
|
-
* @param params The interactive message parameter object
|
|
60
|
-
* @returns Promise with the message response
|
|
61
|
-
*/
|
|
62
|
-
interactive(params: MessageRequestParams<InteractiveObject>): Promise<MessagesResponse>;
|
|
63
|
-
/**
|
|
64
|
-
* Sends a location via WhatsApp
|
|
65
|
-
* @param params The location message parameter object
|
|
66
|
-
* @returns Promise with the message response
|
|
67
|
-
*/
|
|
68
|
-
location(params: MessageRequestParams<LocationObject>): Promise<MessagesResponse>;
|
|
69
|
-
/**
|
|
70
|
-
* Sends a sticker via WhatsApp
|
|
71
|
-
* @param params The sticker message parameter object
|
|
72
|
-
* @returns Promise with the message response
|
|
73
|
-
*/
|
|
74
|
-
sticker(params: MessageRequestParams<StickerMediaObject>): Promise<MessagesResponse>;
|
|
75
|
-
/**
|
|
76
|
-
* Sends a template message via WhatsApp
|
|
77
|
-
* @param params The template message parameter object
|
|
78
|
-
* @returns Promise with the message response
|
|
79
|
-
*/
|
|
80
|
-
template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<MessagesResponse>;
|
|
81
|
-
/**
|
|
82
|
-
* Sends a text message via WhatsApp
|
|
83
|
-
* @param params The text message parameter object
|
|
84
|
-
* @returns Promise with the message response
|
|
85
|
-
*/
|
|
86
|
-
text(params: TextMessageParams): Promise<MessagesResponse>;
|
|
87
|
-
/**
|
|
88
|
-
* Sends a video message via WhatsApp
|
|
89
|
-
* @param params The video message parameter object
|
|
90
|
-
* @returns Promise with the message response
|
|
91
|
-
*/
|
|
92
|
-
video(params: MessageRequestParams<VideoMediaObject>): Promise<MessagesResponse>;
|
|
93
|
-
/**
|
|
94
|
-
* Updates message status (mark as read, etc.)
|
|
95
|
-
* @param params The status update parameters
|
|
96
|
-
* @returns Promise with the API response
|
|
97
|
-
*/
|
|
98
|
-
status(params: StatusParams): Promise<MessagesResponse>;
|
|
99
|
-
/**
|
|
100
|
-
* Marks a message as read
|
|
101
|
-
* @param params Object containing messageId
|
|
102
|
-
* @returns Promise with the API response
|
|
103
|
-
*/
|
|
104
|
-
markAsRead(params: {
|
|
105
|
-
messageId: string;
|
|
106
|
-
}): Promise<MessagesResponse>;
|
|
107
|
-
/**
|
|
108
|
-
* Shows typing indicator
|
|
109
|
-
* @param params Object containing messageId
|
|
110
|
-
* @returns Promise with the API response
|
|
111
|
-
*/
|
|
112
|
-
showTypingIndicator(params: {
|
|
113
|
-
messageId: string;
|
|
114
|
-
}): Promise<MessagesResponse>;
|
|
115
|
-
/**
|
|
116
|
-
* Sends a list interactive message
|
|
117
|
-
* @param params The list interactive message parameters
|
|
118
|
-
* @returns Promise with the message response
|
|
119
|
-
*/
|
|
120
|
-
interactiveList(params: MessageRequestParams<InteractiveObject & {
|
|
121
|
-
type: InteractiveTypesEnum.List;
|
|
122
|
-
}>): Promise<MessagesResponse>;
|
|
123
|
-
/**
|
|
124
|
-
* Sends a CTA URL interactive message
|
|
125
|
-
* @param params The CTA URL interactive message parameters
|
|
126
|
-
* @returns Promise with the message response
|
|
127
|
-
*/
|
|
128
|
-
interactiveCtaUrl(params: MessageRequestParams<InteractiveObject & {
|
|
129
|
-
type: InteractiveTypesEnum.CtaUrl;
|
|
130
|
-
}>): Promise<MessagesResponse>;
|
|
131
|
-
/**
|
|
132
|
-
* Sends a location request interactive message
|
|
133
|
-
* @param params The location request interactive message parameters
|
|
134
|
-
* @returns Promise with the message response
|
|
135
|
-
*/
|
|
136
|
-
interactiveLocationRequest(params: MessageRequestParams<InteractiveObject & {
|
|
137
|
-
type: InteractiveTypesEnum.LocationRequest;
|
|
138
|
-
}>): Promise<MessagesResponse>;
|
|
139
|
-
/**
|
|
140
|
-
* Sends an address message interactive message
|
|
141
|
-
* @param params The address message interactive message parameters
|
|
142
|
-
* @returns Promise with the message response
|
|
143
|
-
*/
|
|
144
|
-
interactiveAddressMessage(params: MessageRequestParams<InteractiveObject & {
|
|
145
|
-
type: InteractiveTypesEnum.AddressMessage;
|
|
146
|
-
}>): Promise<MessagesResponse>;
|
|
147
|
-
/**
|
|
148
|
-
* Sends a reply buttons interactive message
|
|
149
|
-
* @param params The reply buttons interactive message parameters
|
|
150
|
-
* @returns Promise with the message response
|
|
151
|
-
*/
|
|
152
|
-
interactiveReplyButtons(params: MessageRequestParams<InteractiveObject & {
|
|
153
|
-
type: InteractiveTypesEnum.Button;
|
|
154
|
-
}>): Promise<MessagesResponse>;
|
|
155
|
-
/**
|
|
156
|
-
* Sends a flow interactive message
|
|
157
|
-
* @param params The flow interactive message parameters
|
|
158
|
-
* @returns Promise with the message response
|
|
159
|
-
*/
|
|
160
|
-
interactiveFlow(params: MessageRequestParams<InteractiveObject & {
|
|
161
|
-
type: InteractiveTypesEnum.Flow;
|
|
162
|
-
}>): Promise<MessagesResponse>;
|
|
163
|
-
/**
|
|
164
|
-
* Sends a reaction to a message
|
|
165
|
-
* @param params The reaction parameters
|
|
166
|
-
* @returns Promise with the message response
|
|
167
|
-
*/
|
|
168
|
-
reaction(params: ReactionParams): Promise<MessagesResponse>;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export { MessagesApi as M };
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { P as Paging, d as ResponseSuccess, e as RequesterClass } from './request-CUjrMn8R.js';
|
|
4
|
-
|
|
5
|
-
type QualityRating = 'GREEN' | 'YELLOW' | 'RED' | 'NA';
|
|
6
|
-
type AccountMode = 'LIVE' | 'SANDBOX';
|
|
7
|
-
type CodeVerificationStatus = 'NOT_VERIFIED' | 'VERIFIED' | 'EXPIRED' | 'PENDING' | 'DELETED' | 'MIGRATED' | 'BANNED' | 'RESTRICTED' | 'RATE_LIMITED' | 'FLAGGED' | 'CONNECTED' | 'DISCONNECTED' | 'UNKNOWN' | 'UNVERIFIED';
|
|
8
|
-
type MessagingLimitTier = 'TIER_50' | 'TIER_250' | 'TIER_1K' | 'TIER_10K' | 'TIER_100K' | 'TIER_UNLIMITED';
|
|
9
|
-
type PlatformType = 'CLOUD_API' | 'ON_PREMISE' | 'NOT_APPLICABLE';
|
|
10
|
-
type ThroughputLevel = 'STANDARD' | 'HIGH' | 'NOT_APPLICABLE';
|
|
11
|
-
type HealthStatusEntity = {
|
|
12
|
-
entity_type: string;
|
|
13
|
-
id: string;
|
|
14
|
-
can_send_message: string;
|
|
15
|
-
additional_info?: string[];
|
|
16
|
-
errors?: Array<{
|
|
17
|
-
error_code: number;
|
|
18
|
-
error_description: string;
|
|
19
|
-
possible_solution: string;
|
|
20
|
-
}>;
|
|
21
|
-
};
|
|
22
|
-
type HealthStatus = {
|
|
23
|
-
can_send_message: string;
|
|
24
|
-
entities: HealthStatusEntity[];
|
|
25
|
-
};
|
|
26
|
-
type QualityScore = {
|
|
27
|
-
score: QualityRating;
|
|
28
|
-
};
|
|
29
|
-
type Throughput = {
|
|
30
|
-
level: ThroughputLevel;
|
|
31
|
-
};
|
|
32
|
-
type PhoneNumberResponse = {
|
|
33
|
-
display_phone_number: string;
|
|
34
|
-
id: string;
|
|
35
|
-
quality_rating: QualityRating;
|
|
36
|
-
verified_name: string;
|
|
37
|
-
account_mode?: AccountMode;
|
|
38
|
-
certificate?: string;
|
|
39
|
-
code_verification_status?: CodeVerificationStatus;
|
|
40
|
-
conversational_automation?: Record<string, unknown>;
|
|
41
|
-
eligibility_for_api_business_global_search?: string;
|
|
42
|
-
health_status?: HealthStatus;
|
|
43
|
-
is_official_business_account?: boolean;
|
|
44
|
-
is_on_biz_app?: boolean;
|
|
45
|
-
is_pin_enabled?: boolean;
|
|
46
|
-
is_preverified_number?: boolean;
|
|
47
|
-
last_onboarded_time?: string;
|
|
48
|
-
messaging_limit_tier?: MessagingLimitTier;
|
|
49
|
-
name_status?: string;
|
|
50
|
-
new_certificate?: string;
|
|
51
|
-
new_name_status?: string;
|
|
52
|
-
platform_type?: PlatformType;
|
|
53
|
-
quality_score?: QualityScore;
|
|
54
|
-
search_visibility?: string;
|
|
55
|
-
status?: CodeVerificationStatus;
|
|
56
|
-
throughput?: Throughput;
|
|
57
|
-
};
|
|
58
|
-
type Cursors = {
|
|
59
|
-
before: string;
|
|
60
|
-
after: string;
|
|
61
|
-
};
|
|
62
|
-
type PhoneNumbersResponse = {
|
|
63
|
-
data: PhoneNumberResponse[];
|
|
64
|
-
paging: Paging;
|
|
65
|
-
};
|
|
66
|
-
type RequestVerificationCodeRequest = {
|
|
67
|
-
code_method: 'SMS' | 'VOICE';
|
|
68
|
-
language: string;
|
|
69
|
-
};
|
|
70
|
-
type VerifyCodeRequest = {
|
|
71
|
-
code: string;
|
|
72
|
-
};
|
|
73
|
-
type TwoStepVerificationParams = {
|
|
74
|
-
pin: string;
|
|
75
|
-
};
|
|
76
|
-
interface PhoneNumberClass {
|
|
77
|
-
getPhoneNumberById(fields?: string): Promise<PhoneNumberResponse>;
|
|
78
|
-
getPhoneNumbers(): Promise<PhoneNumbersResponse>;
|
|
79
|
-
requestVerificationCode(params: RequestVerificationCodeRequest): Promise<ResponseSuccess>;
|
|
80
|
-
verifyCode(params: VerifyCodeRequest): Promise<ResponseSuccess>;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* API for managing WhatsApp Phone Numb ers.
|
|
85
|
-
*
|
|
86
|
-
* This API allows you to:
|
|
87
|
-
* - Get phone number information by ID
|
|
88
|
-
* - Get all phone numbers for a business account
|
|
89
|
-
* - Request verification codes for phone numbers
|
|
90
|
-
* - Verify phone numbers with codes
|
|
91
|
-
*/
|
|
92
|
-
declare class PhoneNumberApi extends BaseAPI implements PhoneNumberClass {
|
|
93
|
-
private readonly endpoint;
|
|
94
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
95
|
-
/**
|
|
96
|
-
* Get phone number information by ID.
|
|
97
|
-
*
|
|
98
|
-
* @param fields Optional comma-separated list of fields to include in the response
|
|
99
|
-
* @returns Phone number information including verification status, quality rating, etc.
|
|
100
|
-
*
|
|
101
|
-
* @example
|
|
102
|
-
* const phoneNumber = await whatsappClient.phoneNumber.getPhoneNumberById();
|
|
103
|
-
* const phoneNumberWithFields = await whatsappClient.phoneNumber.getPhoneNumberById('display_phone_number,verified_name');
|
|
104
|
-
*/
|
|
105
|
-
getPhoneNumberById(fields?: string): Promise<PhoneNumberResponse>;
|
|
106
|
-
/**
|
|
107
|
-
* Get all phone numbers for the business account.
|
|
108
|
-
*
|
|
109
|
-
* @returns List of phone numbers associated with the business account
|
|
110
|
-
*
|
|
111
|
-
* @example
|
|
112
|
-
* const phoneNumbers = await whatsappClient.phoneNumber.getPhoneNumbers();
|
|
113
|
-
*/
|
|
114
|
-
getPhoneNumbers(): Promise<PhoneNumbersResponse>;
|
|
115
|
-
/**
|
|
116
|
-
* Request a verification code for the phone number.
|
|
117
|
-
*
|
|
118
|
-
* @param request Verification code request containing method and language
|
|
119
|
-
* @returns Response indicating success or failure
|
|
120
|
-
*
|
|
121
|
-
* @example
|
|
122
|
-
* await whatsappClient.phoneNumber.requestVerificationCode({
|
|
123
|
-
* code_method: 'SMS',
|
|
124
|
-
* language: 'en_US'
|
|
125
|
-
* });
|
|
126
|
-
*/
|
|
127
|
-
requestVerificationCode(request: RequestVerificationCodeRequest): Promise<ResponseSuccess>;
|
|
128
|
-
/**
|
|
129
|
-
* Verify the phone number with the received code.
|
|
130
|
-
*
|
|
131
|
-
* @param request Verification request containing the code
|
|
132
|
-
* @returns Response indicating success or failure
|
|
133
|
-
*
|
|
134
|
-
* @example
|
|
135
|
-
* await whatsappClient.phoneNumber.verifyCode({
|
|
136
|
-
* code: '123456'
|
|
137
|
-
* });
|
|
138
|
-
*/
|
|
139
|
-
verifyCode(request: VerifyCodeRequest): Promise<ResponseSuccess>;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export { type AccountMode as A, type CodeVerificationStatus as C, type HealthStatus as H, type MessagingLimitTier as M, PhoneNumberApi as P, type QualityRating as Q, type RequestVerificationCodeRequest as R, type Throughput as T, type VerifyCodeRequest as V, type Cursors as a, type HealthStatusEntity as b, type PhoneNumberClass as c, type PhoneNumberResponse as d, type PhoneNumbersResponse as e, type PlatformType as f, type QualityScore as g, type ThroughputLevel as h, type TwoStepVerificationParams as i };
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { b as ResponseData, d as ResponseSuccess, e as RequesterClass } from './request-CUjrMn8R.js';
|
|
4
|
-
|
|
5
|
-
type QrCodeResponse = {
|
|
6
|
-
code: string;
|
|
7
|
-
prefilled_message: string;
|
|
8
|
-
deep_link_url: string;
|
|
9
|
-
qr_image_url?: string;
|
|
10
|
-
};
|
|
11
|
-
type QrCodesResponse = ResponseData<QrCodeResponse[]>;
|
|
12
|
-
type CreateQrCodeRequest = {
|
|
13
|
-
prefilled_message: string;
|
|
14
|
-
generate_qr_image?: 'SVG' | 'PNG';
|
|
15
|
-
};
|
|
16
|
-
type UpdateQrCodeRequest = {
|
|
17
|
-
code: string;
|
|
18
|
-
prefilled_message: string;
|
|
19
|
-
};
|
|
20
|
-
interface QrCodeClass {
|
|
21
|
-
createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;
|
|
22
|
-
getQrCodes(): Promise<QrCodesResponse>;
|
|
23
|
-
getQrCode(qrCodeId: string): Promise<QrCodeResponse>;
|
|
24
|
-
updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;
|
|
25
|
-
deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* API for managing WhatsApp QR Codes.
|
|
30
|
-
*
|
|
31
|
-
* This API allows you to:
|
|
32
|
-
* - Create QR codes with prefilled messages
|
|
33
|
-
* - Get all QR codes
|
|
34
|
-
* - Get specific QR code details
|
|
35
|
-
* - Update QR code messages
|
|
36
|
-
* - Delete QR codes
|
|
37
|
-
*/
|
|
38
|
-
declare class QrCodeApi extends BaseAPI implements QrCodeClass {
|
|
39
|
-
private readonly endpoint;
|
|
40
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
41
|
-
/**
|
|
42
|
-
* Create a new QR code with a prefilled message.
|
|
43
|
-
*
|
|
44
|
-
* @param request The QR code creation request
|
|
45
|
-
* @returns QR code information including code, deep link URL, and optional image URL
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* const qrCode = await whatsappClient.qrCode.createQrCode({
|
|
49
|
-
* prefilled_message: 'Hello from WhatsApp!',
|
|
50
|
-
* generate_qr_image: 'PNG'
|
|
51
|
-
* });
|
|
52
|
-
*/
|
|
53
|
-
createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;
|
|
54
|
-
/**
|
|
55
|
-
* Get all QR codes for the current phone number.
|
|
56
|
-
*
|
|
57
|
-
* @returns List of all QR codes
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* const qrCodes = await whatsappClient.qrCode.getQrCodes();
|
|
61
|
-
*/
|
|
62
|
-
getQrCodes(): Promise<QrCodesResponse>;
|
|
63
|
-
/**
|
|
64
|
-
* Get a specific QR code by ID.
|
|
65
|
-
*
|
|
66
|
-
* @param qrCodeId The QR code ID to retrieve
|
|
67
|
-
* @returns QR code information
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
* const qrCode = await whatsappClient.qrCode.getQrCode('qr_code_123');
|
|
71
|
-
*/
|
|
72
|
-
getQrCode(qrCodeId: string): Promise<QrCodeResponse>;
|
|
73
|
-
/**
|
|
74
|
-
* Update an existing QR code's prefilled message.
|
|
75
|
-
*
|
|
76
|
-
* @param request The QR code update request containing code and new message
|
|
77
|
-
* @returns Updated QR code information
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* const updatedQrCode = await whatsappClient.qrCode.updateQrCode({
|
|
81
|
-
* code: 'existing_qr_code',
|
|
82
|
-
* prefilled_message: 'Updated message!'
|
|
83
|
-
* });
|
|
84
|
-
*/
|
|
85
|
-
updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;
|
|
86
|
-
/**
|
|
87
|
-
* Delete a QR code.
|
|
88
|
-
*
|
|
89
|
-
* @param qrCodeId The QR code ID to delete
|
|
90
|
-
* @returns Response indicating success or failure
|
|
91
|
-
*
|
|
92
|
-
* @example
|
|
93
|
-
* await whatsappClient.qrCode.deleteQrCode('qr_code_123');
|
|
94
|
-
*/
|
|
95
|
-
deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export { type CreateQrCodeRequest as C, QrCodeApi as Q, type UpdateQrCodeRequest as U, type QrCodeClass as a, type QrCodeResponse as b, type QrCodesResponse as c };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { D as DataLocalizationRegionEnum } from './enums-DIimUG6s.js';
|
|
4
|
-
import { d as ResponseSuccess, e as RequesterClass } from './request-CUjrMn8R.js';
|
|
5
|
-
|
|
6
|
-
type RegistrationRequest = {
|
|
7
|
-
messaging_product: 'whatsapp';
|
|
8
|
-
pin: string;
|
|
9
|
-
data_localization_region?: DataLocalizationRegionEnum;
|
|
10
|
-
};
|
|
11
|
-
interface RegistrationClass {
|
|
12
|
-
register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;
|
|
13
|
-
deregister(): Promise<ResponseSuccess>;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* API for managing WhatsApp Business Account registration.
|
|
18
|
-
*
|
|
19
|
-
* This API allows you to:
|
|
20
|
-
* - Register a WhatsApp Business Account with a PIN
|
|
21
|
-
* - Deregister a WhatsApp Business Account
|
|
22
|
-
*/
|
|
23
|
-
declare class RegistrationApi extends BaseAPI implements RegistrationClass {
|
|
24
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
25
|
-
/**
|
|
26
|
-
* Register a WhatsApp Business Account using a PIN.
|
|
27
|
-
*
|
|
28
|
-
* @param pin The registration PIN received via SMS or voice call
|
|
29
|
-
* @param dataLocalizationRegion Optional data localization region
|
|
30
|
-
* @returns Response indicating success or failure
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* await whatsappClient.registration.register('123456', DataLocalizationRegionEnum.Asia);
|
|
34
|
-
*/
|
|
35
|
-
register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;
|
|
36
|
-
/**
|
|
37
|
-
* Deregister a WhatsApp Business Account.
|
|
38
|
-
*
|
|
39
|
-
* @returns Response indicating success or failure
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* await whatsappClient.registration.deregister();
|
|
43
|
-
*/
|
|
44
|
-
deregister(): Promise<ResponseSuccess>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export { RegistrationApi as R, type RegistrationClass as a, type RegistrationRequest as b };
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { a as GeneralRequestBody, d as ResponseSuccess, c as ResponsePagination, e as RequesterClass } from './request-CUjrMn8R.js';
|
|
4
|
-
import { L as LanguagesEnum, C as CategoryEnum, T as TemplateStatusEnum } from './enums-DIimUG6s.js';
|
|
5
|
-
|
|
6
|
-
type TemplateFormat = 'TEXT' | 'IMAGE' | 'VIDEO' | 'DOCUMENT' | 'LOCATION' | 'PRODUCT';
|
|
7
|
-
type PhoneNumberButton = {
|
|
8
|
-
type: 'PHONE_NUMBER';
|
|
9
|
-
text: string;
|
|
10
|
-
phone_number: string;
|
|
11
|
-
};
|
|
12
|
-
type URLButton = {
|
|
13
|
-
type: 'URL';
|
|
14
|
-
text: string;
|
|
15
|
-
url: string;
|
|
16
|
-
example?: string[];
|
|
17
|
-
};
|
|
18
|
-
type QuickReplyButton = {
|
|
19
|
-
type: 'QUICK_REPLY';
|
|
20
|
-
text: string;
|
|
21
|
-
};
|
|
22
|
-
type CopyCodeButton = {
|
|
23
|
-
type: 'COPY_CODE';
|
|
24
|
-
example: string;
|
|
25
|
-
};
|
|
26
|
-
type FlowButton = {
|
|
27
|
-
type: 'FLOW';
|
|
28
|
-
text: string;
|
|
29
|
-
flow_id?: string;
|
|
30
|
-
flow_name?: string;
|
|
31
|
-
flow_json?: string;
|
|
32
|
-
flow_action?: 'navigate' | 'data_exchange';
|
|
33
|
-
navigate_screen?: string;
|
|
34
|
-
};
|
|
35
|
-
type MPMButton = {
|
|
36
|
-
type: 'MPM';
|
|
37
|
-
action?: {
|
|
38
|
-
thumbnail_product_retailer_id: string;
|
|
39
|
-
sections: Array<{
|
|
40
|
-
title?: string;
|
|
41
|
-
product_items: Array<{
|
|
42
|
-
product_retailer_id: string;
|
|
43
|
-
}>;
|
|
44
|
-
}>;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
type OTPButton = {
|
|
48
|
-
type: 'OTP';
|
|
49
|
-
};
|
|
50
|
-
type SPMButton = {
|
|
51
|
-
type: 'SPM';
|
|
52
|
-
action?: {
|
|
53
|
-
product_retailer_id: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
type CatalogButton = {
|
|
57
|
-
type: 'CATALOG';
|
|
58
|
-
action?: {
|
|
59
|
-
thumbnail_product_retailer_id: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
type TemplateButton = PhoneNumberButton | URLButton | QuickReplyButton | CopyCodeButton | FlowButton | MPMButton | OTPButton | SPMButton | CatalogButton;
|
|
63
|
-
type TemplateHeaderExample = {
|
|
64
|
-
header_text?: string[];
|
|
65
|
-
header_text_named_params?: Array<{
|
|
66
|
-
param_name: string;
|
|
67
|
-
example: string;
|
|
68
|
-
}>;
|
|
69
|
-
header_handle?: string[];
|
|
70
|
-
};
|
|
71
|
-
type TemplateHeader = {
|
|
72
|
-
type: 'HEADER';
|
|
73
|
-
format: TemplateFormat;
|
|
74
|
-
text?: string;
|
|
75
|
-
example?: TemplateHeaderExample;
|
|
76
|
-
};
|
|
77
|
-
type TemplateBody = {
|
|
78
|
-
type: 'BODY';
|
|
79
|
-
text: string;
|
|
80
|
-
example?: {
|
|
81
|
-
body_text?: Array<Array<string>>;
|
|
82
|
-
body_text_named_params?: Array<{
|
|
83
|
-
param_name: string;
|
|
84
|
-
example: string;
|
|
85
|
-
}>;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
type TemplateFooter = {
|
|
89
|
-
type: 'FOOTER';
|
|
90
|
-
text: string;
|
|
91
|
-
};
|
|
92
|
-
type TemplateButtons = {
|
|
93
|
-
type: 'BUTTONS';
|
|
94
|
-
buttons: TemplateButton[];
|
|
95
|
-
};
|
|
96
|
-
type TemplateLimitedTimeOffer = {
|
|
97
|
-
type: 'LIMITED_TIME_OFFER';
|
|
98
|
-
limited_time_offer: {
|
|
99
|
-
expiration_time_ms: number;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
type TemplateCarousel = {
|
|
103
|
-
type: 'CAROUSEL';
|
|
104
|
-
cards: Array<{
|
|
105
|
-
card_index: number;
|
|
106
|
-
components: ComponentTypes[];
|
|
107
|
-
}>;
|
|
108
|
-
};
|
|
109
|
-
type MediaCarouselCard = {
|
|
110
|
-
card_index: number;
|
|
111
|
-
components: (TemplateHeader | TemplateBody | TemplateButtons)[];
|
|
112
|
-
};
|
|
113
|
-
type ProductCarouselCard = {
|
|
114
|
-
card_index: number;
|
|
115
|
-
components: TemplateHeader[];
|
|
116
|
-
};
|
|
117
|
-
type ComponentTypes = TemplateHeader | TemplateBody | TemplateFooter | TemplateButtons | TemplateLimitedTimeOffer | TemplateCarousel;
|
|
118
|
-
type TemplateRequestBody = GeneralRequestBody & {
|
|
119
|
-
name: string;
|
|
120
|
-
language: LanguagesEnum;
|
|
121
|
-
category?: CategoryEnum;
|
|
122
|
-
components?: ComponentTypes[];
|
|
123
|
-
};
|
|
124
|
-
type TemplateResponse = {
|
|
125
|
-
id: string;
|
|
126
|
-
status: string;
|
|
127
|
-
language: LanguagesEnum;
|
|
128
|
-
category: CategoryEnum;
|
|
129
|
-
name: string;
|
|
130
|
-
components: ComponentTypes[];
|
|
131
|
-
};
|
|
132
|
-
type TemplateGetParams = {
|
|
133
|
-
limit?: number;
|
|
134
|
-
name?: string;
|
|
135
|
-
language?: LanguagesEnum;
|
|
136
|
-
category?: CategoryEnum;
|
|
137
|
-
status?: TemplateStatusEnum;
|
|
138
|
-
};
|
|
139
|
-
type TemplateDeleteParams = {
|
|
140
|
-
hsm_id: string;
|
|
141
|
-
name: string;
|
|
142
|
-
};
|
|
143
|
-
declare class TemplateClass {
|
|
144
|
-
getTemplate(templateId: string): Promise<TemplateResponse>;
|
|
145
|
-
updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;
|
|
146
|
-
getTemplates(params?: TemplateGetParams): Promise<ResponsePagination<TemplateResponse>>;
|
|
147
|
-
createTemplate(template: TemplateRequestBody): Promise<TemplateResponse>;
|
|
148
|
-
deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
declare class TemplateApi extends BaseAPI implements TemplateClass {
|
|
152
|
-
private readonly endpoint;
|
|
153
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
154
|
-
getTemplate(templateId: string): Promise<TemplateResponse>;
|
|
155
|
-
updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;
|
|
156
|
-
getTemplates(params?: TemplateGetParams): Promise<ResponsePagination<TemplateResponse>>;
|
|
157
|
-
createTemplate(template: TemplateRequestBody): Promise<TemplateResponse>;
|
|
158
|
-
deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export { type CatalogButton as C, type FlowButton as F, type MPMButton as M, type OTPButton as O, type PhoneNumberButton as P, type QuickReplyButton as Q, type SPMButton as S, TemplateApi as T, type URLButton as U, type ComponentTypes as a, type CopyCodeButton as b, type TemplateBody as c, type TemplateButton as d, type TemplateButtons as e, type TemplateCarousel as f, TemplateClass as g, type TemplateDeleteParams as h, type TemplateFooter as i, type TemplateFormat as j, type TemplateGetParams as k, type TemplateHeader as l, type TemplateHeaderExample as m, type TemplateLimitedTimeOffer as n, type TemplateRequestBody as o, type TemplateResponse as p, type MediaCarouselCard as q, type ProductCarouselCard as r };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { d as ResponseSuccess, e as RequesterClass } from './request-CUjrMn8R.js';
|
|
4
|
-
|
|
5
|
-
type TwoStepVerificationRequest = {
|
|
6
|
-
pin: string;
|
|
7
|
-
};
|
|
8
|
-
interface TwoStepVerificationClass {
|
|
9
|
-
setTwoStepVerificationCode(pin: string): Promise<ResponseSuccess>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* API for managing WhatsApp Two-Step Verification.
|
|
14
|
-
*
|
|
15
|
-
* This API allows you to:
|
|
16
|
-
* - Set a two-step verification PIN code
|
|
17
|
-
* - Manage two-step verification settings
|
|
18
|
-
*/
|
|
19
|
-
declare class TwoStepVerificationApi extends BaseAPI implements TwoStepVerificationClass {
|
|
20
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
21
|
-
/**
|
|
22
|
-
* Set a two-step verification PIN code.
|
|
23
|
-
*
|
|
24
|
-
* @param pin The PIN code to set for two-step verification (6-digit numeric string)
|
|
25
|
-
* @returns Response indicating success or failure
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* await whatsappClient.twoStepVerification.setTwoStepVerificationCode('123456');
|
|
29
|
-
*/
|
|
30
|
-
setTwoStepVerificationCode(pin: string): Promise<ResponseSuccess>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { TwoStepVerificationApi as T, type TwoStepVerificationClass as a, type TwoStepVerificationRequest as b };
|