meta-cloud-api 1.1.0 → 1.1.2

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 (58) hide show
  1. package/dist/{BusinessProfileApi-WXscSgo-.d.ts → BusinessProfileApi-C_sEOrWM.d.ts} +4 -4
  2. package/dist/{EncryptionApi-D7pt-OXT.d.ts → EncryptionApi-CcCfeK2b.d.ts} +3 -3
  3. package/dist/{FlowApi-B2ffO-HD.d.ts → FlowApi-DDHrFT_Q.d.ts} +3 -3
  4. package/dist/{MediaApi-BrEKpqi_.d.ts → MediaApi-CY9RVo7u.d.ts} +2 -2
  5. package/dist/{MessageApi-BgsSpDno.d.ts → MessageApi-CX_jN8da.d.ts} +4 -4
  6. package/dist/{PhoneNumberApi-DKlu9PHl.d.ts → PhoneNumberApi-B-hY7g1M.d.ts} +2 -2
  7. package/dist/{QrCodeApi-7vDwIBHR.d.ts → QrCodeApi-DRICKN04.d.ts} +2 -2
  8. package/dist/{RegistrationApi-qO_qoti9.d.ts → RegistrationApi-CFPzU1Vw.d.ts} +3 -3
  9. package/dist/{TemplateApi-xGgIZt89.d.ts → TemplateApi-D9Q_7cf3.d.ts} +4 -4
  10. package/dist/{TwoStepVerificationApi-DfNPIz-C.d.ts → TwoStepVerificationApi-C0jpAKfu.d.ts} +2 -2
  11. package/dist/{WabaApi-DqQi_68m.d.ts → WabaApi-BfvpkpFr.d.ts} +3 -3
  12. package/dist/{WebhookProcessor-BXYunz4N.d.ts → WebhookProcessor-C3oUXCBl.d.ts} +3 -3
  13. package/dist/{WhatsApp-pTZPQm81.d.ts → WhatsApp-BG0rDhMn.d.ts} +14 -14
  14. package/dist/api/encryption/index.d.ts +5 -5
  15. package/dist/api/flow/index.d.ts +6 -5
  16. package/dist/api/flow/index.js +1 -1
  17. package/dist/api/index.d.ts +17 -16
  18. package/dist/api/index.js +1 -1
  19. package/dist/api/media/index.d.ts +5 -5
  20. package/dist/api/messages/builders/index.d.ts +4 -4
  21. package/dist/api/messages/index.d.ts +5 -5
  22. package/dist/api/phone/index.d.ts +5 -5
  23. package/dist/api/profile/index.d.ts +5 -5
  24. package/dist/api/qrCode/index.d.ts +5 -5
  25. package/dist/api/registration/index.d.ts +5 -5
  26. package/dist/api/template/index.d.ts +8 -202
  27. package/dist/api/twoStepVerification/index.d.ts +5 -5
  28. package/dist/api/waba/index.d.ts +5 -5
  29. package/dist/{base-CdGDdVEl.d.ts → base-BV6DyzGS.d.ts} +2 -2
  30. package/dist/chunk-J2JPTKU6.js +2 -0
  31. package/dist/chunk-J2JPTKU6.js.map +1 -0
  32. package/dist/{common-lV0NsO7t.d.ts → common-B8kp4RdL.d.ts} +29 -2
  33. package/dist/{common-BiRA_uz3.d.ts → common-CGbls9Y8.d.ts} +4 -4
  34. package/dist/core/webhook/frameworks/express.d.ts +20 -19
  35. package/dist/core/webhook/frameworks/express.js +1 -1
  36. package/dist/core/webhook/frameworks/nextjs-app.d.ts +20 -19
  37. package/dist/core/webhook/frameworks/nextjs-app.js +1 -1
  38. package/dist/core/webhook/frameworks/nextjs.d.ts +20 -19
  39. package/dist/core/webhook/frameworks/nextjs.js +1 -1
  40. package/dist/core/webhook/index.d.ts +20 -19
  41. package/dist/core/webhook/index.js +1 -1
  42. package/dist/core/whatsapp/index.d.ts +19 -18
  43. package/dist/core/whatsapp/index.js +1 -1
  44. package/dist/{enums-BZd9T2ul.d.ts → enums-DIimUG6s.d.ts} +1 -1
  45. package/dist/factory-B37vOPki.d.ts +200 -0
  46. package/dist/{httpsClient-v4gmltzS.d.ts → httpsClient-Cbd2Y6mg.d.ts} +1 -1
  47. package/dist/index.d.ts +22 -20
  48. package/dist/index.js +1 -1
  49. package/dist/{isMetaError-CXWJwW58.d.ts → isMetaError-CQLXyEL4.d.ts} +1 -1
  50. package/dist/{request-vYMaEfk5.d.ts → request-CUjrMn8R.d.ts} +2 -2
  51. package/dist/types/config.d.ts +1 -1
  52. package/dist/types/enums.d.ts +1 -1
  53. package/dist/types/index.d.ts +4 -4
  54. package/dist/utils/index.d.ts +5 -4
  55. package/dist/utils/index.js +1 -1
  56. package/package.json +20 -17
  57. package/dist/chunk-NLF2JGYY.js +0 -2
  58. package/dist/chunk-NLF2JGYY.js.map +0 -1
@@ -1,22 +1,23 @@
1
- import { E as EncryptionApi } from '../../EncryptionApi-D7pt-OXT.js';
2
- import { F as FlowApi } from '../../FlowApi-B2ffO-HD.js';
1
+ import { E as EncryptionApi } from '../../EncryptionApi-CcCfeK2b.js';
2
+ import { F as FlowApi } from '../../FlowApi-DDHrFT_Q.js';
3
3
  import { WhatsAppConfig } from '../../types/config.js';
