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.
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-D9Q_7cf3.d.ts +0 -161
  148. package/dist/TwoStepVerificationApi-C0jpAKfu.d.ts +0 -33
  149. package/dist/WabaApi-BfvpkpFr.d.ts +0 -175
  150. package/dist/WebhookProcessor-C3oUXCBl.d.ts +0 -707
  151. package/dist/WhatsApp-BG0rDhMn.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-B37vOPki.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,403 +0,0 @@
1
- import { d as ResponseSuccess } from './request-CUjrMn8R.js';
2
- import { IncomingMessage, IncomingHttpHeaders } from 'http';
3
-
4
- /**
5
- * Enum for Flow Status
6
- */
7
- declare enum FlowStatusEnum {
8
- Draft = "DRAFT",
9
- Published = "PUBLISHED",
10
- Throttled = "THROTTLED",
11
- Blocked = "BLOCKED",
12
- Deprecated = "DEPRECATED"
13
- }
14
- /**
15
- * Enum for Flow Categories
16
- */
17
- declare enum FlowCategoryEnum {
18
- SignUp = "SIGN_UP",
19
- SignIn = "SIGN_IN",
20
- AppointmentBooking = "APPOINTMENT_BOOKING",
21
- LeadGeneration = "LEAD_GENERATION",
22
- ContactUs = "CONTACT_US",
23
- CustomerSupport = "CUSTOMER_SUPPORT",
24
- Survey = "SURVEY",
25
- Other = "OTHER"
26
- }
27
- declare enum FlowActionEnum {
28
- INIT = "INIT",
29
- BACK = "BACK",
30
- DATA_EXCHANGE = "data_exchange"
31
- }
32
- /**
33
- * Enum for Flow Types in webhook handlers
34
- * Used to register handlers for specific flow events
35
- */
36
- declare enum FlowTypeEnum {
37
- /** Health check/ping requests */
38
- Ping = "ping",
39
- /** Data exchange requests */
40
- Change = "data_exchange",
41
- /** Error notification requests */
42
- Error = "error",
43
- /** Match all flow action types */
44
- All = "*"
45
- }
46
- type FlowType = (typeof FlowTypeEnum)[keyof typeof FlowTypeEnum];
47
- /**
48
- * Flow Validation Error Pointer
49
- */
50
- interface FlowValidationErrorPointer {
51
- line_start: number;
52
- line_end: number;
53
- column_start: number;
54
- column_end: number;
55
- path: string;
56
- }
57
- /**
58
- * Flow Validation Error
59
- */
60
- interface FlowValidationError {
61
- error: string;
62
- error_type: string;
63
- message: string;
64
- line_start: number;
65
- line_end: number;
66
- column_start: number;
67
- column_end: number;
68
- pointers: FlowValidationErrorPointer[];
69
- }
70
- /**
71
- * Flow Item
72
- */
73
- interface Flow {
74
- id: string;
75
- name: string;
76
- status: FlowStatusEnum;
77
- categories: FlowCategoryEnum[];
78
- validation_errors: FlowValidationError[];
79
- }
80
- /**
81
- * Pagination Cursors
82
- */
83
- interface PaginationCursors {
84
- before: string;
85
- after: string;
86
- }
87
- /**
88
- * Pagination Object
89
- */
90
- interface Pagination {
91
- cursors: PaginationCursors;
92
- }
93
- /**
94
- * Flows List Response
95
- */
96
- interface FlowsListResponse {
97
- data: Flow[];
98
- paging: Pagination;
99
- }
100
- /**
101
- * Flow Asset
102
- */
103
- interface FlowAsset {
104
- name: string;
105
- asset_type: string;
106
- download_url: string;
107
- }
108
- /**
109
- * Flow Assets Response
110
- */
111
- interface FlowAssetsResponse {
112
- data: FlowAsset[];
113
- paging: Pagination;
114
- }
115
- /**
116
- * Flow Preview
117
- */
118
- interface FlowPreview {
119
- preview_url: string;
120
- expires_at: string;
121
- }
122
- /**
123
- * Flow Preview Response
124
- */
125
- interface FlowPreviewResponse {
126
- preview: FlowPreview;
127
- id: string;
128
- }
129
- /**
130
- * Flow Migration Result
131
- */
132
- interface FlowMigrationResult {
133
- source_name: string;
134
- source_id: string;
135
- migrated_id: string;
136
- }
137
- /**
138
- * Flow Migration Failure
139
- */
140
- interface FlowMigrationFailure {
141
- source_name: string;
142
- error_code: string;
143
- error_message: string;
144
- }
145
- /**
146
- * Create Flow Response
147
- */
148
- interface CreateFlowResponse {
149
- id: string;
150
- success: boolean;
151
- validation_errors?: FlowValidationError[];
152
- }
153
- /**
154
- * Update Flow Response
155
- */
156
- interface UpdateFlowResponse {
157
- success: boolean;
158
- validation_errors?: FlowValidationError[];
159
- }
160
- /**
161
- * Flow Migration Response
162
- */
163
- interface FlowMigrationResponse {
164
- migrated_flows: FlowMigrationResult[];
165
- failed_flows: FlowMigrationFailure[];
166
- }
167
- /**
168
- * Validate Flow JSON Response
169
- */
170
- interface ValidateFlowJsonResponse {
171
- valid: boolean;
172
- success: boolean;
173
- validation_errors?: FlowValidationError[];
174
- }
175
- /**
176
- * WhatsApp Flow Endpoint - Encrypted Request Payload
177
- * Represents the raw encrypted data received from WhatsApp
178
- */
179
- interface FlowEncryptedRequestPayload {
180
- encrypted_aes_key: string;
181
- encrypted_flow_data: string;
182
- initial_vector: string;
183
- }
184
- /**
185
- * WhatsApp Flow Endpoint - Decrypted Request Response
186
- * Represents the successfully decrypted data and encryption keys
187
- */
188
- interface FlowDecryptedRequestResponse {
189
- decryptedBody: any;
190
- aesKeyBuffer: Buffer;
191
- initialVectorBuffer: Buffer;
192
- }
193
- /**
194
- * WhatsApp Flow Endpoint - HTTP Request with Body
195
- * Represents an HTTP request with the encrypted payload
196
- */
197
- interface FlowHttpRequest extends IncomingMessage {
198
- body: FlowEncryptedRequestPayload;
199
- headers: IncomingHttpHeaders;
200
- }
201
- /**
202
- * WhatsApp Flow Endpoint - Health Check Request
203
- * Represents the structure of a health check request
204
- */
205
- interface FlowHealthCheckRequest {
206
- action: 'ping';
207
- version: '3.0';
208
- }
209
- /**
210
- * WhatsApp Flow Endpoint - Health Check Response
211
- * The expected response structure for health check requests
212
- */
213
- interface FlowHealthCheckResponse {
214
- data: {
215
- status: 'active';
216
- };
217
- }
218
- /**
219
- * WhatsApp Flow Endpoint - Data Exchange Request
220
- * Represents the structure of a data exchange request
221
- */
222
- interface FlowDataExchangeRequest {
223
- version: '3.0';
224
- action: FlowActionEnum;
225
- screen: string;
226
- flow_token: string;
227
- data?: Record<string, any> & {
228
- error_message?: string;
229
- };
230
- }
231
- /**
232
- * WhatsApp Flow Endpoint - Data Exchange Response
233
- * The expected response structure for data exchange requests
234
- */
235
- interface FlowDataExchangeResponse {
236
- screen?: string;
237
- data?: Record<string, any | {
238
- error_message?: string;
239
- }>;
240
- }
241
- /**
242
- * WhatsApp Flow Endpoint - Success Screen Response
243
- * The expected response structure for success screen requests
244
- */
245
- interface FlowSuccessScreenResponse {
246
- screen: 'SUCCESS';
247
- data: {
248
- extension_message_response?: {
249
- params?: {
250
- flow_token: string;
251
- [key: string]: string;
252
- };
253
- };
254
- };
255
- }
256
- /**
257
- * WhatsApp Flow Endpoint - Error Notification Request
258
- * Represents the structure of an error notification request
259
- */
260
- interface FlowErrorNotificationRequest {
261
- version: '3.0';
262
- action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;
263
- screen: string;
264
- flow_token: string;
265
- data: {
266
- error: string;
267
- error_message: string;
268
- };
269
- }
270
- /**
271
- * WhatsApp Flow Endpoint - Error Notification Response
272
- * The expected response structure for error notification requests
273
- */
274
- interface FlowErrorNotificationResponse {
275
- acknowledged: boolean;
276
- }
277
- /**
278
- * WhatsApp Flow Endpoint - Comprehensive Request Object
279
- * A combined type that includes all possible fields from different request types
280
- * with all fields being optional for flexibility
281
- */
282
- interface FlowEndpointRequest {
283
- version?: '3.0';
284
- action?: 'ping' | FlowActionEnum;
285
- screen?: string;
286
- flow_token?: string;
287
- data?: Record<string, any> & {
288
- error_key?: string;
289
- error_message?: string;
290
- };
291
- }
292
- /**
293
- * WhatsApp Flow Endpoint - Response
294
- * Union type for all possible response types from a Flow endpoint
295
- */
296
- type FlowEndpointResponse = FlowHealthCheckResponse | FlowDataExchangeResponse | FlowErrorNotificationResponse | FlowSuccessScreenResponse;
297
- interface FlowClass {
298
- /**
299
- * List Flows
300
- *
301
- * @param wabaId - The WABA ID
302
- * @returns Promise with the list of flows
303
- */
304
- listFlows(wabaId: string): Promise<FlowsListResponse>;
305
- /**
306
- * Create Flow
307
- *
308
- * @param wabaId - The WABA ID
309
- * @param data - The flow data including name, categories, endpoint_uri, and optional clone_flow_id
310
- * @returns Promise with the created flow ID
311
- */
312
- createFlow(wabaId: string, data: {
313
- name: string;
314
- categories?: FlowCategoryEnum[];
315
- endpoint_uri?: string;
316
- clone_flow_id?: string;
317
- flow_json?: string;
318
- publish?: boolean;
319
- }): Promise<CreateFlowResponse>;
320
- /**
321
- * Get Flow
322
- *
323
- * @param flowId - The flow ID
324
- * @param fields - Optional fields to return
325
- * @param dateFormat - Optional date format
326
- * @returns Promise with the flow details
327
- */
328
- getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;
329
- /**
330
- * Update Flow Metadata
331
- *
332
- * @param flowId - The flow ID
333
- * @param data - The flow metadata to update
334
- * @returns Promise with the success status
335
- */
336
- updateFlowMetadata(flowId: string, data: {
337
- name?: string;
338
- categories?: FlowCategoryEnum[];
339
- endpoint_uri?: string;
340
- application_id?: string;
341
- }): Promise<ResponseSuccess>;
342
- /**
343
- * Delete Flow
344
- *
345
- * @param flowId - The flow ID
346
- * @returns Promise with the success status
347
- */
348
- deleteFlow(flowId: string): Promise<ResponseSuccess>;
349
- /**
350
- * List Assets (Get Flow JSON URL)
351
- *
352
- * @param flowId - The flow ID
353
- * @returns Promise with the list of assets
354
- */
355
- listAssets(flowId: string): Promise<FlowAssetsResponse>;
356
- /**
357
- * Update Flow JSON
358
- *
359
- * @param flowId - The flow ID
360
- * @param data - The asset data including asset_type, file, and name
361
- * @returns Promise with the success status and validation errors
362
- */
363
- updateFlowJson(flowId: string, data: {
364
- file: Blob | Buffer | object;
365
- name?: string;
366
- }): Promise<UpdateFlowResponse>;
367
- /**
368
- * Validate Flow JSON by attempting an update without publishing.
369
- * This is a convenience method; the API doesn't have a dedicated validation endpoint.
370
- *
371
- * @param flowId - The ID of the Flow (must exist, can be in DRAFT status).
372
- * @param flowJsonData - The Flow JSON content as a Buffer, JSON object, or Blob.
373
- * @returns Promise indicating if the JSON is valid and includes validation errors if any.
374
- */
375
- validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;
376
- /**
377
- * Publish Flow
378
- *
379
- * @param flowId - The flow ID
380
- * @returns Promise with the success status
381
- */
382
- publishFlow(flowId: string): Promise<ResponseSuccess>;
383
- /**
384
- * Deprecate Flow
385
- *
386
- * @param flowId - The flow ID
387
- * @returns Promise with the success status
388
- */
389
- deprecateFlow(flowId: string): Promise<ResponseSuccess>;
390
- /**
391
- * Migrate Flows
392
- *
393
- * @param wabaId - The destination WABA ID
394
- * @param data - The migration data including source_waba_id and optional source_flow_names
395
- * @returns Promise with migration results
396
- */
397
- migrateFlows(wabaId: string, data: {
398
- source_waba_id: string;
399
- source_flow_names?: string[];
400
- }): Promise<FlowMigrationResponse>;
401
- }
402
-
403
- export { type FlowValidationError as A, type FlowValidationErrorPointer as B, type PaginationCursors as C, type CreateFlowResponse as D, FlowTypeEnum as F, type Pagination as P, type UpdateFlowResponse as U, type ValidateFlowJsonResponse as V, FlowActionEnum as a, FlowCategoryEnum as b, FlowStatusEnum as c, type Flow as d, type FlowAsset as e, type FlowAssetsResponse as f, type FlowClass as g, type FlowDataExchangeRequest as h, type FlowDataExchangeResponse as i, type FlowDecryptedRequestResponse as j, type FlowEncryptedRequestPayload as k, type FlowEndpointRequest as l, type FlowEndpointResponse as m, type FlowErrorNotificationRequest as n, type FlowErrorNotificationResponse as o, type FlowHealthCheckRequest as p, type FlowHealthCheckResponse as q, type FlowHttpRequest as r, type FlowMigrationFailure as s, type FlowMigrationResult as t, type FlowMigrationResponse as u, type FlowPreview as v, type FlowPreviewResponse as w, type FlowsListResponse as x, type FlowSuccessScreenResponse as y, type FlowType as z };