meta-cloud-api 0.1.23 → 0.2.1

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 (144) hide show
  1. package/dist/api/base.d.mts +1 -1
  2. package/dist/api/base.d.ts +1 -1
  3. package/dist/api/businessProfile.d.mts +1 -1
  4. package/dist/api/businessProfile.d.ts +1 -1
  5. package/dist/api/businessProfile.js +1 -1
  6. package/dist/api/encryption.d.mts +1 -1
  7. package/dist/api/encryption.d.ts +1 -1
  8. package/dist/api/encryption.js +1 -1
  9. package/dist/api/encryption.mjs +1 -1
  10. package/dist/api/flow.d.mts +2 -1
  11. package/dist/api/flow.d.ts +2 -1
  12. package/dist/api/flow.js +1 -1
  13. package/dist/api/flow.mjs +1 -1
  14. package/dist/api/index.d.mts +2 -1
  15. package/dist/api/index.d.ts +2 -1
  16. package/dist/api/index.js +1 -1
  17. package/dist/api/index.mjs +1 -1
  18. package/dist/api/media.d.mts +1 -1
  19. package/dist/api/media.d.ts +1 -1
  20. package/dist/api/media.js +1 -1
  21. package/dist/api/media.mjs +1 -1
  22. package/dist/api/messages.d.mts +1 -1
  23. package/dist/api/messages.d.ts +1 -1
  24. package/dist/api/messages.js +1 -1
  25. package/dist/api/messages.mjs +1 -1
  26. package/dist/api/phoneNumber.d.mts +1 -1
  27. package/dist/api/phoneNumber.d.ts +1 -1
  28. package/dist/api/phoneNumber.js +1 -1
  29. package/dist/api/phoneNumber.mjs +1 -1
  30. package/dist/api/qrCode.d.mts +1 -1
  31. package/dist/api/qrCode.d.ts +1 -1
  32. package/dist/api/qrCode.js +1 -1
  33. package/dist/api/qrCode.mjs +1 -1
  34. package/dist/api/registration.d.mts +1 -1
  35. package/dist/api/registration.d.ts +1 -1
  36. package/dist/api/registration.js +1 -1
  37. package/dist/api/registration.mjs +1 -1
  38. package/dist/api/template.d.mts +1 -1
  39. package/dist/api/template.d.ts +1 -1
  40. package/dist/api/template.js +1 -1
  41. package/dist/api/template.mjs +1 -1
  42. package/dist/api/twoStepVerification.d.mts +1 -1
  43. package/dist/api/twoStepVerification.d.ts +1 -1
  44. package/dist/api/twoStepVerification.js +1 -1
  45. package/dist/api/twoStepVerification.mjs +1 -1
  46. package/dist/api/waba.d.mts +1 -1
  47. package/dist/api/waba.d.ts +1 -1
  48. package/dist/api/waba.js +1 -1
  49. package/dist/api/waba.mjs +1 -1
  50. package/dist/{enums-Bcd3jLw2.d.mts → enums-CI7vzKhn.d.mts} +3 -1
  51. package/dist/{enums-Bcd3jLw2.d.ts → enums-CI7vzKhn.d.ts} +3 -1
  52. package/dist/httpsClient.d.mts +1 -1
  53. package/dist/httpsClient.d.ts +1 -1
  54. package/dist/index.d.mts +3 -2
  55. package/dist/index.d.ts +3 -2
  56. package/dist/index.js +1 -1
  57. package/dist/index.js.map +1 -1
  58. package/dist/index.mjs +1 -1
  59. package/dist/index.mjs.map +1 -1
  60. package/dist/request.d.mts +1 -1
  61. package/dist/request.d.ts +1 -1
  62. package/dist/types/base.d.mts +1 -1
  63. package/dist/types/base.d.ts +1 -1
  64. package/dist/types/businessProfile.d.mts +1 -1
  65. package/dist/types/businessProfile.d.ts +1 -1
  66. package/dist/types/config.d.mts +9 -1
  67. package/dist/types/config.d.ts +9 -1
  68. package/dist/types/config.js +1 -1
  69. package/dist/types/config.js.map +1 -1
  70. package/dist/types/encryption.d.mts +1 -1
  71. package/dist/types/encryption.d.ts +1 -1
  72. package/dist/types/enums.d.mts +1 -1
  73. package/dist/types/enums.d.ts +1 -1
  74. package/dist/types/enums.js +1 -1
  75. package/dist/types/enums.js.map +1 -1
  76. package/dist/types/enums.mjs +1 -1
  77. package/dist/types/enums.mjs.map +1 -1
  78. package/dist/types/flow.d.mts +114 -10
  79. package/dist/types/flow.d.ts +114 -10
  80. package/dist/types/flow.js +1 -1
  81. package/dist/types/flow.js.map +1 -1
  82. package/dist/types/flow.mjs +1 -1
  83. package/dist/types/flow.mjs.map +1 -1
  84. package/dist/types/httpsClient.d.mts +1 -1
  85. package/dist/types/httpsClient.d.ts +1 -1
  86. package/dist/types/index.d.mts +3 -2
  87. package/dist/types/index.d.ts +3 -2
  88. package/dist/types/index.js +1 -1
  89. package/dist/types/index.js.map +1 -1
  90. package/dist/types/index.mjs +1 -1
  91. package/dist/types/index.mjs.map +1 -1
  92. package/dist/types/media.d.mts +1 -1
  93. package/dist/types/media.d.ts +1 -1
  94. package/dist/types/messages.d.mts +1 -1
  95. package/dist/types/messages.d.ts +1 -1
  96. package/dist/types/phoneNumber.d.mts +1 -1
  97. package/dist/types/phoneNumber.d.ts +1 -1
  98. package/dist/types/qrCode.d.mts +1 -1
  99. package/dist/types/qrCode.d.ts +1 -1
  100. package/dist/types/registration.d.mts +1 -1
  101. package/dist/types/registration.d.ts +1 -1
  102. package/dist/types/request.d.mts +1 -1
  103. package/dist/types/request.d.ts +1 -1
  104. package/dist/types/template.d.mts +1 -1
  105. package/dist/types/template.d.ts +1 -1
  106. package/dist/types/twoStepVerification.d.mts +1 -1
  107. package/dist/types/twoStepVerification.d.ts +1 -1
  108. package/dist/types/waba.d.mts +1 -1
  109. package/dist/types/waba.d.ts +1 -1
  110. package/dist/types/webhook.d.mts +1 -1
  111. package/dist/types/webhook.d.ts +1 -1
  112. package/dist/types/whatsapp.d.mts +4 -1
  113. package/dist/types/whatsapp.d.ts +4 -1
  114. package/dist/types/whatsapp.js +1 -1
  115. package/dist/types/whatsapp.js.map +1 -1
  116. package/dist/utils/filters.d.mts +1 -1
  117. package/dist/utils/filters.d.ts +1 -1
  118. package/dist/utils/filters.js +1 -1
  119. package/dist/utils/filters.mjs +1 -1
  120. package/dist/utils/importConfig.d.mts +2 -1
  121. package/dist/utils/importConfig.d.ts +2 -1
  122. package/dist/utils/importConfig.js +1 -1
  123. package/dist/utils/importConfig.js.map +1 -1
  124. package/dist/utils/importConfig.mjs +1 -1
  125. package/dist/utils/importConfig.mjs.map +1 -1
  126. package/dist/utils/index.d.mts +2 -1
  127. package/dist/utils/index.d.ts +2 -1
  128. package/dist/utils/index.js +1 -1
  129. package/dist/utils/index.js.map +1 -1
  130. package/dist/utils/index.mjs +1 -1
  131. package/dist/utils/index.mjs.map +1 -1
  132. package/dist/webhook.d.mts +17 -4
  133. package/dist/webhook.d.ts +17 -4
  134. package/dist/webhook.js +1 -1
  135. package/dist/webhook.js.map +1 -1
  136. package/dist/webhook.mjs +1 -1
  137. package/dist/webhook.mjs.map +1 -1
  138. package/dist/whatsapp.d.mts +2 -1
  139. package/dist/whatsapp.d.ts +2 -1
  140. package/dist/whatsapp.js +1 -1
  141. package/dist/whatsapp.js.map +1 -1
  142. package/dist/whatsapp.mjs +1 -1
  143. package/dist/whatsapp.mjs.map +1 -1
  144. package/package.json +2 -2
@@ -1,13 +1,6 @@
1
+ import { IncomingMessage, IncomingHttpHeaders } from 'http';
1
2
  import { ResponseSuccess } from './request.mjs';
2
- import '../enums-Bcd3jLw2.mjs';
3
-
4
- /**
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- * All rights reserved.
7
- *
8
- * This source code is licensed under the license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
3
+ import '../enums-CI7vzKhn.mjs';
11
4
 
12
5
  /**
13
6
  * Enum for Flow Status
@@ -32,6 +25,11 @@ declare enum FlowCategoryEnum {
32
25
  Survey = "SURVEY",
33
26
  Other = "OTHER"
34
27
  }
28
+ declare enum FlowActionEnum {
29
+ INIT = "INIT",
30
+ BACK = "BACK",
31
+ DATA_EXCHANGE = "data_exchange"
32
+ }
35
33
  /**
36
34
  * Flow Validation Error Pointer
37
35
  */
@@ -160,6 +158,112 @@ interface ValidateFlowJsonResponse {
160
158
  success: boolean;
161
159
  validation_errors?: FlowValidationError[];
162
160
  }