4
- import { M as MediaApi } from '../../MediaApi-BrEKpqi_.js';
5
- import { M as MessagesApi } from '../../MessageApi-BgsSpDno.js';
6
- import { P as PhoneNumberApi } from '../../PhoneNumberApi-DKlu9PHl.js';
7
- import { B as BusinessProfileApi } from '../../BusinessProfileApi-WXscSgo-.js';
8
- import { Q as QrCodeApi } from '../../QrCodeApi-7vDwIBHR.js';
9
- import { R as RegistrationApi } from '../../RegistrationApi-qO_qoti9.js';
10
- import { T as TemplateApi } from '../../TemplateApi-xGgIZt89.js';
11
- import { T as TwoStepVerificationApi } from '../../TwoStepVerificationApi-DfNPIz-C.js';
12
- import { W as WabaApi } from '../../WabaApi-DqQi_68m.js';
13
- export { W as WhatsApp } from '../../WhatsApp-pTZPQm81.js';
14
- import '../../base-CdGDdVEl.js';
15
- import '../../enums-BZd9T2ul.js';
16
- import '../../request-vYMaEfk5.js';
17
- import '../../common-lV0NsO7t.js';
18
- import '../../common-BiRA_uz3.js';
19
- import '../../httpsClient-v4gmltzS.js';
4
+ import { M as MediaApi } from '../../MediaApi-CY9RVo7u.js';
5
+ import { M as MessagesApi } from '../../MessageApi-CX_jN8da.js';
6
+ import { P as PhoneNumberApi } from '../../PhoneNumberApi-B-hY7g1M.js';
7
+ import { B as BusinessProfileApi } from '../../BusinessProfileApi-C_sEOrWM.js';
8
+ import { Q as QrCodeApi } from '../../QrCodeApi-DRICKN04.js';
9
+ import { R as RegistrationApi } from '../../RegistrationApi-CFPzU1Vw.js';
10
+ import { T as TemplateApi } from '../../TemplateApi-D9Q_7cf3.js';
11
+ import { T as TwoStepVerificationApi } from '../../TwoStepVerificationApi-C0jpAKfu.js';
12
+ import { W as WabaApi } from '../../WabaApi-BfvpkpFr.js';
13
+ export { W as WhatsApp } from '../../WhatsApp-BG0rDhMn.js';
14
+ import '../../base-BV6DyzGS.js';
15
+ import '../../enums-DIimUG6s.js';
16
+ import '../../request-CUjrMn8R.js';
17
+ import '../../common-B8kp4RdL.js';
18
+ import 'http';
19
+ import '../../common-CGbls9Y8.js';
20
+ import '../../httpsClient-Cbd2Y6mg.js';
20
21
  import 'https';
21
22
 
22
23
  declare class WhatsAppClass {
@@ -1,2 +1,2 @@
1
- export{b as WhatsApp}from'../../chunk-BAOZ4U74.js';import'../../chunk-FKXSL2JK.js';import'../../chunk-AMHQGG6Z.js';import'../../chunk-VHAODWCN.js';import'../../chunk-JPAV644F.js';import'../../chunk-PHPQ5HP3.js';import'../../chunk-IYSR44P6.js';import'../../chunk-SNNRWNGZ.js';import'../../chunk-L4ESAO2S.js';import'../../chunk-7QBIZCJ4.js';import'../../chunk-JXCLRKQ7.js';import'../../chunk-LV3TULSI.js';import'../../chunk-CRZ7EUYR.js';import'../../chunk-JC6YMVID.js';import'../../chunk-NLF2JGYY.js';import'../../chunk-FSKBLPGE.js';import'../../chunk-MJEG3K4V.js';import'../../chunk-RIL6QABY.js';import'../../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
1
+ export{b as WhatsApp}from'../../chunk-BAOZ4U74.js';import'../../chunk-FKXSL2JK.js';import'../../chunk-AMHQGG6Z.js';import'../../chunk-VHAODWCN.js';import'../../chunk-JPAV644F.js';import'../../chunk-PHPQ5HP3.js';import'../../chunk-IYSR44P6.js';import'../../chunk-SNNRWNGZ.js';import'../../chunk-L4ESAO2S.js';import'../../chunk-7QBIZCJ4.js';import'../../chunk-JXCLRKQ7.js';import'../../chunk-LV3TULSI.js';import'../../chunk-CRZ7EUYR.js';import'../../chunk-JC6YMVID.js';import'../../chunk-J2JPTKU6.js';import'../../chunk-FSKBLPGE.js';import'../../chunk-MJEG3K4V.js';import'../../chunk-RIL6QABY.js';import'../../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -704,4 +704,4 @@ declare namespace SDKEnums {
704
704
  export { SDKEnums_AudioMediaTypesEnum as AudioMediaTypesEnum, SDKEnums_BusinessVerticalEnum as BusinessVerticalEnum, SDKEnums_ButtonPositionEnum as ButtonPositionEnum, SDKEnums_CategoryEnum as CategoryEnum, SDKEnums_ComponentTypesEnum as ComponentTypesEnum, SDKEnums_ConversationTypesEnum as ConversationTypesEnum, SDKEnums_CurrencyCodesEnum as CurrencyCodesEnum, SDKEnums_DataLocalizationRegionEnum as DataLocalizationRegionEnum, SDKEnums_DocumentMediaTypesEnum as DocumentMediaTypesEnum, SDKEnums_HttpMethodsEnum as HttpMethodsEnum, SDKEnums_ImageMediaTypesEnum as ImageMediaTypesEnum, SDKEnums_InteractiveTypesEnum as InteractiveTypesEnum, SDKEnums_LanguagesEnum as LanguagesEnum, SDKEnums_MessageTypesEnum as MessageTypesEnum, SDKEnums_ParametersTypesEnum as ParametersTypesEnum, SDKEnums_ReferralSourceTypesEnum as ReferralSourceTypesEnum, SDKEnums_RequestCodeMethodsEnum as RequestCodeMethodsEnum, SDKEnums_StatusEnum as StatusEnum, SDKEnums_StickerMediaTypesEnum as StickerMediaTypesEnum, SDKEnums_SubTypeEnum as SubTypeEnum, SDKEnums_SystemChangeTypesEnum as SystemChangeTypesEnum, SDKEnums_TemplateStatusEnum as TemplateStatusEnum, SDKEnums_VideoMediaTypesEnum as VideoMediaTypesEnum, SDKEnums_WabaConfigEnum as WabaConfigEnum, SDKEnums_WebhookTypesEnum as WebhookTypesEnum };
705
705
  }
