meta-cloud-api 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{BusinessProfileApi-WXscSgo-.d.ts → BusinessProfileApi-CW0emncx.d.ts} +1 -1
  2. package/dist/{EncryptionApi-D7pt-OXT.d.ts → EncryptionApi-Dyea0SR3.d.ts} +1 -1
  3. package/dist/{FlowApi-B2ffO-HD.d.ts → FlowApi-DvoT7ivY.d.ts} +1 -1
  4. package/dist/{MessageApi-BgsSpDno.d.ts → MessageApi-D-9SuL4w.d.ts} +1 -1
  5. package/dist/{TemplateApi-xGgIZt89.d.ts → TemplateApi-D4_6LvhN.d.ts} +1 -1
  6. package/dist/{WabaApi-DqQi_68m.d.ts → WabaApi-BvY1JVRH.d.ts} +1 -1
  7. package/dist/{WebhookProcessor-BXYunz4N.d.ts → WebhookProcessor-CE4xBPe0.d.ts} +2 -2
  8. package/dist/{WhatsApp-pTZPQm81.d.ts → WhatsApp-iAly_4pr.d.ts} +6 -6
  9. package/dist/api/encryption/index.d.ts +2 -2
  10. package/dist/api/flow/index.d.ts +3 -2
  11. package/dist/api/flow/index.js +1 -1
  12. package/dist/api/index.d.ts +9 -8
  13. package/dist/api/index.js +1 -1
  14. package/dist/api/messages/builders/index.d.ts +1 -1
  15. package/dist/api/messages/index.d.ts +2 -2
  16. package/dist/api/profile/index.d.ts +2 -2
  17. package/dist/api/template/index.d.ts +6 -200
  18. package/dist/api/waba/index.d.ts +2 -2
  19. package/dist/chunk-J2JPTKU6.js +2 -0
  20. package/dist/chunk-J2JPTKU6.js.map +1 -0
  21. package/dist/{common-BiRA_uz3.d.ts → common-CzzMWFoO.d.ts} +1 -1
  22. package/dist/{common-lV0NsO7t.d.ts → common-nVoO5ROn.d.ts} +28 -1
  23. package/dist/core/webhook/frameworks/express.d.ts +11 -10
  24. package/dist/core/webhook/frameworks/express.js +1 -1
  25. package/dist/core/webhook/frameworks/nextjs-app.d.ts +11 -10
  26. package/dist/core/webhook/frameworks/nextjs-app.js +1 -1
  27. package/dist/core/webhook/frameworks/nextjs.d.ts +11 -10
  28. package/dist/core/webhook/frameworks/nextjs.js +1 -1
  29. package/dist/core/webhook/index.d.ts +11 -10
  30. package/dist/core/webhook/index.js +1 -1
  31. package/dist/core/whatsapp/index.d.ts +10 -9
  32. package/dist/core/whatsapp/index.js +1 -1
  33. package/dist/factory-D2eO5etK.d.ts +200 -0
  34. package/dist/index.d.ts +19 -17
  35. package/dist/index.js +1 -1
  36. package/dist/{isMetaError-CXWJwW58.d.ts → isMetaError-CLqzdSws.d.ts} +1 -1
  37. package/dist/utils/index.d.ts +3 -2
  38. package/dist/utils/index.js +1 -1
  39. package/package.json +20 -17
  40. package/dist/chunk-NLF2JGYY.js +0 -2
  41. package/dist/chunk-NLF2JGYY.js.map +0 -1
@@ -350,4 +350,4 @@ declare class BusinessProfileApi extends BaseAPI implements BusinessProfileClass
350
350
  getUploadHandle(uploadId: string): Promise<UploadHandle>;
351
351
  }
352
352
 
353
- export { BusinessProfileApi as B, type CreateUploadSessionParams as C, type GetUploadHandleParams as G, type UpdateBusinessProfileRequest as U, BusinessProfileClass as a, type BusinessProfileData as b, type BusinessProfileField as c, type BusinessProfileFieldsParam as d, type BusinessProfileResponse as e, type UploadBusinessProfileResponse as f, type UploadHandle as g, type UploadMediaParams as h, type UploadSession as i, type UploadSessionResponse as j };
353
+ export { BusinessProfileApi as B, type CreateUploadSessionParams as C, type GetUploadHandleParams as G, type UpdateBusinessProfileRequest as U, type BusinessProfileData as a, type BusinessProfileResponse as b, type BusinessProfileField as c, type BusinessProfileFieldsParam as d, BusinessProfileClass as e, type UploadBusinessProfileResponse as f, type UploadHandle as g, type UploadMediaParams as h, type UploadSession as i, type UploadSessionResponse as j };
@@ -19,4 +19,4 @@ declare class EncryptionApi extends BaseAPI implements EncryptionClass {
19
19
  setEncryptionPublicKey(businessPublicKey: string): Promise<ResponseSuccess>;
20
20
  }
