meta-cloud-api 1.1.4 → 1.1.6

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 (205) hide show
  1. package/dist/{common-CvPVD1o6.d.ts → api/flow/types/common.d.ts} +2 -2
  2. package/dist/{common-CvPVD1o6.d.ts.map → api/flow/types/common.d.ts.map} +1 -1
  3. package/dist/api/flow/types/common.js +51 -0
  4. package/dist/{common-C6FXBDm7.js.map → api/flow/types/common.js.map} +1 -1
  5. package/dist/api/flow/types/index.d.ts +1 -0
  6. package/dist/api/flow/types/index.js +1 -0
  7. package/dist/api/media/types/common.d.ts +32 -0
  8. package/dist/api/media/types/common.d.ts.map +1 -0
  9. package/dist/api/media/types/index.d.ts +1 -0
  10. package/dist/api/messages/types/common.d.ts +99 -0
  11. package/dist/api/messages/types/common.d.ts.map +1 -0
  12. package/dist/api/messages/types/contact.d.ts +54 -0
  13. package/dist/api/messages/types/contact.d.ts.map +1 -0
  14. package/dist/api/messages/types/index.d.ts +8 -0
  15. package/dist/api/messages/types/interactive.d.ts +182 -0
  16. package/dist/api/messages/types/interactive.d.ts.map +1 -0
  17. package/dist/api/messages/types/location.d.ts +16 -0
  18. package/dist/api/messages/types/location.d.ts.map +1 -0
  19. package/dist/api/messages/types/media.d.ts +55 -0
  20. package/dist/api/messages/types/media.d.ts.map +1 -0
  21. package/dist/api/messages/types/reaction.d.ts +17 -0
  22. package/dist/api/messages/types/reaction.d.ts.map +1 -0
  23. package/dist/api/messages/types/template.d.ts +72 -0
  24. package/dist/api/messages/types/template.d.ts.map +1 -0
  25. package/dist/api/messages/types/text.d.ts +17 -0
  26. package/dist/api/messages/types/text.d.ts.map +1 -0
  27. package/dist/api/phone/types/common.d.ts +83 -0
  28. package/dist/api/phone/types/common.d.ts.map +1 -0
  29. package/dist/api/phone/types/index.d.ts +1 -0
  30. package/dist/api/profile/types/common.d.ts +149 -0
  31. package/dist/api/profile/types/common.d.ts.map +1 -0
  32. package/dist/api/profile/types/index.d.ts +2 -0
  33. package/dist/api/profile/types/upload.d.ts +73 -0
  34. package/dist/api/profile/types/upload.d.ts.map +1 -0
  35. package/dist/api/qrCode/types/common.d.ts +28 -0
  36. package/dist/api/qrCode/types/common.d.ts.map +1 -0
  37. package/dist/api/qrCode/types/index.d.ts +1 -0
  38. package/dist/api/template/types/common.d.ts +155 -0
  39. package/dist/api/template/types/common.d.ts.map +1 -0
  40. package/dist/api/template/types/factory.d.ts +202 -0
  41. package/dist/api/template/types/factory.d.ts.map +1 -0
  42. package/dist/api/template/types/index.d.ts +2 -0
  43. package/dist/{index-CeTmbIXi.d.ts → api/waba/types/common.d.ts} +3 -61
  44. package/dist/api/waba/types/common.d.ts.map +1 -0
  45. package/dist/api/waba/types/common.js +44 -0
  46. package/dist/api/waba/types/common.js.map +1 -0
  47. package/dist/api/waba/types/index.d.ts +1 -0
  48. package/dist/api/waba/types/index.js +1 -0
  49. package/dist/chunk-PECeCxCb.js +15 -0
  50. package/dist/client.d.ts +25 -0
  51. package/dist/client.js +6 -0
  52. package/dist/{WebhookProcessor-Dq2Pa2cY.d.ts → core/webhook/types.d.ts} +74 -55
  53. package/dist/core/webhook/types.d.ts.map +1 -0
  54. package/dist/{base-CfDkvT1x.d.ts → enums.d.ts} +3 -142
  55. package/dist/enums.d.ts.map +1 -0
  56. package/dist/enums.js +681 -0
  57. package/dist/enums.js.map +1 -0
  58. package/dist/index.d.ts +4386 -21
  59. package/dist/index.d.ts.map +1 -0
  60. package/dist/index.js +3436 -1
  61. package/dist/index.js.map +1 -1
  62. package/dist/types/base.d.ts +19 -0
  63. package/dist/types/base.d.ts.map +1 -0
  64. package/dist/types/config.d.ts +80 -0
  65. package/dist/types/config.d.ts.map +1 -0
  66. package/dist/types/enums.d.ts +668 -0
  67. package/dist/types/enums.d.ts.map +1 -0
  68. package/dist/types/enums.js +681 -0
  69. package/dist/types/enums.js.map +1 -0
  70. package/dist/{index-DQkgkiB6.d.ts → types/httpsClient.d.ts} +3 -12
  71. package/dist/types/httpsClient.d.ts.map +1 -0
  72. package/dist/types/index.d.ts +24 -3
  73. package/dist/types/index.js +5 -1
  74. package/dist/types/logger.d.ts +11 -0
  75. package/dist/types/logger.d.ts.map +1 -0
  76. package/dist/types/request.d.ts +52 -0
  77. package/dist/types/request.d.ts.map +1 -0
  78. package/dist/utils/isMetaError.d.ts +23 -0
  79. package/dist/utils/isMetaError.d.ts.map +1 -0
  80. package/package.json +19 -22
  81. package/dist/WebhookProcessor-BUZFeZD_.js +0 -3
  82. package/dist/WebhookProcessor-BUZFeZD_.js.map +0 -1
  83. package/dist/WebhookProcessor-Dq2Pa2cY.d.ts.map +0 -1
  84. package/dist/api/encryption/index.d.ts +0 -3
  85. package/dist/api/encryption/index.js +0 -1
  86. package/dist/api/flow/index.d.ts +0 -5
  87. package/dist/api/flow/index.js +0 -1
  88. package/dist/api/index.d.ts +0 -17
  89. package/dist/api/index.js +0 -1
  90. package/dist/api/media/index.d.ts +0 -3
  91. package/dist/api/media/index.js +0 -1
  92. package/dist/api/messages/builders/index.d.ts +0 -539
  93. package/dist/api/messages/builders/index.d.ts.map +0 -1
  94. package/dist/api/messages/builders/index.js +0 -2
  95. package/dist/api/messages/builders/index.js.map +0 -1
  96. package/dist/api/messages/index.d.ts +0 -4
  97. package/dist/api/messages/index.js +0 -1
  98. package/dist/api/phone/index.d.ts +0 -3
  99. package/dist/api/phone/index.js +0 -1
  100. package/dist/api/profile/index.d.ts +0 -3
  101. package/dist/api/profile/index.js +0 -1
  102. package/dist/api/qrCode/index.d.ts +0 -3
  103. package/dist/api/qrCode/index.js +0 -1
  104. package/dist/api/registration/index.d.ts +0 -3
  105. package/dist/api/registration/index.js +0 -1
  106. package/dist/api/template/index.d.ts +0 -3
  107. package/dist/api/template/index.js +0 -1
  108. package/dist/api/twoStepVerification/index.d.ts +0 -3
  109. package/dist/api/twoStepVerification/index.js +0 -1
  110. package/dist/api/waba/index.d.ts +0 -3
  111. package/dist/api/waba/index.js +0 -1
  112. package/dist/api-8hRAOyaL.js +0 -1
  113. package/dist/base-CfDkvT1x.d.ts.map +0 -1
  114. package/dist/base-D-cXu_lA.js +0 -2
  115. package/dist/base-D-cXu_lA.js.map +0 -1
  116. package/dist/buildFieldsQueryString-Cr-jz3p0.js +0 -2
  117. package/dist/buildFieldsQueryString-Cr-jz3p0.js.map +0 -1
  118. package/dist/chunk-CTAAG5j7.js +0 -1
  119. package/dist/common-C6FXBDm7.js +0 -2
  120. package/dist/common-CVbsmD26.d.ts +0 -426
  121. package/dist/common-CVbsmD26.d.ts.map +0 -1
  122. package/dist/core/webhook/frameworks/express.d.ts +0 -20
  123. package/dist/core/webhook/frameworks/express.js +0 -1
  124. package/dist/core/webhook/frameworks/nextjs-app.d.ts +0 -45
  125. package/dist/core/webhook/frameworks/nextjs-app.d.ts.map +0 -1
  126. package/dist/core/webhook/frameworks/nextjs-app.js +0 -2
  127. package/dist/core/webhook/frameworks/nextjs-app.js.map +0 -1
  128. package/dist/core/webhook/frameworks/nextjs.d.ts +0 -20
  129. package/dist/core/webhook/frameworks/nextjs.js +0 -1
  130. package/dist/core/webhook/index.d.ts +0 -20
  131. package/dist/core/webhook/index.js +0 -1
  132. package/dist/core/whatsapp/index.d.ts +0 -18
  133. package/dist/core/whatsapp/index.js +0 -1
  134. package/dist/encryption-Cwc0xcVL.js +0 -2
  135. package/dist/encryption-Cwc0xcVL.js.map +0 -1
  136. package/dist/enums-CSUpFXb8.js +0 -2
  137. package/dist/enums-CSUpFXb8.js.map +0 -1
  138. package/dist/express-B6fQdflY.d.ts +0 -78
  139. package/dist/express-B6fQdflY.d.ts.map +0 -1
  140. package/dist/express-CrfNLYMM.js +0 -2
  141. package/dist/express-CrfNLYMM.js.map +0 -1
  142. package/dist/flow-CVes0Qus.js +0 -2
  143. package/dist/flow-CVes0Qus.js.map +0 -1
  144. package/dist/flowTypeGuards-Gn3-slCW.js +0 -2
  145. package/dist/flowTypeGuards-Gn3-slCW.js.map +0 -1
  146. package/dist/handler-BGqjZ0xg.js +0 -2
  147. package/dist/handler-BGqjZ0xg.js.map +0 -1
  148. package/dist/index-3KglHVAg.d.ts +0 -354
  149. package/dist/index-3KglHVAg.d.ts.map +0 -1
  150. package/dist/index-BNeg6hHx.d.ts +0 -99
  151. package/dist/index-BNeg6hHx.d.ts.map +0 -1
  152. package/dist/index-BiTq23oi.d.ts +0 -34
  153. package/dist/index-BiTq23oi.d.ts.map +0 -1
  154. package/dist/index-BmfnREgM.d.ts +0 -47
  155. package/dist/index-BmfnREgM.d.ts.map +0 -1
  156. package/dist/index-CaGffSja.d.ts +0 -24
  157. package/dist/index-CaGffSja.d.ts.map +0 -1
  158. package/dist/index-CeTmbIXi.d.ts.map +0 -1
  159. package/dist/index-CoyByMuM.d.ts +0 -137
  160. package/dist/index-CoyByMuM.d.ts.map +0 -1
  161. package/dist/index-CwujtcvH.d.ts +0 -370
  162. package/dist/index-CwujtcvH.d.ts.map +0 -1
  163. package/dist/index-DQ7z58xp.d.ts +0 -104
  164. package/dist/index-DQ7z58xp.d.ts.map +0 -1
  165. package/dist/index-DQkgkiB6.d.ts.map +0 -1
  166. package/dist/index-LKrIp3Oo.d.ts +0 -1
  167. package/dist/index-_-06JPan.d.ts +0 -143
  168. package/dist/index-_-06JPan.d.ts.map +0 -1
  169. package/dist/index-a_YS40Iv.d.ts +0 -91
  170. package/dist/index-a_YS40Iv.d.ts.map +0 -1
  171. package/dist/index-d7TLqtYh.d.ts +0 -171
  172. package/dist/index-d7TLqtYh.d.ts.map +0 -1
  173. package/dist/isMetaError-B3AglYeY.d.ts +0 -66
  174. package/dist/isMetaError-B3AglYeY.d.ts.map +0 -1
  175. package/dist/media-Dw5OGzDD.js +0 -2
  176. package/dist/media-Dw5OGzDD.js.map +0 -1
  177. package/dist/messages-h5-NW8QO.js +0 -2
  178. package/dist/messages-h5-NW8QO.js.map +0 -1
  179. package/dist/nextjs-DxRCL4t3.js +0 -2
  180. package/dist/nextjs-DxRCL4t3.js.map +0 -1
  181. package/dist/objectToQueryString-CAHI0qTs.js +0 -2
  182. package/dist/objectToQueryString-CAHI0qTs.js.map +0 -1
  183. package/dist/phone-CZyWLyWB.js +0 -2
  184. package/dist/phone-CZyWLyWB.js.map +0 -1
  185. package/dist/profile-Bb7GDP0n.js +0 -2
  186. package/dist/profile-Bb7GDP0n.js.map +0 -1
  187. package/dist/qrCode-CeZEtX9J.js +0 -2
  188. package/dist/qrCode-CeZEtX9J.js.map +0 -1
  189. package/dist/registration-BkjhC3xw.js +0 -2
  190. package/dist/registration-BkjhC3xw.js.map +0 -1
  191. package/dist/template-Bgy-BCXJ.js +0 -2
  192. package/dist/template-Bgy-BCXJ.js.map +0 -1
  193. package/dist/twoStepVerification-DYlYF_P5.js +0 -2
  194. package/dist/twoStepVerification-DYlYF_P5.js.map +0 -1
  195. package/dist/utils/index.d.ts +0 -43
  196. package/dist/utils/index.d.ts.map +0 -1
  197. package/dist/utils/index.js +0 -1
  198. package/dist/version-BUuqrHc6.js +0 -3
  199. package/dist/version-BUuqrHc6.js.map +0 -1
  200. package/dist/waba-SF2W3z2U.js +0 -2
  201. package/dist/waba-SF2W3z2U.js.map +0 -1
  202. package/dist/webhook-D4DQ01Xq.js +0 -2
  203. package/dist/webhook-D4DQ01Xq.js.map +0 -1
  204. package/dist/whatsapp-B85mxH5f.js +0 -10
  205. package/dist/whatsapp-B85mxH5f.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enums.js","names":[],"sources":["../../src/types/enums.ts"],"sourcesContent":["export enum CategoryEnum {\n Authentication = 'AUTHENTICATION',\n Marketing = 'MARKETING',\n Utility = 'UTILITY',\n}\n\nexport enum TemplateStatusEnum {\n Approved = 'APPROVED',\n Pending = 'PENDING',\n Rejected = 'REJECTED',\n}\n\nexport enum HttpMethodsEnum {\n Get = 'GET',\n Post = 'POST',\n Put = 'PUT',\n Delete = 'DELETE',\n}\n\nexport enum MessageTypesEnum {\n Audio = 'audio',\n Contacts = 'contacts',\n Document = 'document',\n Image = 'image',\n Interactive = 'interactive',\n Location = 'location',\n Reaction = 'reaction',\n Sticker = 'sticker',\n Template = 'template',\n Text = 'text',\n Video = 'video',\n Button = 'button',\n Order = 'order',\n System = 'system',\n Unknown = 'unknown',\n Statuses = 'statuses',\n '*' = '*',\n}\n\nexport enum ParametersTypesEnum {\n Action = 'ACTION',\n CouponCode = 'COUPON_CODE',\n Currency = 'CURRENCY',\n DateTime = 'DATE_TIME',\n Document = 'DOCUMENT',\n ExpirationTimeMs = 'EXPIRATION_TIME_MS',\n Image = 'IMAGE',\n LimitedTimeOffer = 'LIMITED_TIME_OFFER',\n Location = 'LOCATION',\n OrderStatus = 'ORDER_STATUS',\n Payload = 'PAYLOAD',\n Product = 'PRODUCT',\n Text = 'TEXT',\n TtlMinutes = 'TTL_MINUTES',\n Video = 'VIDEO',\n WebviewInteraction = 'WEBVIEW_INTERACTION',\n WebviewPresentation = 'WEBVIEW_PRESENTATION',\n}\n\nexport enum InteractiveTypesEnum {\n Button = 'button',\n List = 'list',\n Product = 'product',\n ProductList = 'product_list',\n CtaUrl = 'cta_url',\n LocationRequest = 'location_request_message',\n AddressMessage = 'address_message',\n Flow = 'flow',\n}\n\nexport enum ButtonPositionEnum {\n First = 1,\n Second = 2,\n Third = 3,\n Fourth = 4,\n Fifth = 5,\n}\n\nexport enum SubTypeEnum {\n Catalog = 'CATALOG',\n CopyCode = 'COPY_CODE',\n Flow = 'FLOW',\n Mpm = 'MPM',\n OrderDetails = 'ORDER_DETAILS',\n QuickReply = 'QUICK_REPLY',\n Reminder = 'REMINDER',\n Url = 'URL',\n VoiceCall = 'VOICE_CALL',\n}\n\nexport enum ComponentTypesEnum {\n Header = 'HEADER',\n Body = 'BODY',\n Button = 'BUTTON',\n Footer = 'FOOTER',\n}\n\nexport enum WabaConfigEnum {\n AppId = 'M4D_APP_ID',\n Port = 'WA_PORT',\n AppSecret = 'M4D_APP_SECRET',\n PhoneNumberId = 'WA_PHONE_NUMBER_ID',\n BusinessAcctId = 'WA_BUSINESS_ACCOUNT_ID',\n APIVersion = 'CLOUD_API_VERSION',\n AccessToken = 'CLOUD_API_ACCESS_TOKEN',\n WebhookEndpoint = 'WEBHOOK_ENDPOINT',\n WebhookVerificationToken = 'WEBHOOK_VERIFICATION_TOKEN',\n ListenerPort = 'LISTENER_PORT',\n MaxRetriesAfterWait = 'MAX_RETRIES_AFTER_WAIT',\n RequestTimeout = 'REQUEST_TIMEOUT',\n Debug = 'DEBUG',\n PrivatePem = 'FLOW_API_PRIVATE_PEM',\n Passphrase = 'FLOW_API_PASSPHRASE',\n}\n\nexport enum ConversationTypesEnum {\n BusinessInitiated = 'business_initiated',\n CustomerInitiated = 'customer_initiated',\n ReferralConversion = 'referral_conversion',\n}\n\nexport enum StatusEnum {\n Delivered = 'delivered',\n Read = 'read',\n Sent = 'sent',\n}\n\nexport enum VideoMediaTypesEnum {\n Mp4 = 'video/mp4',\n Threegp = 'video/3gp',\n}\n\nexport enum StickerMediaTypesEnum {\n Webp = 'image/webp',\n}\n\nexport enum ImageMediaTypesEnum {\n Jpeg = 'image/jpeg',\n Png = 'image/png',\n}\n\nexport enum DocumentMediaTypesEnum {\n Text = 'text/plain',\n Pdf = 'application/pdf',\n Ppt = 'application/vnd.ms-powerpoint',\n Word = 'application/msword',\n Excel = 'application/vnd.ms-excel',\n OpenDoc = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n OpenPres = 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n OpenSheet = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n}\n\nexport enum AudioMediaTypesEnum {\n Aac = 'audio/aac',\n Mp4 = 'audio/mp4',\n Mpeg = 'audio/mpeg',\n Amr = 'audio/amr',\n Ogg = 'audio/ogg',\n}\n\nexport enum WebhookTypesEnum {\n Audio = 'audio',\n Button = 'button',\n Document = 'document',\n Text = 'text',\n Image = 'image',\n Interactive = 'interactive',\n Order = 'order',\n Sticker = 'sticker',\n System = 'system',\n Unknown = 'unknown',\n Video = 'video',\n}\n\nexport enum SystemChangeTypesEnum {\n CustomerChangedNumber = 'customer_changed_number',\n CustomerIdentityChanged = 'customer_identity_changed',\n}\n\nexport enum ReferralSourceTypesEnum {\n Ad = 'ad',\n Post = 'post',\n}\n\nexport enum RequestCodeMethodsEnum {\n Sms = 'SMS',\n Voice = 'VOICE',\n}\n\nexport enum LanguagesEnum {\n Afrikaans = 'af',\n Albanian = 'sq',\n Arabic = 'ar',\n Azerbaijani = 'az',\n Bengali = 'bn',\n Bulgarian = 'bg',\n Catalan = 'ca',\n Chinese_CHN = 'zh_CN',\n Chinese_HKG = 'zh_HK',\n Chinese_TAI = 'zh_TW',\n Croatian = 'hr',\n Czech = 'cs',\n Danish = 'da',\n Dutch = 'nl',\n English = 'en',\n English_UK = 'en_GB',\n English_US = 'en_US',\n Estonian = 'et',\n Filipino = 'fil',\n Finnish = 'fi',\n French = 'fr',\n Georgian = 'ka',\n German = 'de',\n Greek = 'el',\n Gujarati = 'gu',\n Hausa = 'ha',\n Hebrew = 'he',\n Hindi = 'hi',\n Hungarian = 'hu',\n Indonesian = 'id',\n Irish = 'ga',\n Italian = 'it',\n Japanese = 'ja',\n Kannada = 'kn',\n Kazakh = 'kk',\n Kinyarwanda = 'rw_RW',\n Korean = 'ko',\n Kyrgyz_Kyrgyzstan = 'ky_KG',\n Lao = 'lo',\n Latvian = 'lv',\n Lithuanian = 'lt',\n Macedonian = 'mk',\n Malay = 'ms',\n Malayalam = 'ml',\n Marathi = 'mr',\n Norwegian = 'nb',\n Persian = 'fa',\n Polish = 'pl',\n Portuguese_BR = 'pt_BR',\n Portuguese_POR = 'pt_PT',\n Punjabi = 'pa',\n Romanian = 'ro',\n Russian = 'ru',\n Serbian = 'sr',\n Slovak = 'sk',\n Slovenian = 'sl',\n Spanish = 'es',\n Spanish_ARG = 'es_AR',\n Spanish_SPA = 'es_ES',\n Spanish_MEX = 'es_MX',\n Swahili = 'sw',\n Swedish = 'sv',\n Tamil = 'ta',\n Telugu = 'te',\n Thai = 'th',\n Turkish = 'tr',\n Ukrainian = 'uk',\n Urdu = 'ur',\n Uzbek = 'uz',\n Vietnamese = 'vi',\n Zulu = 'zu',\n}\n\nexport enum CurrencyCodesEnum {\n AFN = 'AFN',\n EUR = 'EUR',\n ALL = 'ALL',\n DZD = 'DZD',\n USD = 'USD',\n AOA = 'AOA',\n XCD = 'XCD',\n ARS = 'ARS',\n AMD = 'AMD',\n AWG = 'AWG',\n AUD = 'AUD',\n AZN = 'AZN',\n BSD = 'BSD',\n BHD = 'BHD',\n BDT = 'BDT',\n BBD = 'BBD',\n BYN = 'BYN',\n BZD = 'BZD',\n XOF = 'XOF',\n BMD = 'BMD',\n INR = 'INR',\n BTN = 'BTN',\n BOB = 'BOB',\n BOV = 'BOV',\n BAM = 'BAM',\n BWP = 'BWP',\n NOK = 'NOK',\n BRL = 'BRL',\n BND = 'BND',\n BGN = 'BGN',\n BIF = 'BIF',\n CVE = 'CVE',\n KHR = 'KHR',\n XAF = 'XAF',\n CAD = 'CAD',\n KYD = 'KYD',\n CLP = 'CLP',\n CLF = 'CLF',\n CNY = 'CNY',\n COP = 'COP',\n COU = 'COU',\n KMF = 'KMF',\n CDF = 'CDF',\n NZD = 'NZD',\n CRC = 'CRC',\n HRK = 'HRK',\n CUP = 'CUP',\n CUC = 'CUC',\n ANG = 'ANG',\n CZK = 'CZK',\n DKK = 'DKK',\n DJF = 'DJF',\n DOP = 'DOP',\n EGP = 'EGP',\n SVC = 'SVC',\n ERN = 'ERN',\n SZL = 'SZL',\n ETB = 'ETB',\n FKP = 'FKP',\n FJD = 'FJD',\n XPF = 'XPF',\n GMD = 'GMD',\n GEL = 'GEL',\n GHS = 'GHS',\n GIP = 'GIP',\n GTQ = 'GTQ',\n GBP = 'GBP',\n GNF = 'GNF',\n GYD = 'GYD',\n HTG = 'HTG',\n HNL = 'HNL',\n HKD = 'HKD',\n HUF = 'HUF',\n ISK = 'ISK',\n IDR = 'IDR',\n XDR = 'XDR',\n IRR = 'IRR',\n IQD = 'IQD',\n ILS = 'ILS',\n JMD = 'JMD',\n JPY = 'JPY',\n JOD = 'JOD',\n KZT = 'KZT',\n KES = 'KES',\n KPW = 'KPW',\n KRW = 'KRW',\n KWD = 'KWD',\n KGS = 'KGS',\n LAK = 'LAK',\n LBP = 'LBP',\n LSL = 'LSL',\n ZAR = 'ZAR',\n LRD = 'LRD',\n LYD = 'LYD',\n CHF = 'CHF',\n MOP = 'MOP',\n MKD = 'MKD',\n MGA = 'MGA',\n MWK = 'MWK',\n MYR = 'MYR',\n MVR = 'MVR',\n MRU = 'MRU',\n MUR = 'MUR',\n XUA = 'XUA',\n MXN = 'MXN',\n MXV = 'MXV',\n MDL = 'MDL',\n MNT = 'MNT',\n MAD = 'MAD',\n MZN = 'MZN',\n MMK = 'MMK',\n NAD = 'NAD',\n NPR = 'NPR',\n NIO = 'NIO',\n NGN = 'NGN',\n OMR = 'OMR',\n PKR = 'PKR',\n PAB = 'PAB',\n PGK = 'PGK',\n PYG = 'PYG',\n PEN = 'PEN',\n PHP = 'PHP',\n PLN = 'PLN',\n QAR = 'QAR',\n RON = 'RON',\n RUB = 'RUB',\n RWF = 'RWF',\n SHP = 'SHP',\n WST = 'WST',\n STN = 'STN',\n SAR = 'SAR',\n RSD = 'RSD',\n SCR = 'SCR',\n SLL = 'SLL',\n SGD = 'SGD',\n XSU = 'XSU',\n SBD = 'SBD',\n SOS = 'SOS',\n SSP = 'SSP',\n LKR = 'LKR',\n SDG = 'SDG',\n SRD = 'SRD',\n SEK = 'SEK',\n CHE = 'CHE',\n CHW = 'CHW',\n SYP = 'SYP',\n TWD = 'TWD',\n TJS = 'TJS',\n TZS = 'TZS',\n THB = 'THB',\n TOP = 'TOP',\n TTD = 'TTD',\n TND = 'TND',\n TRY = 'TRY',\n TMT = 'TMT',\n UGX = 'UGX',\n UAH = 'UAH',\n AED = 'AED',\n USN = 'USN',\n UYU = 'UYU',\n UYI = 'UYI',\n UYW = 'UYW',\n UZS = 'UZS',\n VUV = 'VUV',\n VES = 'VES',\n VND = 'VND',\n YER = 'YER',\n ZMW = 'ZMW',\n ZWL = 'ZWL',\n XBA = 'XBA',\n XBB = 'XBB',\n XBC = 'XBC',\n XBD = 'XBD',\n XTS = 'XTS',\n XXX = 'XXX',\n XAU = 'XAU',\n XPD = 'XPD',\n XPT = 'XPT',\n XAG = 'XAG',\n AFA = 'AFA',\n FIM = 'FIM',\n ALK = 'ALK',\n ADP = 'ADP',\n ESP = 'ESP',\n FRF = 'FRF',\n AOK = 'AOK',\n AON = 'AON',\n AOR = 'AOR',\n ARA = 'ARA',\n ARP = 'ARP',\n ARY = 'ARY',\n RUR = 'RUR',\n ATS = 'ATS',\n AYM = 'AYM',\n AZM = 'AZM',\n BYB = 'BYB',\n BYR = 'BYR',\n BEC = 'BEC',\n BEF = 'BEF',\n BEL = 'BEL',\n BOP = 'BOP',\n BAD = 'BAD',\n BRB = 'BRB',\n BRC = 'BRC',\n BRE = 'BRE',\n BRN = 'BRN',\n BRR = 'BRR',\n BGJ = 'BGJ',\n BGK = 'BGK',\n BGL = 'BGL',\n BUK = 'BUK',\n HRD = 'HRD',\n CYP = 'CYP',\n CSJ = 'CSJ',\n CSK = 'CSK',\n ECS = 'ECS',\n ECV = 'ECV',\n GQE = 'GQE',\n EEK = 'EEK',\n XEU = 'XEU',\n GEK = 'GEK',\n DDM = 'DDM',\n DEM = 'DEM',\n GHC = 'GHC',\n GHP = 'GHP',\n GRD = 'GRD',\n GNE = 'GNE',\n GNS = 'GNS',\n GWE = 'GWE',\n GWP = 'GWP',\n ITL = 'ITL',\n ISJ = 'ISJ',\n IEP = 'IEP',\n ILP = 'ILP',\n ILR = 'ILR',\n LAJ = 'LAJ',\n LVL = 'LVL',\n LVR = 'LVR',\n LSM = 'LSM',\n ZAL = 'ZAL',\n LTL = 'LTL',\n LTT = 'LTT',\n LUC = 'LUC',\n LUF = 'LUF',\n LUL = 'LUL',\n MGF = 'MGF',\n MVQ = 'MVQ',\n MLF = 'MLF',\n MTL = 'MTL',\n MTP = 'MTP',\n MRO = 'MRO',\n MXP = 'MXP',\n MZE = 'MZE',\n MZM = 'MZM',\n NLG = 'NLG',\n NIC = 'NIC',\n PEH = 'PEH',\n PEI = 'PEI',\n PES = 'PES',\n PLZ = 'PLZ',\n PTE = 'PTE',\n ROK = 'ROK',\n ROL = 'ROL',\n STD = 'STD',\n CSD = 'CSD',\n SKK = 'SKK',\n SIT = 'SIT',\n RHD = 'RHD',\n ESA = 'ESA',\n ESB = 'ESB',\n SDD = 'SDD',\n SDP = 'SDP',\n SRG = 'SRG',\n CHC = 'CHC',\n TJR = 'TJR',\n TPE = 'TPE',\n TRL = 'TRL',\n TMM = 'TMM',\n UGS = 'UGS',\n UGW = 'UGW',\n UAK = 'UAK',\n SUR = 'SUR',\n USS = 'USS',\n UYN = 'UYN',\n UYP = 'UYP',\n VEB = 'VEB',\n VEF = 'VEF',\n VNC = 'VNC',\n YDD = 'YDD',\n YUD = 'YUD',\n YUM = 'YUM',\n YUN = 'YUN',\n ZRN = 'ZRN',\n ZRZ = 'ZRZ',\n ZMK = 'ZMK',\n ZWC = 'ZWC',\n ZWD = 'ZWD',\n ZWN = 'ZWN',\n ZWR = 'ZWR',\n XFO = 'XFO',\n XRE = 'XRE',\n XFU = 'XFU',\n}\n\nexport enum DataLocalizationRegionEnum {\n // APAC\n AU = 'AU', // Australia\n ID = 'ID', // Indonesia\n IN = 'IN', // India\n JP = 'JP', // Japan\n SG = 'SG', // Singapore\n KR = 'KR', // South Korea\n\n // Europe\n DE = 'DE', // EU (Germany)\n CH = 'CH', // Switzerland\n GB = 'GB', // United Kingdom\n\n // LATAM\n BR = 'BR', // Brazil\n\n // MEA\n BH = 'BH', // Bahrain\n ZA = 'ZA', // South Africa\n AE = 'AE', // United Arab Emirates\n\n // NORAM\n CA = 'CA', // Canada\n}\n\n/**\n * Business category values for WhatsApp Business Profile.\n * These values map to specific strings displayed in the WhatsApp client.\n */\nexport enum BusinessVerticalEnum {\n /**\n * Alcoholic Beverages\n */\n ALCOHOL = 'ALCOHOL',\n /**\n * Clothing and Apparel\n */\n APPAREL = 'APPAREL',\n /**\n * Automotive\n */\n AUTO = 'AUTO',\n /**\n * Beauty, Spa and Salon\n */\n BEAUTY = 'BEAUTY',\n /**\n * Education\n */\n EDU = 'EDU',\n /**\n * Entertainment\n */\n ENTERTAIN = 'ENTERTAIN',\n /**\n * Event Planning and Service\n */\n EVENT_PLAN = 'EVENT_PLAN',\n /**\n * Finance and Banking\n */\n FINANCE = 'FINANCE',\n /**\n * Public Service\n */\n GOVT = 'GOVT',\n /**\n * Food and Grocery\n */\n GROCERY = 'GROCERY',\n /**\n * Medical and Health\n */\n HEALTH = 'HEALTH',\n /**\n * Hotel and Lodging\n */\n HOTEL = 'HOTEL',\n /**\n * Non-profit\n */\n NONPROFIT = 'NONPROFIT',\n /**\n * Online Gambling & Gaming\n */\n ONLINE_GAMBLING = 'ONLINE_GAMBLING',\n /**\n * Over-the-Counter Drugs\n */\n OTC_DRUGS = 'OTC_DRUGS',\n /**\n * Other\n */\n OTHER = 'OTHER',\n /**\n * Non-Online Gambling & Gaming (E.g. Brick and mortar)\n */\n PHYSICAL_GAMBLING = 'PHYSICAL_GAMBLING',\n /**\n * Professional Services\n */\n PROF_SERVICES = 'PROF_SERVICES',\n /**\n * Restaurant\n */\n RESTAURANT = 'RESTAURANT',\n /**\n * Shopping and Retail\n */\n RETAIL = 'RETAIL',\n /**\n * Travel and Transportation\n */\n TRAVEL = 'TRAVEL',\n}\n"],"mappings":";AAAA,IAAY,wDAAL;AACH;AACA;AACA;;;AAGJ,IAAY,oEAAL;AACH;AACA;AACA;;;AAGJ,IAAY,8DAAL;AACH;AACA;AACA;AACA;;;AAGJ,IAAY,gEAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,sEAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,wEAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,oEAAL;AACH;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,sDAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,oEAAL;AACH;AACA;AACA;AACA;;;AAGJ,IAAY,4DAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,0EAAL;AACH;AACA;AACA;;;AAGJ,IAAY,oDAAL;AACH;AACA;AACA;;;AAGJ,IAAY,sEAAL;AACH;AACA;;;AAGJ,IAAY,0EAAL;AACH;;;AAGJ,IAAY,sEAAL;AACH;AACA;;;AAGJ,IAAY,4EAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,sEAAL;AACH;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,gEAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,0EAAL;AACH;AACA;;;AAGJ,IAAY,8EAAL;AACH;AACA;;;AAGJ,IAAY,4EAAL;AACH;AACA;;;AAGJ,IAAY,0DAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,kEAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,oFAAL;AAEH;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAGA;AAGA;AACA;AACA;AAGA;;;;;;;AAOJ,IAAY,wEAAL;;;;AAIH;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA"}
@@ -1,14 +1,5 @@
1
- import { HttpMethodsEnum } from "./base-CfDkvT1x.js";
1
+ import { HttpMethodsEnum } from "./enums.js";
2
2
 
3
- //#region src/types/logger.d.ts
4
- interface LoggerInterface {
5
- log(...data: any[]): void;
6
- error(...data: any[]): void;
7
- warn(...data: any[]): void;
8
- info(...data: any[]): void;
9
- debug(...data: any[]): void;
10
- }
11
- //#endregion
12
3
  //#region src/types/httpsClient.d.ts
13
4
  type ResponseHeaderValue = string | string[] | undefined;
14
5
  type ResponseHeaders = Record<string, ResponseHeaderValue>;
@@ -26,5 +17,5 @@ declare class HttpsClientClass {
26
17
  sendRequest: (host: string, path: string, method: HttpMethodsEnum, headers: HeadersInit, timeout: number, body?: BodyInit | null) => Promise<HttpsClientResponseClass>;
27
18
  }
28
19
  //#endregion
29
- export { type HttpsClientClass, type HttpsClientResponseClass, type LoggerInterface, type ResponseHeaderValue, type ResponseHeaders, type ResponseJSONBody };
30
- //# sourceMappingURL=index-DQkgkiB6.d.ts.map
20
+ export { HttpsClientClass, HttpsClientResponseClass, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody };
21
+ //# sourceMappingURL=httpsClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"httpsClient.d.ts","names":[],"sources":["../../src/types/httpsClient.ts"],"sourcesContent":[],"mappings":";;;KAEY,mBAAA;KAEA,eAAA,GAAkB,eAAe;AAFjC,KAIA,gBAAA,GAAmB,MAJA,CAAA,MAAA,EAAA,OAAA,CAAA;AAEnB,cAIS,wBAAA,CAJM;EAAA,WAAA,CAAA,IAAA,EAKL,QALK;YAAkB,EAAA,GAAA,GAAA,MAAA;SAAf,EAAA,GAAA,GAOX,eAPW;EAAM,WAAA,EAAA,GAAA,GAQb,QARa;EAExB,IAAA,EAAA,GAAA,GAOI,OAPY,CAOJ,gBAPO,CAAM;AAErC;AAA6C,cAQxB,gBAAA,CARwB;aACvB,CAAA;cAEH,EAAA,GAAA,GAAA,OAAA;aACI,EAAA,CAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,MAAA,EAAA,MAAA,EAUP,eAVO,EAAA,OAAA,EAWN,WAXM,EAAA,OAAA,EAAA,MAAA,EAAA,IAAA,CAAA,EAaR,QAbQ,GAAA,IAAA,EAAA,GAcd,OAdc,CAcN,wBAdM,CAAA"}
@@ -1,3 +1,24 @@
1
- import { AudioMediaTypesEnum, BaseAPI, BaseClass, BusinessVerticalEnum, ButtonPositionEnum, CategoryEnum, ComponentTypesEnum, ConversationTypesEnum, CurrencyCodesEnum, DataLocalizationRegionEnum, DocumentMediaTypesEnum, GeneralHeaderInterface, GeneralRequestBody, HttpMethodsEnum, ImageMediaTypesEnum, InteractiveTypesEnum, LanguagesEnum, MessageTypesEnum, Paging, ParametersTypesEnum, ReferralSourceTypesEnum, RequestCodeMethodsEnum, RequesterClass, RequesterResponseInterface, ResponseData, ResponsePagination, ResponseSuccess, StatusEnum, StickerMediaTypesEnum, SubTypeEnum, SystemChangeTypesEnum, TemplateStatusEnum, VideoMediaTypesEnum, WabaConfigEnum, WabaConfigType, WebhookTypesEnum, WhatsAppConfig } from "../base-CfDkvT1x.js";
2
- import { HttpsClientClass, HttpsClientResponseClass, LoggerInterface, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody } from "../index-DQkgkiB6.js";
3
- export { AudioMediaTypesEnum, BaseAPI, BaseClass, BusinessVerticalEnum, ButtonPositionEnum, CategoryEnum, ComponentTypesEnum, ConversationTypesEnum, CurrencyCodesEnum, DataLocalizationRegionEnum, DocumentMediaTypesEnum, GeneralHeaderInterface, GeneralRequestBody, HttpMethodsEnum, HttpsClientClass, HttpsClientResponseClass, ImageMediaTypesEnum, InteractiveTypesEnum, LanguagesEnum, LoggerInterface, MessageTypesEnum, Paging, ParametersTypesEnum, ReferralSourceTypesEnum, RequestCodeMethodsEnum, RequesterClass, RequesterResponseInterface, ResponseData, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody, ResponsePagination, ResponseSuccess, StatusEnum, StickerMediaTypesEnum, SubTypeEnum, SystemChangeTypesEnum, TemplateStatusEnum, VideoMediaTypesEnum, WabaConfigEnum, WabaConfigType, WebhookTypesEnum, WhatsAppConfig };
1
+ import { AudioMediaTypesEnum, BusinessVerticalEnum, ButtonPositionEnum, CategoryEnum, ComponentTypesEnum, ConversationTypesEnum, CurrencyCodesEnum, DataLocalizationRegionEnum, DocumentMediaTypesEnum, HttpMethodsEnum, ImageMediaTypesEnum, InteractiveTypesEnum, LanguagesEnum, MessageTypesEnum, ParametersTypesEnum, ReferralSourceTypesEnum, RequestCodeMethodsEnum, StatusEnum, StickerMediaTypesEnum, SubTypeEnum, SystemChangeTypesEnum, TemplateStatusEnum, VideoMediaTypesEnum, WabaConfigEnum, WebhookTypesEnum } from "./enums.js";
2
+ import { WabaConfigType, WhatsAppConfig } from "./config.js";
3
+ import { LoggerInterface } from "./logger.js";
4
+ import { GeneralHeaderInterface, GeneralRequestBody, Paging, RequesterClass, RequesterResponseInterface, ResponseData, ResponsePagination, ResponseSuccess } from "./request.js";
5
+ import { HttpsClientClass, HttpsClientResponseClass, ResponseHeaderValue, ResponseHeaders, ResponseJSONBody } from "./httpsClient.js";
6
+ import { BaseClass } from "./base.js";
7
+ import { BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, UpdateBusinessProfileRequest } from "../api/profile/types/common.js";
8
+ import { AccountMode, CodeVerificationStatus, Cursors, HealthStatus, HealthStatusEntity, MessagingLimitTier, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, QualityRating, QualityScore, RequestVerificationCodeRequest, Throughput, ThroughputLevel, TwoStepVerificationParams, VerifyCodeRequest } from "../api/phone/types/common.js";
9
+ import { CatalogButton, ComponentTypes, CopyCodeButton, FlowButton, MPMButton, MediaCarouselCard, OTPButton, PhoneNumberButton, ProductCarouselCard, QuickReplyButton, SPMButton, TemplateBody, TemplateButton, TemplateButtons, TemplateCarousel, TemplateClass, TemplateDeleteParams, TemplateFooter, TemplateFormat, TemplateGetParams, TemplateHeader, TemplateHeaderExample, TemplateLimitedTimeOffer, TemplateRequestBody, TemplateResponse, URLButton } from "../api/template/types/common.js";
10
+ import { AuthenticationTemplateOptions, BodyOptions, ButtonOptions, CarouselCard, CarouselOptions, CatalogTemplateOptions, CouponTemplateOptions, CurrencyParameter, DateTimeParameter, FooterOptions, HeaderOptions, LimitedTimeOfferOptions, LimitedTimeOfferTemplateOptions, LocationParameter, MPMTemplateOptions, MediaCardCarouselTemplateOptions, MediaParameter, OTPTemplateOptions, ProductCardCarouselTemplateOptions, ProductParameter, ProductSection, SPMTemplateOptions, TemplateOptions, TemplateParameter, TextParameter } from "../api/template/types/factory.js";
11
+ import { TextMessageParams, TextObject } from "../api/messages/types/text.js";
12
+ import { MessageTemplateObject } from "../api/messages/types/template.js";
13
+ import { AudioMediaObject, DocumentMediaObject, ImageMediaObject, StickerMediaObject, VideoMediaObject } from "../api/messages/types/media.js";
14
+ import { ContactObject } from "../api/messages/types/contact.js";
15
+ import { LocationObject } from "../api/messages/types/location.js";
16
+ import { InteractiveObject } from "../api/messages/types/interactive.js";
17
+ import { ReactionParams } from "../api/messages/types/reaction.js";
18
+ import { GeneralMessageBody, MessageRequestBody, MessageRequestParams, MessagesClass, MessagesResponse, StatusParams } from "../api/messages/types/common.js";
19
+ import { MediaClass, MediaResponse, MediasResponse, UploadMediaResponse } from "../api/media/types/common.js";
20
+ import { WebhookContact, WebhookEvent, WebhookMessage } from "../core/webhook/types.js";
21
+ import { Flow, FlowActionEnum, FlowAsset, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowDataExchangeRequest, FlowDataExchangeResponse, FlowDecryptedRequestResponse, FlowEncryptedRequestPayload, FlowEndpointRequest, FlowEndpointResponse, FlowErrorNotificationRequest, FlowErrorNotificationResponse, FlowHealthCheckRequest, FlowHealthCheckResponse, FlowHttpRequest, FlowMigrationFailure, FlowMigrationResponse, FlowMigrationResult, FlowPreview, FlowPreviewResponse, FlowStatusEnum, FlowSuccessScreenResponse, FlowType, FlowTypeEnum, FlowValidationError, FlowValidationErrorPointer, FlowsListResponse, Pagination, PaginationCursors, UpdateFlowResponse, ValidateFlowJsonResponse } from "../api/flow/types/common.js";
22
+ import { CreateQrCodeRequest, QrCodeClass, QrCodeResponse, QrCodesResponse, UpdateQrCodeRequest } from "../api/qrCode/types/common.js";
23
+ import { UpdateWabaSubscription, WABAClass, WabaAccount, WabaAccountFields, WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, WabaHealthStatus, WabaHealthStatusCanSendMessage, WabaHealthStatusEntity, WabaHealthStatusError, WabaSubscription, WabaSubscriptions } from "../api/waba/types/common.js";
24
+ import { MetaError } from "../utils/isMetaError.js";
@@ -1 +1,5 @@
1
- import{AudioMediaTypesEnum as e,BusinessVerticalEnum as t,ButtonPositionEnum as n,CategoryEnum as r,ComponentTypesEnum as i,ConversationTypesEnum as a,CurrencyCodesEnum as o,DataLocalizationRegionEnum as s,DocumentMediaTypesEnum as c,HttpMethodsEnum as l,ImageMediaTypesEnum as u,InteractiveTypesEnum as d,LanguagesEnum as f,MessageTypesEnum as p,ParametersTypesEnum as m,ReferralSourceTypesEnum as h,RequestCodeMethodsEnum as g,StatusEnum as _,StickerMediaTypesEnum as v,SubTypeEnum as y,SystemChangeTypesEnum as b,TemplateStatusEnum as x,VideoMediaTypesEnum as S,WabaConfigEnum as C,WebhookTypesEnum as w}from"../enums-CSUpFXb8.js";import{BaseAPI as T}from"../base-D-cXu_lA.js";export{e as AudioMediaTypesEnum,T as BaseAPI,BaseClass,t as BusinessVerticalEnum,n as ButtonPositionEnum,r as CategoryEnum,i as ComponentTypesEnum,a as ConversationTypesEnum,o as CurrencyCodesEnum,s as DataLocalizationRegionEnum,c as DocumentMediaTypesEnum,l as HttpMethodsEnum,u as ImageMediaTypesEnum,d as InteractiveTypesEnum,f as LanguagesEnum,p as MessageTypesEnum,m as ParametersTypesEnum,h as ReferralSourceTypesEnum,g as RequestCodeMethodsEnum,_ as StatusEnum,v as StickerMediaTypesEnum,y as SubTypeEnum,b as SystemChangeTypesEnum,x as TemplateStatusEnum,S as VideoMediaTypesEnum,C as WabaConfigEnum,w as WebhookTypesEnum};
1
+ import { AudioMediaTypesEnum, BusinessVerticalEnum, ButtonPositionEnum, CategoryEnum, ComponentTypesEnum, ConversationTypesEnum, CurrencyCodesEnum, DataLocalizationRegionEnum, DocumentMediaTypesEnum, HttpMethodsEnum, ImageMediaTypesEnum, InteractiveTypesEnum, LanguagesEnum, MessageTypesEnum, ParametersTypesEnum, ReferralSourceTypesEnum, RequestCodeMethodsEnum, StatusEnum, StickerMediaTypesEnum, SubTypeEnum, SystemChangeTypesEnum, TemplateStatusEnum, VideoMediaTypesEnum, WabaConfigEnum, WebhookTypesEnum } from "./enums.js";
2
+ import { FlowActionEnum, FlowCategoryEnum, FlowStatusEnum, FlowTypeEnum } from "../api/flow/types/common.js";
3
+ import "../api/flow/types/index.js";
4
+ import { WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, WabaHealthStatusCanSendMessage } from "../api/waba/types/common.js";
5
+ import "../api/waba/types/index.js";
@@ -0,0 +1,11 @@
1
+ //#region src/types/logger.d.ts
2
+ interface LoggerInterface {
3
+ log(...data: any[]): void;
4
+ error(...data: any[]): void;
5
+ warn(...data: any[]): void;
6
+ info(...data: any[]): void;
7
+ debug(...data: any[]): void;
8
+ }
9
+ //#endregion
10
+ export { LoggerInterface };
11
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","names":[],"sources":["../../src/types/logger.ts"],"sourcesContent":[],"mappings":";UAAiB,eAAA;EAAA,GAAA,CAAA,GAAA,IAAA,EAAA,GAAA,EAAe,CAAA,EAAA,IAAA"}
@@ -0,0 +1,52 @@
1
+ import { HttpMethodsEnum } from "./enums.js";
2
+
3
+ //#region src/types/request.d.ts
4
+ type GeneralRequestBody = Record<string, unknown>;
5
+ interface GeneralHeaderInterface {
6
+ /**
7
+ * Authorization token. This is required for all HTTP requests made to the graph API.
8
+ * @default 'Bearer '
9
+ */
10
+ Authorization: string;
11
+ /**
12
+ * Content type of the message being sent. This is required for all HTTP requests made to the graph API.
13
+ * @default 'application/json'
14
+ */
15
+ 'Content-Type': string;
16
+ /**
17
+ * User agent field sent in all requests. This is used to gather SDK usage metrics and help
18
+ * better triage support requests.
19
+ * @default `WA_SDK/${ SDK_version } (Node.js ${ process.version })`
20
+ */
21
+ 'User-Agent': string;
22
+ }
23
+ interface RequesterResponseInterface<T> {
24
+ json: () => Promise<T>;
25
+ }
26
+ interface ResponseSuccess {
27
+ success: boolean;
28
+ }
29
+ interface ResponseData<T> {
30
+ data: T;
31
+ }
32
+ interface ResponsePagination<T> {
33
+ data: T[];
34
+ paging: Paging;
35
+ }
36
+ interface Paging {
37
+ cursors: {
38
+ before: string;
39
+ after: string;
40
+ };
41
+ next: string;
42
+ }
43
+ declare class RequesterClass {
44
+ constructor(apiVersion: string, phoneNumberId: number, accessToken: string, businessAcctId: string, userAgent: string);
45
+ sendRequest: (method: HttpMethodsEnum, path: string, timeout: number, body?: GeneralRequestBody, contentType?: string, additionalHeaders?: Record<string, string>) => Promise<RequesterResponseInterface<unknown>>;
46
+ getJson<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: GeneralRequestBody, additionalHeaders?: Record<string, string>): Promise<T>;
47
+ sendFormData<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: FormData, additionalHeaders?: Record<string, string>): Promise<T>;
48
+ sendUrlEncodedForm<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: Record<string, string>, additionalHeaders?: Record<string, string>): Promise<T>;
49
+ }
50
+ //#endregion
51
+ export { GeneralHeaderInterface, GeneralRequestBody, Paging, RequesterClass, RequesterResponseInterface, ResponseData, ResponsePagination, ResponseSuccess };
52
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","names":[],"sources":["../../src/types/request.ts"],"sourcesContent":[],"mappings":";;;KAEY,kBAAA,GAAqB;UAEhB,sBAAA;EAFL;AAEZ;AAqBA;;eACwB,EAAA,MAAA;;;AAGxB;AAIA;EAIiB,cAAA,EAAA,MAAkB;EAAA;;;;AAKnC;EAQqB,YAAA,EAAA,MAAc;;AAUnB,UAnCC,0BAmCD,CAAA,CAAA,CAAA,CAAA;MAGD,EAAA,GAAA,GArCC,OAqCD,CArCS,CAqCT,CAAA;;AAGE,UArCA,eAAA,CAqCA;SAAR,EAAA,OAAA;;AAMM,UAvCE,YAuCF,CAAA,CAAA,CAAA,CAAA;MACa,EAvClB,CAuCkB;;AACrB,UArCU,kBAqCV,CAAA,CAAA,CAAA,CAAA;MAGS,EAvCN,CAuCM,EAAA;QAGE,EAzCN,MAyCM;;AAEH,UAxCE,MAAA,CAwCF;SAAR,EAAA;IAGS,MAAA,EAAA,MAAA;IAGE,KAAA,EAAA,MAAA;;MAEH,EAAA,MAAA;;AAAD,cAxCO,cAAA,CAwCP;;wBA9BE,uDAGD,8DAEa,2BACnB,QAAQ;qBAGD,2DAGD,wCACa,yBACrB,QAAQ;0BAGC,8DAGE,8BACU,yBACrB,QAAQ;gCAGC,8DAGE,4CACU,yBACrB,QAAQ"}
@@ -0,0 +1,23 @@
1
+ //#region src/utils/isMetaError.d.ts
2
+ interface MetaError extends Error {
3
+ error: {
4
+ message: string;
5
+ type: string;
6
+ code: number;
7
+ error_data?: {
8
+ messaging_product: 'whatsapp';
9
+ details: string;
10
+ };
11
+ error_subcode?: number;
12
+ fbtrace_id: string;
13
+ };
14
+ }
15
+ /**
16
+ * Determines if the error is a Meta API error response
17
+ * @param error Any error object to check
18
+ * @returns Type guard indicating if error is a Meta API error
19
+ */
20
+ declare function isMetaError(error: any): error is MetaError;
21
+ //#endregion
22
+ export { MetaError };
23
+ //# sourceMappingURL=isMetaError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isMetaError.d.ts","names":[],"sources":["../../src/utils/isMetaError.ts"],"sourcesContent":[],"mappings":";UAAiB,SAAA,SAAkB;EAAlB,KAAA,EAAA;IAmBD,OAAA,EAAA,MAAW;;;;;;;;;;;;;;;;iBAAX,WAAA,uBAAkC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meta-cloud-api",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "TypeScript wrapper for Meta's Cloud API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,27 +27,24 @@
27
27
  "access": "public"
