meta-cloud-api 1.1.3 → 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.
Files changed (234) hide show
  1. package/dist/WebhookProcessor-BUZFeZD_.js +3 -0
  2. package/dist/WebhookProcessor-BUZFeZD_.js.map +1 -0
  3. package/dist/WebhookProcessor-Dq2Pa2cY.d.ts +718 -0
  4. package/dist/WebhookProcessor-Dq2Pa2cY.d.ts.map +1 -0
  5. package/dist/api/encryption/index.d.ts +3 -10
  6. package/dist/api/encryption/index.js +1 -2
  7. package/dist/api/flow/index.d.ts +5 -11
  8. package/dist/api/flow/index.js +1 -2
  9. package/dist/api/index.d.ts +17 -18
  10. package/dist/api/index.js +1 -2
  11. package/dist/api/media/index.d.ts +3 -10
  12. package/dist/api/media/index.js +1 -2
  13. package/dist/api/messages/builders/index.d.ts +442 -439
  14. package/dist/api/messages/builders/index.d.ts.map +1 -0
  15. package/dist/api/messages/builders/index.js +1 -3
  16. package/dist/api/messages/builders/index.js.map +1 -1
  17. package/dist/api/messages/index.d.ts +4 -10
  18. package/dist/api/messages/index.js +1 -2
  19. package/dist/api/phone/index.d.ts +3 -10
  20. package/dist/api/phone/index.js +1 -2
  21. package/dist/api/profile/index.d.ts +3 -10
  22. package/dist/api/profile/index.js +1 -2
  23. package/dist/api/qrCode/index.d.ts +3 -10
  24. package/dist/api/qrCode/index.js +1 -2
  25. package/dist/api/registration/index.d.ts +3 -10
  26. package/dist/api/registration/index.js +1 -2
  27. package/dist/api/template/index.d.ts +3 -21
  28. package/dist/api/template/index.js +1 -2
  29. package/dist/api/twoStepVerification/index.d.ts +3 -10
  30. package/dist/api/twoStepVerification/index.js +1 -2
  31. package/dist/api/waba/index.d.ts +3 -10
  32. package/dist/api/waba/index.js +1 -2
  33. package/dist/api-8hRAOyaL.js +1 -0
  34. package/dist/base-CfDkvT1x.d.ts +807 -0
  35. package/dist/base-CfDkvT1x.d.ts.map +1 -0
  36. package/dist/base-D-cXu_lA.js +2 -0
  37. package/dist/base-D-cXu_lA.js.map +1 -0
  38. package/dist/buildFieldsQueryString-Cr-jz3p0.js +2 -0
  39. package/dist/buildFieldsQueryString-Cr-jz3p0.js.map +1 -0
  40. package/dist/chunk-CTAAG5j7.js +1 -0
  41. package/dist/common-C6FXBDm7.js +2 -0
  42. package/dist/common-C6FXBDm7.js.map +1 -0
  43. package/dist/common-CVbsmD26.d.ts +426 -0
  44. package/dist/common-CVbsmD26.d.ts.map +1 -0
  45. package/dist/common-CvPVD1o6.d.ts +406 -0
  46. package/dist/common-CvPVD1o6.d.ts.map +1 -0
  47. package/dist/core/webhook/frameworks/express.d.ts +20 -53
  48. package/dist/core/webhook/frameworks/express.js +1 -2
  49. package/dist/core/webhook/frameworks/nextjs-app.d.ts +36 -39
  50. package/dist/core/webhook/frameworks/nextjs-app.d.ts.map +1 -0
  51. package/dist/core/webhook/frameworks/nextjs-app.js +1 -1
  52. package/dist/core/webhook/frameworks/nextjs-app.js.map +1 -1
  53. package/dist/core/webhook/frameworks/nextjs.d.ts +20 -49
  54. package/dist/core/webhook/frameworks/nextjs.js +1 -2
  55. package/dist/core/webhook/index.d.ts +20 -29
  56. package/dist/core/webhook/index.js +1 -2
  57. package/dist/core/whatsapp/index.d.ts +18 -42
  58. package/dist/core/whatsapp/index.js +1 -2
  59. package/dist/encryption-Cwc0xcVL.js +2 -0
  60. package/dist/encryption-Cwc0xcVL.js.map +1 -0
  61. package/dist/enums-CSUpFXb8.js +2 -0
  62. package/dist/enums-CSUpFXb8.js.map +1 -0
  63. package/dist/express-B6fQdflY.d.ts +78 -0
  64. package/dist/express-B6fQdflY.d.ts.map +1 -0
  65. package/dist/express-CrfNLYMM.js +2 -0
  66. package/dist/express-CrfNLYMM.js.map +1 -0
  67. package/dist/flow-CVes0Qus.js +2 -0
  68. package/dist/flow-CVes0Qus.js.map +1 -0
  69. package/dist/flowTypeGuards-Gn3-slCW.js +2 -0
  70. package/dist/flowTypeGuards-Gn3-slCW.js.map +1 -0
  71. package/dist/handler-BGqjZ0xg.js +2 -0
  72. package/dist/handler-BGqjZ0xg.js.map +1 -0
  73. package/dist/index-3KglHVAg.d.ts +354 -0
  74. package/dist/index-3KglHVAg.d.ts.map +1 -0
  75. package/dist/index-BNeg6hHx.d.ts +99 -0
  76. package/dist/index-BNeg6hHx.d.ts.map +1 -0
  77. package/dist/index-BiTq23oi.d.ts +34 -0
  78. package/dist/index-BiTq23oi.d.ts.map +1 -0
  79. package/dist/index-BmfnREgM.d.ts +47 -0
  80. package/dist/index-BmfnREgM.d.ts.map +1 -0
  81. package/dist/index-CaGffSja.d.ts +24 -0
  82. package/dist/index-CaGffSja.d.ts.map +1 -0
  83. package/dist/index-CeTmbIXi.d.ts +180 -0
  84. package/dist/index-CeTmbIXi.d.ts.map +1 -0
  85. package/dist/index-CoyByMuM.d.ts +137 -0
  86. package/dist/index-CoyByMuM.d.ts.map +1 -0
  87. package/dist/index-CwujtcvH.d.ts +370 -0
  88. package/dist/index-CwujtcvH.d.ts.map +1 -0
  89. package/dist/index-DQ7z58xp.d.ts +104 -0
  90. package/dist/index-DQ7z58xp.d.ts.map +1 -0
  91. package/dist/index-DQkgkiB6.d.ts +30 -0
  92. package/dist/index-DQkgkiB6.d.ts.map +1 -0
  93. package/dist/index-LKrIp3Oo.d.ts +1 -0
  94. package/dist/index-_-06JPan.d.ts +143 -0
  95. package/dist/index-_-06JPan.d.ts.map +1 -0
  96. package/dist/index-a_YS40Iv.d.ts +91 -0
  97. package/dist/index-a_YS40Iv.d.ts.map +1 -0
  98. package/dist/index-d7TLqtYh.d.ts +171 -0
  99. package/dist/index-d7TLqtYh.d.ts.map +1 -0
  100. package/dist/index.d.ts +21 -27
  101. package/dist/index.js +1 -1
  102. package/dist/index.js.map +1 -1
  103. package/dist/{isMetaError-CQLXyEL4.d.ts → isMetaError-B3AglYeY.d.ts} +28 -25
  104. package/dist/isMetaError-B3AglYeY.d.ts.map +1 -0
  105. package/dist/media-Dw5OGzDD.js +2 -0
  106. package/dist/media-Dw5OGzDD.js.map +1 -0
  107. package/dist/messages-h5-NW8QO.js +2 -0
  108. package/dist/messages-h5-NW8QO.js.map +1 -0
  109. package/dist/nextjs-DxRCL4t3.js +2 -0
  110. package/dist/nextjs-DxRCL4t3.js.map +1 -0
  111. package/dist/objectToQueryString-CAHI0qTs.js +2 -0
  112. package/dist/objectToQueryString-CAHI0qTs.js.map +1 -0
  113. package/dist/phone-CZyWLyWB.js +2 -0
  114. package/dist/phone-CZyWLyWB.js.map +1 -0
  115. package/dist/profile-Bb7GDP0n.js +2 -0
  116. package/dist/profile-Bb7GDP0n.js.map +1 -0
  117. package/dist/qrCode-CeZEtX9J.js +2 -0
  118. package/dist/qrCode-CeZEtX9J.js.map +1 -0
  119. package/dist/registration-BkjhC3xw.js +2 -0
  120. package/dist/registration-BkjhC3xw.js.map +1 -0
  121. package/dist/template-Bgy-BCXJ.js +2 -0
  122. package/dist/template-Bgy-BCXJ.js.map +1 -0
  123. package/dist/twoStepVerification-DYlYF_P5.js +2 -0
  124. package/dist/twoStepVerification-DYlYF_P5.js.map +1 -0
  125. package/dist/types/index.d.ts +3 -6
  126. package/dist/types/index.js +1 -2
  127. package/dist/utils/index.d.ts +23 -20
  128. package/dist/utils/index.d.ts.map +1 -0
  129. package/dist/utils/index.js +1 -2
  130. package/dist/version-BUuqrHc6.js +3 -0
  131. package/dist/version-BUuqrHc6.js.map +1 -0
  132. package/dist/waba-SF2W3z2U.js +2 -0
  133. package/dist/waba-SF2W3z2U.js.map +1 -0
  134. package/dist/webhook-D4DQ01Xq.js +2 -0
  135. package/dist/webhook-D4DQ01Xq.js.map +1 -0
  136. package/dist/whatsapp-B85mxH5f.js +10 -0
  137. package/dist/whatsapp-B85mxH5f.js.map +1 -0
  138. package/package.json +27 -125
  139. package/dist/BusinessProfileApi-C_sEOrWM.d.ts +0 -353
  140. package/dist/EncryptionApi-CcCfeK2b.d.ts +0 -22
  141. package/dist/FlowApi-DDHrFT_Q.d.ts +0 -136
  142. package/dist/MediaApi-CY9RVo7u.d.ts +0 -90
  143. package/dist/MessageApi-CX_jN8da.d.ts +0 -171
  144. package/dist/PhoneNumberApi-B-hY7g1M.d.ts +0 -142
  145. package/dist/QrCodeApi-DRICKN04.d.ts +0 -98
  146. package/dist/RegistrationApi-CFPzU1Vw.d.ts +0 -47
  147. package/dist/TemplateApi-fCIlzBtK.d.ts +0 -161
  148. package/dist/TwoStepVerificationApi-C0jpAKfu.d.ts +0 -33
  149. package/dist/WabaApi-x5PhsLT3.d.ts +0 -175
  150. package/dist/WebhookProcessor-DEIZ2PRU.d.ts +0 -707
  151. package/dist/WhatsApp-BFsBgjJO.d.ts +0 -82
  152. package/dist/api/encryption/index.js.map +0 -1
  153. package/dist/api/flow/index.js.map +0 -1
  154. package/dist/api/index.js.map +0 -1
  155. package/dist/api/media/index.js.map +0 -1
  156. package/dist/api/messages/index.js.map +0 -1
  157. package/dist/api/phone/index.js.map +0 -1
  158. package/dist/api/profile/index.js.map +0 -1
  159. package/dist/api/qrCode/index.js.map +0 -1
  160. package/dist/api/registration/index.js.map +0 -1
  161. package/dist/api/template/index.js.map +0 -1
  162. package/dist/api/twoStepVerification/index.js.map +0 -1
  163. package/dist/api/waba/index.js.map +0 -1
  164. package/dist/base-BV6DyzGS.d.ts +0 -18
  165. package/dist/chunk-5577QQ7V.js +0 -2
  166. package/dist/chunk-5577QQ7V.js.map +0 -1
  167. package/dist/chunk-6DFC5L3X.js +0 -2
  168. package/dist/chunk-6DFC5L3X.js.map +0 -1
  169. package/dist/chunk-7QBIZCJ4.js +0 -2
  170. package/dist/chunk-7QBIZCJ4.js.map +0 -1
  171. package/dist/chunk-AMHQGG6Z.js +0 -2
  172. package/dist/chunk-AMHQGG6Z.js.map +0 -1
  173. package/dist/chunk-BAOZ4U74.js +0 -10
  174. package/dist/chunk-BAOZ4U74.js.map +0 -1
  175. package/dist/chunk-CRZ7EUYR.js +0 -2
  176. package/dist/chunk-CRZ7EUYR.js.map +0 -1
  177. package/dist/chunk-FKXSL2JK.js +0 -3
  178. package/dist/chunk-FKXSL2JK.js.map +0 -1
  179. package/dist/chunk-FSKBLPGE.js +0 -2
  180. package/dist/chunk-FSKBLPGE.js.map +0 -1
  181. package/dist/chunk-GM63NGNV.js +0 -2
  182. package/dist/chunk-GM63NGNV.js.map +0 -1
  183. package/dist/chunk-IYSR44P6.js +0 -2
  184. package/dist/chunk-IYSR44P6.js.map +0 -1
  185. package/dist/chunk-J2JPTKU6.js +0 -2
  186. package/dist/chunk-J2JPTKU6.js.map +0 -1
  187. package/dist/chunk-JC6YMVID.js +0 -2
  188. package/dist/chunk-JC6YMVID.js.map +0 -1
  189. package/dist/chunk-JPAV644F.js +0 -2
  190. package/dist/chunk-JPAV644F.js.map +0 -1
  191. package/dist/chunk-JXCLRKQ7.js +0 -2
  192. package/dist/chunk-JXCLRKQ7.js.map +0 -1
  193. package/dist/chunk-KMAH6636.js +0 -2
  194. package/dist/chunk-KMAH6636.js.map +0 -1
  195. package/dist/chunk-L4ESAO2S.js +0 -2
  196. package/dist/chunk-L4ESAO2S.js.map +0 -1
  197. package/dist/chunk-LV3TULSI.js +0 -2
  198. package/dist/chunk-LV3TULSI.js.map +0 -1
  199. package/dist/chunk-MJEG3K4V.js +0 -2
  200. package/dist/chunk-MJEG3K4V.js.map +0 -1
  201. package/dist/chunk-PHPQ5HP3.js +0 -2
  202. package/dist/chunk-PHPQ5HP3.js.map +0 -1
  203. package/dist/chunk-RIL6QABY.js +0 -2
  204. package/dist/chunk-RIL6QABY.js.map +0 -1
  205. package/dist/chunk-RWCVPWRC.js +0 -2
  206. package/dist/chunk-RWCVPWRC.js.map +0 -1
  207. package/dist/chunk-SNNRWNGZ.js +0 -2
  208. package/dist/chunk-SNNRWNGZ.js.map +0 -1
  209. package/dist/chunk-U5FBZ6UB.js +0 -3
  210. package/dist/chunk-U5FBZ6UB.js.map +0 -1
  211. package/dist/chunk-VHAODWCN.js +0 -2
  212. package/dist/chunk-VHAODWCN.js.map +0 -1
  213. package/dist/chunk-ZMNXRMWK.js +0 -2
  214. package/dist/chunk-ZMNXRMWK.js.map +0 -1
  215. package/dist/common-B8kp4RdL.d.ts +0 -403
  216. package/dist/common-CGbls9Y8.d.ts +0 -425
  217. package/dist/core/webhook/frameworks/express.js.map +0 -1
  218. package/dist/core/webhook/frameworks/nextjs.js.map +0 -1
  219. package/dist/core/webhook/index.js.map +0 -1
  220. package/dist/core/whatsapp/index.js.map +0 -1
  221. package/dist/enums-DIimUG6s.d.ts +0 -707
  222. package/dist/factory-kNha6WaY.d.ts +0 -200
  223. package/dist/handler-DbySwF0E.d.ts +0 -20
  224. package/dist/httpsClient-Cbd2Y6mg.d.ts +0 -19
  225. package/dist/logger-BdE0Vyim.d.ts +0 -9
  226. package/dist/request-CUjrMn8R.d.ts +0 -50
  227. package/dist/types/config.d.ts +0 -78
  228. package/dist/types/config.js +0 -2
  229. package/dist/types/config.js.map +0 -1
  230. package/dist/types/enums.d.ts +0 -1
  231. package/dist/types/enums.js +0 -2
  232. package/dist/types/enums.js.map +0 -1
  233. package/dist/types/index.js.map +0 -1
  234. package/dist/utils/index.js.map +0 -1
