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.
- package/dist/base.d.ts +19 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/chunk-PECeCxCb.js +15 -0
- package/dist/config.d.ts +80 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/enums.d.ts +668 -0
- package/dist/enums.d.ts.map +1 -0
- package/dist/enums.js +681 -0
- package/dist/enums.js.map +1 -0
- package/dist/httpsClient.d.ts +21 -0
- package/dist/httpsClient.d.ts.map +1 -0
- package/dist/index.d.ts +4386 -27
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3436 -1
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +11 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/request.d.ts +52 -0
- package/dist/request.d.ts.map +1 -0
- package/package.json +11 -118
- package/dist/BusinessProfileApi-C_sEOrWM.d.ts +0 -353
- package/dist/EncryptionApi-CcCfeK2b.d.ts +0 -22
- package/dist/FlowApi-DDHrFT_Q.d.ts +0 -136
- package/dist/MediaApi-CY9RVo7u.d.ts +0 -90
- package/dist/MessageApi-CX_jN8da.d.ts +0 -171
- package/dist/PhoneNumberApi-B-hY7g1M.d.ts +0 -142
- package/dist/QrCodeApi-DRICKN04.d.ts +0 -98
- package/dist/RegistrationApi-CFPzU1Vw.d.ts +0 -47
- package/dist/TemplateApi-fCIlzBtK.d.ts +0 -161
- package/dist/TwoStepVerificationApi-C0jpAKfu.d.ts +0 -33
- package/dist/WabaApi-x5PhsLT3.d.ts +0 -175
- package/dist/WebhookProcessor-DEIZ2PRU.d.ts +0 -707
- package/dist/WhatsApp-BFsBgjJO.d.ts +0 -82
- package/dist/api/encryption/index.d.ts +0 -10
- package/dist/api/encryption/index.js +0 -2
- package/dist/api/encryption/index.js.map +0 -1
- package/dist/api/flow/index.d.ts +0 -11
- package/dist/api/flow/index.js +0 -2
- package/dist/api/flow/index.js.map +0 -1
- package/dist/api/index.d.ts +0 -18
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +0 -1
- package/dist/api/media/index.d.ts +0 -10
- package/dist/api/media/index.js +0 -2
- package/dist/api/media/index.js.map +0 -1
- package/dist/api/messages/builders/index.d.ts +0 -536
- package/dist/api/messages/builders/index.js +0 -4
- package/dist/api/messages/builders/index.js.map +0 -1
- package/dist/api/messages/index.d.ts +0 -10
- package/dist/api/messages/index.js +0 -2
- package/dist/api/messages/index.js.map +0 -1
- package/dist/api/phone/index.d.ts +0 -10
- package/dist/api/phone/index.js +0 -2
- package/dist/api/phone/index.js.map +0 -1
- package/dist/api/profile/index.d.ts +0 -10
- package/dist/api/profile/index.js +0 -2
- package/dist/api/profile/index.js.map +0 -1
- package/dist/api/qrCode/index.d.ts +0 -10
- package/dist/api/qrCode/index.js +0 -2
- package/dist/api/qrCode/index.js.map +0 -1
- package/dist/api/registration/index.d.ts +0 -10
- package/dist/api/registration/index.js +0 -2
- package/dist/api/registration/index.js.map +0 -1
- package/dist/api/template/index.d.ts +0 -21
- package/dist/api/template/index.js +0 -2
- package/dist/api/template/index.js.map +0 -1
- package/dist/api/twoStepVerification/index.d.ts +0 -10
- package/dist/api/twoStepVerification/index.js +0 -2
- package/dist/api/twoStepVerification/index.js.map +0 -1
- package/dist/api/waba/index.d.ts +0 -10
- package/dist/api/waba/index.js +0 -2
- package/dist/api/waba/index.js.map +0 -1
- package/dist/base-BV6DyzGS.d.ts +0 -18
- package/dist/chunk-5577QQ7V.js +0 -2
- package/dist/chunk-5577QQ7V.js.map +0 -1
- package/dist/chunk-6DFC5L3X.js +0 -2
- package/dist/chunk-6DFC5L3X.js.map +0 -1
- package/dist/chunk-7QBIZCJ4.js +0 -2
- package/dist/chunk-7QBIZCJ4.js.map +0 -1
- package/dist/chunk-AMHQGG6Z.js +0 -2
- package/dist/chunk-AMHQGG6Z.js.map +0 -1
- package/dist/chunk-BAOZ4U74.js +0 -10
- package/dist/chunk-BAOZ4U74.js.map +0 -1
- package/dist/chunk-CRZ7EUYR.js +0 -2
- package/dist/chunk-CRZ7EUYR.js.map +0 -1
- package/dist/chunk-FKXSL2JK.js +0 -3
- package/dist/chunk-FKXSL2JK.js.map +0 -1
- package/dist/chunk-FSKBLPGE.js +0 -2
- package/dist/chunk-FSKBLPGE.js.map +0 -1
- package/dist/chunk-GM63NGNV.js +0 -2
- package/dist/chunk-GM63NGNV.js.map +0 -1
- package/dist/chunk-IYSR44P6.js +0 -2
- package/dist/chunk-IYSR44P6.js.map +0 -1
- package/dist/chunk-J2JPTKU6.js +0 -2
- package/dist/chunk-J2JPTKU6.js.map +0 -1
- package/dist/chunk-JC6YMVID.js +0 -2
- package/dist/chunk-JC6YMVID.js.map +0 -1
- package/dist/chunk-JPAV644F.js +0 -2
- package/dist/chunk-JPAV644F.js.map +0 -1
- package/dist/chunk-JXCLRKQ7.js +0 -2
- package/dist/chunk-JXCLRKQ7.js.map +0 -1
- package/dist/chunk-KMAH6636.js +0 -2
- package/dist/chunk-KMAH6636.js.map +0 -1
- package/dist/chunk-L4ESAO2S.js +0 -2
- package/dist/chunk-L4ESAO2S.js.map +0 -1
- package/dist/chunk-LV3TULSI.js +0 -2
- package/dist/chunk-LV3TULSI.js.map +0 -1
- package/dist/chunk-MJEG3K4V.js +0 -2
- package/dist/chunk-MJEG3K4V.js.map +0 -1
- package/dist/chunk-PHPQ5HP3.js +0 -2
- package/dist/chunk-PHPQ5HP3.js.map +0 -1
- package/dist/chunk-RIL6QABY.js +0 -2
- package/dist/chunk-RIL6QABY.js.map +0 -1
- package/dist/chunk-RWCVPWRC.js +0 -2
- package/dist/chunk-RWCVPWRC.js.map +0 -1
- package/dist/chunk-SNNRWNGZ.js +0 -2
- package/dist/chunk-SNNRWNGZ.js.map +0 -1
- package/dist/chunk-U5FBZ6UB.js +0 -3
- package/dist/chunk-U5FBZ6UB.js.map +0 -1
- package/dist/chunk-VHAODWCN.js +0 -2
- package/dist/chunk-VHAODWCN.js.map +0 -1
- package/dist/chunk-ZMNXRMWK.js +0 -2
- package/dist/chunk-ZMNXRMWK.js.map +0 -1
- package/dist/common-B8kp4RdL.d.ts +0 -403
- package/dist/common-CGbls9Y8.d.ts +0 -425
- package/dist/core/webhook/frameworks/express.d.ts +0 -53
- package/dist/core/webhook/frameworks/express.js +0 -2
- package/dist/core/webhook/frameworks/express.js.map +0 -1
- package/dist/core/webhook/frameworks/nextjs-app.d.ts +0 -48
- package/dist/core/webhook/frameworks/nextjs-app.js +0 -2
- package/dist/core/webhook/frameworks/nextjs-app.js.map +0 -1
- package/dist/core/webhook/frameworks/nextjs.d.ts +0 -49
- package/dist/core/webhook/frameworks/nextjs.js +0 -2
- package/dist/core/webhook/frameworks/nextjs.js.map +0 -1
- package/dist/core/webhook/index.d.ts +0 -29
- package/dist/core/webhook/index.js +0 -2
- package/dist/core/webhook/index.js.map +0 -1
- package/dist/core/whatsapp/index.d.ts +0 -42
- package/dist/core/whatsapp/index.js +0 -2
- package/dist/core/whatsapp/index.js.map +0 -1
- package/dist/enums-DIimUG6s.d.ts +0 -707
- package/dist/factory-kNha6WaY.d.ts +0 -200
- package/dist/handler-DbySwF0E.d.ts +0 -20
- package/dist/httpsClient-Cbd2Y6mg.d.ts +0 -19
- package/dist/isMetaError-CQLXyEL4.d.ts +0 -63
- package/dist/logger-BdE0Vyim.d.ts +0 -9
- package/dist/request-CUjrMn8R.d.ts +0 -50
- package/dist/types/config.d.ts +0 -78
- package/dist/types/config.js +0 -2
- package/dist/types/config.js.map +0 -1
- package/dist/types/enums.d.ts +0 -1
- package/dist/types/enums.js +0 -2
- package/dist/types/enums.js.map +0 -1
- package/dist/types/index.d.ts +0 -6
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/utils/index.d.ts +0 -40
- package/dist/utils/index.js +0 -2
- package/dist/utils/index.js.map +0 -1
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { a as GeneralRequestBody, d as ResponseSuccess, c as ResponsePagination, e as RequesterClass } from './request-CUjrMn8R.js';
|
|
4
|
-
import { L as LanguagesEnum, C as CategoryEnum, T as TemplateStatusEnum } from './enums-DIimUG6s.js';
|
|
5
|
-
|
|
6
|
-
type TemplateFormat = 'TEXT' | 'IMAGE' | 'VIDEO' | 'DOCUMENT' | 'LOCATION' | 'PRODUCT';
|
|
7
|
-
type PhoneNumberButton = {
|
|
8
|
-
type: 'PHONE_NUMBER';
|
|
9
|
-
text: string;
|
|
10
|
-
phone_number: string;
|
|
11
|
-
};
|
|
12
|
-
type URLButton = {
|
|
13
|
-
type: 'URL';
|
|
14
|
-
text: string;
|
|
15
|
-
url: string;
|
|
16
|
-
example?: string[];
|
|
17
|
-
};
|
|
18
|
-
type QuickReplyButton = {
|
|
19
|
-
type: 'QUICK_REPLY';
|
|
20
|
-
text: string;
|
|
21
|
-
};
|
|
22
|
-
type CopyCodeButton = {
|
|
23
|
-
type: 'COPY_CODE';
|
|
24
|
-
example: string;
|
|
25
|
-
};
|
|
26
|
-
type FlowButton = {
|
|
27
|
-
type: 'FLOW';
|
|
28
|
-
text: string;
|
|
29
|
-
flow_id?: string;
|
|
30
|
-
flow_name?: string;
|
|
31
|
-
flow_json?: string;
|
|
32
|
-
flow_action?: 'navigate' | 'data_exchange';
|
|
33
|
-
navigate_screen?: string;
|
|
34
|
-
};
|
|
35
|
-
type MPMButton = {
|
|
36
|
-
type: 'MPM';
|
|
37
|
-
action?: {
|
|
38
|
-
thumbnail_product_retailer_id: string;
|
|
39
|
-
sections: Array<{
|
|
40
|
-
title?: string;
|
|
41
|
-
product_items: Array<{
|
|
42
|
-
product_retailer_id: string;
|
|
43
|
-
}>;
|
|
44
|
-
}>;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
type OTPButton = {
|
|
48
|
-
type: 'OTP';
|
|
49
|
-
};
|
|
50
|
-
type SPMButton = {
|
|
51
|
-
type: 'SPM';
|
|
52
|
-
action?: {
|
|
53
|
-
product_retailer_id: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
type CatalogButton = {
|
|
57
|
-
type: 'CATALOG';
|
|
58
|
-
action?: {
|
|
59
|
-
thumbnail_product_retailer_id: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
type TemplateButton = PhoneNumberButton | URLButton | QuickReplyButton | CopyCodeButton | FlowButton | MPMButton | OTPButton | SPMButton | CatalogButton;
|
|
63
|
-
type TemplateHeaderExample = {
|
|
64
|
-
header_text?: string[];
|
|
65
|
-
header_text_named_params?: Array<{
|
|
66
|
-
param_name: string;
|
|
67
|
-
example: string;
|
|
68
|
-
}>;
|
|
69
|
-
header_handle?: string[];
|
|
70
|
-
};
|
|
71
|
-
type TemplateHeader = {
|
|
72
|
-
type: 'HEADER';
|
|
73
|
-
format: TemplateFormat;
|
|
74
|
-
text?: string;
|
|
75
|
-
example?: TemplateHeaderExample;
|
|
76
|
-
};
|
|
77
|
-
type TemplateBody = {
|
|
78
|
-
type: 'BODY';
|
|
79
|
-
text: string;
|
|
80
|
-
example?: {
|
|
81
|
-
body_text?: Array<Array<string>>;
|
|
82
|
-
body_text_named_params?: Array<{
|
|
83
|
-
param_name: string;
|
|
84
|
-
example: string;
|
|
85
|
-
}>;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
type TemplateFooter = {
|
|
89
|
-
type: 'FOOTER';
|
|
90
|
-
text: string;
|
|
91
|
-
};
|
|
92
|
-
type TemplateButtons = {
|
|
93
|
-
type: 'BUTTONS';
|
|
94
|
-
buttons: TemplateButton[];
|
|
95
|
-
};
|
|
96
|
-
type TemplateLimitedTimeOffer = {
|
|
97
|
-
type: 'LIMITED_TIME_OFFER';
|
|
98
|
-
limited_time_offer: {
|
|
99
|
-
expiration_time_ms: number;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
type TemplateCarousel = {
|
|
103
|
-
type: 'CAROUSEL';
|
|
104
|
-
cards: Array<{
|
|
105
|
-
card_index: number;
|
|
106
|
-
components: ComponentTypes[];
|
|
107
|
-
}>;
|
|
108
|
-
};
|
|
109
|
-
type MediaCarouselCard = {
|
|
110
|
-
card_index: number;
|
|
111
|
-
components: (TemplateHeader | TemplateBody | TemplateButtons)[];
|
|
112
|
-
};
|
|
113
|
-
type ProductCarouselCard = {
|
|
114
|
-
card_index: number;
|
|
115
|
-
components: TemplateHeader[];
|
|
116
|
-
};
|
|
117
|
-
type ComponentTypes = TemplateHeader | TemplateBody | TemplateFooter | TemplateButtons | TemplateLimitedTimeOffer | TemplateCarousel;
|
|
118
|
-
type TemplateRequestBody = GeneralRequestBody & {
|
|
119
|
-
name: string;
|
|
120
|
-
language: LanguagesEnum;
|
|
121
|
-
category?: CategoryEnum;
|
|
122
|
-
components?: ComponentTypes[];
|
|
123
|
-
};
|
|
124
|
-
type TemplateResponse = {
|
|
125
|
-
id: string;
|
|
126
|
-
status: string;
|
|
127
|
-
language: LanguagesEnum;
|
|
128
|
-
category: CategoryEnum;
|
|
129
|
-
name: string;
|
|
130
|
-
components: ComponentTypes[];
|
|
131
|
-
};
|
|
132
|
-
type TemplateGetParams = {
|
|
133
|
-
limit?: number;
|
|
134
|
-
name?: string;
|
|
135
|
-
language?: LanguagesEnum;
|
|
136
|
-
category?: CategoryEnum;
|
|
137
|
-
status?: TemplateStatusEnum;
|
|
138
|
-
};
|
|
139
|
-
type TemplateDeleteParams = {
|
|
140
|
-
hsm_id: string;
|
|
141
|
-
name: string;
|
|
142
|
-
};
|
|
143
|
-
declare class TemplateClass {
|
|
144
|
-
getTemplate(templateId: string): Promise<TemplateResponse>;
|
|
145
|
-
updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;
|
|
146
|
-
getTemplates(params?: TemplateGetParams): Promise<ResponsePagination<TemplateResponse>>;
|
|
147
|
-
createTemplate(template: TemplateRequestBody): Promise<TemplateResponse>;
|
|
148
|
-
deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
declare class TemplateApi extends BaseAPI implements TemplateClass {
|
|
152
|
-
private readonly endpoint;
|
|
153
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
154
|
-
getTemplate(templateId: string): Promise<TemplateResponse>;
|
|
155
|
-
updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;
|
|
156
|
-
getTemplates(params?: TemplateGetParams): Promise<ResponsePagination<TemplateResponse>>;
|
|
157
|
-
createTemplate(template: TemplateRequestBody): Promise<TemplateResponse>;
|
|
158
|
-
deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export { type CatalogButton as C, type FlowButton as F, type MediaCarouselCard as M, type OTPButton as O, type PhoneNumberButton as P, type QuickReplyButton as Q, type SPMButton as S, TemplateApi as T, type URLButton as U, type ComponentTypes as a, type CopyCodeButton as b, type MPMButton as c, type ProductCarouselCard as d, type TemplateBody as e, type TemplateButton as f, type TemplateButtons as g, type TemplateCarousel as h, TemplateClass as i, type TemplateDeleteParams as j, type TemplateFooter as k, type TemplateFormat as l, type TemplateGetParams as m, type TemplateHeader as n, type TemplateHeaderExample as o, type TemplateLimitedTimeOffer as p, type TemplateRequestBody as q, type TemplateResponse as r };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { d as ResponseSuccess, e as RequesterClass } from './request-CUjrMn8R.js';
|
|
4
|
-
|
|
5
|
-
type TwoStepVerificationRequest = {
|
|
6
|
-
pin: string;
|
|
7
|
-
};
|
|
8
|
-
interface TwoStepVerificationClass {
|
|
9
|
-
setTwoStepVerificationCode(pin: string): Promise<ResponseSuccess>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* API for managing WhatsApp Two-Step Verification.
|
|
14
|
-
*
|
|
15
|
-
* This API allows you to:
|
|
16
|
-
* - Set a two-step verification PIN code
|
|
17
|
-
* - Manage two-step verification settings
|
|
18
|
-
*/
|
|
19
|
-
declare class TwoStepVerificationApi extends BaseAPI implements TwoStepVerificationClass {
|
|
20
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
21
|
-
/**
|
|
22
|
-
* Set a two-step verification PIN code.
|
|
23
|
-
*
|
|
24
|
-
* @param pin The PIN code to set for two-step verification (6-digit numeric string)
|
|
25
|
-
* @returns Response indicating success or failure
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* await whatsappClient.twoStepVerification.setTwoStepVerificationCode('123456');
|
|
29
|
-
*/
|
|
30
|
-
setTwoStepVerificationCode(pin: string): Promise<ResponseSuccess>;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { TwoStepVerificationApi as T, type TwoStepVerificationClass as a, type TwoStepVerificationRequest as b };
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { B as BaseAPI } from './base-BV6DyzGS.js';
|
|
2
|
-
import { WabaConfigType } from './types/config.js';
|
|
3
|
-
import { d as ResponseSuccess, e as RequesterClass } from './request-CUjrMn8R.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* WhatsApp Business Account subscription configuration
|
|
7
|
-
*/
|
|
8
|
-
type WabaSubscription = {
|
|
9
|
-
whatsapp_business_api_data: {
|
|
10
|
-
id: string;
|
|
11
|
-
link: string;
|
|
12
|
-
name: string;
|
|
13
|
-
category: string;
|
|
14
|
-
};
|
|
15
|
-
override_callback_uri?: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Parameters for updating WABA subscription
|
|
19
|
-
*/
|
|
20
|
-
interface UpdateWabaSubscription {
|
|
21
|
-
override_callback_uri: string;
|
|
22
|
-
verify_token: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Response containing all WABA subscriptions
|
|
26
|
-
*/
|
|
27
|
-
interface WabaSubscriptions {
|
|
28
|
-
data: Array<WabaSubscription>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* WABA account review status enumeration
|
|
32
|
-
*/
|
|
33
|
-
declare enum WabaAccountReviewStatus {
|
|
34
|
-
Approved = "APPROVED",
|
|
35
|
-
Active = "ACTIVE",
|
|
36
|
-
Inactive = "INACTIVE",
|
|
37
|
-
Disabled = "DISABLED"
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* WABA health status for message sending capability
|
|
41
|
-
*/
|
|
42
|
-
declare enum WabaHealthStatusCanSendMessage {
|
|
43
|
-
Blocked = "BLOCKED",
|
|
44
|
-
Limited = "LIMITED",
|
|
45
|
-
Available = "AVAILABLE"
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* WABA account status enumeration
|
|
49
|
-
*/
|
|
50
|
-
declare enum WabaAccountStatus {
|
|
51
|
-
Approved = "APPROVED",
|
|
52
|
-
Active = "ACTIVE",
|
|
53
|
-
Inactive = "INACTIVE",
|
|
54
|
-
Disabled = "DISABLED"
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Business verification status enumeration
|
|
58
|
-
*/
|
|
59
|
-
declare enum WabaBusinessVerificationStatus {
|
|
60
|
-
Verified = "verified",
|
|
61
|
-
PendingSubmission = "pending_submission",
|
|
62
|
-
Unverified = "unverified",
|
|
63
|
-
Rejected = "rejected"
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* WABA health status error details
|
|
67
|
-
*/
|
|
68
|
-
interface WabaHealthStatusError {
|
|
69
|
-
error_code?: number;
|
|
70
|
-
error_description?: string;
|
|
71
|
-
possible_solution?: string;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* WABA health status entity information
|
|
75
|
-
*/
|
|
76
|
-
interface WabaHealthStatusEntity {
|
|
77
|
-
entity_type?: string;
|
|
78
|
-
id?: string;
|
|
79
|
-
can_send_message?: string;
|
|
80
|
-
errors?: WabaHealthStatusError[];
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Overall WABA health status
|
|
84
|
-
*/
|
|
85
|
-
interface WabaHealthStatus {
|
|
86
|
-
can_send_message?: WabaHealthStatusCanSendMessage;
|
|
87
|
-
entities?: WabaHealthStatusEntity[];
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* WhatsApp Business Account information
|
|
91
|
-
*/
|
|
92
|
-
interface WabaAccount {
|
|
93
|
-
account_review_status?: WabaAccountReviewStatus;
|
|
94
|
-
id?: string;
|
|
95
|
-
health_status?: WabaHealthStatus;
|
|
96
|
-
status?: WabaAccountStatus;
|
|
97
|
-
business_verification_status?: WabaBusinessVerificationStatus;
|
|
98
|
-
message_template_namespace?: string;
|
|
99
|
-
name?: string;
|
|
100
|
-
ownership_type?: string;
|
|
101
|
-
currency?: string;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Available fields for WABA account queries
|
|
105
|
-
*/
|
|
106
|
-
type WabaAccountFields = 'id' | 'name' | 'account_review_status' | 'auth_international_rate_eligibility' | 'business_verification_status' | 'country' | 'currency' | 'health_status' | 'status' | 'ownership_type' | 'message_template_namespace';
|
|
107
|
-
/**
|
|
108
|
-
* Parameter type for specifying which WABA account fields to retrieve
|
|
109
|
-
*/
|
|
110
|
-
type WabaAccountFieldsParam = WabaAccountFields[];
|
|
111
|
-
/**
|
|
112
|
-
* Interface defining all WABA API methods
|
|
113
|
-
*/
|
|
114
|
-
interface WABAClass {
|
|
115
|
-
getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;
|
|
116
|
-
getAllWabaSubscriptions(): Promise<WabaSubscriptions>;
|
|
117
|
-
updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;
|
|
118
|
-
unsubscribeFromWaba(): Promise<ResponseSuccess>;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* API for managing WhatsApp Business Account (WABA).
|
|
123
|
-
*
|
|
124
|
-
* This API allows you to:
|
|
125
|
-
* - Get WABA account information
|
|
126
|
-
* - Manage WABA subscriptions
|
|
127
|
-
* - Subscribe/unsubscribe from WABA webhooks
|
|
128
|
-
* - Update subscription settings
|
|
129
|
-
*/
|
|
130
|
-
declare class WabaApi extends BaseAPI implements WABAClass {
|
|
131
|
-
constructor(config: WabaConfigType, client: RequesterClass);
|
|
132
|
-
/**
|
|
133
|
-
* Retrieve WhatsApp Business Account information.
|
|
134
|
-
*
|
|
135
|
-
* @param fields Optional array of specific fields to retrieve
|
|
136
|
-
* @returns WABA account information including status, health, verification status, etc.
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* const account = await whatsappClient.waba.getWabaAccount(['id', 'name', 'status']);
|
|
140
|
-
*/
|
|
141
|
-
getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;
|
|
142
|
-
/**
|
|
143
|
-
* Get all WABA subscriptions for the business account.
|
|
144
|
-
*
|
|
145
|
-
* @returns List of all subscribed apps and their configurations
|
|
146
|
-
*
|
|
147
|
-
* @example
|
|
148
|
-
* const subscriptions = await whatsappClient.waba.getAllWabaSubscriptions();
|
|
149
|
-
*/
|
|
150
|
-
getAllWabaSubscriptions(): Promise<WabaSubscriptions>;
|
|
151
|
-
/**
|
|
152
|
-
* Update WABA subscription configuration.
|
|
153
|
-
*
|
|
154
|
-
* @param params Configuration parameters including callback URI and verify token
|
|
155
|
-
* @returns Response indicating success or failure
|
|
156
|
-
*
|
|
157
|
-
* @example
|
|
158
|
-
* await whatsappClient.waba.updateWabaSubscription({
|
|
159
|
-
* override_callback_uri: 'https://example.com/webhook',
|
|
160
|
-
* verify_token: 'your_verify_token'
|
|
161
|
-
* });
|
|
162
|
-
*/
|
|
163
|
-
updateWabaSubscription({ override_callback_uri, verify_token, }: UpdateWabaSubscription): Promise<ResponseSuccess>;
|
|
164
|
-
/**
|
|
165
|
-
* Unsubscribe from WABA webhooks.
|
|
166
|
-
*
|
|
167
|
-
* @returns Response indicating success or failure
|
|
168
|
-
*
|
|
169
|
-
* @example
|
|
170
|
-
* await whatsappClient.waba.unsubscribeFromWaba();
|
|
171
|
-
*/
|
|
172
|
-
unsubscribeFromWaba(): Promise<ResponseSuccess>;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
export { type UpdateWabaSubscription as U, WabaApi as W, type WabaAccount as a, type WABAClass as b, type WabaAccountFields as c, type WabaAccountFieldsParam as d, type WabaHealthStatus as e, type WabaHealthStatusEntity as f, type WabaHealthStatusError as g, type WabaSubscription as h, type WabaSubscriptions as i, WabaAccountReviewStatus as j, WabaAccountStatus as k, WabaBusinessVerificationStatus as l, WabaHealthStatusCanSendMessage as m };
|