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,205 +1,11 @@
1
- import { f as TemplateFormat, d as TemplateRequestBody } from '../../TemplateApi-xGgIZt89.js';
2
- export { C as CatalogButton, g as ComponentTypes, h as CopyCodeButton, F as FlowButton, M as MPMButton, q as MediaCarouselCard, O as OTPButton, P as PhoneNumberButton, r as ProductCarouselCard, Q as QuickReplyButton, S as SPMButton, T as TemplateApi, i as TemplateBody, j as TemplateButton, k as TemplateButtons, l as TemplateCarousel, a as TemplateClass, b as TemplateDeleteParams, m as TemplateFooter, c as TemplateGetParams, n as TemplateHeader, o as TemplateHeaderExample, p as TemplateLimitedTimeOffer, e as TemplateResponse, U as URLButton, T as default } from '../../TemplateApi-xGgIZt89.js';
3
- import { L as LanguagesEnum, i as CurrencyCodesEnum, a as CategoryEnum } from '../../enums-BZd9T2ul.js';
4
- import '../../base-CdGDdVEl.js';
1
+ import { o as TemplateRequestBody } from '../../TemplateApi-D9Q_7cf3.js';
2
+ export { C as CatalogButton, a as ComponentTypes, b as CopyCodeButton, F as FlowButton, M as MPMButton, q as MediaCarouselCard, O as OTPButton, P as PhoneNumberButton, r as ProductCarouselCard, 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, p as TemplateResponse, U as URLButton, T as default } from '../../TemplateApi-D9Q_7cf3.js';
3
+ import { A as AuthenticationTemplateOptions, c as CatalogTemplateOptions, d as CouponTemplateOptions, f as LimitedTimeOfferTemplateOptions, i as MPMTemplateOptions, M as MediaCardCarouselTemplateOptions, O as OTPTemplateOptions, P as ProductCardCarouselTemplateOptions, S as SPMTemplateOptions, T as TemplateOptions } from '../../factory-B37vOPki.js';
4
+ export { B as BodyOptions, a as ButtonOptions, C as CarouselCard, b as CarouselOptions, e as CurrencyParameter, D as DateTimeParameter, F as FooterOptions, H as HeaderOptions, L as LimitedTimeOfferOptions, g as LocationParameter, h as MediaParameter, j as ProductParameter, k as ProductSection, l as TemplateParameter, m as TextParameter } from '../../factory-B37vOPki.js';
5
+ import '../../base-BV6DyzGS.js';
5
6
  import '../../types/config.js';
6
- import '../../request-vYMaEfk5.js';
7
-
8
- interface TextParameter {
9
- type: 'text';
10
- value: string;
11
- }
12
- interface CurrencyParameter {
13
- type: 'currency';
14
- amount_1000: number;
15
- code: CurrencyCodesEnum;
16
- fallback_value: string;
17
- }
18
- interface DateTimeParameter {
19
- type: 'date_time';
20
- fallback_value: string;
21
- }
22
- interface MediaParameter {
23
- type: 'image' | 'video' | 'document';
24
- handle?: string;
25
- link?: string;
26
- }
27
- interface LocationParameter {
28
- type: 'location';
29
- latitude?: number;
30
- longitude?: number;
31
- name?: string;
32
- address?: string;
33
- }
34
- interface ProductParameter {
35
- type: 'product';
36
- product_retailer_id: string;
37
- }
38
- type TemplateParameter = TextParameter | CurrencyParameter | DateTimeParameter | MediaParameter | LocationParameter | ProductParameter;
39
- interface HeaderOptions {
40
- format: TemplateFormat;
41
- text?: string;
42
- parameters?: TemplateParameter[];
43
- example?: {
44
- header_text?: string[];
45
- header_text_named_params?: Array<{
46
- param_name: string;
47
- example: string;
48
- }>;
49
- header_handle?: string[];
50
- };
51
- }
52
- interface BodyOptions {
53
- text: string;
54
- parameters?: TemplateParameter[];
55
- example?: {
56
- body_text?: string[][];
57
- body_text_named_params?: Array<{
58
- param_name: string;
59
- example: string;
60
- }>;
61
- };
62
- }
63
- interface FooterOptions {
64
- text: string;
65
- }
66
- interface ButtonOptions {
67
- phone_number?: {
68
- text: string;
69
- phone_number: string;
70
- };
71
- url?: {
72
- text: string;
73
- url: string;
74
- example?: string;
75
- };
76
- quick_reply?: {
77
- text: string;
78
- }[];
79
- copy_code?: {
80
- example: string;
81
- };
82
- flow?: {
83
- text: string;
84
- flow_id?: string;
85
- flow_name?: string;
86
- flow_json?: string;
87
- flow_action?: 'navigate' | 'data_exchange';
88
- navigate_screen?: string;
89
- };
90
- mpm?: boolean;
91
- otp?: boolean;
92
- spm?: boolean;
93
- }
94
- interface CarouselCard {
95
- image?: string;
96
- video?: string;
97
- product?: string;
98
- body?: string;
99
- bodyParameters?: TemplateParameter[];
100
- buttons?: ButtonOptions;
101
- }
102
- interface CarouselOptions {
103
- cards: CarouselCard[];
104
- }
105
- interface LimitedTimeOfferOptions {
106
- expiration_time_ms: number;
107
- }
108
- interface ProductSection {
109
- title?: string;
110
- product_items: Array<{
111
- product_retailer_id: string;
112
- }>;
113
- }
114
- interface TemplateOptions {
115
- name: string;
116
- language: LanguagesEnum;
117
- category: CategoryEnum;
118
- header?: HeaderOptions;
119
- body?: BodyOptions;
120
- footer?: FooterOptions;
121
- buttons?: ButtonOptions;
122
- carousel?: CarouselOptions;
123
- limitedTimeOffer?: LimitedTimeOfferOptions;
124
- }
125
- interface OTPTemplateOptions {
126
- name: string;
127
- language: LanguagesEnum;
128
- code_expiration_minutes?: number;
129
- add_security_recommendation?: boolean;
130
- }
131
- interface AuthenticationTemplateOptions {
132
- name: string;
133
- language: LanguagesEnum;
134
- code_expiration_minutes?: number;
135
- add_security_recommendation?: boolean;
136
- copy_code_button?: boolean;
137
- }
138
- interface CatalogTemplateOptions {
139
- name: string;
140
- language: LanguagesEnum;
141
- header?: Omit<HeaderOptions, 'format'>;
142
- body: BodyOptions;
143
- footer?: FooterOptions;
144
- thumbnail_product_retailer_id: string;
145
- }
146
- interface CouponTemplateOptions {
147
- name: string;
148
- language: LanguagesEnum;
149
- header?: Omit<HeaderOptions, 'format'>;
150
- body: BodyOptions;
151
- footer?: FooterOptions;
152
- coupon_code: string;
153
- }
154
- interface LimitedTimeOfferTemplateOptions {
155
- name: string;
156
- language: LanguagesEnum;
157
- header?: Omit<HeaderOptions, 'format'>;
158
- body: BodyOptions;
159
- footer?: FooterOptions;
160
- expiration_time_ms: number;
161
- }
162
- interface MediaCardCarouselTemplateOptions {
163
- name: string;
164
- language: LanguagesEnum;
165
- cards: Array<{
166
- header: {
167
- format: 'IMAGE' | 'VIDEO';
168
- example: {
169
- header_handle: string[];
170
- };
171
- };
172
- body: BodyOptions;
173
- buttons?: ButtonOptions;
174
- }>;
175
- }
176
- interface MPMTemplateOptions {
177
- name: string;
178
- language: LanguagesEnum;
179
- header?: Omit<HeaderOptions, 'format'>;
180
- body: BodyOptions;
181
- footer?: FooterOptions;
182
- thumbnail_product_retailer_id: string;
183
- sections: ProductSection[];
184
- }
185
- interface ProductCardCarouselTemplateOptions {
186
- name: string;
187
- language: LanguagesEnum;
188
- header?: Omit<HeaderOptions, 'format'>;
189
- body: BodyOptions;
190
- footer?: FooterOptions;
191
- cards: Array<{
192
- product_retailer_id: string;
193
- }>;
194
- }
195
- interface SPMTemplateOptions {
196
- name: string;
197
- language: LanguagesEnum;
198
- header?: Omit<HeaderOptions, 'format'>;
199
- body: BodyOptions;
200
- footer?: FooterOptions;
201
- product_retailer_id: string;
202
- }
7
+ import '../../enums-DIimUG6s.js';
8
+ import '../../request-CUjrMn8R.js';
203
9
 
