meta-cloud-api 0.2.11 → 0.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/api/index.d.mts +495 -27
- package/dist/api/index.mjs +1 -1
- package/dist/api/index.mjs.map +1 -1
- package/dist/chunk-KZQQJAPX.mjs +2 -0
- package/dist/chunk-KZQQJAPX.mjs.map +1 -0
- package/dist/chunk-N7A7DQDX.mjs +2 -0
- package/dist/chunk-N7A7DQDX.mjs.map +1 -0
- package/dist/chunk-QE4PKOSW.mjs +2 -0
- package/dist/chunk-QE4PKOSW.mjs.map +1 -0
- package/dist/chunk-R4CFE2XP.mjs +2 -0
- package/dist/chunk-R4CFE2XP.mjs.map +1 -0
- package/dist/chunk-XVYL7ZTG.mjs +2 -0
- package/dist/chunk-XVYL7ZTG.mjs.map +1 -0
- package/dist/index.d.mts +142 -43
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.mts +512 -19
- package/dist/types/index.mjs +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/dist/utils/index.d.mts +70 -21
- package/dist/utils/index.mjs +1 -1
- package/dist/utils/index.mjs.map +1 -1
- package/dist/waba-RRlZTQUG.d.mts +2229 -0
- package/dist/{types/whatsapp.d.ts → whatsapp-BNHXjrds.d.mts} +2 -17
- package/package.json +52 -18
- package/dist/api/base.d.mts +0 -15
- package/dist/api/base.d.ts +0 -15
- package/dist/api/base.js +0 -2
- package/dist/api/base.js.map +0 -1
- package/dist/api/base.mjs +0 -2
- package/dist/api/base.mjs.map +0 -1
- package/dist/api/businessProfile.d.mts +0 -145
- package/dist/api/businessProfile.d.ts +0 -145
- package/dist/api/businessProfile.js +0 -2
- package/dist/api/businessProfile.js.map +0 -1
- package/dist/api/businessProfile.mjs +0 -2
- package/dist/api/businessProfile.mjs.map +0 -1
- package/dist/api/encryption.d.mts +0 -15
- package/dist/api/encryption.d.ts +0 -15
- package/dist/api/encryption.js +0 -2
- package/dist/api/encryption.js.map +0 -1
- package/dist/api/encryption.mjs +0 -2
- package/dist/api/encryption.mjs.map +0 -1
- package/dist/api/flow.d.mts +0 -126
- package/dist/api/flow.d.ts +0 -126
- package/dist/api/flow.js +0 -2
- package/dist/api/flow.js.map +0 -1
- package/dist/api/flow.mjs +0 -2
- package/dist/api/flow.mjs.map +0 -1
- package/dist/api/index.d.ts +0 -28
- package/dist/api/index.js +0 -2
- package/dist/api/index.js.map +0 -1
- package/dist/api/media.d.mts +0 -17
- package/dist/api/media.d.ts +0 -17
- package/dist/api/media.js +0 -2
- package/dist/api/media.js.map +0 -1
- package/dist/api/media.mjs +0 -2
- package/dist/api/media.mjs.map +0 -1
- package/dist/api/messages.d.mts +0 -193
- package/dist/api/messages.d.ts +0 -193
- package/dist/api/messages.js +0 -2
- package/dist/api/messages.js.map +0 -1
- package/dist/api/messages.mjs +0 -2
- package/dist/api/messages.mjs.map +0 -1
- package/dist/api/phoneNumber.d.mts +0 -17
- package/dist/api/phoneNumber.d.ts +0 -17
- package/dist/api/phoneNumber.js +0 -2
- package/dist/api/phoneNumber.js.map +0 -1
- package/dist/api/phoneNumber.mjs +0 -2
- package/dist/api/phoneNumber.mjs.map +0 -1
- package/dist/api/qrCode.d.mts +0 -18
- package/dist/api/qrCode.d.ts +0 -18
- package/dist/api/qrCode.js +0 -2
- package/dist/api/qrCode.js.map +0 -1
- package/dist/api/qrCode.mjs +0 -2
- package/dist/api/qrCode.mjs.map +0 -1
- package/dist/api/registration.d.mts +0 -14
- package/dist/api/registration.d.ts +0 -14
- package/dist/api/registration.js +0 -2
- package/dist/api/registration.js.map +0 -1
- package/dist/api/registration.mjs +0 -2
- package/dist/api/registration.mjs.map +0 -1
- package/dist/api/template.d.mts +0 -18
- package/dist/api/template.d.ts +0 -18
- package/dist/api/template.js +0 -2
- package/dist/api/template.js.map +0 -1
- package/dist/api/template.mjs +0 -2
- package/dist/api/template.mjs.map +0 -1
- package/dist/api/twoStepVerification.d.mts +0 -13
- package/dist/api/twoStepVerification.d.ts +0 -13
- package/dist/api/twoStepVerification.js +0 -2
- package/dist/api/twoStepVerification.js.map +0 -1
- package/dist/api/twoStepVerification.mjs +0 -2
- package/dist/api/twoStepVerification.mjs.map +0 -1
- package/dist/api/waba.d.mts +0 -16
- package/dist/api/waba.d.ts +0 -16
- package/dist/api/waba.js +0 -2
- package/dist/api/waba.js.map +0 -1
- package/dist/api/waba.mjs +0 -2
- package/dist/api/waba.mjs.map +0 -1
- package/dist/enums-CI7vzKhn.d.mts +0 -687
- package/dist/enums-CI7vzKhn.d.ts +0 -687
- package/dist/httpsClient.d.mts +0 -22
- package/dist/httpsClient.d.ts +0 -22
- package/dist/httpsClient.js +0 -2
- package/dist/httpsClient.js.map +0 -1
- package/dist/httpsClient.mjs +0 -2
- package/dist/httpsClient.mjs.map +0 -1
- package/dist/index.d.ts +0 -46
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -1
- package/dist/request.d.mts +0 -25
- package/dist/request.d.ts +0 -25
- package/dist/request.js +0 -2
- package/dist/request.js.map +0 -1
- package/dist/request.mjs +0 -2
- package/dist/request.mjs.map +0 -1
- package/dist/types/base.d.mts +0 -8
- package/dist/types/base.d.ts +0 -8
- package/dist/types/base.js +0 -2
- package/dist/types/base.js.map +0 -1
- package/dist/types/base.mjs +0 -1
- package/dist/types/base.mjs.map +0 -1
- package/dist/types/businessProfile.d.mts +0 -153
- package/dist/types/businessProfile.d.ts +0 -153
- package/dist/types/businessProfile.js +0 -2
- package/dist/types/businessProfile.js.map +0 -1
- package/dist/types/businessProfile.mjs +0 -1
- package/dist/types/businessProfile.mjs.map +0 -1
- package/dist/types/config.d.mts +0 -62
- package/dist/types/config.d.ts +0 -62
- package/dist/types/config.js +0 -2
- package/dist/types/config.js.map +0 -1
- package/dist/types/config.mjs +0 -1
- package/dist/types/config.mjs.map +0 -1
- package/dist/types/encryption.d.mts +0 -13
- package/dist/types/encryption.d.ts +0 -13
- package/dist/types/encryption.js +0 -2
- package/dist/types/encryption.js.map +0 -1
- package/dist/types/encryption.mjs +0 -1
- package/dist/types/encryption.mjs.map +0 -1
- package/dist/types/enums.d.mts +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/enums.mjs +0 -2
- package/dist/types/enums.mjs.map +0 -1
- package/dist/types/flow.d.mts +0 -404
- package/dist/types/flow.d.ts +0 -404
- package/dist/types/flow.js +0 -2
- package/dist/types/flow.js.map +0 -1
- package/dist/types/flow.mjs +0 -2
- package/dist/types/flow.mjs.map +0 -1
- package/dist/types/httpsClient.d.mts +0 -19
- package/dist/types/httpsClient.d.ts +0 -19
- package/dist/types/httpsClient.js +0 -2
- package/dist/types/httpsClient.js.map +0 -1
- package/dist/types/httpsClient.mjs +0 -1
- package/dist/types/httpsClient.mjs.map +0 -1
- package/dist/types/index.d.ts +0 -20
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/types/logger.d.mts +0 -9
- package/dist/types/logger.d.ts +0 -9
- package/dist/types/logger.js +0 -2
- package/dist/types/logger.js.map +0 -1
- package/dist/types/logger.mjs +0 -1
- package/dist/types/logger.mjs.map +0 -1
- package/dist/types/media.d.mts +0 -31
- package/dist/types/media.d.ts +0 -31
- package/dist/types/media.js +0 -2
- package/dist/types/media.js.map +0 -1
- package/dist/types/media.mjs +0 -1
- package/dist/types/media.mjs.map +0 -1
- package/dist/types/messages.d.mts +0 -558
- package/dist/types/messages.d.ts +0 -558
- package/dist/types/messages.js +0 -2
- package/dist/types/messages.js.map +0 -1
- package/dist/types/messages.mjs +0 -1
- package/dist/types/messages.mjs.map +0 -1
- package/dist/types/phoneNumber.d.mts +0 -82
- package/dist/types/phoneNumber.d.ts +0 -82
- package/dist/types/phoneNumber.js +0 -2
- package/dist/types/phoneNumber.js.map +0 -1
- package/dist/types/phoneNumber.mjs +0 -1
- package/dist/types/phoneNumber.mjs.map +0 -1
- package/dist/types/qrCode.d.mts +0 -27
- package/dist/types/qrCode.d.ts +0 -27
- package/dist/types/qrCode.js +0 -2
- package/dist/types/qrCode.js.map +0 -1
- package/dist/types/qrCode.mjs +0 -1
- package/dist/types/qrCode.mjs.map +0 -1
- package/dist/types/registration.d.mts +0 -14
- package/dist/types/registration.d.ts +0 -14
- package/dist/types/registration.js +0 -2
- package/dist/types/registration.js.map +0 -1
- package/dist/types/registration.mjs +0 -1
- package/dist/types/registration.mjs.map +0 -1
- package/dist/types/request.d.mts +0 -50
- package/dist/types/request.d.ts +0 -50
- package/dist/types/request.js +0 -2
- package/dist/types/request.js.map +0 -1
- package/dist/types/request.mjs +0 -1
- package/dist/types/request.mjs.map +0 -1
- package/dist/types/template.d.mts +0 -106
- package/dist/types/template.d.ts +0 -106
- package/dist/types/template.js +0 -2
- package/dist/types/template.js.map +0 -1
- package/dist/types/template.mjs +0 -1
- package/dist/types/template.mjs.map +0 -1
- package/dist/types/twoStepVerification.d.mts +0 -11
- package/dist/types/twoStepVerification.d.ts +0 -11
- package/dist/types/twoStepVerification.js +0 -2
- package/dist/types/twoStepVerification.js.map +0 -1
- package/dist/types/twoStepVerification.mjs +0 -1
- package/dist/types/twoStepVerification.mjs.map +0 -1
- package/dist/types/waba.d.mts +0 -78
- package/dist/types/waba.d.ts +0 -78
- package/dist/types/waba.js +0 -2
- package/dist/types/waba.js.map +0 -1
- package/dist/types/waba.mjs +0 -2
- package/dist/types/waba.mjs.map +0 -1
- package/dist/types/webhook.d.mts +0 -486
- package/dist/types/webhook.d.ts +0 -486
- package/dist/types/webhook.js +0 -2
- package/dist/types/webhook.js.map +0 -1
- package/dist/types/webhook.mjs +0 -2
- package/dist/types/webhook.mjs.map +0 -1
- package/dist/types/whatsapp.d.mts +0 -61
- package/dist/types/whatsapp.js +0 -2
- package/dist/types/whatsapp.js.map +0 -1
- package/dist/types/whatsapp.mjs +0 -1
- package/dist/types/whatsapp.mjs.map +0 -1
- package/dist/utils/buildFieldsQueryString.d.mts +0 -3
- package/dist/utils/buildFieldsQueryString.d.ts +0 -3
- package/dist/utils/buildFieldsQueryString.js +0 -2
- package/dist/utils/buildFieldsQueryString.js.map +0 -1
- package/dist/utils/buildFieldsQueryString.mjs +0 -2
- package/dist/utils/buildFieldsQueryString.mjs.map +0 -1
- package/dist/utils/filters.d.mts +0 -144
- package/dist/utils/filters.d.ts +0 -144
- package/dist/utils/filters.js +0 -2
- package/dist/utils/filters.js.map +0 -1
- package/dist/utils/filters.mjs +0 -2
- package/dist/utils/filters.mjs.map +0 -1
- package/dist/utils/flowTypeGuards.d.mts +0 -46
- package/dist/utils/flowTypeGuards.d.ts +0 -46
- package/dist/utils/flowTypeGuards.js +0 -2
- package/dist/utils/flowTypeGuards.js.map +0 -1
- package/dist/utils/flowTypeGuards.mjs +0 -2
- package/dist/utils/flowTypeGuards.mjs.map +0 -1
- package/dist/utils/generateXHub256Sig.d.mts +0 -3
- package/dist/utils/generateXHub256Sig.d.ts +0 -3
- package/dist/utils/generateXHub256Sig.js +0 -2
- package/dist/utils/generateXHub256Sig.js.map +0 -1
- package/dist/utils/generateXHub256Sig.mjs +0 -2
- package/dist/utils/generateXHub256Sig.mjs.map +0 -1
- package/dist/utils/importConfig.d.mts +0 -21
- package/dist/utils/importConfig.d.ts +0 -21
- package/dist/utils/importConfig.js +0 -2
- package/dist/utils/importConfig.js.map +0 -1
- package/dist/utils/importConfig.mjs +0 -2
- package/dist/utils/importConfig.mjs.map +0 -1
- package/dist/utils/index.d.ts +0 -22
- package/dist/utils/index.js +0 -2
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/isMetaError.d.mts +0 -21
- package/dist/utils/isMetaError.d.ts +0 -21
- package/dist/utils/isMetaError.js +0 -2
- package/dist/utils/isMetaError.js.map +0 -1
- package/dist/utils/isMetaError.mjs +0 -2
- package/dist/utils/isMetaError.mjs.map +0 -1
- package/dist/utils/logger.d.mts +0 -13
- package/dist/utils/logger.d.ts +0 -13
- package/dist/utils/logger.js +0 -2
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/logger.mjs +0 -2
- package/dist/utils/logger.mjs.map +0 -1
- package/dist/utils/objectToQueryString.d.mts +0 -3
- package/dist/utils/objectToQueryString.d.ts +0 -3
- package/dist/utils/objectToQueryString.js +0 -2
- package/dist/utils/objectToQueryString.js.map +0 -1
- package/dist/utils/objectToQueryString.mjs +0 -2
- package/dist/utils/objectToQueryString.mjs.map +0 -1
- package/dist/webhook.d.mts +0 -123
- package/dist/webhook.d.ts +0 -123
- package/dist/webhook.js +0 -3
- package/dist/webhook.js.map +0 -1
- package/dist/webhook.mjs +0 -3
- package/dist/webhook.mjs.map +0 -1
- package/dist/whatsapp.d.mts +0 -58
- package/dist/whatsapp.d.ts +0 -58
- package/dist/whatsapp.js +0 -2
- package/dist/whatsapp.js.map +0 -1
- package/dist/whatsapp.mjs +0 -2
- package/dist/whatsapp.mjs.map +0 -1
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Paging, ResponseSuccess } from './request.js';
|
|
2
|
-
import '../enums-CI7vzKhn.js';
|
|
3
|
-
|
|
4
|
-
type QualityRating = 'GREEN' | 'YELLOW' | 'RED' | 'NA';
|
|
5
|
-
type AccountMode = 'LIVE' | 'SANDBOX';
|
|
6
|
-
type CodeVerificationStatus = 'NOT_VERIFIED' | 'VERIFIED' | 'EXPIRED' | 'PENDING' | 'DELETED' | 'MIGRATED' | 'BANNED' | 'RESTRICTED' | 'RATE_LIMITED' | 'FLAGGED' | 'CONNECTED' | 'DISCONNECTED' | 'UNKNOWN' | 'UNVERIFIED';
|
|
7
|
-
type MessagingLimitTier = 'TIER_50' | 'TIER_250' | 'TIER_1K' | 'TIER_10K' | 'TIER_100K' | 'TIER_UNLIMITED';
|
|
8
|
-
type PlatformType = 'CLOUD_API' | 'ON_PREMISE' | 'NOT_APPLICABLE';
|
|
9
|
-
type ThroughputLevel = 'STANDARD' | 'HIGH' | 'NOT_APPLICABLE';
|
|
10
|
-
type HealthStatusEntity = {
|
|
11
|
-
entity_type: string;
|
|
12
|
-
id: string;
|
|
13
|
-
can_send_message: string;
|
|
14
|
-
additional_info?: string[];
|
|
15
|
-
errors?: Array<{
|
|
16
|
-
error_code: number;
|
|
17
|
-
error_description: string;
|
|
18
|
-
possible_solution: string;
|
|
19
|
-
}>;
|
|
20
|
-
};
|
|
21
|
-
type HealthStatus = {
|
|
22
|
-
can_send_message: string;
|
|
23
|
-
entities: HealthStatusEntity[];
|
|
24
|
-
};
|
|
25
|
-
type QualityScore = {
|
|
26
|
-
score: QualityRating;
|
|
27
|
-
};
|
|
28
|
-
type Throughput = {
|
|
29
|
-
level: ThroughputLevel;
|
|
30
|
-
};
|
|
31
|
-
type PhoneNumberResponse = {
|
|
32
|
-
display_phone_number: string;
|
|
33
|
-
id: string;
|
|
34
|
-
quality_rating: QualityRating;
|
|
35
|
-
verified_name: string;
|
|
36
|
-
account_mode?: AccountMode;
|
|
37
|
-
certificate?: string;
|
|
38
|
-
code_verification_status?: CodeVerificationStatus;
|
|
39
|
-
conversational_automation?: Record<string, unknown>;
|
|
40
|
-
eligibility_for_api_business_global_search?: string;
|
|
41
|
-
health_status?: HealthStatus;
|
|
42
|
-
is_official_business_account?: boolean;
|
|
43
|
-
is_on_biz_app?: boolean;
|
|
44
|
-
is_pin_enabled?: boolean;
|
|
45
|
-
is_preverified_number?: boolean;
|
|
46
|
-
last_onboarded_time?: string;
|
|
47
|
-
messaging_limit_tier?: MessagingLimitTier;
|
|
48
|
-
name_status?: string;
|
|
49
|
-
new_certificate?: string;
|
|
50
|
-
new_name_status?: string;
|
|
51
|
-
platform_type?: PlatformType;
|
|
52
|
-
quality_score?: QualityScore;
|
|
53
|
-
search_visibility?: string;
|
|
54
|
-
status?: CodeVerificationStatus;
|
|
55
|
-
throughput?: Throughput;
|
|
56
|
-
};
|
|
57
|
-
type Cursors = {
|
|
58
|
-
before: string;
|
|
59
|
-
after: string;
|
|
60
|
-
};
|
|
61
|
-
type PhoneNumbersResponse = {
|
|
62
|
-
data: PhoneNumberResponse[];
|
|
63
|
-
paging: Paging;
|
|
64
|
-
};
|
|
65
|
-
type RequestVerificationCodeRequest = {
|
|
66
|
-
code_method: 'SMS' | 'VOICE';
|
|
67
|
-
language: string;
|
|
68
|
-
};
|
|
69
|
-
type VerifyCodeRequest = {
|
|
70
|
-
code: string;
|
|
71
|
-
};
|
|
72
|
-
type TwoStepVerificationParams = {
|
|
73
|
-
pin: string;
|
|
74
|
-
};
|
|
75
|
-
declare class PhoneNumberClass {
|
|
76
|
-
getPhoneNumberById(fields?: string): Promise<PhoneNumberResponse>;
|
|
77
|
-
getPhoneNumbers(): Promise<PhoneNumbersResponse>;
|
|
78
|
-
requestVerificationCode(params: RequestVerificationCodeRequest): Promise<ResponseSuccess>;
|
|
79
|
-
verifyCode(params: VerifyCodeRequest): Promise<ResponseSuccess>;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export { type AccountMode, type CodeVerificationStatus, type Cursors, type HealthStatus, type HealthStatusEntity, type MessagingLimitTier, PhoneNumberClass, type PhoneNumberResponse, type PhoneNumbersResponse, type PlatformType, type QualityRating, type QualityScore, type RequestVerificationCodeRequest, type Throughput, type ThroughputLevel, type TwoStepVerificationParams, type VerifyCodeRequest };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var r=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a(e))!p.call(t,i)&&i!==o&&r(t,i,{get:()=>e[i],enumerable:!(s=n(e,i))||s.enumerable});return t};var _=t=>u(r({},"__esModule",{value:!0}),t);var g={};module.exports=_(g);
|
|
2
|
-
//# sourceMappingURL=phoneNumber.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/phoneNumber.ts"],"sourcesContent":["import { Paging, RequesterResponseInterface, ResponseData, ResponseSuccess } from './request';\n\nexport type QualityRating = 'GREEN' | 'YELLOW' | 'RED' | 'NA';\n\nexport type AccountMode = 'LIVE' | 'SANDBOX';\n\nexport type CodeVerificationStatus =\n | 'NOT_VERIFIED'\n | 'VERIFIED'\n | 'EXPIRED'\n | 'PENDING'\n | 'DELETED'\n | 'MIGRATED'\n | 'BANNED'\n | 'RESTRICTED'\n | 'RATE_LIMITED'\n | 'FLAGGED'\n | 'CONNECTED'\n | 'DISCONNECTED'\n | 'UNKNOWN'\n | 'UNVERIFIED';\n\nexport type MessagingLimitTier = 'TIER_50' | 'TIER_250' | 'TIER_1K' | 'TIER_10K' | 'TIER_100K' | 'TIER_UNLIMITED';\n\nexport type PlatformType = 'CLOUD_API' | 'ON_PREMISE' | 'NOT_APPLICABLE';\n\nexport type ThroughputLevel = 'STANDARD' | 'HIGH' | 'NOT_APPLICABLE';\n\nexport type HealthStatusEntity = {\n entity_type: string;\n id: string;\n can_send_message: string;\n additional_info?: string[];\n errors?: Array<{\n error_code: number;\n error_description: string;\n possible_solution: string;\n }>;\n};\n\nexport type HealthStatus = {\n can_send_message: string;\n entities: HealthStatusEntity[];\n};\n\nexport type QualityScore = {\n score: QualityRating;\n};\n\nexport type Throughput = {\n level: ThroughputLevel;\n};\n\nexport type PhoneNumberResponse = {\n display_phone_number: string;\n id: string;\n quality_rating: QualityRating;\n verified_name: string;\n account_mode?: AccountMode;\n certificate?: string;\n code_verification_status?: CodeVerificationStatus;\n conversational_automation?: Record<string, unknown>;\n eligibility_for_api_business_global_search?: string;\n health_status?: HealthStatus;\n is_official_business_account?: boolean;\n is_on_biz_app?: boolean;\n is_pin_enabled?: boolean;\n is_preverified_number?: boolean;\n last_onboarded_time?: string;\n messaging_limit_tier?: MessagingLimitTier;\n name_status?: string;\n new_certificate?: string;\n new_name_status?: string;\n platform_type?: PlatformType;\n quality_score?: QualityScore;\n search_visibility?: string;\n status?: CodeVerificationStatus;\n throughput?: Throughput;\n};\n\nexport type Cursors = {\n before: string;\n after: string;\n};\n\nexport type PhoneNumbersResponse = {\n data: PhoneNumberResponse[];\n paging: Paging;\n};\n\nexport type RequestVerificationCodeRequest = {\n code_method: 'SMS' | 'VOICE';\n language: string;\n};\n\nexport type VerifyCodeRequest = {\n code: string;\n};\n\nexport type TwoStepVerificationParams = {\n pin: string;\n};\n\nexport declare class PhoneNumberClass {\n getPhoneNumberById(fields?: string): Promise<PhoneNumberResponse>;\n getPhoneNumbers(): Promise<PhoneNumbersResponse>;\n requestVerificationCode(params: RequestVerificationCodeRequest): Promise<ResponseSuccess>;\n verifyCode(params: VerifyCodeRequest): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["phoneNumber_exports","__toCommonJS"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=phoneNumber.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/qrCode.d.mts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ResponseData, ResponseSuccess } from './request.mjs';
|
|
2
|
-
import '../enums-CI7vzKhn.mjs';
|
|
3
|
-
|
|
4
|
-
type QrCodeResponse = {
|
|
5
|
-
code: string;
|
|
6
|
-
prefilled_message: string;
|
|
7
|
-
deep_link_url: string;
|
|
8
|
-
qr_image_url?: string;
|
|
9
|
-
};
|
|
10
|
-
type QrCodesResponse = ResponseData<QrCodeResponse[]>;
|
|
11
|
-
type CreateQrCodeRequest = {
|
|
12
|
-
prefilled_message: string;
|
|
13
|
-
generate_qr_image?: 'SVG' | 'PNG';
|
|
14
|
-
};
|
|
15
|
-
type UpdateQrCodeRequest = {
|
|
16
|
-
code: string;
|
|
17
|
-
prefilled_message: string;
|
|
18
|
-
};
|
|
19
|
-
interface QrCodeClass {
|
|
20
|
-
createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;
|
|
21
|
-
getQrCodes(): Promise<QrCodesResponse>;
|
|
22
|
-
getQrCode(qrCodeId: string): Promise<QrCodeResponse>;
|
|
23
|
-
updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;
|
|
24
|
-
deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type { CreateQrCodeRequest, QrCodeClass, QrCodeResponse, QrCodesResponse, UpdateQrCodeRequest };
|
package/dist/types/qrCode.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ResponseData, ResponseSuccess } from './request.js';
|
|
2
|
-
import '../enums-CI7vzKhn.js';
|
|
3
|
-
|
|
4
|
-
type QrCodeResponse = {
|
|
5
|
-
code: string;
|
|
6
|
-
prefilled_message: string;
|
|
7
|
-
deep_link_url: string;
|
|
8
|
-
qr_image_url?: string;
|
|
9
|
-
};
|
|
10
|
-
type QrCodesResponse = ResponseData<QrCodeResponse[]>;
|
|
11
|
-
type CreateQrCodeRequest = {
|
|
12
|
-
prefilled_message: string;
|
|
13
|
-
generate_qr_image?: 'SVG' | 'PNG';
|
|
14
|
-
};
|
|
15
|
-
type UpdateQrCodeRequest = {
|
|
16
|
-
code: string;
|
|
17
|
-
prefilled_message: string;
|
|
18
|
-
};
|
|
19
|
-
interface QrCodeClass {
|
|
20
|
-
createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;
|
|
21
|
-
getQrCodes(): Promise<QrCodesResponse>;
|
|
22
|
-
getQrCode(qrCodeId: string): Promise<QrCodeResponse>;
|
|
23
|
-
updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;
|
|
24
|
-
deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type { CreateQrCodeRequest, QrCodeClass, QrCodeResponse, QrCodesResponse, UpdateQrCodeRequest };
|
package/dist/types/qrCode.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var C=(s,e,d,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of n(e))!i.call(s,r)&&r!==d&&t(s,r,{get:()=>e[r],enumerable:!(o=p(e,r))||o.enumerable});return s};var a=s=>C(t({},"__esModule",{value:!0}),s);var g={};module.exports=a(g);
|
|
2
|
-
//# sourceMappingURL=qrCode.js.map
|
package/dist/types/qrCode.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/qrCode.ts"],"sourcesContent":["import { ResponseSuccess } from './request';\n\nimport { RequesterResponseInterface, ResponseData } from './request';\n\nexport type QrCodeResponse = {\n code: string;\n prefilled_message: string;\n deep_link_url: string;\n qr_image_url?: string;\n};\n\nexport type QrCodesResponse = ResponseData<QrCodeResponse[]>;\n\nexport type CreateQrCodeRequest = {\n prefilled_message: string;\n generate_qr_image?: 'SVG' | 'PNG';\n};\n\nexport type UpdateQrCodeRequest = {\n code: string;\n prefilled_message: string;\n};\n\nexport interface QrCodeClass {\n createQrCode(request: CreateQrCodeRequest): Promise<QrCodeResponse>;\n getQrCodes(): Promise<QrCodesResponse>;\n getQrCode(qrCodeId: string): Promise<QrCodeResponse>;\n updateQrCode(request: UpdateQrCodeRequest): Promise<QrCodeResponse>;\n deleteQrCode(qrCodeId: string): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["qrCode_exports","__toCommonJS"]}
|
package/dist/types/qrCode.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=qrCode.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { j as DataLocalizationRegionEnum } from '../enums-CI7vzKhn.mjs';
|
|
2
|
-
import { ResponseSuccess } from './request.mjs';
|
|
3
|
-
|
|
4
|
-
type RegistrationRequest = {
|
|
5
|
-
messaging_product: 'whatsapp';
|
|
6
|
-
pin: string;
|
|
7
|
-
data_localization_region?: DataLocalizationRegionEnum;
|
|
8
|
-
};
|
|
9
|
-
interface RegistrationClass {
|
|
10
|
-
register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;
|
|
11
|
-
deregister(): Promise<ResponseSuccess>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type { RegistrationClass, RegistrationRequest };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { j as DataLocalizationRegionEnum } from '../enums-CI7vzKhn.js';
|
|
2
|
-
import { ResponseSuccess } from './request.js';
|
|
3
|
-
|
|
4
|
-
type RegistrationRequest = {
|
|
5
|
-
messaging_product: 'whatsapp';
|
|
6
|
-
pin: string;
|
|
7
|
-
data_localization_region?: DataLocalizationRegionEnum;
|
|
8
|
-
};
|
|
9
|
-
interface RegistrationClass {
|
|
10
|
-
register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;
|
|
11
|
-
deregister(): Promise<ResponseSuccess>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type { RegistrationClass, RegistrationRequest };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var t=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(i,e,s,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of r(e))!c.call(i,o)&&o!==s&&t(i,o,{get:()=>e[o],enumerable:!(a=n(e,o))||a.enumerable});return i};var p=i=>g(t({},"__esModule",{value:!0}),i);var m={};module.exports=p(m);
|
|
2
|
-
//# sourceMappingURL=registration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/registration.ts"],"sourcesContent":["import { DataLocalizationRegionEnum } from './enums';\nimport { ResponseSuccess } from './request';\n\nexport type RegistrationRequest = {\n messaging_product: 'whatsapp';\n pin: string;\n data_localization_region?: DataLocalizationRegionEnum;\n};\n\nexport interface RegistrationClass {\n register(pin: string, dataLocalizationRegion?: DataLocalizationRegionEnum): Promise<ResponseSuccess>;\n deregister(): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["registration_exports","__toCommonJS"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=registration.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/request.d.mts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { H as HttpMethodsEnum } from '../enums-CI7vzKhn.mjs';
|
|
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, type GeneralRequestBody, type Paging, RequesterClass, type RequesterResponseInterface, type ResponseData, type ResponsePagination, type ResponseSuccess };
|
package/dist/types/request.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { H as HttpMethodsEnum } from '../enums-CI7vzKhn.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, type GeneralRequestBody, type Paging, RequesterClass, type RequesterResponseInterface, type ResponseData, type ResponsePagination, type ResponseSuccess };
|
package/dist/types/request.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var g=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!d.call(t,n)&&n!==o&&s(t,n,{get:()=>e[n],enumerable:!(r=i(e,n))||r.enumerable});return t};var m=t=>g(s({},"__esModule",{value:!0}),t);var u={};module.exports=m(u);
|
|
2
|
-
//# sourceMappingURL=request.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/request.ts"],"sourcesContent":["import { HttpMethodsEnum } from './enums';\n\nexport type GeneralRequestBody = Record<string, unknown>;\n\nexport interface GeneralHeaderInterface {\n /**\n * Authorization token. This is required for all HTTP requests made to the graph API.\n * @default 'Bearer '\n */\n Authorization: string;\n\n /**\n * Content type of the message being sent. This is required for all HTTP requests made to the graph API.\n * @default 'application/json'\n */\n 'Content-Type': string;\n\n /**\n * User agent field sent in all requests. This is used to gather SDK usage metrics and help\n * better triage support requests.\n * @default `WA_SDK/${ SDK_version } (Node.js ${ process.version })`\n */\n 'User-Agent': string;\n}\n\nexport interface RequesterResponseInterface<T> {\n json: () => Promise<T>;\n}\n\nexport interface ResponseSuccess {\n success: boolean;\n}\n\nexport interface ResponseData<T> {\n data: T;\n}\n\nexport interface ResponsePagination<T> {\n data: T[];\n paging: Paging;\n}\n\nexport interface Paging {\n cursors: {\n before: string;\n after: string;\n };\n next: string;\n}\n\nexport declare class RequesterClass {\n constructor(\n apiVersion: string,\n phoneNumberId: number,\n accessToken: string,\n businessAcctId: string,\n userAgent: string,\n );\n\n sendRequest: (\n method: HttpMethodsEnum,\n path: string,\n timeout: number,\n body?: GeneralRequestBody,\n contentType?: string,\n additionalHeaders?: Record<string, string>,\n ) => Promise<RequesterResponseInterface<unknown>>;\n\n getJson<T>(\n method: HttpMethodsEnum,\n endpoint: string,\n timeout: number,\n body?: GeneralRequestBody,\n additionalHeaders?: Record<string, string>,\n ): Promise<T>;\n\n sendFormData<T>(\n method: HttpMethodsEnum,\n endpoint: string,\n timeout: number,\n formData: FormData,\n additionalHeaders?: Record<string, string>,\n ): Promise<T>;\n\n sendUrlEncodedForm<T>(\n method: HttpMethodsEnum,\n endpoint: string,\n timeout: number,\n formData: Record<string, string>,\n additionalHeaders?: Record<string, string>,\n ): Promise<T>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["request_exports","__toCommonJS"]}
|
package/dist/types/request.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=request.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { L as LanguagesEnum, C as CategoryEnum, T as TemplateStatusEnum } from '../enums-CI7vzKhn.mjs';
|
|
2
|
-
import { GeneralRequestBody, ResponseSuccess, ResponsePagination } from './request.mjs';
|
|
3
|
-
|
|
4
|
-
type TemplateFormat = 'TEXT' | 'IMAGE' | 'VIDEO' | 'DOCUMENT' | 'LOCATION';
|
|
5
|
-
type PhoneNumberButton = {
|
|
6
|
-
type: 'PHONE_NUMBER';
|
|
7
|
-
text: string;
|
|
8
|
-
phone_number: string;
|
|
9
|
-
};
|
|
10
|
-
type URLButton = {
|
|
11
|
-
type: 'URL';
|
|
12
|
-
text: string;
|
|
13
|
-
url: string;
|
|
14
|
-
example?: string[];
|
|
15
|
-
};
|
|
16
|
-
type QuickReplyButton = {
|
|
17
|
-
type: 'QUICK_REPLY';
|
|
18
|
-
text: string;
|
|
19
|
-
};
|
|
20
|
-
type CopyCodeButton = {
|
|
21
|
-
type: 'COPY_CODE';
|
|
22
|
-
example: string;
|
|
23
|
-
};
|
|
24
|
-
type FlowButton = {
|
|
25
|
-
type: 'FLOW';
|
|
26
|
-
text: string;
|
|
27
|
-
flow_id?: string;
|
|
28
|
-
flow_name?: string;
|
|
29
|
-
flow_json?: string;
|
|
30
|
-
flow_action?: 'navigate' | 'data_exchange';
|
|
31
|
-
navigate_screen?: string;
|
|
32
|
-
};
|
|
33
|
-
type MPMButton = {
|
|
34
|
-
type: 'MPM';
|
|
35
|
-
};
|
|
36
|
-
type OTPButton = {
|
|
37
|
-
type: 'OTP';
|
|
38
|
-
};
|
|
39
|
-
type SPMButton = {
|
|
40
|
-
type: 'SPM';
|
|
41
|
-
};
|
|
42
|
-
type TemplateButton = PhoneNumberButton | URLButton | QuickReplyButton | CopyCodeButton | FlowButton | MPMButton | OTPButton | SPMButton;
|
|
43
|
-
type TemplateHeaderExample = {
|
|
44
|
-
header_text?: string[];
|
|
45
|
-
header_text_named_params?: Array<{
|
|
46
|
-
param_name: string;
|
|
47
|
-
example: string;
|
|
48
|
-
}>;
|
|
49
|
-
header_handle?: string[];
|
|
50
|
-
};
|
|
51
|
-
type TemplateHeader = {
|
|
52
|
-
type: 'HEADER';
|
|
53
|
-
format: TemplateFormat;
|
|
54
|
-
text?: string;
|
|
55
|
-
example?: TemplateHeaderExample;
|
|
56
|
-
};
|
|
57
|
-
type TemplateBody = {
|
|
58
|
-
type: 'BODY';
|
|
59
|
-
text: string;
|
|
60
|
-
example?: {
|
|
61
|
-
body_text?: Array<Array<string>>;
|
|
62
|
-
body_text_named_params?: Array<{
|
|
63
|
-
param_name: string;
|
|
64
|
-
example: string;
|
|
65
|
-
}>;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
type TemplateFooter = {
|
|
69
|
-
type: 'FOOTER';
|
|
70
|
-
text: string;
|
|
71
|
-
};
|
|
72
|
-
type ComponentTypes = TemplateHeader | TemplateBody | TemplateFooter | TemplateButton;
|
|
73
|
-
type TemplateRequestBody = GeneralRequestBody & {
|
|
74
|
-
name: string;
|
|
75
|
-
language: LanguagesEnum;
|
|
76
|
-
category?: CategoryEnum;
|
|
77
|
-
components?: ComponentTypes[];
|
|
78
|
-
};
|
|
79
|
-
type TemplateResponse = {
|
|
80
|
-
id: string;
|
|
81
|
-
status: string;
|
|
82
|
-
language: LanguagesEnum;
|
|
83
|
-
category: CategoryEnum;
|
|
84
|
-
name: string;
|
|
85
|
-
components: ComponentTypes[];
|
|
86
|
-
};
|
|
87
|
-
type TemplateGetParams = {
|
|
88
|
-
limit?: number;
|
|
89
|
-
name?: string;
|
|
90
|
-
language?: LanguagesEnum;
|
|
91
|
-
category?: CategoryEnum;
|
|
92
|
-
status?: TemplateStatusEnum;
|
|
93
|
-
};
|
|
94
|
-
type TemplateDeleteParams = {
|
|
95
|
-
hsm_id: string;
|
|
96
|
-
name: string;
|
|
97
|
-
};
|
|
98
|
-
declare class TemplateClass {
|
|
99
|
-
getTemplate(templateId: string): Promise<TemplateResponse>;
|
|
100
|
-
updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;
|
|
101
|
-
getTemplates(params: TemplateGetParams): Promise<ResponsePagination<TemplateResponse>>;
|
|
102
|
-
createTemplate(template: TemplateRequestBody): Promise<TemplateResponse>;
|
|
103
|
-
deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { type ComponentTypes, type CopyCodeButton, type FlowButton, type MPMButton, type OTPButton, type PhoneNumberButton, type QuickReplyButton, type SPMButton, type TemplateBody, type TemplateButton, TemplateClass, type TemplateDeleteParams, type TemplateFooter, type TemplateFormat, type TemplateGetParams, type TemplateHeader, type TemplateHeaderExample, type TemplateRequestBody, type TemplateResponse, type URLButton };
|
package/dist/types/template.d.ts
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { L as LanguagesEnum, C as CategoryEnum, T as TemplateStatusEnum } from '../enums-CI7vzKhn.js';
|
|
2
|
-
import { GeneralRequestBody, ResponseSuccess, ResponsePagination } from './request.js';
|
|
3
|
-
|
|
4
|
-
type TemplateFormat = 'TEXT' | 'IMAGE' | 'VIDEO' | 'DOCUMENT' | 'LOCATION';
|
|
5
|
-
type PhoneNumberButton = {
|
|
6
|
-
type: 'PHONE_NUMBER';
|
|
7
|
-
text: string;
|
|
8
|
-
phone_number: string;
|
|
9
|
-
};
|
|
10
|
-
type URLButton = {
|
|
11
|
-
type: 'URL';
|
|
12
|
-
text: string;
|
|
13
|
-
url: string;
|
|
14
|
-
example?: string[];
|
|
15
|
-
};
|
|
16
|
-
type QuickReplyButton = {
|
|
17
|
-
type: 'QUICK_REPLY';
|
|
18
|
-
text: string;
|
|
19
|
-
};
|
|
20
|
-
type CopyCodeButton = {
|
|
21
|
-
type: 'COPY_CODE';
|
|
22
|
-
example: string;
|
|
23
|
-
};
|
|
24
|
-
type FlowButton = {
|
|
25
|
-
type: 'FLOW';
|
|
26
|
-
text: string;
|
|
27
|
-
flow_id?: string;
|
|
28
|
-
flow_name?: string;
|
|
29
|
-
flow_json?: string;
|
|
30
|
-
flow_action?: 'navigate' | 'data_exchange';
|
|
31
|
-
navigate_screen?: string;
|
|
32
|
-
};
|
|
33
|
-
type MPMButton = {
|
|
34
|
-
type: 'MPM';
|
|
35
|
-
};
|
|
36
|
-
type OTPButton = {
|
|
37
|
-
type: 'OTP';
|
|
38
|
-
};
|
|
39
|
-
type SPMButton = {
|
|
40
|
-
type: 'SPM';
|
|
41
|
-
};
|
|
42
|
-
type TemplateButton = PhoneNumberButton | URLButton | QuickReplyButton | CopyCodeButton | FlowButton | MPMButton | OTPButton | SPMButton;
|
|
43
|
-
type TemplateHeaderExample = {
|
|
44
|
-
header_text?: string[];
|
|
45
|
-
header_text_named_params?: Array<{
|
|
46
|
-
param_name: string;
|
|
47
|
-
example: string;
|
|
48
|
-
}>;
|
|
49
|
-
header_handle?: string[];
|
|
50
|
-
};
|
|
51
|
-
type TemplateHeader = {
|
|
52
|
-
type: 'HEADER';
|
|
53
|
-
format: TemplateFormat;
|
|
54
|
-
text?: string;
|
|
55
|
-
example?: TemplateHeaderExample;
|
|
56
|
-
};
|
|
57
|
-
type TemplateBody = {
|
|
58
|
-
type: 'BODY';
|
|
59
|
-
text: string;
|
|
60
|
-
example?: {
|
|
61
|
-
body_text?: Array<Array<string>>;
|
|
62
|
-
body_text_named_params?: Array<{
|
|
63
|
-
param_name: string;
|
|
64
|
-
example: string;
|
|
65
|
-
}>;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
type TemplateFooter = {
|
|
69
|
-
type: 'FOOTER';
|
|
70
|
-
text: string;
|
|
71
|
-
};
|
|
72
|
-
type ComponentTypes = TemplateHeader | TemplateBody | TemplateFooter | TemplateButton;
|
|
73
|
-
type TemplateRequestBody = GeneralRequestBody & {
|
|
74
|
-
name: string;
|
|
75
|
-
language: LanguagesEnum;
|
|
76
|
-
category?: CategoryEnum;
|
|
77
|
-
components?: ComponentTypes[];
|
|
78
|
-
};
|
|
79
|
-
type TemplateResponse = {
|
|
80
|
-
id: string;
|
|
81
|
-
status: string;
|
|
82
|
-
language: LanguagesEnum;
|
|
83
|
-
category: CategoryEnum;
|
|
84
|
-
name: string;
|
|
85
|
-
components: ComponentTypes[];
|
|
86
|
-
};
|
|
87
|
-
type TemplateGetParams = {
|
|
88
|
-
limit?: number;
|
|
89
|
-
name?: string;
|
|
90
|
-
language?: LanguagesEnum;
|
|
91
|
-
category?: CategoryEnum;
|
|
92
|
-
status?: TemplateStatusEnum;
|
|
93
|
-
};
|
|
94
|
-
type TemplateDeleteParams = {
|
|
95
|
-
hsm_id: string;
|
|
96
|
-
name: string;
|
|
97
|
-
};
|
|
98
|
-
declare class TemplateClass {
|
|
99
|
-
getTemplate(templateId: string): Promise<TemplateResponse>;
|
|
100
|
-
updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;
|
|
101
|
-
getTemplates(params: TemplateGetParams): Promise<ResponsePagination<TemplateResponse>>;
|
|
102
|
-
createTemplate(template: TemplateRequestBody): Promise<TemplateResponse>;
|
|
103
|
-
deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export { type ComponentTypes, type CopyCodeButton, type FlowButton, type MPMButton, type OTPButton, type PhoneNumberButton, type QuickReplyButton, type SPMButton, type TemplateBody, type TemplateButton, TemplateClass, type TemplateDeleteParams, type TemplateFooter, type TemplateFormat, type TemplateGetParams, type TemplateHeader, type TemplateHeaderExample, type TemplateRequestBody, type TemplateResponse, type URLButton };
|
package/dist/types/template.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var l=(t,e,r,p)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of s(e))!m.call(t,a)&&a!==r&&n(t,a,{get:()=>e[a],enumerable:!(p=o(e,a))||p.enumerable});return t};var g=t=>l(n({},"__esModule",{value:!0}),t);var y={};module.exports=g(y);
|
|
2
|
-
//# sourceMappingURL=template.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/template.ts"],"sourcesContent":["import { CategoryEnum, LanguagesEnum, TemplateStatusEnum } from './enums';\nimport { GeneralRequestBody, ResponsePagination, ResponseSuccess } from './request';\n\nexport type TemplateFormat = 'TEXT' | 'IMAGE' | 'VIDEO' | 'DOCUMENT' | 'LOCATION';\n\nexport type PhoneNumberButton = {\n type: 'PHONE_NUMBER';\n text: string; // max 25 chars\n phone_number: string; // max 20 chars\n};\n\nexport type URLButton = {\n type: 'URL';\n text: string; // max 25 chars\n url: string; // max 2000 chars\n example?: string[]; // Required if url contains variable\n};\n\nexport type QuickReplyButton = {\n type: 'QUICK_REPLY';\n text: string; // max 25 chars\n};\n\nexport type CopyCodeButton = {\n type: 'COPY_CODE';\n example: string; // max 15 chars\n};\n\nexport type FlowButton = {\n type: 'FLOW';\n text: string; // max 25 chars\n flow_id?: string;\n flow_name?: string;\n flow_json?: string;\n flow_action?: 'navigate' | 'data_exchange';\n navigate_screen?: string;\n};\n\nexport type MPMButton = {\n type: 'MPM';\n};\n\nexport type OTPButton = {\n type: 'OTP';\n};\n\nexport type SPMButton = {\n type: 'SPM';\n};\n\nexport type TemplateButton =\n | PhoneNumberButton\n | URLButton\n | QuickReplyButton\n | CopyCodeButton\n | FlowButton\n | MPMButton\n | OTPButton\n | SPMButton;\n\nexport type TemplateHeaderExample = {\n header_text?: string[];\n header_text_named_params?: Array<{\n param_name: string;\n example: string;\n }>;\n header_handle?: string[];\n};\n\nexport type TemplateHeader = {\n type: 'HEADER';\n format: TemplateFormat;\n text?: string; // max 60 chars\n example?: TemplateHeaderExample;\n};\n\nexport type TemplateBody = {\n type: 'BODY';\n text: string; // max 1024 chars\n example?: {\n body_text?: Array<Array<string>>; // For positional parameters\n body_text_named_params?: Array<{\n param_name: string; // lowercase letters and underscores only\n example: string;\n }>; // For named parameters\n };\n};\n\nexport type TemplateFooter = {\n type: 'FOOTER';\n text: string; // max 60 chars\n};\n\nexport type ComponentTypes = TemplateHeader | TemplateBody | TemplateFooter | TemplateButton;\n\nexport type TemplateRequestBody = GeneralRequestBody & {\n name: string;\n language: LanguagesEnum;\n category?: CategoryEnum;\n components?: ComponentTypes[];\n};\n\nexport type TemplateResponse = {\n id: string;\n status: string;\n language: LanguagesEnum;\n category: CategoryEnum;\n name: string;\n components: ComponentTypes[];\n};\n\nexport type TemplateGetParams = {\n limit?: number;\n name?: string;\n language?: LanguagesEnum;\n category?: CategoryEnum;\n status?: TemplateStatusEnum;\n};\n\nexport type TemplateDeleteParams = {\n hsm_id: string;\n name: string;\n};\n\nexport declare class TemplateClass {\n getTemplate(templateId: string): Promise<TemplateResponse>;\n updateTemplate(templateId: string, template: Partial<TemplateRequestBody>): Promise<ResponseSuccess>;\n getTemplates(params: TemplateGetParams): Promise<ResponsePagination<TemplateResponse>>;\n createTemplate(template: TemplateRequestBody): Promise<TemplateResponse>;\n deleteTemplate(params: TemplateDeleteParams): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["template_exports","__toCommonJS"]}
|
package/dist/types/template.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=template.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ResponseSuccess } from './request.mjs';
|
|
2
|
-
import '../enums-CI7vzKhn.mjs';
|
|
3
|
-
|
|
4
|
-
type TwoStepVerificationRequest = {
|
|
5
|
-
pin: string;
|
|
6
|
-
};
|
|
7
|
-
interface TwoStepVerificationClass {
|
|
8
|
-
setTwoStepVerificationCode(pin: string): Promise<ResponseSuccess>;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type { TwoStepVerificationClass, TwoStepVerificationRequest };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ResponseSuccess } from './request.js';
|
|
2
|
-
import '../enums-CI7vzKhn.js';
|
|
3
|
-
|
|
4
|
-
type TwoStepVerificationRequest = {
|
|
5
|
-
pin: string;
|
|
6
|
-
};
|
|
7
|
-
interface TwoStepVerificationClass {
|
|
8
|
-
setTwoStepVerificationCode(pin: string): Promise<ResponseSuccess>;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type { TwoStepVerificationClass, TwoStepVerificationRequest };
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var a=(i,e,p,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of n(e))!c.call(i,s)&&s!==p&&o(i,s,{get:()=>e[s],enumerable:!(t=r(e,s))||t.enumerable});return i};var f=i=>a(o({},"__esModule",{value:!0}),i);var S={};module.exports=f(S);
|
|
2
|
-
//# sourceMappingURL=twoStepVerification.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/twoStepVerification.ts"],"sourcesContent":["import { ResponseSuccess } from './request';\n\nexport type TwoStepVerificationRequest = {\n pin: string;\n};\n\nexport interface TwoStepVerificationClass {\n setTwoStepVerificationCode(pin: string): Promise<ResponseSuccess>;\n}\n"],"mappings":"+WAAA,IAAAA,EAAA,kBAAAC,EAAAD","names":["twoStepVerification_exports","__toCommonJS"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=twoStepVerification.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|