706
706
 
707
- export { AudioMediaTypesEnum as A, ButtonPositionEnum as B, ComponentTypesEnum as C, DocumentMediaTypesEnum as D, HttpMethodsEnum as H, InteractiveTypesEnum as I, LanguagesEnum as L, MessageTypesEnum as M, ParametersTypesEnum as P, ReferralSourceTypesEnum as R, SubTypeEnum as S, TemplateStatusEnum as T, VideoMediaTypesEnum as V, WabaConfigEnum as W, CategoryEnum as a, ConversationTypesEnum as b, StatusEnum as c, StickerMediaTypesEnum as d, ImageMediaTypesEnum as e, WebhookTypesEnum as f, SystemChangeTypesEnum as g, RequestCodeMethodsEnum as h, CurrencyCodesEnum as i, DataLocalizationRegionEnum as j, BusinessVerticalEnum as k, SDKEnums as l };
707
+ export { AudioMediaTypesEnum as A, BusinessVerticalEnum as B, CategoryEnum as C, DataLocalizationRegionEnum as D, HttpMethodsEnum as H, ImageMediaTypesEnum as I, LanguagesEnum as L, MessageTypesEnum as M, ParametersTypesEnum as P, RequestCodeMethodsEnum as R, StatusEnum as S, TemplateStatusEnum as T, VideoMediaTypesEnum as V, WabaConfigEnum as W, ButtonPositionEnum as a, ComponentTypesEnum as b, ConversationTypesEnum as c, CurrencyCodesEnum as d, DocumentMediaTypesEnum as e, InteractiveTypesEnum as f, StickerMediaTypesEnum as g, SubTypeEnum as h, SystemChangeTypesEnum as i, WebhookTypesEnum as j, ReferralSourceTypesEnum as k, SDKEnums as l };
@@ -0,0 +1,200 @@
1
+ import { L as LanguagesEnum, d as CurrencyCodesEnum, C as CategoryEnum } from './enums-DIimUG6s.js';
2
+ import { j as TemplateFormat } from './TemplateApi-D9Q_7cf3.js';
3
+
4
+ interface TextParameter {
5
+ type: 'text';
6
+ value: string;
7
+ }
8
+ interface CurrencyParameter {
9
+ type: 'currency';
10
+ amount_1000: number;
11
+ code: CurrencyCodesEnum;
12
+ fallback_value: string;
13
+ }
14
+ interface DateTimeParameter {
15
+ type: 'date_time';
16
+ fallback_value: string;
17
+ }
18
+ interface MediaParameter {
19
+ type: 'image' | 'video' | 'document';
20
+ handle?: string;
21
+ link?: string;
22
+ }
23
+ interface LocationParameter {
24
+ type: 'location';
25
+ latitude?: number;
26
+ longitude?: number;
27
+ name?: string;
28
+ address?: string;
29
+ }
30
+ interface ProductParameter {
31
+ type: 'product';
32
+ product_retailer_id: string;
33
+ }
34
+ type TemplateParameter = TextParameter | CurrencyParameter | DateTimeParameter | MediaParameter | LocationParameter | ProductParameter;
35
+ interface HeaderOptions {
36
+ format: TemplateFormat;
37
+ text?: string;
38
+ parameters?: TemplateParameter[];
39
+ example?: {
40
+ header_text?: string[];
41
+ header_text_named_params?: Array<{
42
+ param_name: string;
43
+ example: string;
44
+ }>;
45
+ header_handle?: string[];
46
+ };
47
+ }
48
+ interface BodyOptions {
49
+ text: string;
50
+ parameters?: TemplateParameter[];
51
+ example?: {
52
+ body_text?: string[][];
53
+ body_text_named_params?: Array<{
54
+ param_name: string;
55
+ example: string;
56
+ }>;
57
+ };
58
+ }
59
+ interface FooterOptions {
60
+ text: string;
61
+ }
62
+ interface ButtonOptions {
63
+ phone_number?: {
64
+ text: string;
65
+ phone_number: string;
66
+ };
67
+ url?: {
68
+ text: string;
69
+ url: string;
70
+ example?: string;
71
+ };
72
+ quick_reply?: {
73
+ text: string;
74
+ }[];
75
+ copy_code?: {
76
+ example: string;
77
+ };
78
+ flow?: {
79
+ text: string;
80
+ flow_id?: string;
81
+ flow_name?: string;
82
+ flow_json?: string;
83
+ flow_action?: 'navigate' | 'data_exchange';
84
+ navigate_screen?: string;
85
+ };
86
+ mpm?: boolean;
87
+ otp?: boolean;
88
+ spm?: boolean;
89
+ }
90
+ interface CarouselCard {
91
+ image?: string;
92
+ video?: string;
93
+ product?: string;
94
+ body?: string;
95
+ bodyParameters?: TemplateParameter[];
96
+ buttons?: ButtonOptions;
97
+ }
98
+ interface CarouselOptions {
99
+ cards: CarouselCard[];
100
+ }
101
+ interface LimitedTimeOfferOptions {
102
+ expiration_time_ms: number;
103
+ }
104
+ interface ProductSection {
105
+ title?: string;
106
+ product_items: Array<{
107
+ product_retailer_id: string;
108
+ }>;
109
+ }
110
+ interface TemplateOptions {
111
+ name: string;
112
+ language: LanguagesEnum;
113
+ category: CategoryEnum;
114
+ header?: HeaderOptions;
115
+ body?: BodyOptions;
116
+ footer?: FooterOptions;
117
+ buttons?: ButtonOptions;
118
+ carousel?: CarouselOptions;
119
+ limitedTimeOffer?: LimitedTimeOfferOptions;
120
+ }
121
+ interface OTPTemplateOptions {
122
+ name: string;
123
+ language: LanguagesEnum;
124
+ code_expiration_minutes?: number;
125
+ add_security_recommendation?: boolean;
126
+ }
127
+ interface AuthenticationTemplateOptions {
128
+ name: string;
129
+ language: LanguagesEnum;
130
+ code_expiration_minutes?: number;
131
+ add_security_recommendation?: boolean;
132
+ copy_code_button?: boolean;
133
+ }
134
+ interface CatalogTemplateOptions {
135
+ name: string;
136
+ language: LanguagesEnum;
137
+ header?: Omit<HeaderOptions, 'format'>;
138
+ body: BodyOptions;
139
+ footer?: FooterOptions;
140
+ thumbnail_product_retailer_id: string;
141
+ }
142
+ interface CouponTemplateOptions {
143
+ name: string;
144
+ language: LanguagesEnum;
145
+ header?: Omit<HeaderOptions, 'format'>;
146
+ body: BodyOptions;
147
+ footer?: FooterOptions;
148
+ coupon_code: string;
149
+ }
150
+ interface LimitedTimeOfferTemplateOptions {
151
+ name: string;
152
+ language: LanguagesEnum;
153
+ header?: Omit<HeaderOptions, 'format'>;
154
+ body: BodyOptions;
155
+ footer?: FooterOptions;
156
+ expiration_time_ms: number;
157
+ }
158
+ interface MediaCardCarouselTemplateOptions {
159
+ name: string;
160
+ language: LanguagesEnum;
161
+ cards: Array<{
162
+ header: {
163
+ format: 'IMAGE' | 'VIDEO';
164
+ example: {
165
+ header_handle: string[];
166
+ };
167
+ };
168
+ body: BodyOptions;
169
+ buttons?: ButtonOptions;
170
+ }>;
171
+ }
172
+ interface MPMTemplateOptions {
173
+ name: string;
174
+ language: LanguagesEnum;
175
+ header?: Omit<HeaderOptions, 'format'>;
176
+ body: BodyOptions;
177
+ footer?: FooterOptions;
178
+ thumbnail_product_retailer_id: string;
179
+ sections: ProductSection[];
180
+ }
181
+ interface ProductCardCarouselTemplateOptions {
182
+ name: string;
183
+ language: LanguagesEnum;
184
+ header?: Omit<HeaderOptions, 'format'>;
185
+ body: BodyOptions;
186
+ footer?: FooterOptions;
187
+ cards: Array<{
188
+ product_retailer_id: string;
189
+ }>;
190
+ }
191
+ interface SPMTemplateOptions {
192
+ name: string;
193
+ language: LanguagesEnum;
194
+ header?: Omit<HeaderOptions, 'format'>;
195
+ body: BodyOptions;
196
+ footer?: FooterOptions;
197
+ product_retailer_id: string;
198
+ }
199
+
200
+ export type { AuthenticationTemplateOptions as A, BodyOptions as B, CarouselCard as C, DateTimeParameter as D, FooterOptions as F, HeaderOptions as H, LimitedTimeOfferOptions as L, MediaCardCarouselTemplateOptions as M, OTPTemplateOptions as O, ProductCardCarouselTemplateOptions as P, SPMTemplateOptions as S, TemplateOptions as T, ButtonOptions as a, CarouselOptions as b, CatalogTemplateOptions as c, CouponTemplateOptions as d, CurrencyParameter as e, LimitedTimeOfferTemplateOptions as f, LocationParameter as g, MediaParameter as h, MPMTemplateOptions as i, ProductParameter as j, ProductSection as k, TemplateParameter as l, TextParameter as m };
@@ -1,4 +1,4 @@
1
- import { H as HttpMethodsEnum } from './enums-BZd9T2ul.js';
1
+ import { H as HttpMethodsEnum } from './enums-DIimUG6s.js';
2
2
 
