meta-cloud-api 0.2.12 → 0.2.13

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 (297) hide show
  1. package/README.md +5 -2
  2. package/dist/api/index.d.mts +495 -27
  3. package/dist/api/index.mjs +1 -1
  4. package/dist/api/index.mjs.map +1 -1
  5. package/dist/chunk-KZQQJAPX.mjs +2 -0
  6. package/dist/chunk-KZQQJAPX.mjs.map +1 -0
  7. package/dist/chunk-N7A7DQDX.mjs +2 -0
  8. package/dist/chunk-N7A7DQDX.mjs.map +1 -0
  9. package/dist/chunk-QE4PKOSW.mjs +2 -0
  10. package/dist/chunk-QE4PKOSW.mjs.map +1 -0
  11. package/dist/chunk-R4CFE2XP.mjs +2 -0
  12. package/dist/chunk-R4CFE2XP.mjs.map +1 -0
  13. package/dist/chunk-XVYL7ZTG.mjs +2 -0
  14. package/dist/chunk-XVYL7ZTG.mjs.map +1 -0
  15. package/dist/index.d.mts +142 -43
  16. package/dist/index.mjs +2 -2
  17. package/dist/index.mjs.map +1 -1
  18. package/dist/types/index.d.mts +512 -19
  19. package/dist/types/index.mjs +1 -1
  20. package/dist/types/index.mjs.map +1 -1
  21. package/dist/utils/index.d.mts +70 -21
  22. package/dist/utils/index.mjs +1 -1
  23. package/dist/utils/index.mjs.map +1 -1
  24. package/dist/waba-RRlZTQUG.d.mts +2229 -0
  25. package/dist/{types/whatsapp.d.ts → whatsapp-BNHXjrds.d.mts} +2 -17
  26. package/package.json +52 -18
  27. package/dist/api/base.d.mts +0 -15
  28. package/dist/api/base.d.ts +0 -15
  29. package/dist/api/base.js +0 -2
  30. package/dist/api/base.js.map +0 -1
  31. package/dist/api/base.mjs +0 -2
  32. package/dist/api/base.mjs.map +0 -1
  33. package/dist/api/businessProfile.d.mts +0 -145
  34. package/dist/api/businessProfile.d.ts +0 -145
  35. package/dist/api/businessProfile.js +0 -2
  36. package/dist/api/businessProfile.js.map +0 -1
  37. package/dist/api/businessProfile.mjs +0 -2
  38. package/dist/api/businessProfile.mjs.map +0 -1
  39. package/dist/api/encryption.d.mts +0 -15
  40. package/dist/api/encryption.d.ts +0 -15
  41. package/dist/api/encryption.js +0 -2
  42. package/dist/api/encryption.js.map +0 -1
  43. package/dist/api/encryption.mjs +0 -2
  44. package/dist/api/encryption.mjs.map +0 -1
  45. package/dist/api/flow.d.mts +0 -126
  46. package/dist/api/flow.d.ts +0 -126
  47. package/dist/api/flow.js +0 -2
  48. package/dist/api/flow.js.map +0 -1
  49. package/dist/api/flow.mjs +0 -2
  50. package/dist/api/flow.mjs.map +0 -1
  51. package/dist/api/index.d.ts +0 -28
  52. package/dist/api/index.js +0 -2
  53. package/dist/api/index.js.map +0 -1
  54. package/dist/api/media.d.mts +0 -17
  55. package/dist/api/media.d.ts +0 -17
  56. package/dist/api/media.js +0 -2
  57. package/dist/api/media.js.map +0 -1
  58. package/dist/api/media.mjs +0 -2
  59. package/dist/api/media.mjs.map +0 -1
  60. package/dist/api/messages.d.mts +0 -193
  61. package/dist/api/messages.d.ts +0 -193
  62. package/dist/api/messages.js +0 -2
  63. package/dist/api/messages.js.map +0 -1
  64. package/dist/api/messages.mjs +0 -2
  65. package/dist/api/messages.mjs.map +0 -1
  66. package/dist/api/phoneNumber.d.mts +0 -17
  67. package/dist/api/phoneNumber.d.ts +0 -17
  68. package/dist/api/phoneNumber.js +0 -2
  69. package/dist/api/phoneNumber.js.map +0 -1
  70. package/dist/api/phoneNumber.mjs +0 -2
  71. package/dist/api/phoneNumber.mjs.map +0 -1
  72. package/dist/api/qrCode.d.mts +0 -18
  73. package/dist/api/qrCode.d.ts +0 -18
  74. package/dist/api/qrCode.js +0 -2
  75. package/dist/api/qrCode.js.map +0 -1
  76. package/dist/api/qrCode.mjs +0 -2
  77. package/dist/api/qrCode.mjs.map +0 -1
  78. package/dist/api/registration.d.mts +0 -14
  79. package/dist/api/registration.d.ts +0 -14
  80. package/dist/api/registration.js +0 -2
  81. package/dist/api/registration.js.map +0 -1
  82. package/dist/api/registration.mjs +0 -2
  83. package/dist/api/registration.mjs.map +0 -1
  84. package/dist/api/template.d.mts +0 -18
  85. package/dist/api/template.d.ts +0 -18
  86. package/dist/api/template.js +0 -2
  87. package/dist/api/template.js.map +0 -1
  88. package/dist/api/template.mjs +0 -2
  89. package/dist/api/template.mjs.map +0 -1
  90. package/dist/api/twoStepVerification.d.mts +0 -13
  91. package/dist/api/twoStepVerification.d.ts +0 -13
  92. package/dist/api/twoStepVerification.js +0 -2
  93. package/dist/api/twoStepVerification.js.map +0 -1
  94. package/dist/api/twoStepVerification.mjs +0 -2
  95. package/dist/api/twoStepVerification.mjs.map +0 -1
  96. package/dist/api/waba.d.mts +0 -16
  97. package/dist/api/waba.d.ts +0 -16
  98. package/dist/api/waba.js +0 -2
  99. package/dist/api/waba.js.map +0 -1
  100. package/dist/api/waba.mjs +0 -2
  101. package/dist/api/waba.mjs.map +0 -1
  102. package/dist/enums-CI7vzKhn.d.mts +0 -687
  103. package/dist/enums-CI7vzKhn.d.ts +0 -687
  104. package/dist/httpsClient.d.mts +0 -22
  105. package/dist/httpsClient.d.ts +0 -22
  106. package/dist/httpsClient.js +0 -2
  107. package/dist/httpsClient.js.map +0 -1
  108. package/dist/httpsClient.mjs +0 -2
  109. package/dist/httpsClient.mjs.map +0 -1
  110. package/dist/index.d.ts +0 -46
  111. package/dist/index.js +0 -3
  112. package/dist/index.js.map +0 -1
  113. package/dist/request.d.mts +0 -25
  114. package/dist/request.d.ts +0 -25
  115. package/dist/request.js +0 -2
  116. package/dist/request.js.map +0 -1
  117. package/dist/request.mjs +0 -2
  118. package/dist/request.mjs.map +0 -1
  119. package/dist/types/base.d.mts +0 -8
  120. package/dist/types/base.d.ts +0 -8
  121. package/dist/types/base.js +0 -2
  122. package/dist/types/base.js.map +0 -1
  123. package/dist/types/base.mjs +0 -1
  124. package/dist/types/base.mjs.map +0 -1
  125. package/dist/types/businessProfile.d.mts +0 -153
  126. package/dist/types/businessProfile.d.ts +0 -153
  127. package/dist/types/businessProfile.js +0 -2
  128. package/dist/types/businessProfile.js.map +0 -1
  129. package/dist/types/businessProfile.mjs +0 -1
  130. package/dist/types/businessProfile.mjs.map +0 -1
  131. package/dist/types/config.d.mts +0 -62
  132. package/dist/types/config.d.ts +0 -62
  133. package/dist/types/config.js +0 -2
  134. package/dist/types/config.js.map +0 -1
  135. package/dist/types/config.mjs +0 -1
  136. package/dist/types/config.mjs.map +0 -1
  137. package/dist/types/encryption.d.mts +0 -13
  138. package/dist/types/encryption.d.ts +0 -13
  139. package/dist/types/encryption.js +0 -2
  140. package/dist/types/encryption.js.map +0 -1
  141. package/dist/types/encryption.mjs +0 -1
  142. package/dist/types/encryption.mjs.map +0 -1
  143. package/dist/types/enums.d.mts +0 -1
  144. package/dist/types/enums.d.ts +0 -1
  145. package/dist/types/enums.js +0 -2
  146. package/dist/types/enums.js.map +0 -1
  147. package/dist/types/enums.mjs +0 -2
  148. package/dist/types/enums.mjs.map +0 -1
  149. package/dist/types/flow.d.mts +0 -404
  150. package/dist/types/flow.d.ts +0 -404
  151. package/dist/types/flow.js +0 -2
  152. package/dist/types/flow.js.map +0 -1
  153. package/dist/types/flow.mjs +0 -2
  154. package/dist/types/flow.mjs.map +0 -1
  155. package/dist/types/httpsClient.d.mts +0 -19
  156. package/dist/types/httpsClient.d.ts +0 -19
  157. package/dist/types/httpsClient.js +0 -2
  158. package/dist/types/httpsClient.js.map +0 -1
  159. package/dist/types/httpsClient.mjs +0 -1
  160. package/dist/types/httpsClient.mjs.map +0 -1
  161. package/dist/types/index.d.ts +0 -20
  162. package/dist/types/index.js +0 -2
  163. package/dist/types/index.js.map +0 -1
  164. package/dist/types/logger.d.mts +0 -9
  165. package/dist/types/logger.d.ts +0 -9
  166. package/dist/types/logger.js +0 -2
  167. package/dist/types/logger.js.map +0 -1
  168. package/dist/types/logger.mjs +0 -1
  169. package/dist/types/logger.mjs.map +0 -1
  170. package/dist/types/media.d.mts +0 -31
  171. package/dist/types/media.d.ts +0 -31
  172. package/dist/types/media.js +0 -2
  173. package/dist/types/media.js.map +0 -1
  174. package/dist/types/media.mjs +0 -1
  175. package/dist/types/media.mjs.map +0 -1
  176. package/dist/types/messages.d.mts +0 -558
  177. package/dist/types/messages.d.ts +0 -558
  178. package/dist/types/messages.js +0 -2
  179. package/dist/types/messages.js.map +0 -1
  180. package/dist/types/messages.mjs +0 -1
  181. package/dist/types/messages.mjs.map +0 -1
  182. package/dist/types/phoneNumber.d.mts +0 -82
  183. package/dist/types/phoneNumber.d.ts +0 -82
  184. package/dist/types/phoneNumber.js +0 -2
  185. package/dist/types/phoneNumber.js.map +0 -1
  186. package/dist/types/phoneNumber.mjs +0 -1
  187. package/dist/types/phoneNumber.mjs.map +0 -1
  188. package/dist/types/qrCode.d.mts +0 -27
  189. package/dist/types/qrCode.d.ts +0 -27
  190. package/dist/types/qrCode.js +0 -2
  191. package/dist/types/qrCode.js.map +0 -1
  192. package/dist/types/qrCode.mjs +0 -1
  193. package/dist/types/qrCode.mjs.map +0 -1
  194. package/dist/types/registration.d.mts +0 -14
  195. package/dist/types/registration.d.ts +0 -14
  196. package/dist/types/registration.js +0 -2
  197. package/dist/types/registration.js.map +0 -1
  198. package/dist/types/registration.mjs +0 -1
  199. package/dist/types/registration.mjs.map +0 -1
  200. package/dist/types/request.d.mts +0 -50
  201. package/dist/types/request.d.ts +0 -50
  202. package/dist/types/request.js +0 -2
  203. package/dist/types/request.js.map +0 -1
  204. package/dist/types/request.mjs +0 -1
  205. package/dist/types/request.mjs.map +0 -1
  206. package/dist/types/template.d.mts +0 -106
  207. package/dist/types/template.d.ts +0 -106
  208. package/dist/types/template.js +0 -2
  209. package/dist/types/template.js.map +0 -1
  210. package/dist/types/template.mjs +0 -1
  211. package/dist/types/template.mjs.map +0 -1
  212. package/dist/types/twoStepVerification.d.mts +0 -11
  213. package/dist/types/twoStepVerification.d.ts +0 -11
  214. package/dist/types/twoStepVerification.js +0 -2
  215. package/dist/types/twoStepVerification.js.map +0 -1
  216. package/dist/types/twoStepVerification.mjs +0 -1
  217. package/dist/types/twoStepVerification.mjs.map +0 -1
  218. package/dist/types/waba.d.mts +0 -78
  219. package/dist/types/waba.d.ts +0 -78
  220. package/dist/types/waba.js +0 -2
  221. package/dist/types/waba.js.map +0 -1
  222. package/dist/types/waba.mjs +0 -2
  223. package/dist/types/waba.mjs.map +0 -1
  224. package/dist/types/webhook.d.mts +0 -486
  225. package/dist/types/webhook.d.ts +0 -486
  226. package/dist/types/webhook.js +0 -2
  227. package/dist/types/webhook.js.map +0 -1
  228. package/dist/types/webhook.mjs +0 -2
  229. package/dist/types/webhook.mjs.map +0 -1
  230. package/dist/types/whatsapp.d.mts +0 -61
  231. package/dist/types/whatsapp.js +0 -2
  232. package/dist/types/whatsapp.js.map +0 -1
  233. package/dist/types/whatsapp.mjs +0 -1
  234. package/dist/types/whatsapp.mjs.map +0 -1
  235. package/dist/utils/buildFieldsQueryString.d.mts +0 -3
  236. package/dist/utils/buildFieldsQueryString.d.ts +0 -3
  237. package/dist/utils/buildFieldsQueryString.js +0 -2
  238. package/dist/utils/buildFieldsQueryString.js.map +0 -1
  239. package/dist/utils/buildFieldsQueryString.mjs +0 -2
  240. package/dist/utils/buildFieldsQueryString.mjs.map +0 -1
  241. package/dist/utils/filters.d.mts +0 -144
  242. package/dist/utils/filters.d.ts +0 -144
  243. package/dist/utils/filters.js +0 -2
  244. package/dist/utils/filters.js.map +0 -1
  245. package/dist/utils/filters.mjs +0 -2
  246. package/dist/utils/filters.mjs.map +0 -1
  247. package/dist/utils/flowTypeGuards.d.mts +0 -46
  248. package/dist/utils/flowTypeGuards.d.ts +0 -46
  249. package/dist/utils/flowTypeGuards.js +0 -2
  250. package/dist/utils/flowTypeGuards.js.map +0 -1
  251. package/dist/utils/flowTypeGuards.mjs +0 -2
  252. package/dist/utils/flowTypeGuards.mjs.map +0 -1
  253. package/dist/utils/generateXHub256Sig.d.mts +0 -3
  254. package/dist/utils/generateXHub256Sig.d.ts +0 -3
  255. package/dist/utils/generateXHub256Sig.js +0 -2
  256. package/dist/utils/generateXHub256Sig.js.map +0 -1
  257. package/dist/utils/generateXHub256Sig.mjs +0 -2
  258. package/dist/utils/generateXHub256Sig.mjs.map +0 -1
  259. package/dist/utils/importConfig.d.mts +0 -21
  260. package/dist/utils/importConfig.d.ts +0 -21
  261. package/dist/utils/importConfig.js +0 -2
  262. package/dist/utils/importConfig.js.map +0 -1
  263. package/dist/utils/importConfig.mjs +0 -2
  264. package/dist/utils/importConfig.mjs.map +0 -1
  265. package/dist/utils/index.d.ts +0 -22
  266. package/dist/utils/index.js +0 -2
  267. package/dist/utils/index.js.map +0 -1
  268. package/dist/utils/isMetaError.d.mts +0 -21
  269. package/dist/utils/isMetaError.d.ts +0 -21
  270. package/dist/utils/isMetaError.js +0 -2
  271. package/dist/utils/isMetaError.js.map +0 -1
  272. package/dist/utils/isMetaError.mjs +0 -2
  273. package/dist/utils/isMetaError.mjs.map +0 -1
  274. package/dist/utils/logger.d.mts +0 -13
  275. package/dist/utils/logger.d.ts +0 -13
  276. package/dist/utils/logger.js +0 -2
  277. package/dist/utils/logger.js.map +0 -1
  278. package/dist/utils/logger.mjs +0 -2
  279. package/dist/utils/logger.mjs.map +0 -1
  280. package/dist/utils/objectToQueryString.d.mts +0 -3
  281. package/dist/utils/objectToQueryString.d.ts +0 -3
  282. package/dist/utils/objectToQueryString.js +0 -2
  283. package/dist/utils/objectToQueryString.js.map +0 -1
  284. package/dist/utils/objectToQueryString.mjs +0 -2
  285. package/dist/utils/objectToQueryString.mjs.map +0 -1
  286. package/dist/webhook.d.mts +0 -123
  287. package/dist/webhook.d.ts +0 -123
  288. package/dist/webhook.js +0 -3
  289. package/dist/webhook.js.map +0 -1
  290. package/dist/webhook.mjs +0 -3
  291. package/dist/webhook.mjs.map +0 -1
  292. package/dist/whatsapp.d.mts +0 -58
  293. package/dist/whatsapp.d.ts +0 -58
  294. package/dist/whatsapp.js +0 -2
  295. package/dist/whatsapp.js.map +0 -1
  296. package/dist/whatsapp.mjs +0 -2
  297. package/dist/whatsapp.mjs.map +0 -1