21
21
 
22
- export { EncryptionApi as E, type EncryptionClass as a, type EncryptionPublicKeyResponse as b };
22
+ export { EncryptionApi as E, type EncryptionPublicKeyResponse as a, type EncryptionClass as b };
@@ -1,7 +1,7 @@
1
1
  import { B as BaseAPI } from './base-CdGDdVEl.js';
2
2
  import { WabaConfigType } from './types/config.js';
3
3
  import { R as RequesterClass, e as ResponseSuccess } from './request-vYMaEfk5.js';
4
- import { h as FlowClass, k as FlowsListResponse, g as FlowCategoryEnum, C as CreateFlowResponse, c as Flow, j as FlowPreviewResponse, f as FlowAssetsResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse, i as FlowMigrationResponse } from './common-lV0NsO7t.js';
4
+ import { g as FlowClass, x as FlowsListResponse, b as FlowCategoryEnum, D as CreateFlowResponse, d as Flow, w as FlowPreviewResponse, f as FlowAssetsResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse, u as FlowMigrationResponse } from './common-nVoO5ROn.js';
5
5
 
6
6
  /**
7
7
  * API for managing WhatsApp Flows.
@@ -2,7 +2,7 @@ import { B as BaseAPI } from './base-CdGDdVEl.js';
2
2
  import { WabaConfigType } from './types/config.js';
3
3
  import { M as MessageTypesEnum, C as ComponentTypesEnum, I as InteractiveTypesEnum } from './enums-BZd9T2ul.js';
4
4
  import { R as RequesterClass } from './request-vYMaEfk5.js';
5
- import { f as MessagesClass, A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, c as MessageTemplateObject, d as StickerMediaObject, e as TextObject, V as VideoMediaObject, g as MessageRequestBody, M as MessageRequestParams, b as MessagesResponse, T as TextMessageParams, S as StatusParams, R as ReactionParams } from './common-BiRA_uz3.js';
5
+ import { b as MessagesClass, A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, f as InteractiveObject, L as LocationObject, g as MessageTemplateObject, e as StickerMediaObject, d as TextObject, V as VideoMediaObject, M as MessageRequestBody, a as MessageRequestParams, c as MessagesResponse, T as TextMessageParams, S as StatusParams, R as ReactionParams } from './common-CzzMWFoO.js';
6
6
 
7
7
  /**
8
8
  * Maps each message type to its appropriate payload type
@@ -158,4 +158,4 @@ declare class TemplateApi extends BaseAPI implements TemplateClass {
158
158
  deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;
159
159
  }
160
160
 
161
- export { type CatalogButton as C, type FlowButton as F, type MPMButton as M, type OTPButton as O, type PhoneNumberButton as P, type QuickReplyButton as Q, type SPMButton as S, TemplateApi as T, type URLButton as U, TemplateClass as a, type TemplateDeleteParams as b, type TemplateGetParams as c, type TemplateRequestBody as d, type TemplateResponse as e, type TemplateFormat as f, type ComponentTypes as g, type CopyCodeButton as h, type TemplateBody as i, type TemplateButton as j, type TemplateButtons as k, type TemplateCarousel as l, type TemplateFooter as m, type TemplateHeader as n, type TemplateHeaderExample as o, type TemplateLimitedTimeOffer as p, type MediaCarouselCard as q, type ProductCarouselCard as r };
161
+ export { type CatalogButton as C, type FlowButton as F, type MPMButton as M, type OTPButton as O, type PhoneNumberButton as P, type QuickReplyButton as Q, type SPMButton as S, TemplateApi as T, type URLButton as U, type ComponentTypes as a, type CopyCodeButton as b, type TemplateBody as c, type TemplateButton as d, type TemplateButtons as e, type TemplateCarousel as f, TemplateClass as g, type TemplateDeleteParams as h, type TemplateFooter as i, type TemplateFormat as j, type TemplateGetParams as k, type TemplateHeader as l, type TemplateHeaderExample as m, type TemplateLimitedTimeOffer as n, type TemplateRequestBody as o, type TemplateResponse as p, type MediaCarouselCard as q, type ProductCarouselCard as r };
@@ -172,4 +172,4 @@ declare class WabaApi extends BaseAPI implements WABAClass {
172
172
  unsubscribeFromWaba(): Promise<ResponseSuccess>;
173
173
  }
174
174
 
175
- export { type UpdateWabaSubscription as U, WabaApi as W, type WabaAccount as a, type WABAClass as b, type WabaSubscriptions as c };
175
+ export { type UpdateWabaSubscription as U, WabaApi as W, type WabaAccount as a, type WABAClass as b, type WabaSubscription as c, type WabaSubscriptions as d };
@@ -1,7 +1,7 @@
1
- import { a as FlowEndpointRequest, F as FlowTypeEnum } from './common-lV0NsO7t.js';
1
+ import { l as FlowEndpointRequest, F as FlowTypeEnum } from './common-nVoO5ROn.js';
2
2
  import { WabaConfigType, WhatsAppConfig } from './types/config.js';
3
3
  import { M as MessageTypesEnum } from './enums-BZd9T2ul.js';
4
- import { W as WhatsApp } from './WhatsApp-pTZPQm81.js';
4
+ import { W as WhatsApp } from './WhatsApp-iAly_4pr.js';
5
5
 
6
6
  interface WebhookContact {
7
7
  /**
@@ -3,17 +3,17 @@ import { H as HttpMethodsEnum, l as SDKEnums } from './enums-BZd9T2ul.js';
3
3
  import { R as RequesterClass } from './request-vYMaEfk5.js';
4
4
  import { H as HttpsClientClass, a as HttpsClientResponseClass } from './httpsClient-v4gmltzS.js';
5
5
  import { Agent } from 'https';
6
- import { E as EncryptionApi } from './EncryptionApi-D7pt-OXT.js';
7
- import { F as FlowApi } from './FlowApi-B2ffO-HD.js';
6
+ import { E as EncryptionApi } from './EncryptionApi-Dyea0SR3.js';
7
+ import { F as FlowApi } from './FlowApi-DvoT7ivY.js';
8
8
  import { M as MediaApi } from './MediaApi-BrEKpqi_.js';
9
- import { M as MessagesApi } from './MessageApi-BgsSpDno.js';
9
+ import { M as MessagesApi } from './MessageApi-D-9SuL4w.js';
10
10
  import { P as PhoneNumberApi } from './PhoneNumberApi-DKlu9PHl.js';
11
- import { B as BusinessProfileApi } from './BusinessProfileApi-WXscSgo-.js';
11
+ import { B as BusinessProfileApi } from './BusinessProfileApi-CW0emncx.js';
12
12
  import { Q as QrCodeApi } from './QrCodeApi-7vDwIBHR.js';
13
13
  import { R as RegistrationApi } from './RegistrationApi-qO_qoti9.js';
14
- import { T as TemplateApi } from './TemplateApi-xGgIZt89.js';
14
+ import { T as TemplateApi } from './TemplateApi-D4_6LvhN.js';
15
15
  import { T as TwoStepVerificationApi } from './TwoStepVerificationApi-DfNPIz-C.js';
16
- import { W as WabaApi } from './WabaApi-DqQi_68m.js';
16
+ import { W as WabaApi } from './WabaApi-BvY1JVRH.js';
17
17
 
18
18
  declare class HttpsClient implements HttpsClientClass {
19
19
  agent: Agent;
@@ -1,5 +1,5 @@
1
- import { E as EncryptionApi } from '../../EncryptionApi-D7pt-OXT.js';
2
- export { a as EncryptionClass, b as EncryptionPublicKeyResponse } from '../../EncryptionApi-D7pt-OXT.js';
1
+ import { E as EncryptionApi } from '../../EncryptionApi-Dyea0SR3.js';
2
+ export { b as EncryptionClass, a as EncryptionPublicKeyResponse } from '../../EncryptionApi-Dyea0SR3.js';
3
3
  import '../../base-CdGDdVEl.js';
4
4
  import '../../types/config.js';
5
5
  import '../../enums-BZd9T2ul.js';
@@ -1,9 +1,10 @@
1
- import { F as FlowApi } from '../../FlowApi-B2ffO-HD.js';
2
- export { C as CreateFlowResponse, c as Flow, e as FlowActionEnum, f as FlowAssetsResponse, g as FlowCategoryEnum, h as FlowClass, a as FlowEndpointRequest, b as FlowEndpointResponse, i as FlowMigrationResponse, j as FlowPreviewResponse, l as FlowStatusEnum, d as FlowType, F as FlowTypeEnum, m as FlowValidationError, k as FlowsListResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from '../../common-lV0NsO7t.js';
1
+ import { F as FlowApi } from '../../FlowApi-DvoT7ivY.js';
2
+ export { D as CreateFlowResponse, d as Flow, a as FlowActionEnum, f as FlowAssetsResponse, b as FlowCategoryEnum, g as FlowClass, l as FlowEndpointRequest, m as FlowEndpointResponse, u as FlowMigrationResponse, w as FlowPreviewResponse, c as FlowStatusEnum, z as FlowType, F as FlowTypeEnum, A as FlowValidationError, x as FlowsListResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from '../../common-nVoO5ROn.js';
3
3
  import '../../base-CdGDdVEl.js';
4
4
  import '../../types/config.js';
5
5
  import '../../enums-BZd9T2ul.js';
6
6
  import '../../request-vYMaEfk5.js';
7
+ import 'http';
7
8
 
8
9
 
9
10
 
@@ -1,2 +1,2 @@
1
- export{a as FlowApi,b as default}from'../../chunk-JC6YMVID.js';export{a as FlowTypeEnum}from'../../chunk-NLF2JGYY.js';import'../../chunk-RIL6QABY.js';import'../../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
1
+ export{a as FlowApi,b as default}from'../../chunk-JC6YMVID.js';export{d as FlowTypeEnum}from'../../chunk-J2JPTKU6.js';import'../../chunk-RIL6QABY.js';import'../../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1,17 +1,18 @@
1
- export { E as EncryptionApi, a as EncryptionClass, b as EncryptionPublicKeyResponse } from '../EncryptionApi-D7pt-OXT.js';
2
- export { F as FlowApi } from '../FlowApi-B2ffO-HD.js';
3
- export { C as CreateFlowResponse, c as Flow, e as FlowActionEnum, f as FlowAssetsResponse, g as FlowCategoryEnum, h as FlowClass, a as FlowEndpointRequest, b as FlowEndpointResponse, i as FlowMigrationResponse, j as FlowPreviewResponse, l as FlowStatusEnum, d as FlowType, F as FlowTypeEnum, m as FlowValidationError, k as FlowsListResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from '../common-lV0NsO7t.js';
1
+ export { E as EncryptionApi, b as EncryptionClass, a as EncryptionPublicKeyResponse } from '../EncryptionApi-Dyea0SR3.js';
2
+ export { F as FlowApi } from '../FlowApi-DvoT7ivY.js';
3
+ export { D as CreateFlowResponse, d as Flow, a as FlowActionEnum, f as FlowAssetsResponse, b as FlowCategoryEnum, g as FlowClass, l as FlowEndpointRequest, m as FlowEndpointResponse, u as FlowMigrationResponse, w as FlowPreviewResponse, c as FlowStatusEnum, z as FlowType, F as FlowTypeEnum, A as FlowValidationError, x as FlowsListResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from '../common-nVoO5ROn.js';
4
4
  export { M as MediaApi, a as MediaClass, b as MediaResponse, c as MediasResponse, U as UploadMediaResponse } from '../MediaApi-BrEKpqi_.js';
5
- export { M as MessagesApi } from '../MessageApi-BgsSpDno.js';
6
- export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, M as MessageRequestParams, c as MessageTemplateObject, b as MessagesResponse, R as ReactionParams, S as StatusParams, d as StickerMediaObject, T as TextMessageParams, e as TextObject, V as VideoMediaObject } from '../common-BiRA_uz3.js';
5
+ export { M as MessagesApi } from '../MessageApi-D-9SuL4w.js';
6
+ export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, f as InteractiveObject, L as LocationObject, a as MessageRequestParams, g as MessageTemplateObject, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, d as TextObject, V as VideoMediaObject } from '../common-CzzMWFoO.js';
7
7
  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-DKlu9PHl.js';
8
- export { B as BusinessProfileApi, a as BusinessProfileClass, b as BusinessProfileData, c as BusinessProfileField, d as BusinessProfileFieldsParam, e as BusinessProfileResponse, C as CreateUploadSessionParams, G as GetUploadHandleParams, U as UpdateBusinessProfileRequest, f as UploadBusinessProfileResponse, g as UploadHandle, h as UploadMediaParams, i as UploadSession, j as UploadSessionResponse } from '../BusinessProfileApi-WXscSgo-.js';
8
+ export { B as BusinessProfileApi, e as BusinessProfileClass, a as BusinessProfileData, c as BusinessProfileField, d as BusinessProfileFieldsParam, b as BusinessProfileResponse, C as CreateUploadSessionParams, G as GetUploadHandleParams, U as UpdateBusinessProfileRequest, f as UploadBusinessProfileResponse, g as UploadHandle, h as UploadMediaParams, i as UploadSession, j as UploadSessionResponse } from '../BusinessProfileApi-CW0emncx.js';
9
9
  export { C as CreateQrCodeRequest, Q as QrCodeApi, a as QrCodeClass, b as QrCodeResponse, c as QrCodesResponse, U as UpdateQrCodeRequest } from '../QrCodeApi-7vDwIBHR.js';
10
10
  export { R as RegistrationApi, a as RegistrationClass, b as RegistrationRequest } from '../RegistrationApi-qO_qoti9.js';
11
- export { T as TemplateApi, a as TemplateClass, b as TemplateDeleteParams, c as TemplateGetParams, d as TemplateRequestBody, e as TemplateResponse } from '../TemplateApi-xGgIZt89.js';
11
+ export { T as TemplateApi, g as TemplateClass, h as TemplateDeleteParams, k as TemplateGetParams, o as TemplateRequestBody, p as TemplateResponse } from '../TemplateApi-D4_6LvhN.js';
12
12
  export { T as TwoStepVerificationApi, a as TwoStepVerificationClass, b as TwoStepVerificationRequest } from '../TwoStepVerificationApi-DfNPIz-C.js';
13
- export { U as UpdateWabaSubscription, b as WABAClass, a as WabaAccount, W as WabaApi, c as WabaSubscriptions } from '../WabaApi-DqQi_68m.js';
13
+ export { U as UpdateWabaSubscription, b as WABAClass, a as WabaAccount, W as WabaApi, d as WabaSubscriptions } from '../WabaApi-BvY1JVRH.js';
14
14
  import '../base-CdGDdVEl.js';
15
15
  import '../types/config.js';
16
16
  import '../enums-BZd9T2ul.js';
17
17
  import '../request-vYMaEfk5.js';
18
+ import 'http';
package/dist/api/index.js CHANGED
@@ -1,2 +1,2 @@
1
- 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';import'../chunk-NLF2JGYY.js';export{b as PhoneNumberApi}from'../chunk-FSKBLPGE.js';import'../chunk-MJEG3K4V.js';import'../chunk-RIL6QABY.js';import'../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
1
+ 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';import'../chunk-J2JPTKU6.js';export{b as PhoneNumberApi}from'../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
@@ -1,4 +1,4 @@
1
- import { N as NameObject, h as AddressesObject, C as ContactObject, a as InteractiveObject, L as LocationObject, A as AudioMediaObject, D as DocumentMediaObject, I as ImageMediaObject, V as VideoMediaObject, d as StickerMediaObject, c as MessageTemplateObject, e as TextObject } from '../../../common-BiRA_uz3.js';
1
+ import { N as NameObject, h as AddressesObject, C as ContactObject, f as InteractiveObject, L as LocationObject, A as AudioMediaObject, D as DocumentMediaObject, I as ImageMediaObject, V as VideoMediaObject, e as StickerMediaObject, g as MessageTemplateObject, d as TextObject } from '../../../common-CzzMWFoO.js';
2
2
  import { I as InteractiveTypesEnum, P as ParametersTypesEnum, i as CurrencyCodesEnum, C as ComponentTypesEnum } from '../../../enums-BZd9T2ul.js';
3
3
  import '../../../base-CdGDdVEl.js';
4
4
  import '../../../types/config.js';
@@ -1,5 +1,5 @@
1
- import { M as MessagesApi } from '../../MessageApi-BgsSpDno.js';
2
- export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, M as MessageRequestParams, c as MessageTemplateObject, b as MessagesResponse, R as ReactionParams, S as StatusParams, d as StickerMediaObject, T as TextMessageParams, e as TextObject, V as VideoMediaObject } from '../../common-BiRA_uz3.js';
1
+ import { M as MessagesApi } from '../../MessageApi-D-9SuL4w.js';
2
+ export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, f as InteractiveObject, L as LocationObject, a as MessageRequestParams, g as MessageTemplateObject, c as MessagesResponse, R as ReactionParams, S as StatusParams, e as StickerMediaObject, T as TextMessageParams, d as TextObject, V as VideoMediaObject } from '../../common-CzzMWFoO.js';
3
3
  import '../../base-CdGDdVEl.js';
4
4
  import '../../types/config.js';
5
5
  import '../../enums-BZd9T2ul.js';
@@ -1,5 +1,5 @@
1
- import { B as BusinessProfileApi } from '../../BusinessProfileApi-WXscSgo-.js';
2
- export { a as BusinessProfileClass, b as BusinessProfileData, c as BusinessProfileField, d as BusinessProfileFieldsParam, e as BusinessProfileResponse, C as CreateUploadSessionParams, G as GetUploadHandleParams, U as UpdateBusinessProfileRequest, f as UploadBusinessProfileResponse, g as UploadHandle, h as UploadMediaParams, i as UploadSession, j as UploadSessionResponse } from '../../BusinessProfileApi-WXscSgo-.js';
1
+ import { B as BusinessProfileApi } from '../../BusinessProfileApi-CW0emncx.js';
2
+ export { e as BusinessProfileClass, a as BusinessProfileData, c as BusinessProfileField, d as BusinessProfileFieldsParam, b as BusinessProfileResponse, C as CreateUploadSessionParams, G as GetUploadHandleParams, U as UpdateBusinessProfileRequest, f as UploadBusinessProfileResponse, g as UploadHandle, h as UploadMediaParams, i as UploadSession, j as UploadSessionResponse } from '../../BusinessProfileApi-CW0emncx.js';
3
3
  import '../../base-CdGDdVEl.js';
4
4
  import '../../types/config.js';
5
5
  import '../../enums-BZd9T2ul.js';
@@ -1,206 +1,12 @@
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';
1
+ import { o as TemplateRequestBody } from '../../TemplateApi-D4_6LvhN.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-D4_6LvhN.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-D2eO5etK.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-D2eO5etK.js';
4
5
  import '../../base-CdGDdVEl.js';
5
6
  import '../../types/config.js';
7
+ import '../../enums-BZd9T2ul.js';
6
8
  import '../../request-vYMaEfk5.js';
7
9
 
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
- }
203
-
204
10
  declare function createTemplate(options: TemplateOptions): TemplateRequestBody;
205
11
  declare function createOTPTemplate(options: OTPTemplateOptions): TemplateRequestBody;
206
12
  declare function createAuthenticationTemplate(options: AuthenticationTemplateOptions): 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,5 +1,5 @@
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';
1
+ import { W as WabaApi } from '../../WabaApi-BvY1JVRH.js';
2
+ export { U as UpdateWabaSubscription, b as WABAClass, a as WabaAccount, d as WabaSubscriptions } from '../../WabaApi-BvY1JVRH.js';
3
3
  import '../../base-CdGDdVEl.js';
4
4
  import '../../types/config.js';
5
5
  import '../../enums-BZd9T2ul.js';
@@ -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"]}
@@ -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,4 +1,5 @@
1
1
  import { e as ResponseSuccess } from './request-vYMaEfk5.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,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-CE4xBPe0.js';
3
3
  import '../../../types/config.js';
4
4
  import '../../../enums-BZd9T2ul.js';
5
- import '../../../common-lV0NsO7t.js';
5
+ import '../../../common-nVoO5ROn.js';
6
6
  import '../../../request-vYMaEfk5.js';
7
- import '../../../WhatsApp-pTZPQm81.js';
7
+ import 'http';
8
+ import '../../../WhatsApp-iAly_4pr.js';
8
9
  import '../../../httpsClient-v4gmltzS.js';
9
10
  import 'https';
10
- import '../../../EncryptionApi-D7pt-OXT.js';
11
+ import '../../../EncryptionApi-Dyea0SR3.js';
11
12
  import '../../../base-CdGDdVEl.js';
12
- import '../../../FlowApi-B2ffO-HD.js';
13
+ import '../../../FlowApi-DvoT7ivY.js';
13
14
  import '../../../MediaApi-BrEKpqi_.js';
14
- import '../../../MessageApi-BgsSpDno.js';
15
- import '../../../common-BiRA_uz3.js';
15
+ import '../../../MessageApi-D-9SuL4w.js';
16
+ import '../../../common-CzzMWFoO.js';
16
17
  import '../../../PhoneNumberApi-DKlu9PHl.js';
17
- import '../../../BusinessProfileApi-WXscSgo-.js';
18
+ import '../../../BusinessProfileApi-CW0emncx.js';
18
19
  import '../../../QrCodeApi-7vDwIBHR.js';
19
20
  import '../../../RegistrationApi-qO_qoti9.js';
20
- import '../../../TemplateApi-xGgIZt89.js';
21
+ import '../../../TemplateApi-D4_6LvhN.js';
21
22
  import '../../../TwoStepVerificationApi-DfNPIz-C.js';
22
- import '../../../WabaApi-DqQi_68m.js';
23
+ import '../../../WabaApi-BvY1JVRH.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';
2
+ import { c as WebhookProcessor } from '../../../WebhookProcessor-CE4xBPe0.js';
3
3
  import '../../../enums-BZd9T2ul.js';
4
- import '../../../common-lV0NsO7t.js';
4
+ import '../../../common-nVoO5ROn.js';
5
5
  import '../../../request-vYMaEfk5.js';
6
- import '../../../WhatsApp-pTZPQm81.js';
6
+ import 'http';
7
+ import '../../../WhatsApp-iAly_4pr.js';
7
8
  import '../../../httpsClient-v4gmltzS.js';
8
9
  import 'https';
9
- import '../../../EncryptionApi-D7pt-OXT.js';
10
+ import '../../../EncryptionApi-Dyea0SR3.js';
10
11
  import '../../../base-CdGDdVEl.js';
11
- import '../../../FlowApi-B2ffO-HD.js';
12
+ import '../../../FlowApi-DvoT7ivY.js';
12
13
  import '../../../MediaApi-BrEKpqi_.js';
13
- import '../../../MessageApi-BgsSpDno.js';
14
- import '../../../common-BiRA_uz3.js';
14
+ import '../../../MessageApi-D-9SuL4w.js';
15
+ import '../../../common-CzzMWFoO.js';
15
16
  import '../../../PhoneNumberApi-DKlu9PHl.js';
16
- import '../../../BusinessProfileApi-WXscSgo-.js';
17
+ import '../../../BusinessProfileApi-CW0emncx.js';
17
18
  import '../../../QrCodeApi-7vDwIBHR.js';
18
19
  import '../../../RegistrationApi-qO_qoti9.js';
19
- import '../../../TemplateApi-xGgIZt89.js';
20
+ import '../../../TemplateApi-D4_6LvhN.js';
20
21
  import '../../../TwoStepVerificationApi-DfNPIz-C.js';
21
- import '../../../WabaApi-DqQi_68m.js';
22
+ import '../../../WabaApi-BvY1JVRH.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-CE4xBPe0.js';
3
3
  import '../../../types/config.js';
4
4
  import '../../../enums-BZd9T2ul.js';
5
- import '../../../common-lV0NsO7t.js';
5
+ import '../../../common-nVoO5ROn.js';
6
6
  import '../../../request-vYMaEfk5.js';
7
- import '../../../WhatsApp-pTZPQm81.js';
7
+ import 'http';
8
+ import '../../../WhatsApp-iAly_4pr.js';
8
9
  import '../../../httpsClient-v4gmltzS.js';
9
10
  import 'https';
10
- import '../../../EncryptionApi-D7pt-OXT.js';
11
+ import '../../../EncryptionApi-Dyea0SR3.js';
11
12
  import '../../../base-CdGDdVEl.js';
12
- import '../../../FlowApi-B2ffO-HD.js';
13
+ import '../../../FlowApi-DvoT7ivY.js';
13
14
  import '../../../MediaApi-BrEKpqi_.js';
14
- import '../../../MessageApi-BgsSpDno.js';
15
- import '../../../common-BiRA_uz3.js';
15
+ import '../../../MessageApi-D-9SuL4w.js';
16
+ import '../../../common-CzzMWFoO.js';
16
17
  import '../../../PhoneNumberApi-DKlu9PHl.js';
17
- import '../../../BusinessProfileApi-WXscSgo-.js';
18
+ import '../../../BusinessProfileApi-CW0emncx.js';
18
19
  import '../../../QrCodeApi-7vDwIBHR.js';
19
20
  import '../../../RegistrationApi-qO_qoti9.js';
20
- import '../../../TemplateApi-xGgIZt89.js';
21
+ import '../../../TemplateApi-D4_6LvhN.js';
21
22
  import '../../../TwoStepVerificationApi-DfNPIz-C.js';
22
- import '../../../WabaApi-DqQi_68m.js';
23
+ import '../../../WabaApi-BvY1JVRH.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-CE4xBPe0.js';
4
4
  import '../../handler-DbySwF0E.js';
5
5
  import '../../types/config.js';
6
6
  import '../../enums-BZd9T2ul.js';
7
- import '../../common-lV0NsO7t.js';
7
+ import '../../common-nVoO5ROn.js';
8
8
  import '../../request-vYMaEfk5.js';
9
- import '../../WhatsApp-pTZPQm81.js';
9
+ import 'http';
10
+ import '../../WhatsApp-iAly_4pr.js';
10
11
  import '../../httpsClient-v4gmltzS.js';
11
12
  import 'https';
12
- import '../../EncryptionApi-D7pt-OXT.js';
13
+ import '../../EncryptionApi-Dyea0SR3.js';
13
14
  import '../../base-CdGDdVEl.js';
14
- import '../../FlowApi-B2ffO-HD.js';
15
+ import '../../FlowApi-DvoT7ivY.js';
15
16
  import '../../MediaApi-BrEKpqi_.js';
16
- import '../../MessageApi-BgsSpDno.js';
17
- import '../../common-BiRA_uz3.js';
17
+ import '../../MessageApi-D-9SuL4w.js';
18
+ import '../../common-CzzMWFoO.js';
18
19
  import '../../PhoneNumberApi-DKlu9PHl.js';
19
- import '../../BusinessProfileApi-WXscSgo-.js';
20
+ import '../../BusinessProfileApi-CW0emncx.js';
20
21
  import '../../QrCodeApi-7vDwIBHR.js';
21
22
  import '../../RegistrationApi-qO_qoti9.js';
22
- import '../../TemplateApi-xGgIZt89.js';
23
+ import '../../TemplateApi-D4_6LvhN.js';
23
24
  import '../../TwoStepVerificationApi-DfNPIz-C.js';
24
- import '../../WabaApi-DqQi_68m.js';
25
+ import '../../WabaApi-BvY1JVRH.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
@@ -1,21 +1,22 @@
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-Dyea0SR3.js';
2
+ import { F as FlowApi } from '../../FlowApi-DvoT7ivY.js';
3
3
  import { WhatsAppConfig } from '../../types/config.js';
4
4
  import { M as MediaApi } from '../../MediaApi-BrEKpqi_.js';
5
- import { M as MessagesApi } from '../../MessageApi-BgsSpDno.js';
5
+ import { M as MessagesApi } from '../../MessageApi-D-9SuL4w.js';
6
6
  import { P as PhoneNumberApi } from '../../PhoneNumberApi-DKlu9PHl.js';
7
- import { B as BusinessProfileApi } from '../../BusinessProfileApi-WXscSgo-.js';
7
+ import { B as BusinessProfileApi } from '../../BusinessProfileApi-CW0emncx.js';
8
8
  import { Q as QrCodeApi } from '../../QrCodeApi-7vDwIBHR.js';
9
9
  import { R as RegistrationApi } from '../../RegistrationApi-qO_qoti9.js';
10
- import { T as TemplateApi } from '../../TemplateApi-xGgIZt89.js';
10
+ import { T as TemplateApi } from '../../TemplateApi-D4_6LvhN.js';
11
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';
12
+ import { W as WabaApi } from '../../WabaApi-BvY1JVRH.js';
13
+ export { W as WhatsApp } from '../../WhatsApp-iAly_4pr.js';
14
14
  import '../../base-CdGDdVEl.js';
15
15
  import '../../enums-BZd9T2ul.js';
16
16
  import '../../request-vYMaEfk5.js';
17
- import '../../common-lV0NsO7t.js';
18
- import '../../common-BiRA_uz3.js';
17
+ import '../../common-nVoO5ROn.js';
18
+ import 'http';
19
+ import '../../common-CzzMWFoO.js';
19
20
  import '../../httpsClient-v4gmltzS.js';
20
21
  import 'https';
21
22
 
@@ -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
@@ -0,0 +1,200 @@
1
+ import { L as LanguagesEnum, i as CurrencyCodesEnum, a as CategoryEnum } from './enums-BZd9T2ul.js';
2
+ import { j as TemplateFormat } from './TemplateApi-D4_6LvhN.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 };
package/dist/index.d.ts CHANGED
@@ -1,25 +1,27 @@
1
- export { W as WhatsApp, W as WhatsAppLegacy } from './WhatsApp-pTZPQm81.js';
2
- export { WabaConfigType, WhatsAppConfig } from './types/config.js';
1
+ export { W as WhatsApp, W as WhatsAppLegacy } from './WhatsApp-iAly_4pr.js';
2
+ export { E as EncryptionApi, a as EncryptionPublicKeyResponse } from './EncryptionApi-Dyea0SR3.js';
3
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';
4
+ export { F as FlowApi } from './FlowApi-DvoT7ivY.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-nVoO5ROn.js';
6
+ export { M as MediaApi, a as MediaClass, b as MediaResponse, c as MediasResponse, U as UploadMediaResponse } from './MediaApi-BrEKpqi_.js';
7
+ export { M as MessagesApi } from './MessageApi-D-9SuL4w.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-CzzMWFoO.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-DKlu9PHl.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-CW0emncx.js';
11
+ export { C as CreateQrCodeRequest, Q as QrCodeApi, a as QrCodeClass, b as QrCodeResponse, c as QrCodesResponse, U as UpdateQrCodeRequest } from './QrCodeApi-7vDwIBHR.js';
12
+ export { R as RegistrationApi, a as RegistrationClass, b as RegistrationRequest } from './RegistrationApi-qO_qoti9.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-D4_6LvhN.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-D2eO5etK.js';
15
+ export { T as TwoStepVerificationApi, a as TwoStepVerificationClass, b as TwoStepVerificationRequest } from './TwoStepVerificationApi-DfNPIz-C.js';
16
+ export { U as UpdateWabaSubscription, b as WABAClass, a as WabaAccount, W as WabaApi, c as WabaSubscription, d as WabaSubscriptions } from './WabaApi-BvY1JVRH.js';
17
+ export { W as WebhookContact, a as WebhookEvent, b as WebhookMessage } from './WebhookProcessor-CE4xBPe0.js';
18
+ export { WabaConfigType, WhatsAppConfig } from './types/config.js';
19
+ export { M as MetaError, i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest, c as isMetaError } from './isMetaError-CLqzdSws.js';
14
20
  export { webhookHandler as ExpressWebhook } from './core/webhook/frameworks/express.js';
15
21
  export { webhookHandler as NextJsWebhook } from './core/webhook/frameworks/nextjs.js';
16
22
  import './request-vYMaEfk5.js';
17
23
  import './httpsClient-v4gmltzS.js';
18
24
  import 'https';
19
- import './EncryptionApi-D7pt-OXT.js';
20
25
  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';
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{i as ComponentTypesEnum,f as InteractiveTypesEnum,v as LanguagesEnum,d as MessageTypesEnum,e as ParametersTypesEnum}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-nVoO5ROn.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,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-CLqzdSws.js';
3
3
  import { L as LoggerInterface } from '../logger-BdE0Vyim.js';
4
4
  import '../enums-BZd9T2ul.js';
5
- import '../common-lV0NsO7t.js';
5
+ import '../common-nVoO5ROn.js';
6
6
  import '../request-vYMaEfk5.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.1",
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"]}