meta-cloud-api 1.1.3 → 1.1.5

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 (159) hide show
  1. package/dist/base.d.ts +19 -0
  2. package/dist/base.d.ts.map +1 -0
  3. package/dist/chunk-PECeCxCb.js +15 -0
  4. package/dist/config.d.ts +80 -0
  5. package/dist/config.d.ts.map +1 -0
  6. package/dist/enums.d.ts +668 -0
  7. package/dist/enums.d.ts.map +1 -0
  8. package/dist/enums.js +681 -0
  9. package/dist/enums.js.map +1 -0
  10. package/dist/httpsClient.d.ts +21 -0
  11. package/dist/httpsClient.d.ts.map +1 -0
  12. package/dist/index.d.ts +4386 -27
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +3436 -1
  15. package/dist/index.js.map +1 -1
  16. package/dist/logger.d.ts +11 -0
  17. package/dist/logger.d.ts.map +1 -0
  18. package/dist/request.d.ts +52 -0
  19. package/dist/request.d.ts.map +1 -0
  20. package/package.json +11 -118
  21. package/dist/BusinessProfileApi-C_sEOrWM.d.ts +0 -353
  22. package/dist/EncryptionApi-CcCfeK2b.d.ts +0 -22
  23. package/dist/FlowApi-DDHrFT_Q.d.ts +0 -136
  24. package/dist/MediaApi-CY9RVo7u.d.ts +0 -90
  25. package/dist/MessageApi-CX_jN8da.d.ts +0 -171
  26. package/dist/PhoneNumberApi-B-hY7g1M.d.ts +0 -142
  27. package/dist/QrCodeApi-DRICKN04.d.ts +0 -98
  28. package/dist/RegistrationApi-CFPzU1Vw.d.ts +0 -47
  29. package/dist/TemplateApi-fCIlzBtK.d.ts +0 -161
  30. package/dist/TwoStepVerificationApi-C0jpAKfu.d.ts +0 -33
  31. package/dist/WabaApi-x5PhsLT3.d.ts +0 -175
  32. package/dist/WebhookProcessor-DEIZ2PRU.d.ts +0 -707
  33. package/dist/WhatsApp-BFsBgjJO.d.ts +0 -82
  34. package/dist/api/encryption/index.d.ts +0 -10
  35. package/dist/api/encryption/index.js +0 -2
  36. package/dist/api/encryption/index.js.map +0 -1
  37. package/dist/api/flow/index.d.ts +0 -11
  38. package/dist/api/flow/index.js +0 -2
  39. package/dist/api/flow/index.js.map +0 -1
  40. package/dist/api/index.d.ts +0 -18
  41. package/dist/api/index.js +0 -2
  42. package/dist/api/index.js.map +0 -1
  43. package/dist/api/media/index.d.ts +0 -10
  44. package/dist/api/media/index.js +0 -2
  45. package/dist/api/media/index.js.map +0 -1
  46. package/dist/api/messages/builders/index.d.ts +0 -536
  47. package/dist/api/messages/builders/index.js +0 -4
  48. package/dist/api/messages/builders/index.js.map +0 -1
  49. package/dist/api/messages/index.d.ts +0 -10
  50. package/dist/api/messages/index.js +0 -2
  51. package/dist/api/messages/index.js.map +0 -1
  52. package/dist/api/phone/index.d.ts +0 -10
  53. package/dist/api/phone/index.js +0 -2
  54. package/dist/api/phone/index.js.map +0 -1
  55. package/dist/api/profile/index.d.ts +0 -10
  56. package/dist/api/profile/index.js +0 -2
  57. package/dist/api/profile/index.js.map +0 -1
  58. package/dist/api/qrCode/index.d.ts +0 -10
  59. package/dist/api/qrCode/index.js +0 -2
  60. package/dist/api/qrCode/index.js.map +0 -1
  61. package/dist/api/registration/index.d.ts +0 -10
  62. package/dist/api/registration/index.js +0 -2
  63. package/dist/api/registration/index.js.map +0 -1
  64. package/dist/api/template/index.d.ts +0 -21
  65. package/dist/api/template/index.js +0 -2
  66. package/dist/api/template/index.js.map +0 -1
  67. package/dist/api/twoStepVerification/index.d.ts +0 -10
  68. package/dist/api/twoStepVerification/index.js +0 -2
  69. package/dist/api/twoStepVerification/index.js.map +0 -1
  70. package/dist/api/waba/index.d.ts +0 -10
  71. package/dist/api/waba/index.js +0 -2
  72. package/dist/api/waba/index.js.map +0 -1
  73. package/dist/base-BV6DyzGS.d.ts +0 -18
  74. package/dist/chunk-5577QQ7V.js +0 -2
  75. package/dist/chunk-5577QQ7V.js.map +0 -1
  76. package/dist/chunk-6DFC5L3X.js +0 -2
  77. package/dist/chunk-6DFC5L3X.js.map +0 -1
  78. package/dist/chunk-7QBIZCJ4.js +0 -2
  79. package/dist/chunk-7QBIZCJ4.js.map +0 -1
  80. package/dist/chunk-AMHQGG6Z.js +0 -2
  81. package/dist/chunk-AMHQGG6Z.js.map +0 -1
  82. package/dist/chunk-BAOZ4U74.js +0 -10
  83. package/dist/chunk-BAOZ4U74.js.map +0 -1
  84. package/dist/chunk-CRZ7EUYR.js +0 -2
  85. package/dist/chunk-CRZ7EUYR.js.map +0 -1
  86. package/dist/chunk-FKXSL2JK.js +0 -3
  87. package/dist/chunk-FKXSL2JK.js.map +0 -1
  88. package/dist/chunk-FSKBLPGE.js +0 -2
  89. package/dist/chunk-FSKBLPGE.js.map +0 -1
  90. package/dist/chunk-GM63NGNV.js +0 -2
  91. package/dist/chunk-GM63NGNV.js.map +0 -1
  92. package/dist/chunk-IYSR44P6.js +0 -2
  93. package/dist/chunk-IYSR44P6.js.map +0 -1
  94. package/dist/chunk-J2JPTKU6.js +0 -2
  95. package/dist/chunk-J2JPTKU6.js.map +0 -1
  96. package/dist/chunk-JC6YMVID.js +0 -2
  97. package/dist/chunk-JC6YMVID.js.map +0 -1
  98. package/dist/chunk-JPAV644F.js +0 -2
  99. package/dist/chunk-JPAV644F.js.map +0 -1
  100. package/dist/chunk-JXCLRKQ7.js +0 -2
  101. package/dist/chunk-JXCLRKQ7.js.map +0 -1
  102. package/dist/chunk-KMAH6636.js +0 -2
  103. package/dist/chunk-KMAH6636.js.map +0 -1
  104. package/dist/chunk-L4ESAO2S.js +0 -2
  105. package/dist/chunk-L4ESAO2S.js.map +0 -1
  106. package/dist/chunk-LV3TULSI.js +0 -2
  107. package/dist/chunk-LV3TULSI.js.map +0 -1
  108. package/dist/chunk-MJEG3K4V.js +0 -2
  109. package/dist/chunk-MJEG3K4V.js.map +0 -1
  110. package/dist/chunk-PHPQ5HP3.js +0 -2
  111. package/dist/chunk-PHPQ5HP3.js.map +0 -1
  112. package/dist/chunk-RIL6QABY.js +0 -2
  113. package/dist/chunk-RIL6QABY.js.map +0 -1
  114. package/dist/chunk-RWCVPWRC.js +0 -2
  115. package/dist/chunk-RWCVPWRC.js.map +0 -1
  116. package/dist/chunk-SNNRWNGZ.js +0 -2
  117. package/dist/chunk-SNNRWNGZ.js.map +0 -1
  118. package/dist/chunk-U5FBZ6UB.js +0 -3
  119. package/dist/chunk-U5FBZ6UB.js.map +0 -1
  120. package/dist/chunk-VHAODWCN.js +0 -2
  121. package/dist/chunk-VHAODWCN.js.map +0 -1
  122. package/dist/chunk-ZMNXRMWK.js +0 -2
  123. package/dist/chunk-ZMNXRMWK.js.map +0 -1
  124. package/dist/common-B8kp4RdL.d.ts +0 -403
  125. package/dist/common-CGbls9Y8.d.ts +0 -425
  126. package/dist/core/webhook/frameworks/express.d.ts +0 -53
  127. package/dist/core/webhook/frameworks/express.js +0 -2
  128. package/dist/core/webhook/frameworks/express.js.map +0 -1
  129. package/dist/core/webhook/frameworks/nextjs-app.d.ts +0 -48
  130. package/dist/core/webhook/frameworks/nextjs-app.js +0 -2
  131. package/dist/core/webhook/frameworks/nextjs-app.js.map +0 -1
  132. package/dist/core/webhook/frameworks/nextjs.d.ts +0 -49
  133. package/dist/core/webhook/frameworks/nextjs.js +0 -2
  134. package/dist/core/webhook/frameworks/nextjs.js.map +0 -1
  135. package/dist/core/webhook/index.d.ts +0 -29
  136. package/dist/core/webhook/index.js +0 -2
  137. package/dist/core/webhook/index.js.map +0 -1
  138. package/dist/core/whatsapp/index.d.ts +0 -42
  139. package/dist/core/whatsapp/index.js +0 -2
  140. package/dist/core/whatsapp/index.js.map +0 -1
  141. package/dist/enums-DIimUG6s.d.ts +0 -707
  142. package/dist/factory-kNha6WaY.d.ts +0 -200
  143. package/dist/handler-DbySwF0E.d.ts +0 -20
  144. package/dist/httpsClient-Cbd2Y6mg.d.ts +0 -19
  145. package/dist/isMetaError-CQLXyEL4.d.ts +0 -63
  146. package/dist/logger-BdE0Vyim.d.ts +0 -9
  147. package/dist/request-CUjrMn8R.d.ts +0 -50
  148. package/dist/types/config.d.ts +0 -78
  149. package/dist/types/config.js +0 -2
  150. package/dist/types/config.js.map +0 -1
  151. package/dist/types/enums.d.ts +0 -1
  152. package/dist/types/enums.js +0 -2
  153. package/dist/types/enums.js.map +0 -1
  154. package/dist/types/index.d.ts +0 -6
  155. package/dist/types/index.js +0 -2
  156. package/dist/types/index.js.map +0 -1
  157. package/dist/utils/index.d.ts +0 -40
  158. package/dist/utils/index.js +0 -2
  159. package/dist/utils/index.js.map +0 -1