204
10
  declare function createTemplate(options: TemplateOptions): TemplateRequestBody;
205
11
  declare function createOTPTemplate(options: OTPTemplateOptions): TemplateRequestBody;
@@ -212,4 +18,4 @@ declare function createMPMTemplate(options: MPMTemplateOptions): TemplateRequest
212
18
  declare function createProductCardCarouselTemplate(options: ProductCardCarouselTemplateOptions): TemplateRequestBody;
213
19
  declare function createSPMTemplate(options: SPMTemplateOptions): TemplateRequestBody;
214
20
 
215
- export { type AuthenticationTemplateOptions, type BodyOptions, type ButtonOptions, type CarouselCard, type CarouselOptions, type CatalogTemplateOptions, type CouponTemplateOptions, type CurrencyParameter, type DateTimeParameter, type FooterOptions, type HeaderOptions, type LimitedTimeOfferOptions, type LimitedTimeOfferTemplateOptions, type LocationParameter, type MPMTemplateOptions, type MediaCardCarouselTemplateOptions, type MediaParameter, type OTPTemplateOptions, type ProductCardCarouselTemplateOptions, type ProductParameter, type ProductSection, type SPMTemplateOptions, TemplateFormat, type TemplateOptions, type TemplateParameter, TemplateRequestBody, type TextParameter, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate };
21
+ export { AuthenticationTemplateOptions, CatalogTemplateOptions, CouponTemplateOptions, LimitedTimeOfferTemplateOptions, MPMTemplateOptions, MediaCardCarouselTemplateOptions, OTPTemplateOptions, ProductCardCarouselTemplateOptions, SPMTemplateOptions, TemplateOptions, TemplateRequestBody, createAuthenticationTemplate, createCatalogTemplate, createCouponTemplate, createLimitedTimeOfferTemplate, createMPMTemplate, createMediaCardCarouselTemplate, createOTPTemplate, createProductCardCarouselTemplate, createSPMTemplate, createTemplate };
@@ -1,9 +1,9 @@
1
- import { T as TwoStepVerificationApi } from '../../TwoStepVerificationApi-DfNPIz-C.js';
2
- export { a as TwoStepVerificationClass, b as TwoStepVerificationRequest } from '../../TwoStepVerificationApi-DfNPIz-C.js';
3
- import '../../base-CdGDdVEl.js';
1
+ import { T as TwoStepVerificationApi } from '../../TwoStepVerificationApi-C0jpAKfu.js';
2
+ export { a as TwoStepVerificationClass, b as TwoStepVerificationRequest } from '../../TwoStepVerificationApi-C0jpAKfu.js';
3
+ import '../../base-BV6DyzGS.js';
4
4
  import '../../types/config.js';
5
- import '../../enums-BZd9T2ul.js';
6
- import '../../request-vYMaEfk5.js';
5
+ import '../../enums-DIimUG6s.js';
6
+ import '../../request-CUjrMn8R.js';
7
7
 
8
8
 
9
9
 
@@ -1,9 +1,9 @@
1
- import { W as WabaApi } from '../../WabaApi-DqQi_68m.js';
2
- export { U as UpdateWabaSubscription, b as WABAClass, a as WabaAccount, c as WabaSubscriptions } from '../../WabaApi-DqQi_68m.js';
3
- import '../../base-CdGDdVEl.js';
1
+ import { W as WabaApi } from '../../WabaApi-BfvpkpFr.js';
2
+ export { U as UpdateWabaSubscription, b as WABAClass, a as WabaAccount, d as WabaSubscriptions } from '../../WabaApi-BfvpkpFr.js';
3
+ import '../../base-BV6DyzGS.js';
4
4
  import '../../types/config.js';