3
3
  type ResponseHeaderValue = string | string[] | undefined;
4
4
  type ResponseHeaders = Record<string, ResponseHeaderValue>;
package/dist/index.d.ts CHANGED
@@ -1,25 +1,27 @@
1
- export { W as WhatsApp, W as WhatsAppLegacy } from './WhatsApp-pTZPQm81.js';
1
+ export { W as WhatsApp, W as WhatsAppLegacy } from './WhatsApp-BG0rDhMn.js';
2
+ export { E as EncryptionApi, a as EncryptionPublicKeyResponse } from './EncryptionApi-CcCfeK2b.js';
3
+ export { G as GeneralHeaderInterface, a as GeneralRequestBody, P as Paging, R as RequesterResponseInterface, b as ResponseData, c as ResponsePagination, d as ResponseSuccess } from './request-CUjrMn8R.js';
4
+ export { F as FlowApi } from './FlowApi-DDHrFT_Q.js';
5
+ export { d as Flow, a as FlowActionEnum, e as FlowAsset, f as FlowAssetsResponse, b as FlowCategoryEnum, g as FlowClass, h as FlowDataExchangeRequest, i as FlowDataExchangeResponse, j as FlowDecryptedRequestResponse, k as FlowEncryptedRequestPayload, l as FlowEndpointRequest, m as FlowEndpointResponse, n as FlowErrorNotificationRequest, o as FlowErrorNotificationResponse, p as FlowHealthCheckRequest, q as FlowHealthCheckResponse, r as FlowHttpRequest, s as FlowMigrationFailure, u as FlowMigrationResponse, t as FlowMigrationResult, v as FlowPreview, w as FlowPreviewResponse, c as FlowStatusEnum, y as FlowSuccessScreenResponse, z as FlowType, F as FlowTypeEnum, A as FlowValidationError, B as FlowValidationErrorPointer, x as FlowsListResponse, P as Pagination, C as PaginationCursors, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from './common-B8kp4RdL.js';
6
+ export { M as MediaApi, a as MediaClass, b as MediaResponse, c as MediasResponse, U as UploadMediaResponse } from './MediaApi-CY9RVo7u.js';
7
+ export { M as MessagesApi } from './MessageApi-CX_jN8da.js';
8
+ export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, G as GeneralMessageBody, I as ImageMediaObject, f as InteractiveObject, L as LocationObject, M as MessageRequestBody, a as MessageRequestParams, g as MessageTemplateObject, b as MessagesClass, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, d as TextObject, V as VideoMediaObject } from './common-CGbls9Y8.js';
9
+ export { A as AccountMode, C as CodeVerificationStatus, a as Cursors, H as HealthStatus, b as HealthStatusEntity, M as MessagingLimitTier, P as PhoneNumberApi, c as PhoneNumberClass, d as PhoneNumberResponse, e as PhoneNumbersResponse, f as PlatformType, Q as QualityRating, g as QualityScore, R as RequestVerificationCodeRequest, T as Throughput, h as ThroughputLevel, i as TwoStepVerificationParams, V as VerifyCodeRequest } from './PhoneNumberApi-B-hY7g1M.js';
10
+ export { B as BusinessProfileApi, e as BusinessProfileClass, a as BusinessProfileData, c as BusinessProfileField, d as BusinessProfileFieldsParam, b as BusinessProfileResponse, U as UpdateBusinessProfileRequest } from './BusinessProfileApi-C_sEOrWM.js';
11
+ export { C as CreateQrCodeRequest, Q as QrCodeApi, a as QrCodeClass, b as QrCodeResponse, c as QrCodesResponse, U as UpdateQrCodeRequest } from './QrCodeApi-DRICKN04.js';
12
+ export { R as RegistrationApi, a as RegistrationClass, b as RegistrationRequest } from './RegistrationApi-CFPzU1Vw.js';
13
+ export { C as CatalogButton, a as ComponentTypes, b as CopyCodeButton, F as FlowButton, M as MPMButton, O as OTPButton, P as PhoneNumberButton, Q as QuickReplyButton, S as SPMButton, T as TemplateApi, c as TemplateBody, d as TemplateButton, e as TemplateButtons, f as TemplateCarousel, g as TemplateClass, h as TemplateDeleteParams, i as TemplateFooter, j as TemplateFormat, k as TemplateGetParams, l as TemplateHeader, m as TemplateHeaderExample, n as TemplateLimitedTimeOffer, o as TemplateRequestBody, p as TemplateResponse, U as URLButton } from './TemplateApi-D9Q_7cf3.js';
14
+ export { A as AuthenticationTemplateOptions, B as BodyOptions, a as ButtonOptions, C as CarouselCard, b as CarouselOptions, c as CatalogTemplateOptions, d as CouponTemplateOptions, e as CurrencyParameter, D as DateTimeParameter, F as FooterOptions, H as HeaderOptions, L as LimitedTimeOfferOptions, f as LimitedTimeOfferTemplateOptions, g as LocationParameter, i as MPMTemplateOptions, M as MediaCardCarouselTemplateOptions, h as MediaParameter, O as OTPTemplateOptions, P as ProductCardCarouselTemplateOptions, j as ProductParameter, k as ProductSection, S as SPMTemplateOptions, T as TemplateOptions, l as TemplateParameter, m as TextParameter } from './factory-B37vOPki.js';
15
+ export { T as TwoStepVerificationApi, a as TwoStepVerificationClass, b as TwoStepVerificationRequest } from './TwoStepVerificationApi-C0jpAKfu.js';
16
+ export { U as UpdateWabaSubscription, b as WABAClass, a as WabaAccount, W as WabaApi, c as WabaSubscription, d as WabaSubscriptions } from './WabaApi-BfvpkpFr.js';
17
+ export { W as WebhookContact, a as WebhookEvent, b as WebhookMessage } from './WebhookProcessor-C3oUXCBl.js';
2
18
  export { WabaConfigType, WhatsAppConfig } from './types/config.js';