@@ -1,78 +0,0 @@
1
- import { ResponseSuccess } from './request.mjs';
2
- import '../enums-CI7vzKhn.mjs';
3
-
4
- type WabaSubscription = {
5
- whatsapp_business_api_data: {
6
- id: string;
7
- link: string;
8
- name: string;
9
- category: string;
10
- };
11
- override_callback_uri?: string;
12
- };
13
- interface UpdateWabaSubscription {
14
- override_callback_uri: string;
15
- verify_token: string;
16
- }
17
- interface WabaSubscriptions {
18
- data: Array<WabaSubscription>;
19
- }
20
- interface WABAClass {
21
- getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;
22
- getAllWabaSubscriptions(): Promise<WabaSubscriptions>;
23
- updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;
24
- unsubscribeFromWaba(): Promise<ResponseSuccess>;
25
- }
26
- declare enum WabaAccountReviewStatus {
27
- Approved = "APPROVED",
28
- Active = "ACTIVE",
29
- Inactive = "INACTIVE",
30
- Disabled = "DISABLED"
31
- }
32
- declare enum WabaHealthStatusCanSendMessage {
33
- Blocked = "BLOCKED",
34
- Limited = "LIMITED",
35
- Available = "AVAILABLE"
36
- }
37
- declare enum WabaAccountStatus {
38
- Approved = "APPROVED",
39
- Active = "ACTIVE",
40
- Inactive = "INACTIVE",
41
- Disabled = "DISABLED"
42
- }
43
- declare enum WabaBusinessVerificationStatus {
44
- Verified = "verified",
45
- PendingSubmission = "pending_submission",
46
- Unverified = "unverified",
47
- Rejected = "rejected"
48
- }
49
- interface WabaHealthStatusError {
50
- error_code?: number;
51
- error_description?: string;
52
- possible_solution?: string;
53
- }
54
- interface WabaHealthStatusEntity {
55
- entity_type?: string;
56
- id?: string;
57
- can_send_message?: string;
58
- errors?: WabaHealthStatusError[];
59
- }
60
- interface WabaHealthStatus {
61
- can_send_message?: WabaHealthStatusCanSendMessage;
62
- entities?: WabaHealthStatusEntity[];
63
- }
64
- interface WabaAccount {
65
- account_review_status?: WabaAccountReviewStatus;
66
- id?: string;
67
- health_status?: WabaHealthStatus;
68
- status?: WabaAccountStatus;
69
- business_verification_status?: WabaBusinessVerificationStatus;
70
- message_template_namespace?: string;
71
- name?: string;
72
- ownership_type?: string;
73
- currency?: string;
74
- }
75
- type WabaAccountFields = 'id' | 'name' | 'account_review_status' | 'auth_international_rate_eligibility' | 'business_verification_status' | 'country' | 'currency' | 'health_status' | 'status' | 'ownership_type' | 'message_template_namespace';
76
- type WabaAccountFieldsParam = WabaAccountFields[];
77
-
78
- export { type UpdateWabaSubscription, type WABAClass, type WabaAccount, type WabaAccountFields, type WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, type WabaHealthStatus, WabaHealthStatusCanSendMessage, type WabaHealthStatusEntity, type WabaHealthStatusError, type WabaSubscription, type WabaSubscriptions };
@@ -1,78 +0,0 @@
1
- import { ResponseSuccess } from './request.js';
2
- import '../enums-CI7vzKhn.js';
3
-
4
- type WabaSubscription = {
5
- whatsapp_business_api_data: {
6
- id: string;
7
- link: string;
8
- name: string;
9
- category: string;
10
- };
11
- override_callback_uri?: string;
12
- };
13
- interface UpdateWabaSubscription {
14
- override_callback_uri: string;
15
- verify_token: string;
16
- }
17
- interface WabaSubscriptions {
18
- data: Array<WabaSubscription>;
19
- }
20
- interface WABAClass {
21
- getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;
22
- getAllWabaSubscriptions(): Promise<WabaSubscriptions>;
23
- updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;
24
- unsubscribeFromWaba(): Promise<ResponseSuccess>;
25
- }
26
- declare enum WabaAccountReviewStatus {
27
- Approved = "APPROVED",
28
- Active = "ACTIVE",
29
- Inactive = "INACTIVE",
30
- Disabled = "DISABLED"
31
- }
32
- declare enum WabaHealthStatusCanSendMessage {
33
- Blocked = "BLOCKED",
34
- Limited = "LIMITED",
35
- Available = "AVAILABLE"
36
- }
37
- declare enum WabaAccountStatus {
38
- Approved = "APPROVED",
39
- Active = "ACTIVE",
40
- Inactive = "INACTIVE",
41
- Disabled = "DISABLED"
42
- }
43
- declare enum WabaBusinessVerificationStatus {
44
- Verified = "verified",
45
- PendingSubmission = "pending_submission",
46
- Unverified = "unverified",
47
- Rejected = "rejected"
48
- }
49
- interface WabaHealthStatusError {
50
- error_code?: number;
51
- error_description?: string;
52
- possible_solution?: string;
53
- }
54
- interface WabaHealthStatusEntity {
55
- entity_type?: string;
56
- id?: string;
57
- can_send_message?: string;
58
- errors?: WabaHealthStatusError[];
59
- }
60
- interface WabaHealthStatus {
61
- can_send_message?: WabaHealthStatusCanSendMessage;
62
- entities?: WabaHealthStatusEntity[];
63
- }
64
- interface WabaAccount {
65
- account_review_status?: WabaAccountReviewStatus;
66
- id?: string;
67
- health_status?: WabaHealthStatus;
68
- status?: WabaAccountStatus;
69
- business_verification_status?: WabaBusinessVerificationStatus;
70
- message_template_namespace?: string;
71
- name?: string;
72
- ownership_type?: string;
73
- currency?: string;
74
- }
75
- type WabaAccountFields = 'id' | 'name' | 'account_review_status' | 'auth_international_rate_eligibility' | 'business_verification_status' | 'country' | 'currency' | 'health_status' | 'status' | 'ownership_type' | 'message_template_namespace';
76
- type WabaAccountFieldsParam = WabaAccountFields[];
77
-
78
- export { type UpdateWabaSubscription, type WABAClass, type WabaAccount, type WabaAccountFields, type WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, type WabaHealthStatus, WabaHealthStatusCanSendMessage, type WabaHealthStatusEntity, type WabaHealthStatusError, type WabaSubscription, type WabaSubscriptions };
@@ -1,2 +0,0 @@
1
- "use strict";var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var d=(r,t)=>{for(var s in t)a(r,s,{get:t[s],enumerable:!0})},l=(r,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of _(t))!b.call(r,e)&&e!==s&&a(r,e,{get:()=>t[e],enumerable:!(i=u(t,e))||i.enumerable});return r};var m=r=>l(a({},"__esModule",{value:!0}),r);var g={};d(g,{WabaAccountReviewStatus:()=>n,WabaAccountStatus:()=>p,WabaBusinessVerificationStatus:()=>c,WabaHealthStatusCanSendMessage:()=>o});module.exports=m(g);var n=(e=>(e.Approved="APPROVED",e.Active="ACTIVE",e.Inactive="INACTIVE",e.Disabled="DISABLED",e))(n||{}),o=(i=>(i.Blocked="BLOCKED",i.Limited="LIMITED",i.Available="AVAILABLE",i))(o||{}),p=(e=>(e.Approved="APPROVED",e.Active="ACTIVE",e.Inactive="INACTIVE",e.Disabled="DISABLED",e))(p||{}),c=(e=>(e.Verified="verified",e.PendingSubmission="pending_submission",e.Unverified="unverified",e.Rejected="rejected",e))(c||{});0&&(module.exports={WabaAccountReviewStatus,WabaAccountStatus,WabaBusinessVerificationStatus,WabaHealthStatusCanSendMessage});
2
- //# sourceMappingURL=waba.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/waba.ts"],"sourcesContent":["import type { ResponseSuccess } from './request';\n\nexport type WabaSubscription = {\n whatsapp_business_api_data: {\n id: string;\n link: string;\n name: string;\n category: string;\n };\n override_callback_uri?: string;\n};\n\nexport interface UpdateWabaSubscription {\n override_callback_uri: string;\n verify_token: string;\n}\n\nexport interface WabaSubscriptions {\n data: Array<WabaSubscription>;\n}\n\nexport interface WABAClass {\n getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;\n getAllWabaSubscriptions(): Promise<WabaSubscriptions>;\n updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;\n unsubscribeFromWaba(): Promise<ResponseSuccess>;\n}\n\nexport enum WabaAccountReviewStatus {\n Approved = 'APPROVED',\n Active = 'ACTIVE',\n Inactive = 'INACTIVE',\n Disabled = 'DISABLED',\n}\n\nexport enum WabaHealthStatusCanSendMessage {\n Blocked = 'BLOCKED',\n Limited = 'LIMITED',\n Available = 'AVAILABLE',\n}\n\nexport enum WabaAccountStatus {\n Approved = 'APPROVED',\n Active = 'ACTIVE',\n Inactive = 'INACTIVE',\n Disabled = 'DISABLED',\n}\n\nexport enum WabaBusinessVerificationStatus {\n Verified = 'verified',\n PendingSubmission = 'pending_submission',\n Unverified = 'unverified',\n Rejected = 'rejected',\n}\n\nexport interface WabaHealthStatusError {\n error_code?: number;\n error_description?: string;\n possible_solution?: string;\n}\n\nexport interface WabaHealthStatusEntity {\n entity_type?: string;\n id?: string;\n can_send_message?: string;\n errors?: WabaHealthStatusError[];\n}\n\nexport interface WabaHealthStatus {\n can_send_message?: WabaHealthStatusCanSendMessage;\n entities?: WabaHealthStatusEntity[];\n}\n\nexport interface WabaAccount {\n account_review_status?: WabaAccountReviewStatus;\n id?: string;\n health_status?: WabaHealthStatus;\n status?: WabaAccountStatus;\n business_verification_status?: WabaBusinessVerificationStatus;\n message_template_namespace?: string;\n name?: string;\n ownership_type?: string;\n currency?: string;\n}\n\nexport type WabaAccountFields =\n | 'id'\n | 'name'\n | 'account_review_status'\n | 'auth_international_rate_eligibility'\n | 'business_verification_status'\n | 'country'\n | 'currency'\n | 'health_status'\n | 'status'\n | 'ownership_type'\n | 'message_template_namespace';\n\nexport type WabaAccountFieldsParam = WabaAccountFields[];\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,EAAA,sBAAAC,EAAA,mCAAAC,EAAA,mCAAAC,IAAA,eAAAC,EAAAN,GA4BO,IAAKE,OACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WAJHA,OAAA,IAOAG,OACRA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YAHJA,OAAA,IAMAF,OACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WAJHA,OAAA,IAOAC,OACRA,EAAA,SAAW,WACXA,EAAA,kBAAoB,qBACpBA,EAAA,WAAa,aACbA,EAAA,SAAW,WAJHA,OAAA","names":["waba_exports","__export","WabaAccountReviewStatus","WabaAccountStatus","WabaBusinessVerificationStatus","WabaHealthStatusCanSendMessage","__toCommonJS"]}
@@ -1,2 +0,0 @@
1
- var r=(e=>(e.Approved="APPROVED",e.Active="ACTIVE",e.Inactive="INACTIVE",e.Disabled="DISABLED",e))(r||{}),i=(t=>(t.Blocked="BLOCKED",t.Limited="LIMITED",t.Available="AVAILABLE",t))(i||{}),s=(e=>(e.Approved="APPROVED",e.Active="ACTIVE",e.Inactive="INACTIVE",e.Disabled="DISABLED",e))(s||{}),a=(e=>(e.Verified="verified",e.PendingSubmission="pending_submission",e.Unverified="unverified",e.Rejected="rejected",e))(a||{});export{r as WabaAccountReviewStatus,s as WabaAccountStatus,a as WabaBusinessVerificationStatus,i as WabaHealthStatusCanSendMessage};
2
- //# sourceMappingURL=waba.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/types/waba.ts"],"sourcesContent":["import type { ResponseSuccess } from './request';\n\nexport type WabaSubscription = {\n whatsapp_business_api_data: {\n id: string;\n link: string;\n name: string;\n category: string;\n };\n override_callback_uri?: string;\n};\n\nexport interface UpdateWabaSubscription {\n override_callback_uri: string;\n verify_token: string;\n}\n\nexport interface WabaSubscriptions {\n data: Array<WabaSubscription>;\n}\n\nexport interface WABAClass {\n getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;\n getAllWabaSubscriptions(): Promise<WabaSubscriptions>;\n updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;\n unsubscribeFromWaba(): Promise<ResponseSuccess>;\n}\n\nexport enum WabaAccountReviewStatus {\n Approved = 'APPROVED',\n Active = 'ACTIVE',\n Inactive = 'INACTIVE',\n Disabled = 'DISABLED',\n}\n\nexport enum WabaHealthStatusCanSendMessage {\n Blocked = 'BLOCKED',\n Limited = 'LIMITED',\n Available = 'AVAILABLE',\n}\n\nexport enum WabaAccountStatus {\n Approved = 'APPROVED',\n Active = 'ACTIVE',\n Inactive = 'INACTIVE',\n Disabled = 'DISABLED',\n}\n\nexport enum WabaBusinessVerificationStatus {\n Verified = 'verified',\n PendingSubmission = 'pending_submission',\n Unverified = 'unverified',\n Rejected = 'rejected',\n}\n\nexport interface WabaHealthStatusError {\n error_code?: number;\n error_description?: string;\n possible_solution?: string;\n}\n\nexport interface WabaHealthStatusEntity {\n entity_type?: string;\n id?: string;\n can_send_message?: string;\n errors?: WabaHealthStatusError[];\n}\n\nexport interface WabaHealthStatus {\n can_send_message?: WabaHealthStatusCanSendMessage;\n entities?: WabaHealthStatusEntity[];\n}\n\nexport interface WabaAccount {\n account_review_status?: WabaAccountReviewStatus;\n id?: string;\n health_status?: WabaHealthStatus;\n status?: WabaAccountStatus;\n business_verification_status?: WabaBusinessVerificationStatus;\n message_template_namespace?: string;\n name?: string;\n ownership_type?: string;\n currency?: string;\n}\n\nexport type WabaAccountFields =\n | 'id'\n | 'name'\n | 'account_review_status'\n | 'auth_international_rate_eligibility'\n | 'business_verification_status'\n | 'country'\n | 'currency'\n | 'health_status'\n | 'status'\n | 'ownership_type'\n | 'message_template_namespace';\n\nexport type WabaAccountFieldsParam = WabaAccountFields[];\n"],"mappings":"AA4BO,IAAKA,OACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WAJHA,OAAA,IAOAC,OACRA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YAHJA,OAAA,IAMAC,OACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WAJHA,OAAA,IAOAC,OACRA,EAAA,SAAW,WACXA,EAAA,kBAAoB,qBACpBA,EAAA,WAAa,aACbA,EAAA,SAAW,WAJHA,OAAA","names":["WabaAccountReviewStatus","WabaHealthStatusCanSendMessage","WabaAccountStatus","WabaBusinessVerificationStatus"]}
@@ -1,486 +0,0 @@
1
- import { M as MessageTypesEnum } from '../enums-CI7vzKhn.mjs';
2
-
3
- interface WebhookContact {
4
- /**
5
- * WhatsApp ID of the contact. Business can respond to this contact using this ID.
6
- */
7
- wa_id: string;
8
- /**
9
- * Additional unique, alphanumeric identifier for a WhatsApp user
10
- */
11
- user_id?: string;
12
- /**
13
- * Profile of Whatsapp user
14
- */
15
- profile: {
16
- /**
17
- * The display name of the contact
18
- */
19
- name: string;
20
- };
21
- }
22
- /**
23
- * Represents a message received through the webhook
24
- * Based on Meta's documentation: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/components#messages-object
25
- */
26
- interface WebhookMessage {
27
- /**
28
- * The message ID
29
- */
30
- id: string;
31
- /**
32
- * The sender's phone number
33
- */
34
- from: string;
35
- /**
36
- * The timestamp of the message
37
- */
38
- timestamp: string;
39
- /**
40
- * The type of message (text, image, etc.)
41
- */
42
- type: MessageTypesEnum;
43
- /**
44
- * The phone number ID that received the message
45
- */
46
- phoneNumberId: string;
47
- /**
48
- * The display phone number that received the message
49
- */
50
- displayPhoneNumber: string;
51
- /**
52
- * The profile name of the sender
53
- */
54
- profileName: string;
55
- /**
56
- * Text object for text messages
57
- */
58
- text?: {
59
- /**
60
- * The text content of the message
61
- */
62
- body: string;
63
- };
64
- /**
65
- * Image object for image messages
66
- */
67
- image?: {
68
- /**
69
- * The image caption (if provided)
70
- */
71
- caption?: string;
72
- /**
73
- * The SHA256 hash of the image
74
- */
75
- sha256?: string;
76
- /**
77
- * The ID for the image
78
- */
79
- id: string;
80
- /**
81
- * The MIME type of the image
82
- */
83
- mime_type: string;
84
- };
85
- /**
86
- * Video object for video messages
87
- */
88
- video?: {
89
- /**
90
- * The video caption (if provided)
91
- */
92
- caption?: string;
93
- /**
94
- * The SHA256 hash of the video
95
- */
96
- sha256?: string;
97
- /**
98
- * The ID for the video
99
- */
100
- id: string;
101
- /**
102
- * The MIME type of the video
103
- */
104
- mime_type: string;
105
- };
106
- /**
107
- * Audio object for audio messages
108
- */
109
- audio?: {
110
- /**
111
- * The ID for the audio file
112
- */
113
- id: string;
114
- /**
115
- * The MIME type of the audio file
116
- */
117
- mime_type: string;
118
- /**
119
- * Whether the audio is a voice message
120
- */
121
- voice?: boolean;
122
- };
123
- /**
124
- * Document object for document messages
125
- */
126
- document?: {
127
- /**
128
- * The document caption (if provided)
129
- */
130
- caption?: string;
131
- /**
132
- * The document filename
133
- */
134
- filename: string;
135
- /**
136
- * The SHA256 hash of the document
137
- */
138
- sha256?: string;
139
- /**
140
- * The ID for the document
141
- */
142
- id: string;
143
- /**
144
- * The MIME type of the document
145
- */
146
- mime_type: string;
147
- };
148
- /**
149
- * Sticker object for sticker messages
150
- */
151
- sticker?: {
152
- /**
153
- * The ID for the sticker
154
- */
155
- id: string;
156
- /**
157
- * Whether this is an animated sticker
158
- */
159
- animated: boolean;
160
- /**
161
- * The MIME type of the sticker
162
- */
163
- mime_type: string;
164
- };
165
- /**
166
- * Reaction object for reaction messages
167
- */
168
- reaction?: {
169
- /**
170
- * The ID of the message being reacted to
171
- */
172
- message_id: string;
173
- /**
174
- * Emoji used for the reaction
175
- */
176
- emoji: string;
177
- };
178
- /**
179
- * Contacts object for contact messages
180
- */
181
- contacts?: Array<{
182
- /**
183
- * The contact's name
184
- */
185
- name: {
186
- formatted_name: string;
187
- first_name?: string;
188
- last_name?: string;
189
- middle_name?: string;
190
- suffix?: string;
191
- prefix?: string;
192
- };
193
- /**
194
- * The contact's phone numbers
195
- */
196
- phones?: Array<{
197
- phone: string;
198
- type?: string;
199
- wa_id?: string;
200
- }>;
201
- /**
202
- * The contact's emails
203
- */
204
- emails?: Array<{
205
- email: string;
206
- type?: string;
207
- }>;
208
- /**
209
- * The contact's addresses
210
- */
211
- addresses?: Array<{
212
- street?: string;
213
- city?: string;
214
- state?: string;
215
- zip?: string;
216
- country?: string;
217
- country_code?: string;
218
- type?: string;
219
- }>;
220
- /**
221
- * The contact's organizations
222
- */
223
- org?: {
224
- company?: string;
225
- department?: string;
226
- title?: string;
227
- };
228
- /**
229
- * The contact's URLs
230
- */
231
- urls?: Array<{
232
- url: string;
233
- type?: string;
234
- }>;
235
- /**
236
- * The contact's birthday (YYYY-MM-DD format)
237
- */
238
- birthday?: string;
239
- }>;
240
- /**
241
- * Location object for location messages
242
- */
243
- location?: {
244
- /**
245
- * Latitude of the location
246
- */
247
- latitude: number;
248
- /**
249
- * Longitude of the location
250
- */
251
- longitude: number;
252
- /**
253
- * Name of the location
254
- */
255
- name?: string;
256
- /**
257
- * Address of the location
258
- */
259
- address?: string;
260
- };
261
- /**
262
- * Interactive object for interactive messages
263
- */
264
- interactive?: {
265
- /**
266
- * Type of the interactive message
267
- * Can be: button_reply, list_reply, flow, nfm_reply, etc.
268
- */
269
- type: string;
270
- /**
271
- * ID for the button that was clicked
272
- */
273
- button_reply?: {
274
- id: string;
275
- title: string;
276
- };
277
- /**
278
- * ID for the list item that was selected
279
- */
280
- list_reply?: {
281
- id: string;
282
- title: string;
283
- description?: string;
284
- };
285
- /**
286
- * NFM (No-Code Flow Message) reply data
287
- */
288
- nfm_reply?: {
289
- /**
290
- * Response data in JSON format
291
- */
292
- response_json: string;
293
- /**
294
- * Body text of the reply
295
- */
296
- body: string;
297
- /**
298
- * Name of the flow
299
- */
300
- name: string;
301
- };
302
- };
303
- /**
304
- * System object for system messages (like user phone number changes)
305
- */
306
- system?: {
307
- /**
308
- * The type of system update
309
- */
310
- type: string;
311
- /**
312
- * User's identity if the update is a customer identity change
313
- */
314
- identity?: string;
315
- /**
316
- * Old and new phone numbers if the update is a phone number change
317
- */
318
- customer?: {
319
- /**
320
- * The previous phone number
321
- */
322
- previous_wa_id: string;
323
- /**
324
- * The new phone number
325
- */
326
- wa_id: string;
327
- };
328
- };
329
- /**
330
- * Order object for order messages
331
- */
332
- order?: {
333
- /**
334
- * Catalog ID
335
- */
336
- catalog_id: string;
337
- /**
338
- * Product items in the order
339
- */
340
- product_items: Array<{
341
- /**
342
- * Product ID
343
- */
344
- product_retailer_id: string;
345
- /**
346
- * Quantity of the product
347
- */
348
- quantity: number;
349
- /**
350
- * Item price
351
- */
352
- item_price: number;
353
- /**
354
- * Currency code
355
- */
356
- currency: string;
357
- }>;
358
- /**
359
- * Text message included with the order
360
- */
361
- text?: string;
362
- };
363
- /**
364
- * Context object, included when a user replies or interacts
365
- */
366
- context?: {
367
- /**
368
- * ID of the message
369
- */
370
- id?: string;
371
- /**
372
- * ID of the sender
373
- */
374
- from?: string;
375
- /**
376
- * ID of the message being replied to or interacted with
377
- */
378
- message_id: string;
379
- /**
380
- * ID of the forwarded message, if applicable
381
- */
382
- forwarded?: boolean;
383
- /**
384
- * Frequently forwarded status
385
- */
386
- frequently_forwarded?: boolean;
387
- /**
388
- * Original message information if the message was referred
389
- */
390
- referred_product?: {
391
- /**
392
- * Catalog ID
393
- */
394
- catalog_id: string;
395
- /**
396
- * Product ID
397
- */
398
- product_retailer_id: string;
399
- };
400
- };
401
- /**
402
- * Errors array, if the message had errors
403
- */
404
- errors?: Array<{
405
- /**
406
- * Error code
407
- */
408
- code: number;
409
- /**
410
- * Error title
411
- */
412
- title: string;
413
- /**
414
- * Error message
415
- */
416
- message: string;
417
- /**
418
- * Error details object
419
- */
420
- error_data?: {
421
- /**
422
- * Describes the error details
423
- */
424
- details: string;
425
- };
426
- }>;
427
- /**
428
- * Button object for button messages
429
- */
430
- button?: {
431
- /**
432
- * The payload for the button
433
- */
434
- payload: string;
435
- /**
436
- * Button text
437
- */
438
- text: string;
439
- };
440
- /**
441
- * The original message data as received from the webhook
442
- */
443
- originalData: any;
444
- }
445
- /**
446
- * Represents a non-message event received through the webhook
447
- */
448
- interface WebhookEvent {
449
- /**
450
- * The field type of the event
451
- */
452
- field: string;
453
- /**
454
- * The event data
455
- */
456
- value: any;
457
- }
458
- /**
459
- * Handler function for processing messages
460
- */
461
- type MessageHandler = (message: WebhookMessage) => void | Promise<void>;
462
- /**
463
- * Handler function for processing events
464
- */
465
- type EventHandler = (event: WebhookEvent) => void | Promise<void>;
466
- /**
467
- * Statuses that can be received in status updates
468
- */
469
- declare enum MessageStatus {
470
- DELIVERED = "delivered",
471
- READ = "read",
472
- SENT = "sent"
473
- }
474
- /**
475
- * Event fields that can be received through the webhook
476
- */
477
- declare enum EventField {
478
- MESSAGES = "messages",
479
- STATUSES = "statuses",
480
- MESSAGE_TEMPLATE_STATUS_UPDATE = "message_template_status_update",
481
- PHONE_NUMBER_QUALITY_UPDATE = "phone_number_quality_update",
482
- PHONE_NUMBER_NAME_UPDATE = "phone_number_name_update",
483
- UNKNOWN = "unknown"
484
- }
485
-
486
- export { EventField, type EventHandler, type MessageHandler, MessageStatus, type WebhookContact, type WebhookEvent, type WebhookMessage };