meta-cloud-api 1.0.0 → 1.0.2
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/LICENSE +21 -0
- package/README.md +405 -0
- package/dist/BusinessProfileApi-WXscSgo-.d.ts +353 -0
- package/dist/EncryptionApi-D7pt-OXT.d.ts +22 -0
- package/dist/FlowApi-B2ffO-HD.d.ts +136 -0
- package/dist/MediaApi-BrEKpqi_.d.ts +90 -0
- package/dist/MessageApi-BgsSpDno.d.ts +171 -0
- package/dist/PhoneNumberApi-DKlu9PHl.d.ts +142 -0
- package/dist/QrCodeApi-7vDwIBHR.d.ts +98 -0
- package/dist/RegistrationApi-qO_qoti9.d.ts +47 -0
- package/dist/TemplateApi-xGgIZt89.d.ts +161 -0
- package/dist/TwoStepVerificationApi-DfNPIz-C.d.ts +33 -0
- package/dist/WabaApi-DqQi_68m.d.ts +175 -0
- package/dist/WebhookProcessor-BXYunz4N.d.ts +707 -0
- package/dist/WhatsApp-pTZPQm81.d.ts +82 -0
- package/dist/api/encryption/index.d.ts +10 -0
- package/dist/api/encryption/index.js +2 -0
- package/dist/api/encryption/index.js.map +1 -0
- package/dist/api/flow/index.d.ts +10 -0
- package/dist/api/flow/index.js +2 -0
- package/dist/api/flow/index.js.map +1 -0
- package/dist/api/index.d.ts +17 -0
- package/dist/api/index.js +2 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/media/index.d.ts +10 -0
- package/dist/api/media/index.js +2 -0
- package/dist/api/media/index.js.map +1 -0
- package/dist/api/messages/builders/index.d.ts +536 -0
- package/dist/api/messages/builders/index.js +4 -0
- package/dist/api/messages/builders/index.js.map +1 -0
- package/dist/api/messages/index.d.ts +10 -0
- package/dist/api/messages/index.js +2 -0
- package/dist/api/messages/index.js.map +1 -0
- package/dist/api/phone/index.d.ts +10 -0
- package/dist/api/phone/index.js +2 -0
- package/dist/api/phone/index.js.map +1 -0
- package/dist/api/profile/index.d.ts +10 -0
- package/dist/api/profile/index.js +2 -0
- package/dist/api/profile/index.js.map +1 -0
- package/dist/api/qrCode/index.d.ts +10 -0
- package/dist/api/qrCode/index.js +2 -0
- package/dist/api/qrCode/index.js.map +1 -0
- package/dist/api/registration/index.d.ts +10 -0
- package/dist/api/registration/index.js +2 -0
- package/dist/api/registration/index.js.map +1 -0
- package/dist/api/template/index.d.ts +215 -0
- package/dist/api/template/index.js +2 -0
- package/dist/api/template/index.js.map +1 -0
- package/dist/api/twoStepVerification/index.d.ts +10 -0
- package/dist/api/twoStepVerification/index.js +2 -0
- package/dist/api/twoStepVerification/index.js.map +1 -0
- package/dist/api/waba/index.d.ts +10 -0
- package/dist/api/waba/index.js +2 -0
- package/dist/api/waba/index.js.map +1 -0
- package/dist/base-CdGDdVEl.d.ts +18 -0
- package/dist/chunk-7QBIZCJ4.js +2 -0
- package/dist/chunk-7QBIZCJ4.js.map +1 -0
- package/dist/chunk-AMHQGG6Z.js +2 -0
- package/dist/chunk-AMHQGG6Z.js.map +1 -0
- package/dist/chunk-BAOZ4U74.js +10 -0
- package/dist/chunk-BAOZ4U74.js.map +1 -0
- package/dist/chunk-CRZ7EUYR.js +2 -0
- package/dist/chunk-CRZ7EUYR.js.map +1 -0
- package/dist/chunk-FKXSL2JK.js +3 -0
- package/dist/chunk-FKXSL2JK.js.map +1 -0
- package/dist/chunk-FSKBLPGE.js +2 -0
- package/dist/chunk-FSKBLPGE.js.map +1 -0
- package/dist/chunk-IYSR44P6.js +2 -0
- package/dist/chunk-IYSR44P6.js.map +1 -0
- package/dist/chunk-JC6YMVID.js +2 -0
- package/dist/chunk-JC6YMVID.js.map +1 -0
- package/dist/chunk-JPAV644F.js +2 -0
- package/dist/chunk-JPAV644F.js.map +1 -0
- package/dist/chunk-JPGXONBQ.js +3 -0
- package/dist/chunk-JPGXONBQ.js.map +1 -0
- package/dist/chunk-JXCLRKQ7.js +2 -0
- package/dist/chunk-JXCLRKQ7.js.map +1 -0
- package/dist/chunk-KMAH6636.js +2 -0
- package/dist/chunk-KMAH6636.js.map +1 -0
- package/dist/chunk-L4ESAO2S.js +2 -0
- package/dist/chunk-L4ESAO2S.js.map +1 -0
- package/dist/chunk-LV3TULSI.js +2 -0
- package/dist/chunk-LV3TULSI.js.map +1 -0
- package/dist/chunk-MJEG3K4V.js +2 -0
- package/dist/chunk-MJEG3K4V.js.map +1 -0
- package/dist/chunk-NLF2JGYY.js +2 -0
- package/dist/chunk-NLF2JGYY.js.map +1 -0
- package/dist/chunk-NOJFGTRT.js +2 -0
- package/dist/chunk-NOJFGTRT.js.map +1 -0
- package/dist/chunk-PHPQ5HP3.js +2 -0
- package/dist/chunk-PHPQ5HP3.js.map +1 -0
- package/dist/chunk-RIL6QABY.js +2 -0
- package/dist/chunk-RIL6QABY.js.map +1 -0
- package/dist/chunk-RWCVPWRC.js +2 -0
- package/dist/chunk-RWCVPWRC.js.map +1 -0
- package/dist/chunk-SNNRWNGZ.js +2 -0
- package/dist/chunk-SNNRWNGZ.js.map +1 -0
- package/dist/chunk-VHAODWCN.js +2 -0
- package/dist/chunk-VHAODWCN.js.map +1 -0
- package/dist/chunk-WGGN32O2.js +2 -0
- package/dist/chunk-WGGN32O2.js.map +1 -0
- package/dist/chunk-YXZ4L2OK.js +2 -0
- package/dist/chunk-YXZ4L2OK.js.map +1 -0
- package/dist/common-BiRA_uz3.d.ts +425 -0
- package/dist/common-lV0NsO7t.d.ts +376 -0
- package/dist/core/webhook/frameworks/express.d.ts +49 -0
- package/dist/core/webhook/frameworks/express.js +2 -0
- package/dist/core/webhook/frameworks/express.js.map +1 -0
- package/dist/core/webhook/frameworks/nextjs.d.ts +45 -0
- package/dist/core/webhook/frameworks/nextjs.js +2 -0
- package/dist/core/webhook/frameworks/nextjs.js.map +1 -0
- package/dist/core/webhook/index.d.ts +27 -0
- package/dist/core/webhook/index.js +2 -0
- package/dist/core/webhook/index.js.map +1 -0
- package/dist/core/whatsapp/index.d.ts +41 -0
- package/dist/core/whatsapp/index.js +2 -0
- package/dist/core/whatsapp/index.js.map +1 -0
- package/dist/enums-BZd9T2ul.d.ts +707 -0
- package/dist/flowTypeGuards-B5hBzkZ4.d.ts +43 -0
- package/dist/httpsClient-v4gmltzS.d.ts +19 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/logger-BdE0Vyim.d.ts +9 -0
- package/dist/request-vYMaEfk5.d.ts +50 -0
- package/dist/types/config.d.ts +78 -0
- package/dist/types/config.js +2 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/enums.d.ts +1 -0
- package/dist/types/enums.js +2 -0
- package/dist/types/enums.js.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/index.d.ts +59 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +247 -8
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { WabaConfigType, WhatsAppConfig } from './types/config.js';
|
|
2
|
+
import { H as HttpMethodsEnum, l as SDKEnums } from './enums-BZd9T2ul.js';
|
|
3
|
+
import { R as RequesterClass } from './request-vYMaEfk5.js';
|
|
4
|
+
import { H as HttpsClientClass, a as HttpsClientResponseClass } from './httpsClient-v4gmltzS.js';
|
|
5
|
+
import { Agent } from 'https';
|
|
6
|
+
import { E as EncryptionApi } from './EncryptionApi-D7pt-OXT.js';
|
|
7
|
+
import { F as FlowApi } from './FlowApi-B2ffO-HD.js';
|
|
8
|
+
import { M as MediaApi } from './MediaApi-BrEKpqi_.js';
|
|
9
|
+
import { M as MessagesApi } from './MessageApi-BgsSpDno.js';
|
|
10
|
+
import { P as PhoneNumberApi } from './PhoneNumberApi-DKlu9PHl.js';
|
|
11
|
+
import { B as BusinessProfileApi } from './BusinessProfileApi-WXscSgo-.js';
|
|
12
|
+
import { Q as QrCodeApi } from './QrCodeApi-7vDwIBHR.js';
|
|
13
|
+
import { R as RegistrationApi } from './RegistrationApi-qO_qoti9.js';
|
|
14
|
+
import { T as TemplateApi } from './TemplateApi-xGgIZt89.js';
|
|
15
|
+
import { T as TwoStepVerificationApi } from './TwoStepVerificationApi-DfNPIz-C.js';
|
|
16
|
+
import { W as WabaApi } from './WabaApi-DqQi_68m.js';
|
|
17
|
+
|
|
18
|
+
declare class HttpsClient implements HttpsClientClass {
|
|
19
|
+
agent: Agent;
|
|
20
|
+
constructor();
|
|
21
|
+
clearSockets(): boolean;
|
|
22
|
+
sendRequest(hostname: string, path: string, method: HttpMethodsEnum, headers: HeadersInit, timeout: number, body?: BodyInit | null): Promise<HttpsClientResponseClass>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare class Requester implements RequesterClass {
|
|
26
|
+
client: Readonly<HttpsClient>;
|
|
27
|
+
accessToken: Readonly<string>;
|
|
28
|
+
phoneNumberId: Readonly<number>;
|
|
29
|
+
businessAcctId: Readonly<string>;
|
|
30
|
+
apiVersion: Readonly<string>;
|
|
31
|
+
userAgent: Readonly<string>;
|
|
32
|
+
host: Readonly<string>;
|
|
33
|
+
protocol: Readonly<string>;
|
|
34
|
+
constructor(apiVersion: string, phoneNumberId: number, accessToken: string, businessAcctId: string, userAgent: string);
|
|
35
|
+
buildHeader(contentType: string, additionalHeaders?: Record<string, string>): HeadersInit;
|
|
36
|
+
buildCAPIPath(endpoint: string): string;
|
|
37
|
+
sendRequest(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: any, contentType?: string, additionalHeaders?: Record<string, string>): Promise<HttpsClientResponseClass>;
|
|
38
|
+
getJson<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, body?: any, additionalHeaders?: Record<string, string>): Promise<T>;
|
|
39
|
+
sendFormData<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: FormData, additionalHeaders?: Record<string, string>): Promise<T>;
|
|
40
|
+
sendUrlEncodedForm<T>(method: HttpMethodsEnum, endpoint: string, timeout: number, formData: Record<string, string>, additionalHeaders?: Record<string, string>): Promise<T>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* WhatsApp SDK Main Class following official patterns
|
|
45
|
+
* Provides unified access to WhatsApp Cloud API and Flows API
|
|
46
|
+
*/
|
|
47
|
+
declare class WhatsApp {
|
|
48
|
+
config: WabaConfigType;
|
|
49
|
+
requester: Readonly<Requester>;
|
|
50
|
+
messages: MessagesApi;
|
|
51
|
+
media: MediaApi;
|
|
52
|
+
phoneNumbers: PhoneNumberApi;
|
|
53
|
+
twoStepVerification: TwoStepVerificationApi;
|
|
54
|
+
flows: FlowApi;
|
|
55
|
+
businessProfile: BusinessProfileApi;
|
|
56
|
+
templates: TemplateApi;
|
|
57
|
+
encryption: EncryptionApi;
|
|
58
|
+
qrCode: QrCodeApi;
|
|
59
|
+
registration: RegistrationApi;
|
|
60
|
+
waba: WabaApi;
|
|
61
|
+
constructor(config?: WhatsAppConfig);
|
|
62
|
+
/**
|
|
63
|
+
* Runtime configuration updates following official patterns
|
|
64
|
+
*/
|
|
65
|
+
updateTimeout(timeout: number): void;
|
|
66
|
+
updateSenderNumberId(phoneNumberId: number): void;
|
|
67
|
+
updateAccessToken(accessToken: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Get SDK version
|
|
70
|
+
*/
|
|
71
|
+
version(): string;
|
|
72
|
+
/**
|
|
73
|
+
* Static enums access
|
|
74
|
+
*/
|
|
75
|
+
static get Enums(): typeof SDKEnums;
|
|
76
|
+
/**
|
|
77
|
+
* Get User-Agent string
|
|
78
|
+
*/
|
|
79
|
+
getUserAgent(): string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export { WhatsApp as W };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { E as EncryptionApi } from '../../EncryptionApi-D7pt-OXT.js';
|
|
2
|
+
export { a as EncryptionClass, b as EncryptionPublicKeyResponse } from '../../EncryptionApi-D7pt-OXT.js';
|
|
3
|
+
import '../../base-CdGDdVEl.js';
|
|
4
|
+
import '../../types/config.js';
|
|
5
|
+
import '../../enums-BZd9T2ul.js';
|
|
6
|
+
import '../../request-vYMaEfk5.js';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export { EncryptionApi, EncryptionApi as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { F as FlowApi } from '../../FlowApi-B2ffO-HD.js';
|
|
2
|
+
export { C as CreateFlowResponse, c as Flow, e as FlowActionEnum, f as FlowAssetsResponse, g as FlowCategoryEnum, h as FlowClass, a as FlowEndpointRequest, b as FlowEndpointResponse, i as FlowMigrationResponse, j as FlowPreviewResponse, l as FlowStatusEnum, d as FlowType, F as FlowTypeEnum, m as FlowValidationError, k as FlowsListResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from '../../common-lV0NsO7t.js';
|
|
3
|
+
import '../../base-CdGDdVEl.js';
|
|
4
|
+
import '../../types/config.js';
|
|
5
|
+
import '../../enums-BZd9T2ul.js';
|
|
6
|
+
import '../../request-vYMaEfk5.js';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export { FlowApi, FlowApi as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { E as EncryptionApi, a as EncryptionClass, b as EncryptionPublicKeyResponse } from '../EncryptionApi-D7pt-OXT.js';
|
|
2
|
+
export { F as FlowApi } from '../FlowApi-B2ffO-HD.js';
|
|
3
|
+
export { C as CreateFlowResponse, c as Flow, e as FlowActionEnum, f as FlowAssetsResponse, g as FlowCategoryEnum, h as FlowClass, a as FlowEndpointRequest, b as FlowEndpointResponse, i as FlowMigrationResponse, j as FlowPreviewResponse, l as FlowStatusEnum, d as FlowType, F as FlowTypeEnum, m as FlowValidationError, k as FlowsListResponse, U as UpdateFlowResponse, V as ValidateFlowJsonResponse } from '../common-lV0NsO7t.js';
|
|
4
|
+
export { M as MediaApi, a as MediaClass, b as MediaResponse, c as MediasResponse, U as UploadMediaResponse } from '../MediaApi-BrEKpqi_.js';
|
|
5
|
+
export { M as MessagesApi } from '../MessageApi-BgsSpDno.js';
|
|
6
|
+
export { A as AudioMediaObject, C as ContactObject, D as DocumentMediaObject, I as ImageMediaObject, a as InteractiveObject, L as LocationObject, M as MessageRequestParams, c as MessageTemplateObject, b as MessagesResponse, R as ReactionParams, S as StatusParams, d as StickerMediaObject, T as TextMessageParams, e as TextObject, V as VideoMediaObject } from '../common-BiRA_uz3.js';
|
|
7
|
+
export { A as AccountMode, C as CodeVerificationStatus, a as Cursors, H as HealthStatus, b as HealthStatusEntity, M as MessagingLimitTier, P as PhoneNumberApi, c as PhoneNumberClass, d as PhoneNumberResponse, e as PhoneNumbersResponse, f as PlatformType, Q as QualityRating, g as QualityScore, R as RequestVerificationCodeRequest, T as Throughput, h as ThroughputLevel, i as TwoStepVerificationParams, V as VerifyCodeRequest } from '../PhoneNumberApi-DKlu9PHl.js';
|
|
8
|
+
export { B as BusinessProfileApi, a as BusinessProfileClass, b as BusinessProfileData, c as BusinessProfileField, d as BusinessProfileFieldsParam, e as BusinessProfileResponse, C as CreateUploadSessionParams, G as GetUploadHandleParams, U as UpdateBusinessProfileRequest, f as UploadBusinessProfileResponse, g as UploadHandle, h as UploadMediaParams, i as UploadSession, j as UploadSessionResponse } from '../BusinessProfileApi-WXscSgo-.js';
|
|
9
|
+
export { C as CreateQrCodeRequest, Q as QrCodeApi, a as QrCodeClass, b as QrCodeResponse, c as QrCodesResponse, U as UpdateQrCodeRequest } from '../QrCodeApi-7vDwIBHR.js';
|
|
10
|
+
export { R as RegistrationApi, a as RegistrationClass, b as RegistrationRequest } from '../RegistrationApi-qO_qoti9.js';
|
|
11
|
+
export { T as TemplateApi, a as TemplateClass, b as TemplateDeleteParams, c as TemplateGetParams, d as TemplateRequestBody, e as TemplateResponse } from '../TemplateApi-xGgIZt89.js';
|
|
12
|
+
export { T as TwoStepVerificationApi, a as TwoStepVerificationClass, b as TwoStepVerificationRequest } from '../TwoStepVerificationApi-DfNPIz-C.js';
|
|
13
|
+
export { U as UpdateWabaSubscription, b as WABAClass, a as WabaAccount, W as WabaApi, c as WabaSubscriptions } from '../WabaApi-DqQi_68m.js';
|
|
14
|
+
import '../base-CdGDdVEl.js';
|
|
15
|
+
import '../types/config.js';
|
|
16
|
+
import '../enums-BZd9T2ul.js';
|
|
17
|
+
import '../request-vYMaEfk5.js';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'../chunk-AMHQGG6Z.js';export{a as TemplateApi}from'../chunk-VHAODWCN.js';export{b as QrCodeApi}from'../chunk-JPAV644F.js';export{b as RegistrationApi}from'../chunk-PHPQ5HP3.js';export{b as EncryptionApi}from'../chunk-IYSR44P6.js';export{b as TwoStepVerificationApi}from'../chunk-SNNRWNGZ.js';export{b as WabaApi}from'../chunk-L4ESAO2S.js';export{b as MessagesApi}from'../chunk-7QBIZCJ4.js';export{b as MediaApi}from'../chunk-JXCLRKQ7.js';export{b as BusinessProfileApi}from'../chunk-LV3TULSI.js';import'../chunk-CRZ7EUYR.js';export{b as FlowApi}from'../chunk-JC6YMVID.js';import'../chunk-NLF2JGYY.js';export{b as PhoneNumberApi}from'../chunk-FSKBLPGE.js';import'../chunk-MJEG3K4V.js';import'../chunk-RIL6QABY.js';import'../chunk-KMAH6636.js';//# sourceMappingURL=index.js.map
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { M as MediaApi } from '../../MediaApi-BrEKpqi_.js';
|
|
2
|
+
export { a as MediaClass, b as MediaResponse, c as MediasResponse, U as UploadMediaResponse } from '../../MediaApi-BrEKpqi_.js';
|
|
3
|
+
import '../../base-CdGDdVEl.js';
|
|
4
|
+
import '../../types/config.js';
|
|
5
|
+
import '../../enums-BZd9T2ul.js';
|
|
6
|
+
import '../../request-vYMaEfk5.js';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
export { MediaApi, MediaApi as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|