3
- export { C as ComponentTypesEnum, I as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum } from './enums-BZd9T2ul.js';
4
- export { F as FlowApi } from './FlowApi-B2ffO-HD.js';
5
- export { a as FlowEndpointRequest, b as FlowEndpointResponse, F as FlowTypeEnum } from './common-lV0NsO7t.js';
6
- export { M as MediaApi } from './MediaApi-BrEKpqi_.js';
7
- export { M as MessagesApi } from './MessageApi-BgsSpDno.js';
8
- export { P as PhoneNumberApi } from './PhoneNumberApi-DKlu9PHl.js';
9
- export { B as BusinessProfileApi } from './BusinessProfileApi-WXscSgo-.js';
10
- export { T as TemplateApi } from './TemplateApi-xGgIZt89.js';
11
- export { T as TwoStepVerificationApi } from './TwoStepVerificationApi-DfNPIz-C.js';
12
- export { W as WebhookContact, a as WebhookEvent, b as WebhookMessage } from './WebhookProcessor-BXYunz4N.js';
13
- export { M as MetaError, i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest, c as isMetaError } from './isMetaError-CXWJwW58.js';
19
+ export { M as MetaError, i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest, c as isMetaError } from './isMetaError-CQLXyEL4.js';
20
+ export { A as AudioMediaTypesEnum, B as BusinessVerticalEnum, a as ButtonPositionEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, d as CurrencyCodesEnum, D as DataLocalizationRegionEnum, e as DocumentMediaTypesEnum, H as HttpMethodsEnum, I as ImageMediaTypesEnum, f as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, R as RequestCodeMethodsEnum, S as StatusEnum, g as StickerMediaTypesEnum, h as SubTypeEnum, i as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, j as WebhookTypesEnum } from './enums-DIimUG6s.js';
14
21
  export { webhookHandler as ExpressWebhook } from './core/webhook/frameworks/express.js';