@@ -1,49 +1,20 @@
1
- import { a as BaseRequest, b as BaseResponse, B as BaseWebhookConfig } from '../../../handler-DbySwF0E.js';
2
- import { c as WebhookProcessor } from '../../../WebhookProcessor-DEIZ2PRU.js';
3
- import '../../../types/config.js';
4
- import '../../../enums-DIimUG6s.js';
5
- import '../../../common-B8kp4RdL.js';
6
- import '../../../request-CUjrMn8R.js';
7
- import 'http';
8
- import '../../../WhatsApp-BFsBgjJO.js';
9
- import '../../../httpsClient-Cbd2Y6mg.js';
10
- import 'https';
11
- import '../../../EncryptionApi-CcCfeK2b.js';
12
- import '../../../base-BV6DyzGS.js';
13
- import '../../../FlowApi-DDHrFT_Q.js';
14
- import '../../../MediaApi-CY9RVo7u.js';
15
- import '../../../MessageApi-CX_jN8da.js';
16
- import '../../../common-CGbls9Y8.js';
17
- import '../../../PhoneNumberApi-B-hY7g1M.js';
18
- import '../../../BusinessProfileApi-C_sEOrWM.js';
19
- import '../../../QrCodeApi-DRICKN04.js';
20
- import '../../../RegistrationApi-CFPzU1Vw.js';
21
- import '../../../TemplateApi-fCIlzBtK.js';
22
- import '../../../TwoStepVerificationApi-C0jpAKfu.js';
23
- import '../../../WabaApi-x5PhsLT3.js';
24
-
25
- interface BaseApiRequest extends BaseRequest {
26
- method?: string;
27
- url?: string;
28
- headers: Record<string, string | string[] | undefined>;
29
- body?: any;
30
- query: Partial<Record<string, string | string[]>>;
31
- rawBody?: any;
32
- }
33
- interface BaseApiResponse extends BaseResponse {
34
- status(code: number): any;
35
- json(data: any): void | any;
36
- send(data?: any): void | any;
37
- setHeader(name: string, value: string): void;
38
- }
39
- interface NextJsWebhookConfig extends BaseWebhookConfig {
40
- }
41
- declare function webhookHandler<TRequest extends BaseApiRequest, TResponse extends BaseApiResponse>(config: NextJsWebhookConfig): {
42
- GET: (req: TRequest, res: TResponse) => Promise<any>;
43
- POST: (req: TRequest, res: TResponse) => Promise<any>;
44
- webhook: (req: TRequest, res: TResponse) => Promise<any>;
45
- flow: (req: TRequest, res: TResponse) => Promise<any>;
46
- processor: WebhookProcessor;
47
- };
48
-
49
- export { type BaseApiRequest, type BaseApiResponse, type NextJsWebhookConfig, webhookHandler };
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,2 +1 @@
1
- export{a as webhookHandler}from'../../../chunk-GM63NGNV.js';import'../../../chunk-5577QQ7V.js';import'../../../chunk-U5FBZ6UB.js';import'../../../chunk-6DFC5L3X.js';import'../../../chunk-BAOZ4U74.js';import'../../../chunk-FKXSL2JK.js';import'../../../chunk-AMHQGG6Z.js';import'../../../chunk-VHAODWCN.js';import'../../../chunk-JPAV644F.js';import'../../../chunk-PHPQ5HP3.js';import'../../../chunk-IYSR44P6.js';import'../../../chunk-SNNRWNGZ.js';import'../../../chunk-L4ESAO2S.js';import'../../../chunk-7QBIZCJ4.js';import'../../../chunk-JXCLRKQ7.js';import'../../../chunk-LV3TULSI.js';import'../../../chunk-CRZ7EUYR.js';import'../../../chunk-JC6YMVID.js';import'../../../chunk-J2JPTKU6.js';import'../../../chunk-FSKBLPGE.js';import'../../../chunk-MJEG3K4V.js';import'../../../chunk-RIL6QABY.js';import'../../../chunk-KMAH6636.js';//# sourceMappingURL=nextjs.js.map
2
- //# sourceMappingURL=nextjs.js.map
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,29 +1,20 @@
1
- export { ExpressRequest, ExpressResponse, webhookHandler as ExpressWebhook, ExpressWebhookConfig, NextFunction } from './frameworks/express.js';
2
- export { webhookHandler as NextJsWebhook, NextJsWebhookConfig } from './frameworks/nextjs.js';
3
- export { F as FlowHandler, e as MessageHandler, M as MessageStatus, W as WebhookContact, a as WebhookEvent, b as WebhookMessage, c as WebhookProcessor, d as WebhookResponse, g as constructFullUrl, f as processFlowRequest, p as processWebhookMessages } from '../../WebhookProcessor-DEIZ2PRU.js';
4
- import '../../handler-DbySwF0E.js';
5
- import '../../types/config.js';
6
- import '../../enums-DIimUG6s.js';
7
- import '../../common-B8kp4RdL.js';
8
- import '../../request-CUjrMn8R.js';
9
- import 'http';
10
- import '../../WhatsApp-BFsBgjJO.js';
11
- import '../../httpsClient-Cbd2Y6mg.js';
12
- import 'https';
13
- import '../../EncryptionApi-CcCfeK2b.js';
14
- import '../../base-BV6DyzGS.js';
15
- import '../../FlowApi-DDHrFT_Q.js';
16
- import '../../MediaApi-CY9RVo7u.js';
17
- import '../../MessageApi-CX_jN8da.js';
18
- import '../../common-CGbls9Y8.js';
19
- import '../../PhoneNumberApi-B-hY7g1M.js';
20
- import '../../BusinessProfileApi-C_sEOrWM.js';
21
- import '../../QrCodeApi-DRICKN04.js';
22
- import '../../RegistrationApi-CFPzU1Vw.js';
23
- import '../../TemplateApi-fCIlzBtK.js';
24
- import '../../TwoStepVerificationApi-C0jpAKfu.js';
25
- import '../../WabaApi-x5PhsLT3.js';
26
-
27
- declare const generateXHub256Sig: (body: string, appSecret: string) => string;
28
-
29
- export { generateXHub256Sig };
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,2 +1 @@
1
- export{a as generateXHub256Sig}from'../../chunk-RWCVPWRC.js';export{a as ExpressWebhook}from'../../chunk-ZMNXRMWK.js';export{a as NextJsWebhook}from'../../chunk-GM63NGNV.js';import'../../chunk-5577QQ7V.js';export{d as WebhookProcessor,c as constructFullUrl,b as processFlowRequest,a as processWebhookMessages}from'../../chunk-U5FBZ6UB.js';import'../../chunk-6DFC5L3X.js';import'../../chunk-BAOZ4U74.js';import'../../chunk-FKXSL2JK.js';import'../../chunk-AMHQGG6Z.js';import'../../chunk-VHAODWCN.js';import'../../chunk-JPAV644F.js';import'../../chunk-PHPQ5HP3.js';import'../../chunk-IYSR44P6.js';import'../../chunk-SNNRWNGZ.js';import'../../chunk-L4ESAO2S.js';import'../../chunk-7QBIZCJ4.js';import'../../chunk-JXCLRKQ7.js';import'../../chunk-LV3TULSI.js';import'../../chunk-CRZ7EUYR.js';import'../../chunk-JC6YMVID.js';import'../../chunk-J2JPTKU6.js';import'../../chunk-FSKBLPGE.js';import'../../chunk-MJEG3K4V.js';import'../../chunk-RIL6QABY.js';import'../../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
- //# sourceMappingURL=index.js.map
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,42 +1,18 @@
1
- import { E as EncryptionApi } from '../../EncryptionApi-CcCfeK2b.js';
2
- import { F as FlowApi } from '../../FlowApi-DDHrFT_Q.js';
3
- import { WhatsAppConfig } from '../../types/config.js';
4
- import { M as MediaApi } from '../../MediaApi-CY9RVo7u.js';
5
- import { M as MessagesApi } from '../../MessageApi-CX_jN8da.js';
6
- import { P as PhoneNumberApi } from '../../PhoneNumberApi-B-hY7g1M.js';
7
- import { B as BusinessProfileApi } from '../../BusinessProfileApi-C_sEOrWM.js';
8
- import { Q as QrCodeApi } from '../../QrCodeApi-DRICKN04.js';
9
- import { R as RegistrationApi } from '../../RegistrationApi-CFPzU1Vw.js';
10
- import { T as TemplateApi } from '../../TemplateApi-fCIlzBtK.js';
11
- import { T as TwoStepVerificationApi } from '../../TwoStepVerificationApi-C0jpAKfu.js';
12
- import { W as WabaApi } from '../../WabaApi-x5PhsLT3.js';
13
- export { W as WhatsApp } from '../../WhatsApp-BFsBgjJO.js';
14
- import '../../base-BV6DyzGS.js';
15
- import '../../enums-DIimUG6s.js';
16
- import '../../request-CUjrMn8R.js';
17
- import '../../common-B8kp4RdL.js';
18
- import 'http';
19
- import '../../common-CGbls9Y8.js';
20
- import '../../httpsClient-Cbd2Y6mg.js';
21
- import 'https';
22
-
23
- declare class WhatsAppClass {
24
- constructor(config?: WhatsAppConfig);
25
- readonly messages: MessagesApi;
26
- readonly templates: TemplateApi;
27
- readonly phoneNumber: PhoneNumberApi;
28
- readonly qrCode: QrCodeApi;
29
- readonly encryption: EncryptionApi;
30
- readonly twoStepVerification: TwoStepVerificationApi;
31
- readonly registration: RegistrationApi;
32
- readonly media: MediaApi;
33
- readonly waba: WabaApi;
34
- readonly flow: FlowApi;
35
- readonly businessProfile: BusinessProfileApi;
36
- updateTimeout(ms: number): boolean;
37
- updatePhoneNumberId(phoneNumberId: number): boolean;
38
- updateAccessToken(accessToken: string): boolean;
39
- updateWabaId(wabaId: string): boolean;
40
- }
41
-
42
- export { WhatsAppClass };
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,2 +1 @@
1
- export{b as WhatsApp}from'../../chunk-BAOZ4U74.js';import'../../chunk-FKXSL2JK.js';import'../../chunk-AMHQGG6Z.js';import'../../chunk-VHAODWCN.js';import'../../chunk-JPAV644F.js';import'../../chunk-PHPQ5HP3.js';import'../../chunk-IYSR44P6.js';import'../../chunk-SNNRWNGZ.js';import'../../chunk-L4ESAO2S.js';import'../../chunk-7QBIZCJ4.js';import'../../chunk-JXCLRKQ7.js';import'../../chunk-LV3TULSI.js';import'../../chunk-CRZ7EUYR.js';import'../../chunk-JC6YMVID.js';import'../../chunk-J2JPTKU6.js';import'../../chunk-FSKBLPGE.js';import'../../chunk-MJEG3K4V.js';import'../../chunk-RIL6QABY.js';import'../../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
- //# sourceMappingURL=index.js.map
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};
@@ -0,0 +1,2 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ import{__export as e}from"./chunk-CTAAG5j7.js";var t=e({AudioMediaTypesEnum:()=>v,BusinessVerticalEnum:()=>E,ButtonPositionEnum:()=>c,CategoryEnum:()=>n,ComponentTypesEnum:()=>u,ConversationTypesEnum:()=>f,CurrencyCodesEnum:()=>w,DataLocalizationRegionEnum:()=>T,DocumentMediaTypesEnum:()=>_,HttpMethodsEnum:()=>i,ImageMediaTypesEnum:()=>g,InteractiveTypesEnum:()=>s,LanguagesEnum:()=>C,MessageTypesEnum:()=>a,ParametersTypesEnum:()=>o,ReferralSourceTypesEnum:()=>x,RequestCodeMethodsEnum:()=>S,StatusEnum:()=>p,StickerMediaTypesEnum:()=>h,SubTypeEnum:()=>l,SystemChangeTypesEnum:()=>b,TemplateStatusEnum:()=>r,VideoMediaTypesEnum:()=>m,WabaConfigEnum:()=>d,WebhookTypesEnum:()=>y});let n=function(e){return e.Authentication=`AUTHENTICATION`,e.Marketing=`MARKETING`,e.Utility=`UTILITY`,e}({}),r=function(e){return e.Approved=`APPROVED`,e.Pending=`PENDING`,e.Rejected=`REJECTED`,e}({}),i=function(e){return e.Get=`GET`,e.Post=`POST`,e.Put=`PUT`,e.Delete=`DELETE`,e}({}),a=function(e){return e.Audio=`audio`,e.Contacts=`contacts`,e.Document=`document`,e.Image=`image`,e.Interactive=`interactive`,e.Location=`location`,e.Reaction=`reaction`,e.Sticker=`sticker`,e.Template=`template`,e.Text=`text`,e.Video=`video`,e.Button=`button`,e.Order=`order`,e.System=`system`,e.Unknown=`unknown`,e.Statuses=`statuses`,e[`*`]=`*`,e}({}),o=function(e){return e.Action=`ACTION`,e.CouponCode=`COUPON_CODE`,e.Currency=`CURRENCY`,e.DateTime=`DATE_TIME`,e.Document=`DOCUMENT`,e.ExpirationTimeMs=`EXPIRATION_TIME_MS`,e.Image=`IMAGE`,e.LimitedTimeOffer=`LIMITED_TIME_OFFER`,e.Location=`LOCATION`,e.OrderStatus=`ORDER_STATUS`,e.Payload=`PAYLOAD`,e.Product=`PRODUCT`,e.Text=`TEXT`,e.TtlMinutes=`TTL_MINUTES`,e.Video=`VIDEO`,e.WebviewInteraction=`WEBVIEW_INTERACTION`,e.WebviewPresentation=`WEBVIEW_PRESENTATION`,e}({}),s=function(e){return e.Button=`button`,e.List=`list`,e.Product=`product`,e.ProductList=`product_list`,e.CtaUrl=`cta_url`,e.LocationRequest=`location_request_message`,e.AddressMessage=`address_message`,e.Flow=`flow`,e}({}),c=function(e){return e[e.First=1]=`First`,e[e.Second=2]=`Second`,e[e.Third=3]=`Third`,e[e.Fourth=4]=`Fourth`,e[e.Fifth=5]=`Fifth`,e}({}),l=function(e){return e.Catalog=`CATALOG`,e.CopyCode=`COPY_CODE`,e.Flow=`FLOW`,e.Mpm=`MPM`,e.OrderDetails=`ORDER_DETAILS`,e.QuickReply=`QUICK_REPLY`,e.Reminder=`REMINDER`,e.Url=`URL`,e.VoiceCall=`VOICE_CALL`,e}({}),u=function(e){return e.Header=`HEADER`,e.Body=`BODY`,e.Button=`BUTTON`,e.Footer=`FOOTER`,e}({}),d=function(e){return e.AppId=`M4D_APP_ID`,e.Port=`WA_PORT`,e.AppSecret=`M4D_APP_SECRET`,e.PhoneNumberId=`WA_PHONE_NUMBER_ID`,e.BusinessAcctId=`WA_BUSINESS_ACCOUNT_ID`,e.APIVersion=`CLOUD_API_VERSION`,e.AccessToken=`CLOUD_API_ACCESS_TOKEN`,e.WebhookEndpoint=`WEBHOOK_ENDPOINT`,e.WebhookVerificationToken=`WEBHOOK_VERIFICATION_TOKEN`,e.ListenerPort=`LISTENER_PORT`,e.MaxRetriesAfterWait=`MAX_RETRIES_AFTER_WAIT`,e.RequestTimeout=`REQUEST_TIMEOUT`,e.Debug=`DEBUG`,e.PrivatePem=`FLOW_API_PRIVATE_PEM`,e.Passphrase=`FLOW_API_PASSPHRASE`,e}({}),f=function(e){return e.BusinessInitiated=`business_initiated`,e.CustomerInitiated=`customer_initiated`,e.ReferralConversion=`referral_conversion`,e}({}),p=function(e){return e.Delivered=`delivered`,e.Read=`read`,e.Sent=`sent`,e}({}),m=function(e){return e.Mp4=`video/mp4`,e.Threegp=`video/3gp`,e}({}),h=function(e){return e.Webp=`image/webp`,e}({}),g=function(e){return e.Jpeg=`image/jpeg`,e.Png=`image/png`,e}({}),_=function(e){return e.Text=`text/plain`,e.Pdf=`application/pdf`,e.Ppt=`application/vnd.ms-powerpoint`,e.Word=`application/msword`,e.Excel=`application/vnd.ms-excel`,e.OpenDoc=`application/vnd.openxmlformats-officedocument.wordprocessingml.document`,e.OpenPres=`application/vnd.openxmlformats-officedocument.presentationml.presentation`,e.OpenSheet=`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,e}({}),v=function(e){return e.Aac=`audio/aac`,e.Mp4=`audio/mp4`,e.Mpeg=`audio/mpeg`,e.Amr=`audio/amr`,e.Ogg=`audio/ogg`,e}({}),y=function(e){return e.Audio=`audio`,e.Button=`button`,e.Document=`document`,e.Text=`text`,e.Image=`image`,e.Interactive=`interactive`,e.Order=`order`,e.Sticker=`sticker`,e.System=`system`,e.Unknown=`unknown`,e.Video=`video`,e}({}),b=function(e){return e.CustomerChangedNumber=`customer_changed_number`,e.CustomerIdentityChanged=`customer_identity_changed`,e}({}),x=function(e){return e.Ad=`ad`,e.Post=`post`,e}({}),S=function(e){return e.Sms=`SMS`,e.Voice=`VOICE`,e}({}),C=function(e){return e.Afrikaans=`af`,e.Albanian=`sq`,e.Arabic=`ar`,e.Azerbaijani=`az`,e.Bengali=`bn`,e.Bulgarian=`bg`,e.Catalan=`ca`,e.Chinese_CHN=`zh_CN`,e.Chinese_HKG=`zh_HK`,e.Chinese_TAI=`zh_TW`,e.Croatian=`hr`,e.Czech=`cs`,e.Danish=`da`,e.Dutch=`nl`,e.English=`en`,e.English_UK=`en_GB`,e.English_US=`en_US`,e.Estonian=`et`,e.Filipino=`fil`,e.Finnish=`fi`,e.French=`fr`,e.Georgian=`ka`,e.German=`de`,e.Greek=`el`,e.Gujarati=`gu`,e.Hausa=`ha`,e.Hebrew=`he`,e.Hindi=`hi`,e.Hungarian=`hu`,e.Indonesian=`id`,e.Irish=`ga`,e.Italian=`it`,e.Japanese=`ja`,e.Kannada=`kn`,e.Kazakh=`kk`,e.Kinyarwanda=`rw_RW`,e.Korean=`ko`,e.Kyrgyz_Kyrgyzstan=`ky_KG`,e.Lao=`lo`,e.Latvian=`lv`,e.Lithuanian=`lt`,e.Macedonian=`mk`,e.Malay=`ms`,e.Malayalam=`ml`,e.Marathi=`mr`,e.Norwegian=`nb`,e.Persian=`fa`,e.Polish=`pl`,e.Portuguese_BR=`pt_BR`,e.Portuguese_POR=`pt_PT`,e.Punjabi=`pa`,e.Romanian=`ro`,e.Russian=`ru`,e.Serbian=`sr`,e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=`EDU`,e.ENTERTAIN=`ENTERTAIN`,e.EVENT_PLAN=`EVENT_PLAN`,e.FINANCE=`FINANCE`,e.GOVT=`GOVT`,e.GROCERY=`GROCERY`,e.HEALTH=`HEALTH`,e.HOTEL=`HOTEL`,e.NONPROFIT=`NONPROFIT`,e.ONLINE_GAMBLING=`ONLINE_GAMBLING`,e.OTC_DRUGS=`OTC_DRUGS`,e.OTHER=`OTHER`,e.PHYSICAL_GAMBLING=`PHYSICAL_GAMBLING`,e.PROF_SERVICES=`PROF_SERVICES`,e.RESTAURANT=`RESTAURANT`,e.RETAIL=`RETAIL`,e.TRAVEL=`TRAVEL`,e}({});export{v as AudioMediaTypesEnum,E as BusinessVerticalEnum,c as ButtonPositionEnum,n as CategoryEnum,u as ComponentTypesEnum,f as ConversationTypesEnum,w as CurrencyCodesEnum,T as DataLocalizationRegionEnum,_ as DocumentMediaTypesEnum,i as HttpMethodsEnum,g as ImageMediaTypesEnum,s as InteractiveTypesEnum,C as LanguagesEnum,a as MessageTypesEnum,o as ParametersTypesEnum,x as ReferralSourceTypesEnum,S as RequestCodeMethodsEnum,p as StatusEnum,h as StickerMediaTypesEnum,l as SubTypeEnum,b as SystemChangeTypesEnum,r as TemplateStatusEnum,m as VideoMediaTypesEnum,d as WabaConfigEnum,y as WebhookTypesEnum,t as enums_exports};
2
+ //# sourceMappingURL=enums-CSUpFXb8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums-CSUpFXb8.js","names":[],"sources":["../src/types/enums.ts"],"sourcesContent":["export enum CategoryEnum {\n Authentication = 'AUTHENTICATION',\n Marketing = 'MARKETING',\n Utility = 'UTILITY',\n}\n\nexport enum TemplateStatusEnum {\n Approved = 'APPROVED',\n Pending = 'PENDING',\n Rejected = 'REJECTED',\n}\n\nexport enum HttpMethodsEnum {\n Get = 'GET',\n Post = 'POST',\n Put = 'PUT',\n Delete = 'DELETE',\n}\n\nexport enum MessageTypesEnum {\n Audio = 'audio',\n Contacts = 'contacts',\n Document = 'document',\n Image = 'image',\n Interactive = 'interactive',\n Location = 'location',\n Reaction = 'reaction',\n Sticker = 'sticker',\n Template = 'template',\n Text = 'text',\n Video = 'video',\n Button = 'button',\n Order = 'order',\n System = 'system',\n Unknown = 'unknown',\n Statuses = 'statuses',\n '*' = '*',\n}\n\nexport enum ParametersTypesEnum {\n Action = 'ACTION',\n CouponCode = 'COUPON_CODE',\n Currency = 'CURRENCY',\n DateTime = 'DATE_TIME',\n Document = 'DOCUMENT',\n ExpirationTimeMs = 'EXPIRATION_TIME_MS',\n Image = 'IMAGE',\n LimitedTimeOffer = 'LIMITED_TIME_OFFER',\n Location = 'LOCATION',\n OrderStatus = 'ORDER_STATUS',\n Payload = 'PAYLOAD',\n Product = 'PRODUCT',\n Text = 'TEXT',\n TtlMinutes = 'TTL_MINUTES',\n Video = 'VIDEO',\n WebviewInteraction = 'WEBVIEW_INTERACTION',\n WebviewPresentation = 'WEBVIEW_PRESENTATION',\n}\n\nexport enum InteractiveTypesEnum {\n Button = 'button',\n List = 'list',\n Product = 'product',\n ProductList = 'product_list',\n CtaUrl = 'cta_url',\n LocationRequest = 'location_request_message',\n AddressMessage = 'address_message',\n Flow = 'flow',\n}\n\nexport enum ButtonPositionEnum {\n First = 1,\n Second = 2,\n Third = 3,\n Fourth = 4,\n Fifth = 5,\n}\n\nexport enum SubTypeEnum {\n Catalog = 'CATALOG',\n CopyCode = 'COPY_CODE',\n Flow = 'FLOW',\n Mpm = 'MPM',\n OrderDetails = 'ORDER_DETAILS',\n QuickReply = 'QUICK_REPLY',\n Reminder = 'REMINDER',\n Url = 'URL',\n VoiceCall = 'VOICE_CALL',\n}\n\nexport enum ComponentTypesEnum {\n Header = 'HEADER',\n Body = 'BODY',\n Button = 'BUTTON',\n Footer = 'FOOTER',\n}\n\nexport enum WabaConfigEnum {\n AppId = 'M4D_APP_ID',\n Port = 'WA_PORT',\n AppSecret = 'M4D_APP_SECRET',\n PhoneNumberId = 'WA_PHONE_NUMBER_ID',\n BusinessAcctId = 'WA_BUSINESS_ACCOUNT_ID',\n APIVersion = 'CLOUD_API_VERSION',\n AccessToken = 'CLOUD_API_ACCESS_TOKEN',\n WebhookEndpoint = 'WEBHOOK_ENDPOINT',\n WebhookVerificationToken = 'WEBHOOK_VERIFICATION_TOKEN',\n ListenerPort = 'LISTENER_PORT',\n MaxRetriesAfterWait = 'MAX_RETRIES_AFTER_WAIT',\n RequestTimeout = 'REQUEST_TIMEOUT',\n Debug = 'DEBUG',\n PrivatePem = 'FLOW_API_PRIVATE_PEM',\n Passphrase = 'FLOW_API_PASSPHRASE',\n}\n\nexport enum ConversationTypesEnum {\n BusinessInitiated = 'business_initiated',\n CustomerInitiated = 'customer_initiated',\n ReferralConversion = 'referral_conversion',\n}\n\nexport enum StatusEnum {\n Delivered = 'delivered',\n Read = 'read',\n Sent = 'sent',\n}\n\nexport enum VideoMediaTypesEnum {\n Mp4 = 'video/mp4',\n Threegp = 'video/3gp',\n}\n\nexport enum StickerMediaTypesEnum {\n Webp = 'image/webp',\n}\n\nexport enum ImageMediaTypesEnum {\n Jpeg = 'image/jpeg',\n Png = 'image/png',\n}\n\nexport enum DocumentMediaTypesEnum {\n Text = 'text/plain',\n Pdf = 'application/pdf',\n Ppt = 'application/vnd.ms-powerpoint',\n Word = 'application/msword',\n Excel = 'application/vnd.ms-excel',\n OpenDoc = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n OpenPres = 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n OpenSheet = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n}\n\nexport enum AudioMediaTypesEnum {\n Aac = 'audio/aac',\n Mp4 = 'audio/mp4',\n Mpeg = 'audio/mpeg',\n Amr = 'audio/amr',\n Ogg = 'audio/ogg',\n}\n\nexport enum WebhookTypesEnum {\n Audio = 'audio',\n Button = 'button',\n Document = 'document',\n Text = 'text',\n Image = 'image',\n Interactive = 'interactive',\n Order = 'order',\n Sticker = 'sticker',\n System = 'system',\n Unknown = 'unknown',\n Video = 'video',\n}\n\nexport enum SystemChangeTypesEnum {\n CustomerChangedNumber = 'customer_changed_number',\n CustomerIdentityChanged = 'customer_identity_changed',\n}\n\nexport enum ReferralSourceTypesEnum {\n Ad = 'ad',\n Post = 'post',\n}\n\nexport enum RequestCodeMethodsEnum {\n Sms = 'SMS',\n Voice = 'VOICE',\n}\n\nexport enum LanguagesEnum {\n Afrikaans = 'af',\n Albanian = 'sq',\n Arabic = 'ar',\n Azerbaijani = 'az',\n Bengali = 'bn',\n Bulgarian = 'bg',\n Catalan = 'ca',\n Chinese_CHN = 'zh_CN',\n Chinese_HKG = 'zh_HK',\n Chinese_TAI = 'zh_TW',\n Croatian = 'hr',\n Czech = 'cs',\n Danish = 'da',\n Dutch = 'nl',\n English = 'en',\n English_UK = 'en_GB',\n English_US = 'en_US',\n Estonian = 'et',\n Filipino = 'fil',\n Finnish = 'fi',\n French = 'fr',\n Georgian = 'ka',\n German = 'de',\n Greek = 'el',\n Gujarati = 'gu',\n Hausa = 'ha',\n Hebrew = 'he',\n Hindi = 'hi',\n Hungarian = 'hu',\n Indonesian = 'id',\n Irish = 'ga',\n Italian = 'it',\n Japanese = 'ja',\n Kannada = 'kn',\n Kazakh = 'kk',\n Kinyarwanda = 'rw_RW',\n Korean = 'ko',\n Kyrgyz_Kyrgyzstan = 'ky_KG',\n Lao = 'lo',\n Latvian = 'lv',\n Lithuanian = 'lt',\n Macedonian = 'mk',\n Malay = 'ms',\n Malayalam = 'ml',\n Marathi = 'mr',\n Norwegian = 'nb',\n Persian = 'fa',\n Polish = 'pl',\n Portuguese_BR = 'pt_BR',\n Portuguese_POR = 'pt_PT',\n Punjabi = 'pa',\n Romanian = 'ro',\n Russian = 'ru',\n Serbian = 'sr',\n Slovak = 'sk',\n Slovenian = 'sl',\n Spanish = 'es',\n Spanish_ARG = 'es_AR',\n Spanish_SPA = 'es_ES',\n Spanish_MEX = 'es_MX',\n Swahili = 'sw',\n Swedish = 'sv',\n Tamil = 'ta',\n Telugu = 'te',\n Thai = 'th',\n Turkish = 'tr',\n Ukrainian = 'uk',\n Urdu = 'ur',\n Uzbek = 'uz',\n Vietnamese = 'vi',\n Zulu = 'zu',\n}\n\nexport enum CurrencyCodesEnum {\n AFN = 'AFN',\n EUR = 'EUR',\n ALL = 'ALL',\n DZD = 'DZD',\n USD = 'USD',\n AOA = 'AOA',\n XCD = 'XCD',\n ARS = 'ARS',\n AMD = 'AMD',\n AWG = 'AWG',\n AUD = 'AUD',\n AZN = 'AZN',\n BSD = 'BSD',\n BHD = 'BHD',\n BDT = 'BDT',\n BBD = 'BBD',\n BYN = 'BYN',\n BZD = 'BZD',\n XOF = 'XOF',\n BMD = 'BMD',\n INR = 'INR',\n BTN = 'BTN',\n BOB = 'BOB',\n BOV = 'BOV',\n BAM = 'BAM',\n BWP = 'BWP',\n NOK = 'NOK',\n BRL = 'BRL',\n BND = 'BND',\n BGN = 'BGN',\n BIF = 'BIF',\n CVE = 'CVE',\n KHR = 'KHR',\n XAF = 'XAF',\n CAD = 'CAD',\n KYD = 'KYD',\n CLP = 'CLP',\n CLF = 'CLF',\n CNY = 'CNY',\n COP = 'COP',\n COU = 'COU',\n KMF = 'KMF',\n CDF = 'CDF',\n NZD = 'NZD',\n CRC = 'CRC',\n HRK = 'HRK',\n CUP = 'CUP',\n CUC = 'CUC',\n ANG = 'ANG',\n CZK = 'CZK',\n DKK = 'DKK',\n DJF = 'DJF',\n DOP = 'DOP',\n EGP = 'EGP',\n SVC = 'SVC',\n ERN = 'ERN',\n SZL = 'SZL',\n ETB = 'ETB',\n FKP = 'FKP',\n FJD = 'FJD',\n XPF = 'XPF',\n GMD = 'GMD',\n GEL = 'GEL',\n GHS = 'GHS',\n GIP = 'GIP',\n GTQ = 'GTQ',\n GBP = 'GBP',\n GNF = 'GNF',\n GYD = 'GYD',\n HTG = 'HTG',\n HNL = 'HNL',\n HKD = 'HKD',\n HUF = 'HUF',\n ISK = 'ISK',\n IDR = 'IDR',\n XDR = 'XDR',\n IRR = 'IRR',\n IQD = 'IQD',\n ILS = 'ILS',\n JMD = 'JMD',\n JPY = 'JPY',\n JOD = 'JOD',\n KZT = 'KZT',\n KES = 'KES',\n KPW = 'KPW',\n KRW = 'KRW',\n KWD = 'KWD',\n KGS = 'KGS',\n LAK = 'LAK',\n LBP = 'LBP',\n LSL = 'LSL',\n ZAR = 'ZAR',\n LRD = 'LRD',\n LYD = 'LYD',\n CHF = 'CHF',\n MOP = 'MOP',\n MKD = 'MKD',\n MGA = 'MGA',\n MWK = 'MWK',\n MYR = 'MYR',\n MVR = 'MVR',\n MRU = 'MRU',\n MUR = 'MUR',\n XUA = 'XUA',\n MXN = 'MXN',\n MXV = 'MXV',\n MDL = 'MDL',\n MNT = 'MNT',\n MAD = 'MAD',\n MZN = 'MZN',\n MMK = 'MMK',\n NAD = 'NAD',\n NPR = 'NPR',\n NIO = 'NIO',\n NGN = 'NGN',\n OMR = 'OMR',\n PKR = 'PKR',\n PAB = 'PAB',\n PGK = 'PGK',\n PYG = 'PYG',\n PEN = 'PEN',\n PHP = 'PHP',\n PLN = 'PLN',\n QAR = 'QAR',\n RON = 'RON',\n RUB = 'RUB',\n RWF = 'RWF',\n SHP = 'SHP',\n WST = 'WST',\n STN = 'STN',\n SAR = 'SAR',\n RSD = 'RSD',\n SCR = 'SCR',\n SLL = 'SLL',\n SGD = 'SGD',\n XSU = 'XSU',\n SBD = 'SBD',\n SOS = 'SOS',\n SSP = 'SSP',\n LKR = 'LKR',\n SDG = 'SDG',\n SRD = 'SRD',\n SEK = 'SEK',\n CHE = 'CHE',\n CHW = 'CHW',\n SYP = 'SYP',\n TWD = 'TWD',\n TJS = 'TJS',\n TZS = 'TZS',\n THB = 'THB',\n TOP = 'TOP',\n TTD = 'TTD',\n TND = 'TND',\n TRY = 'TRY',\n TMT = 'TMT',\n UGX = 'UGX',\n UAH = 'UAH',\n AED = 'AED',\n USN = 'USN',\n UYU = 'UYU',\n UYI = 'UYI',\n UYW = 'UYW',\n UZS = 'UZS',\n VUV = 'VUV',\n VES = 'VES',\n VND = 'VND',\n YER = 'YER',\n ZMW = 'ZMW',\n ZWL = 'ZWL',\n XBA = 'XBA',\n XBB = 'XBB',\n XBC = 'XBC',\n XBD = 'XBD',\n XTS = 'XTS',\n XXX = 'XXX',\n XAU = 'XAU',\n XPD = 'XPD',\n XPT = 'XPT',\n XAG = 'XAG',\n AFA = 'AFA',\n FIM = 'FIM',\n ALK = 'ALK',\n ADP = 'ADP',\n ESP = 'ESP',\n FRF = 'FRF',\n AOK = 'AOK',\n AON = 'AON',\n AOR = 'AOR',\n ARA = 'ARA',\n ARP = 'ARP',\n ARY = 'ARY',\n RUR = 'RUR',\n ATS = 'ATS',\n AYM = 'AYM',\n AZM = 'AZM',\n BYB = 'BYB',\n BYR = 'BYR',\n BEC = 'BEC',\n BEF = 'BEF',\n BEL = 'BEL',\n BOP = 'BOP',\n BAD = 'BAD',\n BRB = 'BRB',\n BRC = 'BRC',\n BRE = 'BRE',\n BRN = 'BRN',\n BRR = 'BRR',\n BGJ = 'BGJ',\n BGK = 'BGK',\n BGL = 'BGL',\n BUK = 'BUK',\n HRD = 'HRD',\n CYP = 'CYP',\n CSJ = 'CSJ',\n CSK = 'CSK',\n ECS = 'ECS',\n ECV = 'ECV',\n GQE = 'GQE',\n EEK = 'EEK',\n XEU = 'XEU',\n GEK = 'GEK',\n DDM = 'DDM',\n DEM = 'DEM',\n GHC = 'GHC',\n GHP = 'GHP',\n GRD = 'GRD',\n GNE = 'GNE',\n GNS = 'GNS',\n GWE = 'GWE',\n GWP = 'GWP',\n ITL = 'ITL',\n ISJ = 'ISJ',\n IEP = 'IEP',\n ILP = 'ILP',\n ILR = 'ILR',\n LAJ = 'LAJ',\n LVL = 'LVL',\n LVR = 'LVR',\n LSM = 'LSM',\n ZAL = 'ZAL',\n LTL = 'LTL',\n LTT = 'LTT',\n LUC = 'LUC',\n LUF = 'LUF',\n LUL = 'LUL',\n MGF = 'MGF',\n MVQ = 'MVQ',\n MLF = 'MLF',\n MTL = 'MTL',\n MTP = 'MTP',\n MRO = 'MRO',\n MXP = 'MXP',\n MZE = 'MZE',\n MZM = 'MZM',\n NLG = 'NLG',\n NIC = 'NIC',\n PEH = 'PEH',\n PEI = 'PEI',\n PES = 'PES',\n PLZ = 'PLZ',\n PTE = 'PTE',\n ROK = 'ROK',\n ROL = 'ROL',\n STD = 'STD',\n CSD = 'CSD',\n SKK = 'SKK',\n SIT = 'SIT',\n RHD = 'RHD',\n ESA = 'ESA',\n ESB = 'ESB',\n SDD = 'SDD',\n SDP = 'SDP',\n SRG = 'SRG',\n CHC = 'CHC',\n TJR = 'TJR',\n TPE = 'TPE',\n TRL = 'TRL',\n TMM = 'TMM',\n UGS = 'UGS',\n UGW = 'UGW',\n UAK = 'UAK',\n SUR = 'SUR',\n USS = 'USS',\n UYN = 'UYN',\n UYP = 'UYP',\n VEB = 'VEB',\n VEF = 'VEF',\n VNC = 'VNC',\n YDD = 'YDD',\n YUD = 'YUD',\n YUM = 'YUM',\n YUN = 'YUN',\n ZRN = 'ZRN',\n ZRZ = 'ZRZ',\n ZMK = 'ZMK',\n ZWC = 'ZWC',\n ZWD = 'ZWD',\n ZWN = 'ZWN',\n ZWR = 'ZWR',\n XFO = 'XFO',\n XRE = 'XRE',\n XFU = 'XFU',\n}\n\nexport enum DataLocalizationRegionEnum {\n // APAC\n AU = 'AU', // Australia\n ID = 'ID', // Indonesia\n IN = 'IN', // India\n JP = 'JP', // Japan\n SG = 'SG', // Singapore\n KR = 'KR', // South Korea\n\n // Europe\n DE = 'DE', // EU (Germany)\n CH = 'CH', // Switzerland\n GB = 'GB', // United Kingdom\n\n // LATAM\n BR = 'BR', // Brazil\n\n // MEA\n BH = 'BH', // Bahrain\n ZA = 'ZA', // South Africa\n AE = 'AE', // United Arab Emirates\n\n // NORAM\n CA = 'CA', // Canada\n}\n\n/**\n * Business category values for WhatsApp Business Profile.\n * These values map to specific strings displayed in the WhatsApp client.\n */\nexport enum BusinessVerticalEnum {\n /**\n * Alcoholic Beverages\n */\n ALCOHOL = 'ALCOHOL',\n /**\n * Clothing and Apparel\n */\n APPAREL = 'APPAREL',\n /**\n * Automotive\n */\n AUTO = 'AUTO',\n /**\n * Beauty, Spa and Salon\n */\n BEAUTY = 'BEAUTY',\n /**\n * Education\n */\n EDU = 'EDU',\n /**\n * Entertainment\n */\n ENTERTAIN = 'ENTERTAIN',\n /**\n * Event Planning and Service\n */\n EVENT_PLAN = 'EVENT_PLAN',\n /**\n * Finance and Banking\n */\n FINANCE = 'FINANCE',\n /**\n * Public Service\n */\n GOVT = 'GOVT',\n /**\n * Food and Grocery\n */\n GROCERY = 'GROCERY',\n /**\n * Medical and Health\n */\n HEALTH = 'HEALTH',\n /**\n * Hotel and Lodging\n */\n HOTEL = 'HOTEL',\n /**\n * Non-profit\n */\n NONPROFIT = 'NONPROFIT',\n /**\n * Online Gambling & Gaming\n */\n ONLINE_GAMBLING = 'ONLINE_GAMBLING',\n /**\n * Over-the-Counter Drugs\n */\n OTC_DRUGS = 'OTC_DRUGS',\n /**\n * Other\n */\n OTHER = 'OTHER',\n /**\n * Non-Online Gambling & Gaming (E.g. Brick and mortar)\n */\n PHYSICAL_GAMBLING = 'PHYSICAL_GAMBLING',\n /**\n * Professional Services\n */\n PROF_SERVICES = 'PROF_SERVICES',\n /**\n * Restaurant\n */\n RESTAURANT = 'RESTAURANT',\n /**\n * Shopping and Retail\n */\n RETAIL = 'RETAIL',\n /**\n * Travel and Transportation\n */\n TRAVEL = 'TRAVEL',\n}\n"],"mappings":"2qBAAA,IAAY,EAAA,SAAA,EAAL,OACH,GAAA,eAAA,iBACA,EAAA,UAAA,YACA,EAAA,QAAA,iBAGQ,EAAA,SAAA,EAAL,OACH,GAAA,SAAA,WACA,EAAA,QAAA,UACA,EAAA,SAAA,kBAGQ,EAAA,SAAA,EAAL,OACH,GAAA,IAAA,MACA,EAAA,KAAA,OACA,EAAA,IAAA,MACA,EAAA,OAAA,gBAGQ,EAAA,S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IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,MACA,EAAA,IAAA,aAGQ,EAAA,SAAA,EAAL,OAEH,GAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,KAGA,EAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,KAGA,EAAA,GAAA,KAGA,EAAA,GAAA,KACA,EAAA,GAAA,KACA,EAAA,GAAA,KAGA,EAAA,GAAA,YAOQ,EAAA,SAAA,EAAL,OAIH,GAAA,QAAA,UAIA,EAAA,QAAA,UAIA,EAAA,KAAA,OAIA,EAAA,OAAA,SAIA,EAAA,IAAA,MAIA,EAAA,UAAA,YAIA,EAAA,WAAA,aAIA,EAAA,QAAA,UAIA,EAAA,KAAA,OAIA,EAAA,QAAA,UAIA,EAAA,OAAA,SAIA,EAAA,MAAA,QAIA,EAAA,UAAA,YAIA,EAAA,gBAAA,kBAIA,EAAA,UAAA,YAIA,EAAA,MAAA,QAIA,EAAA,kBAAA,oBAIA,EAAA,cAAA,gBAIA,EAAA,WAAA,aAIA,EAAA,OAAA,SAIA,EAAA,OAAA"}
@@ -0,0 +1,78 @@
1
+ import { WhatsAppConfig } from "./base-CfDkvT1x.js";
2
+ import { WebhookProcessor } from "./WebhookProcessor-Dq2Pa2cY.js";
3
+
4
+ //#region src/core/webhook/frameworks/handler.d.ts
5
+ interface BaseRequest {
6
+ method?: string;
7
+ url?: string;
8
+ headers: Record<string, string | string[] | undefined>;
9
+ body?: any;
10
+ query?: Record<string, any> | URLSearchParams;
11
+ rawBody?: any;
12
+ }
13
+ interface BaseResponse<T = any> {
14
+ status(code: number): T;
15
+ json?(data: any): T | void;
16
+ send?(data?: any): T | void;
17
+ setHeader?(name: string, value: string): void;
18
+ }
19
+ interface BaseWebhookConfig extends WhatsAppConfig {}
20
+ //#endregion
21
+ //#region src/core/webhook/frameworks/nextjs.d.ts
22
+ interface BaseApiRequest extends BaseRequest {
23
+ method?: string;
24
+ url?: string;
25
+ headers: Record<string, string | string[] | undefined>;
26
+ body?: any;
27
+ query: Partial<Record<string, string | string[]>>;
28
+ rawBody?: any;
29
+ }
30
+ interface BaseApiResponse extends BaseResponse {
31
+ status(code: number): any;
32
+ json(data: any): void | any;
33
+ send(data?: any): void | any;
34
+ setHeader(name: string, value: string): void;
35
+ }
36
+ interface NextJsWebhookConfig extends BaseWebhookConfig {}
37
+ declare function webhookHandler$1<TRequest extends BaseApiRequest, TResponse extends BaseApiResponse>(config: NextJsWebhookConfig): {
38
+ GET: (req: TRequest, res: TResponse) => Promise<any>;
39
+ POST: (req: TRequest, res: TResponse) => Promise<any>;
40
+ webhook: (req: TRequest, res: TResponse) => Promise<any>;
41
+ flow: (req: TRequest, res: TResponse) => Promise<any>;
42
+ processor: WebhookProcessor;
43
+ };
44
+ //#endregion
45
+ //#region src/core/webhook/utils/generateXHub256Sig.d.ts
46
+ declare const generateXHub256Sig: (body: string, appSecret: string) => string;
47
+ //#endregion
48
+ //#region src/core/webhook/frameworks/express.d.ts
49
+ interface ExpressRequest extends BaseRequest {
50
+ method: string;
51
+ url: string;
52
+ headers: Record<string, string | string[] | undefined>;
53
+ body?: any;
54
+ query: Record<string, any>;
55
+ rawBody?: any;
56
+ }
57
+ interface ExpressResponse extends BaseResponse<ExpressResponse> {
58
+ status(code: number): ExpressResponse;
59
+ json(data: any): ExpressResponse;
60
+ send(data?: any): ExpressResponse;
61
+ setHeader(name: string, value: string): void;
62
+ }
63
+ interface NextFunction {
64
+ (error?: any): void;
65
+ }
66
+ interface ExpressWebhookConfig extends BaseWebhookConfig {
67
+ path?: string;
68
+ }
69
+ declare function webhookHandler(config: ExpressWebhookConfig): {
70
+ GET: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => Promise<ExpressResponse>;
71
+ POST: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => Promise<ExpressResponse>;
72
+ webhook: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => Promise<any>;
73
+ flow: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => Promise<ExpressResponse>;
74
+ processor: WebhookProcessor;
75
+ };
76
+ //#endregion
77
+ export { BaseApiRequest, BaseApiResponse, type ExpressRequest, type ExpressResponse, type ExpressWebhookConfig, type NextFunction, type NextJsWebhookConfig, generateXHub256Sig, webhookHandler, webhookHandler$1 };
78
+ //# sourceMappingURL=express-B6fQdflY.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"express-B6fQdflY.d.ts","names":[],"sources":["../src/core/webhook/frameworks/handler.ts","../src/core/webhook/frameworks/nextjs.ts","../src/core/webhook/utils/generateXHub256Sig.ts","../src/core/webhook/frameworks/express.ts"],"sourcesContent":[],"mappings":";;;;UAKiB,WAAA;;EAAA,GAAA,CAAA,EAAA,MAAA;EAAW,OAAA,EAGf,MAHe,CAAA,MAAA,EAAA,MAAA,GAAA,MAAA,EAAA,GAAA,SAAA,CAAA;MAGf,CAAA,EAAA,GAAA;OAED,CAAA,EAAA,MAAA,CAAA,MAAA,EAAA,GAAA,CAAA,GAAsB,eAAtB;SAAsB,CAAA,EAAA,GAAA;;AAIjB,UAAA,YAAY,CAAA,IAAA,GAAA,CAAA,CAAA;EAAA,MAAA,CAAA,IAAA,EAAA,MAAA,CAAA,EACH,CADG;MACH,EAAA,IAAA,EAAA,GAAA,CAAA,EACJ,CADI,GAAA,IAAA;MACJ,EAAA,IAAA,CAAA,EAAA,GAAA,CAAA,EACC,CADD,GAAA,IAAA;WACC,EAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,CAAA,EAAA,IAAA;;AAKN,UAAA,iBAAA,SAA0B,cAAc,CAAA;;;UCnBxC,cAAA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AA,EGAJ,eHAI;WACJ,CAAA,IAAA,EAAA,MAAA,EAAA,KAAA,EAAA,MAAA,CAAA,EAAA,IAAA;;AACE,UGEP,YAAA,CHFO;EAKP,CAAA,KAAA,CAAA,EAAA,GAAA,CAAA,EAAA,IAAA;;UGCA,oBAAA,SAA6B;;AFpB9C;AAAgC,iBEgHhB,cAAA,CFhHgB,MAAA,EEgHO,oBFhHP,CAAA,EAAA;KAGnB,EAAA,CAAA,GAAA,EE8FU,cF9FV,EAAA,GAAA,EE8F+B,eF9F/B,EAAA,IAAA,EE8FsD,YF9FtD,EAAA,GE8FkE,OF9FlE,CE8FkE,eF9FlE,CAAA;MAEM,EAAA,CAAA,GAAA,EE6FK,cF7FL,EAAA,GAAA,EE6F0B,eF7F1B,EAAA,IAAA,EE6FiD,YF7FjD,EAAA,GE6F6D,OF7F7D,CE6F6D,eF7F7D,CAAA;SAAR,EAAA,CAAA,GAAA,EEgGgB,cFhGhB,EAAA,GAAA,EEgGqC,eFhGrC,EAAA,IAAA,EEgG4D,YFhG5D,EAAA,GEgGwE,OFhGxE,CAAA,GAAA,CAAA;MAL6B,EAAA,CAAA,GAAA,EEwGhB,cFxGgB,EAAA,GAAA,EEwGK,eFxGL,EAAA,IAAA,EEwG4B,YFxG5B,EAAA,GEwGwC,OFxGxC,CEwGwC,eFxGxC,CAAA;EAAW,SAAA,EEwG6B,gBFxG7B;AASnD,CAAA"}
@@ -0,0 +1,2 @@
1
+ import{BaseWebhookHandler as e}from"./handler-BGqjZ0xg.js";var t=class extends e{constructor(e){super(e)}async handleGet(e,t,n){try{let{"hub.mode":n,"hub.verify_token":r,"hub.challenge":i}=e.query,a=await this.processVerification(n||null,r||null,i||null);return this.applyHeaders(a,t),t.status(a.status).send(a.body)}catch(e){return n(e),t}}async handlePost(e,t,n){try{let n=this.constructFullUrl(e.headers,e.url),r=new globalThis.Request(n,{method:e.method,headers:e.headers,body:JSON.stringify(e.body)}),i=await this.processWebhook(r);return this.applyHeaders(i,t),t.status(i.status).send(i.body)}catch(e){return n(e),t}}async handleFlow(e,t,n){try{let n=this.constructFullUrl(e.headers,e.url),r=new globalThis.Request(n,{method:e.method,headers:e.headers,body:e.method===`POST`?JSON.stringify(e.body):void 0}),i=await this.processFlow(r);return this.applyHeaders(i,t),t.status(i.status).send(i.body)}catch(e){return n(e),t}}getHandlers(){return{GET:(e,t,n)=>this.handleGet(e,t,n),POST:(e,t,n)=>this.handlePost(e,t,n),webhook:(e,t,n)=>this.autoRoute(e,t,n),flow:(e,t,n)=>this.handleFlow(e,t,n),processor:this.webhookProcessor}}};function n(e){return new t(e).getHandlers()}export{n as webhookHandler};
2
+ //# sourceMappingURL=express-CrfNLYMM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"express-CrfNLYMM.js","names":[],"sources":["../src/core/webhook/frameworks/express.ts"],"sourcesContent":["import { BaseRequest, BaseResponse, BaseWebhookConfig, BaseWebhookHandler } from './handler';\n\n// Express-like interfaces to avoid direct Express dependency\nexport interface ExpressRequest extends BaseRequest {\n method: string;\n url: string;\n headers: Record<string, string | string[] | undefined>;\n body?: any;\n query: Record<string, any>;\n rawBody?: any;\n}\n\nexport interface ExpressResponse extends BaseResponse<ExpressResponse> {\n status(code: number): ExpressResponse;\n json(data: any): ExpressResponse;\n send(data?: any): ExpressResponse;\n setHeader(name: string, value: string): void;\n}\n\nexport interface NextFunction {\n (error?: any): void;\n}\n\nexport interface ExpressWebhookConfig extends BaseWebhookConfig {\n path?: string;\n}\n\n/**\n * Express-specific webhook handler extending the base handler\n */\nclass ExpressWebhookHandler extends BaseWebhookHandler<ExpressRequest, ExpressResponse> {\n constructor(config: ExpressWebhookConfig) {\n super(config);\n }\n\n protected async handleGet(req: ExpressRequest, res: ExpressResponse, next: NextFunction): Promise<ExpressResponse> {\n try {\n const { 'hub.mode': mode, 'hub.verify_token': token, 'hub.challenge': challenge } = req.query;\n\n const result = await this.processVerification(\n (mode as string) || null,\n (token as string) || null,\n (challenge as string) || null,\n );\n\n this.applyHeaders(result, res);\n return res.status(result.status).send(result.body);\n } catch (error) {\n next(error);\n return res;\n }\n }\n\n protected async handlePost(\n req: ExpressRequest,\n res: ExpressResponse,\n next: NextFunction,\n ): Promise<ExpressResponse> {\n try {\n const fullUrl = this.constructFullUrl(req.headers, req.url);\n const webRequest = new globalThis.Request(fullUrl, {\n method: req.method,\n headers: req.headers as HeadersInit,\n body: JSON.stringify(req.body),\n });\n\n const result = await this.processWebhook(webRequest);\n this.applyHeaders(result, res);\n return res.status(result.status).send(result.body);\n } catch (error) {\n next(error);\n return res;\n }\n }\n\n protected async handleFlow(\n req: ExpressRequest,\n res: ExpressResponse,\n next: NextFunction,\n ): Promise<ExpressResponse> {\n try {\n const fullUrl = this.constructFullUrl(req.headers, req.url);\n const webRequest = new globalThis.Request(fullUrl, {\n method: req.method,\n headers: req.headers as HeadersInit,\n body: req.method === 'POST' ? JSON.stringify(req.body) : undefined,\n });\n\n const result = await this.processFlow(webRequest);\n this.applyHeaders(result, res);\n return res.status(result.status).send(result.body);\n } catch (error) {\n next(error);\n return res;\n }\n }\n\n getHandlers() {\n return {\n // Method handlers for clean destructuring\n GET: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => this.handleGet(req, res, next),\n POST: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => this.handlePost(req, res, next),\n\n // Auto-routing webhook handler\n webhook: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => this.autoRoute(req, res, next),\n\n // Flow handler\n flow: (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => this.handleFlow(req, res, next),\n\n // Expose processor for handler registration\n processor: this.webhookProcessor,\n };\n }\n}\n\nexport function webhookHandler(config: ExpressWebhookConfig) {\n const handler = new ExpressWebhookHandler(config);\n return handler.getHandlers();\n}\n"],"mappings":"2DA8BA,IAAM,EAAN,cAAoC,CAAoD,CACpF,YAAY,EAA8B,CACtC,MAAM,EAAO,CAGjB,MAAgB,UAAU,EAAqB,EAAsB,EAA8C,CAC/G,GA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K,EAAK,EAAK,CAGxG,SAAU,EAAqB,EAAsB,IAAuB,KAAK,UAAU,EAAK,EAAK,EAAK,CAG1G,MAAO,EAAqB,EAAsB,IAAuB,KAAK,WAAW,EAAK,EAAK,EAAK,CAGxG,UAAW,KAAK,iBACnB,GAIT,SAAgB,EAAe,EAA8B,CAEzD,OADgB,IAAI,EAAsB,EAAO,CAClC,aAAa"}
@@ -0,0 +1,2 @@
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{constructor(e,t){super(e,t)}async listFlows(n){return this.sendJson(e.Get,`/${n}/flows`,this.config[t.RequestTimeout],null)}async createFlow(n,r){let i={name:r.name,categories:r.categories,...r.endpoint_uri&&{endpoint_uri:r.endpoint_uri},...r.clone_flow_id&&{clone_flow_id:r.clone_flow_id},...r.flow_json&&{flow_json:r.flow_json},...r.publish!==void 0&&{publish:r.publish}};return this.sendJson(e.Post,`/${n}/flows`,this.config[t.RequestTimeout],JSON.stringify(i))}async getFlow(n,r,i){let a=new URLSearchParams;r&&a.append(`fields`,r),i&&a.append(`date_format`,i);let o=a.toString()?`?${a.toString()}`:``;return this.sendJson(e.Get,`/${n}${o}`,this.config[t.RequestTimeout],null)}async getFlowPreview(e,t=!1){let n=`preview.invalidate(${t})`;return this.getFlow(e,n)}async updateFlowMetadata(n,r){let i={...r.name&&{name:r.name},...r.categories&&{categories:r.categories},...r.endpoint_uri&&{endpoint_uri:r.endpoint_uri},...r.application_id&&{application_id:r.application_id}};return this.sendJson(e.Post,`/${n}`,this.config[t.RequestTimeout],JSON.stringify(i))}async deleteFlow(n){return this.sendJson(e.Delete,`/${n}`,this.config[t.RequestTimeout],null)}async listAssets(n){return this.sendJson(e.Get,`/${n}/assets`,this.config[t.RequestTimeout],null)}async updateFlowJson(n,r){let i=new FormData,a;if(r.file instanceof Buffer)a=new globalThis.Blob([r.file]),i.append(`file`,a);else if(typeof r.file==`object`&&!(r.file instanceof Blob))try{a=new globalThis.Blob([JSON.stringify(r.file,null,2)],{type:`application/json`}),i.append(`file`,a)}catch{throw Error(`Failed to stringify JSON object for Flow JSON update.`)}else if(r.file instanceof Blob)a=r.file,i.append(`file`,a);else throw Error(`Invalid file type provided for Flow JSON update. Must be a Buffer, JSON object, or Blob.`);return i.append(`asset_type`,`FLOW_JSON`),i.append(`name`,r.name||`flow.json`),this.sendFormData(e.Post,`/${n}/assets`,this.config[t.RequestTimeout],i)}async validateFlowJson(e,t){try{let n=await this.updateFlowJson(e,{file:t}),r=!n.validation_errors||n.validation_errors.length===0;return{...n,valid:r}}catch(e){throw e}}async publishFlow(n){return this.sendJson(e.Post,`/${n}/publish`,this.config[t.RequestTimeout],JSON.stringify({}))}async deprecateFlow(n){return this.sendJson(e.Post,`/${n}/deprecate`,this.config[t.RequestTimeout],JSON.stringify({}))}async migrateFlows(n,r){let i={source_waba_id:r.source_waba_id,...r.source_flow_names&&{source_flow_names:r.source_flow_names}};return this.sendJson(e.Post,`/${n}/migrate_flows`,this.config[t.RequestTimeout],JSON.stringify(i))}},i=r;export{r as FlowApi,i as flow_default};
2
+ //# sourceMappingURL=flow-CVes0Qus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow-CVes0Qus.js","names":["fileContent: Blob"],"sources":["../src/api/flow/FlowApi.ts","../src/api/flow/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';\n\nimport type * as flow from './types';\n\n/**\n * API for managing WhatsApp Flows.\n *\n * This API allows you to:\n * - List flows\n * - Create flows\n * - Get flow details and previews\n * - Update flow metadata and JSON\n * - Delete flows\n * - Publish and deprecate flows\n * - Migrate flows between WABAs\n * - Validate flow JSON\n */\nexport default class FlowApi extends BaseAPI implements flow.FlowClass {\n constructor(config: WabaConfigType, client: RequesterClass) {\n super(config, client);\n }\n\n /**\n * List Flows\n *\n * @param wabaId - The WABA ID\n * @returns Promise with the list of flows\n */\n async listFlows(wabaId: string): Promise<flow.FlowsListResponse> {\n return this.sendJson(HttpMethodsEnum.Get, `/${wabaId}/flows`, this.config[WabaConfigEnum.RequestTimeout], null);\n }\n\n /**\n * Create Flow\n *\n * @param wabaId - The WABA ID\n * @param data - The flow data including name, categories, endpoint_uri, and optional clone_flow_id\n * @returns Promise with the created flow ID and validation errors if any\n */\n async createFlow(\n wabaId: string,\n data: {\n name: string;\n categories?: flow.FlowCategoryEnum[];\n endpoint_uri?: string;\n clone_flow_id?: string;\n flow_json?: string; // Flow JSON as a string\n publish?: boolean;\n },\n ): Promise<flow.CreateFlowResponse> {\n // The API expects application/json for this endpoint based on documentation examples\n // Let's ensure we send JSON, not FormData, unless specifically required by an endpoint variation.\n const payload = {\n name: data.name,\n categories: data.categories,\n ...(data.endpoint_uri && { endpoint_uri: data.endpoint_uri }),\n ...(data.clone_flow_id && { clone_flow_id: data.clone_flow_id }),\n ...(data.flow_json && { flow_json: data.flow_json }),\n ...(data.publish !== undefined && { publish: data.publish }),\n };\n\n return this.sendJson(\n HttpMethodsEnum.Post,\n `/${wabaId}/flows`,\n this.config[WabaConfigEnum.RequestTimeout],\n JSON.stringify(payload), // Send as JSON\n );\n }\n\n /**\n * Get Flow details\n *\n * @param flowId - The flow ID\n * @param fields - Optional fields to return (e.g., 'name,status,preview.invalidate(false)')\n * @param dateFormat - Optional date format\n * @returns Promise with the flow details or preview response\n */\n async getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<flow.Flow | flow.FlowPreviewResponse> {\n const params = new URLSearchParams();\n if (fields) params.append('fields', fields);\n if (dateFormat) params.append('date_format', dateFormat);\n\n const queryString = params.toString() ? `?${params.toString()}` : '';\n return this.sendJson(\n HttpMethodsEnum.Get,\n `/${flowId}${queryString}`,\n this.config[WabaConfigEnum.RequestTimeout],\n null,\n );\n }\n\n /**\n * Get Flow Preview URL\n *\n * @param flowId - The flow ID\n * @param invalidate - Optional. If true, invalidates existing preview and generates a new one. Defaults to false.\n * @returns Promise with the flow preview details\n */\n async getFlowPreview(flowId: string, invalidate: boolean = false): Promise<flow.FlowPreviewResponse> {\n const fields = `preview.invalidate(${invalidate})`;\n // Type assertion needed as getFlow can return Flow or FlowPreviewResponse\n return this.getFlow(flowId, fields) as Promise<flow.FlowPreviewResponse>;\n }\n\n /**\n * Update Flow Metadata\n *\n * @param flowId - The flow ID\n * @param data - The flow metadata to update (name, categories, endpoint_uri, application_id)\n * @returns Promise with the success status\n */\n async updateFlowMetadata(\n flowId: string,\n data: {\n name?: string;\n categories?: flow.FlowCategoryEnum[];\n endpoint_uri?: string;\n application_id?: string;\n },\n ): Promise<ResponseSuccess> {\n // The API expects application/json for this endpoint based on documentation examples\n const payload = {\n ...(data.name && { name: data.name }),\n ...(data.categories && { categories: data.categories }),\n ...(data.endpoint_uri && { endpoint_uri: data.endpoint_uri }),\n ...(data.application_id && { application_id: data.application_id }),\n };\n\n return this.sendJson(\n HttpMethodsEnum.Post,\n `/${flowId}`,\n this.config[WabaConfigEnum.RequestTimeout],\n JSON.stringify(payload), // Send as JSON\n );\n }\n\n /**\n * Delete Flow (only works if the Flow is in DRAFT status)\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n async deleteFlow(flowId: string): Promise<ResponseSuccess> {\n return this.sendJson(HttpMethodsEnum.Delete, `/${flowId}`, this.config[WabaConfigEnum.RequestTimeout], null);\n }\n\n /**\n * List Assets (e.g., get Flow JSON download URL)\n *\n * @param flowId - The flow ID\n * @returns Promise with the list of assets\n */\n async listAssets(flowId: string): Promise<flow.FlowAssetsResponse> {\n return this.sendJson(\n HttpMethodsEnum.Get,\n `/${flowId}/assets`,\n this.config[WabaConfigEnum.RequestTimeout],\n null,\n );\n }\n\n /**\n * Update Flow JSON by uploading a file, buffer, JSON object, or Blob.\n *\n * @param flowId - The flow ID\n * @param data - Object containing the file data and optional name.\n * @param data.file - The Flow JSON content as a Buffer, JSON object, or Blob.\n * @param data.name - Optional name for the asset, defaults to 'flow.json'.\n * @returns Promise with the success status and validation errors, if any.\n */\n async updateFlowJson(\n flowId: string,\n data: {\n file: Blob | Buffer | object; // JSON object, Buffer, or Blob\n name?: string; // Default to \"flow.json\"\n },\n ): Promise<flow.UpdateFlowResponse> {\n const formData = new FormData();\n let fileContent: Blob;\n\n // Handle different input types for the file\n if (data.file instanceof Buffer) {\n // Buffer\n // Create a Blob from the Buffer and cast it to the global Blob type\n fileContent = new globalThis.Blob([data.file]);\n formData.append('file', fileContent as unknown as Blob);\n } else if (typeof data.file === 'object' && !(data.file instanceof Blob)) {\n // JSON object - stringify and create Blob\n try {\n // Create a Blob from the JSON string and cast it to the global Blob type\n fileContent = new globalThis.Blob([JSON.stringify(data.file, null, 2)], { type: 'application/json' });\n formData.append('file', fileContent as unknown as Blob);\n } catch (e) {\n throw new Error('Failed to stringify JSON object for Flow JSON update.');\n }\n } else if (data.file instanceof Blob) {\n // Blob (already in correct format)\n fileContent = data.file;\n formData.append('file', fileContent as unknown as Blob);\n } else {\n throw new Error('Invalid file type provided for Flow JSON update. Must be a Buffer, JSON object, or Blob.');\n }\n\n formData.append('asset_type', 'FLOW_JSON'); // Required by API\n formData.append('name', data.name || 'flow.json'); // Required by API\n\n return this.sendFormData(\n HttpMethodsEnum.Post,\n `/${flowId}/assets`,\n this.config[WabaConfigEnum.RequestTimeout],\n formData,\n );\n }\n\n /**\n * Validate Flow JSON by attempting an update without publishing.\n * This is a convenience method; the API doesn't have a dedicated validation endpoint.\n *\n * @param flowId - The ID of the Flow (must exist, can be in DRAFT status).\n * @param flowJsonData - The Flow JSON content as a file path (string), Buffer, JSON object, or Blob.\n * @returns Promise indicating if the JSON is valid and includes validation errors if any.\n */\n async validateFlowJson(\n flowId: string,\n flowJsonData: Blob | Buffer | object,\n ): Promise<flow.ValidateFlowJsonResponse> {\n try {\n const result = await this.updateFlowJson(flowId, {\n file: flowJsonData,\n });\n\n const isValid = !result.validation_errors || result.validation_errors.length === 0;\n\n const enhancedResponse = {\n ...result,\n valid: isValid,\n };\n\n return enhancedResponse;\n } catch (error) {\n throw error;\n }\n }\n\n /**\n * Publish Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n async publishFlow(flowId: string): Promise<ResponseSuccess> {\n // This endpoint expects an empty JSON body or no body\n return this.sendJson(\n HttpMethodsEnum.Post,\n `/${flowId}/publish`,\n this.config[WabaConfigEnum.RequestTimeout],\n JSON.stringify({}), // Send empty JSON object\n );\n }\n\n /**\n * Deprecate Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n async deprecateFlow(flowId: string): Promise<ResponseSuccess> {\n // This endpoint expects an empty JSON body or no body\n return this.sendJson(\n HttpMethodsEnum.Post,\n `/${flowId}/deprecate`,\n this.config[WabaConfigEnum.RequestTimeout],\n JSON.stringify({}), // Send empty JSON object\n );\n }\n\n /**\n * Migrate Flows between WABAs\n *\n * @param destinationWabaId - The destination WABA ID\n * @param data - The migration data including source_waba_id and optional source_flow_names\n * @returns Promise with migration results (successes and failures)\n */\n async migrateFlows(\n destinationWabaId: string,\n data: {\n source_waba_id: string;\n source_flow_names?: string[];\n },\n ): Promise<flow.FlowMigrationResponse> {\n // API documentation suggests this endpoint might expect application/json\n // Let's double-check or assume JSON based on typical Graph API patterns unless FormData is confirmed.\n // Assuming JSON for now:\n const payload = {\n source_waba_id: data.source_waba_id,\n ...(data.source_flow_names && { source_flow_names: data.source_flow_names }),\n };\n\n return this.sendJson(\n HttpMethodsEnum.Post,\n `/${destinationWabaId}/migrate_flows`,\n this.config[WabaConfigEnum.RequestTimeout],\n JSON.stringify(payload),\n );\n }\n}\n","import FlowApi from './FlowApi';\n\nexport default FlowApi;\nexport { FlowApi };\n\nexport { FlowTypeEnum } from './types';\n\nexport type {\n CreateFlowResponse,\n Flow,\n FlowActionEnum,\n FlowAssetsResponse,\n FlowCategoryEnum,\n FlowClass,\n FlowEndpointRequest,\n FlowEndpointResponse,\n FlowMigrationResponse,\n FlowPreviewResponse,\n FlowsListResponse,\n FlowStatusEnum,\n FlowType,\n FlowValidationError,\n UpdateFlowResponse,\n ValidateFlowJsonResponse,\n} from './types';\n"],"mappings":"uHAoBA,IAAqB,EAArB,cAAqC,CAAkC,CACnE,YAAY,EAAwB,EAAwB,CACxD,MAAM,EAAQ,EAAO,CASzB,MAAM,UAAU,EAAiD,CAC7D,OAAO,KAAK,SAAS,EAAgB,IAAK,IAAI,EAAO,QAAS,KAAK,OAAO,EAAe,gBAAiB,KAAK,CAUnH,MAAM,WACF,EACA,EAQgC,CAGhC,IAAM,EAAU,CACZ,KAAM,EAAK,KACX,WAAY,EAAK,WACjB,GAAI,EAAK,cAAgB,CAAE,aAAc,EAAK,aAAc,CAC5D,GAAI,EAAK,eAAiB,CAAE,cAAe,EAAK,cAAe,CAC/D,GAAI,EAAK,WAAa,CAAE,UAAW,EAAK,UAAW,CACnD,GAAI,EAAK,UAAY,IAAA,IAAa,CAAE,QAAS,EAAK,QAAS,CAC9D,CAED,OAAO,KAAK,SACR,EAAgB,KAChB,IAAI,EAAO,QACX,KAAK,OAAO,EAAe,gBAC3B,KAAK,UAAU,EAAQ,CAC1B,CAWL,MAAM,QAAQ,EAAgB,EAAiB,EAAoE,CAC/G,IAAM,EAAS,IAAI,gBACf,GAAQ,EAAO,OAAO,SAAU,EAAO,CACvC,GAAY,EAAO,OAAO,cAAe,EAAW,CAExD,IAAM,EAAc,EAAO,UAAU,CAAG,IAAI,EAAO,UAAU,GAAK,GAClE,OAAO,KAAK,SACR,EAAgB,IAChB,IAAI,IAAS,IACb,KAAK,OAAO,EAAe,gBAC3B,KACH,CAUL,MAAM,eAAe,EAAgB,EAAsB,GAA0C,CACjG,IAAM,EAAS,sBAAsB,EAAW,GAEhD,OAAO,KAAK,QAAQ,EAAQ,EAAO,CAUvC,MAAM,mBACF,EACA,EAMwB,CAExB,IAAM,EAAU,CACZ,GAAI,EAAK,MAAQ,CAAE,KAA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KAAK,eAAe,EAAQ,CAC7C,KAAM,EACT,CAAC,CAEI,EAAU,CAAC,EAAO,mBAAqB,EAAO,kBAAkB,SAAW,EAOjF,MALyB,CACrB,GAAG,EACH,MAAO,EACV,OAGI,EAAO,CACZ,MAAM,GAUd,MAAM,YAAY,EAA0C,CAExD,OAAO,KAAK,SACR,EAAgB,KAChB,IAAI,EAAO,UACX,KAAK,OAAO,EAAe,gBAC3B,KAAK,UAAU,EAAE,CAAC,CACrB,CASL,MAAM,cAAc,EAA0C,CAE1D,OAAO,KAAK,SACR,EAAgB,KAChB,IAAI,EAAO,YACX,KAAK,OAAO,EAAe,gBAC3B,KAAK,UAAU,EAAE,CAAC,CACrB,CAUL,MAAM,aACF,EACA,EAImC,CAInC,IAAM,EAAU,CACZ,eAAgB,EAAK,eACrB,GAAI,EAAK,mBAAqB,CAAE,kBAAmB,EAAK,kBAAmB,CAC9E,CAED,OAAO,KAAK,SACR,EAAgB,KAChB,IAAI,EAAkB,gBACtB,KAAK,OAAO,EAAe,gBAC3B,KAAK,UAAU,EAAQ,CAC1B,GChTT,EAAe"}
@@ -0,0 +1,2 @@
1
+ import{FlowActionEnum as e}from"./common-C6FXBDm7.js";function t(e){return typeof e==`object`&&!!e}function n(e){return typeof e==`string`}const r=[e.DATA_EXCHANGE,e.INIT,e.BACK],i=[e.DATA_EXCHANGE,e.INIT];function a(i){if(!(`flow_token`in i&&n(i.flow_token)&&`action`in i))return!1;let{action:a,version:o,screen:s,data:c}=i,l=o===`3.0`,u=r.includes(a),d=s===void 0||n(s)&&s!==`SUCCESS`,f=a===e.DATA_EXCHANGE||t(c);return l&&u&&d&&f}function o(e){if(!(`flow_token`in e&&n(e.flow_token)&&`action`in e))return!1;let{action:r,screen:a,data:o}=e,s=i.includes(r),c=n(a),l=t(o)&&`error_key`in o&&n(o.error)&&`error_message`in o&&n(o.error_message);return s&&c&&l}function s(e){return`action`in e&&e.action===`ping`}export{a as isFlowDataExchangeRequest,o as isFlowErrorRequest,s as isFlowPingRequest};
2
+ //# sourceMappingURL=flowTypeGuards-Gn3-slCW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flowTypeGuards-Gn3-slCW.js","names":[],"sources":["../src/utils/flowTypeGuards.ts"],"sourcesContent":["import {\n FlowActionEnum,\n FlowDataExchangeRequest,\n FlowEndpointRequest,\n FlowErrorNotificationRequest,\n FlowHealthCheckRequest,\n} from '../api/flow/types';\n\n/**\n * Helper function to check if a value is an object\n * @param value The value to check\n * @returns True if the value is a non-null object\n */\nfunction isObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null;\n}\n\n/**\n * Helper function to check if a value is a string\n * @param value The value to check\n * @returns True if the value is a string\n */\nfunction isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\n// Array of allowed action types for data exchange requests\nconst DATA_EXCHANGE_ACTIONS = [FlowActionEnum.DATA_EXCHANGE, FlowActionEnum.INIT, FlowActionEnum.BACK] as const;\n\n// Array of allowed action types for error notification requests\nconst ERROR_ACTIONS = [FlowActionEnum.DATA_EXCHANGE, FlowActionEnum.INIT] as const;\n\n/**\n * Type guard to check if a request is a Data Exchange request\n * Validates the request structure according to the Flow API specifications\n *\n * @param request The Flow endpoint request to check\n * @returns True if the request is a valid Data Exchange request, false otherwise\n */\nexport function isFlowDataExchangeRequest(request: FlowEndpointRequest): request is FlowDataExchangeRequest & {\n action: (typeof DATA_EXCHANGE_ACTIONS)[number];\n screen?: string;\n flow_token: string;\n data?: Record<string, any>;\n} {\n // Check for basic required fields\n if (!('flow_token' in request && isString(request.flow_token) && 'action' in request)) {\n return false;\n }\n\n const { action, version, screen, data } = request;\n\n // Validate API version\n const hasValidVersion = version === '3.0';\n\n // Check if the action is one of the allowed actions for data exchange\n const hasValidAction = DATA_EXCHANGE_ACTIONS.includes(action as any);\n\n // Screen is optional, but when present must be a string and not 'SUCCESS'\n const hasValidScreen = typeof screen === 'undefined' || (isString(screen) && screen !== 'SUCCESS');\n\n // Data is required except for DATA_EXCHANGE action\n const hasValidData = action === FlowActionEnum.DATA_EXCHANGE || isObject(data);\n\n // All conditions must be met for a valid data exchange request\n return hasValidVersion && hasValidAction && hasValidScreen && hasValidData;\n}\n\n/**\n * Type guard to check if a request is an Error Notification request\n * Validates the request structure according to the Flow API error specifications\n *\n * @param request The Flow endpoint request to check\n * @returns True if the request is a valid Error Notification request, false otherwise\n */\nexport function isFlowErrorRequest(request: FlowEndpointRequest): request is FlowErrorNotificationRequest & {\n action: (typeof ERROR_ACTIONS)[number];\n screen: string;\n flow_token: string;\n data: {\n error: string;\n error_message: string;\n };\n} {\n // Check for basic required fields\n if (!('flow_token' in request && isString(request.flow_token) && 'action' in request)) {\n return false;\n }\n\n const { action, screen, data } = request;\n\n // Check if the action is one of the allowed actions for error notifications\n const hasValidAction = ERROR_ACTIONS.includes(action as any);\n\n // Screen is required for error notifications\n const hasValidScreen = isString(screen);\n\n // Validate error data structure\n const hasValidData =\n isObject(data) &&\n 'error_key' in data &&\n isString(data.error) &&\n 'error_message' in data &&\n isString(data.error_message);\n\n // All conditions must be met for a valid error notification request\n return hasValidAction && hasValidScreen && hasValidData;\n}\n\n/**\n * Type guard to check if a request is a Ping (health check) request\n * Simple validation for health check endpoints in the Flow API\n *\n * @param request The Flow endpoint request to check\n * @returns True if the request is a Ping request, false otherwise\n */\nexport function isFlowPingRequest(request: FlowEndpointRequest): request is FlowHealthCheckRequest {\n // A ping request only requires the 'action' field with value 'ping'\n return 'action' in request && request.action === 'ping';\n}\n"],"mappings":"sDAaA,SAAS,EAAS,EAAkD,CAChE,OAAO,OAAO,GAAU,YAAY,EAQxC,SAAS,EAAS,EAAiC,CAC/C,OAAO,OAAO,GAAU,SAI5B,MAAM,EAAwB,CAAC,EAAe,cAAe,EAAe,KAAM,EAAe,KAAK,CAGhG,EAAgB,CAAC,EAAe,cAAe,EAAe,KAAK,CASzE,SAAgB,EAA0B,EAKxC,CAEE,GAAI,EAAE,eAAgB,GAAW,EAAS,EAAQ,WAAW,EAAI,WAAY,GACzE,MAAO,GAGX,GAAM,CAAE,SAAQ,UAAS,SAAQ,QAAS,EAGpC,EAAkB,IAAY,MAG9B,EAAiB,EAAsB,SAAS,EAAc,CAG9D,EAAwB,IAAW,QAAgB,EAAS,EAAO,EAAI,IAAW,UAGlF,EAAe,IAAW,EAAe,eAAiB,EAAS,EAAK,CAG9E,OAAO,GAAmB,GAAkB,GAAkB,EAUlE,SAAgB,EAAmB,EAQjC,CAEE,GAAI,EAAE,eAAgB,GAAW,EAAS,EAAQ,WAAW,EAAI,WAAY,GACzE,MAAO,GAGX,GAAM,CAAE,SAAQ,SAAQ,QAAS,EAG3B,EAAiB,EAAc,SAAS,EAAc,CAGtD,EAAiB,EAAS,EAAO,CAGjC,EACF,EAAS,EAAK,EACd,cAAe,GACf,EAAS,EAAK,MAAM,EACpB,kBAAmB,GACnB,EAAS,EAAK,cAAc,CAGhC,OAAO,GAAkB,GAAkB,EAU/C,SAAgB,EAAkB,EAAiE,CAE/F,MAAO,WAAY,GAAW,EAAQ,SAAW"}
@@ -0,0 +1,2 @@
1
+ import{WebhookProcessor as e,constructFullUrl as t}from"./WebhookProcessor-BUZFeZD_.js";var n=class{processor;constructor(t){this.processor=new e(t)}async processVerification(e,t,n){return await this.processor.processVerification(e,t,n)}async processWebhook(e){return await this.processor.processWebhook(e)}async processFlow(e){return await this.processor.processFlow(e)}constructFullUrl(e,n=``){return t(e,n)}applyHeaders(e,t){t.setHeader&&Object.entries(e.headers).forEach(([e,n])=>{t.setHeader(e,n)})}async autoRoute(e,t,...n){switch(e.method?.toUpperCase()){case`GET`:return await this.handleGet(e,t,...n);case`POST`:return await this.handlePost(e,t,...n);default:if(t.status&&t.json)return t.status(405).json({error:`Method Not Allowed`});throw Error(`Method Not Allowed`)}}get webhookProcessor(){return this.processor}};export{n as BaseWebhookHandler};
2
+ //# sourceMappingURL=handler-BGqjZ0xg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler-BGqjZ0xg.js","names":[],"sources":["../src/core/webhook/frameworks/handler.ts"],"sourcesContent":["import { WhatsAppConfig } from '../../../types/config';\nimport { WebhookProcessor } from '../WebhookProcessor';\nimport { constructFullUrl } from '../utils/webhookUtils';\n\n// Generic request/response interfaces for framework abstraction\nexport interface BaseRequest {\n method?: string;\n url?: string;\n headers: Record<string, string | string[] | undefined>;\n body?: any;\n query?: Record<string, any> | URLSearchParams;\n rawBody?: any;\n}\n\nexport interface BaseResponse<T = any> {\n status(code: number): T;\n json?(data: any): T | void;\n send?(data?: any): T | void;\n setHeader?(name: string, value: string): void;\n}\n\n// Base configuration interface\nexport interface BaseWebhookConfig extends WhatsAppConfig {\n // Framework-specific configs can extend this\n}\n\n// Response result interface for consistent return types\nexport interface WebhookResult {\n status: number;\n headers: Record<string, string>;\n body: any;\n}\n\n/**\n * Abstract base class for framework-agnostic webhook handlers\n * Provides common architecture and functionality across all frameworks\n */\nexport abstract class BaseWebhookHandler<TRequest extends BaseRequest, TResponse extends BaseResponse> {\n protected processor: WebhookProcessor;\n\n constructor(config: BaseWebhookConfig) {\n this.processor = new WebhookProcessor(config);\n }\n\n /**\n * Abstract method for handling GET requests (webhook verification)\n * Each framework implements this based on their request/response patterns\n */\n protected abstract handleGet(req: TRequest, res: TResponse, ...args: any[]): Promise<any>;\n\n /**\n * Abstract method for handling POST requests (webhook processing)\n * Each framework implements this based on their request/response patterns\n */\n protected abstract handlePost(req: TRequest, res: TResponse, ...args: any[]): Promise<any>;\n\n /**\n * Abstract method for handling flow requests\n * Each framework implements this based on their request/response patterns\n */\n protected abstract handleFlow(req: TRequest, res: TResponse, ...args: any[]): Promise<any>;\n\n /**\n * Common webhook verification logic\n */\n protected async processVerification(\n mode: string | null,\n token: string | null,\n challenge: string | null,\n ): Promise<WebhookResult> {\n return await this.processor.processVerification(mode, token, challenge);\n }\n\n /**\n * Common webhook processing logic\n */\n protected async processWebhook(request: Request): Promise<WebhookResult> {\n return await this.processor.processWebhook(request);\n }\n\n /**\n * Common flow processing logic\n */\n protected async processFlow(request: Request): Promise<WebhookResult> {\n return await this.processor.processFlow(request);\n }\n\n /**\n * Helper to construct full URL from headers and path\n */\n protected constructFullUrl(headers: Record<string, string | string[] | undefined>, url: string = ''): string {\n return constructFullUrl(headers, url);\n }\n\n /**\n * Helper to apply result headers to response\n */\n protected applyHeaders(result: WebhookResult, res: TResponse): void {\n if (res.setHeader) {\n Object.entries(result.headers).forEach(([key, value]) => {\n res.setHeader!(key, value);\n });\n }\n }\n\n /**\n * Auto-routing method handler that dispatches based on request method\n */\n protected async autoRoute(req: TRequest, res: TResponse, ...args: any[]): Promise<any> {\n const method = req.method?.toUpperCase();\n\n switch (method) {\n case 'GET':\n return await this.handleGet(req, res, ...args);\n case 'POST':\n return await this.handlePost(req, res, ...args);\n default:\n if (res.status && res.json) {\n return res.status(405).json({ error: 'Method Not Allowed' });\n }\n throw new Error('Method Not Allowed');\n }\n }\n\n /**\n * Get the processor instance for handler registration\n */\n get webhookProcessor(): WebhookProcessor {\n return this.processor;\n }\n\n /**\n * Abstract method to return the clean handler object\n * Each framework implements this to return their specific handler structure\n */\n abstract getHandlers(): {\n GET: (...args: any[]) => Promise<any>;\n POST: (...args: any[]) => Promise<any>;\n webhook: (...args: any[]) => Promise<any>;\n flow: (...args: any[]) => Promise<any>;\n processor: WebhookProcessor;\n };\n}\n"],"mappings":"wFAqCA,IAAsB,EAAtB,KAAuG,CACnG,UAEA,YAAY,EAA2B,CACnC,KAAK,UAAY,IAAI,EAAiB,EAAO,CAwBjD,MAAgB,oBACZ,EACA,EACA,EACsB,CACtB,OAAO,MAAM,KAAK,UAAU,oBAAoB,EAAM,EAAO,EAAU,CAM3E,MAAgB,eAAe,EAA0C,CACrE,OAAO,MAAM,KAAK,UAAU,eAAe,EAAQ,CAMvD,MAAgB,YAAY,EAA0C,CAClE,OAAO,MAAM,KAAK,UAAU,YAAY,EAAQ,CAMpD,iBAA2B,EAAwD,EAAc,GAAY,CACzG,OAAO,EAAiB,EAAS,EAAI,CAMzC,aAAuB,EAAuB,EAAsB,CAC5D,EAAI,WACJ,OAAO,QAAQ,EAAO,QAAQ,CAAC,SAAS,CAAC,EAAK,KAAW,CACrD,EAAI,UAAW,EAAK,EAAM,EAC5B,CAOV,MAAgB,UAAU,EAAe,EAAgB,GAAG,EAA2B,CAGnF,OAFe,EAAI,QAAQ,aAAa,CAExC,CACI,IAAK,MACD,OAAO,MAAM,KAAK,UAAU,EAAK,EAAK,GAAG,EAAK,CAClD,IAAK,OACD,OAAO,MAAM,KAAK,WAAW,EAAK,EAAK,GAAG,EAAK,CACnD,QACI,GAAI,EAAI,QAAU,EAAI,KAClB,OAAO,EAAI,OAAO,IAAI,CAAC,KAAK,CAAE,MAAO,qBAAsB,CAAC,CAEhE,MAAU,MAAM,qBAAqB,EAOjD,IAAI,kBAAqC,CACrC,OAAO,KAAK"}