meta-cloud-api 0.2.12 → 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
package/dist/types/waba.d.mts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ResponseSuccess } from './request.mjs';
|
|
2
|
-
import '../enums-CI7vzKhn.mjs';
|
|
3
|
-
|
|
4
|
-
type WabaSubscription = {
|
|
5
|
-
whatsapp_business_api_data: {
|
|
6
|
-
id: string;
|
|
7
|
-
link: string;
|
|
8
|
-
name: string;
|
|
9
|
-
category: string;
|
|
10
|
-
};
|
|
11
|
-
override_callback_uri?: string;
|
|
12
|
-
};
|
|
13
|
-
interface UpdateWabaSubscription {
|
|
14
|
-
override_callback_uri: string;
|
|
15
|
-
verify_token: string;
|
|
16
|
-
}
|
|
17
|
-
interface WabaSubscriptions {
|
|
18
|
-
data: Array<WabaSubscription>;
|
|
19
|
-
}
|
|
20
|
-
interface WABAClass {
|
|
21
|
-
getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;
|
|
22
|
-
getAllWabaSubscriptions(): Promise<WabaSubscriptions>;
|
|
23
|
-
updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;
|
|
24
|
-
unsubscribeFromWaba(): Promise<ResponseSuccess>;
|
|
25
|
-
}
|
|
26
|
-
declare enum WabaAccountReviewStatus {
|
|
27
|
-
Approved = "APPROVED",
|
|
28
|
-
Active = "ACTIVE",
|
|
29
|
-
Inactive = "INACTIVE",
|
|
30
|
-
Disabled = "DISABLED"
|
|
31
|
-
}
|
|
32
|
-
declare enum WabaHealthStatusCanSendMessage {
|
|
33
|
-
Blocked = "BLOCKED",
|
|
34
|
-
Limited = "LIMITED",
|
|
35
|
-
Available = "AVAILABLE"
|
|
36
|
-
}
|
|
37
|
-
declare enum WabaAccountStatus {
|
|
38
|
-
Approved = "APPROVED",
|
|
39
|
-
Active = "ACTIVE",
|
|
40
|
-
Inactive = "INACTIVE",
|
|
41
|
-
Disabled = "DISABLED"
|
|
42
|
-
}
|
|
43
|
-
declare enum WabaBusinessVerificationStatus {
|
|
44
|
-
Verified = "verified",
|
|
45
|
-
PendingSubmission = "pending_submission",
|
|
46
|
-
Unverified = "unverified",
|
|
47
|
-
Rejected = "rejected"
|
|
48
|
-
}
|
|
49
|
-
interface WabaHealthStatusError {
|
|
50
|
-
error_code?: number;
|
|
51
|
-
error_description?: string;
|
|
52
|
-
possible_solution?: string;
|
|
53
|
-
}
|
|
54
|
-
interface WabaHealthStatusEntity {
|
|
55
|
-
entity_type?: string;
|
|
56
|
-
id?: string;
|
|
57
|
-
can_send_message?: string;
|
|
58
|
-
errors?: WabaHealthStatusError[];
|
|
59
|
-
}
|
|
60
|
-
interface WabaHealthStatus {
|
|
61
|
-
can_send_message?: WabaHealthStatusCanSendMessage;
|
|
62
|
-
entities?: WabaHealthStatusEntity[];
|
|
63
|
-
}
|
|
64
|
-
interface WabaAccount {
|
|
65
|
-
account_review_status?: WabaAccountReviewStatus;
|
|
66
|
-
id?: string;
|
|
67
|
-
health_status?: WabaHealthStatus;
|
|
68
|
-
status?: WabaAccountStatus;
|
|
69
|
-
business_verification_status?: WabaBusinessVerificationStatus;
|
|
70
|
-
message_template_namespace?: string;
|
|
71
|
-
name?: string;
|
|
72
|
-
ownership_type?: string;
|
|
73
|
-
currency?: string;
|
|
74
|
-
}
|
|
75
|
-
type WabaAccountFields = 'id' | 'name' | 'account_review_status' | 'auth_international_rate_eligibility' | 'business_verification_status' | 'country' | 'currency' | 'health_status' | 'status' | 'ownership_type' | 'message_template_namespace';
|
|
76
|
-
type WabaAccountFieldsParam = WabaAccountFields[];
|
|
77
|
-
|
|
78
|
-
export { type UpdateWabaSubscription, type WABAClass, type WabaAccount, type WabaAccountFields, type WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, type WabaHealthStatus, WabaHealthStatusCanSendMessage, type WabaHealthStatusEntity, type WabaHealthStatusError, type WabaSubscription, type WabaSubscriptions };
|
package/dist/types/waba.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ResponseSuccess } from './request.js';
|
|
2
|
-
import '../enums-CI7vzKhn.js';
|
|
3
|
-
|
|
4
|
-
type WabaSubscription = {
|
|
5
|
-
whatsapp_business_api_data: {
|
|
6
|
-
id: string;
|
|
7
|
-
link: string;
|
|
8
|
-
name: string;
|
|
9
|
-
category: string;
|
|
10
|
-
};
|
|
11
|
-
override_callback_uri?: string;
|
|
12
|
-
};
|
|
13
|
-
interface UpdateWabaSubscription {
|
|
14
|
-
override_callback_uri: string;
|
|
15
|
-
verify_token: string;
|
|
16
|
-
}
|
|
17
|
-
interface WabaSubscriptions {
|
|
18
|
-
data: Array<WabaSubscription>;
|
|
19
|
-
}
|
|
20
|
-
interface WABAClass {
|
|
21
|
-
getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;
|
|
22
|
-
getAllWabaSubscriptions(): Promise<WabaSubscriptions>;
|
|
23
|
-
updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;
|
|
24
|
-
unsubscribeFromWaba(): Promise<ResponseSuccess>;
|
|
25
|
-
}
|
|
26
|
-
declare enum WabaAccountReviewStatus {
|
|
27
|
-
Approved = "APPROVED",
|
|
28
|
-
Active = "ACTIVE",
|
|
29
|
-
Inactive = "INACTIVE",
|
|
30
|
-
Disabled = "DISABLED"
|
|
31
|
-
}
|
|
32
|
-
declare enum WabaHealthStatusCanSendMessage {
|
|
33
|
-
Blocked = "BLOCKED",
|
|
34
|
-
Limited = "LIMITED",
|
|
35
|
-
Available = "AVAILABLE"
|
|
36
|
-
}
|
|
37
|
-
declare enum WabaAccountStatus {
|
|
38
|
-
Approved = "APPROVED",
|
|
39
|
-
Active = "ACTIVE",
|
|
40
|
-
Inactive = "INACTIVE",
|
|
41
|
-
Disabled = "DISABLED"
|
|
42
|
-
}
|
|
43
|
-
declare enum WabaBusinessVerificationStatus {
|
|
44
|
-
Verified = "verified",
|
|
45
|
-
PendingSubmission = "pending_submission",
|
|
46
|
-
Unverified = "unverified",
|
|
47
|
-
Rejected = "rejected"
|
|
48
|
-
}
|
|
49
|
-
interface WabaHealthStatusError {
|
|
50
|
-
error_code?: number;
|
|
51
|
-
error_description?: string;
|
|
52
|
-
possible_solution?: string;
|
|
53
|
-
}
|
|
54
|
-
interface WabaHealthStatusEntity {
|
|
55
|
-
entity_type?: string;
|
|
56
|
-
id?: string;
|
|
57
|
-
can_send_message?: string;
|
|
58
|
-
errors?: WabaHealthStatusError[];
|
|
59
|
-
}
|
|
60
|
-
interface WabaHealthStatus {
|
|
61
|
-
can_send_message?: WabaHealthStatusCanSendMessage;
|
|
62
|
-
entities?: WabaHealthStatusEntity[];
|
|
63
|
-
}
|
|
64
|
-
interface WabaAccount {
|
|
65
|
-
account_review_status?: WabaAccountReviewStatus;
|
|
66
|
-
id?: string;
|
|
67
|
-
health_status?: WabaHealthStatus;
|
|
68
|
-
status?: WabaAccountStatus;
|
|
69
|
-
business_verification_status?: WabaBusinessVerificationStatus;
|
|
70
|
-
message_template_namespace?: string;
|
|
71
|
-
name?: string;
|
|
72
|
-
ownership_type?: string;
|
|
73
|
-
currency?: string;
|
|
74
|
-
}
|
|
75
|
-
type WabaAccountFields = 'id' | 'name' | 'account_review_status' | 'auth_international_rate_eligibility' | 'business_verification_status' | 'country' | 'currency' | 'health_status' | 'status' | 'ownership_type' | 'message_template_namespace';
|
|
76
|
-
type WabaAccountFieldsParam = WabaAccountFields[];
|
|
77
|
-
|
|
78
|
-
export { type UpdateWabaSubscription, type WABAClass, type WabaAccount, type WabaAccountFields, type WabaAccountFieldsParam, WabaAccountReviewStatus, WabaAccountStatus, WabaBusinessVerificationStatus, type WabaHealthStatus, WabaHealthStatusCanSendMessage, type WabaHealthStatusEntity, type WabaHealthStatusError, type WabaSubscription, type WabaSubscriptions };
|
package/dist/types/waba.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var _=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var d=(r,t)=>{for(var s in t)a(r,s,{get:t[s],enumerable:!0})},l=(r,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of _(t))!b.call(r,e)&&e!==s&&a(r,e,{get:()=>t[e],enumerable:!(i=u(t,e))||i.enumerable});return r};var m=r=>l(a({},"__esModule",{value:!0}),r);var g={};d(g,{WabaAccountReviewStatus:()=>n,WabaAccountStatus:()=>p,WabaBusinessVerificationStatus:()=>c,WabaHealthStatusCanSendMessage:()=>o});module.exports=m(g);var n=(e=>(e.Approved="APPROVED",e.Active="ACTIVE",e.Inactive="INACTIVE",e.Disabled="DISABLED",e))(n||{}),o=(i=>(i.Blocked="BLOCKED",i.Limited="LIMITED",i.Available="AVAILABLE",i))(o||{}),p=(e=>(e.Approved="APPROVED",e.Active="ACTIVE",e.Inactive="INACTIVE",e.Disabled="DISABLED",e))(p||{}),c=(e=>(e.Verified="verified",e.PendingSubmission="pending_submission",e.Unverified="unverified",e.Rejected="rejected",e))(c||{});0&&(module.exports={WabaAccountReviewStatus,WabaAccountStatus,WabaBusinessVerificationStatus,WabaHealthStatusCanSendMessage});
|
|
2
|
-
//# sourceMappingURL=waba.js.map
|
package/dist/types/waba.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/waba.ts"],"sourcesContent":["import type { ResponseSuccess } from './request';\n\nexport type WabaSubscription = {\n whatsapp_business_api_data: {\n id: string;\n link: string;\n name: string;\n category: string;\n };\n override_callback_uri?: string;\n};\n\nexport interface UpdateWabaSubscription {\n override_callback_uri: string;\n verify_token: string;\n}\n\nexport interface WabaSubscriptions {\n data: Array<WabaSubscription>;\n}\n\nexport interface WABAClass {\n getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;\n getAllWabaSubscriptions(): Promise<WabaSubscriptions>;\n updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;\n unsubscribeFromWaba(): Promise<ResponseSuccess>;\n}\n\nexport enum WabaAccountReviewStatus {\n Approved = 'APPROVED',\n Active = 'ACTIVE',\n Inactive = 'INACTIVE',\n Disabled = 'DISABLED',\n}\n\nexport enum WabaHealthStatusCanSendMessage {\n Blocked = 'BLOCKED',\n Limited = 'LIMITED',\n Available = 'AVAILABLE',\n}\n\nexport enum WabaAccountStatus {\n Approved = 'APPROVED',\n Active = 'ACTIVE',\n Inactive = 'INACTIVE',\n Disabled = 'DISABLED',\n}\n\nexport enum WabaBusinessVerificationStatus {\n Verified = 'verified',\n PendingSubmission = 'pending_submission',\n Unverified = 'unverified',\n Rejected = 'rejected',\n}\n\nexport interface WabaHealthStatusError {\n error_code?: number;\n error_description?: string;\n possible_solution?: string;\n}\n\nexport interface WabaHealthStatusEntity {\n entity_type?: string;\n id?: string;\n can_send_message?: string;\n errors?: WabaHealthStatusError[];\n}\n\nexport interface WabaHealthStatus {\n can_send_message?: WabaHealthStatusCanSendMessage;\n entities?: WabaHealthStatusEntity[];\n}\n\nexport interface WabaAccount {\n account_review_status?: WabaAccountReviewStatus;\n id?: string;\n health_status?: WabaHealthStatus;\n status?: WabaAccountStatus;\n business_verification_status?: WabaBusinessVerificationStatus;\n message_template_namespace?: string;\n name?: string;\n ownership_type?: string;\n currency?: string;\n}\n\nexport type WabaAccountFields =\n | 'id'\n | 'name'\n | 'account_review_status'\n | 'auth_international_rate_eligibility'\n | 'business_verification_status'\n | 'country'\n | 'currency'\n | 'health_status'\n | 'status'\n | 'ownership_type'\n | 'message_template_namespace';\n\nexport type WabaAccountFieldsParam = WabaAccountFields[];\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,6BAAAE,EAAA,sBAAAC,EAAA,mCAAAC,EAAA,mCAAAC,IAAA,eAAAC,EAAAN,GA4BO,IAAKE,OACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WAJHA,OAAA,IAOAG,OACRA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YAHJA,OAAA,IAMAF,OACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WAJHA,OAAA,IAOAC,OACRA,EAAA,SAAW,WACXA,EAAA,kBAAoB,qBACpBA,EAAA,WAAa,aACbA,EAAA,SAAW,WAJHA,OAAA","names":["waba_exports","__export","WabaAccountReviewStatus","WabaAccountStatus","WabaBusinessVerificationStatus","WabaHealthStatusCanSendMessage","__toCommonJS"]}
|
package/dist/types/waba.mjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var r=(e=>(e.Approved="APPROVED",e.Active="ACTIVE",e.Inactive="INACTIVE",e.Disabled="DISABLED",e))(r||{}),i=(t=>(t.Blocked="BLOCKED",t.Limited="LIMITED",t.Available="AVAILABLE",t))(i||{}),s=(e=>(e.Approved="APPROVED",e.Active="ACTIVE",e.Inactive="INACTIVE",e.Disabled="DISABLED",e))(s||{}),a=(e=>(e.Verified="verified",e.PendingSubmission="pending_submission",e.Unverified="unverified",e.Rejected="rejected",e))(a||{});export{r as WabaAccountReviewStatus,s as WabaAccountStatus,a as WabaBusinessVerificationStatus,i as WabaHealthStatusCanSendMessage};
|
|
2
|
-
//# sourceMappingURL=waba.mjs.map
|
package/dist/types/waba.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/waba.ts"],"sourcesContent":["import type { ResponseSuccess } from './request';\n\nexport type WabaSubscription = {\n whatsapp_business_api_data: {\n id: string;\n link: string;\n name: string;\n category: string;\n };\n override_callback_uri?: string;\n};\n\nexport interface UpdateWabaSubscription {\n override_callback_uri: string;\n verify_token: string;\n}\n\nexport interface WabaSubscriptions {\n data: Array<WabaSubscription>;\n}\n\nexport interface WABAClass {\n getWabaAccount(fields?: WabaAccountFieldsParam): Promise<WabaAccount>;\n getAllWabaSubscriptions(): Promise<WabaSubscriptions>;\n updateWabaSubscription(params: UpdateWabaSubscription): Promise<ResponseSuccess>;\n unsubscribeFromWaba(): Promise<ResponseSuccess>;\n}\n\nexport enum WabaAccountReviewStatus {\n Approved = 'APPROVED',\n Active = 'ACTIVE',\n Inactive = 'INACTIVE',\n Disabled = 'DISABLED',\n}\n\nexport enum WabaHealthStatusCanSendMessage {\n Blocked = 'BLOCKED',\n Limited = 'LIMITED',\n Available = 'AVAILABLE',\n}\n\nexport enum WabaAccountStatus {\n Approved = 'APPROVED',\n Active = 'ACTIVE',\n Inactive = 'INACTIVE',\n Disabled = 'DISABLED',\n}\n\nexport enum WabaBusinessVerificationStatus {\n Verified = 'verified',\n PendingSubmission = 'pending_submission',\n Unverified = 'unverified',\n Rejected = 'rejected',\n}\n\nexport interface WabaHealthStatusError {\n error_code?: number;\n error_description?: string;\n possible_solution?: string;\n}\n\nexport interface WabaHealthStatusEntity {\n entity_type?: string;\n id?: string;\n can_send_message?: string;\n errors?: WabaHealthStatusError[];\n}\n\nexport interface WabaHealthStatus {\n can_send_message?: WabaHealthStatusCanSendMessage;\n entities?: WabaHealthStatusEntity[];\n}\n\nexport interface WabaAccount {\n account_review_status?: WabaAccountReviewStatus;\n id?: string;\n health_status?: WabaHealthStatus;\n status?: WabaAccountStatus;\n business_verification_status?: WabaBusinessVerificationStatus;\n message_template_namespace?: string;\n name?: string;\n ownership_type?: string;\n currency?: string;\n}\n\nexport type WabaAccountFields =\n | 'id'\n | 'name'\n | 'account_review_status'\n | 'auth_international_rate_eligibility'\n | 'business_verification_status'\n | 'country'\n | 'currency'\n | 'health_status'\n | 'status'\n | 'ownership_type'\n | 'message_template_namespace';\n\nexport type WabaAccountFieldsParam = WabaAccountFields[];\n"],"mappings":"AA4BO,IAAKA,OACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WAJHA,OAAA,IAOAC,OACRA,EAAA,QAAU,UACVA,EAAA,QAAU,UACVA,EAAA,UAAY,YAHJA,OAAA,IAMAC,OACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,SAAW,WAJHA,OAAA,IAOAC,OACRA,EAAA,SAAW,WACXA,EAAA,kBAAoB,qBACpBA,EAAA,WAAa,aACbA,EAAA,SAAW,WAJHA,OAAA","names":["WabaAccountReviewStatus","WabaHealthStatusCanSendMessage","WabaAccountStatus","WabaBusinessVerificationStatus"]}
|
package/dist/types/webhook.d.mts
DELETED
|
@@ -1,486 +0,0 @@
|
|
|
1
|
-
import { M as MessageTypesEnum } from '../enums-CI7vzKhn.mjs';
|
|
2
|
-
|
|
3
|
-
interface WebhookContact {
|
|
4
|
-
/**
|
|
5
|
-
* WhatsApp ID of the contact. Business can respond to this contact using this ID.
|
|
6
|
-
*/
|
|
7
|
-
wa_id: string;
|
|
8
|
-
/**
|
|
9
|
-
* Additional unique, alphanumeric identifier for a WhatsApp user
|
|
10
|
-
*/
|
|
11
|
-
user_id?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Profile of Whatsapp user
|
|
14
|
-
*/
|
|
15
|
-
profile: {
|
|
16
|
-
/**
|
|
17
|
-
* The display name of the contact
|
|
18
|
-
*/
|
|
19
|
-
name: string;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Represents a message received through the webhook
|
|
24
|
-
* Based on Meta's documentation: https://developers.facebook.com/docs/whatsapp/cloud-api/webhooks/components#messages-object
|
|
25
|
-
*/
|
|
26
|
-
interface WebhookMessage {
|
|
27
|
-
/**
|
|
28
|
-
* The message ID
|
|
29
|
-
*/
|
|
30
|
-
id: string;
|
|
31
|
-
/**
|
|
32
|
-
* The sender's phone number
|
|
33
|
-
*/
|
|
34
|
-
from: string;
|
|
35
|
-
/**
|
|
36
|
-
* The timestamp of the message
|
|
37
|
-
*/
|
|
38
|
-
timestamp: string;
|
|
39
|
-
/**
|
|
40
|
-
* The type of message (text, image, etc.)
|
|
41
|
-
*/
|
|
42
|
-
type: MessageTypesEnum;
|
|
43
|
-
/**
|
|
44
|
-
* The phone number ID that received the message
|
|
45
|
-
*/
|
|
46
|
-
phoneNumberId: string;
|
|
47
|
-
/**
|
|
48
|
-
* The display phone number that received the message
|
|
49
|
-
*/
|
|
50
|
-
displayPhoneNumber: string;
|
|
51
|
-
/**
|
|
52
|
-
* The profile name of the sender
|
|
53
|
-
*/
|
|
54
|
-
profileName: string;
|
|
55
|
-
/**
|
|
56
|
-
* Text object for text messages
|
|
57
|
-
*/
|
|
58
|
-
text?: {
|
|
59
|
-
/**
|
|
60
|
-
* The text content of the message
|
|
61
|
-
*/
|
|
62
|
-
body: string;
|
|
63
|
-
};
|
|
64
|
-
/**
|
|
65
|
-
* Image object for image messages
|
|
66
|
-
*/
|
|
67
|
-
image?: {
|
|
68
|
-
/**
|
|
69
|
-
* The image caption (if provided)
|
|
70
|
-
*/
|
|
71
|
-
caption?: string;
|
|
72
|
-
/**
|
|
73
|
-
* The SHA256 hash of the image
|
|
74
|
-
*/
|
|
75
|
-
sha256?: string;
|
|
76
|
-
/**
|
|
77
|
-
* The ID for the image
|
|
78
|
-
*/
|
|
79
|
-
id: string;
|
|
80
|
-
/**
|
|
81
|
-
* The MIME type of the image
|
|
82
|
-
*/
|
|
83
|
-
mime_type: string;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Video object for video messages
|
|
87
|
-
*/
|
|
88
|
-
video?: {
|
|
89
|
-
/**
|
|
90
|
-
* The video caption (if provided)
|
|
91
|
-
*/
|
|
92
|
-
caption?: string;
|
|
93
|
-
/**
|
|
94
|
-
* The SHA256 hash of the video
|
|
95
|
-
*/
|
|
96
|
-
sha256?: string;
|
|
97
|
-
/**
|
|
98
|
-
* The ID for the video
|
|
99
|
-
*/
|
|
100
|
-
id: string;
|
|
101
|
-
/**
|
|
102
|
-
* The MIME type of the video
|
|
103
|
-
*/
|
|
104
|
-
mime_type: string;
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Audio object for audio messages
|
|
108
|
-
*/
|
|
109
|
-
audio?: {
|
|
110
|
-
/**
|
|
111
|
-
* The ID for the audio file
|
|
112
|
-
*/
|
|
113
|
-
id: string;
|
|
114
|
-
/**
|
|
115
|
-
* The MIME type of the audio file
|
|
116
|
-
*/
|
|
117
|
-
mime_type: string;
|
|
118
|
-
/**
|
|
119
|
-
* Whether the audio is a voice message
|
|
120
|
-
*/
|
|
121
|
-
voice?: boolean;
|
|
122
|
-
};
|
|
123
|
-
/**
|
|
124
|
-
* Document object for document messages
|
|
125
|
-
*/
|
|
126
|
-
document?: {
|
|
127
|
-
/**
|
|
128
|
-
* The document caption (if provided)
|
|
129
|
-
*/
|
|
130
|
-
caption?: string;
|
|
131
|
-
/**
|
|
132
|
-
* The document filename
|
|
133
|
-
*/
|
|
134
|
-
filename: string;
|
|
135
|
-
/**
|
|
136
|
-
* The SHA256 hash of the document
|
|
137
|
-
*/
|
|
138
|
-
sha256?: string;
|
|
139
|
-
/**
|
|
140
|
-
* The ID for the document
|
|
141
|
-
*/
|
|
142
|
-
id: string;
|
|
143
|
-
/**
|
|
144
|
-
* The MIME type of the document
|
|
145
|
-
*/
|
|
146
|
-
mime_type: string;
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Sticker object for sticker messages
|
|
150
|
-
*/
|
|
151
|
-
sticker?: {
|
|
152
|
-
/**
|
|
153
|
-
* The ID for the sticker
|
|
154
|
-
*/
|
|
155
|
-
id: string;
|
|
156
|
-
/**
|
|
157
|
-
* Whether this is an animated sticker
|
|
158
|
-
*/
|
|
159
|
-
animated: boolean;
|
|
160
|
-
/**
|
|
161
|
-
* The MIME type of the sticker
|
|
162
|
-
*/
|
|
163
|
-
mime_type: string;
|
|
164
|
-
};
|
|
165
|
-
/**
|
|
166
|
-
* Reaction object for reaction messages
|
|
167
|
-
*/
|
|
168
|
-
reaction?: {
|
|
169
|
-
/**
|
|
170
|
-
* The ID of the message being reacted to
|
|
171
|
-
*/
|
|
172
|
-
message_id: string;
|
|
173
|
-
/**
|
|
174
|
-
* Emoji used for the reaction
|
|
175
|
-
*/
|
|
176
|
-
emoji: string;
|
|
177
|
-
};
|
|
178
|
-
/**
|
|
179
|
-
* Contacts object for contact messages
|
|
180
|
-
*/
|
|
181
|
-
contacts?: Array<{
|
|
182
|
-
/**
|
|
183
|
-
* The contact's name
|
|
184
|
-
*/
|
|
185
|
-
name: {
|
|
186
|
-
formatted_name: string;
|
|
187
|
-
first_name?: string;
|
|
188
|
-
last_name?: string;
|
|
189
|
-
middle_name?: string;
|
|
190
|
-
suffix?: string;
|
|
191
|
-
prefix?: string;
|
|
192
|
-
};
|
|
193
|
-
/**
|
|
194
|
-
* The contact's phone numbers
|
|
195
|
-
*/
|
|
196
|
-
phones?: Array<{
|
|
197
|
-
phone: string;
|
|
198
|
-
type?: string;
|
|
199
|
-
wa_id?: string;
|
|
200
|
-
}>;
|
|
201
|
-
/**
|
|
202
|
-
* The contact's emails
|
|
203
|
-
*/
|
|
204
|
-
emails?: Array<{
|
|
205
|
-
email: string;
|
|
206
|
-
type?: string;
|
|
207
|
-
}>;
|
|
208
|
-
/**
|
|
209
|
-
* The contact's addresses
|
|
210
|
-
*/
|
|
211
|
-
addresses?: Array<{
|
|
212
|
-
street?: string;
|
|
213
|
-
city?: string;
|
|
214
|
-
state?: string;
|
|
215
|
-
zip?: string;
|
|
216
|
-
country?: string;
|
|
217
|
-
country_code?: string;
|
|
218
|
-
type?: string;
|
|
219
|
-
}>;
|
|
220
|
-
/**
|
|
221
|
-
* The contact's organizations
|
|
222
|
-
*/
|
|
223
|
-
org?: {
|
|
224
|
-
company?: string;
|
|
225
|
-
department?: string;
|
|
226
|
-
title?: string;
|
|
227
|
-
};
|
|
228
|
-
/**
|
|
229
|
-
* The contact's URLs
|
|
230
|
-
*/
|
|
231
|
-
urls?: Array<{
|
|
232
|
-
url: string;
|
|
233
|
-
type?: string;
|
|
234
|
-
}>;
|
|
235
|
-
/**
|
|
236
|
-
* The contact's birthday (YYYY-MM-DD format)
|
|
237
|
-
*/
|
|
238
|
-
birthday?: string;
|
|
239
|
-
}>;
|
|
240
|
-
/**
|
|
241
|
-
* Location object for location messages
|
|
242
|
-
*/
|
|
243
|
-
location?: {
|
|
244
|
-
/**
|
|
245
|
-
* Latitude of the location
|
|
246
|
-
*/
|
|
247
|
-
latitude: number;
|
|
248
|
-
/**
|
|
249
|
-
* Longitude of the location
|
|
250
|
-
*/
|
|
251
|
-
longitude: number;
|
|
252
|
-
/**
|
|
253
|
-
* Name of the location
|
|
254
|
-
*/
|
|
255
|
-
name?: string;
|
|
256
|
-
/**
|
|
257
|
-
* Address of the location
|
|
258
|
-
*/
|
|
259
|
-
address?: string;
|
|
260
|
-
};
|
|
261
|
-
/**
|
|
262
|
-
* Interactive object for interactive messages
|
|
263
|
-
*/
|
|
264
|
-
interactive?: {
|
|
265
|
-
/**
|
|
266
|
-
* Type of the interactive message
|
|
267
|
-
* Can be: button_reply, list_reply, flow, nfm_reply, etc.
|
|
268
|
-
*/
|
|
269
|
-
type: string;
|
|
270
|
-
/**
|
|
271
|
-
* ID for the button that was clicked
|
|
272
|
-
*/
|
|
273
|
-
button_reply?: {
|
|
274
|
-
id: string;
|
|
275
|
-
title: string;
|
|
276
|
-
};
|
|
277
|
-
/**
|
|
278
|
-
* ID for the list item that was selected
|
|
279
|
-
*/
|
|
280
|
-
list_reply?: {
|
|
281
|
-
id: string;
|
|
282
|
-
title: string;
|
|
283
|
-
description?: string;
|
|
284
|
-
};
|
|
285
|
-
/**
|
|
286
|
-
* NFM (No-Code Flow Message) reply data
|
|
287
|
-
*/
|
|
288
|
-
nfm_reply?: {
|
|
289
|
-
/**
|
|
290
|
-
* Response data in JSON format
|
|
291
|
-
*/
|
|
292
|
-
response_json: string;
|
|
293
|
-
/**
|
|
294
|
-
* Body text of the reply
|
|
295
|
-
*/
|
|
296
|
-
body: string;
|
|
297
|
-
/**
|
|
298
|
-
* Name of the flow
|
|
299
|
-
*/
|
|
300
|
-
name: string;
|
|
301
|
-
};
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* System object for system messages (like user phone number changes)
|
|
305
|
-
*/
|
|
306
|
-
system?: {
|
|
307
|
-
/**
|
|
308
|
-
* The type of system update
|
|
309
|
-
*/
|
|
310
|
-
type: string;
|
|
311
|
-
/**
|
|
312
|
-
* User's identity if the update is a customer identity change
|
|
313
|
-
*/
|
|
314
|
-
identity?: string;
|
|
315
|
-
/**
|
|
316
|
-
* Old and new phone numbers if the update is a phone number change
|
|
317
|
-
*/
|
|
318
|
-
customer?: {
|
|
319
|
-
/**
|
|
320
|
-
* The previous phone number
|
|
321
|
-
*/
|
|
322
|
-
previous_wa_id: string;
|
|
323
|
-
/**
|
|
324
|
-
* The new phone number
|
|
325
|
-
*/
|
|
326
|
-
wa_id: string;
|
|
327
|
-
};
|
|
328
|
-
};
|
|
329
|
-
/**
|
|
330
|
-
* Order object for order messages
|
|
331
|
-
*/
|
|
332
|
-
order?: {
|
|
333
|
-
/**
|
|
334
|
-
* Catalog ID
|
|
335
|
-
*/
|
|
336
|
-
catalog_id: string;
|
|
337
|
-
/**
|
|
338
|
-
* Product items in the order
|
|
339
|
-
*/
|
|
340
|
-
product_items: Array<{
|
|
341
|
-
/**
|
|
342
|
-
* Product ID
|
|
343
|
-
*/
|
|
344
|
-
product_retailer_id: string;
|
|
345
|
-
/**
|
|
346
|
-
* Quantity of the product
|
|
347
|
-
*/
|
|
348
|
-
quantity: number;
|
|
349
|
-
/**
|
|
350
|
-
* Item price
|
|
351
|
-
*/
|
|
352
|
-
item_price: number;
|
|
353
|
-
/**
|
|
354
|
-
* Currency code
|
|
355
|
-
*/
|
|
356
|
-
currency: string;
|
|
357
|
-
}>;
|
|
358
|
-
/**
|
|
359
|
-
* Text message included with the order
|
|
360
|
-
*/
|
|
361
|
-
text?: string;
|
|
362
|
-
};
|
|
363
|
-
/**
|
|
364
|
-
* Context object, included when a user replies or interacts
|
|
365
|
-
*/
|
|
366
|
-
context?: {
|
|
367
|
-
/**
|
|
368
|
-
* ID of the message
|
|
369
|
-
*/
|
|
370
|
-
id?: string;
|
|
371
|
-
/**
|
|
372
|
-
* ID of the sender
|
|
373
|
-
*/
|
|
374
|
-
from?: string;
|
|
375
|
-
/**
|
|
376
|
-
* ID of the message being replied to or interacted with
|
|
377
|
-
*/
|
|
378
|
-
message_id: string;
|
|
379
|
-
/**
|
|
380
|
-
* ID of the forwarded message, if applicable
|
|
381
|
-
*/
|
|
382
|
-
forwarded?: boolean;
|
|
383
|
-
/**
|
|
384
|
-
* Frequently forwarded status
|
|
385
|
-
*/
|
|
386
|
-
frequently_forwarded?: boolean;
|
|
387
|
-
/**
|
|
388
|
-
* Original message information if the message was referred
|
|
389
|
-
*/
|
|
390
|
-
referred_product?: {
|
|
391
|
-
/**
|
|
392
|
-
* Catalog ID
|
|
393
|
-
*/
|
|
394
|
-
catalog_id: string;
|
|
395
|
-
/**
|
|
396
|
-
* Product ID
|
|
397
|
-
*/
|
|
398
|
-
product_retailer_id: string;
|
|
399
|
-
};
|
|
400
|
-
};
|
|
401
|
-
/**
|
|
402
|
-
* Errors array, if the message had errors
|
|
403
|
-
*/
|
|
404
|
-
errors?: Array<{
|
|
405
|
-
/**
|
|
406
|
-
* Error code
|
|
407
|
-
*/
|
|
408
|
-
code: number;
|
|
409
|
-
/**
|
|
410
|
-
* Error title
|
|
411
|
-
*/
|
|
412
|
-
title: string;
|
|
413
|
-
/**
|
|
414
|
-
* Error message
|
|
415
|
-
*/
|
|
416
|
-
message: string;
|
|
417
|
-
/**
|
|
418
|
-
* Error details object
|
|
419
|
-
*/
|
|
420
|
-
error_data?: {
|
|
421
|
-
/**
|
|
422
|
-
* Describes the error details
|
|
423
|
-
*/
|
|
424
|
-
details: string;
|
|
425
|
-
};
|
|
426
|
-
}>;
|
|
427
|
-
/**
|
|
428
|
-
* Button object for button messages
|
|
429
|
-
*/
|
|
430
|
-
button?: {
|
|
431
|
-
/**
|
|
432
|
-
* The payload for the button
|
|
433
|
-
*/
|
|
434
|
-
payload: string;
|
|
435
|
-
/**
|
|
436
|
-
* Button text
|
|
437
|
-
*/
|
|
438
|
-
text: string;
|
|
439
|
-
};
|
|
440
|
-
/**
|
|
441
|
-
* The original message data as received from the webhook
|
|
442
|
-
*/
|
|
443
|
-
originalData: any;
|
|
444
|
-
}
|
|
445
|
-
/**
|
|
446
|
-
* Represents a non-message event received through the webhook
|
|
447
|
-
*/
|
|
448
|
-
interface WebhookEvent {
|
|
449
|
-
/**
|
|
450
|
-
* The field type of the event
|
|
451
|
-
*/
|
|
452
|
-
field: string;
|
|
453
|
-
/**
|
|
454
|
-
* The event data
|
|
455
|
-
*/
|
|
456
|
-
value: any;
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Handler function for processing messages
|
|
460
|
-
*/
|
|
461
|
-
type MessageHandler = (message: WebhookMessage) => void | Promise<void>;
|
|
462
|
-
/**
|
|
463
|
-
* Handler function for processing events
|
|
464
|
-
*/
|
|
465
|
-
type EventHandler = (event: WebhookEvent) => void | Promise<void>;
|
|
466
|
-
/**
|
|
467
|
-
* Statuses that can be received in status updates
|
|
468
|
-
*/
|
|
469
|
-
declare enum MessageStatus {
|
|
470
|
-
DELIVERED = "delivered",
|
|
471
|
-
READ = "read",
|
|
472
|
-
SENT = "sent"
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* Event fields that can be received through the webhook
|
|
476
|
-
*/
|
|
477
|
-
declare enum EventField {
|
|
478
|
-
MESSAGES = "messages",
|
|
479
|
-
STATUSES = "statuses",
|
|
480
|
-
MESSAGE_TEMPLATE_STATUS_UPDATE = "message_template_status_update",
|
|
481
|
-
PHONE_NUMBER_QUALITY_UPDATE = "phone_number_quality_update",
|
|
482
|
-
PHONE_NUMBER_NAME_UPDATE = "phone_number_name_update",
|
|
483
|
-
UNKNOWN = "unknown"
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
export { EventField, type EventHandler, type MessageHandler, MessageStatus, type WebhookContact, type WebhookEvent, type WebhookMessage };
|