161
+ /**
162
+ * WhatsApp Flow Endpoint - Encrypted Request Payload
163
+ * Represents the raw encrypted data received from WhatsApp
164
+ */
165
+ interface FlowEncryptedRequestPayload {
166
+ encrypted_aes_key: string;
167
+ encrypted_flow_data: string;
168
+ initial_vector: string;
169
+ }
170
+ /**
171
+ * WhatsApp Flow Endpoint - Decrypted Request Response
172
+ * Represents the successfully decrypted data and encryption keys
173
+ */
174
+ interface FlowDecryptedRequestResponse {
175
+ decryptedBody: any;
176
+ aesKeyBuffer: Buffer;
177
+ initialVectorBuffer: Buffer;
178
+ }
179
+ /**
180
+ * WhatsApp Flow Endpoint - HTTP Request with Body
181
+ * Represents an HTTP request with the encrypted payload
182
+ */
183
+ interface FlowHttpRequest extends IncomingMessage {
184
+ body: FlowEncryptedRequestPayload;
185
+ headers: IncomingHttpHeaders;
186
+ }
187
+ /**
188
+ * WhatsApp Flow Endpoint - Health Check Request
189
+ * Represents the structure of a health check request
190
+ */
191
+ interface FlowHealthCheckRequest {
192
+ action: 'ping';
193
+ version: '3.0';
194
+ }
195
+ /**
196
+ * WhatsApp Flow Endpoint - Health Check Response
197
+ * The expected response structure for health check requests
198
+ */
199
+ interface FlowHealthCheckResponse {
200
+ data: {
201
+ status: 'active';
202
+ };
203
+ }
204
+ /**
205
+ * WhatsApp Flow Endpoint - Data Exchange Request
206
+ * Represents the structure of a data exchange request
207
+ */
208
+ interface FlowDataExchangeRequest {
209
+ version: '3.0';
210
+ action: FlowActionEnum;
211
+ screen: string;
212
+ flow_token: string;
213
+ data?: Record<string, any>;
214
+ }
215
+ /**
216
+ * WhatsApp Flow Endpoint - Data Exchange Response
217
+ * The expected response structure for data exchange requests
218
+ */
219
+ interface FlowDataExchangeResponse {
220
+ screen?: string;
221
+ data?: Record<string, any | {
222
+ error_message?: string;
223
+ }>;
224
+ }
225
+ /**
226
+ * WhatsApp Flow Endpoint - Success Screen Response
227
+ * The expected response structure for success screen requests
228
+ */
229
+ interface FlowSuccessScreenResponse {
230
+ screen: 'SUCCESS';
231
+ data: {
232
+ extension_message_response?: {
233
+ params?: {
234
+ flow_token: string;
235
+ [key: string]: string;
236
+ };
237
+ };
238
+ };
239
+ }
240
+ /**
241
+ * WhatsApp Flow Endpoint - Error Notification Request
242
+ * Represents the structure of an error notification request
243
+ */
244
+ interface FlowErrorNotificationRequest {
245
+ version: '3.0';
246
+ action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;
247
+ screen: string;
248
+ flow_token: string;
249
+ data: {
250
+ error_key?: string;
251
+ error_message?: string;
252
+ };
253
+ }
254
+ /**
255
+ * WhatsApp Flow Endpoint - Error Notification Response
256
+ * The expected response structure for error notification requests
257
+ */
258
+ interface FlowErrorNotificationResponse {
259
+ acknowledged: boolean;
260
+ }
261
+ type FlowEndpointRequest = FlowHealthCheckRequest | FlowDataExchangeRequest | FlowErrorNotificationRequest;
262
+ /**
263
+ * WhatsApp Flow Endpoint - Response
264
+ * Union type for all possible response types from a Flow endpoint
265
+ */
266
+ type FlowEndpointResponse = FlowHealthCheckResponse | FlowDataExchangeResponse | FlowErrorNotificationResponse | FlowSuccessScreenResponse;
163
267
  interface FlowClass {
164
268
  /**
165
269
  * List Flows
@@ -267,4 +371,4 @@ interface FlowClass {
267
371
  }): Promise<FlowMigrationResponse>;
268
372
  }
269
373
 
270
- export { type CreateFlowResponse, type Flow, type FlowAsset, type FlowAssetsResponse, FlowCategoryEnum, type FlowClass, type FlowMigrationFailure, type FlowMigrationResponse, type FlowMigrationResult, type FlowPreview, type FlowPreviewResponse, FlowStatusEnum, type FlowValidationError, type FlowValidationErrorPointer, type FlowsListResponse, type Pagination, type PaginationCursors, type UpdateFlowResponse, type ValidateFlowJsonResponse };
374
+ export { type CreateFlowResponse, type Flow, FlowActionEnum, type FlowAsset, type FlowAssetsResponse, FlowCategoryEnum, type FlowClass, type FlowDataExchangeRequest, type FlowDataExchangeResponse, type FlowDecryptedRequestResponse, type FlowEncryptedRequestPayload, type FlowEndpointRequest, type FlowEndpointResponse, type FlowErrorNotificationRequest, type FlowErrorNotificationResponse, type FlowHealthCheckRequest, type FlowHealthCheckResponse, type FlowHttpRequest, type FlowMigrationFailure, type FlowMigrationResponse, type FlowMigrationResult, type FlowPreview, type FlowPreviewResponse, FlowStatusEnum, type FlowSuccessScreenResponse, type FlowValidationError, type FlowValidationErrorPointer, type FlowsListResponse, type Pagination, type PaginationCursors, type UpdateFlowResponse, type ValidateFlowJsonResponse };
@@ -1,13 +1,6 @@
1
+ import { IncomingMessage, IncomingHttpHeaders } from 'http';
1
2
  import { ResponseSuccess } from './request.js';
2
- import '../enums-Bcd3jLw2.js';
3
-
4
- /**
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- * All rights reserved.
7
- *
8
- * This source code is licensed under the license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */
3
+ import '../enums-CI7vzKhn.js';
11
4
 
12
5
  /**
13
6
  * Enum for Flow Status
@@ -32,6 +25,11 @@ declare enum FlowCategoryEnum {
32
25
  Survey = "SURVEY",
33
26
  Other = "OTHER"
34
27
  }
28
+ declare enum FlowActionEnum {
29
+ INIT = "INIT",
30
+ BACK = "BACK",
31
+ DATA_EXCHANGE = "data_exchange"
32
+ }
35
33
  /**
36
34
  * Flow Validation Error Pointer
37
35
  */
@@ -160,6 +158,112 @@ interface ValidateFlowJsonResponse {
160
158
  success: boolean;
161
159
  validation_errors?: FlowValidationError[];
162
160
  }
161
+ /**
162
+ * WhatsApp Flow Endpoint - Encrypted Request Payload
163
+ * Represents the raw encrypted data received from WhatsApp
164
+ */
165
+ interface FlowEncryptedRequestPayload {
166
+ encrypted_aes_key: string;
167
+ encrypted_flow_data: string;
168
+ initial_vector: string;
169
+ }
170
+ /**
171
+ * WhatsApp Flow Endpoint - Decrypted Request Response
172
+ * Represents the successfully decrypted data and encryption keys
173
+ */
174
+ interface FlowDecryptedRequestResponse {
175
+ decryptedBody: any;
176
+ aesKeyBuffer: Buffer;
177
+ initialVectorBuffer: Buffer;
178
+ }
179
+ /**
180
+ * WhatsApp Flow Endpoint - HTTP Request with Body
181
+ * Represents an HTTP request with the encrypted payload
182
+ */
183
+ interface FlowHttpRequest extends IncomingMessage {
184
+ body: FlowEncryptedRequestPayload;
185
+ headers: IncomingHttpHeaders;
186
+ }
187
+ /**
188
+ * WhatsApp Flow Endpoint - Health Check Request
189
+ * Represents the structure of a health check request
190
+ */
191
+ interface FlowHealthCheckRequest {
192
+ action: 'ping';
193
+ version: '3.0';
194
+ }
195
+ /**
196
+ * WhatsApp Flow Endpoint - Health Check Response
197
+ * The expected response structure for health check requests
198
+ */
199
+ interface FlowHealthCheckResponse {
200
+ data: {
201
+ status: 'active';
202
+ };
203
+ }
204
+ /**
205
+ * WhatsApp Flow Endpoint - Data Exchange Request
206
+ * Represents the structure of a data exchange request
207
+ */
208
+ interface FlowDataExchangeRequest {
209
+ version: '3.0';
210
+ action: FlowActionEnum;
211
+ screen: string;
212
+ flow_token: string;
213
+ data?: Record<string, any>;
214
+ }
215
+ /**
216
+ * WhatsApp Flow Endpoint - Data Exchange Response
217
+ * The expected response structure for data exchange requests
218
+ */
219
+ interface FlowDataExchangeResponse {
220
+ screen?: string;
221
+ data?: Record<string, any | {
222
+ error_message?: string;
223
+ }>;
224
+ }
225
+ /**
226
+ * WhatsApp Flow Endpoint - Success Screen Response
227
+ * The expected response structure for success screen requests
228
+ */
229
+ interface FlowSuccessScreenResponse {
230
+ screen: 'SUCCESS';
231
+ data: {
232
+ extension_message_response?: {
233
+ params?: {
234
+ flow_token: string;
235
+ [key: string]: string;
236
+ };
237
+ };
238
+ };
239
+ }
240
+ /**
241
+ * WhatsApp Flow Endpoint - Error Notification Request
242
+ * Represents the structure of an error notification request
243
+ */
244
+ interface FlowErrorNotificationRequest {
245
+ version: '3.0';
246
+ action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;
247
+ screen: string;
248
+ flow_token: string;
249
+ data: {
250
+ error_key?: string;
251
+ error_message?: string;
252
+ };
253
+ }
254
+ /**
255
+ * WhatsApp Flow Endpoint - Error Notification Response
256
+ * The expected response structure for error notification requests
257
+ */
258
+ interface FlowErrorNotificationResponse {
259
+ acknowledged: boolean;
260
+ }
261
+ type FlowEndpointRequest = FlowHealthCheckRequest | FlowDataExchangeRequest | FlowErrorNotificationRequest;
262
+ /**
263
+ * WhatsApp Flow Endpoint - Response
264
+ * Union type for all possible response types from a Flow endpoint
265
+ */
266
+ type FlowEndpointResponse = FlowHealthCheckResponse | FlowDataExchangeResponse | FlowErrorNotificationResponse | FlowSuccessScreenResponse;
163
267
  interface FlowClass {
164
268
  /**
165
269
  * List Flows
@@ -267,4 +371,4 @@ interface FlowClass {
267
371
  }): Promise<FlowMigrationResponse>;
268
372
  }
269
373
 
270
- export { type CreateFlowResponse, type Flow, type FlowAsset, type FlowAssetsResponse, FlowCategoryEnum, type FlowClass, type FlowMigrationFailure, type FlowMigrationResponse, type FlowMigrationResult, type FlowPreview, type FlowPreviewResponse, FlowStatusEnum, type FlowValidationError, type FlowValidationErrorPointer, type FlowsListResponse, type Pagination, type PaginationCursors, type UpdateFlowResponse, type ValidateFlowJsonResponse };
374
+ export { type CreateFlowResponse, type Flow, FlowActionEnum, type FlowAsset, type FlowAssetsResponse, FlowCategoryEnum, type FlowClass, type FlowDataExchangeRequest, type FlowDataExchangeResponse, type FlowDecryptedRequestResponse, type FlowEncryptedRequestPayload, type FlowEndpointRequest, type FlowEndpointResponse, type FlowErrorNotificationRequest, type FlowErrorNotificationResponse, type FlowHealthCheckRequest, type FlowHealthCheckResponse, type FlowHttpRequest, type FlowMigrationFailure, type FlowMigrationResponse, type FlowMigrationResult, type FlowPreview, type FlowPreviewResponse, FlowStatusEnum, type FlowSuccessScreenResponse, type FlowValidationError, type FlowValidationErrorPointer, type FlowsListResponse, type Pagination, type PaginationCursors, type UpdateFlowResponse, type ValidateFlowJsonResponse };
@@ -1,2 +1,2 @@
1
- "use strict";var n=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var t in e)n(o,t,{get:e[t],enumerable:!0})},_=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of p(e))!w.call(o,s)&&s!==t&&n(o,s,{get:()=>e[s],enumerable:!(a=g(e,s))||a.enumerable});return o};var f=o=>_(n({},"__esModule",{value:!0}),o);var F={};c(F,{FlowCategoryEnum:()=>d,FlowStatusEnum:()=>l});module.exports=f(F);var l=(i=>(i.Draft="DRAFT",i.Published="PUBLISHED",i.Throttled="THROTTLED",i.Blocked="BLOCKED",i.Deprecated="DEPRECATED",i))(l||{}),d=(r=>(r.SignUp="SIGN_UP",r.SignIn="SIGN_IN",r.AppointmentBooking="APPOINTMENT_BOOKING",r.LeadGeneration="LEAD_GENERATION",r.ContactUs="CONTACT_US",r.CustomerSupport="CUSTOMER_SUPPORT",r.Survey="SURVEY",r.Other="OTHER",r))(d||{});0&&(module.exports={FlowCategoryEnum,FlowStatusEnum});
1
+ "use strict";var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var f=(o,e)=>{for(var i in e)a(o,i,{get:e[i],enumerable:!0})},F=(o,e,i,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of d(e))!w.call(o,s)&&s!==i&&a(o,s,{get:()=>e[s],enumerable:!(t=g(e,s))||t.enumerable});return o};var _=o=>F(a({},"__esModule",{value:!0}),o);var u={};f(u,{FlowActionEnum:()=>p,FlowCategoryEnum:()=>c,FlowStatusEnum:()=>l});module.exports=_(u);var l=(n=>(n.Draft="DRAFT",n.Published="PUBLISHED",n.Throttled="THROTTLED",n.Blocked="BLOCKED",n.Deprecated="DEPRECATED",n))(l||{}),c=(r=>(r.SignUp="SIGN_UP",r.SignIn="SIGN_IN",r.AppointmentBooking="APPOINTMENT_BOOKING",r.LeadGeneration="LEAD_GENERATION",r.ContactUs="CONTACT_US",r.CustomerSupport="CUSTOMER_SUPPORT",r.Survey="SURVEY",r.Other="OTHER",r))(c||{}),p=(t=>(t.INIT="INIT",t.BACK="BACK",t.DATA_EXCHANGE="data_exchange",t))(p||{});0&&(module.exports={FlowActionEnum,FlowCategoryEnum,FlowStatusEnum});
2
2
  //# sourceMappingURL=flow.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/flow.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { ResponseSuccess } from './request';\n\n/**\n * Enum for Flow Status\n */\nexport enum FlowStatusEnum {\n Draft = 'DRAFT',\n Published = 'PUBLISHED',\n Throttled = 'THROTTLED',\n Blocked = 'BLOCKED',\n Deprecated = 'DEPRECATED',\n}\n\n/**\n * Enum for Flow Categories\n */\nexport enum FlowCategoryEnum {\n SignUp = 'SIGN_UP',\n SignIn = 'SIGN_IN',\n AppointmentBooking = 'APPOINTMENT_BOOKING',\n LeadGeneration = 'LEAD_GENERATION',\n ContactUs = 'CONTACT_US',\n CustomerSupport = 'CUSTOMER_SUPPORT',\n Survey = 'SURVEY',\n Other = 'OTHER',\n}\n\n/**\n * Flow Validation Error Pointer\n */\nexport interface FlowValidationErrorPointer {\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n path: string;\n}\n\n/**\n * Flow Validation Error\n */\nexport interface FlowValidationError {\n error: string;\n error_type: string;\n message: string;\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n pointers: FlowValidationErrorPointer[];\n}\n\n/**\n * Flow Item\n */\nexport interface Flow {\n id: string;\n name: string;\n status: FlowStatusEnum;\n categories: FlowCategoryEnum[];\n validation_errors: FlowValidationError[];\n}\n\n/**\n * Pagination Cursors\n */\nexport interface PaginationCursors {\n before: string;\n after: string;\n}\n\n/**\n * Pagination Object\n */\nexport interface Pagination {\n cursors: PaginationCursors;\n}\n\n/**\n * Flows List Response\n */\nexport interface FlowsListResponse {\n data: Flow[];\n paging: Pagination;\n}\n\n/**\n * Flow Asset\n */\nexport interface FlowAsset {\n name: string;\n asset_type: string;\n download_url: string;\n}\n\n/**\n * Flow Assets Response\n */\nexport interface FlowAssetsResponse {\n data: FlowAsset[];\n paging: Pagination;\n}\n\n/**\n * Flow Preview\n */\nexport interface FlowPreview {\n preview_url: string;\n expires_at: string;\n}\n\n/**\n * Flow Preview Response\n */\nexport interface FlowPreviewResponse {\n preview: FlowPreview;\n id: string;\n}\n\n/**\n * Flow Migration Result\n */\nexport interface FlowMigrationResult {\n source_name: string;\n source_id: string;\n migrated_id: string;\n}\n\n/**\n * Flow Migration Failure\n */\nexport interface FlowMigrationFailure {\n source_name: string;\n error_code: string;\n error_message: string;\n}\n\n/**\n * Create Flow Response\n */\nexport interface CreateFlowResponse {\n id: string;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Update Flow Response\n */\nexport interface UpdateFlowResponse {\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Flow Migration Response\n */\nexport interface FlowMigrationResponse {\n migrated_flows: FlowMigrationResult[];\n failed_flows: FlowMigrationFailure[];\n}\n\n/**\n * Validate Flow JSON Response\n */\nexport interface ValidateFlowJsonResponse {\n valid: boolean;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\nexport interface FlowClass {\n /**\n * List Flows\n *\n * @param wabaId - The WABA ID\n * @returns Promise with the list of flows\n */\n listFlows(wabaId: string): Promise<FlowsListResponse>;\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\n */\n createFlow(\n wabaId: string,\n data: {\n name: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n clone_flow_id?: string;\n flow_json?: string;\n publish?: boolean;\n },\n ): Promise<CreateFlowResponse>;\n\n /**\n * Get Flow\n *\n * @param flowId - The flow ID\n * @param fields - Optional fields to return\n * @param dateFormat - Optional date format\n * @returns Promise with the flow details\n */\n getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;\n\n /**\n * Update Flow Metadata\n *\n * @param flowId - The flow ID\n * @param data - The flow metadata to update\n * @returns Promise with the success status\n */\n updateFlowMetadata(\n flowId: string,\n data: {\n name?: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n application_id?: string;\n },\n ): Promise<ResponseSuccess>;\n\n /**\n * Delete Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deleteFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * List Assets (Get Flow JSON URL)\n *\n * @param flowId - The flow ID\n * @returns Promise with the list of assets\n */\n listAssets(flowId: string): Promise<FlowAssetsResponse>;\n\n /**\n * Update Flow JSON\n *\n * @param flowId - The flow ID\n * @param data - The asset data including asset_type, file, and name\n * @returns Promise with the success status and validation errors\n */\n updateFlowJson(\n flowId: string,\n data: {\n asset_type: 'FLOW_JSON';\n file: Blob;\n name: string;\n },\n ): Promise<UpdateFlowResponse>;\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 Buffer, JSON object, or Blob.\n * @returns Promise indicating if the JSON is valid and includes validation errors if any.\n */\n validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;\n\n /**\n * Publish Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n publishFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Deprecate Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deprecateFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Migrate Flows\n *\n * @param wabaId - 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\n */\n migrateFlows(\n wabaId: string,\n data: {\n source_waba_id: string;\n source_flow_names?: string[];\n },\n ): Promise<FlowMigrationResponse>;\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,sBAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAYO,IAAKG,OACRA,EAAA,MAAQ,QACRA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,WAAa,aALLA,OAAA,IAWAD,OACRA,EAAA,OAAS,UACTA,EAAA,OAAS,UACTA,EAAA,mBAAqB,sBACrBA,EAAA,eAAiB,kBACjBA,EAAA,UAAY,aACZA,EAAA,gBAAkB,mBAClBA,EAAA,OAAS,SACTA,EAAA,MAAQ,QARAA,OAAA","names":["flow_exports","__export","FlowCategoryEnum","FlowStatusEnum","__toCommonJS"]}
1
+ {"version":3,"sources":["../../src/types/flow.ts"],"sourcesContent":["import { IncomingHttpHeaders, IncomingMessage } from 'http';\nimport { ResponseSuccess } from './request';\n\n/**\n * Enum for Flow Status\n */\nexport enum FlowStatusEnum {\n Draft = 'DRAFT',\n Published = 'PUBLISHED',\n Throttled = 'THROTTLED',\n Blocked = 'BLOCKED',\n Deprecated = 'DEPRECATED',\n}\n\n/**\n * Enum for Flow Categories\n */\nexport enum FlowCategoryEnum {\n SignUp = 'SIGN_UP',\n SignIn = 'SIGN_IN',\n AppointmentBooking = 'APPOINTMENT_BOOKING',\n LeadGeneration = 'LEAD_GENERATION',\n ContactUs = 'CONTACT_US',\n CustomerSupport = 'CUSTOMER_SUPPORT',\n Survey = 'SURVEY',\n Other = 'OTHER',\n}\n\nexport enum FlowActionEnum {\n INIT = 'INIT',\n BACK = 'BACK',\n DATA_EXCHANGE = 'data_exchange',\n}\n\n/**\n * Flow Validation Error Pointer\n */\nexport interface FlowValidationErrorPointer {\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n path: string;\n}\n\n/**\n * Flow Validation Error\n */\nexport interface FlowValidationError {\n error: string;\n error_type: string;\n message: string;\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n pointers: FlowValidationErrorPointer[];\n}\n\n/**\n * Flow Item\n */\nexport interface Flow {\n id: string;\n name: string;\n status: FlowStatusEnum;\n categories: FlowCategoryEnum[];\n validation_errors: FlowValidationError[];\n}\n\n/**\n * Pagination Cursors\n */\nexport interface PaginationCursors {\n before: string;\n after: string;\n}\n\n/**\n * Pagination Object\n */\nexport interface Pagination {\n cursors: PaginationCursors;\n}\n\n/**\n * Flows List Response\n */\nexport interface FlowsListResponse {\n data: Flow[];\n paging: Pagination;\n}\n\n/**\n * Flow Asset\n */\nexport interface FlowAsset {\n name: string;\n asset_type: string;\n download_url: string;\n}\n\n/**\n * Flow Assets Response\n */\nexport interface FlowAssetsResponse {\n data: FlowAsset[];\n paging: Pagination;\n}\n\n/**\n * Flow Preview\n */\nexport interface FlowPreview {\n preview_url: string;\n expires_at: string;\n}\n\n/**\n * Flow Preview Response\n */\nexport interface FlowPreviewResponse {\n preview: FlowPreview;\n id: string;\n}\n\n/**\n * Flow Migration Result\n */\nexport interface FlowMigrationResult {\n source_name: string;\n source_id: string;\n migrated_id: string;\n}\n\n/**\n * Flow Migration Failure\n */\nexport interface FlowMigrationFailure {\n source_name: string;\n error_code: string;\n error_message: string;\n}\n\n/**\n * Create Flow Response\n */\nexport interface CreateFlowResponse {\n id: string;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Update Flow Response\n */\nexport interface UpdateFlowResponse {\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Flow Migration Response\n */\nexport interface FlowMigrationResponse {\n migrated_flows: FlowMigrationResult[];\n failed_flows: FlowMigrationFailure[];\n}\n\n/**\n * Validate Flow JSON Response\n */\nexport interface ValidateFlowJsonResponse {\n valid: boolean;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * WhatsApp Flow Endpoint - Encrypted Request Payload\n * Represents the raw encrypted data received from WhatsApp\n */\nexport interface FlowEncryptedRequestPayload {\n encrypted_aes_key: string;\n encrypted_flow_data: string;\n initial_vector: string;\n}\n\n/**\n * WhatsApp Flow Endpoint - Decrypted Request Response\n * Represents the successfully decrypted data and encryption keys\n */\nexport interface FlowDecryptedRequestResponse {\n decryptedBody: any;\n aesKeyBuffer: Buffer;\n initialVectorBuffer: Buffer;\n}\n\n/**\n * WhatsApp Flow Endpoint - HTTP Request with Body\n * Represents an HTTP request with the encrypted payload\n */\nexport interface FlowHttpRequest extends IncomingMessage {\n body: FlowEncryptedRequestPayload;\n headers: IncomingHttpHeaders;\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Request\n * Represents the structure of a health check request\n */\nexport interface FlowHealthCheckRequest {\n action: 'ping';\n version: '3.0';\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Response\n * The expected response structure for health check requests\n */\nexport interface FlowHealthCheckResponse {\n data: {\n status: 'active';\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Request\n * Represents the structure of a data exchange request\n */\nexport interface FlowDataExchangeRequest {\n version: '3.0';\n action: FlowActionEnum;\n screen: string;\n flow_token: string;\n data?: Record<string, any>;\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Response\n * The expected response structure for data exchange requests\n */\nexport interface FlowDataExchangeResponse {\n screen?: string;\n data?: Record<string, any | { error_message?: string }>;\n}\n\n/**\n * WhatsApp Flow Endpoint - Success Screen Response\n * The expected response structure for success screen requests\n */\nexport interface FlowSuccessScreenResponse {\n screen: 'SUCCESS';\n data: {\n extension_message_response?: {\n params?: {\n flow_token: string;\n [key: string]: string;\n };\n };\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Request\n * Represents the structure of an error notification request\n */\nexport interface FlowErrorNotificationRequest {\n version: '3.0';\n action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;\n screen: string;\n flow_token: string;\n data: {\n error_key?: string;\n error_message?: string;\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Response\n * The expected response structure for error notification requests\n */\nexport interface FlowErrorNotificationResponse {\n acknowledged: boolean;\n}\n\nexport type FlowEndpointRequest = FlowHealthCheckRequest | FlowDataExchangeRequest | FlowErrorNotificationRequest;\n\n/**\n * WhatsApp Flow Endpoint - Response\n * Union type for all possible response types from a Flow endpoint\n */\nexport type FlowEndpointResponse =\n | FlowHealthCheckResponse\n | FlowDataExchangeResponse\n | FlowErrorNotificationResponse\n | FlowSuccessScreenResponse;\n\nexport interface FlowClass {\n /**\n * List Flows\n *\n * @param wabaId - The WABA ID\n * @returns Promise with the list of flows\n */\n listFlows(wabaId: string): Promise<FlowsListResponse>;\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\n */\n createFlow(\n wabaId: string,\n data: {\n name: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n clone_flow_id?: string;\n flow_json?: string;\n publish?: boolean;\n },\n ): Promise<CreateFlowResponse>;\n\n /**\n * Get Flow\n *\n * @param flowId - The flow ID\n * @param fields - Optional fields to return\n * @param dateFormat - Optional date format\n * @returns Promise with the flow details\n */\n getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;\n\n /**\n * Update Flow Metadata\n *\n * @param flowId - The flow ID\n * @param data - The flow metadata to update\n * @returns Promise with the success status\n */\n updateFlowMetadata(\n flowId: string,\n data: {\n name?: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n application_id?: string;\n },\n ): Promise<ResponseSuccess>;\n\n /**\n * Delete Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deleteFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * List Assets (Get Flow JSON URL)\n *\n * @param flowId - The flow ID\n * @returns Promise with the list of assets\n */\n listAssets(flowId: string): Promise<FlowAssetsResponse>;\n\n /**\n * Update Flow JSON\n *\n * @param flowId - The flow ID\n * @param data - The asset data including asset_type, file, and name\n * @returns Promise with the success status and validation errors\n */\n updateFlowJson(\n flowId: string,\n data: {\n asset_type: 'FLOW_JSON';\n file: Blob;\n name: string;\n },\n ): Promise<UpdateFlowResponse>;\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 Buffer, JSON object, or Blob.\n * @returns Promise indicating if the JSON is valid and includes validation errors if any.\n */\n validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;\n\n /**\n * Publish Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n publishFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Deprecate Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deprecateFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Migrate Flows\n *\n * @param wabaId - 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\n */\n migrateFlows(\n wabaId: string,\n data: {\n source_waba_id: string;\n source_flow_names?: string[];\n },\n ): Promise<FlowMigrationResponse>;\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,oBAAAE,EAAA,qBAAAC,EAAA,mBAAAC,IAAA,eAAAC,EAAAL,GAMO,IAAKI,OACRA,EAAA,MAAQ,QACRA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,WAAa,aALLA,OAAA,IAWAD,OACRA,EAAA,OAAS,UACTA,EAAA,OAAS,UACTA,EAAA,mBAAqB,sBACrBA,EAAA,eAAiB,kBACjBA,EAAA,UAAY,aACZA,EAAA,gBAAkB,mBAClBA,EAAA,OAAS,SACTA,EAAA,MAAQ,QARAA,OAAA,IAWAD,OACRA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,cAAgB,gBAHRA,OAAA","names":["flow_exports","__export","FlowActionEnum","FlowCategoryEnum","FlowStatusEnum","__toCommonJS"]}
@@ -1,2 +1,2 @@
1
- var o=(r=>(r.Draft="DRAFT",r.Published="PUBLISHED",r.Throttled="THROTTLED",r.Blocked="BLOCKED",r.Deprecated="DEPRECATED",r))(o||{}),s=(e=>(e.SignUp="SIGN_UP",e.SignIn="SIGN_IN",e.AppointmentBooking="APPOINTMENT_BOOKING",e.LeadGeneration="LEAD_GENERATION",e.ContactUs="CONTACT_US",e.CustomerSupport="CUSTOMER_SUPPORT",e.Survey="SURVEY",e.Other="OTHER",e))(s||{});export{s as FlowCategoryEnum,o as FlowStatusEnum};
1
+ var t=(r=>(r.Draft="DRAFT",r.Published="PUBLISHED",r.Throttled="THROTTLED",r.Blocked="BLOCKED",r.Deprecated="DEPRECATED",r))(t||{}),s=(e=>(e.SignUp="SIGN_UP",e.SignIn="SIGN_IN",e.AppointmentBooking="APPOINTMENT_BOOKING",e.LeadGeneration="LEAD_GENERATION",e.ContactUs="CONTACT_US",e.CustomerSupport="CUSTOMER_SUPPORT",e.Survey="SURVEY",e.Other="OTHER",e))(s||{}),n=(o=>(o.INIT="INIT",o.BACK="BACK",o.DATA_EXCHANGE="data_exchange",o))(n||{});export{n as FlowActionEnum,s as FlowCategoryEnum,t as FlowStatusEnum};
2
2
  //# sourceMappingURL=flow.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/flow.ts"],"sourcesContent":["/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n * All rights reserved.\n *\n * This source code is licensed under the license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport { ResponseSuccess } from './request';\n\n/**\n * Enum for Flow Status\n */\nexport enum FlowStatusEnum {\n Draft = 'DRAFT',\n Published = 'PUBLISHED',\n Throttled = 'THROTTLED',\n Blocked = 'BLOCKED',\n Deprecated = 'DEPRECATED',\n}\n\n/**\n * Enum for Flow Categories\n */\nexport enum FlowCategoryEnum {\n SignUp = 'SIGN_UP',\n SignIn = 'SIGN_IN',\n AppointmentBooking = 'APPOINTMENT_BOOKING',\n LeadGeneration = 'LEAD_GENERATION',\n ContactUs = 'CONTACT_US',\n CustomerSupport = 'CUSTOMER_SUPPORT',\n Survey = 'SURVEY',\n Other = 'OTHER',\n}\n\n/**\n * Flow Validation Error Pointer\n */\nexport interface FlowValidationErrorPointer {\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n path: string;\n}\n\n/**\n * Flow Validation Error\n */\nexport interface FlowValidationError {\n error: string;\n error_type: string;\n message: string;\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n pointers: FlowValidationErrorPointer[];\n}\n\n/**\n * Flow Item\n */\nexport interface Flow {\n id: string;\n name: string;\n status: FlowStatusEnum;\n categories: FlowCategoryEnum[];\n validation_errors: FlowValidationError[];\n}\n\n/**\n * Pagination Cursors\n */\nexport interface PaginationCursors {\n before: string;\n after: string;\n}\n\n/**\n * Pagination Object\n */\nexport interface Pagination {\n cursors: PaginationCursors;\n}\n\n/**\n * Flows List Response\n */\nexport interface FlowsListResponse {\n data: Flow[];\n paging: Pagination;\n}\n\n/**\n * Flow Asset\n */\nexport interface FlowAsset {\n name: string;\n asset_type: string;\n download_url: string;\n}\n\n/**\n * Flow Assets Response\n */\nexport interface FlowAssetsResponse {\n data: FlowAsset[];\n paging: Pagination;\n}\n\n/**\n * Flow Preview\n */\nexport interface FlowPreview {\n preview_url: string;\n expires_at: string;\n}\n\n/**\n * Flow Preview Response\n */\nexport interface FlowPreviewResponse {\n preview: FlowPreview;\n id: string;\n}\n\n/**\n * Flow Migration Result\n */\nexport interface FlowMigrationResult {\n source_name: string;\n source_id: string;\n migrated_id: string;\n}\n\n/**\n * Flow Migration Failure\n */\nexport interface FlowMigrationFailure {\n source_name: string;\n error_code: string;\n error_message: string;\n}\n\n/**\n * Create Flow Response\n */\nexport interface CreateFlowResponse {\n id: string;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Update Flow Response\n */\nexport interface UpdateFlowResponse {\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Flow Migration Response\n */\nexport interface FlowMigrationResponse {\n migrated_flows: FlowMigrationResult[];\n failed_flows: FlowMigrationFailure[];\n}\n\n/**\n * Validate Flow JSON Response\n */\nexport interface ValidateFlowJsonResponse {\n valid: boolean;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\nexport interface FlowClass {\n /**\n * List Flows\n *\n * @param wabaId - The WABA ID\n * @returns Promise with the list of flows\n */\n listFlows(wabaId: string): Promise<FlowsListResponse>;\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\n */\n createFlow(\n wabaId: string,\n data: {\n name: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n clone_flow_id?: string;\n flow_json?: string;\n publish?: boolean;\n },\n ): Promise<CreateFlowResponse>;\n\n /**\n * Get Flow\n *\n * @param flowId - The flow ID\n * @param fields - Optional fields to return\n * @param dateFormat - Optional date format\n * @returns Promise with the flow details\n */\n getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;\n\n /**\n * Update Flow Metadata\n *\n * @param flowId - The flow ID\n * @param data - The flow metadata to update\n * @returns Promise with the success status\n */\n updateFlowMetadata(\n flowId: string,\n data: {\n name?: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n application_id?: string;\n },\n ): Promise<ResponseSuccess>;\n\n /**\n * Delete Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deleteFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * List Assets (Get Flow JSON URL)\n *\n * @param flowId - The flow ID\n * @returns Promise with the list of assets\n */\n listAssets(flowId: string): Promise<FlowAssetsResponse>;\n\n /**\n * Update Flow JSON\n *\n * @param flowId - The flow ID\n * @param data - The asset data including asset_type, file, and name\n * @returns Promise with the success status and validation errors\n */\n updateFlowJson(\n flowId: string,\n data: {\n asset_type: 'FLOW_JSON';\n file: Blob;\n name: string;\n },\n ): Promise<UpdateFlowResponse>;\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 Buffer, JSON object, or Blob.\n * @returns Promise indicating if the JSON is valid and includes validation errors if any.\n */\n validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;\n\n /**\n * Publish Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n publishFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Deprecate Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deprecateFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Migrate Flows\n *\n * @param wabaId - 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\n */\n migrateFlows(\n wabaId: string,\n data: {\n source_waba_id: string;\n source_flow_names?: string[];\n },\n ): Promise<FlowMigrationResponse>;\n}\n"],"mappings":"AAYO,IAAKA,OACRA,EAAA,MAAQ,QACRA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,WAAa,aALLA,OAAA,IAWAC,OACRA,EAAA,OAAS,UACTA,EAAA,OAAS,UACTA,EAAA,mBAAqB,sBACrBA,EAAA,eAAiB,kBACjBA,EAAA,UAAY,aACZA,EAAA,gBAAkB,mBAClBA,EAAA,OAAS,SACTA,EAAA,MAAQ,QARAA,OAAA","names":["FlowStatusEnum","FlowCategoryEnum"]}
1
+ {"version":3,"sources":["../../src/types/flow.ts"],"sourcesContent":["import { IncomingHttpHeaders, IncomingMessage } from 'http';\nimport { ResponseSuccess } from './request';\n\n/**\n * Enum for Flow Status\n */\nexport enum FlowStatusEnum {\n Draft = 'DRAFT',\n Published = 'PUBLISHED',\n Throttled = 'THROTTLED',\n Blocked = 'BLOCKED',\n Deprecated = 'DEPRECATED',\n}\n\n/**\n * Enum for Flow Categories\n */\nexport enum FlowCategoryEnum {\n SignUp = 'SIGN_UP',\n SignIn = 'SIGN_IN',\n AppointmentBooking = 'APPOINTMENT_BOOKING',\n LeadGeneration = 'LEAD_GENERATION',\n ContactUs = 'CONTACT_US',\n CustomerSupport = 'CUSTOMER_SUPPORT',\n Survey = 'SURVEY',\n Other = 'OTHER',\n}\n\nexport enum FlowActionEnum {\n INIT = 'INIT',\n BACK = 'BACK',\n DATA_EXCHANGE = 'data_exchange',\n}\n\n/**\n * Flow Validation Error Pointer\n */\nexport interface FlowValidationErrorPointer {\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n path: string;\n}\n\n/**\n * Flow Validation Error\n */\nexport interface FlowValidationError {\n error: string;\n error_type: string;\n message: string;\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n pointers: FlowValidationErrorPointer[];\n}\n\n/**\n * Flow Item\n */\nexport interface Flow {\n id: string;\n name: string;\n status: FlowStatusEnum;\n categories: FlowCategoryEnum[];\n validation_errors: FlowValidationError[];\n}\n\n/**\n * Pagination Cursors\n */\nexport interface PaginationCursors {\n before: string;\n after: string;\n}\n\n/**\n * Pagination Object\n */\nexport interface Pagination {\n cursors: PaginationCursors;\n}\n\n/**\n * Flows List Response\n */\nexport interface FlowsListResponse {\n data: Flow[];\n paging: Pagination;\n}\n\n/**\n * Flow Asset\n */\nexport interface FlowAsset {\n name: string;\n asset_type: string;\n download_url: string;\n}\n\n/**\n * Flow Assets Response\n */\nexport interface FlowAssetsResponse {\n data: FlowAsset[];\n paging: Pagination;\n}\n\n/**\n * Flow Preview\n */\nexport interface FlowPreview {\n preview_url: string;\n expires_at: string;\n}\n\n/**\n * Flow Preview Response\n */\nexport interface FlowPreviewResponse {\n preview: FlowPreview;\n id: string;\n}\n\n/**\n * Flow Migration Result\n */\nexport interface FlowMigrationResult {\n source_name: string;\n source_id: string;\n migrated_id: string;\n}\n\n/**\n * Flow Migration Failure\n */\nexport interface FlowMigrationFailure {\n source_name: string;\n error_code: string;\n error_message: string;\n}\n\n/**\n * Create Flow Response\n */\nexport interface CreateFlowResponse {\n id: string;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Update Flow Response\n */\nexport interface UpdateFlowResponse {\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Flow Migration Response\n */\nexport interface FlowMigrationResponse {\n migrated_flows: FlowMigrationResult[];\n failed_flows: FlowMigrationFailure[];\n}\n\n/**\n * Validate Flow JSON Response\n */\nexport interface ValidateFlowJsonResponse {\n valid: boolean;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * WhatsApp Flow Endpoint - Encrypted Request Payload\n * Represents the raw encrypted data received from WhatsApp\n */\nexport interface FlowEncryptedRequestPayload {\n encrypted_aes_key: string;\n encrypted_flow_data: string;\n initial_vector: string;\n}\n\n/**\n * WhatsApp Flow Endpoint - Decrypted Request Response\n * Represents the successfully decrypted data and encryption keys\n */\nexport interface FlowDecryptedRequestResponse {\n decryptedBody: any;\n aesKeyBuffer: Buffer;\n initialVectorBuffer: Buffer;\n}\n\n/**\n * WhatsApp Flow Endpoint - HTTP Request with Body\n * Represents an HTTP request with the encrypted payload\n */\nexport interface FlowHttpRequest extends IncomingMessage {\n body: FlowEncryptedRequestPayload;\n headers: IncomingHttpHeaders;\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Request\n * Represents the structure of a health check request\n */\nexport interface FlowHealthCheckRequest {\n action: 'ping';\n version: '3.0';\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Response\n * The expected response structure for health check requests\n */\nexport interface FlowHealthCheckResponse {\n data: {\n status: 'active';\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Request\n * Represents the structure of a data exchange request\n */\nexport interface FlowDataExchangeRequest {\n version: '3.0';\n action: FlowActionEnum;\n screen: string;\n flow_token: string;\n data?: Record<string, any>;\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Response\n * The expected response structure for data exchange requests\n */\nexport interface FlowDataExchangeResponse {\n screen?: string;\n data?: Record<string, any | { error_message?: string }>;\n}\n\n/**\n * WhatsApp Flow Endpoint - Success Screen Response\n * The expected response structure for success screen requests\n */\nexport interface FlowSuccessScreenResponse {\n screen: 'SUCCESS';\n data: {\n extension_message_response?: {\n params?: {\n flow_token: string;\n [key: string]: string;\n };\n };\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Request\n * Represents the structure of an error notification request\n */\nexport interface FlowErrorNotificationRequest {\n version: '3.0';\n action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;\n screen: string;\n flow_token: string;\n data: {\n error_key?: string;\n error_message?: string;\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Response\n * The expected response structure for error notification requests\n */\nexport interface FlowErrorNotificationResponse {\n acknowledged: boolean;\n}\n\nexport type FlowEndpointRequest = FlowHealthCheckRequest | FlowDataExchangeRequest | FlowErrorNotificationRequest;\n\n/**\n * WhatsApp Flow Endpoint - Response\n * Union type for all possible response types from a Flow endpoint\n */\nexport type FlowEndpointResponse =\n | FlowHealthCheckResponse\n | FlowDataExchangeResponse\n | FlowErrorNotificationResponse\n | FlowSuccessScreenResponse;\n\nexport interface FlowClass {\n /**\n * List Flows\n *\n * @param wabaId - The WABA ID\n * @returns Promise with the list of flows\n */\n listFlows(wabaId: string): Promise<FlowsListResponse>;\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\n */\n createFlow(\n wabaId: string,\n data: {\n name: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n clone_flow_id?: string;\n flow_json?: string;\n publish?: boolean;\n },\n ): Promise<CreateFlowResponse>;\n\n /**\n * Get Flow\n *\n * @param flowId - The flow ID\n * @param fields - Optional fields to return\n * @param dateFormat - Optional date format\n * @returns Promise with the flow details\n */\n getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;\n\n /**\n * Update Flow Metadata\n *\n * @param flowId - The flow ID\n * @param data - The flow metadata to update\n * @returns Promise with the success status\n */\n updateFlowMetadata(\n flowId: string,\n data: {\n name?: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n application_id?: string;\n },\n ): Promise<ResponseSuccess>;\n\n /**\n * Delete Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deleteFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * List Assets (Get Flow JSON URL)\n *\n * @param flowId - The flow ID\n * @returns Promise with the list of assets\n */\n listAssets(flowId: string): Promise<FlowAssetsResponse>;\n\n /**\n * Update Flow JSON\n *\n * @param flowId - The flow ID\n * @param data - The asset data including asset_type, file, and name\n * @returns Promise with the success status and validation errors\n */\n updateFlowJson(\n flowId: string,\n data: {\n asset_type: 'FLOW_JSON';\n file: Blob;\n name: string;\n },\n ): Promise<UpdateFlowResponse>;\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 Buffer, JSON object, or Blob.\n * @returns Promise indicating if the JSON is valid and includes validation errors if any.\n */\n validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;\n\n /**\n * Publish Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n publishFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Deprecate Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deprecateFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Migrate Flows\n *\n * @param wabaId - 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\n */\n migrateFlows(\n wabaId: string,\n data: {\n source_waba_id: string;\n source_flow_names?: string[];\n },\n ): Promise<FlowMigrationResponse>;\n}\n"],"mappings":"AAMO,IAAKA,OACRA,EAAA,MAAQ,QACRA,EAAA,UAAY,YACZA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,WAAa,aALLA,OAAA,IAWAC,OACRA,EAAA,OAAS,UACTA,EAAA,OAAS,UACTA,EAAA,mBAAqB,sBACrBA,EAAA,eAAiB,kBACjBA,EAAA,UAAY,aACZA,EAAA,gBAAkB,mBAClBA,EAAA,OAAS,SACTA,EAAA,MAAQ,QARAA,OAAA,IAWAC,OACRA,EAAA,KAAO,OACPA,EAAA,KAAO,OACPA,EAAA,cAAgB,gBAHRA,OAAA","names":["FlowStatusEnum","FlowCategoryEnum","FlowActionEnum"]}
@@ -1,4 +1,4 @@
1
- import { H as HttpMethodsEnum } from '../enums-Bcd3jLw2.mjs';
1
+ import { H as HttpMethodsEnum } from '../enums-CI7vzKhn.mjs';
2
2
 
3
3
  type ResponseHeaderValue = string | string[] | undefined;
4
4
  type ResponseHeaders = Record<string, ResponseHeaderValue>;
@@ -1,4 +1,4 @@
1
- import { H as HttpMethodsEnum } from '../enums-Bcd3jLw2.js';
1
+ import { H as HttpMethodsEnum } from '../enums-CI7vzKhn.js';
2
2
 
3
3
  type ResponseHeaderValue = string | string[] | undefined;
4
4
  type ResponseHeaders = Record<string, ResponseHeaderValue>;
@@ -2,8 +2,8 @@ export { BaseClass } from './base.mjs';
2
2
  export { BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, UpdateBusinessProfileRequest, UploadBusinessProfileResponse, UploadHandle, UploadSession, UploadSessionResponse } from './businessProfile.mjs';
3
3
  export { WabaConfigType } from './config.mjs';
4
4
  export { EncryptionClass, EncryptionPublicKeyResponse } from './encryption.mjs';
5
- export { A as AudioMediaTypesEnum, k as BusinessVerticalEnum, a as ButtonPositionEnum, B as ButtonTypesEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, i as CurrencyCodesEnum, j as DataLocalizationRegionEnum, D as DocumentMediaTypesEnum, H as HttpMethodsEnum, e as ImageMediaTypesEnum, I as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, R as ReferralSourceTypesEnum, h as RequestCodeMethodsEnum, S as StatusEnum, d as StickerMediaTypesEnum, g as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, f as WebhookTypesEnum } from '../enums-Bcd3jLw2.mjs';
6
- export { CreateFlowResponse, Flow, FlowAsset, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, Pagination, PaginationCursors, UpdateFlowResponse, ValidateFlowJsonResponse } from './flow.mjs';
5
+ export { A as AudioMediaTypesEnum, k as BusinessVerticalEnum, a as ButtonPositionEnum, B as ButtonTypesEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, i as CurrencyCodesEnum, j as DataLocalizationRegionEnum, D as DocumentMediaTypesEnum, H as HttpMethodsEnum, e as ImageMediaTypesEnum, I as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, R as ReferralSourceTypesEnum, h as RequestCodeMethodsEnum, S as StatusEnum, d as StickerMediaTypesEnum, g as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, f as WebhookTypesEnum } from '../enums-CI7vzKhn.mjs';
6
+ export { CreateFlowResponse, Flow, FlowActionEnum, FlowAsset, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowDataExchangeRequest, FlowDataExchangeResponse, FlowDecryptedRequestResponse, FlowEncryptedRequestPayload, FlowEndpointRequest, FlowEndpointResponse, FlowErrorNotificationRequest, FlowErrorNotificationResponse, FlowHealthCheckRequest, FlowHealthCheckResponse, FlowHttpRequest, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowSuccessScreenResponse, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, Pagination, PaginationCursors, UpdateFlowResponse, ValidateFlowJsonResponse } from './flow.mjs';
7
7
  export { HttpsClientClass, HttpsClientResponseClass, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody } from './httpsClient.mjs';
8
8
  export { LoggerInterface } from './logger.mjs';
9
9
  export { MediaClass, MediaResponse, MediasResponse, UploadMediaResponse } from './media.mjs';
@@ -17,3 +17,4 @@ export { TwoStepVerificationClass, TwoStepVerificationRequest } from './twoStepV
17
17
  export { UpdateWabaSubscription, WABAClass, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaSubscription, WabaSubscriptions } from './waba.mjs';
18
18
  export { EventField, EventHandler, MessageHandler, MessageStatus, WebhookContact, WebhookEvent, WebhookMessage } from './webhook.mjs';
19
19
  export { WhatsAppClass, WhatsAppConfig } from './whatsapp.mjs';
20
+ import 'http';
@@ -2,8 +2,8 @@ export { BaseClass } from './base.js';
2
2
  export { BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, UpdateBusinessProfileRequest, UploadBusinessProfileResponse, UploadHandle, UploadSession, UploadSessionResponse } from './businessProfile.js';
3
3
  export { WabaConfigType } from './config.js';
4
4
  export { EncryptionClass, EncryptionPublicKeyResponse } from './encryption.js';
5
- export { A as AudioMediaTypesEnum, k as BusinessVerticalEnum, a as ButtonPositionEnum, B as ButtonTypesEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, i as CurrencyCodesEnum, j as DataLocalizationRegionEnum, D as DocumentMediaTypesEnum, H as HttpMethodsEnum, e as ImageMediaTypesEnum, I as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, R as ReferralSourceTypesEnum, h as RequestCodeMethodsEnum, S as StatusEnum, d as StickerMediaTypesEnum, g as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, f as WebhookTypesEnum } from '../enums-Bcd3jLw2.js';
6
- export { CreateFlowResponse, Flow, FlowAsset, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, Pagination, PaginationCursors, UpdateFlowResponse, ValidateFlowJsonResponse } from './flow.js';
5
+ export { A as AudioMediaTypesEnum, k as BusinessVerticalEnum, a as ButtonPositionEnum, B as ButtonTypesEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, i as CurrencyCodesEnum, j as DataLocalizationRegionEnum, D as DocumentMediaTypesEnum, H as HttpMethodsEnum, e as ImageMediaTypesEnum, I as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, R as ReferralSourceTypesEnum, h as RequestCodeMethodsEnum, S as StatusEnum, d as StickerMediaTypesEnum, g as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, f as WebhookTypesEnum } from '../enums-CI7vzKhn.js';
6
+ export { CreateFlowResponse, Flow, FlowActionEnum, FlowAsset, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowDataExchangeRequest, FlowDataExchangeResponse, FlowDecryptedRequestResponse, FlowEncryptedRequestPayload, FlowEndpointRequest, FlowEndpointResponse, FlowErrorNotificationRequest, FlowErrorNotificationResponse, FlowHealthCheckRequest, FlowHealthCheckResponse, FlowHttpRequest, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowSuccessScreenResponse, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, Pagination, PaginationCursors, UpdateFlowResponse, ValidateFlowJsonResponse } from './flow.js';
7
7
  export { HttpsClientClass, HttpsClientResponseClass, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody } from './httpsClient.js';
8
8
  export { LoggerInterface } from './logger.js';
9
9
  export { MediaClass, MediaResponse, MediasResponse, UploadMediaResponse } from './media.js';
@@ -17,3 +17,4 @@ export { TwoStepVerificationClass, TwoStepVerificationRequest } from './twoStepV
17
17
  export { UpdateWabaSubscription, WABAClass, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaSubscription, WabaSubscriptions } from './waba.js';
18
18
  export { EventField, EventHandler, MessageHandler, MessageStatus, WebhookContact, WebhookEvent, WebhookMessage } from './webhook.js';
19
19
  export { WhatsAppClass, WhatsAppConfig } from './whatsapp.js';
20
+ import 'http';
@@ -1,2 +1,2 @@
1
- "use strict";var B=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var u=(I,a)=>{for(var _ in a)B(I,_,{get:a[_],enumerable:!0})},tt=(I,a,_,A)=>{if(a&&typeof a=="object"||typeof a=="function")for(let R of n(a))!C.call(I,R)&&R!==_&&B(I,R,{get:()=>a[R],enumerable:!(A=E(a,R))||A.enumerable});return I};var it=I=>tt(B({},"__esModule",{value:!0}),I);var At={};u(At,{AudioMediaTypesEnum:()=>W,BusinessVerticalEnum:()=>r,ButtonPositionEnum:()=>w,ButtonTypesEnum:()=>M,CategoryEnum:()=>x,ComponentTypesEnum:()=>b,ConversationTypesEnum:()=>L,CurrencyCodesEnum:()=>j,DataLocalizationRegionEnum:()=>q,DocumentMediaTypesEnum:()=>v,EventField:()=>m,FlowCategoryEnum:()=>z,FlowStatusEnum:()=>$,HttpMethodsEnum:()=>T,ImageMediaTypesEnum:()=>Z,InteractiveTypesEnum:()=>o,LanguagesEnum:()=>Q,MessageStatus:()=>y,MessageTypesEnum:()=>f,ParametersTypesEnum:()=>K,ReferralSourceTypesEnum:()=>k,RequestCodeMethodsEnum:()=>J,StatusEnum:()=>h,StickerMediaTypesEnum:()=>X,SystemChangeTypesEnum:()=>V,TemplateStatusEnum:()=>F,VideoMediaTypesEnum:()=>Y,WabaAccountReviewStatus:()=>s,WabaAccountStatus:()=>e,WabaBusinessVerificationStatus:()=>c,WabaConfigEnum:()=>H,WabaHealthStatusCanSendMessage:()=>d,WebhookTypesEnum:()=>g});module.exports=it(At);var x=(A=>(A.Authentication="AUTHENTICATION",A.Marketing="MARKETING",A.Utility="UTILITY",A))(x||{}),F=(A=>(A.Approved="APPROVED",A.Pending="PENDING",A.Rejected="REJECTED",A))(F||{}),T=(R=>(R.Get="GET",R.Post="POST",R.Put="PUT",R.Delete="DELETE",R))(T||{}),f=(P=>(P.Audio="audio",P.Contacts="contacts",P.Document="document",P.Image="image",P.Interactive="interactive",P.Location="location",P.Reaction="reaction",P.Sticker="sticker",P.Template="template",P.Text="text",P.Video="video",P.Button="button",P.Order="order",P.System="system",P.Unknown="unknown",P["*"]="*",P))(f||{}),K=(O=>(O.Currency="currency",O.DateTime="date_time",O.Document="document",O.Image="image",O.Text="text",O.Video="video",O.Payload="payload",O))(K||{}),o=(p=>(p.Button="button",p.List="list",p.Product="product",p.ProductList="product_list",p.CtaUrl="cta_url",p.LocationRequest="location_request_message",p.AddressMessage="address_message",p.Flow="flow",p))(o||{}),M=(_=>(_.QuickReply="quick_reply",_.URL="url",_))(M||{}),w=(A=>(A[A.First=0]="First",A[A.Second=1]="Second",A[A.Third=2]="Third",A))(w||{}),b=(R=>(R.Header="HEADER",R.Body="BODY",R.Button="BUTTON",R.Footer="FOOTER",R))(b||{}),H=(D=>(D.AppId="M4D_APP_ID",D.Port="WA_PORT",D.AppSecret="M4D_APP_SECRET",D.PhoneNumberId="WA_PHONE_NUMBER_ID",D.BusinessAcctId="WA_BUSINESS_ACCOUNT_ID",D.APIVersion="CLOUD_API_VERSION",D.AccessToken="CLOUD_API_ACCESS_TOKEN",D.WebhookEndpoint="WEBHOOK_ENDPOINT",D.WebhookVerificationToken="WEBHOOK_VERIFICATION_TOKEN",D.ListenerPort="LISTENER_PORT",D.MaxRetriesAfterWait="MAX_RETRIES_AFTER_WAIT",D.RequestTimeout="REQUEST_TIMEOUT",D.Debug="DEBUG",D))(H||{}),L=(A=>(A.BusinessInitiated="business_initiated",A.CustomerInitiated="customer_initiated",A.ReferralConversion="referral_conversion",A))(L||{}),h=(A=>(A.Delivered="delivered",A.Read="read",A.Sent="sent",A))(h||{}),Y=(_=>(_.Mp4="video/mp4",_.Threegp="video/3gp",_))(Y||{}),X=(a=>(a.Webp="image/webp",a))(X||{}),Z=(_=>(_.Jpeg="image/jpeg",_.Png="image/png",_))(Z||{}),v=(p=>(p.Text="text/plain",p.Pdf="application/pdf",p.Ppt="application/vnd.ms-powerpoint",p.Word="application/msword",p.Excel="application/vnd.ms-excel",p.OpenDoc="application/vnd.openxmlformats-officedocument.wordprocessingml.document",p.OpenPres="application/vnd.openxmlformats-officedocument.presentationml.presentation",p.OpenSheet="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",p))(v||{}),W=(N=>(N.Aac="audio/aac",N.Mp4="audio/mp4",N.Mpeg="audio/mpeg",N.Amr="audio/amr",N.Ogg="audio/ogg",N))(W||{}),g=(U=>(U.Audio="audio",U.Button="button",U.Document="document",U.Text="text",U.Image="image",U.Interactive="interactive",U.Order="order",U.Sticker="sticker",U.System="system",U.Unknown="unknown",U.Video="video",U))(g||{}),V=(_=>(_.CustomerChangedNumber="customer_changed_number",_.CustomerIdentityChanged="customer_identity_changed",_))(V||{}),k=(_=>(_.Ad="ad",_.Post="post",_))(k||{}),J=(_=>(_.Sms="SMS",_.Voice="VOICE",_))(J||{}),Q=(i=>(i.Afrikaans="af",i.Albanian="sq",i.Arabic="ar",i.Azerbaijani="az",i.Bengali="bn",i.Bulgarian="bg",i.Catalan="ca",i.Chinese_CHN="zh_CN",i.Chinese_HKG="zh_HK",i.Chinese_TAI="zh_TW",i.Croatian="hr",i.Czech="cs",i.Danish="da",i.Dutch="nl",i.English="en",i.English_UK="en_GB",i.English_US="en_US",i.Estonian="et",i.Filipino="fil",i.Finnish="fi",i.French="fr",i.Georgian="ka",i.German="de",i.Greek="el",i.Gujarati="gu",i.Hausa="ha",i.Hebrew="he",i.Hindi="hi",i.Hungarian="hu",i.Indonesian="id",i.Irish="ga",i.Italian="it",i.Japanese="ja",i.Kannada="kn",i.Kazakh="kk",i.Kinyarwanda="rw_RW",i.Korean="ko",i.Kyrgyz_Kyrgyzstan="ky_KG",i.Lao="lo",i.Latvian="lv",i.Lithuanian="lt",i.Macedonian="mk",i.Malay="ms",i.Malayalam="ml",i.Marathi="mr",i.Norwegian="nb",i.Persian="fa",i.Polish="pl",i.Portuguese_BR="pt_BR",i.Portuguese_POR="pt_PT",i.Punjabi="pa",i.Romanian="ro",i.Russian="ru",i.Serbian="sr",i.Slovak="sk",i.Slovenian="sl",i.Spanish="es",i.Spanish_ARG="es_AR",i.Spanish_SPA="es_ES",i.Spanish_MEX="es_MX",i.Swahili="sw",i.Swedish="sv",i.Tamil="ta",i.Telugu="te",i.Thai="th",i.Turkish="tr",i.Ukrainian="uk",i.Urdu="ur",i.Uzbek="uz",i.Vietnamese="vi",i.Zulu="zu",i))(Q||{}),j=(t=>(t.AFN="AFN",t.EUR="EUR",t.ALL="ALL",t.DZD="DZD",t.USD="USD",t.AOA="AOA",t.XCD="XCD",t.ARS="ARS",t.AMD="AMD",t.AWG="AWG",t.AUD="AUD",t.AZN="AZN",t.BSD="BSD",t.BHD="BHD",t.BDT="BDT",t.BBD="BBD",t.BYN="BYN",t.BZD="BZD",t.XOF="XOF",t.BMD="BMD",t.INR="INR",t.BTN="BTN",t.BOB="BOB",t.BOV="BOV",t.BAM="BAM",t.BWP="BWP",t.NOK="NOK",t.BRL="BRL",t.BND="BND",t.BGN="BGN",t.BIF="BIF",t.CVE="CVE",t.KHR="KHR",t.XAF="XAF",t.CAD="CAD",t.KYD="KYD",t.CLP="CLP",t.CLF="CLF",t.CNY="CNY",t.COP="COP",t.COU="COU",t.KMF="KMF",t.CDF="CDF",t.NZD="NZD",t.CRC="CRC",t.HRK="HRK",t.CUP="CUP",t.CUC="CUC",t.ANG="ANG",t.CZK="CZK",t.DKK="DKK",t.DJF="DJF",t.DOP="DOP",t.EGP="EGP",t.SVC="SVC",t.ERN="ERN",t.SZL="SZL",t.ETB="ETB",t.FKP="FKP",t.FJD="FJD",t.XPF="XPF",t.GMD="GMD",t.GEL="GEL",t.GHS="GHS",t.GIP="GIP",t.GTQ="GTQ",t.GBP="GBP",t.GNF="GNF",t.GYD="GYD",t.HTG="HTG",t.HNL="HNL",t.HKD="HKD",t.HUF="HUF",t.ISK="ISK",t.IDR="IDR",t.XDR="XDR",t.IRR="IRR",t.IQD="IQD",t.ILS="ILS",t.JMD="JMD",t.JPY="JPY",t.JOD="JOD",t.KZT="KZT",t.KES="KES",t.KPW="KPW",t.KRW="KRW",t.KWD="KWD",t.KGS="KGS",t.LAK="LAK",t.LBP="LBP",t.LSL="LSL",t.ZAR="ZAR",t.LRD="LRD",t.LYD="LYD",t.CHF="CHF",t.MOP="MOP",t.MKD="MKD",t.MGA="MGA",t.MWK="MWK",t.MYR="MYR",t.MVR="MVR",t.MRU="MRU",t.MUR="MUR",t.XUA="XUA",t.MXN="MXN",t.MXV="MXV",t.MDL="MDL",t.MNT="MNT",t.MAD="MAD",t.MZN="MZN",t.MMK="MMK",t.NAD="NAD",t.NPR="NPR",t.NIO="NIO",t.NGN="NGN",t.OMR="OMR",t.PKR="PKR",t.PAB="PAB",t.PGK="PGK",t.PYG="PYG",t.PEN="PEN",t.PHP="PHP",t.PLN="PLN",t.QAR="QAR",t.RON="RON",t.RUB="RUB",t.RWF="RWF",t.SHP="SHP",t.WST="WST",t.STN="STN",t.SAR="SAR",t.RSD="RSD",t.SCR="SCR",t.SLL="SLL",t.SGD="SGD",t.XSU="XSU",t.SBD="SBD",t.SOS="SOS",t.SSP="SSP",t.LKR="LKR",t.SDG="SDG",t.SRD="SRD",t.SEK="SEK",t.CHE="CHE",t.CHW="CHW",t.SYP="SYP",t.TWD="TWD",t.TJS="TJS",t.TZS="TZS",t.THB="THB",t.TOP="TOP",t.TTD="TTD",t.TND="TND",t.TRY="TRY",t.TMT="TMT",t.UGX="UGX",t.UAH="UAH",t.AED="AED",t.USN="USN",t.UYU="UYU",t.UYI="UYI",t.UYW="UYW",t.UZS="UZS",t.VUV="VUV",t.VES="VES",t.VND="VND",t.YER="YER",t.ZMW="ZMW",t.ZWL="ZWL",t.XBA="XBA",t.XBB="XBB",t.XBC="XBC",t.XBD="XBD",t.XTS="XTS",t.XXX="XXX",t.XAU="XAU",t.XPD="XPD",t.XPT="XPT",t.XAG="XAG",t.AFA="AFA",t.FIM="FIM",t.ALK="ALK",t.ADP="ADP",t.ESP="ESP",t.FRF="FRF",t.AOK="AOK",t.AON="AON",t.AOR="AOR",t.ARA="ARA",t.ARP="ARP",t.ARY="ARY",t.RUR="RUR",t.ATS="ATS",t.AYM="AYM",t.AZM="AZM",t.BYB="BYB",t.BYR="BYR",t.BEC="BEC",t.BEF="BEF",t.BEL="BEL",t.BOP="BOP",t.BAD="BAD",t.BRB="BRB",t.BRC="BRC",t.BRE="BRE",t.BRN="BRN",t.BRR="BRR",t.BGJ="BGJ",t.BGK="BGK",t.BGL="BGL",t.BUK="BUK",t.HRD="HRD",t.CYP="CYP",t.CSJ="CSJ",t.CSK="CSK",t.ECS="ECS",t.ECV="ECV",t.GQE="GQE",t.EEK="EEK",t.XEU="XEU",t.GEK="GEK",t.DDM="DDM",t.DEM="DEM",t.GHC="GHC",t.GHP="GHP",t.GRD="GRD",t.GNE="GNE",t.GNS="GNS",t.GWE="GWE",t.GWP="GWP",t.ITL="ITL",t.ISJ="ISJ",t.IEP="IEP",t.ILP="ILP",t.ILR="ILR",t.LAJ="LAJ",t.LVL="LVL",t.LVR="LVR",t.LSM="LSM",t.ZAL="ZAL",t.LTL="LTL",t.LTT="LTT",t.LUC="LUC",t.LUF="LUF",t.LUL="LUL",t.MGF="MGF",t.MVQ="MVQ",t.MLF="MLF",t.MTL="MTL",t.MTP="MTP",t.MRO="MRO",t.MXP="MXP",t.MZE="MZE",t.MZM="MZM",t.NLG="NLG",t.NIC="NIC",t.PEH="PEH",t.PEI="PEI",t.PES="PES",t.PLZ="PLZ",t.PTE="PTE",t.ROK="ROK",t.ROL="ROL",t.STD="STD",t.CSD="CSD",t.SKK="SKK",t.SIT="SIT",t.RHD="RHD",t.ESA="ESA",t.ESB="ESB",t.SDD="SDD",t.SDP="SDP",t.SRG="SRG",t.CHC="CHC",t.TJR="TJR",t.TPE="TPE",t.TRL="TRL",t.TMM="TMM",t.UGS="UGS",t.UGW="UGW",t.UAK="UAK",t.SUR="SUR",t.USS="USS",t.UYN="UYN",t.UYP="UYP",t.VEB="VEB",t.VEF="VEF",t.VNC="VNC",t.YDD="YDD",t.YUD="YUD",t.YUM="YUM",t.YUN="YUN",t.ZRN="ZRN",t.ZRZ="ZRZ",t.ZMK="ZMK",t.ZWC="ZWC",t.ZWD="ZWD",t.ZWN="ZWN",t.ZWR="ZWR",t.XFO="XFO",t.XRE="XRE",t.XFU="XFU",t))(j||{}),q=(S=>(S.AU="AU",S.ID="ID",S.IN="IN",S.JP="JP",S.SG="SG",S.KR="KR",S.DE="DE",S.CH="CH",S.GB="GB",S.BR="BR",S.BH="BH",S.ZA="ZA",S.AE="AE",S.CA="CA",S))(q||{}),r=(l=>(l.ALCOHOL="ALCOHOL",l.APPAREL="APPAREL",l.AUTO="AUTO",l.BEAUTY="BEAUTY",l.EDU="EDU",l.ENTERTAIN="ENTERTAIN",l.EVENT_PLAN="EVENT_PLAN",l.FINANCE="FINANCE",l.GOVT="GOVT",l.GROCERY="GROCERY",l.HEALTH="HEALTH",l.HOTEL="HOTEL",l.NONPROFIT="NONPROFIT",l.ONLINE_GAMBLING="ONLINE_GAMBLING",l.OTC_DRUGS="OTC_DRUGS",l.OTHER="OTHER",l.PHYSICAL_GAMBLING="PHYSICAL_GAMBLING",l.PROF_SERVICES="PROF_SERVICES",l.RESTAURANT="RESTAURANT",l.RETAIL="RETAIL",l.TRAVEL="TRAVEL",l))(r||{});var $=(N=>(N.Draft="DRAFT",N.Published="PUBLISHED",N.Throttled="THROTTLED",N.Blocked="BLOCKED",N.Deprecated="DEPRECATED",N))($||{}),z=(p=>(p.SignUp="SIGN_UP",p.SignIn="SIGN_IN",p.AppointmentBooking="APPOINTMENT_BOOKING",p.LeadGeneration="LEAD_GENERATION",p.ContactUs="CONTACT_US",p.CustomerSupport="CUSTOMER_SUPPORT",p.Survey="SURVEY",p.Other="OTHER",p))(z||{});var s=(R=>(R.Approved="APPROVED",R.Active="ACTIVE",R.Inactive="INACTIVE",R.Disabled="DISABLED",R))(s||{}),d=(A=>(A.Blocked="BLOCKED",A.Limited="LIMITED",A.Available="AVAILABLE",A))(d||{}),e=(R=>(R.Approved="APPROVED",R.Active="ACTIVE",R.Inactive="INACTIVE",R.Disabled="DISABLED",R))(e||{}),c=(R=>(R.Verified="verified",R.PendingSubmission="pending_submission",R.Unverified="unverified",R.Rejected="rejected",R))(c||{});var y=(A=>(A.DELIVERED="delivered",A.READ="read",A.SENT="sent",A))(y||{}),m=(G=>(G.MESSAGES="messages",G.STATUSES="statuses",G.MESSAGE_TEMPLATE_STATUS_UPDATE="message_template_status_update",G.PHONE_NUMBER_QUALITY_UPDATE="phone_number_quality_update",G.PHONE_NUMBER_NAME_UPDATE="phone_number_name_update",G.UNKNOWN="unknown",G))(m||{});0&&(module.exports={AudioMediaTypesEnum,BusinessVerticalEnum,ButtonPositionEnum,ButtonTypesEnum,CategoryEnum,ComponentTypesEnum,ConversationTypesEnum,CurrencyCodesEnum,DataLocalizationRegionEnum,DocumentMediaTypesEnum,EventField,FlowCategoryEnum,FlowStatusEnum,HttpMethodsEnum,ImageMediaTypesEnum,InteractiveTypesEnum,LanguagesEnum,MessageStatus,MessageTypesEnum,ParametersTypesEnum,ReferralSourceTypesEnum,RequestCodeMethodsEnum,StatusEnum,StickerMediaTypesEnum,SystemChangeTypesEnum,TemplateStatusEnum,VideoMediaTypesEnum,WabaAccountReviewStatus,WabaAccountStatus,WabaBusinessVerificationStatus,WabaConfigEnum,WabaHealthStatusCanSendMessage,WebhookTypesEnum});
1
+ "use strict";var F=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var u=(N,S)=>{for(var l in S)F(N,l,{get:S[l],enumerable:!0})},tt=(N,S,l,p)=>{if(S&&typeof S=="object"||typeof S=="function")for(let a of n(S))!C.call(N,a)&&a!==l&&F(N,a,{get:()=>S[a],enumerable:!(p=m(S,a))||p.enumerable});return N};var it=N=>tt(F({},"__esModule",{value:!0}),N);var pt={};u(pt,{AudioMediaTypesEnum:()=>Y,BusinessVerticalEnum:()=>s,ButtonPositionEnum:()=>K,ButtonTypesEnum:()=>T,CategoryEnum:()=>x,ComponentTypesEnum:()=>r,ConversationTypesEnum:()=>H,CurrencyCodesEnum:()=>k,DataLocalizationRegionEnum:()=>J,DocumentMediaTypesEnum:()=>L,EventField:()=>E,FlowActionEnum:()=>j,FlowCategoryEnum:()=>Q,FlowStatusEnum:()=>q,HttpMethodsEnum:()=>B,ImageMediaTypesEnum:()=>e,InteractiveTypesEnum:()=>w,LanguagesEnum:()=>V,MessageStatus:()=>y,MessageTypesEnum:()=>O,ParametersTypesEnum:()=>G,ReferralSourceTypesEnum:()=>Z,RequestCodeMethodsEnum:()=>W,StatusEnum:()=>b,StickerMediaTypesEnum:()=>g,SystemChangeTypesEnum:()=>v,TemplateStatusEnum:()=>f,VideoMediaTypesEnum:()=>h,WabaAccountReviewStatus:()=>$,WabaAccountStatus:()=>d,WabaBusinessVerificationStatus:()=>c,WabaConfigEnum:()=>M,WabaHealthStatusCanSendMessage:()=>z,WebhookTypesEnum:()=>X});module.exports=it(pt);var x=(p=>(p.Authentication="AUTHENTICATION",p.Marketing="MARKETING",p.Utility="UTILITY",p))(x||{}),f=(p=>(p.Approved="APPROVED",p.Pending="PENDING",p.Rejected="REJECTED",p))(f||{}),B=(a=>(a.Get="GET",a.Post="POST",a.Put="PUT",a.Delete="DELETE",a))(B||{}),O=(R=>(R.Audio="audio",R.Contacts="contacts",R.Document="document",R.Image="image",R.Interactive="interactive",R.Location="location",R.Reaction="reaction",R.Sticker="sticker",R.Template="template",R.Text="text",R.Video="video",R.Button="button",R.Order="order",R.System="system",R.Unknown="unknown",R["*"]="*",R))(O||{}),G=(U=>(U.Currency="currency",U.DateTime="date_time",U.Document="document",U.Image="image",U.Text="text",U.Video="video",U.Payload="payload",U))(G||{}),w=(A=>(A.Button="button",A.List="list",A.Product="product",A.ProductList="product_list",A.CtaUrl="cta_url",A.LocationRequest="location_request_message",A.AddressMessage="address_message",A.Flow="flow",A))(w||{}),T=(l=>(l.QuickReply="quick_reply",l.URL="url",l))(T||{}),K=(p=>(p[p.First=0]="First",p[p.Second=1]="Second",p[p.Third=2]="Third",p))(K||{}),r=(a=>(a.Header="HEADER",a.Body="BODY",a.Button="BUTTON",a.Footer="FOOTER",a))(r||{}),M=(R=>(R.AppId="M4D_APP_ID",R.Port="WA_PORT",R.AppSecret="M4D_APP_SECRET",R.PhoneNumberId="WA_PHONE_NUMBER_ID",R.BusinessAcctId="WA_BUSINESS_ACCOUNT_ID",R.APIVersion="CLOUD_API_VERSION",R.AccessToken="CLOUD_API_ACCESS_TOKEN",R.WebhookEndpoint="WEBHOOK_ENDPOINT",R.WebhookVerificationToken="WEBHOOK_VERIFICATION_TOKEN",R.ListenerPort="LISTENER_PORT",R.MaxRetriesAfterWait="MAX_RETRIES_AFTER_WAIT",R.RequestTimeout="REQUEST_TIMEOUT",R.Debug="DEBUG",R.PrivatePem="FLOW_API_PRIVATE_PEM",R.Passphrase="FLOW_API_PASSPHRASE",R))(M||{}),H=(p=>(p.BusinessInitiated="business_initiated",p.CustomerInitiated="customer_initiated",p.ReferralConversion="referral_conversion",p))(H||{}),b=(p=>(p.Delivered="delivered",p.Read="read",p.Sent="sent",p))(b||{}),h=(l=>(l.Mp4="video/mp4",l.Threegp="video/3gp",l))(h||{}),g=(S=>(S.Webp="image/webp",S))(g||{}),e=(l=>(l.Jpeg="image/jpeg",l.Png="image/png",l))(e||{}),L=(A=>(A.Text="text/plain",A.Pdf="application/pdf",A.Ppt="application/vnd.ms-powerpoint",A.Word="application/msword",A.Excel="application/vnd.ms-excel",A.OpenDoc="application/vnd.openxmlformats-officedocument.wordprocessingml.document",A.OpenPres="application/vnd.openxmlformats-officedocument.presentationml.presentation",A.OpenSheet="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",A))(L||{}),Y=(o=>(o.Aac="audio/aac",o.Mp4="audio/mp4",o.Mpeg="audio/mpeg",o.Amr="audio/amr",o.Ogg="audio/ogg",o))(Y||{}),X=(D=>(D.Audio="audio",D.Button="button",D.Document="document",D.Text="text",D.Image="image",D.Interactive="interactive",D.Order="order",D.Sticker="sticker",D.System="system",D.Unknown="unknown",D.Video="video",D))(X||{}),v=(l=>(l.CustomerChangedNumber="customer_changed_number",l.CustomerIdentityChanged="customer_identity_changed",l))(v||{}),Z=(l=>(l.Ad="ad",l.Post="post",l))(Z||{}),W=(l=>(l.Sms="SMS",l.Voice="VOICE",l))(W||{}),V=(i=>(i.Afrikaans="af",i.Albanian="sq",i.Arabic="ar",i.Azerbaijani="az",i.Bengali="bn",i.Bulgarian="bg",i.Catalan="ca",i.Chinese_CHN="zh_CN",i.Chinese_HKG="zh_HK",i.Chinese_TAI="zh_TW",i.Croatian="hr",i.Czech="cs",i.Danish="da",i.Dutch="nl",i.English="en",i.English_UK="en_GB",i.English_US="en_US",i.Estonian="et",i.Filipino="fil",i.Finnish="fi",i.French="fr",i.Georgian="ka",i.German="de",i.Greek="el",i.Gujarati="gu",i.Hausa="ha",i.Hebrew="he",i.Hindi="hi",i.Hungarian="hu",i.Indonesian="id",i.Irish="ga",i.Italian="it",i.Japanese="ja",i.Kannada="kn",i.Kazakh="kk",i.Kinyarwanda="rw_RW",i.Korean="ko",i.Kyrgyz_Kyrgyzstan="ky_KG",i.Lao="lo",i.Latvian="lv",i.Lithuanian="lt",i.Macedonian="mk",i.Malay="ms",i.Malayalam="ml",i.Marathi="mr",i.Norwegian="nb",i.Persian="fa",i.Polish="pl",i.Portuguese_BR="pt_BR",i.Portuguese_POR="pt_PT",i.Punjabi="pa",i.Romanian="ro",i.Russian="ru",i.Serbian="sr",i.Slovak="sk",i.Slovenian="sl",i.Spanish="es",i.Spanish_ARG="es_AR",i.Spanish_SPA="es_ES",i.Spanish_MEX="es_MX",i.Swahili="sw",i.Swedish="sv",i.Tamil="ta",i.Telugu="te",i.Thai="th",i.Turkish="tr",i.Ukrainian="uk",i.Urdu="ur",i.Uzbek="uz",i.Vietnamese="vi",i.Zulu="zu",i))(V||{}),k=(t=>(t.AFN="AFN",t.EUR="EUR",t.ALL="ALL",t.DZD="DZD",t.USD="USD",t.AOA="AOA",t.XCD="XCD",t.ARS="ARS",t.AMD="AMD",t.AWG="AWG",t.AUD="AUD",t.AZN="AZN",t.BSD="BSD",t.BHD="BHD",t.BDT="BDT",t.BBD="BBD",t.BYN="BYN",t.BZD="BZD",t.XOF="XOF",t.BMD="BMD",t.INR="INR",t.BTN="BTN",t.BOB="BOB",t.BOV="BOV",t.BAM="BAM",t.BWP="BWP",t.NOK="NOK",t.BRL="BRL",t.BND="BND",t.BGN="BGN",t.BIF="BIF",t.CVE="CVE",t.KHR="KHR",t.XAF="XAF",t.CAD="CAD",t.KYD="KYD",t.CLP="CLP",t.CLF="CLF",t.CNY="CNY",t.COP="COP",t.COU="COU",t.KMF="KMF",t.CDF="CDF",t.NZD="NZD",t.CRC="CRC",t.HRK="HRK",t.CUP="CUP",t.CUC="CUC",t.ANG="ANG",t.CZK="CZK",t.DKK="DKK",t.DJF="DJF",t.DOP="DOP",t.EGP="EGP",t.SVC="SVC",t.ERN="ERN",t.SZL="SZL",t.ETB="ETB",t.FKP="FKP",t.FJD="FJD",t.XPF="XPF",t.GMD="GMD",t.GEL="GEL",t.GHS="GHS",t.GIP="GIP",t.GTQ="GTQ",t.GBP="GBP",t.GNF="GNF",t.GYD="GYD",t.HTG="HTG",t.HNL="HNL",t.HKD="HKD",t.HUF="HUF",t.ISK="ISK",t.IDR="IDR",t.XDR="XDR",t.IRR="IRR",t.IQD="IQD",t.ILS="ILS",t.JMD="JMD",t.JPY="JPY",t.JOD="JOD",t.KZT="KZT",t.KES="KES",t.KPW="KPW",t.KRW="KRW",t.KWD="KWD",t.KGS="KGS",t.LAK="LAK",t.LBP="LBP",t.LSL="LSL",t.ZAR="ZAR",t.LRD="LRD",t.LYD="LYD",t.CHF="CHF",t.MOP="MOP",t.MKD="MKD",t.MGA="MGA",t.MWK="MWK",t.MYR="MYR",t.MVR="MVR",t.MRU="MRU",t.MUR="MUR",t.XUA="XUA",t.MXN="MXN",t.MXV="MXV",t.MDL="MDL",t.MNT="MNT",t.MAD="MAD",t.MZN="MZN",t.MMK="MMK",t.NAD="NAD",t.NPR="NPR",t.NIO="NIO",t.NGN="NGN",t.OMR="OMR",t.PKR="PKR",t.PAB="PAB",t.PGK="PGK",t.PYG="PYG",t.PEN="PEN",t.PHP="PHP",t.PLN="PLN",t.QAR="QAR",t.RON="RON",t.RUB="RUB",t.RWF="RWF",t.SHP="SHP",t.WST="WST",t.STN="STN",t.SAR="SAR",t.RSD="RSD",t.SCR="SCR",t.SLL="SLL",t.SGD="SGD",t.XSU="XSU",t.SBD="SBD",t.SOS="SOS",t.SSP="SSP",t.LKR="LKR",t.SDG="SDG",t.SRD="SRD",t.SEK="SEK",t.CHE="CHE",t.CHW="CHW",t.SYP="SYP",t.TWD="TWD",t.TJS="TJS",t.TZS="TZS",t.THB="THB",t.TOP="TOP",t.TTD="TTD",t.TND="TND",t.TRY="TRY",t.TMT="TMT",t.UGX="UGX",t.UAH="UAH",t.AED="AED",t.USN="USN",t.UYU="UYU",t.UYI="UYI",t.UYW="UYW",t.UZS="UZS",t.VUV="VUV",t.VES="VES",t.VND="VND",t.YER="YER",t.ZMW="ZMW",t.ZWL="ZWL",t.XBA="XBA",t.XBB="XBB",t.XBC="XBC",t.XBD="XBD",t.XTS="XTS",t.XXX="XXX",t.XAU="XAU",t.XPD="XPD",t.XPT="XPT",t.XAG="XAG",t.AFA="AFA",t.FIM="FIM",t.ALK="ALK",t.ADP="ADP",t.ESP="ESP",t.FRF="FRF",t.AOK="AOK",t.AON="AON",t.AOR="AOR",t.ARA="ARA",t.ARP="ARP",t.ARY="ARY",t.RUR="RUR",t.ATS="ATS",t.AYM="AYM",t.AZM="AZM",t.BYB="BYB",t.BYR="BYR",t.BEC="BEC",t.BEF="BEF",t.BEL="BEL",t.BOP="BOP",t.BAD="BAD",t.BRB="BRB",t.BRC="BRC",t.BRE="BRE",t.BRN="BRN",t.BRR="BRR",t.BGJ="BGJ",t.BGK="BGK",t.BGL="BGL",t.BUK="BUK",t.HRD="HRD",t.CYP="CYP",t.CSJ="CSJ",t.CSK="CSK",t.ECS="ECS",t.ECV="ECV",t.GQE="GQE",t.EEK="EEK",t.XEU="XEU",t.GEK="GEK",t.DDM="DDM",t.DEM="DEM",t.GHC="GHC",t.GHP="GHP",t.GRD="GRD",t.GNE="GNE",t.GNS="GNS",t.GWE="GWE",t.GWP="GWP",t.ITL="ITL",t.ISJ="ISJ",t.IEP="IEP",t.ILP="ILP",t.ILR="ILR",t.LAJ="LAJ",t.LVL="LVL",t.LVR="LVR",t.LSM="LSM",t.ZAL="ZAL",t.LTL="LTL",t.LTT="LTT",t.LUC="LUC",t.LUF="LUF",t.LUL="LUL",t.MGF="MGF",t.MVQ="MVQ",t.MLF="MLF",t.MTL="MTL",t.MTP="MTP",t.MRO="MRO",t.MXP="MXP",t.MZE="MZE",t.MZM="MZM",t.NLG="NLG",t.NIC="NIC",t.PEH="PEH",t.PEI="PEI",t.PES="PES",t.PLZ="PLZ",t.PTE="PTE",t.ROK="ROK",t.ROL="ROL",t.STD="STD",t.CSD="CSD",t.SKK="SKK",t.SIT="SIT",t.RHD="RHD",t.ESA="ESA",t.ESB="ESB",t.SDD="SDD",t.SDP="SDP",t.SRG="SRG",t.CHC="CHC",t.TJR="TJR",t.TPE="TPE",t.TRL="TRL",t.TMM="TMM",t.UGS="UGS",t.UGW="UGW",t.UAK="UAK",t.SUR="SUR",t.USS="USS",t.UYN="UYN",t.UYP="UYP",t.VEB="VEB",t.VEF="VEF",t.VNC="VNC",t.YDD="YDD",t.YUD="YUD",t.YUM="YUM",t.YUN="YUN",t.ZRN="ZRN",t.ZRZ="ZRZ",t.ZMK="ZMK",t.ZWC="ZWC",t.ZWD="ZWD",t.ZWN="ZWN",t.ZWR="ZWR",t.XFO="XFO",t.XRE="XRE",t.XFU="XFU",t))(k||{}),J=(P=>(P.AU="AU",P.ID="ID",P.IN="IN",P.JP="JP",P.SG="SG",P.KR="KR",P.DE="DE",P.CH="CH",P.GB="GB",P.BR="BR",P.BH="BH",P.ZA="ZA",P.AE="AE",P.CA="CA",P))(J||{}),s=(_=>(_.ALCOHOL="ALCOHOL",_.APPAREL="APPAREL",_.AUTO="AUTO",_.BEAUTY="BEAUTY",_.EDU="EDU",_.ENTERTAIN="ENTERTAIN",_.EVENT_PLAN="EVENT_PLAN",_.FINANCE="FINANCE",_.GOVT="GOVT",_.GROCERY="GROCERY",_.HEALTH="HEALTH",_.HOTEL="HOTEL",_.NONPROFIT="NONPROFIT",_.ONLINE_GAMBLING="ONLINE_GAMBLING",_.OTC_DRUGS="OTC_DRUGS",_.OTHER="OTHER",_.PHYSICAL_GAMBLING="PHYSICAL_GAMBLING",_.PROF_SERVICES="PROF_SERVICES",_.RESTAURANT="RESTAURANT",_.RETAIL="RETAIL",_.TRAVEL="TRAVEL",_))(s||{});var q=(o=>(o.Draft="DRAFT",o.Published="PUBLISHED",o.Throttled="THROTTLED",o.Blocked="BLOCKED",o.Deprecated="DEPRECATED",o))(q||{}),Q=(A=>(A.SignUp="SIGN_UP",A.SignIn="SIGN_IN",A.AppointmentBooking="APPOINTMENT_BOOKING",A.LeadGeneration="LEAD_GENERATION",A.ContactUs="CONTACT_US",A.CustomerSupport="CUSTOMER_SUPPORT",A.Survey="SURVEY",A.Other="OTHER",A))(Q||{}),j=(p=>(p.INIT="INIT",p.BACK="BACK",p.DATA_EXCHANGE="data_exchange",p))(j||{});var $=(a=>(a.Approved="APPROVED",a.Active="ACTIVE",a.Inactive="INACTIVE",a.Disabled="DISABLED",a))($||{}),z=(p=>(p.Blocked="BLOCKED",p.Limited="LIMITED",p.Available="AVAILABLE",p))(z||{}),d=(a=>(a.Approved="APPROVED",a.Active="ACTIVE",a.Inactive="INACTIVE",a.Disabled="DISABLED",a))(d||{}),c=(a=>(a.Verified="verified",a.PendingSubmission="pending_submission",a.Unverified="unverified",a.Rejected="rejected",a))(c||{});var y=(p=>(p.DELIVERED="delivered",p.READ="read",p.SENT="sent",p))(y||{}),E=(I=>(I.MESSAGES="messages",I.STATUSES="statuses",I.MESSAGE_TEMPLATE_STATUS_UPDATE="message_template_status_update",I.PHONE_NUMBER_QUALITY_UPDATE="phone_number_quality_update",I.PHONE_NUMBER_NAME_UPDATE="phone_number_name_update",I.UNKNOWN="unknown",I))(E||{});0&&(module.exports={AudioMediaTypesEnum,BusinessVerticalEnum,ButtonPositionEnum,ButtonTypesEnum,CategoryEnum,ComponentTypesEnum,ConversationTypesEnum,CurrencyCodesEnum,DataLocalizationRegionEnum,DocumentMediaTypesEnum,EventField,FlowActionEnum,FlowCategoryEnum,FlowStatusEnum,HttpMethodsEnum,ImageMediaTypesEnum,InteractiveTypesEnum,LanguagesEnum,MessageStatus,MessageTypesEnum,ParametersTypesEnum,ReferralSourceTypesEnum,RequestCodeMethodsEnum,StatusEnum,StickerMediaTypesEnum,SystemChangeTypesEnum,TemplateStatusEnum,VideoMediaTypesEnum,WabaAccountReviewStatus,WabaAccountStatus,WabaBusinessVerificationStatus,WabaConfigEnum,WabaHealthStatusCanSendMessage,WebhookTypesEnum});
2
2
  //# sourceMappingURL=index.js.map