15
22
  export { webhookHandler as NextJsWebhook } from './core/webhook/frameworks/nextjs.js';
16
- import './request-vYMaEfk5.js';
17
- import './httpsClient-v4gmltzS.js';
23
+ import './httpsClient-Cbd2Y6mg.js';
18
24
  import 'https';
19
- import './EncryptionApi-D7pt-OXT.js';
20
- import './base-CdGDdVEl.js';
21
- import './QrCodeApi-7vDwIBHR.js';
22
- import './RegistrationApi-qO_qoti9.js';
23
- import './WabaApi-DqQi_68m.js';
24
- import './common-BiRA_uz3.js';
25
+ import './base-BV6DyzGS.js';
26
+ import 'http';
25
27
  import './handler-DbySwF0E.js';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import'./chunk-RWCVPWRC.js';export{a as ExpressWebhook}from'./chunk-ZMNXRMWK.js';export{a as NextJsWebhook}from'./chunk-GM63NGNV.js';import'./chunk-5577QQ7V.js';import'./chunk-U5FBZ6UB.js';export{a as isFlowDataExchangeRequest,b as isFlowErrorRequest,c as isFlowPingRequest}from'./chunk-6DFC5L3X.js';export{b as WhatsApp,b as WhatsAppLegacy}from'./chunk-BAOZ4U74.js';export{c as isMetaError}from'./chunk-FKXSL2JK.js';import'./chunk-AMHQGG6Z.js';export{a as TemplateApi}from'./chunk-VHAODWCN.js';import'./chunk-JPAV644F.js';import'./chunk-PHPQ5HP3.js';import'./chunk-IYSR44P6.js';export{b as TwoStepVerificationApi}from'./chunk-SNNRWNGZ.js';import'./chunk-L4ESAO2S.js';export{b as MessagesApi}from'./chunk-7QBIZCJ4.js';export{b as MediaApi}from'./chunk-JXCLRKQ7.js';export{b as BusinessProfileApi}from'./chunk-LV3TULSI.js';import'./chunk-CRZ7EUYR.js';export{b as FlowApi}from'./chunk-JC6YMVID.js';export{a as FlowTypeEnum}from'./chunk-NLF2JGYY.js';export{b as PhoneNumberApi}from'./chunk-FSKBLPGE.js';import'./chunk-MJEG3K4V.js';import'./chunk-RIL6QABY.js';export{i as ComponentTypesEnum,f as InteractiveTypesEnum,v as LanguagesEnum,d as MessageTypesEnum,e as ParametersTypesEnum}from'./chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
1
+ import'./chunk-RWCVPWRC.js';export{a as ExpressWebhook}from'./chunk-ZMNXRMWK.js';export{a as NextJsWebhook}from'./chunk-GM63NGNV.js';import'./chunk-5577QQ7V.js';import'./chunk-U5FBZ6UB.js';export{a as isFlowDataExchangeRequest,b as isFlowErrorRequest,c as isFlowPingRequest}from'./chunk-6DFC5L3X.js';export{b as WhatsApp,b as WhatsAppLegacy}from'./chunk-BAOZ4U74.js';export{c as isMetaError}from'./chunk-FKXSL2JK.js';import'./chunk-AMHQGG6Z.js';export{a as TemplateApi}from'./chunk-VHAODWCN.js';export{b as QrCodeApi}from'./chunk-JPAV644F.js';export{b as RegistrationApi}from'./chunk-PHPQ5HP3.js';export{b as EncryptionApi}from'./chunk-IYSR44P6.js';export{b as TwoStepVerificationApi}from'./chunk-SNNRWNGZ.js';export{b as WabaApi}from'./chunk-L4ESAO2S.js';export{b as MessagesApi}from'./chunk-7QBIZCJ4.js';export{b as MediaApi}from'./chunk-JXCLRKQ7.js';export{b as BusinessProfileApi}from'./chunk-LV3TULSI.js';import'./chunk-CRZ7EUYR.js';export{b as FlowApi}from'./chunk-JC6YMVID.js';export{c as FlowActionEnum,b as FlowCategoryEnum,a as FlowStatusEnum,d as FlowTypeEnum}from'./chunk-J2JPTKU6.js';export{b as PhoneNumberApi}from'./chunk-FSKBLPGE.js';import'./chunk-MJEG3K4V.js';import'./chunk-RIL6QABY.js';export{q as AudioMediaTypesEnum,y as BusinessVerticalEnum,g as ButtonPositionEnum,a as CategoryEnum,i as ComponentTypesEnum,k as ConversationTypesEnum,w as CurrencyCodesEnum,x as DataLocalizationRegionEnum,p as DocumentMediaTypesEnum,c as HttpMethodsEnum,o as ImageMediaTypesEnum,f as InteractiveTypesEnum,v as LanguagesEnum,d as MessageTypesEnum,e as ParametersTypesEnum,u as RequestCodeMethodsEnum,l as StatusEnum,n as StickerMediaTypesEnum,h as SubTypeEnum,s as SystemChangeTypesEnum,b as TemplateStatusEnum,m as VideoMediaTypesEnum,j as WabaConfigEnum,r as WebhookTypesEnum}from'./chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { a as FlowEndpointRequest, n as FlowDataExchangeRequest, e as FlowActionEnum, o as FlowErrorNotificationRequest, p as FlowHealthCheckRequest } from './common-lV0NsO7t.js';
1
+ import { l as FlowEndpointRequest, h as FlowDataExchangeRequest, a as FlowActionEnum, n as FlowErrorNotificationRequest, p as FlowHealthCheckRequest } from './common-B8kp4RdL.js';
2
2
 