@@ -1,200 +0,0 @@
1
- import { L as LanguagesEnum, d as CurrencyCodesEnum, C as CategoryEnum } from './enums-DIimUG6s.js';
2
- import { l as TemplateFormat } from './TemplateApi-fCIlzBtK.js';
3
-
4
- interface TextParameter {
5
- type: 'text';
6
- value: string;
7
- }
8
- interface CurrencyParameter {
9
- type: 'currency';
10
- amount_1000: number;
11
- code: CurrencyCodesEnum;
12
- fallback_value: string;
13
- }
14
- interface DateTimeParameter {
15
- type: 'date_time';
16
- fallback_value: string;
17
- }
18
- interface MediaParameter {
19
- type: 'image' | 'video' | 'document';
20
- handle?: string;
21
- link?: string;
22
- }
23
- interface LocationParameter {
24
- type: 'location';
25
- latitude?: number;
26
- longitude?: number;
27
- name?: string;
28
- address?: string;
29
- }
30
- interface ProductParameter {
31
- type: 'product';
32
- product_retailer_id: string;
33
- }
34
- type TemplateParameter = TextParameter | CurrencyParameter | DateTimeParameter | MediaParameter | LocationParameter | ProductParameter;
35
- interface HeaderOptions {
36
- format: TemplateFormat;
37
- text?: string;
38
- parameters?: TemplateParameter[];
39
- example?: {
40
- header_text?: string[];
41
- header_text_named_params?: Array<{
42
- param_name: string;
43
- example: string;
44
- }>;
45
- header_handle?: string[];
46
- };
47
- }
48
- interface BodyOptions {
49
- text: string;
50
- parameters?: TemplateParameter[];
51
- example?: {
52
- body_text?: string[][];
53
- body_text_named_params?: Array<{
54
- param_name: string;
55
- example: string;
56
- }>;
57
- };
58
- }
59
- interface FooterOptions {
60
- text: string;
61
- }
62
- interface ButtonOptions {
63
- phone_number?: {
64
- text: string;
65
- phone_number: string;
66
- };
67
- url?: {
68
- text: string;
69
- url: string;
70
- example?: string;
71
- };
72
- quick_reply?: {
73
- text: string;
74
- }[];
75
- copy_code?: {
76
- example: string;
77
- };
78
- flow?: {
79
- text: string;
80
- flow_id?: string;
81
- flow_name?: string;
82
- flow_json?: string;
83
- flow_action?: 'navigate' | 'data_exchange';
84
- navigate_screen?: string;
85
- };
86
- mpm?: boolean;
87
- otp?: boolean;
88
- spm?: boolean;
89
- }
90
- interface CarouselCard {
91
- image?: string;
92
- video?: string;
93
- product?: string;
94
- body?: string;
95
- bodyParameters?: TemplateParameter[];
96
- buttons?: ButtonOptions;
97
- }
98
- interface CarouselOptions {
99
- cards: CarouselCard[];
100
- }
101
- interface LimitedTimeOfferOptions {
102
- expiration_time_ms: number;
103
- }
104
- interface ProductSection {
105
- title?: string;
106
- product_items: Array<{
107
- product_retailer_id: string;
108
- }>;
109
- }
110
- interface TemplateOptions {
111
- name: string;
112
- language: LanguagesEnum;
113
- category: CategoryEnum;
114
- header?: HeaderOptions;
115
- body?: BodyOptions;
116
- footer?: FooterOptions;
117
- buttons?: ButtonOptions;
118
- carousel?: CarouselOptions;
119
- limitedTimeOffer?: LimitedTimeOfferOptions;
120
- }
121
- interface OTPTemplateOptions {
122
- name: string;
123
- language: LanguagesEnum;
124
- code_expiration_minutes?: number;
125
- add_security_recommendation?: boolean;
126
- }
127
- interface AuthenticationTemplateOptions {
128
- name: string;
129
- language: LanguagesEnum;
130
- code_expiration_minutes?: number;
131
- add_security_recommendation?: boolean;
132
- copy_code_button?: boolean;
133
- }
134
- interface CatalogTemplateOptions {
135
- name: string;
136
- language: LanguagesEnum;
137
- header?: Omit<HeaderOptions, 'format'>;
138
- body: BodyOptions;
139
- footer?: FooterOptions;
140
- thumbnail_product_retailer_id: string;
141
- }
142
- interface CouponTemplateOptions {
143
- name: string;
144
- language: LanguagesEnum;
145
- header?: Omit<HeaderOptions, 'format'>;
146
- body: BodyOptions;
147
- footer?: FooterOptions;
148
- coupon_code: string;
149
- }
150
- interface LimitedTimeOfferTemplateOptions {
151
- name: string;
152
- language: LanguagesEnum;
153
- header?: Omit<HeaderOptions, 'format'>;
154
- body: BodyOptions;
155
- footer?: FooterOptions;
156
- expiration_time_ms: number;
157
- }
158
- interface MediaCardCarouselTemplateOptions {
159
- name: string;
160
- language: LanguagesEnum;
161
- cards: Array<{
162
- header: {
163
- format: 'IMAGE' | 'VIDEO';
164
- example: {
165
- header_handle: string[];
166
- };
167
- };
168
- body: BodyOptions;
169
- buttons?: ButtonOptions;
170
- }>;
171
- }
172
- interface MPMTemplateOptions {
173
- name: string;
174
- language: LanguagesEnum;
175
- header?: Omit<HeaderOptions, 'format'>;
176
- body: BodyOptions;
177
- footer?: FooterOptions;
178
- thumbnail_product_retailer_id: string;
179
- sections: ProductSection[];
180
- }
181
- interface ProductCardCarouselTemplateOptions {
182
- name: string;
183
- language: LanguagesEnum;
184
- header?: Omit<HeaderOptions, 'format'>;
185
- body: BodyOptions;
186
- footer?: FooterOptions;
187
- cards: Array<{
188
- product_retailer_id: string;
189
- }>;
190
- }
191
- interface SPMTemplateOptions {
192
- name: string;
193
- language: LanguagesEnum;
194
- header?: Omit<HeaderOptions, 'format'>;
195
- body: BodyOptions;
196
- footer?: FooterOptions;
197
- product_retailer_id: string;
198
- }
199
-
200
- export type { AuthenticationTemplateOptions as A, BodyOptions as B, CarouselCard as C, DateTimeParameter as D, FooterOptions as F, HeaderOptions as H, LimitedTimeOfferOptions as L, MediaCardCarouselTemplateOptions as M, OTPTemplateOptions as O, ProductCardCarouselTemplateOptions as P, SPMTemplateOptions as S, TemplateOptions as T, ButtonOptions as a, CarouselOptions as b, CatalogTemplateOptions as c, CouponTemplateOptions as d, CurrencyParameter as e, LimitedTimeOfferTemplateOptions as f, LocationParameter as g, MediaParameter as h, MPMTemplateOptions as i, ProductParameter as j, ProductSection as k, TemplateParameter as l, TextParameter as m };
@@ -1,20 +0,0 @@
1
- import { WhatsAppConfig } from './types/config.js';
2
-
3
- interface BaseRequest {
4
- method?: string;
5
- url?: string;
6
- headers: Record<string, string | string[] | undefined>;
7
- body?: any;
8
- query?: Record<string, any> | URLSearchParams;
9
- rawBody?: any;
10
- }
11
- interface BaseResponse<T = any> {
12
- status(code: number): T;
13
- json?(data: any): T | void;
14
- send?(data?: any): T | void;
15
- setHeader?(name: string, value: string): void;
16
- }
17
- interface BaseWebhookConfig extends WhatsAppConfig {
18
- }
19
-
20
- export type { BaseWebhookConfig as B, BaseRequest as a, BaseResponse as b };
@@ -1,19 +0,0 @@
1
- import { H as HttpMethodsEnum } from './enums-DIimUG6s.js';
2
-
3
- type ResponseHeaderValue = string | string[] | undefined;
4
- type ResponseHeaders = Record<string, ResponseHeaderValue>;
5
- type ResponseJSONBody = Record<string, unknown>;
6
- declare class HttpsClientResponseClass {
7
- constructor(resp: Response);
8
- statusCode: () => number;
9
- headers: () => ResponseHeaders;
10
- rawResponse: () => Response;
11
- json: () => Promise<ResponseJSONBody>;
12
- }
13
- declare class HttpsClientClass {
14
- constructor();
15
- clearSockets: () => boolean;
16
- sendRequest: (host: string, path: string, method: HttpMethodsEnum, headers: HeadersInit, timeout: number, body?: BodyInit | null) => Promise<HttpsClientResponseClass>;
17
- }
18
-
19
- export { HttpsClientClass as H, type ResponseHeaders as R, HttpsClientResponseClass as a, type ResponseHeaderValue as b, type ResponseJSONBody as c };
@@ -1,63 +0,0 @@
1
- import { l as FlowEndpointRequest, h as FlowDataExchangeRequest, a as FlowActionEnum, n as FlowErrorNotificationRequest, p as FlowHealthCheckRequest } from './common-B8kp4RdL.js';
2
-
3
- declare const DATA_EXCHANGE_ACTIONS: readonly [FlowActionEnum.DATA_EXCHANGE, FlowActionEnum.INIT, FlowActionEnum.BACK];
4
- declare const ERROR_ACTIONS: readonly [FlowActionEnum.DATA_EXCHANGE, FlowActionEnum.INIT];
5
- /**
6
- * Type guard to check if a request is a Data Exchange request
7
- * Validates the request structure according to the Flow API specifications
8
- *
9
- * @param request The Flow endpoint request to check
10
- * @returns True if the request is a valid Data Exchange request, false otherwise
11
- */
12
- declare function isFlowDataExchangeRequest(request: FlowEndpointRequest): request is FlowDataExchangeRequest & {
13
- action: (typeof DATA_EXCHANGE_ACTIONS)[number];
14
- screen?: string;
15
- flow_token: string;
16
- data?: Record<string, any>;
17
- };
18
- /**
19
- * Type guard to check if a request is an Error Notification request
20
- * Validates the request structure according to the Flow API error specifications
21
- *
22
- * @param request The Flow endpoint request to check
23
- * @returns True if the request is a valid Error Notification request, false otherwise
24
- */
25
- declare function isFlowErrorRequest(request: FlowEndpointRequest): request is FlowErrorNotificationRequest & {
26
- action: (typeof ERROR_ACTIONS)[number];
27
- screen: string;
28
- flow_token: string;
29
- data: {
30
- error: string;
31
- error_message: string;
32
- };
33
- };
34
- /**
35
- * Type guard to check if a request is a Ping (health check) request
36
- * Simple validation for health check endpoints in the Flow API
37
- *
38
- * @param request The Flow endpoint request to check
39
- * @returns True if the request is a Ping request, false otherwise
40
- */
41
- declare function isFlowPingRequest(request: FlowEndpointRequest): request is FlowHealthCheckRequest;
42
-
43
- interface MetaError extends Error {
44
- error: {
45
- message: string;
46
- type: string;
47
- code: number;
48
- error_data?: {
49
- messaging_product: 'whatsapp';
50
- details: string;
51
- };
52
- error_subcode?: number;
53
- fbtrace_id: string;
54
- };
55
- }
56
- /**
57
- * Determines if the error is a Meta API error response
58
- * @param error Any error object to check
59
- * @returns Type guard indicating if error is a Meta API error
60
- */
61
- declare function isMetaError(error: any): error is MetaError;
62
-
63
- export { type MetaError as M, isFlowErrorRequest as a, isFlowPingRequest as b, isMetaError as c, isFlowDataExchangeRequest as i };
@@ -1,9 +0,0 @@
1
- interface LoggerInterface {
2
- log(...data: any[]): void;
3
- error(...data: any[]): void;
4
- warn(...data: any[]): void;
5
- info(...data: any[]): void;
6
- debug(...data: any[]): void;
7
- }
8
-
9
- export type { LoggerInterface as L };
@@ -1,50 +0,0 @@
1
- import { H as HttpMethodsEnum } from './enums-DIimUG6s.js';
2
-
3
- type GeneralRequestBody = Record<string, unknown>;
4
- interface GeneralHeaderInterface {
5
- /**
6
- * Authorization token. This is required for all HTTP requests made to the graph API.
7
- * @default 'Bearer '
8
- */
9
- Authorization: string;
10
- /**
11
- * Content type of the message being sent. This is required for all HTTP requests made to the graph API.
12
- * @default 'application/json'
13
- */
14
- 'Content-Type': string;
15
- /**
16
- * User agent field sent in all requests. This is used to gather SDK usage metrics and help
17
- * better triage support requests.
18
- * @default `WA_SDK/${ SDK_version } (Node.js ${ process.version })`
19
- */
20
- 'User-Agent': string;
21
- }
22
- interface RequesterResponseInterface<T> {
23
- json: () => Promise<T>;
24
- }
25
- interface ResponseSuccess {
26
- success: boolean;
27
- }
28
- interface ResponseData<T> {
29
- data: T;
30
- }
31
- interface ResponsePagination<T> {
32
- data: T[];
33
- paging: Paging;
34
- }
35
- interface Paging {
36
- cursors: {
37
- before: string;
38
- after: string;
39
- };
40
- next: string;
41
- }
42
- declare class RequesterClass {
43
- constructor(apiVersion: string, phoneNumberId: number, accessToken: string, businessAcctId: string, userAgent: string);
44
- sendRequest: (method: HttpMethodsEnum, path: string, timeout: number, body?: GeneralRequestBody, contentType?: string, additionalHeaders?: Record<string, string>) => Promise<RequesterResponseInterface<unknown>>;
45
- getJson<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: GeneralRequestBody, additionalHeaders?: Record<string, string>): Promise<T>;
46
- sendFormData<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: FormData, additionalHeaders?: Record<string, string>): Promise<T>;
47
- sendUrlEncodedForm<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: Record<string, string>, additionalHeaders?: Record<string, string>): Promise<T>;
48
- }
49
-
50
- export { type GeneralHeaderInterface as G, type Paging as P, type RequesterResponseInterface as R, type GeneralRequestBody as a, type ResponseData as b, type ResponsePagination as c, type ResponseSuccess as d, RequesterClass as e };
@@ -1,78 +0,0 @@
1
- import { W as WabaConfigEnum } from '../enums-DIimUG6s.js';
2
-
3
- type WhatsAppConfig = {
4
- accessToken: string;
5
- appId?: string;
6
- appSecret?: string;
7
- phoneNumberId?: number;
8
- businessAcctId?: string;
9
- apiVersion?: string;
10
- webhookEndpoint?: string;
11
- webhookVerificationToken?: string;
12
- listenerPort?: number;
13
- debug?: boolean;
14
- maxRetriesAfterWait?: number;
15
- requestTimeout?: number;
16
- privatePem?: string;
17
- passphrase?: string;
18
- };
19
- type WabaConfigType = {
20
- /**
21
- * The Meta for Developers business application Id for this registered application.
22
- */
23
- [WabaConfigEnum.AppId]: string;
24
- /**
25
- * The Meta for Developers business application secret for this registered application.
26
- */
27
- [WabaConfigEnum.AppSecret]: string;
28
- /**
29
- * The Meta for Developers phone number id used by the registered business.
30
- */
31
- [WabaConfigEnum.PhoneNumberId]: number;
32
- /**
33
- * The Meta for Developers business id for the registered business.
34
- */
35
- [WabaConfigEnum.BusinessAcctId]: string;
36
- /**
37
- * The version of the Cloud API being used. Starts with a "v" and follows the major number.
38
- */
39
- [WabaConfigEnum.APIVersion]: string;
40
- /**
41
- * The access token to make calls on behalf of the signed in Meta for Developers account or business.
42
- */
43
- [WabaConfigEnum.AccessToken]: string;
44
- /**
45
- * The endpoint path (e.g. if the value here is webhook, the webhook URL would look like http/https://{host}/webhook).
46
- */
47
- [WabaConfigEnum.WebhookEndpoint]: string;
48
- /**
49
- * The verification token that needs to match what is sent by the Cloud API webhook in order to subscribe.
50
- */
51
- [WabaConfigEnum.WebhookVerificationToken]: string;
52
- /**
53
- * The listener port for the webhook web server.
54
- */
55
- [WabaConfigEnum.ListenerPort]: number;
56
- /**
57
- * To turn on global debugging of the logger to print verbose output across the APIs.
58
- */
59
- [WabaConfigEnum.Debug]: boolean;
60
- /**
61
- * The total number of times a request should be retried after the wait period if it fails.
62
- */
63
- [WabaConfigEnum.MaxRetriesAfterWait]: number;
64
- /**
65
- * The timeout period for a request to quit and destroy the attempt in ms.
66
- */
67
- [WabaConfigEnum.RequestTimeout]: number;
68
- /**
69
- * The private key for the Meta for Developers business.
70
- */
71
- [WabaConfigEnum.PrivatePem]: string;
72
- /**
73
- * The passphrase for the Meta for Developers business.
74
- */
75
- [WabaConfigEnum.Passphrase]: string;
76
- };
77
-
78
- export type { WabaConfigType, WhatsAppConfig };
@@ -1,2 +0,0 @@
1
- //# sourceMappingURL=config.js.map
2
- //# sourceMappingURL=config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"config.js"}
@@ -1 +0,0 @@
1
- export { A as AudioMediaTypesEnum, B as BusinessVerticalEnum, a as ButtonPositionEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, d as CurrencyCodesEnum, D as DataLocalizationRegionEnum, e as DocumentMediaTypesEnum, H as HttpMethodsEnum, I as ImageMediaTypesEnum, f as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, k as ReferralSourceTypesEnum, R as RequestCodeMethodsEnum, S as StatusEnum, g as StickerMediaTypesEnum, h as SubTypeEnum, i as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, j as WebhookTypesEnum } from '../enums-DIimUG6s.js';
@@ -1,2 +0,0 @@
1
- export{q as AudioMediaTypesEnum,y as BusinessVerticalEnum,g as ButtonPositionEnum,a as CategoryEnum,i as ComponentTypesEnum,k as ConversationTypesEnum,w as CurrencyCodesEnum,x as DataLocalizationRegionEnum,p as DocumentMediaTypesEnum,c as HttpMethodsEnum,o as ImageMediaTypesEnum,f as InteractiveTypesEnum,v as LanguagesEnum,d as MessageTypesEnum,e as ParametersTypesEnum,t as ReferralSourceTypesEnum,u as RequestCodeMethodsEnum,l as StatusEnum,n as StickerMediaTypesEnum,h as SubTypeEnum,s as SystemChangeTypesEnum,b as TemplateStatusEnum,m as VideoMediaTypesEnum,j as WabaConfigEnum,r as WebhookTypesEnum}from'../chunk-KMAH6636.js';//# sourceMappingURL=enums.js.map
2
- //# sourceMappingURL=enums.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"enums.js"}
@@ -1,6 +0,0 @@
1
- export { B as BaseAPI, a as BaseClass } from '../base-BV6DyzGS.js';
2
- export { WabaConfigType, WhatsAppConfig } from './config.js';
3
- export { L as LoggerInterface } from '../logger-BdE0Vyim.js';
4
- export { H as HttpsClientClass, a as HttpsClientResponseClass, b as ResponseHeaderValue, R as ResponseHeaders, c as ResponseJSONBody } from '../httpsClient-Cbd2Y6mg.js';
5
- export { G as GeneralHeaderInterface, a as GeneralRequestBody, P as Paging, e as RequesterClass, R as RequesterResponseInterface, b as ResponseData, c as ResponsePagination, d as ResponseSuccess } from '../request-CUjrMn8R.js';
6
- export { A as AudioMediaTypesEnum, B as BusinessVerticalEnum, a as ButtonPositionEnum, C as CategoryEnum, b as ComponentTypesEnum, c as ConversationTypesEnum, d as CurrencyCodesEnum, D as DataLocalizationRegionEnum, e as DocumentMediaTypesEnum, H as HttpMethodsEnum, I as ImageMediaTypesEnum, f as InteractiveTypesEnum, L as LanguagesEnum, M as MessageTypesEnum, P as ParametersTypesEnum, k as ReferralSourceTypesEnum, R as RequestCodeMethodsEnum, S as StatusEnum, g as StickerMediaTypesEnum, h as SubTypeEnum, i as SystemChangeTypesEnum, T as TemplateStatusEnum, V as VideoMediaTypesEnum, W as WabaConfigEnum, j as WebhookTypesEnum } from '../enums-DIimUG6s.js';
@@ -1,2 +0,0 @@
1
- export{a as BaseAPI}from'../chunk-RIL6QABY.js';export{q as AudioMediaTypesEnum,y as BusinessVerticalEnum,g as ButtonPositionEnum,a as CategoryEnum,i as ComponentTypesEnum,k as ConversationTypesEnum,w as CurrencyCodesEnum,x as DataLocalizationRegionEnum,p as DocumentMediaTypesEnum,c as HttpMethodsEnum,o as ImageMediaTypesEnum,f as InteractiveTypesEnum,v as LanguagesEnum,d as MessageTypesEnum,e as ParametersTypesEnum,t as ReferralSourceTypesEnum,u as RequestCodeMethodsEnum,l as StatusEnum,n as StickerMediaTypesEnum,h as SubTypeEnum,s as SystemChangeTypesEnum,b as TemplateStatusEnum,m as VideoMediaTypesEnum,j as WabaConfigEnum,r as WebhookTypesEnum}from'../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,40 +0,0 @@
1
- import { WabaConfigType } from '../types/config.js';
2
- export { M as MetaError, i as isFlowDataExchangeRequest, a as isFlowErrorRequest, b as isFlowPingRequest, c as isMetaError } from '../isMetaError-CQLXyEL4.js';
3
- import { L as LoggerInterface } from '../logger-BdE0Vyim.js';
4
- import '../enums-DIimUG6s.js';
5
- import '../common-B8kp4RdL.js';
6
- import '../request-CUjrMn8R.js';
7
- import 'http';
8
-
9
- declare function buildFieldsQueryString(fields?: string[] | string): string;
10
-
11
- /**
12
- * Formats configuration as a terminal table
13
- * @param config - The WABA configuration object
14
- * @param apiName - The name of the API being initialized
15
- * @returns Formatted table string
16
- */
17
- declare function formatConfigTable(config: WabaConfigType): string;
18
-
19
- declare class Logger implements LoggerInterface {
20
- private name;
21
- private debug;
22
- constructor(name: string, debug?: boolean);
23
- log(...data: any[]): void;
24
- error(...data: any[]): void;
25
- warn(...data: any[]): void;
26
- info(...data: any[]): void;
27
- }
28
-
29
- declare const objectToQueryString: (params: Record<string, any>) => string;
30
-
31
- /**
32
- * Get SDK version from package.json
33
- */
34
- declare function getVersion(): string;
35
- /**
36
- * Generate User-Agent string following official SDK pattern
37
- */
38
- declare function getUserAgent(): string;
39
-
40
- export { Logger, buildFieldsQueryString, formatConfigTable, getUserAgent, getVersion, objectToQueryString };
@@ -1,2 +0,0 @@
1
- export{a as isFlowDataExchangeRequest,b as isFlowErrorRequest,c as isFlowPingRequest}from'../chunk-6DFC5L3X.js';export{a as Logger,b as formatConfigTable,e as getUserAgent,d as getVersion,c as isMetaError}from'../chunk-FKXSL2JK.js';export{a as buildFieldsQueryString}from'../chunk-CRZ7EUYR.js';import'../chunk-J2JPTKU6.js';export{a as objectToQueryString}from'../chunk-MJEG3K4V.js';import'../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}