28
28
  },
29
29
  "exports": {
30
- ".": "./dist/index.js",
31
- "./api": "./dist/api/index.js",
32
- "./api/encryption": "./dist/api/encryption/index.js",
33
- "./api/flow": "./dist/api/flow/index.js",
34
- "./api/media": "./dist/api/media/index.js",
35
- "./api/messages": "./dist/api/messages/index.js",
36
- "./api/messages/builders": "./dist/api/messages/builders/index.js",
37
- "./api/phone": "./dist/api/phone/index.js",
38
- "./api/profile": "./dist/api/profile/index.js",
39
- "./api/qrCode": "./dist/api/qrCode/index.js",
40
- "./api/registration": "./dist/api/registration/index.js",
41
- "./api/template": "./dist/api/template/index.js",
42
- "./api/twoStepVerification": "./dist/api/twoStepVerification/index.js",
43
- "./api/waba": "./dist/api/waba/index.js",
44
- "./core/webhook": "./dist/core/webhook/index.js",
45
- "./core/webhook/frameworks/express": "./dist/core/webhook/frameworks/express.js",
46
- "./core/webhook/frameworks/nextjs": "./dist/core/webhook/frameworks/nextjs.js",
47
- "./core/webhook/frameworks/nextjs-app": "./dist/core/webhook/frameworks/nextjs-app.js",
48
- "./core/whatsapp": "./dist/core/whatsapp/index.js",
49
- "./types": "./dist/types/index.js",
50
- "./utils": "./dist/utils/index.js",
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "import": "./dist/index.js",
33
+ "require": "./dist/index.js",
34
+ "default": "./dist/index.js"
35
+ },
36
+ "./enums": {
37
+ "types": "./dist/enums.d.ts",
38
+ "import": "./dist/enums.js",
39
+ "require": "./dist/enums.js",
40
+ "default": "./dist/enums.js"
41
+ },
42
+ "./types": {
43
+ "types": "./dist/client.d.ts",
44
+ "import": "./dist/client.js",
45
+ "require": "./dist/client.js",
46
+ "default": "./dist/client.js"
47
+ },
51
48
  "./package.json": "./package.json"