3
3
  declare const DATA_EXCHANGE_ACTIONS: readonly [FlowActionEnum.DATA_EXCHANGE, FlowActionEnum.INIT, FlowActionEnum.BACK];
4
4
  declare const ERROR_ACTIONS: readonly [FlowActionEnum.DATA_EXCHANGE, FlowActionEnum.INIT];
@@ -1,4 +1,4 @@
1
- import { H as HttpMethodsEnum } from './enums-BZd9T2ul.js';
1
+ import { H as HttpMethodsEnum } from './enums-DIimUG6s.js';
2
2
 
3
3
  type GeneralRequestBody = Record<string, unknown>;
4
4
  interface GeneralHeaderInterface {
@@ -47,4 +47,4 @@ declare class RequesterClass {
47
47
  sendUrlEncodedForm<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: Record<string, string>, additionalHeaders?: Record<string, string>): Promise<T>;
48
48
  }
49
49
 
50
- export { type GeneralHeaderInterface as G, type Paging as P, RequesterClass as R, type GeneralRequestBody as a, type RequesterResponseInterface as b, type ResponseData as c, type ResponsePagination as d, type ResponseSuccess as e };
50
+ export { type GeneralHeaderInterface as G, type Paging as P, type RequesterResponseInterface as R, type GeneralRequestBody as a, type ResponseData as b, type ResponsePagination as c, type ResponseSuccess as d, RequesterClass as e };
@@ -1,4 +1,4 @@
1
- import { W as WabaConfigEnum } from '../enums-BZd9T2ul.js';
1
+ import { W as WabaConfigEnum } from '../enums-DIimUG6s.js';
2
2
 