5
- import '../../enums-BZd9T2ul.js';
6
- import '../../request-vYMaEfk5.js';
5
+ import '../../enums-DIimUG6s.js';
6
+ import '../../request-CUjrMn8R.js';
7
7
 
8
8
 
9
9
 
@@ -1,6 +1,6 @@
1
1
  import { WabaConfigType } from './types/config.js';
2
- import { H as HttpMethodsEnum } from './enums-BZd9T2ul.js';
3
- import { R as RequesterClass } from './request-vYMaEfk5.js';
2
+ import { H as HttpMethodsEnum } from './enums-DIimUG6s.js';
3
+ import { e as RequesterClass } from './request-CUjrMn8R.js';
4
4
 
5
5
  declare class BaseClass {
6
6
  constructor(config: WabaConfigType);
@@ -0,0 +1,2 @@
1
+ var s=(o=>(o.Draft="DRAFT",o.Published="PUBLISHED",o.Throttled="THROTTLED",o.Blocked="BLOCKED",o.Deprecated="DEPRECATED",o))(s||{}),n=(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))(n||{}),i=(t=>(t.INIT="INIT",t.BACK="BACK",t.DATA_EXCHANGE="data_exchange",t))(i||{}),a=(r=>(r.Ping="ping",r.Change="data_exchange",r.Error="error",r.All="*",r))(a||{});export{s as a,n as b,i as c,a as d};//# sourceMappingURL=chunk-J2JPTKU6.js.map
2
+ //# sourceMappingURL=chunk-J2JPTKU6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/api/flow/types/common.ts"],"names":["FlowStatusEnum","FlowCategoryEnum","FlowActionEnum","FlowTypeEnum"],"mappings":"AAMO,IAAKA,CAAAA,CAAAA,CAAAA,CAAAA,GACRA,CAAAA,CAAA,KAAA,CAAQ,OAAA,CACRA,EAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,SAAA,CAAY,WAAA,CACZA,CAAAA,CAAA,OAAA,CAAU,SAAA,CACVA,EAAA,UAAA,CAAa,YAAA,CALLA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAWAC,CAAAA,CAAAA,CAAAA,CAAAA,GACRA,CAAAA,CAAA,MAAA,CAAS,SAAA,CACTA,EAAA,MAAA,CAAS,SAAA,CACTA,CAAAA,CAAA,kBAAA,CAAqB,sBACrBA,CAAAA,CAAA,cAAA,CAAiB,iBAAA,CACjBA,CAAAA,CAAA,UAAY,YAAA,CACZA,CAAAA,CAAA,eAAA,CAAkB,kBAAA,CAClBA,CAAAA,CAAA,MAAA,CAAS,QAAA,CACTA,CAAAA,CAAA,MAAQ,OAAA,CARAA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAWAC,CAAAA,CAAAA,CAAAA,CAAAA,GACRA,CAAAA,CAAA,IAAA,CAAO,MAAA,CACPA,CAAAA,CAAA,KAAO,MAAA,CACPA,CAAAA,CAAA,aAAA,CAAgB,eAAA,CAHRA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA,CAAA,CAUAC,CAAAA,CAAAA,CAAAA,CAAAA,GAERA,CAAAA,CAAA,KAAO,MAAA,CAEPA,CAAAA,CAAA,MAAA,CAAS,eAAA,CAETA,EAAA,KAAA,CAAQ,OAAA,CAERA,CAAAA,CAAA,GAAA,CAAM,IAREA,CAAAA,CAAAA,EAAAA,CAAAA,EAAA,EAAA","file":"chunk-J2JPTKU6.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"]}
@@ -1,4 +1,5 @@
1
- import { e as ResponseSuccess } from './request-vYMaEfk5.js';
1
+ import { d as ResponseSuccess } from './request-CUjrMn8R.js';
2
+ import { IncomingMessage, IncomingHttpHeaders } from 'http';
2
3
 
