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
@@ -1,4 +1,4 @@
1
- import { ResponseSuccess } from "./base-CfDkvT1x.js";
1
+ import { ResponseSuccess } from "../../../types/request.js";
2
2
  import { IncomingHttpHeaders, IncomingMessage } from "http";
3
3
 
4
4
  //#region src/api/flow/types/common.d.ts
@@ -403,4 +403,4 @@ interface FlowClass {
403
403
  }
404
404
  //#endregion
405
405
  export { CreateFlowResponse, 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 };
406
- //# sourceMappingURL=common-CvPVD1o6.d.ts.map
406
+ //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-CvPVD1o6.d.ts","names":[],"sources":["../src/api/flow/types/common.ts"],"sourcesContent":[],"mappings":";;;;;;;AAMA;AAWY,aAXA,cAAA;EAsBA,KAAA,GAAA,OAAA;EAUA,SAAA,GAAA,WAAY;EAWZ,SAAA,GAAQ,WAAA;EAAA,OAAA,GAAA,SAAA;YAAW,GAAA,YAAA;;;AAK/B;AAWA;AAciB,aA9DL,gBAAA;EA8DS,MAAA,GAAA,SAAA;QAGT,GAAA,SAAA;oBACI,GAAA,qBAAA;gBACO,GAAA,iBAAA;EAAmB,SAAA,GAAA,YAAA;EAMzB,eAAA,GAAA,kBAAiB;EAQjB,MAAA,GAAA,QAAU;EAOV,KAAA,GAAA,OAAA;;AACP,aA9EE,cAAA;MA+EA,GAAA,MAAA;EAAU,IAAA,GAAA,MAAA;EAML,aAAS,GAAA,eAAA;AAS1B;;;;;AAQiB,aA5FL,YAAA;EAoGK;EAQA,IAAA,GAAA,MAAA;EASA;EASA,MAAA,GAAA,eAAkB;EASlB;EAQA,KAAA,GAAA,OAAA;EAAqB;KAClB,GAAA,GAAA;;AACkB,KAtI1B,QAAA,GAsI0B,CAAA,OAtIP,YAsIO,CAAA,CAAA,MAAA,OAtIoB,YAsIpB,CAAA;AAMtC;AAUA;AAUA;AAA6C,UA3J5B,0BAAA,CA2J4B;YAE3B,EAAA,MAAA;UACO,EAAA,MAA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ASA,oBAAA;;;;;;;;UASA,kBAAA;;;sBAGO;;;;;UAMP,kBAAA;;sBAEO;;;;;UAMP,qBAAA;kBACG;gBACF;;;;;UAMD,wBAAA;;;sBAGO;;;;;;UAOP,2BAAA;;;;;;;;;UAUA,4BAAA;;gBAEC;uBACO;;;;;;UAOR,eAAA,SAAwB;QAC/B;WACG;;;;;;UAOI,sBAAA;;;;;;;;UASA,uBAAA;;;;;;;;;UAUA,uBAAA;;UAEL;;;SAGD;;;;;;;;UAOM,wBAAA;;SAEN;;;;;;;;UAOM,yBAAA;;;;;;;;;;;;;;;UAgBA,4BAAA;;UAEL,QAAQ,gBAAgB,cAAA,CAAe;;;;;;;;;;;;UAalC,6BAAA;;;;;;;;UASA,mBAAA;;oBAGK;;;SAKX;;;;;;;;;KAUC,oBAAA,GACN,0BACA,2BACA,gCACA;UAEW,SAAA;;;;;;;6BAOc,QAAQ;;;;;;;;;;iBAad;;;;;MAMlB,QAAQ;;;;;;;;;iEAUoD,QAAQ,OAAO;;;;;;;;;;iBAazD;;;MAIlB,QAAQ;;;;;;;8BAQiB,QAAQ;;;;;;;8BAQR,QAAQ;;;;;;;;;UAYtB,OAAO;;MAGlB,QAAQ;;;;;;;;;iDAUoC,OAAO,kBAAkB,QAAQ;;;;;;;+BAQnD,QAAQ;;;;;;;iCAQN,QAAQ;;;;;;;;;;;MAepC,QAAQ"}
@@ -0,0 +1,51 @@
1
+ //#region src/api/flow/types/common.ts
2
+ /**
3
+ * Enum for Flow Status
4
+ */
5
+ let FlowStatusEnum = /* @__PURE__ */ function(FlowStatusEnum$1) {
6
+ FlowStatusEnum$1["Draft"] = "DRAFT";
7
+ FlowStatusEnum$1["Published"] = "PUBLISHED";
8
+ FlowStatusEnum$1["Throttled"] = "THROTTLED";
9
+ FlowStatusEnum$1["Blocked"] = "BLOCKED";
10
+ FlowStatusEnum$1["Deprecated"] = "DEPRECATED";
11
+ return FlowStatusEnum$1;
12
+ }({});
13
+ /**
14
+ * Enum for Flow Categories
15
+ */
16
+ let FlowCategoryEnum = /* @__PURE__ */ function(FlowCategoryEnum$1) {
17
+ FlowCategoryEnum$1["SignUp"] = "SIGN_UP";
18
+ FlowCategoryEnum$1["SignIn"] = "SIGN_IN";
19
+ FlowCategoryEnum$1["AppointmentBooking"] = "APPOINTMENT_BOOKING";
20
+ FlowCategoryEnum$1["LeadGeneration"] = "LEAD_GENERATION";
21
+ FlowCategoryEnum$1["ContactUs"] = "CONTACT_US";
22
+ FlowCategoryEnum$1["CustomerSupport"] = "CUSTOMER_SUPPORT";
23
+ FlowCategoryEnum$1["Survey"] = "SURVEY";
24
+ FlowCategoryEnum$1["Other"] = "OTHER";
25
+ return FlowCategoryEnum$1;
26
+ }({});
27
+ let FlowActionEnum = /* @__PURE__ */ function(FlowActionEnum$1) {
28
+ FlowActionEnum$1["INIT"] = "INIT";
29
+ FlowActionEnum$1["BACK"] = "BACK";
30
+ FlowActionEnum$1["DATA_EXCHANGE"] = "data_exchange";
31
+ return FlowActionEnum$1;
32
+ }({});
33
+ /**
34
+ * Enum for Flow Types in webhook handlers
35
+ * Used to register handlers for specific flow events
36
+ */
37
+ let FlowTypeEnum = /* @__PURE__ */ function(FlowTypeEnum$1) {
38
+ /** Health check/ping requests */
39
+ FlowTypeEnum$1["Ping"] = "ping";
40
+ /** Data exchange requests */
41
+ FlowTypeEnum$1["Change"] = "data_exchange";
42
+ /** Error notification requests */
43
+ FlowTypeEnum$1["Error"] = "error";
44
+ /** Match all flow action types */
45
+ FlowTypeEnum$1["All"] = "*";
46
+ return FlowTypeEnum$1;
47
+ }({});
48
+
49
+ //#endregion
50
+ export { FlowActionEnum, FlowCategoryEnum, FlowStatusEnum, FlowTypeEnum };
51
+ //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-C6FXBDm7.js","names":[],"sources":["../src/api/flow/types/common.ts"],"sourcesContent":["import { ResponseSuccess } from '../../../types';\nimport { IncomingHttpHeaders, IncomingMessage } from 'http';\n\n/**\n * Enum for Flow Status\n */\nexport enum FlowStatusEnum {\n Draft = 'DRAFT',\n Published = 'PUBLISHED',\n Throttled = 'THROTTLED',\n Blocked = 'BLOCKED',\n Deprecated = 'DEPRECATED',\n}\n\n/**\n * Enum for Flow Categories\n */\nexport enum FlowCategoryEnum {\n SignUp = 'SIGN_UP',\n SignIn = 'SIGN_IN',\n AppointmentBooking = 'APPOINTMENT_BOOKING',\n LeadGeneration = 'LEAD_GENERATION',\n ContactUs = 'CONTACT_US',\n CustomerSupport = 'CUSTOMER_SUPPORT',\n Survey = 'SURVEY',\n Other = 'OTHER',\n}\n\nexport enum FlowActionEnum {\n INIT = 'INIT',\n BACK = 'BACK',\n DATA_EXCHANGE = 'data_exchange',\n}\n\n/**\n * Enum for Flow Types in webhook handlers\n * Used to register handlers for specific flow events\n */\nexport enum FlowTypeEnum {\n /** Health check/ping requests */\n Ping = 'ping',\n /** Data exchange requests */\n Change = 'data_exchange',\n /** Error notification requests */\n Error = 'error',\n /** Match all flow action types */\n All = '*',\n}\n\nexport type FlowType = (typeof FlowTypeEnum)[keyof typeof FlowTypeEnum];\n\n/**\n * Flow Validation Error Pointer\n */\nexport interface FlowValidationErrorPointer {\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n path: string;\n}\n\n/**\n * Flow Validation Error\n */\nexport interface FlowValidationError {\n error: string;\n error_type: string;\n message: string;\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n pointers: FlowValidationErrorPointer[];\n}\n\n/**\n * Flow Item\n */\nexport interface Flow {\n id: string;\n name: string;\n status: FlowStatusEnum;\n categories: FlowCategoryEnum[];\n validation_errors: FlowValidationError[];\n}\n\n/**\n * Pagination Cursors\n */\nexport interface PaginationCursors {\n before: string;\n after: string;\n}\n\n/**\n * Pagination Object\n */\nexport interface Pagination {\n cursors: PaginationCursors;\n}\n\n/**\n * Flows List Response\n */\nexport interface FlowsListResponse {\n data: Flow[];\n paging: Pagination;\n}\n\n/**\n * Flow Asset\n */\nexport interface FlowAsset {\n name: string;\n asset_type: string;\n download_url: string;\n}\n\n/**\n * Flow Assets Response\n */\nexport interface FlowAssetsResponse {\n data: FlowAsset[];\n paging: Pagination;\n}\n\n/**\n * Flow Preview\n */\nexport interface FlowPreview {\n preview_url: string;\n expires_at: string;\n}\n\n/**\n * Flow Preview Response\n */\nexport interface FlowPreviewResponse {\n preview: FlowPreview;\n id: string;\n}\n\n/**\n * Flow Migration Result\n */\nexport interface FlowMigrationResult {\n source_name: string;\n source_id: string;\n migrated_id: string;\n}\n\n/**\n * Flow Migration Failure\n */\nexport interface FlowMigrationFailure {\n source_name: string;\n error_code: string;\n error_message: string;\n}\n\n/**\n * Create Flow Response\n */\nexport interface CreateFlowResponse {\n id: string;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Update Flow Response\n */\nexport interface UpdateFlowResponse {\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Flow Migration Response\n */\nexport interface FlowMigrationResponse {\n migrated_flows: FlowMigrationResult[];\n failed_flows: FlowMigrationFailure[];\n}\n\n/**\n * Validate Flow JSON Response\n */\nexport interface ValidateFlowJsonResponse {\n valid: boolean;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * WhatsApp Flow Endpoint - Encrypted Request Payload\n * Represents the raw encrypted data received from WhatsApp\n */\nexport interface FlowEncryptedRequestPayload {\n encrypted_aes_key: string;\n encrypted_flow_data: string;\n initial_vector: string;\n}\n\n/**\n * WhatsApp Flow Endpoint - Decrypted Request Response\n * Represents the successfully decrypted data and encryption keys\n */\nexport interface FlowDecryptedRequestResponse {\n decryptedBody: any;\n aesKeyBuffer: Buffer;\n initialVectorBuffer: Buffer;\n}\n\n/**\n * WhatsApp Flow Endpoint - HTTP Request with Body\n * Represents an HTTP request with the encrypted payload\n */\nexport interface FlowHttpRequest extends IncomingMessage {\n body: FlowEncryptedRequestPayload;\n headers: IncomingHttpHeaders;\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Request\n * Represents the structure of a health check request\n */\nexport interface FlowHealthCheckRequest {\n action: 'ping';\n version: '3.0';\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Response\n * The expected response structure for health check requests\n */\nexport interface FlowHealthCheckResponse {\n data: {\n status: 'active';\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Request\n * Represents the structure of a data exchange request\n */\nexport interface FlowDataExchangeRequest {\n version: '3.0';\n action: FlowActionEnum;\n screen: string;\n flow_token: string;\n data?: Record<string, any> & { error_message?: string };\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Response\n * The expected response structure for data exchange requests\n */\nexport interface FlowDataExchangeResponse {\n screen?: string;\n data?: Record<string, any | { error_message?: string }>;\n}\n\n/**\n * WhatsApp Flow Endpoint - Success Screen Response\n * The expected response structure for success screen requests\n */\nexport interface FlowSuccessScreenResponse {\n screen: 'SUCCESS';\n data: {\n extension_message_response?: {\n params?: {\n flow_token: string;\n [key: string]: string;\n };\n };\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Request\n * Represents the structure of an error notification request\n */\nexport interface FlowErrorNotificationRequest {\n version: '3.0';\n action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;\n screen: string;\n flow_token: string;\n data: {\n error: string;\n error_message: string;\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Response\n * The expected response structure for error notification requests\n */\nexport interface FlowErrorNotificationResponse {\n acknowledged: boolean;\n}\n\n/**\n * WhatsApp Flow Endpoint - Comprehensive Request Object\n * A combined type that includes all possible fields from different request types\n * with all fields being optional for flexibility\n */\nexport interface FlowEndpointRequest {\n // Common fields\n version?: '3.0';\n action?: 'ping' | FlowActionEnum;\n\n screen?: string;\n flow_token?: string;\n\n data?: Record<string, any> & {\n error_key?: string;\n error_message?: string;\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Response\n * Union type for all possible response types from a Flow endpoint\n */\nexport type FlowEndpointResponse =\n | FlowHealthCheckResponse\n | FlowDataExchangeResponse\n | FlowErrorNotificationResponse\n | FlowSuccessScreenResponse;\n\nexport interface FlowClass {\n /**\n * List Flows\n *\n * @param wabaId - The WABA ID\n * @returns Promise with the list of flows\n */\n listFlows(wabaId: string): Promise<FlowsListResponse>;\n\n /**\n * Create Flow\n *\n * @param wabaId - The WABA ID\n * @param data - The flow data including name, categories, endpoint_uri, and optional clone_flow_id\n * @returns Promise with the created flow ID\n */\n createFlow(\n wabaId: string,\n data: {\n name: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n clone_flow_id?: string;\n flow_json?: string;\n publish?: boolean;\n },\n ): Promise<CreateFlowResponse>;\n\n /**\n * Get Flow\n *\n * @param flowId - The flow ID\n * @param fields - Optional fields to return\n * @param dateFormat - Optional date format\n * @returns Promise with the flow details\n */\n getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;\n\n /**\n * Update Flow Metadata\n *\n * @param flowId - The flow ID\n * @param data - The flow metadata to update\n * @returns Promise with the success status\n */\n updateFlowMetadata(\n flowId: string,\n data: {\n name?: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n application_id?: string;\n },\n ): Promise<ResponseSuccess>;\n\n /**\n * Delete Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deleteFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * List Assets (Get Flow JSON URL)\n *\n * @param flowId - The flow ID\n * @returns Promise with the list of assets\n */\n listAssets(flowId: string): Promise<FlowAssetsResponse>;\n\n /**\n * Update Flow JSON\n *\n * @param flowId - The flow ID\n * @param data - The asset data including asset_type, file, and name\n * @returns Promise with the success status and validation errors\n */\n updateFlowJson(\n flowId: string,\n data: {\n file: Blob | Buffer | object;\n name?: string;\n },\n ): Promise<UpdateFlowResponse>;\n\n /**\n * Validate Flow JSON by attempting an update without publishing.\n * This is a convenience method; the API doesn't have a dedicated validation endpoint.\n *\n * @param flowId - The ID of the Flow (must exist, can be in DRAFT status).\n * @param flowJsonData - The Flow JSON content as a Buffer, JSON object, or Blob.\n * @returns Promise indicating if the JSON is valid and includes validation errors if any.\n */\n validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;\n\n /**\n * Publish Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n publishFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Deprecate Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deprecateFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Migrate Flows\n *\n * @param wabaId - The destination WABA ID\n * @param data - The migration data including source_waba_id and optional source_flow_names\n * @returns Promise with migration results\n */\n migrateFlows(\n wabaId: string,\n data: {\n source_waba_id: string;\n source_flow_names?: string[];\n },\n ): Promise<FlowMigrationResponse>;\n}\n"],"mappings":"AAMA,IAAY,EAAA,SAAA,EAAL,OACH,GAAA,MAAA,QACA,EAAA,UAAA,YACA,EAAA,UAAA,YACA,EAAA,QAAA,UACA,EAAA,WAAA,oBAMQ,EAAA,SAAA,EAAL,OACH,GAAA,OAAA,UACA,EAAA,OAAA,UACA,EAAA,mBAAA,sBACA,EAAA,eAAA,kBACA,EAAA,UAAA,aACA,EAAA,gBAAA,mBACA,EAAA,OAAA,SACA,EAAA,MAAA,eAGQ,EAAA,SAAA,EAAL,OACH,GAAA,KAAA,OACA,EAAA,KAAA,OACA,EAAA,cAAA,uBAOQ,EAAA,SAAA,EAAL,OAEH,GAAA,KAAA,OAEA,EAAA,OAAA,gBAEA,EAAA,MAAA,QAEA,EAAA,IAAA"}
1
+ {"version":3,"file":"common.js","names":[],"sources":["../../../../src/api/flow/types/common.ts"],"sourcesContent":["import { ResponseSuccess } from '../../../types';\nimport { IncomingHttpHeaders, IncomingMessage } from 'http';\n\n/**\n * Enum for Flow Status\n */\nexport enum FlowStatusEnum {\n Draft = 'DRAFT',\n Published = 'PUBLISHED',\n Throttled = 'THROTTLED',\n Blocked = 'BLOCKED',\n Deprecated = 'DEPRECATED',\n}\n\n/**\n * Enum for Flow Categories\n */\nexport enum FlowCategoryEnum {\n SignUp = 'SIGN_UP',\n SignIn = 'SIGN_IN',\n AppointmentBooking = 'APPOINTMENT_BOOKING',\n LeadGeneration = 'LEAD_GENERATION',\n ContactUs = 'CONTACT_US',\n CustomerSupport = 'CUSTOMER_SUPPORT',\n Survey = 'SURVEY',\n Other = 'OTHER',\n}\n\nexport enum FlowActionEnum {\n INIT = 'INIT',\n BACK = 'BACK',\n DATA_EXCHANGE = 'data_exchange',\n}\n\n/**\n * Enum for Flow Types in webhook handlers\n * Used to register handlers for specific flow events\n */\nexport enum FlowTypeEnum {\n /** Health check/ping requests */\n Ping = 'ping',\n /** Data exchange requests */\n Change = 'data_exchange',\n /** Error notification requests */\n Error = 'error',\n /** Match all flow action types */\n All = '*',\n}\n\nexport type FlowType = (typeof FlowTypeEnum)[keyof typeof FlowTypeEnum];\n\n/**\n * Flow Validation Error Pointer\n */\nexport interface FlowValidationErrorPointer {\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n path: string;\n}\n\n/**\n * Flow Validation Error\n */\nexport interface FlowValidationError {\n error: string;\n error_type: string;\n message: string;\n line_start: number;\n line_end: number;\n column_start: number;\n column_end: number;\n pointers: FlowValidationErrorPointer[];\n}\n\n/**\n * Flow Item\n */\nexport interface Flow {\n id: string;\n name: string;\n status: FlowStatusEnum;\n categories: FlowCategoryEnum[];\n validation_errors: FlowValidationError[];\n}\n\n/**\n * Pagination Cursors\n */\nexport interface PaginationCursors {\n before: string;\n after: string;\n}\n\n/**\n * Pagination Object\n */\nexport interface Pagination {\n cursors: PaginationCursors;\n}\n\n/**\n * Flows List Response\n */\nexport interface FlowsListResponse {\n data: Flow[];\n paging: Pagination;\n}\n\n/**\n * Flow Asset\n */\nexport interface FlowAsset {\n name: string;\n asset_type: string;\n download_url: string;\n}\n\n/**\n * Flow Assets Response\n */\nexport interface FlowAssetsResponse {\n data: FlowAsset[];\n paging: Pagination;\n}\n\n/**\n * Flow Preview\n */\nexport interface FlowPreview {\n preview_url: string;\n expires_at: string;\n}\n\n/**\n * Flow Preview Response\n */\nexport interface FlowPreviewResponse {\n preview: FlowPreview;\n id: string;\n}\n\n/**\n * Flow Migration Result\n */\nexport interface FlowMigrationResult {\n source_name: string;\n source_id: string;\n migrated_id: string;\n}\n\n/**\n * Flow Migration Failure\n */\nexport interface FlowMigrationFailure {\n source_name: string;\n error_code: string;\n error_message: string;\n}\n\n/**\n * Create Flow Response\n */\nexport interface CreateFlowResponse {\n id: string;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Update Flow Response\n */\nexport interface UpdateFlowResponse {\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * Flow Migration Response\n */\nexport interface FlowMigrationResponse {\n migrated_flows: FlowMigrationResult[];\n failed_flows: FlowMigrationFailure[];\n}\n\n/**\n * Validate Flow JSON Response\n */\nexport interface ValidateFlowJsonResponse {\n valid: boolean;\n success: boolean;\n validation_errors?: FlowValidationError[];\n}\n\n/**\n * WhatsApp Flow Endpoint - Encrypted Request Payload\n * Represents the raw encrypted data received from WhatsApp\n */\nexport interface FlowEncryptedRequestPayload {\n encrypted_aes_key: string;\n encrypted_flow_data: string;\n initial_vector: string;\n}\n\n/**\n * WhatsApp Flow Endpoint - Decrypted Request Response\n * Represents the successfully decrypted data and encryption keys\n */\nexport interface FlowDecryptedRequestResponse {\n decryptedBody: any;\n aesKeyBuffer: Buffer;\n initialVectorBuffer: Buffer;\n}\n\n/**\n * WhatsApp Flow Endpoint - HTTP Request with Body\n * Represents an HTTP request with the encrypted payload\n */\nexport interface FlowHttpRequest extends IncomingMessage {\n body: FlowEncryptedRequestPayload;\n headers: IncomingHttpHeaders;\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Request\n * Represents the structure of a health check request\n */\nexport interface FlowHealthCheckRequest {\n action: 'ping';\n version: '3.0';\n}\n\n/**\n * WhatsApp Flow Endpoint - Health Check Response\n * The expected response structure for health check requests\n */\nexport interface FlowHealthCheckResponse {\n data: {\n status: 'active';\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Request\n * Represents the structure of a data exchange request\n */\nexport interface FlowDataExchangeRequest {\n version: '3.0';\n action: FlowActionEnum;\n screen: string;\n flow_token: string;\n data?: Record<string, any> & { error_message?: string };\n}\n\n/**\n * WhatsApp Flow Endpoint - Data Exchange Response\n * The expected response structure for data exchange requests\n */\nexport interface FlowDataExchangeResponse {\n screen?: string;\n data?: Record<string, any | { error_message?: string }>;\n}\n\n/**\n * WhatsApp Flow Endpoint - Success Screen Response\n * The expected response structure for success screen requests\n */\nexport interface FlowSuccessScreenResponse {\n screen: 'SUCCESS';\n data: {\n extension_message_response?: {\n params?: {\n flow_token: string;\n [key: string]: string;\n };\n };\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Request\n * Represents the structure of an error notification request\n */\nexport interface FlowErrorNotificationRequest {\n version: '3.0';\n action: Exclude<FlowActionEnum, FlowActionEnum.BACK>;\n screen: string;\n flow_token: string;\n data: {\n error: string;\n error_message: string;\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Error Notification Response\n * The expected response structure for error notification requests\n */\nexport interface FlowErrorNotificationResponse {\n acknowledged: boolean;\n}\n\n/**\n * WhatsApp Flow Endpoint - Comprehensive Request Object\n * A combined type that includes all possible fields from different request types\n * with all fields being optional for flexibility\n */\nexport interface FlowEndpointRequest {\n // Common fields\n version?: '3.0';\n action?: 'ping' | FlowActionEnum;\n\n screen?: string;\n flow_token?: string;\n\n data?: Record<string, any> & {\n error_key?: string;\n error_message?: string;\n };\n}\n\n/**\n * WhatsApp Flow Endpoint - Response\n * Union type for all possible response types from a Flow endpoint\n */\nexport type FlowEndpointResponse =\n | FlowHealthCheckResponse\n | FlowDataExchangeResponse\n | FlowErrorNotificationResponse\n | FlowSuccessScreenResponse;\n\nexport interface FlowClass {\n /**\n * List Flows\n *\n * @param wabaId - The WABA ID\n * @returns Promise with the list of flows\n */\n listFlows(wabaId: string): Promise<FlowsListResponse>;\n\n /**\n * Create Flow\n *\n * @param wabaId - The WABA ID\n * @param data - The flow data including name, categories, endpoint_uri, and optional clone_flow_id\n * @returns Promise with the created flow ID\n */\n createFlow(\n wabaId: string,\n data: {\n name: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n clone_flow_id?: string;\n flow_json?: string;\n publish?: boolean;\n },\n ): Promise<CreateFlowResponse>;\n\n /**\n * Get Flow\n *\n * @param flowId - The flow ID\n * @param fields - Optional fields to return\n * @param dateFormat - Optional date format\n * @returns Promise with the flow details\n */\n getFlow(flowId: string, fields?: string, dateFormat?: string): Promise<Flow | FlowPreviewResponse>;\n\n /**\n * Update Flow Metadata\n *\n * @param flowId - The flow ID\n * @param data - The flow metadata to update\n * @returns Promise with the success status\n */\n updateFlowMetadata(\n flowId: string,\n data: {\n name?: string;\n categories?: FlowCategoryEnum[];\n endpoint_uri?: string;\n application_id?: string;\n },\n ): Promise<ResponseSuccess>;\n\n /**\n * Delete Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deleteFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * List Assets (Get Flow JSON URL)\n *\n * @param flowId - The flow ID\n * @returns Promise with the list of assets\n */\n listAssets(flowId: string): Promise<FlowAssetsResponse>;\n\n /**\n * Update Flow JSON\n *\n * @param flowId - The flow ID\n * @param data - The asset data including asset_type, file, and name\n * @returns Promise with the success status and validation errors\n */\n updateFlowJson(\n flowId: string,\n data: {\n file: Blob | Buffer | object;\n name?: string;\n },\n ): Promise<UpdateFlowResponse>;\n\n /**\n * Validate Flow JSON by attempting an update without publishing.\n * This is a convenience method; the API doesn't have a dedicated validation endpoint.\n *\n * @param flowId - The ID of the Flow (must exist, can be in DRAFT status).\n * @param flowJsonData - The Flow JSON content as a Buffer, JSON object, or Blob.\n * @returns Promise indicating if the JSON is valid and includes validation errors if any.\n */\n validateFlowJson(flowId: string, flowJsonData: Blob | Buffer | object): Promise<ValidateFlowJsonResponse>;\n\n /**\n * Publish Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n publishFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Deprecate Flow\n *\n * @param flowId - The flow ID\n * @returns Promise with the success status\n */\n deprecateFlow(flowId: string): Promise<ResponseSuccess>;\n\n /**\n * Migrate Flows\n *\n * @param wabaId - The destination WABA ID\n * @param data - The migration data including source_waba_id and optional source_flow_names\n * @returns Promise with migration results\n */\n migrateFlows(\n wabaId: string,\n data: {\n source_waba_id: string;\n source_flow_names?: string[];\n },\n ): Promise<FlowMigrationResponse>;\n}\n"],"mappings":";;;;AAMA,IAAY,4DAAL;AACH;AACA;AACA;AACA;AACA;;;;;;AAMJ,IAAY,gEAAL;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGJ,IAAY,4DAAL;AACH;AACA;AACA;;;;;;;AAOJ,IAAY,wDAAL;;AAEH;;AAEA;;AAEA;;AAEA"}
@@ -0,0 +1 @@
1
+ import { CreateFlowResponse, 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 "./common.js";
@@ -0,0 +1 @@
1
+ import { FlowActionEnum, FlowCategoryEnum, FlowStatusEnum, FlowTypeEnum } from "./common.js";
@@ -0,0 +1,32 @@
1
+ import { ResponseSuccess } from "../../../types/request.js";
2
+
3
+ //#region src/api/media/types/common.d.ts
4
+ type MediaResponse = {
5
+ id: string;
6
+ url: string;
7
+ mime_type: string;
8
+ sha256: string;
9
+ file_size: number;
10
+ messaging_product: 'whatsapp';
11
+ };
12
+ type MediasResponse = {
13
+ data: MediaResponse[];
14
+ paging: {
15
+ cursors: {
16
+ before: string;
17
+ after: string;
18
+ };
19
+ };
20
+ };
21
+ type UploadMediaResponse = {
22
+ id: string;
23
+ };
24
+ interface MediaClass {
25
+ getMediaById(mediaId: string, phone_number_id?: string): Promise<MediaResponse>;
26
+ uploadMedia(file: File, messagingProduct?: string): Promise<UploadMediaResponse>;
27
+ deleteMedia(mediaId: string, phone_number_id?: string): Promise<ResponseSuccess>;
28
+ downloadMedia(mediaUrl: string): Promise<Blob>;
29
+ }
30
+ //#endregion
31
+ export { MediaClass, MediaResponse, MediasResponse, UploadMediaResponse };
32
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","names":[],"sources":["../../../../src/api/media/types/common.ts"],"sourcesContent":[],"mappings":";;;KAEY,aAAA;;EAAA,GAAA,EAAA,MAAA;EASA,SAAA,EAAA,MAAc;EAUd,MAAA,EAAA,MAAA;EAIK,SAAA,EAAA,MAAU;EAAA,iBAAA,EAAA,UAAA;;AACkC,KAfjD,cAAA,GAeiD;MACvC,EAfZ,aAeY,EAAA;QAA0C,EAAA;IAAR,OAAA,EAAA;MACY,MAAA,EAAA,MAAA;MAAR,KAAA,EAAA,MAAA;IACf,CAAA;;CAAD;KARhC,mBAAA;;;UAIK,UAAA;2DAC4C,QAAQ;oBAC/C,kCAAkC,QAAQ;0DACJ,QAAQ;mCAC/B,QAAQ"}
@@ -0,0 +1 @@
1
+ import { MediaClass, MediaResponse, MediasResponse, UploadMediaResponse } from "./common.js";
@@ -0,0 +1,99 @@
1
+ import { ComponentTypesEnum, InteractiveTypesEnum, MessageTypesEnum } from "../../../types/enums.js";
2
+ import { GeneralRequestBody } from "../../../types/request.js";
3
+ import { BaseClass } from "../../../types/base.js";
4
+ import { TextMessageParams } from "./text.js";
5
+ import { MessageTemplateObject } from "./template.js";
6
+ import { AudioMediaObject, DocumentMediaObject, ImageMediaObject, StickerMediaObject, VideoMediaObject } from "./media.js";
7
+ import { ContactObject } from "./contact.js";
8
+ import { LocationObject } from "./location.js";
9
+ import { InteractiveObject } from "./interactive.js";
10
+ import { ReactionParams } from "./reaction.js";
11
+
12
+ //#region src/api/messages/types/common.d.ts
13
+ type GeneralMessageBody = GeneralRequestBody & {
14
+ /**
15
+ * The Meta messaging product name.
16
+ * @default 'whatsapp'
17
+ */
18
+ messaging_product: 'whatsapp';
19
+ };
20
+ type StatusObject = {
21
+ status: 'read';
22
+ message_id: string;
23
+ typing_indicator?: TypingIndicatorObject;
24
+ };
25
+ type TypingIndicatorObject = {
26
+ type: 'text';
27
+ };
28
+ type StatusRequestBody = GeneralMessageBody & StatusObject;
29
+ type ConTextObject = {
30
+ message_id: string;
31
+ };
32
+ type MessageRequestBody<T extends MessageTypesEnum> = GeneralMessageBody & {
33
+ recipient_type?: string;
34
+ to: string;
35
+ context?: ConTextObject;
36
+ type?: T;
37
+ };
38
+ interface MessageRequestParams<T> {
39
+ body: T;
40
+ to: string;
41
+ replyMessageId?: string;
42
+ }
43
+ interface StatusParams {
44
+ status: string;
45
+ messageId: string;
46
+ typingIndicator?: {
47
+ type: string;
48
+ };
49
+ }
50
+ type MessagesResponse = GeneralMessageBody & {
51
+ contacts: [{
52
+ input: string;
53
+ wa_id: string;
54
+ }];
55
+ messages: [{
56
+ id: string;
57
+ }];
58
+ };
59
+ declare class MessagesClass extends BaseClass {
60
+ text(params: TextMessageParams): Promise<MessagesResponse>;
61
+ template(params: MessageRequestParams<MessageTemplateObject<ComponentTypesEnum>>): Promise<MessagesResponse>;
62
+ audio(params: MessageRequestParams<AudioMediaObject>): Promise<MessagesResponse>;
63
+ document(params: MessageRequestParams<DocumentMediaObject>): Promise<MessagesResponse>;
64
+ image(params: MessageRequestParams<ImageMediaObject>): Promise<MessagesResponse>;
65
+ video(params: MessageRequestParams<VideoMediaObject>): Promise<MessagesResponse>;
66
+ sticker(params: MessageRequestParams<StickerMediaObject>): Promise<MessagesResponse>;
67
+ contacts(params: MessageRequestParams<[ContactObject]>): Promise<MessagesResponse>;
68
+ location(params: MessageRequestParams<LocationObject>): Promise<MessagesResponse>;
69
+ interactive(params: MessageRequestParams<InteractiveObject>): Promise<MessagesResponse>;
70
+ interactiveList(params: MessageRequestParams<InteractiveObject & {
71
+ type: InteractiveTypesEnum.List;
72
+ }>): Promise<MessagesResponse>;
73
+ interactiveCtaUrl(params: MessageRequestParams<InteractiveObject & {
74
+ type: InteractiveTypesEnum.CtaUrl;
75
+ }>): Promise<MessagesResponse>;
76
+ interactiveLocationRequest(params: MessageRequestParams<InteractiveObject & {
77
+ type: InteractiveTypesEnum.LocationRequest;
78
+ }>): Promise<MessagesResponse>;
79
+ interactiveAddressMessage(params: MessageRequestParams<InteractiveObject & {
80
+ type: InteractiveTypesEnum.AddressMessage;
81
+ }>): Promise<MessagesResponse>;
82
+ interactiveReplyButtons(params: MessageRequestParams<InteractiveObject & {
83
+ type: InteractiveTypesEnum.Button;
84
+ }>): Promise<MessagesResponse>;
85
+ interactiveFlow(params: MessageRequestParams<InteractiveObject & {
86
+ type: InteractiveTypesEnum.Flow;
87
+ }>): Promise<MessagesResponse>;
88
+ reaction(params: ReactionParams): Promise<MessagesResponse>;
89
+ markAsRead(params: {
90
+ messageId: string;
91
+ }): Promise<MessagesResponse>;
92
+ showTypingIndicator(params: {
93
+ messageId: string;
94
+ }): Promise<MessagesResponse>;
95
+ status(params: StatusParams): Promise<MessagesResponse>;
96
+ }
97
+ //#endregion
98
+ export { GeneralMessageBody, MessageRequestBody, MessageRequestParams, MessagesClass, MessagesResponse, StatusParams };
99
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","names":[],"sources":["../../../../src/api/messages/types/common.ts"],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,IAAA,EAyBe,oBAAA,CAAqB,MAzBpC;KAAO,EA4BP,OA5BO,CA4BC,gBA5BD,CAAA;iBAIQ,CAAA,MAAA,EA0BN,oBA1B2B,CAwB7B,iBAAA,GAxB6B;IAF3B,IAAA,EA8BM,oBAAA,CAAqB,IA9B3B;KAKD,EA4BR,OA5BQ,CA4BA,gBA5BA,CAAA;UAAR,CAAA,MAAA,EA4BO,cA5BP,CAAA,EA+BoD,OA/BpD,CA+B4D,gBA/B5D,CAAA;YAAO,CAAA,MAAA,EAAA;IAIQ,SAAA,EAAA,MAAA;MA4ByB,OA9B/B,CA8BuC,gBA9BvC,CAAA;qBAKD,CAAA,MAAA,EAAA;IAAR,SAAA,EAAA,MAAA;MA0BiD,OA1B1C,CA0BkD,gBA1BlD,CAAA;QAIQ,CAAA,MAAA,EAuBH,YAvBwB,CAAA,EAuBT,OAvBS,CAuBD,gBAvBC,CAAA"}
@@ -0,0 +1,54 @@
1
+ import { MessageTypesEnum } from "../../../types/enums.js";
2
+ import { MessageRequestBody } from "./common.js";
3
+
4
+ //#region src/api/messages/types/contact.d.ts
5
+ type AddressesObject = {
6
+ street?: string;
7
+ city?: string;
8
+ state?: string;
9
+ zip?: string;
10
+ country?: string;
11
+ country_code?: string;
12
+ type?: 'HOME' | 'WORK' | string;
13
+ };
14
+ type EmailObject = {
15
+ email?: string;
16
+ type?: 'HOME' | 'WORK' | string;
17
+ };
18
+ type NameObject = {
19
+ formatted_name: string;
20
+ first_name?: string;
21
+ last_name?: string;
22
+ middle_name?: string;
23
+ suffix?: string;
24
+ prefix?: string;
25
+ };
26
+ type OrgObject = {
27
+ company?: string;
28
+ department?: string;
29
+ title?: string;
30
+ };
31
+ type PhoneObject = {
32
+ phone?: 'PHONE_NUMBER';
33
+ type?: 'CELL' | 'MAIN' | 'IPHONE' | 'HOME' | 'WORK' | string;
34
+ wa_id?: string;
35
+ };
36
+ type URLObject = {
37
+ url?: string;
38
+ type?: 'HOME' | 'WORK' | string;
39
+ };
40
+ type ContactObject = {
41
+ addresses?: AddressesObject[];
42
+ birthday?: `${number}${number}${number}${number}-${number}${number}-${number}${number}`;
43
+ emails?: EmailObject[];
44
+ name: NameObject;
45
+ org?: OrgObject;
46
+ phones?: PhoneObject[];
47
+ urls?: URLObject[];
48
+ };
49
+ type ContactsMessageRequestBody = MessageRequestBody<MessageTypesEnum.Contacts> & {
50
+ [MessageTypesEnum.Contacts]: [ContactObject];
51
+ };
52
+ //#endregion
53
+ export { ContactObject };
54
+ //# sourceMappingURL=contact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.d.ts","names":[],"sources":["../../../../src/api/messages/types/contact.ts"],"sourcesContent":[],"mappings":";;;;KAIY,eAAA;;EAAA,IAAA,CAAA,EAAA,MAAA;EAUA,KAAA,CAAA,EAAA,MAAW;EAKX,GAAA,CAAA,EAAA,MAAA;EASA,OAAA,CAAA,EAAA,MAAS;EAMT,YAAA,CAAA,EAAW,MAAA;EAMX,IAAA,CAAA,EAAA,MAAS,GAAA,MAAA,GAAA,MAAA;AAKrB,CAAA;AAAyB,KA/Bb,WAAA,GA+Ba;OACT,CAAA,EAAA,MAAA;MAEH,CAAA,EAAA,MAAA,GAAA,MAAA,GAAA,MAAA;;AAEH,KA/BE,UAAA,GA+BF;gBACG,EAAA,MAAA;YACF,CAAA,EAAA,MAAA;EAAS,SAAA,CAAA,EAAA,MAAA;EAGR,WAAA,CAAA,EAAA,MAAA;EAA0B,MAAA,CAAA,EAAA,MAAA;QAAsB,CAAA,EAAA,MAAA;;AAC1B,KA5BtB,SAAA,GA4BsB;SAA7B,CAAA,EAAA,MAAA;EAAyB,UAAA,CAAA,EAAA,MAAA;;;KAtBlB,WAAA;;;;;KAMA,SAAA;;;;KAKA,aAAA;cACI;;WAEH;QACH;QACA;WACG;SACF;;KAGC,0BAAA,GAA6B,mBAAmB,gBAAA,CAAiB;GACxE,gBAAA,CAAiB,QAAA,IAAY"}
@@ -0,0 +1,8 @@
1
+ import { TextMessageParams, TextObject } from "./text.js";
2
+ import { MessageTemplateObject } from "./template.js";
3
+ import { AudioMediaObject, DocumentMediaObject, ImageMediaObject, StickerMediaObject, VideoMediaObject } from "./media.js";
4
+ import { ContactObject } from "./contact.js";
5
+ import { LocationObject } from "./location.js";
6
+ import { InteractiveObject } from "./interactive.js";
7
+ import { ReactionParams } from "./reaction.js";
8
+ import { GeneralMessageBody, MessageRequestBody, MessageRequestParams, MessagesClass, MessagesResponse, StatusParams } from "./common.js";
@@ -0,0 +1,182 @@
1
+ import { InteractiveTypesEnum, MessageTypesEnum } from "../../../types/enums.js";
2
+ import { MessageRequestBody } from "./common.js";
3
+
4
+ //#region src/api/messages/types/interactive.d.ts
5
+ type DocumentMediaObject = {
6
+ id?: string;
7
+ link?: string;
8
+ caption?: string;
9
+ filename?: string;
10
+ };
11
+ type ImageMediaObject = {
12
+ id?: string;
13
+ link?: string;
14
+ caption?: string;
15
+ };
16
+ type VideoMediaObject = {
17
+ id?: string;
18
+ link?: string;
19
+ caption?: string;
20
+ };
21
+ type ProductObject = {
22
+ product_retailer_id: string;
23
+ };
24
+ type SimpleTextObject = {
25
+ text: string;
26
+ };
27
+ type RowObject = {
28
+ id: string;
29
+ title: string;
30
+ description?: string;
31
+ };
32
+ type MultiProductSectionObject = {
33
+ product_items: ProductObject[];
34
+ rows?: never;
35
+ title?: string;
36
+ };
37
+ type ListSectionObject = {
38
+ product_items?: never;
39
+ rows: RowObject[];
40
+ title?: string;
41
+ };
42
+ type SectionObject = MultiProductSectionObject | ListSectionObject;
43
+ type ButtonObject = {
44
+ title: string;
45
+ id: string;
46
+ };
47
+ type ReplyButtonObject = {
48
+ type: 'reply';
49
+ reply: ButtonObject;
50
+ };
51
+ type ActionObject = {
52
+ buttons?: ReplyButtonObject[];
53
+ catalog_id?: string;
54
+ product_retailer_id?: string;
55
+ sections?: SectionObject[];
56
+ };
57
+ type HeaderObject = {
58
+ type: 'document' | 'image' | 'text' | 'video';
59
+ document?: DocumentMediaObject;
60
+ image?: ImageMediaObject;
61
+ text?: string;
62
+ video?: VideoMediaObject;
63
+ };
64
+ type ButtonInteractiveObject = {
65
+ type: InteractiveTypesEnum.Button;
66
+ body: SimpleTextObject;
67
+ footer?: SimpleTextObject;
68
+ header?: HeaderObject;
69
+ action: ActionObject;
70
+ };
71
+ type ListInteractiveObject = {
72
+ type: InteractiveTypesEnum.List;
73
+ body: SimpleTextObject;
74
+ footer?: SimpleTextObject;
75
+ header?: HeaderObject;
76
+ action: ActionObject;
77
+ };
78
+ type ProductInteractiveObject = {
79
+ type: InteractiveTypesEnum.Product;
80
+ body?: SimpleTextObject;
81
+ footer?: SimpleTextObject;
82
+ header?: HeaderObject;
83
+ action: ActionObject;
84
+ };
85
+ type ProductListInteractiveObject = {
86
+ type: InteractiveTypesEnum.ProductList;
87
+ body: SimpleTextObject;
88
+ footer?: SimpleTextObject;
89
+ header: HeaderObject;
90
+ action: ActionObject;
91
+ };
92
+ type CtaUrlParameters = {
93
+ display_text: string;
94
+ url: string;
95
+ };
96
+ type CtaUrlActionObject = {
97
+ name: 'cta_url';
98
+ parameters: CtaUrlParameters;
99
+ };
100
+ type CtaUrlInteractiveObject = {
101
+ type: InteractiveTypesEnum.CtaUrl;
102
+ body?: SimpleTextObject;
103
+ footer?: SimpleTextObject;
104
+ header?: HeaderObject;
105
+ action: CtaUrlActionObject;
106
+ };
107
+ type LocationRequestActionObject = {
108
+ name: 'send_location';
109
+ };
110
+ type LocationRequestInteractiveObject = {
111
+ type: InteractiveTypesEnum.LocationRequest;
112
+ body: SimpleTextObject;
113
+ footer?: SimpleTextObject;
114
+ header?: HeaderObject;
115
+ action: LocationRequestActionObject;
116
+ };
117
+ type AddressValues = {
118
+ name?: string;
119
+ phone_number?: string;
120
+ in_pin_code?: string;
121
+ house_number?: string;
122
+ floor_number?: string;
123
+ tower_number?: string;
124
+ building_name?: string;
125
+ address?: string;
126
+ landmark_area?: string;
127
+ city?: string;
128
+ state?: string;
129
+ };
130
+ type SavedAddress = {
131
+ id: string;
132
+ value: AddressValues;
133
+ };
134
+ type ValidationErrors = { [key in keyof AddressValues]?: string };
135
+ type AddressMessageParameters = {
136
+ country: string;
137
+ values?: AddressValues;
138
+ saved_addresses?: SavedAddress[];
139
+ validation_errors?: ValidationErrors;
140
+ };
141
+ type AddressMessageActionObject = {
142
+ name: 'address_message';
143
+ parameters: AddressMessageParameters;
144
+ };
145
+ type AddressMessageInteractiveObject = {
146
+ type: InteractiveTypesEnum.AddressMessage;
147
+ body: SimpleTextObject;
148
+ footer?: SimpleTextObject;
149
+ header?: HeaderObject;
150
+ action: AddressMessageActionObject;
151
+ };
152
+ type FlowParameters = {
153
+ flow_message_version: string;
154
+ flow_id?: string;
155
+ flow_name?: string;
156
+ flow_cta: string;
157
+ mode?: 'draft' | 'published';
158
+ flow_token: string;
159
+ flow_action: 'navigate' | 'data_exchange';
160
+ flow_action_payload?: {
161
+ screen?: string;
162
+ data?: Record<string, string>;
163
+ };
164
+ };
165
+ type FlowActionObject = {
166
+ name: 'flow';
167
+ parameters: FlowParameters;
168
+ };
169
+ type FlowInteractiveObject = {
170
+ type: InteractiveTypesEnum.Flow;
171
+ body: SimpleTextObject;
172
+ footer?: SimpleTextObject;
173
+ header?: HeaderObject;
174
+ action: FlowActionObject;
175
+ };
176
+ type InteractiveObject = ButtonInteractiveObject | ListInteractiveObject | ProductInteractiveObject | ProductListInteractiveObject | CtaUrlInteractiveObject | LocationRequestInteractiveObject | AddressMessageInteractiveObject | FlowInteractiveObject;
177
+ type InteractiveMessageRequestBody = MessageRequestBody<MessageTypesEnum.Interactive> & {
178
+ [MessageTypesEnum.Interactive]: InteractiveObject;
179
+ };
180
+ //#endregion
181
+ export { InteractiveObject };
182
+ //# sourceMappingURL=interactive.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interactive.d.ts","names":[],"sources":["../../../../src/api/messages/types/interactive.ts"],"sourcesContent":[],"mappings":";;;;KAIK,mBAAA;;EAAA,IAAA,CAAA,EAAA,M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,MAAA,CAAA,EA3EhB,gBA2EgB;QACvB,CAAA,EA3EO,YA2EP;QACA,EA3EM,2BA2EN;;KAxED,aAAA,GA0EC;MACA,CAAA,EAAA,MAAA;cACA,CAAA,EAAA,MAAA;aACA,CAAA,EAAA,MAAA;cACA,CAAA,EAAA,MAAA;EAAqB,YAAA,CAAA,EAAA,MAAA;EAEf,YAAA,CAAA,EAAA,MAAA;EAA6B,aAAA,CAAA,EAAA,MAAA;SAAsB,CAAA,EAAA,MAAA;eAAnB,CAAA,EAAA,MAAA;MACR,CAAA,EAAA,MAAA;OAA/B,CAAA,EAAA,MAAA;CAA4B;KAnE5B,YAAA;;SAEM;;KAGN,gBAAA,mBACa;KAGb,wBAAA;;WAEQ;oBACS;sBACE;;KAGnB,0BAAA;;cAEW;;KAGX,+BAAA;QACK,oBAAA,CAAqB;QACrB;WACG;WACA;UACD;;KAGP,cAAA;;;;;;;;;;WAUU;;;KAIV,gBAAA;;cAEW;;KAGX,qBAAA;QACK,oBAAA,CAAqB;QACrB;WACG;WACA;UACD;;KAGA,iBAAA,GACN,0BACA,wBACA,2BACA,+BACA,0BACA,mCACA,kCACA;KAEM,6BAAA,GAAgC,mBAAmB,gBAAA,CAAiB;GAC3E,gBAAA,CAAiB,WAAA,GAAc"}
@@ -0,0 +1,16 @@
1
+ import { MessageTypesEnum } from "../../../types/enums.js";
2
+ import { MessageRequestBody } from "./common.js";
3
+
4
+ //#region src/api/messages/types/location.d.ts
5
+ type LocationObject = {
6
+ longitude: number;
7
+ latitude: number;
8
+ name?: string;
9
+ address?: string;
10
+ };
11
+ type LocationMessageRequestBody = MessageRequestBody<MessageTypesEnum.Location> & {
12
+ [MessageTypesEnum.Location]: [LocationObject];
13
+ };
14
+ //#endregion
15
+ export { LocationObject };
16
+ //# sourceMappingURL=location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.d.ts","names":[],"sources":["../../../../src/api/messages/types/location.ts"],"sourcesContent":[],"mappings":";;;;KAIY,cAAA;;EAAA,QAAA,EAAA,MAAA;EAOA,IAAA,CAAA,EAAA,MAAA;EAA0B,OAAA,CAAA,EAAA,MAAA;;AAAG,KAA7B,0BAAA,GAA6B,kBAAA,CAAmB,gBAAA,CAAiB,QAApC,CAAA,GAAA;GACpC,gBAAA,CAAiB,QAAA,CAAY,EAAA,CAAA,cAAA,CAAA"}
@@ -0,0 +1,55 @@
1
+ import { MessageTypesEnum } from "../../../types/enums.js";
2
+ import { MessageRequestBody } from "./common.js";
3
+
4
+ //#region src/api/messages/types/media.d.ts
5
+ type MetaMediaObject = {
6
+ id: string;
7
+ link?: never;
8
+ };
9
+ type HostedMediaObject = {
10
+ id?: never;
11
+ link: string;
12
+ };
13
+ type AudioMediaObject = MetaMediaObject | HostedMediaObject;
14
+ type AudioMessageRequestBody = MessageRequestBody<MessageTypesEnum.Audio> & {
15
+ [MessageTypesEnum.Audio]: [AudioMediaObject];
16
+ };
17
+ type MetaDocumentMediaObject = MetaMediaObject & {
18
+ caption?: string;
19
+ filename?: string;
20
+ };
21
+ type HostedDocumentMediaObject = HostedMediaObject & {
22
+ caption?: string;
23
+ filename?: string;
24
+ };
25
+ type DocumentMediaObject = MetaDocumentMediaObject | HostedDocumentMediaObject;
26
+ type DocumentMessageRequestBody = MessageRequestBody<MessageTypesEnum.Document> & {
27
+ [MessageTypesEnum.Document]: [DocumentMediaObject];
28
+ };
29
+ type MetaImageMediaObject = MetaMediaObject & {
30
+ caption?: string;
31
+ };
32
+ type HostedImageMediaObject = HostedMediaObject & {
33
+ caption?: string;
34
+ };
35
+ type ImageMediaObject = MetaImageMediaObject | HostedImageMediaObject;
36
+ type ImageMessageRequestBody = MessageRequestBody<MessageTypesEnum.Image> & {
37
+ [MessageTypesEnum.Image]: [ImageMediaObject];
38
+ };
39
+ type MetaVideoMediaObject = MetaMediaObject & {
40
+ caption?: string;
41
+ };
42
+ type HostedVideoMediaObject = HostedMediaObject & {
43
+ caption?: string;
44
+ };
45
+ type VideoMediaObject = MetaVideoMediaObject | HostedVideoMediaObject;
46
+ type VideoMessageRequestBody = MessageRequestBody<MessageTypesEnum.Video> & {
47
+ [MessageTypesEnum.Video]: [VideoMediaObject];
48
+ };
49
+ type StickerMediaObject = MetaMediaObject | HostedMediaObject;
50
+ type StickerMessageRequestBody = MessageRequestBody<MessageTypesEnum.Sticker> & {
51
+ [MessageTypesEnum.Sticker]: [StickerMediaObject];
52
+ };
53
+ //#endregion
54
+ export { AudioMediaObject, DocumentMediaObject, ImageMediaObject, StickerMediaObject, VideoMediaObject };
55
+ //# sourceMappingURL=media.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.d.ts","names":[],"sources":["../../../../src/api/messages/types/media.ts"],"sourcesContent":[],"mappings":";;;;KAIK,eAAA;;EAAA,IAAA,CAAA,EAAA,KAAA;AAAe,CAAA;AAWpB,KANK,iBAAA,GAMuB;EAAA,EAAA,CAAA,EAAA,KAAA;MAAG,EAAA,MAAA;;AAAmC,KAAtD,gBAAA,GAAmB,eAAmC,GAAjB,iBAAiB;AAEtD,KAAA,uBAAA,GAA0B,kBAAH,CAAsB,gBAAA,CAAiB,KAAvC,CAAA,GAAA;EAAA,CAC9B,gBAAA,CAAiB,KAAA,CADa,EAAA,CACJ,gBADI,CAAA;;KAK9B,uBAAA,GAA0B,eALO,GAAA;SACP,CAAA,EAAA,MAAA;UAA1B,CAAA,EAAA,MAAA;CAAsB;AACzB,KAQG,yBAAA,GAA4B,iBALF,GAAA;EAK1B,OAAA,CAAA,EAAA,MAAA;EAKO,QAAA,CAAA,EAAA,MAAA;CAAmB;AAAG,KAAtB,mBAAA,GAAsB,uBAAA,GAA0B,yBAA1B;AAA0B,KAEhD,0BAAA,GAA6B,kBAFmB,CAEA,gBAAA,CAAiB,QAFjB,CAAA,GAAA;EAAyB,CAGhF,gBAAA,CAAiB,QAAA,CAH+D,EAAA,CAGnD,mBAHmD,CAAA;AAErF,CAAA;KAKK,oBAAA,GAAuB,eALU,GAAA;SAAsB,CAAA,EAAA,MAAA;;KASvD,sBAAA,GAAyB,iBARI,GAAA;SAA7B,CAAA,EAAA,MAAA;CAAyB;AAIzB,KAQO,gBAAA,GAAmB,oBARH,GAQ0B,sBARX;AAItC,KAMO,uBAAA,GAA0B,kBANR,CAM2B,gBAAA,CAAiB,KAN3B,CAAA,GAAA;EAInC,CAGP,gBAAA,CAAiB,KAAA,CAHM,EAAA,CAGG,gBAHH,CAAA;CAAA;KAOvB,oBAAA,GAAuB,eAPG,GAAA;SAAuB,CAAA,EAAA,MAAA;CAAsB;AAE5E,KASK,sBAAA,GAAyB,iBATK,GAAA;EAAA,OAAA,CAAA,EAAA,MAAA;;AAAG,KAa1B,gBAAA,GAAmB,oBAbO,GAagB,sBAbhB;AACP,KAcnB,uBAAA,GAA0B,kBAdP,CAc0B,gBAAA,CAAiB,KAd3C,CAAA,GAAA;GAe1B,gBAAA,CAAiB,KAAA,CAfA,EAAA,CAeS,gBAfT,CAAA;CAAK;AAItB,KAeO,kBAAA,GAAqB,eAfL,GAeuB,iBAfR;AAItC,KAaO,yBAAA,GAA4B,kBAbV,CAa6B,gBAAA,CAAiB,OAb7B,CAAA,GAAA;EAInC,CAUP,gBAAA,CAAiB,OAAA,CAVM,EAAA,CAUK,kBAVL,CAAA;CAAA"}
@@ -0,0 +1,17 @@
1
+ import { MessageTypesEnum } from "../../../types/enums.js";
2
+ import { MessageRequestBody } from "./common.js";
3
+
4
+ //#region src/api/messages/types/reaction.d.ts
5
+ type ReActionObject = {
6
+ message_id: string;
7
+ emoji: string;
8
+ };
9
+ type ReactionMessageRequestBody = MessageRequestBody<MessageTypesEnum.Reaction> & ReActionObject;
10
+ interface ReactionParams {
11
+ messageId: string;
12
+ emoji: string;
13
+ to: string;
14
+ }
15
+ //#endregion
16
+ export { ReactionParams };
17
+ //# sourceMappingURL=reaction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reaction.d.ts","names":[],"sources":["../../../../src/api/messages/types/reaction.ts"],"sourcesContent":[],"mappings":";;;;KAIK,cAAA;;EAAA,KAAA,EAAA,MAAA;AAKL,CAAA;AAAsC,KAA1B,0BAAA,GAA6B,kBAAH,CAAsB,gBAAA,CAAiB,QAAvC,CAAA,GAAmD,cAAnD;AAAsB,UAE3C,cAAA,CAF4D;WAApC,EAAA,MAAA;OAAgD,EAAA,MAAA;EAAc,EAAA,EAAA,MAAA;AAEvG"}