3
3
  type WhatsAppConfig = {
4
4
  accessToken: string;
@@ -1 +1 @@
1
- export { A as AudioMediaTypesEnum, k as BusinessVerticalEnum, B as ButtonPositionEnum, a as CategoryEnum, C as ComponentTypesEnum, b 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, c as StatusEnum, d as StickerMediaTypesEnum, S as SubTypeEnum, g as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, f as WebhookTypesEnum } from '../enums-BZd9T2ul.js';
1
+ export { A as AudioMediaTypesEnum, B as BusinessVerticalEnum, a as ButtonPositionEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, d as CurrencyCodesEnum, D as DataLocalizationRegionEnum, e as DocumentMediaTypesEnum, H as HttpMethodsEnum, I as ImageMediaTypesEnum, f as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, k as ReferralSourceTypesEnum, R as RequestCodeMethodsEnum, S as StatusEnum, g as StickerMediaTypesEnum, h as SubTypeEnum, i as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, j as WebhookTypesEnum } from '../enums-DIimUG6s.js';
@@ -1,6 +1,6 @@
1
- export { B as BaseAPI, a as BaseClass } from '../base-CdGDdVEl.js';
1
+ export { B as BaseAPI, a as BaseClass } from '../base-BV6DyzGS.js';
2
2
  export { WabaConfigType, WhatsAppConfig } from './config.js';
3
3
  export { L as LoggerInterface } from '../logger-BdE0Vyim.js';
4
- export { H as HttpsClientClass, a as HttpsClientResponseClass, b as ResponseHeaderValue, R as ResponseHeaders, c as ResponseJSONBody } from '../httpsClient-v4gmltzS.js';
5
- export { G as GeneralHeaderInterface, a as GeneralRequestBody, P as Paging, R as RequesterClass, b as RequesterResponseInterface, c as ResponseData, d as ResponsePagination, e as ResponseSuccess } from '../request-vYMaEfk5.js';
6
- export { A as AudioMediaTypesEnum, k as BusinessVerticalEnum, B as ButtonPositionEnum, a as CategoryEnum, C as ComponentTypesEnum, b 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, c as StatusEnum, d as StickerMediaTypesEnum, S as SubTypeEnum, g as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, f as WebhookTypesEnum } from '../enums-BZd9T2ul.js';
4
+ export { H as HttpsClientClass, a as HttpsClientResponseClass, b as ResponseHeaderValue, R as ResponseHeaders, c as ResponseJSONBody } from '../httpsClient-Cbd2Y6mg.js';
5
+ export { G as GeneralHeaderInterface, a as GeneralRequestBody, P as Paging, e as RequesterClass, R as RequesterResponseInterface, b as ResponseData, c as ResponsePagination, d as ResponseSuccess } from '../request-CUjrMn8R.js';
6
+ export { A as AudioMediaTypesEnum, B as BusinessVerticalEnum, a as ButtonPositionEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, d as CurrencyCodesEnum, D as DataLocalizationRegionEnum, e as DocumentMediaTypesEnum, H as HttpMethodsEnum, I as ImageMediaTypesEnum, f as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, k as ReferralSourceTypesEnum, R as RequestCodeMethodsEnum, S as StatusEnum, g as StickerMediaTypesEnum, h as SubTypeEnum, i as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, j as WebhookTypesEnum } from '../enums-DIimUG6s.js';
@@ -1,9 +1,10 @@
1
1
  import { WabaConfigType } from '../types/config.js';
2
- export { M as MetaError, i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest, c as isMetaError } from '../isMetaError-CXWJwW58.js';
2
+ export { M as MetaError, i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest, c as isMetaError } from '../isMetaError-CQLXyEL4.js';
3
3
  import { L as LoggerInterface } from '../logger-BdE0Vyim.js';
4
- import '../enums-BZd9T2ul.js';
5
- import '../common-lV0NsO7t.js';
6
- import '../request-vYMaEfk5.js';
4
+ import '../enums-DIimUG6s.js';
5
+ import '../common-B8kp4RdL.js';
6
+ import '../request-CUjrMn8R.js';
7
+ import 'http';
7
8
 
8
9
  declare function buildFieldsQueryString(fields?: string[] | string): string;
9
10
 
@@ -1,2 +1,2 @@
1
- export{a as isFlowDataExchangeRequest,b as isFlowErrorRequest,c as isFlowPingRequest}from'../chunk-6DFC5L3X.js';export{a as Logger,b as formatConfigTable,e as getUserAgent,d as getVersion,c as isMetaError}from'../chunk-FKXSL2JK.js';export{a as buildFieldsQueryString}from'../chunk-CRZ7EUYR.js';import'../chunk-NLF2JGYY.js';export{a as objectToQueryString}from'../chunk-MJEG3K4V.js';import'../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
1
+ export{a as isFlowDataExchangeRequest,b as isFlowErrorRequest,c as isFlowPingRequest}from'../chunk-6DFC5L3X.js';export{a as Logger,b as formatConfigTable,e as getUserAgent,d as getVersion,c as isMetaError}from'../chunk-FKXSL2JK.js';export{a as buildFieldsQueryString}from'../chunk-CRZ7EUYR.js';import'../chunk-J2JPTKU6.js';export{a as objectToQueryString}from'../chunk-MJEG3K4V.js';import'../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,11 +1,28 @@
1
1
  {
2
2
  "name": "meta-cloud-api",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "TypeScript wrapper for Meta's Cloud API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "sideEffects": false,
9
+ "scripts": {
10
+ "prepublishOnly": "pnpm build",
11
+ "prepare": "husky",
12
+ "cz": "cz",
13
+ "dev": "tsup --watch",
14
+ "build": "tsup --clean",
15
+ "format": "prettier .",
16
+ "lint": "eslint .",
17
+ "clean": "rm -rf dist node_modules",
18
+ "typecheck": "tsc --noEmit",
19
+ "test": "vitest run",
20
+ "test:watch": "vitest --watch",
21
+ "changeset": "changeset",
22
+ "changeset:version": "changeset version",
23
+ "changeset:publish": "changeset publish",
24
+ "release": "pnpm build && changeset publish"
25
+ },
9
26
  "publishConfig": {
10
27
  "access": "public"
11
28
  },
@@ -157,6 +174,7 @@
157
174
  ],
158
175
  "author": "froggy1014",
159
176
  "license": "MIT",
177
+ "packageManager": "pnpm@10.11.0",
160
178
  "homepage": "https://github.com/froggy1014/meta-cloud-api#readme",
161
179
  "repository": {
162
180
  "type": "git",
@@ -212,20 +230,5 @@
212
230
  "commitizen": {
213
231
  "path": "@commitlint/cz-commitlint"
214
232
  }
215
- },
216
- "scripts": {
217
- "cz": "cz",
218
- "dev": "tsup --watch",
219
- "build": "tsup --clean",
220
- "format": "prettier .",
221
- "lint": "eslint .",
222
- "clean": "rm -rf dist node_modules",
223
- "typecheck": "tsc --noEmit",
224
- "test": "vitest run",
225
- "test:watch": "vitest --watch",
226
- "changeset": "changeset",
227
- "changeset:version": "changeset version",
228
- "changeset:publish": "changeset publish",
229
- "release": "pnpm build && changeset publish"
230
233
  }
231
- }
234
+ }
@@ -1,2 +0,0 @@
1
- var o=(e=>(e.Ping="ping",e.Change="data_exchange",e.Error="error",e.All="*",e))(o||{});export{o as a};//# sourceMappingURL=chunk-NLF2JGYY.js.map
2
- //# sourceMappingURL=chunk-NLF2JGYY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/api/flow/types/common.ts"],"names":["FlowTypeEnum"],"mappings":"AAsCO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GAERA,CAAAA,CAAA,IAAA,CAAO,MAAA,CAEPA,CAAAA,CAAA,MAAA,CAAS,eAAA,CAETA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CAERA,CAAAA,CAAA,GAAA,CAAM,IAREA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA","file":"chunk-NLF2JGYY.js","sourcesContent":["import { ResponseSuccess } from '../../../types';\nimport { IncomingHttpHeaders, IncomingMessage } from 'http';\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 * Enum for Flow Types in webhook handlers\n * Used to register handlers for specific flow events\n */\nexport enum FlowTypeEnum {\n /** Health check/ping requests */\n Ping = 'ping',\n /** Data exchange requests */\n Change = 'data_exchange',\n /** Error notification requests */\n Error = 'error',\n /** Match all flow action types */\n All = '*',\n}\n\nexport type FlowType = (typeof FlowTypeEnum)[keyof typeof FlowTypeEnum];\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> & { error_message?: string };\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: 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\n/**\n * WhatsApp Flow Endpoint - Comprehensive Request Object\n * A combined type that includes all possible fields from different request types\n * with all fields being optional for flexibility\n */\nexport interface FlowEndpointRequest {\n // Common fields\n version?: '3.0';\n action?: 'ping' | FlowActionEnum;\n\n screen?: string;\n flow_token?: string;\n\n data?: Record<string, any> & {\n error_key?: string;\n error_message?: string;\n };\n}\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 file: Blob | Buffer | object;\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"]}