3
4
  /**
4
5
  * Enum for Flow Status
@@ -171,6 +172,32 @@ interface ValidateFlowJsonResponse {
171
172
  success: boolean;
172
173
  validation_errors?: FlowValidationError[];
173
174
  }
175
+ /**
176
+ * WhatsApp Flow Endpoint - Encrypted Request Payload
177
+ * Represents the raw encrypted data received from WhatsApp
178
+ */
179
+ interface FlowEncryptedRequestPayload {
180
+ encrypted_aes_key: string;
181
+ encrypted_flow_data: string;
182
+ initial_vector: string;
183
+ }
184
+ /**
185
+ * WhatsApp Flow Endpoint - Decrypted Request Response
186
+ * Represents the successfully decrypted data and encryption keys
187
+ */
188
+ interface FlowDecryptedRequestResponse {
189
+ decryptedBody: any;
190
+ aesKeyBuffer: Buffer;
191
+ initialVectorBuffer: Buffer;
192
+ }
193
+ /**
194
+ * WhatsApp Flow Endpoint - HTTP Request with Body
195
+ * Represents an HTTP request with the encrypted payload
196
+ */
197
+ interface FlowHttpRequest extends IncomingMessage {
198
+ body: FlowEncryptedRequestPayload;
199
+ headers: IncomingHttpHeaders;
200
+ }
174
201
  /**
175
202
  * WhatsApp Flow Endpoint - Health Check Request
176
203
  * Represents the structure of a health check request
@@ -373,4 +400,4 @@ interface FlowClass {
373
400
  }): Promise<FlowMigrationResponse>;
374
401
  }
375
402
 
376
- export { type CreateFlowResponse as C, FlowTypeEnum as F, type UpdateFlowResponse as U, type ValidateFlowJsonResponse as V, type FlowEndpointRequest as a, type FlowEndpointResponse as b, type Flow as c, type FlowType as d, FlowActionEnum as e, type FlowAssetsResponse as f, FlowCategoryEnum as g, type FlowClass as h, type FlowMigrationResponse as i, type FlowPreviewResponse as j, type FlowsListResponse as k, FlowStatusEnum as l, type FlowValidationError as m, type FlowDataExchangeRequest as n, type FlowErrorNotificationRequest as o, type FlowHealthCheckRequest as p };
403
+ export { type FlowValidationError as A, type FlowValidationErrorPointer as B, type PaginationCursors as C, type CreateFlowResponse as D, FlowTypeEnum as F, type Pagination as P, type UpdateFlowResponse as U, type ValidateFlowJsonResponse as V, FlowActionEnum as a, FlowCategoryEnum as b, FlowStatusEnum as c, type Flow as d, type FlowAsset as e, type FlowAssetsResponse as f, type FlowClass as g, type FlowDataExchangeRequest as h, type FlowDataExchangeResponse as i, type FlowDecryptedRequestResponse as j, type FlowEncryptedRequestPayload as k, type FlowEndpointRequest as l, type FlowEndpointResponse as m, type FlowErrorNotificationRequest as n, type FlowErrorNotificationResponse as o, type FlowHealthCheckRequest as p, type FlowHealthCheckResponse as q, type FlowHttpRequest as r, type FlowMigrationFailure as s, type FlowMigrationResult as t, type FlowMigrationResponse as u, type FlowPreview as v, type FlowPreviewResponse as w, type FlowsListResponse as x, type FlowSuccessScreenResponse as y, type FlowType as z };
@@ -1,6 +1,6 @@
1
- import { I as InteractiveTypesEnum, C as ComponentTypesEnum, L as LanguagesEnum, P as ParametersTypesEnum, i as CurrencyCodesEnum, S as SubTypeEnum, B as ButtonPositionEnum, M as MessageTypesEnum } from './enums-BZd9T2ul.js';
2
- import { a as BaseClass } from './base-CdGDdVEl.js';
3
- import { a as GeneralRequestBody } from './request-vYMaEfk5.js';
1
+ import { f as InteractiveTypesEnum, b as ComponentTypesEnum, L as LanguagesEnum, P as ParametersTypesEnum, d as CurrencyCodesEnum, h as SubTypeEnum, a as ButtonPositionEnum, M as MessageTypesEnum } from './enums-DIimUG6s.js';
2
+ import { a as BaseClass } from './base-BV6DyzGS.js';
3
+ import { a as GeneralRequestBody } from './request-CUjrMn8R.js';
4
4
 
5
5
  interface ReactionParams {
6
6
  messageId: string;
@@ -422,4 +422,4 @@ declare class MessagesClass extends BaseClass {
422
422
  status(params: StatusParams): Promise<MessagesResponse>;
423
423
  }
424
424
 
425
- export { type AudioMediaObject as A, type ContactObject as C, type DocumentMediaObject$1 as D, type ImageMediaObject$1 as I, type LocationObject as L, type MessageRequestParams as M, type NameObject as N, type ReactionParams as R, type StatusParams as S, type TextMessageParams as T, type VideoMediaObject$1 as V, type InteractiveObject as a, type MessagesResponse as b, type MessageTemplateObject as c, type StickerMediaObject as d, type TextObject as e, MessagesClass as f, type MessageRequestBody as g, type AddressesObject as h };
425
+ export { type AudioMediaObject as A, type ContactObject as C, type DocumentMediaObject$1 as D, type GeneralMessageBody as G, type ImageMediaObject$1 as I, type LocationObject as L, type MessageRequestBody as M, type NameObject as N, type ReactionParams as R, type StatusParams as S, type TextMessageParams as T, type VideoMediaObject$1 as V, type MessageRequestParams as a, MessagesClass as b, type MessagesResponse as c, type TextObject as d, type StickerMediaObject as e, type InteractiveObject as f, type MessageTemplateObject as g, type AddressesObject as h };
@@ -1,25 +1,26 @@
1
1
  import { B as BaseWebhookConfig, a as BaseRequest, b as BaseResponse } from '../../../handler-DbySwF0E.js';
2
- import { c as WebhookProcessor } from '../../../WebhookProcessor-BXYunz4N.js';
2
+ import { c as WebhookProcessor } from '../../../WebhookProcessor-C3oUXCBl.js';
3
3
  import '../../../types/config.js';
4
- import '../../../enums-BZd9T2ul.js';
5
- import '../../../common-lV0NsO7t.js';
6
- import '../../../request-vYMaEfk5.js';
7
- import '../../../WhatsApp-pTZPQm81.js';
8
- import '../../../httpsClient-v4gmltzS.js';
4
+ import '../../../enums-DIimUG6s.js';
5
+ import '../../../common-B8kp4RdL.js';
6
+ import '../../../request-CUjrMn8R.js';
7
+ import 'http';
8
+ import '../../../WhatsApp-BG0rDhMn.js';
9
+ import '../../../httpsClient-Cbd2Y6mg.js';
9
10
  import 'https';
10
- import '../../../EncryptionApi-D7pt-OXT.js';
11
- import '../../../base-CdGDdVEl.js';
12
- import '../../../FlowApi-B2ffO-HD.js';
13
- import '../../../MediaApi-BrEKpqi_.js';
14
- import '../../../MessageApi-BgsSpDno.js';
15
- import '../../../common-BiRA_uz3.js';
16
- import '../../../PhoneNumberApi-DKlu9PHl.js';
17
- import '../../../BusinessProfileApi-WXscSgo-.js';
18
- import '../../../QrCodeApi-7vDwIBHR.js';
19
- import '../../../RegistrationApi-qO_qoti9.js';
20
- import '../../../TemplateApi-xGgIZt89.js';
21
- import '../../../TwoStepVerificationApi-DfNPIz-C.js';
22
- import '../../../WabaApi-DqQi_68m.js';
11
+ import '../../../EncryptionApi-CcCfeK2b.js';
12
+ import '../../../base-BV6DyzGS.js';
13
+ import '../../../FlowApi-DDHrFT_Q.js';
14
+ import '../../../MediaApi-CY9RVo7u.js';
15
+ import '../../../MessageApi-CX_jN8da.js';
16
+ import '../../../common-CGbls9Y8.js';
17
+ import '../../../PhoneNumberApi-B-hY7g1M.js';
18
+ import '../../../BusinessProfileApi-C_sEOrWM.js';
19
+ import '../../../QrCodeApi-DRICKN04.js';
20
+ import '../../../RegistrationApi-CFPzU1Vw.js';
21
+ import '../../../TemplateApi-D9Q_7cf3.js';
22
+ import '../../../TwoStepVerificationApi-C0jpAKfu.js';
23
+ import '../../../WabaApi-BfvpkpFr.js';
23
24
 
24
25
  interface ExpressRequest extends BaseRequest {
25
26
  method: string;
@@ -1,2 +1,2 @@
1
- export{a as webhookHandler}from'../../../chunk-ZMNXRMWK.js';import'../../../chunk-5577QQ7V.js';import'../../../chunk-U5FBZ6UB.js';import'../../../chunk-6DFC5L3X.js';import'../../../chunk-BAOZ4U74.js';import'../../../chunk-FKXSL2JK.js';import'../../../chunk-AMHQGG6Z.js';import'../../../chunk-VHAODWCN.js';import'../../../chunk-JPAV644F.js';import'../../../chunk-PHPQ5HP3.js';import'../../../chunk-IYSR44P6.js';import'../../../chunk-SNNRWNGZ.js';import'../../../chunk-L4ESAO2S.js';import'../../../chunk-7QBIZCJ4.js';import'../../../chunk-JXCLRKQ7.js';import'../../../chunk-LV3TULSI.js';import'../../../chunk-CRZ7EUYR.js';import'../../../chunk-JC6YMVID.js';import'../../../chunk-NLF2JGYY.js';import'../../../chunk-FSKBLPGE.js';import'../../../chunk-MJEG3K4V.js';import'../../../chunk-RIL6QABY.js';import'../../../chunk-KMAH6636.js';//# sourceMappingURL=express.js.map
1
+ export{a as webhookHandler}from'../../../chunk-ZMNXRMWK.js';import'../../../chunk-5577QQ7V.js';import'../../../chunk-U5FBZ6UB.js';import'../../../chunk-6DFC5L3X.js';import'../../../chunk-BAOZ4U74.js';import'../../../chunk-FKXSL2JK.js';import'../../../chunk-AMHQGG6Z.js';import'../../../chunk-VHAODWCN.js';import'../../../chunk-JPAV644F.js';import'../../../chunk-PHPQ5HP3.js';import'../../../chunk-IYSR44P6.js';import'../../../chunk-SNNRWNGZ.js';import'../../../chunk-L4ESAO2S.js';import'../../../chunk-7QBIZCJ4.js';import'../../../chunk-JXCLRKQ7.js';import'../../../chunk-LV3TULSI.js';import'../../../chunk-CRZ7EUYR.js';import'../../../chunk-JC6YMVID.js';import'../../../chunk-J2JPTKU6.js';import'../../../chunk-FSKBLPGE.js';import'../../../chunk-MJEG3K4V.js';import'../../../chunk-RIL6QABY.js';import'../../../chunk-KMAH6636.js';//# sourceMappingURL=express.js.map
2
2
  //# sourceMappingURL=express.js.map
@@ -1,24 +1,25 @@
1
1
  import { WhatsAppConfig } from '../../../types/config.js';
2
- import { c as WebhookProcessor } from '../../../WebhookProcessor-BXYunz4N.js';
3
- import '../../../enums-BZd9T2ul.js';
4
- import '../../../common-lV0NsO7t.js';
5
- import '../../../request-vYMaEfk5.js';
6
- import '../../../WhatsApp-pTZPQm81.js';
7
- import '../../../httpsClient-v4gmltzS.js';
2
+ import { c as WebhookProcessor } from '../../../WebhookProcessor-C3oUXCBl.js';
3
+ import '../../../enums-DIimUG6s.js';
4
+ import '../../../common-B8kp4RdL.js';
5
+ import '../../../request-CUjrMn8R.js';
6
+ import 'http';
7
+ import '../../../WhatsApp-BG0rDhMn.js';
8
+ import '../../../httpsClient-Cbd2Y6mg.js';
8
9
  import 'https';
9
- import '../../../EncryptionApi-D7pt-OXT.js';
10
- import '../../../base-CdGDdVEl.js';
11
- import '../../../FlowApi-B2ffO-HD.js';
12
- import '../../../MediaApi-BrEKpqi_.js';
13
- import '../../../MessageApi-BgsSpDno.js';
14
- import '../../../common-BiRA_uz3.js';
15
- import '../../../PhoneNumberApi-DKlu9PHl.js';
16
- import '../../../BusinessProfileApi-WXscSgo-.js';
17
- import '../../../QrCodeApi-7vDwIBHR.js';
18
- import '../../../RegistrationApi-qO_qoti9.js';
19
- import '../../../TemplateApi-xGgIZt89.js';
20
- import '../../../TwoStepVerificationApi-DfNPIz-C.js';
21
- import '../../../WabaApi-DqQi_68m.js';
10
+ import '../../../EncryptionApi-CcCfeK2b.js';
11
+ import '../../../base-BV6DyzGS.js';
12
+ import '../../../FlowApi-DDHrFT_Q.js';
13
+ import '../../../MediaApi-CY9RVo7u.js';
14
+ import '../../../MessageApi-CX_jN8da.js';
15
+ import '../../../common-CGbls9Y8.js';
16
+ import '../../../PhoneNumberApi-B-hY7g1M.js';
17
+ import '../../../BusinessProfileApi-C_sEOrWM.js';
18
+ import '../../../QrCodeApi-DRICKN04.js';
19
+ import '../../../RegistrationApi-CFPzU1Vw.js';
20
+ import '../../../TemplateApi-D9Q_7cf3.js';
21
+ import '../../../TwoStepVerificationApi-C0jpAKfu.js';
22
+ import '../../../WabaApi-BfvpkpFr.js';
22
23
 
23
24
  interface NextRequest extends Request {
24
25
  nextUrl: {
@@ -1,2 +1,2 @@
1
- import {d}from'../../../chunk-U5FBZ6UB.js';import'../../../chunk-6DFC5L3X.js';import'../../../chunk-BAOZ4U74.js';import'../../../chunk-FKXSL2JK.js';import'../../../chunk-AMHQGG6Z.js';import'../../../chunk-VHAODWCN.js';import'../../../chunk-JPAV644F.js';import'../../../chunk-PHPQ5HP3.js';import'../../../chunk-IYSR44P6.js';import'../../../chunk-SNNRWNGZ.js';import'../../../chunk-L4ESAO2S.js';import'../../../chunk-7QBIZCJ4.js';import'../../../chunk-JXCLRKQ7.js';import'../../../chunk-LV3TULSI.js';import'../../../chunk-CRZ7EUYR.js';import'../../../chunk-JC6YMVID.js';import'../../../chunk-NLF2JGYY.js';import'../../../chunk-FSKBLPGE.js';import'../../../chunk-MJEG3K4V.js';import'../../../chunk-RIL6QABY.js';import'../../../chunk-KMAH6636.js';function p(u){let s=new d(u);return {GET:async r=>{try{let{searchParams:e}=new URL(r.url),o=e.get("hub.mode"),n=e.get("hub.verify_token"),a=e.get("hub.challenge"),t=await s.processVerification(o,n,a);return new Response(t.body,{status:t.status,headers:t.headers})}catch(e){return console.error("Webhook verification error:",e),new Response("Internal Server Error",{status:500})}},POST:async r=>{try{let e=await s.processWebhook(r);return new Response(e.body,{status:e.status,headers:e.headers})}catch(e){return console.error("Webhook processing error:",e),new Response("Internal Server Error",{status:500})}},webhook:{GET:async r=>{try{let{searchParams:e}=new URL(r.url),o=e.get("hub.mode"),n=e.get("hub.verify_token"),a=e.get("hub.challenge"),t=await s.processVerification(o,n,a);return new Response(t.body,{status:t.status,headers:t.headers})}catch(e){return console.error("Webhook verification error:",e),new Response("Internal Server Error",{status:500})}},POST:async r=>{try{let e=await s.processWebhook(r);return new Response(e.body,{status:e.status,headers:e.headers})}catch(e){return console.error("Webhook processing error:",e),new Response("Internal Server Error",{status:500})}}},flow:{GET:async r=>{try{let e=await s.processFlow(r);return Response.json(e.body,{status:e.status,headers:e.headers})}catch(e){return console.error("Flow GET error:",e),new Response("Internal Server Error",{status:500})}},POST:async r=>{try{let e=await s.processFlow(r);return Response.json(e.body,{status:e.status,headers:e.headers})}catch(e){return console.error("Flow POST error:",e),new Response("Internal Server Error",{status:500})}}},processor:s}}export{p as webhookHandler};//# sourceMappingURL=nextjs-app.js.map
1
+ import {d}from'../../../chunk-U5FBZ6UB.js';import'../../../chunk-6DFC5L3X.js';import'../../../chunk-BAOZ4U74.js';import'../../../chunk-FKXSL2JK.js';import'../../../chunk-AMHQGG6Z.js';import'../../../chunk-VHAODWCN.js';import'../../../chunk-JPAV644F.js';import'../../../chunk-PHPQ5HP3.js';import'../../../chunk-IYSR44P6.js';import'../../../chunk-SNNRWNGZ.js';import'../../../chunk-L4ESAO2S.js';import'../../../chunk-7QBIZCJ4.js';import'../../../chunk-JXCLRKQ7.js';import'../../../chunk-LV3TULSI.js';import'../../../chunk-CRZ7EUYR.js';import'../../../chunk-JC6YMVID.js';import'../../../chunk-J2JPTKU6.js';import'../../../chunk-FSKBLPGE.js';import'../../../chunk-MJEG3K4V.js';import'../../../chunk-RIL6QABY.js';import'../../../chunk-KMAH6636.js';function p(u){let s=new d(u);return {GET:async r=>{try{let{searchParams:e}=new URL(r.url),o=e.get("hub.mode"),n=e.get("hub.verify_token"),a=e.get("hub.challenge"),t=await s.processVerification(o,n,a);return new Response(t.body,{status:t.status,headers:t.headers})}catch(e){return console.error("Webhook verification error:",e),new Response("Internal Server Error",{status:500})}},POST:async r=>{try{let e=await s.processWebhook(r);return new Response(e.body,{status:e.status,headers:e.headers})}catch(e){return console.error("Webhook processing error:",e),new Response("Internal Server Error",{status:500})}},webhook:{GET:async r=>{try{let{searchParams:e}=new URL(r.url),o=e.get("hub.mode"),n=e.get("hub.verify_token"),a=e.get("hub.challenge"),t=await s.processVerification(o,n,a);return new Response(t.body,{status:t.status,headers:t.headers})}catch(e){return console.error("Webhook verification error:",e),new Response("Internal Server Error",{status:500})}},POST:async r=>{try{let e=await s.processWebhook(r);return new Response(e.body,{status:e.status,headers:e.headers})}catch(e){return console.error("Webhook processing error:",e),new Response("Internal Server Error",{status:500})}}},flow:{GET:async r=>{try{let e=await s.processFlow(r);return Response.json(e.body,{status:e.status,headers:e.headers})}catch(e){return console.error("Flow GET error:",e),new Response("Internal Server Error",{status:500})}},POST:async r=>{try{let e=await s.processFlow(r);return Response.json(e.body,{status:e.status,headers:e.headers})}catch(e){return console.error("Flow POST error:",e),new Response("Internal Server Error",{status:500})}}},processor:s}}export{p as webhookHandler};//# sourceMappingURL=nextjs-app.js.map
2
2
  //# sourceMappingURL=nextjs-app.js.map
@@ -1,25 +1,26 @@
1
1
  import { a as BaseRequest, b as BaseResponse, B as BaseWebhookConfig } from '../../../handler-DbySwF0E.js';
2
- import { c as WebhookProcessor } from '../../../WebhookProcessor-BXYunz4N.js';
2
+ import { c as WebhookProcessor } from '../../../WebhookProcessor-C3oUXCBl.js';
3
3
  import '../../../types/config.js';
4
- import '../../../enums-BZd9T2ul.js';
5
- import '../../../common-lV0NsO7t.js';
6
- import '../../../request-vYMaEfk5.js';
7
- import '../../../WhatsApp-pTZPQm81.js';
8
- import '../../../httpsClient-v4gmltzS.js';
4
+ import '../../../enums-DIimUG6s.js';
5
+ import '../../../common-B8kp4RdL.js';
6
+ import '../../../request-CUjrMn8R.js';
7
+ import 'http';
8
+ import '../../../WhatsApp-BG0rDhMn.js';
9
+ import '../../../httpsClient-Cbd2Y6mg.js';
9
10
  import 'https';
10
- import '../../../EncryptionApi-D7pt-OXT.js';
11
- import '../../../base-CdGDdVEl.js';
12
- import '../../../FlowApi-B2ffO-HD.js';
13
- import '../../../MediaApi-BrEKpqi_.js';
14
- import '../../../MessageApi-BgsSpDno.js';
15
- import '../../../common-BiRA_uz3.js';
16
- import '../../../PhoneNumberApi-DKlu9PHl.js';
17
- import '../../../BusinessProfileApi-WXscSgo-.js';
18
- import '../../../QrCodeApi-7vDwIBHR.js';
19
- import '../../../RegistrationApi-qO_qoti9.js';
20
- import '../../../TemplateApi-xGgIZt89.js';
21
- import '../../../TwoStepVerificationApi-DfNPIz-C.js';
22
- import '../../../WabaApi-DqQi_68m.js';
11
+ import '../../../EncryptionApi-CcCfeK2b.js';
12
+ import '../../../base-BV6DyzGS.js';
13
+ import '../../../FlowApi-DDHrFT_Q.js';
14
+ import '../../../MediaApi-CY9RVo7u.js';
15
+ import '../../../MessageApi-CX_jN8da.js';
16
+ import '../../../common-CGbls9Y8.js';
17
+ import '../../../PhoneNumberApi-B-hY7g1M.js';
18
+ import '../../../BusinessProfileApi-C_sEOrWM.js';
19
+ import '../../../QrCodeApi-DRICKN04.js';
20
+ import '../../../RegistrationApi-CFPzU1Vw.js';
21
+ import '../../../TemplateApi-D9Q_7cf3.js';
22
+ import '../../../TwoStepVerificationApi-C0jpAKfu.js';
23
+ import '../../../WabaApi-BfvpkpFr.js';
23
24
 
24
25
  interface BaseApiRequest extends BaseRequest {
25
26
  method?: string;
@@ -1,2 +1,2 @@
1
- export{a as webhookHandler}from'../../../chunk-GM63NGNV.js';import'../../../chunk-5577QQ7V.js';import'../../../chunk-U5FBZ6UB.js';import'../../../chunk-6DFC5L3X.js';import'../../../chunk-BAOZ4U74.js';import'../../../chunk-FKXSL2JK.js';import'../../../chunk-AMHQGG6Z.js';import'../../../chunk-VHAODWCN.js';import'../../../chunk-JPAV644F.js';import'../../../chunk-PHPQ5HP3.js';import'../../../chunk-IYSR44P6.js';import'../../../chunk-SNNRWNGZ.js';import'../../../chunk-L4ESAO2S.js';import'../../../chunk-7QBIZCJ4.js';import'../../../chunk-JXCLRKQ7.js';import'../../../chunk-LV3TULSI.js';import'../../../chunk-CRZ7EUYR.js';import'../../../chunk-JC6YMVID.js';import'../../../chunk-NLF2JGYY.js';import'../../../chunk-FSKBLPGE.js';import'../../../chunk-MJEG3K4V.js';import'../../../chunk-RIL6QABY.js';import'../../../chunk-KMAH6636.js';//# sourceMappingURL=nextjs.js.map
1
+ export{a as webhookHandler}from'../../../chunk-GM63NGNV.js';import'../../../chunk-5577QQ7V.js';import'../../../chunk-U5FBZ6UB.js';import'../../../chunk-6DFC5L3X.js';import'../../../chunk-BAOZ4U74.js';import'../../../chunk-FKXSL2JK.js';import'../../../chunk-AMHQGG6Z.js';import'../../../chunk-VHAODWCN.js';import'../../../chunk-JPAV644F.js';import'../../../chunk-PHPQ5HP3.js';import'../../../chunk-IYSR44P6.js';import'../../../chunk-SNNRWNGZ.js';import'../../../chunk-L4ESAO2S.js';import'../../../chunk-7QBIZCJ4.js';import'../../../chunk-JXCLRKQ7.js';import'../../../chunk-LV3TULSI.js';import'../../../chunk-CRZ7EUYR.js';import'../../../chunk-JC6YMVID.js';import'../../../chunk-J2JPTKU6.js';import'../../../chunk-FSKBLPGE.js';import'../../../chunk-MJEG3K4V.js';import'../../../chunk-RIL6QABY.js';import'../../../chunk-KMAH6636.js';//# sourceMappingURL=nextjs.js.map
2
2
  //# sourceMappingURL=nextjs.js.map
@@ -1,27 +1,28 @@
1
1
  export { ExpressRequest, ExpressResponse, webhookHandler as ExpressWebhook, ExpressWebhookConfig, NextFunction } from './frameworks/express.js';
2
2
  export { webhookHandler as NextJsWebhook, NextJsWebhookConfig } from './frameworks/nextjs.js';
3
- export { F as FlowHandler, e as MessageHandler, M as MessageStatus, W as WebhookContact, a as WebhookEvent, b as WebhookMessage, c as WebhookProcessor, d as WebhookResponse, g as constructFullUrl, f as processFlowRequest, p as processWebhookMessages } from '../../WebhookProcessor-BXYunz4N.js';
3
+ export { F as FlowHandler, e as MessageHandler, M as MessageStatus, W as WebhookContact, a as WebhookEvent, b as WebhookMessage, c as WebhookProcessor, d as WebhookResponse, g as constructFullUrl, f as processFlowRequest, p as processWebhookMessages } from '../../WebhookProcessor-C3oUXCBl.js';
4
4
  import '../../handler-DbySwF0E.js';
5
5
  import '../../types/config.js';
6
- import '../../enums-BZd9T2ul.js';
7
- import '../../common-lV0NsO7t.js';
8
- import '../../request-vYMaEfk5.js';
9
- import '../../WhatsApp-pTZPQm81.js';
10
- import '../../httpsClient-v4gmltzS.js';
6
+ import '../../enums-DIimUG6s.js';
7
+ import '../../common-B8kp4RdL.js';
8
+ import '../../request-CUjrMn8R.js';
9
+ import 'http';
10
+ import '../../WhatsApp-BG0rDhMn.js';
11
+ import '../../httpsClient-Cbd2Y6mg.js';
11
12
  import 'https';
12
- import '../../EncryptionApi-D7pt-OXT.js';
13
- import '../../base-CdGDdVEl.js';
14
- import '../../FlowApi-B2ffO-HD.js';
15
- import '../../MediaApi-BrEKpqi_.js';
16
- import '../../MessageApi-BgsSpDno.js';
17
- import '../../common-BiRA_uz3.js';
18
- import '../../PhoneNumberApi-DKlu9PHl.js';
19
- import '../../BusinessProfileApi-WXscSgo-.js';
20
- import '../../QrCodeApi-7vDwIBHR.js';
21
- import '../../RegistrationApi-qO_qoti9.js';
22
- import '../../TemplateApi-xGgIZt89.js';
23
- import '../../TwoStepVerificationApi-DfNPIz-C.js';
24
- import '../../WabaApi-DqQi_68m.js';
13
+ import '../../EncryptionApi-CcCfeK2b.js';
14
+ import '../../base-BV6DyzGS.js';
15
+ import '../../FlowApi-DDHrFT_Q.js';
16
+ import '../../MediaApi-CY9RVo7u.js';
17
+ import '../../MessageApi-CX_jN8da.js';
18
+ import '../../common-CGbls9Y8.js';
19
+ import '../../PhoneNumberApi-B-hY7g1M.js';
20
+ import '../../BusinessProfileApi-C_sEOrWM.js';
21
+ import '../../QrCodeApi-DRICKN04.js';
22
+ import '../../RegistrationApi-CFPzU1Vw.js';
23
+ import '../../TemplateApi-D9Q_7cf3.js';
24
+ import '../../TwoStepVerificationApi-C0jpAKfu.js';
25
+ import '../../WabaApi-BfvpkpFr.js';
25
26
 
26
27
  declare const generateXHub256Sig: (body: string, appSecret: string) => string;
27
28
 
@@ -1,2 +1,2 @@
1
- export{a as generateXHub256Sig}from'../../chunk-RWCVPWRC.js';export{a as ExpressWebhook}from'../../chunk-ZMNXRMWK.js';export{a as NextJsWebhook}from'../../chunk-GM63NGNV.js';import'../../chunk-5577QQ7V.js';export{d as WebhookProcessor,c as constructFullUrl,b as processFlowRequest,a as processWebhookMessages}from'../../chunk-U5FBZ6UB.js';import'../../chunk-6DFC5L3X.js';import'../../chunk-BAOZ4U74.js';import'../../chunk-FKXSL2JK.js';import'../../chunk-AMHQGG6Z.js';import'../../chunk-VHAODWCN.js';import'../../chunk-JPAV644F.js';import'../../chunk-PHPQ5HP3.js';import'../../chunk-IYSR44P6.js';import'../../chunk-SNNRWNGZ.js';import'../../chunk-L4ESAO2S.js';import'../../chunk-7QBIZCJ4.js';import'../../chunk-JXCLRKQ7.js';import'../../chunk-LV3TULSI.js';import'../../chunk-CRZ7EUYR.js';import'../../chunk-JC6YMVID.js';import'../../chunk-NLF2JGYY.js';import'../../chunk-FSKBLPGE.js';import'../../chunk-MJEG3K4V.js';import'../../chunk-RIL6QABY.js';import'../../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
1
+ export{a as generateXHub256Sig}from'../../chunk-RWCVPWRC.js';export{a as ExpressWebhook}from'../../chunk-ZMNXRMWK.js';export{a as NextJsWebhook}from'../../chunk-GM63NGNV.js';import'../../chunk-5577QQ7V.js';export{d as WebhookProcessor,c as constructFullUrl,b as processFlowRequest,a as processWebhookMessages}from'../../chunk-U5FBZ6UB.js';import'../../chunk-6DFC5L3X.js';import'../../chunk-BAOZ4U74.js';import'../../chunk-FKXSL2JK.js';import'../../chunk-AMHQGG6Z.js';import'../../chunk-VHAODWCN.js';import'../../chunk-JPAV644F.js';import'../../chunk-PHPQ5HP3.js';import'../../chunk-IYSR44P6.js';import'../../chunk-SNNRWNGZ.js';import'../../chunk-L4ESAO2S.js';import'../../chunk-7QBIZCJ4.js';import'../../chunk-JXCLRKQ7.js';import'../../chunk-LV3TULSI.js';import'../../chunk-CRZ7EUYR.js';import'../../chunk-JC6YMVID.js';import'../../chunk-J2JPTKU6.js';import'../../chunk-FSKBLPGE.js';import'../../chunk-MJEG3K4V.js';import'../../chunk-RIL6QABY.js';import'../../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map