52
49
  },
53
50
  "keywords": [
@@ -1,3 +0,0 @@
1
- import{MessageTypesEnum as e}from"./enums-CSUpFXb8.js";import{Logger as t}from"./version-BUuqrHc6.js";import{WhatsApp as n,importConfig as r}from"./whatsapp-B85mxH5f.js";import{FlowTypeEnum as i}from"./common-C6FXBDm7.js";import{isFlowDataExchangeRequest as a,isFlowErrorRequest as o,isFlowPingRequest as s}from"./flowTypeGuards-Gn3-slCW.js";import c from"crypto";const l=new t(`WEBHOOK_UTILS`,process.env.DEBUG===`true`);async function u(e,t,n){try{l.info(`Processing webhook messages request`);let r=await e.json();if(l.info(`Webhook request body:`,r),r.object!==`whatsapp_business_account`){let e=`Received webhook for non-WhatsApp event`;return l.warn(e,{body:r}),new Response(JSON.stringify({error:e}),{status:404})}let i=[];for(let e of r.entry)try{l.info(`Processing webhook entry:`,{entryId:e.id});let r=e.changes;for(let i of r)i.field===`messages`&&(l.info(`Processing messages change:`,{change:i}),await m(e.id,i.value,t,n))}catch(t){let n=`Error processing webhook: ${t}`;l.error(n,{entry:e,error:t}),i.push(n)}return l.info(`Webhook processing complete`,{errorCount:i.length}),new Response(i.length>0?JSON.stringify({errors:i}):null,{status:200})}catch(e){return l.error(`Error processing webhook:`,e),new Response(JSON.stringify({error:`Internal Server Error`}),{status:500})}}async function d(e,t,n,r){try{l.info(`Processing flow request`);let c=await e.text(),u=e.headers.get(`x-hub-signature-256`);if(l.info(`Flow request signature:`,{signature:u}),!f(c,u,t.WEBHOOK_VERIFICATION_TOKEN||``))return l.warn(`Invalid request signature`,{signature:u}),new Response(JSON.stringify({error:`Unauthorized`}),{status:401});let d=JSON.parse(c);l.info(`Flow request data:`,d);let{decryptedBody:p}=g(d,t);l.info(`Decrypted flow request:`,p);let m=r.get(i.All);if(!m)return l.warn(`No handler registered for flow action:`,{action:p.action}),new Response(JSON.stringify({error:`Handler not found`}),{status:404});if(s(p))return l.info(`Handling flow ping request`),new Response(JSON.stringify({version:`3.0`,data:{status:`active`}}),{status:200});if(o(p))return l.warn(`Flow error request received:`,p),new Response(null,{status:200});if(a(p)){l.info(`Processing flow data exchange request`);let e=await m(n,p);l.info(`Flow handler result:`,e);let t=_(e,Buffer.from(d.aes_key,`base64`),Buffer.from(d.initial_vector,`base64`));return l.info(`Encrypted flow response generated`),new Response(JSON.stringify(t),{status:200})}return l.warn(`Unknown flow request type:`,p),new Response(JSON.stringify({error:`Unknown request type`}),{status:400})}catch(e){return l.error(`Error handling flow request:`,e),new Response(JSON.stringify({error:`Internal server error`}),{status:500})}}function f(e,t,n){if(!t)return l.warn(`Missing signature in request`),!1;l.info(`Signature verification details:`,{bodyLength:e.length,verificationTokenLength:n.length,rawSignature:t,cleanedSignature:t.replace(`sha256=`,``)});let r=c.createHmac(`sha256`,n).update(e).digest(`hex`);return l.info(`Signature verification:`,{received:t.replace(`sha256=`,``),expected:r}),c.timingSafeEqual(Buffer.from(t.replace(`sha256=`,``)),Buffer.from(r))}function p(e,t){let n=e[`x-forwarded-proto`]||`http`,r=e.host||`localhost`;return`${n}://${r}${t||`/`}`}async function m(t,n,r,i){l.info(`Processing messages:`,{waba_id:t,value:n});let a=n.metadata,o=n.contacts,s=t,c=a?.display_phone_number||``,u=a?.phone_number_id||``,d=o?.[0]?.profile?.name||``;if(n.statuses&&n.statuses.length>0){l.info(`Processing statuses:`,{statusCount:n.statuses.length});let t=n.statuses;for(let a of t){let t={wabaId:s,id:a.id,from:a.recipient_id,timestamp:a.timestamp,type:e.Statuses,phoneNumberId:u,displayPhoneNumber:c,profileName:d,statuses:n.statuses[0],originalData:a};l.info(`Processing status:`,t),await h(i.messageHandlers.get(e.Statuses),r,t,e.Statuses)}return}if(n.messages&&n.messages.length>0){l.info(`Processing messages:`,{messageCount:n.messages.length});let t=n.messages;for(let n of t){let t=n.type;l.info(`Processing message:`,{messageType:t,messageId:n.id});let a={wabaId:s,id:n.id,from:n.from,timestamp:n.timestamp,type:n.type,phoneNumberId:u,displayPhoneNumber:c,profileName:d,originalData:n};switch(t){case e.Text:a.text=n.text;break;case e.Image:a.image=n.image;break;case e.Video:a.video=n.video;break;case e.Audio:a.audio=n.audio;break;case e.Document:a.document=n.document;break;case e.Sticker:a.sticker=n.sticker;break;case e.Location:a.location=n.location;break;case e.Contacts:a.contacts=n.contacts;break;case e.Interactive:a.interactive=n.interactive;break;case e.Button:a.button=n.button;break;case e.Order:a.order=n.order;break;case e.System:a.system=n.system;break;case e.Reaction:a.reaction=n.reaction;break;default:l.warn(`Unknown message type:`,{messageType:t});break}l.info(`Executing message handlers`),await h(i.preProcessHandler,r,a,`pre-process`),await h(i.messageHandlers.get(t),r,a,t),await h(i.postProcessHandler,r,a,`post-process`)}}}async function h(e,t,n,r){if(e)try{l.info(`Executing handler:`,{handlerType:r,messageId:n.id}),await e(t,n),l.info(`Handler execution complete:`,{handlerType:r,messageId:n.id})}catch(e){l.error(`Error in ${r} handler:`,{error:e,messageId:n.id})}else l.info(`No handler registered:`,{handlerType:r})}function g(e,t){l.info(`Decrypting flow request`);let{encrypted_aes_key:n,encrypted_flow_data:r,initial_vector:i}=e;if(!n||!r||!i)throw l.error(`Missing required encryption properties`),Error(`Missing required encryption properties`);let a=t.FLOW_API_PRIVATE_PEM.replace(/\\n/g,`
2
- `),o=t.FLOW_API_PASSPHRASE,s=c.createPrivateKey({key:a,passphrase:o}),u;try{l.info(`Decrypting AES key`),u=c.privateDecrypt({key:s,padding:c.constants.RSA_PKCS1_OAEP_PADDING,oaepHash:`sha256`},Buffer.from(n,`base64`))}catch(e){throw l.error(`Failed to decrypt AES key:`,e),Error(`Failed to decrypt the request. Please verify your private key.`)}let d=Buffer.from(r,`base64`),f=Buffer.from(i,`base64`),p=d.subarray(0,-16),m=d.subarray(-16);l.info(`Decrypting flow data`);let h=c.createDecipheriv(`aes-128-gcm`,u,f);h.setAuthTag(m);let g=Buffer.concat([h.update(p),h.final()]).toString(`utf-8`);return l.info(`Flow request decryption complete`),{decryptedBody:JSON.parse(g),aesKeyBuffer:u,initialVectorBuffer:f}}function _(e,t,n){l.info(`Encrypting flow response`);let r=[];for(let e of Array.from(n.entries()))r.push(~e[1]);try{let n=c.createCipheriv(`aes-128-gcm`,t,Buffer.from(r)),i=Buffer.concat([n.update(JSON.stringify(e||{}),`utf-8`),n.final(),n.getAuthTag()]).toString(`base64`);return l.info(`Flow response encryption complete`),i}catch(e){throw l.error(`Response encryption error:`,e),Error(`Failed to encrypt response. Internal server error.`)}}const v=new t(`WEBHOOK_PROCESSOR`,process.env.DEBUG===`true`);var y=class{config;client;messageHandlers=new Map;preProcessHandler=void 0;postProcessHandler=void 0;flowHandlers=new Map;constructor(e){this.config=r(e),this.client=new n(e),v.log(`WebhookProcessor instantiated`)}async processVerification(e,t,n){return e===`subscribe`&&t===this.config.WEBHOOK_VERIFICATION_TOKEN?{status:200,body:n||``,headers:{"Content-Type":`text/plain`}}:{status:403,body:JSON.stringify({error:`Forbidden`}),headers:{"Content-Type":`application/json`}}}async processWebhook(e){try{let t=await u(e,this.client,{messageHandlers:this.messageHandlers,preProcessHandler:this.preProcessHandler,postProcessHandler:this.postProcessHandler}),n=await t.text(),r=t.headers.get(`content-type`)||`application/json`;return{status:t.status,body:n,headers:{"Content-Type":r}}}catch(e){return v.log(`Error processing webhook: ${e}`),{status:500,body:JSON.stringify({error:`Internal Server Error`}),headers:{"Content-Type":`application/json`}}}}async processFlow(e){try{let t=await d(e,this.config,this.client,this.flowHandlers),n=await t.text(),r=t.headers.get(`content-type`)||`application/json`;return{status:t.status,body:n,headers:{"Content-Type":r}}}catch(e){return v.log(`Error processing flow: ${e}`),{status:500,body:JSON.stringify({error:`Internal Server Error`}),headers:{"Content-Type":`application/json`}}}}onMessage(e,t){this.messageHandlers.set(e,t),v.log(`Registered message handler for ${e}`)}onMessagePreProcess(e){this.preProcessHandler=e,v.log(`Registered pre-process handler`)}onMessagePostProcess(e){this.postProcessHandler=e,v.log(`Registered post-process handler`)}onFlow(e,t){this.flowHandlers.set(e,t),v.log(`Registered flow handler for ${e}`)}getClient(){return this.client}getConfig(){return this.config}};export{y as WebhookProcessor,p as constructFullUrl,d as processFlowRequest,u as processWebhookMessages};
3
- //# sourceMappingURL=WebhookProcessor-BUZFeZD_.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WebhookProcessor-BUZFeZD_.js","names":["LOGGER","errors: string[]","processedStatus: WebhookMessage","processedMessage: WebhookMessage","decryptedAesKey: Buffer","flipped_iv: number[]"],"sources":["../src/core/webhook/utils/webhookUtils.ts","../src/core/webhook/WebhookProcessor.ts"],"sourcesContent":["import crypto from 'crypto';\nimport { FlowEndpointRequest } from '../../../api/flow';\nimport { FlowTypeEnum } from '../../../api/flow/types';\nimport { WabaConfigType } from '../../../types/config';\nimport { MessageTypesEnum } from '../../../types/enums';\nimport { isFlowDataExchangeRequest, isFlowErrorRequest, isFlowPingRequest } from '../../../utils/flowTypeGuards';\nimport Logger from '../../../utils/logger';\nimport { WhatsApp } from '../../whatsapp';\nimport { WebhookMessage, WebhookMessageValue } from '../types';\n\nconst LIB_NAME = 'WEBHOOK_UTILS';\nconst LOGGER = new Logger(LIB_NAME, process.env.DEBUG === 'true');\n\nexport type MessageHandler = (whatsapp: WhatsApp, message: WebhookMessage) => void | Promise<void>;\nexport type FlowHandler = (whatsapp: WhatsApp, request: FlowEndpointRequest) => any | Promise<any>;\n\n/**\n * Process webhook messages\n */\nexport async function processWebhookMessages(\n request: Request,\n whatsapp: WhatsApp,\n handlers: {\n messageHandlers: Map<MessageTypesEnum, MessageHandler>;\n preProcessHandler?: MessageHandler;\n postProcessHandler?: MessageHandler;\n },\n): Promise<Response> {\n try {\n LOGGER.info('Processing webhook messages request');\n const body = await request.json();\n LOGGER.info('Webhook request body:', body);\n\n // Check this is a WhatsApp Business Account webhook\n if (body.object !== 'whatsapp_business_account') {\n const errorMsg = 'Received webhook for non-WhatsApp event';\n LOGGER.warn(errorMsg, { body });\n return new Response(JSON.stringify({ error: errorMsg }), { status: 404 });\n }\n\n const errors: string[] = [];\n\n // Process each entry\n for (const entry of body.entry) {\n try {\n LOGGER.info('Processing webhook entry:', { entryId: entry.id });\n const changes = entry.changes;\n for (const change of changes) {\n if (change.field === 'messages') {\n LOGGER.info('Processing messages change:', { change });\n await processMessages(entry.id, change.value, whatsapp, handlers);\n }\n }\n } catch (error) {\n const errorMsg = `Error processing webhook: ${error}`;\n LOGGER.error(errorMsg, { entry, error });\n errors.push(errorMsg);\n }\n }\n\n LOGGER.info('Webhook processing complete', { errorCount: errors.length });\n return new Response(errors.length > 0 ? JSON.stringify({ errors }) : null, { status: 200 });\n } catch (error) {\n LOGGER.error('Error processing webhook:', error);\n return new Response(JSON.stringify({ error: 'Internal Server Error' }), { status: 500 });\n }\n}\n\n/**\n * Handle flow requests\n */\nexport async function processFlowRequest(\n request: Request,\n config: WabaConfigType,\n whatsapp: WhatsApp,\n flowHandlers: Map<FlowTypeEnum, FlowHandler>,\n): Promise<Response> {\n try {\n LOGGER.info('Processing flow request');\n const body = await request.text();\n const signature = request.headers.get('x-hub-signature-256');\n LOGGER.info('Flow request signature:', { signature });\n\n // Validate request signature\n if (!verifySignature(body, signature, config.WEBHOOK_VERIFICATION_TOKEN || '')) {\n LOGGER.warn('Invalid request signature', { signature });\n return new Response(JSON.stringify({ error: 'Unauthorized' }), { status: 401 });\n }\n\n const data = JSON.parse(body);\n LOGGER.info('Flow request data:', data);\n\n // Decrypt the request\n const { decryptedBody } = decryptFlowRequest(data, config);\n LOGGER.info('Decrypted flow request:', decryptedBody);\n\n // Get the flow handler\n const handler = flowHandlers.get(FlowTypeEnum.All);\n if (!handler) {\n LOGGER.warn('No handler registered for flow action:', { action: decryptedBody.action });\n return new Response(JSON.stringify({ error: 'Handler not found' }), { status: 404 });\n }\n\n // Handle different flow types\n if (isFlowPingRequest(decryptedBody)) {\n LOGGER.info('Handling flow ping request');\n return new Response(\n JSON.stringify({\n version: '3.0',\n data: { status: 'active' },\n }),\n { status: 200 },\n );\n }\n\n if (isFlowErrorRequest(decryptedBody)) {\n LOGGER.warn('Flow error request received:', decryptedBody);\n return new Response(null, { status: 200 });\n }\n\n if (isFlowDataExchangeRequest(decryptedBody)) {\n LOGGER.info('Processing flow data exchange request');\n const result = await handler(whatsapp, decryptedBody);\n LOGGER.info('Flow handler result:', result);\n\n const encryptedResponse = encryptFlowResponse(\n result,\n Buffer.from(data.aes_key, 'base64'),\n Buffer.from(data.initial_vector, 'base64'),\n );\n LOGGER.info('Encrypted flow response generated');\n\n return new Response(JSON.stringify(encryptedResponse), { status: 200 });\n }\n\n LOGGER.warn('Unknown flow request type:', decryptedBody);\n return new Response(JSON.stringify({ error: 'Unknown request type' }), { status: 400 });\n } catch (error) {\n LOGGER.error('Error handling flow request:', error);\n return new Response(JSON.stringify({ error: 'Internal server error' }), { status: 500 });\n }\n}\n\n/**\n * Verify webhook signature\n */\nfunction verifySignature(body: string, signature: string | null, verificationToken: string): boolean {\n if (!signature) {\n LOGGER.warn('Missing signature in request');\n return false;\n }\n\n LOGGER.info('Signature verification details:', {\n bodyLength: body.length,\n verificationTokenLength: verificationToken.length,\n rawSignature: signature,\n cleanedSignature: signature.replace('sha256=', ''),\n });\n\n const expectedSignature = crypto.createHmac('sha256', verificationToken).update(body).digest('hex');\n LOGGER.info('Signature verification:', {\n received: signature.replace('sha256=', ''),\n expected: expectedSignature,\n });\n\n return crypto.timingSafeEqual(Buffer.from(signature.replace('sha256=', '')), Buffer.from(expectedSignature));\n}\n\n/**\n * Constructs a full URL from framework-specific request headers and URL\n * @param headers - Request headers containing host and protocol information\n * @param url - Relative URL path\n * @returns Full URL string\n */\nexport function constructFullUrl(headers: Record<string, string | string[] | undefined>, url?: string): string {\n const protocol = headers['x-forwarded-proto'] || 'http';\n const host = headers.host || 'localhost';\n const path = url || '/';\n return `${protocol}://${host}${path}`;\n}\n\n/**\n * Private helper functions\n */\nasync function processMessages(\n waba_id: string,\n value: WebhookMessageValue,\n whatsapp: WhatsApp,\n handlers: {\n messageHandlers: Map<MessageTypesEnum, MessageHandler>;\n preProcessHandler?: MessageHandler;\n postProcessHandler?: MessageHandler;\n },\n): Promise<void> {\n LOGGER.info('Processing messages:', { waba_id, value });\n\n const metadata = value.metadata;\n const contacts = value.contacts;\n const wabaId = waba_id;\n const displayPhoneNumber = metadata?.display_phone_number || '';\n const phoneNumberId = metadata?.phone_number_id || '';\n const profileName = contacts?.[0]?.profile?.name || '';\n\n if (value.statuses && value.statuses.length > 0) {\n LOGGER.info('Processing statuses:', { statusCount: value.statuses.length });\n const statuses = value.statuses;\n for (const status of statuses) {\n const processedStatus: WebhookMessage = {\n wabaId,\n id: status.id,\n from: status.recipient_id,\n timestamp: status.timestamp,\n type: MessageTypesEnum.Statuses,\n phoneNumberId,\n displayPhoneNumber,\n profileName,\n statuses: value.statuses[0],\n originalData: status,\n };\n\n LOGGER.info('Processing status:', processedStatus);\n await executeHandler(\n handlers.messageHandlers.get(MessageTypesEnum.Statuses),\n whatsapp,\n processedStatus,\n MessageTypesEnum.Statuses,\n );\n }\n return;\n }\n\n if (value.messages && value.messages.length > 0) {\n LOGGER.info('Processing messages:', { messageCount: value.messages.length });\n const messages = value.messages;\n\n for (const message of messages) {\n const messageType = message.type;\n LOGGER.info('Processing message:', { messageType, messageId: message.id });\n\n const processedMessage: WebhookMessage = {\n wabaId,\n id: message.id,\n from: message.from,\n timestamp: message.timestamp,\n type: message.type,\n phoneNumberId,\n displayPhoneNumber,\n profileName,\n originalData: message,\n };\n\n switch (messageType) {\n case MessageTypesEnum.Text:\n processedMessage.text = message.text;\n break;\n case MessageTypesEnum.Image:\n processedMessage.image = message.image;\n break;\n case MessageTypesEnum.Video:\n processedMessage.video = message.video;\n break;\n case MessageTypesEnum.Audio:\n processedMessage.audio = message.audio;\n break;\n case MessageTypesEnum.Document:\n processedMessage.document = message.document;\n break;\n case MessageTypesEnum.Sticker:\n processedMessage.sticker = message.sticker;\n break;\n case MessageTypesEnum.Location:\n processedMessage.location = message.location;\n break;\n case MessageTypesEnum.Contacts:\n processedMessage.contacts = message.contacts;\n break;\n case MessageTypesEnum.Interactive:\n processedMessage.interactive = message.interactive;\n break;\n case MessageTypesEnum.Button:\n processedMessage.button = message.button;\n break;\n case MessageTypesEnum.Order:\n processedMessage.order = message.order;\n break;\n case MessageTypesEnum.System:\n processedMessage.system = message.system;\n break;\n case MessageTypesEnum.Reaction:\n processedMessage.reaction = message.reaction;\n break;\n default:\n LOGGER.warn('Unknown message type:', { messageType });\n break;\n }\n\n // Execute handlers in sequence\n LOGGER.info('Executing message handlers');\n await executeHandler(handlers.preProcessHandler, whatsapp, processedMessage, 'pre-process');\n await executeHandler(handlers.messageHandlers.get(messageType), whatsapp, processedMessage, messageType);\n await executeHandler(handlers.postProcessHandler, whatsapp, processedMessage, 'post-process');\n }\n }\n}\n\nasync function executeHandler(\n handler: MessageHandler | undefined,\n whatsapp: WhatsApp,\n message: WebhookMessage,\n handlerType: string,\n): Promise<void> {\n if (handler) {\n try {\n LOGGER.info('Executing handler:', { handlerType, messageId: message.id });\n await handler(whatsapp, message);\n LOGGER.info('Handler execution complete:', { handlerType, messageId: message.id });\n } catch (error) {\n LOGGER.error(`Error in ${handlerType} handler:`, { error, messageId: message.id });\n }\n } else {\n LOGGER.info('No handler registered:', { handlerType });\n }\n}\n\nfunction decryptFlowRequest(\n body: any,\n config: WabaConfigType,\n): {\n decryptedBody: FlowEndpointRequest;\n aesKeyBuffer: Buffer;\n initialVectorBuffer: Buffer;\n} {\n LOGGER.info('Decrypting flow request');\n const { encrypted_aes_key, encrypted_flow_data, initial_vector } = body;\n\n if (!encrypted_aes_key || !encrypted_flow_data || !initial_vector) {\n LOGGER.error('Missing required encryption properties');\n throw new Error('Missing required encryption properties');\n }\n\n const privatePem = config.FLOW_API_PRIVATE_PEM.replace(/\\\\n/g, '\\n');\n const passphrase = config.FLOW_API_PASSPHRASE;\n\n const privateKey = crypto.createPrivateKey({ key: privatePem, passphrase });\n let decryptedAesKey: Buffer;\n\n try {\n LOGGER.info('Decrypting AES key');\n decryptedAesKey = crypto.privateDecrypt(\n {\n key: privateKey,\n padding: crypto.constants.RSA_PKCS1_OAEP_PADDING,\n oaepHash: 'sha256',\n },\n Buffer.from(encrypted_aes_key, 'base64'),\n );\n } catch (error) {\n LOGGER.error('Failed to decrypt AES key:', error);\n throw new Error('Failed to decrypt the request. Please verify your private key.');\n }\n\n const flowDataBuffer = Buffer.from(encrypted_flow_data, 'base64');\n const initialVectorBuffer = Buffer.from(initial_vector, 'base64');\n\n const TAG_LENGTH = 16;\n const encrypted_flow_data_body = flowDataBuffer.subarray(0, -TAG_LENGTH);\n const encrypted_flow_data_tag = flowDataBuffer.subarray(-TAG_LENGTH);\n\n LOGGER.info('Decrypting flow data');\n const decipher = crypto.createDecipheriv('aes-128-gcm', decryptedAesKey, initialVectorBuffer);\n decipher.setAuthTag(encrypted_flow_data_tag);\n\n const decryptedJSONString = Buffer.concat([decipher.update(encrypted_flow_data_body), decipher.final()]).toString(\n 'utf-8',\n );\n\n LOGGER.info('Flow request decryption complete');\n return {\n decryptedBody: JSON.parse(decryptedJSONString),\n aesKeyBuffer: decryptedAesKey,\n initialVectorBuffer,\n };\n}\n\nfunction encryptFlowResponse(response: any, aesKeyBuffer: Buffer, initialVectorBuffer: Buffer): string {\n LOGGER.info('Encrypting flow response');\n const flipped_iv: number[] = [];\n for (const pair of Array.from(initialVectorBuffer.entries())) {\n flipped_iv.push(~pair[1]);\n }\n\n try {\n const cipher = crypto.createCipheriv('aes-128-gcm', aesKeyBuffer, Buffer.from(flipped_iv));\n const encryptedResponse = Buffer.concat([\n cipher.update(JSON.stringify(response || {}), 'utf-8'),\n cipher.final(),\n cipher.getAuthTag(),\n ]).toString('base64');\n\n LOGGER.info('Flow response encryption complete');\n return encryptedResponse;\n } catch (error) {\n LOGGER.error('Response encryption error:', error);\n throw new Error('Failed to encrypt response. Internal server error.');\n }\n}\n","import { FlowTypeEnum } from '../../api/flow/types';\nimport { importConfig } from '../../config/importConfig';\nimport { WabaConfigType, WhatsAppConfig } from '../../types/config';\nimport { MessageTypesEnum } from '../../types/enums';\nimport Logger from '../../utils/logger';\nimport { WhatsApp } from '../whatsapp';\nimport { FlowHandler, MessageHandler, processFlowRequest, processWebhookMessages } from './utils/webhookUtils';\n\nconst LOGGER = new Logger('WEBHOOK_PROCESSOR', process.env.DEBUG === 'true');\n\nexport interface WebhookResponse {\n status: number;\n body: string;\n headers: Record<string, string>;\n}\n\nexport class WebhookProcessor {\n private config: WabaConfigType;\n private client: WhatsApp;\n private messageHandlers: Map<MessageTypesEnum, MessageHandler> = new Map();\n private preProcessHandler: MessageHandler | undefined = undefined;\n private postProcessHandler: MessageHandler | undefined = undefined;\n private flowHandlers: Map<FlowTypeEnum, FlowHandler> = new Map();\n\n constructor(config: WhatsAppConfig) {\n this.config = importConfig(config);\n this.client = new WhatsApp(config);\n LOGGER.log('WebhookProcessor instantiated');\n }\n\n async processVerification(\n mode: string | null,\n token: string | null,\n challenge: string | null,\n ): Promise<WebhookResponse> {\n if (mode === 'subscribe' && token === this.config.WEBHOOK_VERIFICATION_TOKEN) {\n return {\n status: 200,\n body: challenge || '',\n headers: { 'Content-Type': 'text/plain' },\n };\n }\n\n return {\n status: 403,\n body: JSON.stringify({ error: 'Forbidden' }),\n headers: { 'Content-Type': 'application/json' },\n };\n }\n\n async processWebhook(request: Request): Promise<WebhookResponse> {\n try {\n const webResponse = await processWebhookMessages(request, this.client, {\n messageHandlers: this.messageHandlers,\n preProcessHandler: this.preProcessHandler,\n postProcessHandler: this.postProcessHandler,\n });\n\n const body = await webResponse.text();\n const contentType = webResponse.headers.get('content-type') || 'application/json';\n\n return {\n status: webResponse.status,\n body,\n headers: { 'Content-Type': contentType },\n };\n } catch (error) {\n LOGGER.log(`Error processing webhook: ${error}`);\n return {\n status: 500,\n body: JSON.stringify({ error: 'Internal Server Error' }),\n headers: { 'Content-Type': 'application/json' },\n };\n }\n }\n\n async processFlow(request: Request): Promise<WebhookResponse> {\n try {\n const webResponse = await processFlowRequest(request, this.config, this.client, this.flowHandlers);\n const body = await webResponse.text();\n const contentType = webResponse.headers.get('content-type') || 'application/json';\n\n return {\n status: webResponse.status,\n body,\n headers: { 'Content-Type': contentType },\n };\n } catch (error) {\n LOGGER.log(`Error processing flow: ${error}`);\n return {\n status: 500,\n body: JSON.stringify({ error: 'Internal Server Error' }),\n headers: { 'Content-Type': 'application/json' },\n };\n }\n }\n\n onMessage(type: MessageTypesEnum, handler: MessageHandler): void {\n this.messageHandlers.set(type, handler);\n LOGGER.log(`Registered message handler for ${type}`);\n }\n\n onMessagePreProcess(handler: MessageHandler): void {\n this.preProcessHandler = handler;\n LOGGER.log('Registered pre-process handler');\n }\n\n onMessagePostProcess(handler: MessageHandler): void {\n this.postProcessHandler = handler;\n LOGGER.log('Registered post-process handler');\n }\n\n onFlow(type: FlowTypeEnum, handler: FlowHandler): void {\n this.flowHandlers.set(type, handler);\n LOGGER.log(`Registered flow handler for ${type}`);\n }\n\n getClient(): WhatsApp {\n return this.client;\n }\n\n getConfig(): WabaConfigType {\n return this.config;\n }\n}\n"],"mappings":"4WAWA,MAAMA,EAAS,IAAI,EADF,gBACmB,QAAQ,IAAI,QAAU,OAAO,CAQjE,eAAsB,EAClB,EACA,EACA,EAKiB,CACjB,GAAI,CACA,EAAO,KAAK,sCAAsC,CAClD,IAAM,EAAO,MAAM,EAAQ,MAAM,CAIjC,GAHA,EAAO,KAAK,wBAAyB,EAAK,CAGtC,EAAK,SAAW,4BAA6B,CAC7C,IAAM,EAAW,0CAEjB,OADA,EAAO,KAAK,EAAU,CAAE,OAAM,CAAC,CACxB,IAAI,SAAS,KAAK,UAAU,CAAE,MAAO,EAAU,CAAC,CAAE,CAAE,OAAQ,IAAK,CAAC,CAG7E,IAAMC,EAAmB,EAAE,CAG3B,IAAK,IAAM,KAAS,EAAK,MACrB,GAAI,CACA,EAAO,KAAK,4BAA6B,CAAE,QAAS,EAAM,GAAI,CAAC,CAC/D,IAAM,EAAU,EAAM,QACtB,IAAK,IAAM,KAAU,EACb,EAAO,QAAU,aACjB,EAAO,KAAK,8BAA+B,CAAE,SAAQ,CAAC,CACtD,MAAM,EAAgB,EAAM,GAAI,EAAO,MAAO,EAAU,EAAS,QAGpE,EAAO,CACZ,IAAM,EAAW,6BAA6B,IAC9C,EAAO,MAAM,EAAU,CAAE,QAAO,QAAO,CAAC,CACxC,EAAO,KAAK,EAAS,CAK7B,OADA,EAAO,KAAK,8BAA+B,CAAE,WAAY,EAAO,OAAQ,CAAC,CAClE,IAAI,SAAS,EAAO,OAAS,EAAI,KAAK,UAAU,CAAE,SAAQ,CAAC,CAAG,KAAM,CAAE,OAAQ,IAAK,CAAC,OACtF,EAAO,CAEZ,OADA,EAAO,MAAM,4BAA6B,EAAM,CACzC,IAAI,SAAS,KAAK,UAAU,CAAE,MAAO,wBAAyB,CAAC,CAAE,CAAE,OAAQ,IAAK,CAAC,EAOhG,eAAsB,EACl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AAQ,IAAI,eAAe,EAAI,mBAE/D,MAAO,CACH,OAAQ,EAAY,OACpB,OACA,QAAS,CAAE,eAAgB,EAAa,CAC3C,OACI,EAAO,CAEZ,OADA,EAAO,IAAI,0BAA0B,IAAQ,CACtC,CACH,OAAQ,IACR,KAAM,KAAK,UAAU,CAAE,MAAO,wBAAyB,CAAC,CACxD,QAAS,CAAE,eAAgB,mBAAoB,CAClD,EAIT,UAAU,EAAwB,EAA+B,CAC7D,KAAK,gBAAgB,IAAI,EAAM,EAAQ,CACvC,EAAO,IAAI,kCAAkC,IAAO,CAGxD,oBAAoB,EAA+B,CAC/C,KAAK,kBAAoB,EACzB,EAAO,IAAI,iCAAiC,CAGhD,qBAAqB,EAA+B,CAChD,KAAK,mBAAqB,EAC1B,EAAO,IAAI,kCAAkC,CAGjD,OAAO,EAAoB,EAA4B,CACnD,KAAK,aAAa,IAAI,EAAM,EAAQ,CACpC,EAAO,IAAI,+BAA+B,IAAO,CAGrD,WAAsB,CAClB,OAAO,KAAK,OAGhB,WAA4B,CACxB,OAAO,KAAK"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"WebhookProcessor-Dq2Pa2cY.d.ts","names":[],"sources":["../src/core/webhook/types.ts","../src/core/webhook/utils/webhookUtils.ts","../src/core/webhook/WebhookProcessor.ts"],"sourcesContent":[],"mappings":";;;;;UAEiB,cAAA;;;;EAAA,KAAA,EAAA,MAAA;EAuBA;;;SA8CJ,CAAA,EAAA,MAAA;EAAK;AA4BlB;;SACU,EAAA;IAD2B;;AAcrC;IAA8B,IAAA,EAAA,MAAA;;;;AAyB9B;;AACU,UAlHO,WAAA,CAkHU;MADW,MAAA;EAAW,IAAA,EAAA,MAAA;EAyBhC,SAAA,EAAA,MAAa;EAAA,IAAA,EAtIpB,gBAsIoB;;;;EAqBb,OAAA,CAAA,EAAA;IAAgB;;;IAAmB,EAAA,CAAA,EAAA,MAAA;IA6BnC;;;IAAuB,IAAA,CAAA,EAAA,MAAA;IAAW;AAqBnD;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gFoB,CEhFZ,eFgFY,CAAA;gBADW,CAAA,OAAA,EE/DJ,OF+DI,CAAA,EE/DM,OF+DN,CE/Dc,eF+Dd,CAAA;EAAW,WAAA,CAAA,OAAA,EErClB,OFqCkB,CAAA,EErCR,OFqCQ,CErCA,eFqCA,CAAA;EAyBhC,SAAA,CAAA,IAAA,EEzCG,gBFyCU,EAAA,OAAA,EEzCiB,cFyCjB,CAAA,EAAA,IAAA;EAAA,mBAAA,CAAA,OAAA,EEpCG,cFoCH,CAAA,EAAA,IAAA;sBACH,CAAA,OAAA,EEhCO,cFgCP,CAAA,EAAA,IAAA;QADW,CAAA,IAAA,EE1BrB,YF0BqB,EAAA,OAAA,EE1BE,WF0BF,CAAA,EAAA,IAAA;EAAW,SAAA,CAAA,CAAA,EErBhC,QFqBgC;EAyBhC,SAAA,CAAA,CAAA,EE1CA,cF0Ca"}
@@ -1,3 +0,0 @@
1
- import "../../base-CfDkvT1x.js";
2
- import { EncryptionApi, EncryptionClass, EncryptionPublicKeyResponse } from "../../index-CaGffSja.js";
3
- export { EncryptionApi, EncryptionApi as default, EncryptionClass, EncryptionPublicKeyResponse };
@@ -1 +0,0 @@
1
- import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import{EncryptionApi as e,encryption_default as t}from"../../encryption-Cwc0xcVL.js";export{e as EncryptionApi,t as default};
@@ -1,5 +0,0 @@
1
- import "../../base-CfDkvT1x.js";
2
- import "../../index-DQkgkiB6.js";
3
- import { CreateFlowResponse, Flow, FlowActionEnum, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowEndpointRequest, FlowEndpointResponse, FlowMigrationResponse, FlowPreviewResponse, FlowStatusEnum, FlowType, FlowTypeEnum, FlowValidationError, FlowsListResponse, UpdateFlowResponse, ValidateFlowJsonResponse } from "../../common-CvPVD1o6.js";
4
- import { FlowApi } from "../../index-CoyByMuM.js";
5
- export { CreateFlowResponse, Flow, FlowActionEnum, FlowApi, FlowApi as default, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowEndpointRequest, FlowEndpointResponse, FlowMigrationResponse, FlowPreviewResponse, FlowStatusEnum, FlowType, FlowTypeEnum, FlowValidationError, FlowsListResponse, UpdateFlowResponse, ValidateFlowJsonResponse };
@@ -1 +0,0 @@
1
- import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import{FlowApi as e,flow_default as t}from"../../flow-CVes0Qus.js";import{FlowTypeEnum as n}from"../../common-C6FXBDm7.js";export{e as FlowApi,n as FlowTypeEnum,t as default};
@@ -1,17 +0,0 @@
1
- import "../base-CfDkvT1x.js";
2
- import { EncryptionApi, EncryptionClass, EncryptionPublicKeyResponse } from "../index-CaGffSja.js";
3
- import "../index-DQkgkiB6.js";
4
- import { CreateFlowResponse, Flow, FlowActionEnum, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowEndpointRequest, FlowEndpointResponse, FlowMigrationResponse, FlowPreviewResponse, FlowStatusEnum, FlowType, FlowTypeEnum, FlowValidationError, FlowsListResponse, UpdateFlowResponse, ValidateFlowJsonResponse } from "../common-CvPVD1o6.js";
5
- import { FlowApi } from "../index-CoyByMuM.js";
6
- import { MediaApi, MediaClass, MediaResponse, MediasResponse, UploadMediaResponse } from "../index-a_YS40Iv.js";
7
- import { AudioMediaObject, ContactObject, DocumentMediaObject, ImageMediaObject, InteractiveObject, LocationObject, MessageRequestParams, MessageTemplateObject, MessagesResponse, ReactionParams, StatusParams, StickerMediaObject, TextMessageParams, TextObject, VideoMediaObject } from "../common-CVbsmD26.js";
8
- import { MessagesApi } from "../index-d7TLqtYh.js";
9
- import { AccountMode, CodeVerificationStatus, Cursors, HealthStatus, HealthStatusEntity, MessagingLimitTier, PhoneNumberApi, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, QualityRating, QualityScore, RequestVerificationCodeRequest, Throughput, ThroughputLevel, TwoStepVerificationParams, VerifyCodeRequest } from "../index-_-06JPan.js";
10
- import { BusinessProfileApi, BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, CreateUploadSessionParams, GetUploadHandleParams, UpdateBusinessProfileRequest, UploadBusinessProfileResponse, UploadHandle, UploadMediaParams, UploadSession, UploadSessionResponse } from "../index-3KglHVAg.js";
11
- import { CreateQrCodeRequest, QrCodeApi, QrCodeClass, QrCodeResponse, QrCodesResponse, UpdateQrCodeRequest } from "../index-BNeg6hHx.js";
12
- import { RegistrationApi, RegistrationClass, RegistrationRequest } from "../index-BmfnREgM.js";
13
- import { TemplateApi, TemplateClass, TemplateDeleteParams, TemplateGetParams, TemplateRequestBody, TemplateResponse } from "../index-CwujtcvH.js";
14
- import { TwoStepVerificationApi, TwoStepVerificationClass, TwoStepVerificationRequest } from "../index-BiTq23oi.js";
15
- import { UpdateWabaSubscription, WABAClass, WabaAccount, WabaApi, WabaSubscriptions } from "../index-CeTmbIXi.js";
16
- import "../index-LKrIp3Oo.js";
17
- export { AccountMode, AudioMediaObject, BusinessProfileApi, BusinessProfileClass, BusinessProfileData, BusinessProfileField, BusinessProfileFieldsParam, BusinessProfileResponse, CodeVerificationStatus, ContactObject, CreateFlowResponse, CreateQrCodeRequest, CreateUploadSessionParams, Cursors, DocumentMediaObject, EncryptionApi, EncryptionClass, EncryptionPublicKeyResponse, Flow, FlowActionEnum, FlowApi, FlowAssetsResponse, FlowCategoryEnum, FlowClass, FlowEndpointRequest, FlowEndpointResponse, FlowMigrationResponse, FlowPreviewResponse, FlowStatusEnum, FlowType, FlowTypeEnum, FlowValidationError, FlowsListResponse, GetUploadHandleParams, HealthStatus, HealthStatusEntity, ImageMediaObject, InteractiveObject, LocationObject, MediaApi, MediaClass, MediaResponse, MediasResponse, MessageRequestParams, MessageTemplateObject, MessagesApi, MessagesResponse, MessagingLimitTier, PhoneNumberApi, PhoneNumberClass, PhoneNumberResponse, PhoneNumbersResponse, PlatformType, QrCodeApi, QrCodeClass, QrCodeResponse, QrCodesResponse, QualityRating, QualityScore, ReactionParams, RegistrationApi, RegistrationClass, RegistrationRequest, RequestVerificationCodeRequest, StatusParams, StickerMediaObject, TemplateApi, TemplateClass, TemplateDeleteParams, TemplateGetParams, TemplateRequestBody, TemplateResponse, TextMessageParams, TextObject, Throughput, ThroughputLevel, TwoStepVerificationApi, TwoStepVerificationClass, TwoStepVerificationParams, TwoStepVerificationRequest, UpdateBusinessProfileRequest, UpdateFlowResponse, UpdateQrCodeRequest, UpdateWabaSubscription, UploadBusinessProfileResponse, UploadHandle, UploadMediaParams, UploadMediaResponse, UploadSession, UploadSessionResponse, ValidateFlowJsonResponse, VerifyCodeRequest, VideoMediaObject, WABAClass, WabaAccount, WabaApi, WabaSubscriptions };
package/dist/api/index.js DELETED
@@ -1 +0,0 @@
1
- import"../enums-CSUpFXb8.js";import"../base-D-cXu_lA.js";import{encryption_default as e}from"../encryption-Cwc0xcVL.js";import{flow_default as t}from"../flow-CVes0Qus.js";import"../common-C6FXBDm7.js";import{media_default as n}from"../media-Dw5OGzDD.js";import{messages_default as r}from"../messages-h5-NW8QO.js";import"../objectToQueryString-CAHI0qTs.js";import{phone_default as i}from"../phone-CZyWLyWB.js";import"../buildFieldsQueryString-Cr-jz3p0.js";import{profile_default as a}from"../profile-Bb7GDP0n.js";import{qrCode_default as o}from"../qrCode-CeZEtX9J.js";import{registration_default as s}from"../registration-BkjhC3xw.js";import{TemplateApi as c}from"../template-Bgy-BCXJ.js";import{twoStepVerification_default as l}from"../twoStepVerification-DYlYF_P5.js";import{waba_default as u}from"../waba-SF2W3z2U.js";import"../api-8hRAOyaL.js";export{a as BusinessProfileApi,e as EncryptionApi,t as FlowApi,n as MediaApi,r as MessagesApi,i as PhoneNumberApi,o as QrCodeApi,s as RegistrationApi,c as TemplateApi,l as TwoStepVerificationApi,u as WabaApi};
@@ -1,3 +0,0 @@
1
- import "../../base-CfDkvT1x.js";
2
- import { MediaApi, MediaClass, MediaResponse, MediasResponse, UploadMediaResponse } from "../../index-a_YS40Iv.js";
3
- export { MediaApi, MediaApi as default, MediaClass, MediaResponse, MediasResponse, UploadMediaResponse };
@@ -1 +0,0 @@
1
- import"../../enums-CSUpFXb8.js";import"../../base-D-cXu_lA.js";import{MediaApi as e,media_default as t}from"../../media-Dw5OGzDD.js";export{e as MediaApi,t as default};