@getlatedev/node 0.1.42 → 0.1.44
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 +45 -0
- package/dist/index.d.mts +1349 -5
- package/dist/index.d.ts +1349 -5
- package/dist/index.js +269 -0
- package/dist/index.mjs +269 -0
- package/package.json +1 -1
- package/src/client.ts +86 -0
- package/src/generated/sdk.gen.ts +470 -1
- package/src/generated/types.gen.ts +1413 -5
|
@@ -1333,9 +1333,13 @@ export type TranscriptSegment = {
|
|
|
1333
1333
|
|
|
1334
1334
|
export type TwitterPlatformData = {
|
|
1335
1335
|
/**
|
|
1336
|
-
*
|
|
1336
|
+
* ID of an existing tweet to reply to. The published tweet will appear as a reply in that tweet's thread. For threads, only the first tweet replies to the target; subsequent tweets chain normally.
|
|
1337
1337
|
*/
|
|
1338
|
-
|
|
1338
|
+
replyToTweetId?: string;
|
|
1339
|
+
/**
|
|
1340
|
+
* Controls who can reply to the tweet. "following" allows only people you follow, "mentionedUsers" allows only mentioned users, "subscribers" allows only subscribers, "verified" allows only verified users. Omit for default (everyone can reply). For threads, applies to the first tweet only. Cannot be combined with replyToTweetId.
|
|
1341
|
+
*/
|
|
1342
|
+
replySettings?: 'following' | 'mentionedUsers' | 'subscribers' | 'verified';
|
|
1339
1343
|
/**
|
|
1340
1344
|
* Sequence of tweets in a thread. First item is the root tweet.
|
|
1341
1345
|
*/
|
|
@@ -1346,9 +1350,9 @@ export type TwitterPlatformData = {
|
|
|
1346
1350
|
};
|
|
1347
1351
|
|
|
1348
1352
|
/**
|
|
1349
|
-
* Controls who can reply to the tweet. "following" allows only people you follow, "mentionedUsers" allows only mentioned users, "subscribers" allows only subscribers. Omit for default (everyone can reply). For threads, applies to the first tweet only.
|
|
1353
|
+
* Controls who can reply to the tweet. "following" allows only people you follow, "mentionedUsers" allows only mentioned users, "subscribers" allows only subscribers, "verified" allows only verified users. Omit for default (everyone can reply). For threads, applies to the first tweet only. Cannot be combined with replyToTweetId.
|
|
1350
1354
|
*/
|
|
1351
|
-
export type replySettings = 'following' | 'mentionedUsers' | 'subscribers';
|
|
1355
|
+
export type replySettings = 'following' | 'mentionedUsers' | 'subscribers' | 'verified';
|
|
1352
1356
|
|
|
1353
1357
|
export type UploadedFile = {
|
|
1354
1358
|
type?: 'image' | 'video' | 'document';
|
|
@@ -6790,4 +6794,1408 @@ export type DeleteInboxReviewReplyResponse = ({
|
|
|
6790
6794
|
|
|
6791
6795
|
export type DeleteInboxReviewReplyError = ({
|
|
6792
6796
|
error?: string;
|
|
6793
|
-
} | unknown);
|
|
6797
|
+
} | unknown);
|
|
6798
|
+
|
|
6799
|
+
export type SendWhatsAppBulkData = {
|
|
6800
|
+
body: {
|
|
6801
|
+
/**
|
|
6802
|
+
* WhatsApp social account ID
|
|
6803
|
+
*/
|
|
6804
|
+
accountId: string;
|
|
6805
|
+
/**
|
|
6806
|
+
* List of recipients (max 100)
|
|
6807
|
+
*/
|
|
6808
|
+
recipients: Array<{
|
|
6809
|
+
/**
|
|
6810
|
+
* Recipient phone number in E.164 format
|
|
6811
|
+
*/
|
|
6812
|
+
phone: string;
|
|
6813
|
+
/**
|
|
6814
|
+
* Per-recipient template variables keyed by index (e.g., "1", "2")
|
|
6815
|
+
*/
|
|
6816
|
+
variables?: {
|
|
6817
|
+
[key: string]: (string);
|
|
6818
|
+
};
|
|
6819
|
+
}>;
|
|
6820
|
+
template: {
|
|
6821
|
+
/**
|
|
6822
|
+
* Template name
|
|
6823
|
+
*/
|
|
6824
|
+
name: string;
|
|
6825
|
+
/**
|
|
6826
|
+
* Template language code
|
|
6827
|
+
*/
|
|
6828
|
+
language: string;
|
|
6829
|
+
/**
|
|
6830
|
+
* Base template components
|
|
6831
|
+
*/
|
|
6832
|
+
components?: Array<{
|
|
6833
|
+
[key: string]: unknown;
|
|
6834
|
+
}>;
|
|
6835
|
+
};
|
|
6836
|
+
};
|
|
6837
|
+
};
|
|
6838
|
+
|
|
6839
|
+
export type SendWhatsAppBulkResponse = ({
|
|
6840
|
+
success?: boolean;
|
|
6841
|
+
summary?: {
|
|
6842
|
+
total?: number;
|
|
6843
|
+
sent?: number;
|
|
6844
|
+
failed?: number;
|
|
6845
|
+
};
|
|
6846
|
+
results?: Array<{
|
|
6847
|
+
phone?: string;
|
|
6848
|
+
success?: boolean;
|
|
6849
|
+
messageId?: string;
|
|
6850
|
+
error?: string;
|
|
6851
|
+
}>;
|
|
6852
|
+
});
|
|
6853
|
+
|
|
6854
|
+
export type SendWhatsAppBulkError = (unknown | {
|
|
6855
|
+
error?: string;
|
|
6856
|
+
});
|
|
6857
|
+
|
|
6858
|
+
export type GetWhatsAppContactsData = {
|
|
6859
|
+
query: {
|
|
6860
|
+
/**
|
|
6861
|
+
* WhatsApp social account ID
|
|
6862
|
+
*/
|
|
6863
|
+
accountId: string;
|
|
6864
|
+
/**
|
|
6865
|
+
* Filter by group
|
|
6866
|
+
*/
|
|
6867
|
+
group?: string;
|
|
6868
|
+
/**
|
|
6869
|
+
* Maximum results (default 50)
|
|
6870
|
+
*/
|
|
6871
|
+
limit?: number;
|
|
6872
|
+
/**
|
|
6873
|
+
* Filter by opt-in status
|
|
6874
|
+
*/
|
|
6875
|
+
optedIn?: 'true' | 'false';
|
|
6876
|
+
/**
|
|
6877
|
+
* Search contacts by name, phone, email, or company
|
|
6878
|
+
*/
|
|
6879
|
+
search?: string;
|
|
6880
|
+
/**
|
|
6881
|
+
* Offset for pagination
|
|
6882
|
+
*/
|
|
6883
|
+
skip?: number;
|
|
6884
|
+
/**
|
|
6885
|
+
* Filter by tag
|
|
6886
|
+
*/
|
|
6887
|
+
tag?: string;
|
|
6888
|
+
};
|
|
6889
|
+
};
|
|
6890
|
+
|
|
6891
|
+
export type GetWhatsAppContactsResponse = ({
|
|
6892
|
+
success?: boolean;
|
|
6893
|
+
contacts?: Array<{
|
|
6894
|
+
id?: string;
|
|
6895
|
+
phone?: string;
|
|
6896
|
+
waId?: string;
|
|
6897
|
+
name?: string;
|
|
6898
|
+
email?: string;
|
|
6899
|
+
company?: string;
|
|
6900
|
+
tags?: Array<(string)>;
|
|
6901
|
+
groups?: Array<(string)>;
|
|
6902
|
+
isOptedIn?: boolean;
|
|
6903
|
+
lastMessageSentAt?: string;
|
|
6904
|
+
lastMessageReceivedAt?: string;
|
|
6905
|
+
messagesSentCount?: number;
|
|
6906
|
+
messagesReceivedCount?: number;
|
|
6907
|
+
customFields?: {
|
|
6908
|
+
[key: string]: unknown;
|
|
6909
|
+
};
|
|
6910
|
+
notes?: string;
|
|
6911
|
+
createdAt?: string;
|
|
6912
|
+
}>;
|
|
6913
|
+
filters?: {
|
|
6914
|
+
tags?: Array<(string)>;
|
|
6915
|
+
groups?: Array<(string)>;
|
|
6916
|
+
};
|
|
6917
|
+
pagination?: {
|
|
6918
|
+
total?: number;
|
|
6919
|
+
limit?: number;
|
|
6920
|
+
skip?: number;
|
|
6921
|
+
hasMore?: boolean;
|
|
6922
|
+
};
|
|
6923
|
+
});
|
|
6924
|
+
|
|
6925
|
+
export type GetWhatsAppContactsError = (unknown | {
|
|
6926
|
+
error?: string;
|
|
6927
|
+
});
|
|
6928
|
+
|
|
6929
|
+
export type CreateWhatsAppContactData = {
|
|
6930
|
+
body: {
|
|
6931
|
+
/**
|
|
6932
|
+
* WhatsApp social account ID
|
|
6933
|
+
*/
|
|
6934
|
+
accountId: string;
|
|
6935
|
+
/**
|
|
6936
|
+
* Phone number in E.164 format
|
|
6937
|
+
*/
|
|
6938
|
+
phone: string;
|
|
6939
|
+
/**
|
|
6940
|
+
* Contact name
|
|
6941
|
+
*/
|
|
6942
|
+
name: string;
|
|
6943
|
+
/**
|
|
6944
|
+
* Contact email
|
|
6945
|
+
*/
|
|
6946
|
+
email?: string;
|
|
6947
|
+
/**
|
|
6948
|
+
* Company name
|
|
6949
|
+
*/
|
|
6950
|
+
company?: string;
|
|
6951
|
+
/**
|
|
6952
|
+
* Tags for categorization
|
|
6953
|
+
*/
|
|
6954
|
+
tags?: Array<(string)>;
|
|
6955
|
+
/**
|
|
6956
|
+
* Groups the contact belongs to
|
|
6957
|
+
*/
|
|
6958
|
+
groups?: Array<(string)>;
|
|
6959
|
+
/**
|
|
6960
|
+
* Whether the contact has opted in to receive messages
|
|
6961
|
+
*/
|
|
6962
|
+
isOptedIn?: boolean;
|
|
6963
|
+
/**
|
|
6964
|
+
* Custom key-value fields
|
|
6965
|
+
*/
|
|
6966
|
+
customFields?: {
|
|
6967
|
+
[key: string]: (string);
|
|
6968
|
+
};
|
|
6969
|
+
/**
|
|
6970
|
+
* Notes about the contact
|
|
6971
|
+
*/
|
|
6972
|
+
notes?: string;
|
|
6973
|
+
};
|
|
6974
|
+
};
|
|
6975
|
+
|
|
6976
|
+
export type CreateWhatsAppContactResponse = ({
|
|
6977
|
+
success?: boolean;
|
|
6978
|
+
contact?: {
|
|
6979
|
+
id?: string;
|
|
6980
|
+
phone?: string;
|
|
6981
|
+
name?: string;
|
|
6982
|
+
email?: string;
|
|
6983
|
+
company?: string;
|
|
6984
|
+
tags?: Array<(string)>;
|
|
6985
|
+
groups?: Array<(string)>;
|
|
6986
|
+
isOptedIn?: boolean;
|
|
6987
|
+
createdAt?: string;
|
|
6988
|
+
};
|
|
6989
|
+
});
|
|
6990
|
+
|
|
6991
|
+
export type CreateWhatsAppContactError = (unknown | {
|
|
6992
|
+
error?: string;
|
|
6993
|
+
});
|
|
6994
|
+
|
|
6995
|
+
export type GetWhatsAppContactData = {
|
|
6996
|
+
path: {
|
|
6997
|
+
/**
|
|
6998
|
+
* Contact ID
|
|
6999
|
+
*/
|
|
7000
|
+
contactId: string;
|
|
7001
|
+
};
|
|
7002
|
+
};
|
|
7003
|
+
|
|
7004
|
+
export type GetWhatsAppContactResponse = ({
|
|
7005
|
+
success?: boolean;
|
|
7006
|
+
contact?: {
|
|
7007
|
+
id?: string;
|
|
7008
|
+
phone?: string;
|
|
7009
|
+
waId?: string;
|
|
7010
|
+
name?: string;
|
|
7011
|
+
email?: string;
|
|
7012
|
+
company?: string;
|
|
7013
|
+
tags?: Array<(string)>;
|
|
7014
|
+
groups?: Array<(string)>;
|
|
7015
|
+
isOptedIn?: boolean;
|
|
7016
|
+
optInDate?: string;
|
|
7017
|
+
optOutDate?: string;
|
|
7018
|
+
isBlocked?: boolean;
|
|
7019
|
+
lastMessageSentAt?: string;
|
|
7020
|
+
lastMessageReceivedAt?: string;
|
|
7021
|
+
messagesSentCount?: number;
|
|
7022
|
+
messagesReceivedCount?: number;
|
|
7023
|
+
customFields?: {
|
|
7024
|
+
[key: string]: unknown;
|
|
7025
|
+
};
|
|
7026
|
+
notes?: string;
|
|
7027
|
+
createdAt?: string;
|
|
7028
|
+
updatedAt?: string;
|
|
7029
|
+
};
|
|
7030
|
+
});
|
|
7031
|
+
|
|
7032
|
+
export type GetWhatsAppContactError = ({
|
|
7033
|
+
error?: string;
|
|
7034
|
+
});
|
|
7035
|
+
|
|
7036
|
+
export type UpdateWhatsAppContactData = {
|
|
7037
|
+
body: {
|
|
7038
|
+
/**
|
|
7039
|
+
* Contact name
|
|
7040
|
+
*/
|
|
7041
|
+
name?: string;
|
|
7042
|
+
/**
|
|
7043
|
+
* Contact email
|
|
7044
|
+
*/
|
|
7045
|
+
email?: string;
|
|
7046
|
+
/**
|
|
7047
|
+
* Company name
|
|
7048
|
+
*/
|
|
7049
|
+
company?: string;
|
|
7050
|
+
/**
|
|
7051
|
+
* Tags (replaces existing)
|
|
7052
|
+
*/
|
|
7053
|
+
tags?: Array<(string)>;
|
|
7054
|
+
/**
|
|
7055
|
+
* Groups (replaces existing)
|
|
7056
|
+
*/
|
|
7057
|
+
groups?: Array<(string)>;
|
|
7058
|
+
/**
|
|
7059
|
+
* Opt-in status (changes are timestamped)
|
|
7060
|
+
*/
|
|
7061
|
+
isOptedIn?: boolean;
|
|
7062
|
+
/**
|
|
7063
|
+
* Block status
|
|
7064
|
+
*/
|
|
7065
|
+
isBlocked?: boolean;
|
|
7066
|
+
/**
|
|
7067
|
+
* Custom fields to merge (set value to null to remove a field)
|
|
7068
|
+
*/
|
|
7069
|
+
customFields?: {
|
|
7070
|
+
[key: string]: ((string) | null);
|
|
7071
|
+
};
|
|
7072
|
+
/**
|
|
7073
|
+
* Notes about the contact
|
|
7074
|
+
*/
|
|
7075
|
+
notes?: string;
|
|
7076
|
+
};
|
|
7077
|
+
path: {
|
|
7078
|
+
/**
|
|
7079
|
+
* Contact ID
|
|
7080
|
+
*/
|
|
7081
|
+
contactId: string;
|
|
7082
|
+
};
|
|
7083
|
+
};
|
|
7084
|
+
|
|
7085
|
+
export type UpdateWhatsAppContactResponse = ({
|
|
7086
|
+
success?: boolean;
|
|
7087
|
+
contact?: {
|
|
7088
|
+
id?: string;
|
|
7089
|
+
phone?: string;
|
|
7090
|
+
name?: string;
|
|
7091
|
+
email?: string;
|
|
7092
|
+
company?: string;
|
|
7093
|
+
tags?: Array<(string)>;
|
|
7094
|
+
groups?: Array<(string)>;
|
|
7095
|
+
isOptedIn?: boolean;
|
|
7096
|
+
isBlocked?: boolean;
|
|
7097
|
+
customFields?: {
|
|
7098
|
+
[key: string]: unknown;
|
|
7099
|
+
};
|
|
7100
|
+
notes?: string;
|
|
7101
|
+
updatedAt?: string;
|
|
7102
|
+
};
|
|
7103
|
+
});
|
|
7104
|
+
|
|
7105
|
+
export type UpdateWhatsAppContactError = ({
|
|
7106
|
+
error?: string;
|
|
7107
|
+
});
|
|
7108
|
+
|
|
7109
|
+
export type DeleteWhatsAppContactData = {
|
|
7110
|
+
path: {
|
|
7111
|
+
/**
|
|
7112
|
+
* Contact ID
|
|
7113
|
+
*/
|
|
7114
|
+
contactId: string;
|
|
7115
|
+
};
|
|
7116
|
+
};
|
|
7117
|
+
|
|
7118
|
+
export type DeleteWhatsAppContactResponse = ({
|
|
7119
|
+
success?: boolean;
|
|
7120
|
+
message?: string;
|
|
7121
|
+
});
|
|
7122
|
+
|
|
7123
|
+
export type DeleteWhatsAppContactError = ({
|
|
7124
|
+
error?: string;
|
|
7125
|
+
});
|
|
7126
|
+
|
|
7127
|
+
export type ImportWhatsAppContactsData = {
|
|
7128
|
+
body: {
|
|
7129
|
+
/**
|
|
7130
|
+
* WhatsApp social account ID
|
|
7131
|
+
*/
|
|
7132
|
+
accountId: string;
|
|
7133
|
+
/**
|
|
7134
|
+
* Contacts to import (max 1000)
|
|
7135
|
+
*/
|
|
7136
|
+
contacts: Array<{
|
|
7137
|
+
/**
|
|
7138
|
+
* Phone number in E.164 format
|
|
7139
|
+
*/
|
|
7140
|
+
phone: string;
|
|
7141
|
+
/**
|
|
7142
|
+
* Contact name
|
|
7143
|
+
*/
|
|
7144
|
+
name: string;
|
|
7145
|
+
email?: string;
|
|
7146
|
+
company?: string;
|
|
7147
|
+
tags?: Array<(string)>;
|
|
7148
|
+
groups?: Array<(string)>;
|
|
7149
|
+
customFields?: {
|
|
7150
|
+
[key: string]: (string);
|
|
7151
|
+
};
|
|
7152
|
+
notes?: string;
|
|
7153
|
+
}>;
|
|
7154
|
+
/**
|
|
7155
|
+
* Tags applied to all imported contacts
|
|
7156
|
+
*/
|
|
7157
|
+
defaultTags?: Array<(string)>;
|
|
7158
|
+
/**
|
|
7159
|
+
* Groups applied to all imported contacts
|
|
7160
|
+
*/
|
|
7161
|
+
defaultGroups?: Array<(string)>;
|
|
7162
|
+
/**
|
|
7163
|
+
* Skip contacts with existing phone numbers
|
|
7164
|
+
*/
|
|
7165
|
+
skipDuplicates?: boolean;
|
|
7166
|
+
};
|
|
7167
|
+
};
|
|
7168
|
+
|
|
7169
|
+
export type ImportWhatsAppContactsResponse = ({
|
|
7170
|
+
success?: boolean;
|
|
7171
|
+
summary?: {
|
|
7172
|
+
total?: number;
|
|
7173
|
+
created?: number;
|
|
7174
|
+
skipped?: number;
|
|
7175
|
+
failed?: number;
|
|
7176
|
+
};
|
|
7177
|
+
results?: Array<{
|
|
7178
|
+
phone?: string;
|
|
7179
|
+
name?: string;
|
|
7180
|
+
success?: boolean;
|
|
7181
|
+
contactId?: string;
|
|
7182
|
+
error?: string;
|
|
7183
|
+
}>;
|
|
7184
|
+
});
|
|
7185
|
+
|
|
7186
|
+
export type ImportWhatsAppContactsError = (unknown | {
|
|
7187
|
+
error?: string;
|
|
7188
|
+
});
|
|
7189
|
+
|
|
7190
|
+
export type BulkUpdateWhatsAppContactsData = {
|
|
7191
|
+
body: {
|
|
7192
|
+
/**
|
|
7193
|
+
* Bulk action to perform
|
|
7194
|
+
*/
|
|
7195
|
+
action: 'addTags' | 'removeTags' | 'addGroups' | 'removeGroups' | 'optIn' | 'optOut' | 'block' | 'unblock';
|
|
7196
|
+
/**
|
|
7197
|
+
* Contact IDs to update (max 500)
|
|
7198
|
+
*/
|
|
7199
|
+
contactIds: Array<(string)>;
|
|
7200
|
+
/**
|
|
7201
|
+
* Tags to add or remove (required for addTags/removeTags)
|
|
7202
|
+
*/
|
|
7203
|
+
tags?: Array<(string)>;
|
|
7204
|
+
/**
|
|
7205
|
+
* Groups to add or remove (required for addGroups/removeGroups)
|
|
7206
|
+
*/
|
|
7207
|
+
groups?: Array<(string)>;
|
|
7208
|
+
};
|
|
7209
|
+
};
|
|
7210
|
+
|
|
7211
|
+
export type BulkUpdateWhatsAppContactsResponse = ({
|
|
7212
|
+
success?: boolean;
|
|
7213
|
+
action?: string;
|
|
7214
|
+
/**
|
|
7215
|
+
* Number of contacts modified
|
|
7216
|
+
*/
|
|
7217
|
+
modified?: number;
|
|
7218
|
+
/**
|
|
7219
|
+
* Number of contacts matched
|
|
7220
|
+
*/
|
|
7221
|
+
matched?: number;
|
|
7222
|
+
});
|
|
7223
|
+
|
|
7224
|
+
export type BulkUpdateWhatsAppContactsError = (unknown | {
|
|
7225
|
+
error?: string;
|
|
7226
|
+
});
|
|
7227
|
+
|
|
7228
|
+
export type BulkDeleteWhatsAppContactsData = {
|
|
7229
|
+
body: {
|
|
7230
|
+
/**
|
|
7231
|
+
* Contact IDs to delete (max 500)
|
|
7232
|
+
*/
|
|
7233
|
+
contactIds: Array<(string)>;
|
|
7234
|
+
};
|
|
7235
|
+
};
|
|
7236
|
+
|
|
7237
|
+
export type BulkDeleteWhatsAppContactsResponse = ({
|
|
7238
|
+
success?: boolean;
|
|
7239
|
+
/**
|
|
7240
|
+
* Number of contacts deleted
|
|
7241
|
+
*/
|
|
7242
|
+
deleted?: number;
|
|
7243
|
+
});
|
|
7244
|
+
|
|
7245
|
+
export type BulkDeleteWhatsAppContactsError = (unknown | {
|
|
7246
|
+
error?: string;
|
|
7247
|
+
});
|
|
7248
|
+
|
|
7249
|
+
export type GetWhatsAppGroupsData = {
|
|
7250
|
+
query: {
|
|
7251
|
+
/**
|
|
7252
|
+
* WhatsApp social account ID
|
|
7253
|
+
*/
|
|
7254
|
+
accountId: string;
|
|
7255
|
+
};
|
|
7256
|
+
};
|
|
7257
|
+
|
|
7258
|
+
export type GetWhatsAppGroupsResponse = ({
|
|
7259
|
+
success?: boolean;
|
|
7260
|
+
groups?: Array<{
|
|
7261
|
+
name?: string;
|
|
7262
|
+
/**
|
|
7263
|
+
* Total contacts in this group
|
|
7264
|
+
*/
|
|
7265
|
+
totalCount?: number;
|
|
7266
|
+
/**
|
|
7267
|
+
* Opted-in contacts in this group
|
|
7268
|
+
*/
|
|
7269
|
+
optedInCount?: number;
|
|
7270
|
+
}>;
|
|
7271
|
+
summary?: {
|
|
7272
|
+
totalContacts?: number;
|
|
7273
|
+
optedInContacts?: number;
|
|
7274
|
+
groupCount?: number;
|
|
7275
|
+
};
|
|
7276
|
+
});
|
|
7277
|
+
|
|
7278
|
+
export type GetWhatsAppGroupsError = (unknown | {
|
|
7279
|
+
error?: string;
|
|
7280
|
+
});
|
|
7281
|
+
|
|
7282
|
+
export type RenameWhatsAppGroupData = {
|
|
7283
|
+
body: {
|
|
7284
|
+
/**
|
|
7285
|
+
* WhatsApp social account ID
|
|
7286
|
+
*/
|
|
7287
|
+
accountId: string;
|
|
7288
|
+
/**
|
|
7289
|
+
* Current group name
|
|
7290
|
+
*/
|
|
7291
|
+
oldName: string;
|
|
7292
|
+
/**
|
|
7293
|
+
* New group name
|
|
7294
|
+
*/
|
|
7295
|
+
newName: string;
|
|
7296
|
+
};
|
|
7297
|
+
};
|
|
7298
|
+
|
|
7299
|
+
export type RenameWhatsAppGroupResponse = ({
|
|
7300
|
+
success?: boolean;
|
|
7301
|
+
message?: string;
|
|
7302
|
+
/**
|
|
7303
|
+
* Number of contacts updated
|
|
7304
|
+
*/
|
|
7305
|
+
modified?: number;
|
|
7306
|
+
});
|
|
7307
|
+
|
|
7308
|
+
export type RenameWhatsAppGroupError = (unknown | {
|
|
7309
|
+
error?: string;
|
|
7310
|
+
});
|
|
7311
|
+
|
|
7312
|
+
export type DeleteWhatsAppGroupData = {
|
|
7313
|
+
body: {
|
|
7314
|
+
/**
|
|
7315
|
+
* WhatsApp social account ID
|
|
7316
|
+
*/
|
|
7317
|
+
accountId: string;
|
|
7318
|
+
/**
|
|
7319
|
+
* Group name to delete
|
|
7320
|
+
*/
|
|
7321
|
+
groupName: string;
|
|
7322
|
+
};
|
|
7323
|
+
};
|
|
7324
|
+
|
|
7325
|
+
export type DeleteWhatsAppGroupResponse = ({
|
|
7326
|
+
success?: boolean;
|
|
7327
|
+
message?: string;
|
|
7328
|
+
/**
|
|
7329
|
+
* Number of contacts updated
|
|
7330
|
+
*/
|
|
7331
|
+
modified?: number;
|
|
7332
|
+
});
|
|
7333
|
+
|
|
7334
|
+
export type DeleteWhatsAppGroupError = (unknown | {
|
|
7335
|
+
error?: string;
|
|
7336
|
+
});
|
|
7337
|
+
|
|
7338
|
+
export type GetWhatsAppTemplatesData = {
|
|
7339
|
+
query: {
|
|
7340
|
+
/**
|
|
7341
|
+
* WhatsApp social account ID
|
|
7342
|
+
*/
|
|
7343
|
+
accountId: string;
|
|
7344
|
+
};
|
|
7345
|
+
};
|
|
7346
|
+
|
|
7347
|
+
export type GetWhatsAppTemplatesResponse = ({
|
|
7348
|
+
success?: boolean;
|
|
7349
|
+
templates?: Array<{
|
|
7350
|
+
/**
|
|
7351
|
+
* WhatsApp template ID
|
|
7352
|
+
*/
|
|
7353
|
+
id?: string;
|
|
7354
|
+
name?: string;
|
|
7355
|
+
status?: 'APPROVED' | 'PENDING' | 'REJECTED';
|
|
7356
|
+
category?: 'AUTHENTICATION' | 'MARKETING' | 'UTILITY';
|
|
7357
|
+
language?: string;
|
|
7358
|
+
components?: Array<{
|
|
7359
|
+
[key: string]: unknown;
|
|
7360
|
+
}>;
|
|
7361
|
+
}>;
|
|
7362
|
+
});
|
|
7363
|
+
|
|
7364
|
+
export type GetWhatsAppTemplatesError = (unknown | {
|
|
7365
|
+
error?: string;
|
|
7366
|
+
});
|
|
7367
|
+
|
|
7368
|
+
export type CreateWhatsAppTemplateData = {
|
|
7369
|
+
body: {
|
|
7370
|
+
/**
|
|
7371
|
+
* WhatsApp social account ID
|
|
7372
|
+
*/
|
|
7373
|
+
accountId: string;
|
|
7374
|
+
/**
|
|
7375
|
+
* Template name (lowercase, letters/numbers/underscores, must start with a letter)
|
|
7376
|
+
*/
|
|
7377
|
+
name: string;
|
|
7378
|
+
/**
|
|
7379
|
+
* Template category
|
|
7380
|
+
*/
|
|
7381
|
+
category: 'AUTHENTICATION' | 'MARKETING' | 'UTILITY';
|
|
7382
|
+
/**
|
|
7383
|
+
* Template language code (e.g., en_US)
|
|
7384
|
+
*/
|
|
7385
|
+
language: string;
|
|
7386
|
+
/**
|
|
7387
|
+
* Template components (header, body, footer, buttons)
|
|
7388
|
+
*/
|
|
7389
|
+
components: Array<{
|
|
7390
|
+
[key: string]: unknown;
|
|
7391
|
+
}>;
|
|
7392
|
+
};
|
|
7393
|
+
};
|
|
7394
|
+
|
|
7395
|
+
export type CreateWhatsAppTemplateResponse = ({
|
|
7396
|
+
success?: boolean;
|
|
7397
|
+
template?: {
|
|
7398
|
+
id?: string;
|
|
7399
|
+
name?: string;
|
|
7400
|
+
status?: string;
|
|
7401
|
+
category?: string;
|
|
7402
|
+
language?: string;
|
|
7403
|
+
};
|
|
7404
|
+
});
|
|
7405
|
+
|
|
7406
|
+
export type CreateWhatsAppTemplateError = (unknown | {
|
|
7407
|
+
error?: string;
|
|
7408
|
+
});
|
|
7409
|
+
|
|
7410
|
+
export type GetWhatsAppTemplateData = {
|
|
7411
|
+
path: {
|
|
7412
|
+
/**
|
|
7413
|
+
* Template name
|
|
7414
|
+
*/
|
|
7415
|
+
templateName: string;
|
|
7416
|
+
};
|
|
7417
|
+
query: {
|
|
7418
|
+
/**
|
|
7419
|
+
* WhatsApp social account ID
|
|
7420
|
+
*/
|
|
7421
|
+
accountId: string;
|
|
7422
|
+
};
|
|
7423
|
+
};
|
|
7424
|
+
|
|
7425
|
+
export type GetWhatsAppTemplateResponse = ({
|
|
7426
|
+
success?: boolean;
|
|
7427
|
+
template?: {
|
|
7428
|
+
id?: string;
|
|
7429
|
+
name?: string;
|
|
7430
|
+
status?: string;
|
|
7431
|
+
category?: string;
|
|
7432
|
+
language?: string;
|
|
7433
|
+
components?: Array<{
|
|
7434
|
+
[key: string]: unknown;
|
|
7435
|
+
}>;
|
|
7436
|
+
};
|
|
7437
|
+
});
|
|
7438
|
+
|
|
7439
|
+
export type GetWhatsAppTemplateError = (unknown | {
|
|
7440
|
+
error?: string;
|
|
7441
|
+
});
|
|
7442
|
+
|
|
7443
|
+
export type UpdateWhatsAppTemplateData = {
|
|
7444
|
+
body: {
|
|
7445
|
+
/**
|
|
7446
|
+
* WhatsApp social account ID
|
|
7447
|
+
*/
|
|
7448
|
+
accountId: string;
|
|
7449
|
+
/**
|
|
7450
|
+
* Updated template components
|
|
7451
|
+
*/
|
|
7452
|
+
components: Array<{
|
|
7453
|
+
[key: string]: unknown;
|
|
7454
|
+
}>;
|
|
7455
|
+
};
|
|
7456
|
+
path: {
|
|
7457
|
+
/**
|
|
7458
|
+
* Template name
|
|
7459
|
+
*/
|
|
7460
|
+
templateName: string;
|
|
7461
|
+
};
|
|
7462
|
+
};
|
|
7463
|
+
|
|
7464
|
+
export type UpdateWhatsAppTemplateResponse = ({
|
|
7465
|
+
success?: boolean;
|
|
7466
|
+
template?: {
|
|
7467
|
+
id?: string;
|
|
7468
|
+
name?: string;
|
|
7469
|
+
status?: string;
|
|
7470
|
+
};
|
|
7471
|
+
});
|
|
7472
|
+
|
|
7473
|
+
export type UpdateWhatsAppTemplateError = (unknown | {
|
|
7474
|
+
error?: string;
|
|
7475
|
+
});
|
|
7476
|
+
|
|
7477
|
+
export type DeleteWhatsAppTemplateData = {
|
|
7478
|
+
path: {
|
|
7479
|
+
/**
|
|
7480
|
+
* Template name
|
|
7481
|
+
*/
|
|
7482
|
+
templateName: string;
|
|
7483
|
+
};
|
|
7484
|
+
query: {
|
|
7485
|
+
/**
|
|
7486
|
+
* WhatsApp social account ID
|
|
7487
|
+
*/
|
|
7488
|
+
accountId: string;
|
|
7489
|
+
};
|
|
7490
|
+
};
|
|
7491
|
+
|
|
7492
|
+
export type DeleteWhatsAppTemplateResponse = ({
|
|
7493
|
+
success?: boolean;
|
|
7494
|
+
message?: string;
|
|
7495
|
+
});
|
|
7496
|
+
|
|
7497
|
+
export type DeleteWhatsAppTemplateError = (unknown | {
|
|
7498
|
+
error?: string;
|
|
7499
|
+
});
|
|
7500
|
+
|
|
7501
|
+
export type GetWhatsAppBroadcastsData = {
|
|
7502
|
+
query: {
|
|
7503
|
+
/**
|
|
7504
|
+
* WhatsApp social account ID
|
|
7505
|
+
*/
|
|
7506
|
+
accountId: string;
|
|
7507
|
+
/**
|
|
7508
|
+
* Maximum results (default 50)
|
|
7509
|
+
*/
|
|
7510
|
+
limit?: number;
|
|
7511
|
+
/**
|
|
7512
|
+
* Offset for pagination
|
|
7513
|
+
*/
|
|
7514
|
+
skip?: number;
|
|
7515
|
+
/**
|
|
7516
|
+
* Filter by broadcast status
|
|
7517
|
+
*/
|
|
7518
|
+
status?: 'draft' | 'scheduled' | 'sending' | 'completed' | 'failed' | 'cancelled';
|
|
7519
|
+
};
|
|
7520
|
+
};
|
|
7521
|
+
|
|
7522
|
+
export type GetWhatsAppBroadcastsResponse = ({
|
|
7523
|
+
success?: boolean;
|
|
7524
|
+
broadcasts?: Array<{
|
|
7525
|
+
id?: string;
|
|
7526
|
+
name?: string;
|
|
7527
|
+
description?: string;
|
|
7528
|
+
template?: {
|
|
7529
|
+
name?: string;
|
|
7530
|
+
language?: string;
|
|
7531
|
+
};
|
|
7532
|
+
status?: 'draft' | 'scheduled' | 'sending' | 'completed' | 'failed' | 'cancelled';
|
|
7533
|
+
recipientCount?: number;
|
|
7534
|
+
scheduledAt?: string;
|
|
7535
|
+
startedAt?: string;
|
|
7536
|
+
completedAt?: string;
|
|
7537
|
+
sentCount?: number;
|
|
7538
|
+
deliveredCount?: number;
|
|
7539
|
+
readCount?: number;
|
|
7540
|
+
failedCount?: number;
|
|
7541
|
+
createdAt?: string;
|
|
7542
|
+
}>;
|
|
7543
|
+
pagination?: {
|
|
7544
|
+
total?: number;
|
|
7545
|
+
limit?: number;
|
|
7546
|
+
skip?: number;
|
|
7547
|
+
hasMore?: boolean;
|
|
7548
|
+
};
|
|
7549
|
+
});
|
|
7550
|
+
|
|
7551
|
+
export type GetWhatsAppBroadcastsError = (unknown | {
|
|
7552
|
+
error?: string;
|
|
7553
|
+
});
|
|
7554
|
+
|
|
7555
|
+
export type CreateWhatsAppBroadcastData = {
|
|
7556
|
+
body: {
|
|
7557
|
+
/**
|
|
7558
|
+
* WhatsApp social account ID
|
|
7559
|
+
*/
|
|
7560
|
+
accountId: string;
|
|
7561
|
+
/**
|
|
7562
|
+
* Broadcast name
|
|
7563
|
+
*/
|
|
7564
|
+
name: string;
|
|
7565
|
+
/**
|
|
7566
|
+
* Broadcast description
|
|
7567
|
+
*/
|
|
7568
|
+
description?: string;
|
|
7569
|
+
template: {
|
|
7570
|
+
/**
|
|
7571
|
+
* Template name
|
|
7572
|
+
*/
|
|
7573
|
+
name: string;
|
|
7574
|
+
/**
|
|
7575
|
+
* Template language code
|
|
7576
|
+
*/
|
|
7577
|
+
language: string;
|
|
7578
|
+
/**
|
|
7579
|
+
* Base template components
|
|
7580
|
+
*/
|
|
7581
|
+
components?: Array<{
|
|
7582
|
+
[key: string]: unknown;
|
|
7583
|
+
}>;
|
|
7584
|
+
};
|
|
7585
|
+
/**
|
|
7586
|
+
* Initial recipients (optional)
|
|
7587
|
+
*/
|
|
7588
|
+
recipients?: Array<{
|
|
7589
|
+
/**
|
|
7590
|
+
* Phone number in E.164 format
|
|
7591
|
+
*/
|
|
7592
|
+
phone: string;
|
|
7593
|
+
name?: string;
|
|
7594
|
+
/**
|
|
7595
|
+
* Per-recipient template variables
|
|
7596
|
+
*/
|
|
7597
|
+
variables?: {
|
|
7598
|
+
[key: string]: (string);
|
|
7599
|
+
};
|
|
7600
|
+
}>;
|
|
7601
|
+
};
|
|
7602
|
+
};
|
|
7603
|
+
|
|
7604
|
+
export type CreateWhatsAppBroadcastResponse = ({
|
|
7605
|
+
success?: boolean;
|
|
7606
|
+
broadcast?: {
|
|
7607
|
+
id?: string;
|
|
7608
|
+
name?: string;
|
|
7609
|
+
description?: string;
|
|
7610
|
+
template?: {
|
|
7611
|
+
[key: string]: unknown;
|
|
7612
|
+
};
|
|
7613
|
+
/**
|
|
7614
|
+
* Always "draft" for new broadcasts
|
|
7615
|
+
*/
|
|
7616
|
+
status?: string;
|
|
7617
|
+
recipientCount?: number;
|
|
7618
|
+
createdAt?: string;
|
|
7619
|
+
};
|
|
7620
|
+
});
|
|
7621
|
+
|
|
7622
|
+
export type CreateWhatsAppBroadcastError = (unknown | {
|
|
7623
|
+
error?: string;
|
|
7624
|
+
});
|
|
7625
|
+
|
|
7626
|
+
export type GetWhatsAppBroadcastData = {
|
|
7627
|
+
path: {
|
|
7628
|
+
/**
|
|
7629
|
+
* Broadcast ID
|
|
7630
|
+
*/
|
|
7631
|
+
broadcastId: string;
|
|
7632
|
+
};
|
|
7633
|
+
};
|
|
7634
|
+
|
|
7635
|
+
export type GetWhatsAppBroadcastResponse = ({
|
|
7636
|
+
success?: boolean;
|
|
7637
|
+
broadcast?: {
|
|
7638
|
+
id?: string;
|
|
7639
|
+
name?: string;
|
|
7640
|
+
description?: string;
|
|
7641
|
+
template?: {
|
|
7642
|
+
[key: string]: unknown;
|
|
7643
|
+
};
|
|
7644
|
+
status?: 'draft' | 'scheduled' | 'sending' | 'completed' | 'failed' | 'cancelled';
|
|
7645
|
+
recipientCount?: number;
|
|
7646
|
+
scheduledAt?: string;
|
|
7647
|
+
startedAt?: string;
|
|
7648
|
+
completedAt?: string;
|
|
7649
|
+
sentCount?: number;
|
|
7650
|
+
deliveredCount?: number;
|
|
7651
|
+
readCount?: number;
|
|
7652
|
+
failedCount?: number;
|
|
7653
|
+
createdAt?: string;
|
|
7654
|
+
updatedAt?: string;
|
|
7655
|
+
};
|
|
7656
|
+
});
|
|
7657
|
+
|
|
7658
|
+
export type GetWhatsAppBroadcastError = ({
|
|
7659
|
+
error?: string;
|
|
7660
|
+
});
|
|
7661
|
+
|
|
7662
|
+
export type DeleteWhatsAppBroadcastData = {
|
|
7663
|
+
path: {
|
|
7664
|
+
/**
|
|
7665
|
+
* Broadcast ID
|
|
7666
|
+
*/
|
|
7667
|
+
broadcastId: string;
|
|
7668
|
+
};
|
|
7669
|
+
};
|
|
7670
|
+
|
|
7671
|
+
export type DeleteWhatsAppBroadcastResponse = ({
|
|
7672
|
+
success?: boolean;
|
|
7673
|
+
message?: string;
|
|
7674
|
+
});
|
|
7675
|
+
|
|
7676
|
+
export type DeleteWhatsAppBroadcastError = (unknown | {
|
|
7677
|
+
error?: string;
|
|
7678
|
+
});
|
|
7679
|
+
|
|
7680
|
+
export type SendWhatsAppBroadcastData = {
|
|
7681
|
+
path: {
|
|
7682
|
+
/**
|
|
7683
|
+
* Broadcast ID
|
|
7684
|
+
*/
|
|
7685
|
+
broadcastId: string;
|
|
7686
|
+
};
|
|
7687
|
+
};
|
|
7688
|
+
|
|
7689
|
+
export type SendWhatsAppBroadcastResponse = ({
|
|
7690
|
+
success?: boolean;
|
|
7691
|
+
/**
|
|
7692
|
+
* Final broadcast status
|
|
7693
|
+
*/
|
|
7694
|
+
status?: 'completed' | 'failed';
|
|
7695
|
+
/**
|
|
7696
|
+
* Number of messages sent successfully
|
|
7697
|
+
*/
|
|
7698
|
+
sent?: number;
|
|
7699
|
+
/**
|
|
7700
|
+
* Number of messages that failed
|
|
7701
|
+
*/
|
|
7702
|
+
failed?: number;
|
|
7703
|
+
/**
|
|
7704
|
+
* Total recipient count
|
|
7705
|
+
*/
|
|
7706
|
+
total?: number;
|
|
7707
|
+
});
|
|
7708
|
+
|
|
7709
|
+
export type SendWhatsAppBroadcastError = (unknown | {
|
|
7710
|
+
error?: string;
|
|
7711
|
+
});
|
|
7712
|
+
|
|
7713
|
+
export type ScheduleWhatsAppBroadcastData = {
|
|
7714
|
+
body: {
|
|
7715
|
+
/**
|
|
7716
|
+
* ISO 8601 date-time for sending (must be in the future, max 30 days)
|
|
7717
|
+
*/
|
|
7718
|
+
scheduledAt: string;
|
|
7719
|
+
};
|
|
7720
|
+
path: {
|
|
7721
|
+
/**
|
|
7722
|
+
* Broadcast ID
|
|
7723
|
+
*/
|
|
7724
|
+
broadcastId: string;
|
|
7725
|
+
};
|
|
7726
|
+
};
|
|
7727
|
+
|
|
7728
|
+
export type ScheduleWhatsAppBroadcastResponse = ({
|
|
7729
|
+
success?: boolean;
|
|
7730
|
+
broadcast?: {
|
|
7731
|
+
id?: string;
|
|
7732
|
+
/**
|
|
7733
|
+
* "scheduled"
|
|
7734
|
+
*/
|
|
7735
|
+
status?: string;
|
|
7736
|
+
scheduledAt?: string;
|
|
7737
|
+
};
|
|
7738
|
+
});
|
|
7739
|
+
|
|
7740
|
+
export type ScheduleWhatsAppBroadcastError = (unknown | {
|
|
7741
|
+
error?: string;
|
|
7742
|
+
});
|
|
7743
|
+
|
|
7744
|
+
export type CancelWhatsAppBroadcastScheduleData = {
|
|
7745
|
+
path: {
|
|
7746
|
+
/**
|
|
7747
|
+
* Broadcast ID
|
|
7748
|
+
*/
|
|
7749
|
+
broadcastId: string;
|
|
7750
|
+
};
|
|
7751
|
+
};
|
|
7752
|
+
|
|
7753
|
+
export type CancelWhatsAppBroadcastScheduleResponse = ({
|
|
7754
|
+
success?: boolean;
|
|
7755
|
+
broadcast?: {
|
|
7756
|
+
id?: string;
|
|
7757
|
+
/**
|
|
7758
|
+
* "draft"
|
|
7759
|
+
*/
|
|
7760
|
+
status?: string;
|
|
7761
|
+
};
|
|
7762
|
+
message?: string;
|
|
7763
|
+
});
|
|
7764
|
+
|
|
7765
|
+
export type CancelWhatsAppBroadcastScheduleError = (unknown | {
|
|
7766
|
+
error?: string;
|
|
7767
|
+
});
|
|
7768
|
+
|
|
7769
|
+
export type GetWhatsAppBroadcastRecipientsData = {
|
|
7770
|
+
path: {
|
|
7771
|
+
/**
|
|
7772
|
+
* Broadcast ID
|
|
7773
|
+
*/
|
|
7774
|
+
broadcastId: string;
|
|
7775
|
+
};
|
|
7776
|
+
query?: {
|
|
7777
|
+
/**
|
|
7778
|
+
* Maximum results (default 100)
|
|
7779
|
+
*/
|
|
7780
|
+
limit?: number;
|
|
7781
|
+
/**
|
|
7782
|
+
* Offset for pagination
|
|
7783
|
+
*/
|
|
7784
|
+
skip?: number;
|
|
7785
|
+
/**
|
|
7786
|
+
* Filter by recipient delivery status
|
|
7787
|
+
*/
|
|
7788
|
+
status?: 'pending' | 'sent' | 'delivered' | 'read' | 'failed';
|
|
7789
|
+
};
|
|
7790
|
+
};
|
|
7791
|
+
|
|
7792
|
+
export type GetWhatsAppBroadcastRecipientsResponse = ({
|
|
7793
|
+
success?: boolean;
|
|
7794
|
+
recipients?: Array<{
|
|
7795
|
+
phone?: string;
|
|
7796
|
+
name?: string;
|
|
7797
|
+
variables?: {
|
|
7798
|
+
[key: string]: unknown;
|
|
7799
|
+
};
|
|
7800
|
+
status?: 'pending' | 'sent' | 'delivered' | 'read' | 'failed';
|
|
7801
|
+
messageId?: string;
|
|
7802
|
+
error?: string;
|
|
7803
|
+
sentAt?: string;
|
|
7804
|
+
deliveredAt?: string;
|
|
7805
|
+
readAt?: string;
|
|
7806
|
+
}>;
|
|
7807
|
+
pagination?: {
|
|
7808
|
+
total?: number;
|
|
7809
|
+
limit?: number;
|
|
7810
|
+
skip?: number;
|
|
7811
|
+
hasMore?: boolean;
|
|
7812
|
+
};
|
|
7813
|
+
summary?: {
|
|
7814
|
+
total?: number;
|
|
7815
|
+
pending?: number;
|
|
7816
|
+
sent?: number;
|
|
7817
|
+
delivered?: number;
|
|
7818
|
+
read?: number;
|
|
7819
|
+
failed?: number;
|
|
7820
|
+
};
|
|
7821
|
+
});
|
|
7822
|
+
|
|
7823
|
+
export type GetWhatsAppBroadcastRecipientsError = ({
|
|
7824
|
+
error?: string;
|
|
7825
|
+
});
|
|
7826
|
+
|
|
7827
|
+
export type AddWhatsAppBroadcastRecipientsData = {
|
|
7828
|
+
body: {
|
|
7829
|
+
/**
|
|
7830
|
+
* Recipients to add (max 1000)
|
|
7831
|
+
*/
|
|
7832
|
+
recipients: Array<{
|
|
7833
|
+
/**
|
|
7834
|
+
* Phone number in E.164 format
|
|
7835
|
+
*/
|
|
7836
|
+
phone: string;
|
|
7837
|
+
name?: string;
|
|
7838
|
+
variables?: {
|
|
7839
|
+
[key: string]: (string);
|
|
7840
|
+
};
|
|
7841
|
+
}>;
|
|
7842
|
+
};
|
|
7843
|
+
path: {
|
|
7844
|
+
/**
|
|
7845
|
+
* Broadcast ID
|
|
7846
|
+
*/
|
|
7847
|
+
broadcastId: string;
|
|
7848
|
+
};
|
|
7849
|
+
};
|
|
7850
|
+
|
|
7851
|
+
export type AddWhatsAppBroadcastRecipientsResponse = ({
|
|
7852
|
+
success?: boolean;
|
|
7853
|
+
/**
|
|
7854
|
+
* Number of new recipients added
|
|
7855
|
+
*/
|
|
7856
|
+
added?: number;
|
|
7857
|
+
/**
|
|
7858
|
+
* Number of duplicate phone numbers skipped
|
|
7859
|
+
*/
|
|
7860
|
+
duplicates?: number;
|
|
7861
|
+
/**
|
|
7862
|
+
* Total recipient count after addition
|
|
7863
|
+
*/
|
|
7864
|
+
totalRecipients?: number;
|
|
7865
|
+
});
|
|
7866
|
+
|
|
7867
|
+
export type AddWhatsAppBroadcastRecipientsError = (unknown | {
|
|
7868
|
+
error?: string;
|
|
7869
|
+
});
|
|
7870
|
+
|
|
7871
|
+
export type RemoveWhatsAppBroadcastRecipientsData = {
|
|
7872
|
+
body: {
|
|
7873
|
+
/**
|
|
7874
|
+
* Phone numbers to remove
|
|
7875
|
+
*/
|
|
7876
|
+
phones: Array<(string)>;
|
|
7877
|
+
};
|
|
7878
|
+
path: {
|
|
7879
|
+
/**
|
|
7880
|
+
* Broadcast ID
|
|
7881
|
+
*/
|
|
7882
|
+
broadcastId: string;
|
|
7883
|
+
};
|
|
7884
|
+
};
|
|
7885
|
+
|
|
7886
|
+
export type RemoveWhatsAppBroadcastRecipientsResponse = ({
|
|
7887
|
+
success?: boolean;
|
|
7888
|
+
/**
|
|
7889
|
+
* Number of recipients removed
|
|
7890
|
+
*/
|
|
7891
|
+
removed?: number;
|
|
7892
|
+
/**
|
|
7893
|
+
* Remaining recipient count
|
|
7894
|
+
*/
|
|
7895
|
+
totalRecipients?: number;
|
|
7896
|
+
});
|
|
7897
|
+
|
|
7898
|
+
export type RemoveWhatsAppBroadcastRecipientsError = (unknown | {
|
|
7899
|
+
error?: string;
|
|
7900
|
+
});
|
|
7901
|
+
|
|
7902
|
+
export type GetWhatsAppBusinessProfileData = {
|
|
7903
|
+
query: {
|
|
7904
|
+
/**
|
|
7905
|
+
* WhatsApp social account ID
|
|
7906
|
+
*/
|
|
7907
|
+
accountId: string;
|
|
7908
|
+
};
|
|
7909
|
+
};
|
|
7910
|
+
|
|
7911
|
+
export type GetWhatsAppBusinessProfileResponse = ({
|
|
7912
|
+
success?: boolean;
|
|
7913
|
+
businessProfile?: {
|
|
7914
|
+
/**
|
|
7915
|
+
* Short description (max 139 chars)
|
|
7916
|
+
*/
|
|
7917
|
+
about?: string;
|
|
7918
|
+
address?: string;
|
|
7919
|
+
/**
|
|
7920
|
+
* Full description (max 512 chars)
|
|
7921
|
+
*/
|
|
7922
|
+
description?: string;
|
|
7923
|
+
email?: string;
|
|
7924
|
+
profilePictureUrl?: string;
|
|
7925
|
+
websites?: Array<(string)>;
|
|
7926
|
+
/**
|
|
7927
|
+
* Business category
|
|
7928
|
+
*/
|
|
7929
|
+
vertical?: string;
|
|
7930
|
+
};
|
|
7931
|
+
});
|
|
7932
|
+
|
|
7933
|
+
export type GetWhatsAppBusinessProfileError = (unknown | {
|
|
7934
|
+
error?: string;
|
|
7935
|
+
});
|
|
7936
|
+
|
|
7937
|
+
export type UpdateWhatsAppBusinessProfileData = {
|
|
7938
|
+
body: {
|
|
7939
|
+
/**
|
|
7940
|
+
* WhatsApp social account ID
|
|
7941
|
+
*/
|
|
7942
|
+
accountId: string;
|
|
7943
|
+
/**
|
|
7944
|
+
* Short business description (max 139 characters)
|
|
7945
|
+
*/
|
|
7946
|
+
about?: string;
|
|
7947
|
+
/**
|
|
7948
|
+
* Business address
|
|
7949
|
+
*/
|
|
7950
|
+
address?: string;
|
|
7951
|
+
/**
|
|
7952
|
+
* Full business description (max 512 characters)
|
|
7953
|
+
*/
|
|
7954
|
+
description?: string;
|
|
7955
|
+
/**
|
|
7956
|
+
* Business email
|
|
7957
|
+
*/
|
|
7958
|
+
email?: string;
|
|
7959
|
+
/**
|
|
7960
|
+
* Business websites (max 2)
|
|
7961
|
+
*/
|
|
7962
|
+
websites?: Array<(string)>;
|
|
7963
|
+
/**
|
|
7964
|
+
* Business category (e.g., RETAIL, ENTERTAINMENT, etc.)
|
|
7965
|
+
*/
|
|
7966
|
+
vertical?: string;
|
|
7967
|
+
/**
|
|
7968
|
+
* Handle from resumable upload for profile picture
|
|
7969
|
+
*/
|
|
7970
|
+
profilePictureHandle?: string;
|
|
7971
|
+
};
|
|
7972
|
+
};
|
|
7973
|
+
|
|
7974
|
+
export type UpdateWhatsAppBusinessProfileResponse = ({
|
|
7975
|
+
success?: boolean;
|
|
7976
|
+
message?: string;
|
|
7977
|
+
});
|
|
7978
|
+
|
|
7979
|
+
export type UpdateWhatsAppBusinessProfileError = (unknown | {
|
|
7980
|
+
error?: string;
|
|
7981
|
+
});
|
|
7982
|
+
|
|
7983
|
+
export type GetWhatsAppPhoneNumbersData = {
|
|
7984
|
+
query?: {
|
|
7985
|
+
/**
|
|
7986
|
+
* Filter by profile
|
|
7987
|
+
*/
|
|
7988
|
+
profileId?: string;
|
|
7989
|
+
/**
|
|
7990
|
+
* Filter by status (by default excludes released numbers)
|
|
7991
|
+
*/
|
|
7992
|
+
status?: 'provisioning' | 'active' | 'suspended' | 'releasing' | 'released';
|
|
7993
|
+
};
|
|
7994
|
+
};
|
|
7995
|
+
|
|
7996
|
+
export type GetWhatsAppPhoneNumbersResponse = ({
|
|
7997
|
+
numbers?: Array<{
|
|
7998
|
+
_id?: string;
|
|
7999
|
+
phoneNumber?: string;
|
|
8000
|
+
country?: string;
|
|
8001
|
+
status?: 'pending_payment' | 'provisioning' | 'active' | 'suspended' | 'releasing' | 'released';
|
|
8002
|
+
profileId?: {
|
|
8003
|
+
[key: string]: unknown;
|
|
8004
|
+
};
|
|
8005
|
+
provisionedAt?: string;
|
|
8006
|
+
metaPreverifiedId?: string;
|
|
8007
|
+
metaVerificationStatus?: string;
|
|
8008
|
+
createdAt?: string;
|
|
8009
|
+
}>;
|
|
8010
|
+
});
|
|
8011
|
+
|
|
8012
|
+
export type GetWhatsAppPhoneNumbersError = ({
|
|
8013
|
+
error?: string;
|
|
8014
|
+
});
|
|
8015
|
+
|
|
8016
|
+
export type SearchAvailableWhatsAppNumbersData = {
|
|
8017
|
+
query?: {
|
|
8018
|
+
/**
|
|
8019
|
+
* Pattern to match within the phone number
|
|
8020
|
+
*/
|
|
8021
|
+
contains?: string;
|
|
8022
|
+
/**
|
|
8023
|
+
* Maximum results (default 20, max 100)
|
|
8024
|
+
*/
|
|
8025
|
+
limit?: number;
|
|
8026
|
+
/**
|
|
8027
|
+
* City name (e.g., "New York")
|
|
8028
|
+
*/
|
|
8029
|
+
locality?: string;
|
|
8030
|
+
/**
|
|
8031
|
+
* Area code to search (e.g., "212" for New York)
|
|
8032
|
+
*/
|
|
8033
|
+
prefix?: string;
|
|
8034
|
+
};
|
|
8035
|
+
};
|
|
8036
|
+
|
|
8037
|
+
export type SearchAvailableWhatsAppNumbersResponse = ({
|
|
8038
|
+
numbers?: Array<{
|
|
8039
|
+
[key: string]: unknown;
|
|
8040
|
+
}>;
|
|
8041
|
+
});
|
|
8042
|
+
|
|
8043
|
+
export type SearchAvailableWhatsAppNumbersError = ({
|
|
8044
|
+
error?: string;
|
|
8045
|
+
} | unknown);
|
|
8046
|
+
|
|
8047
|
+
export type GetPreverifiedWhatsAppNumbersData = {
|
|
8048
|
+
query: {
|
|
8049
|
+
/**
|
|
8050
|
+
* Profile ID to filter by
|
|
8051
|
+
*/
|
|
8052
|
+
profileId: string;
|
|
8053
|
+
};
|
|
8054
|
+
};
|
|
8055
|
+
|
|
8056
|
+
export type GetPreverifiedWhatsAppNumbersResponse = ({
|
|
8057
|
+
/**
|
|
8058
|
+
* IDs to pass in FB.login() extras.setup.preVerifiedPhone.ids
|
|
8059
|
+
*/
|
|
8060
|
+
preVerifiedIds?: Array<(string)>;
|
|
8061
|
+
numbers?: Array<{
|
|
8062
|
+
id?: string;
|
|
8063
|
+
phoneNumber?: string;
|
|
8064
|
+
metaPreverifiedId?: string;
|
|
8065
|
+
metaVerifiedAt?: string;
|
|
8066
|
+
metaVerificationExpiresAt?: string;
|
|
8067
|
+
}>;
|
|
8068
|
+
});
|
|
8069
|
+
|
|
8070
|
+
export type GetPreverifiedWhatsAppNumbersError = (unknown | {
|
|
8071
|
+
error?: string;
|
|
8072
|
+
});
|
|
8073
|
+
|
|
8074
|
+
export type PurchaseWhatsAppPhoneNumberData = {
|
|
8075
|
+
body: {
|
|
8076
|
+
/**
|
|
8077
|
+
* Profile to associate the number with
|
|
8078
|
+
*/
|
|
8079
|
+
profileId: string;
|
|
8080
|
+
};
|
|
8081
|
+
};
|
|
8082
|
+
|
|
8083
|
+
export type PurchaseWhatsAppPhoneNumberResponse = (({
|
|
8084
|
+
message?: string;
|
|
8085
|
+
checkoutUrl?: string;
|
|
8086
|
+
} | {
|
|
8087
|
+
message?: string;
|
|
8088
|
+
phoneNumber?: {
|
|
8089
|
+
id?: string;
|
|
8090
|
+
phoneNumber?: string;
|
|
8091
|
+
status?: string;
|
|
8092
|
+
country?: string;
|
|
8093
|
+
provisionedAt?: string;
|
|
8094
|
+
metaPreverifiedId?: string;
|
|
8095
|
+
metaVerificationStatus?: string;
|
|
8096
|
+
};
|
|
8097
|
+
}));
|
|
8098
|
+
|
|
8099
|
+
export type PurchaseWhatsAppPhoneNumberError = (unknown | {
|
|
8100
|
+
error?: string;
|
|
8101
|
+
});
|
|
8102
|
+
|
|
8103
|
+
export type GetWhatsAppPhoneNumberData = {
|
|
8104
|
+
path: {
|
|
8105
|
+
/**
|
|
8106
|
+
* Phone number record ID
|
|
8107
|
+
*/
|
|
8108
|
+
phoneNumberId: string;
|
|
8109
|
+
};
|
|
8110
|
+
};
|
|
8111
|
+
|
|
8112
|
+
export type GetWhatsAppPhoneNumberResponse = ({
|
|
8113
|
+
phoneNumber?: {
|
|
8114
|
+
id?: string;
|
|
8115
|
+
phoneNumber?: string;
|
|
8116
|
+
status?: 'pending_payment' | 'provisioning' | 'active' | 'suspended' | 'releasing' | 'released';
|
|
8117
|
+
country?: string;
|
|
8118
|
+
metaPreverifiedId?: string;
|
|
8119
|
+
metaVerificationStatus?: string;
|
|
8120
|
+
provisionedAt?: string;
|
|
8121
|
+
};
|
|
8122
|
+
});
|
|
8123
|
+
|
|
8124
|
+
export type GetWhatsAppPhoneNumberError = ({
|
|
8125
|
+
error?: string;
|
|
8126
|
+
});
|
|
8127
|
+
|
|
8128
|
+
export type ReleaseWhatsAppPhoneNumberData = {
|
|
8129
|
+
path: {
|
|
8130
|
+
/**
|
|
8131
|
+
* Phone number record ID
|
|
8132
|
+
*/
|
|
8133
|
+
phoneNumberId: string;
|
|
8134
|
+
};
|
|
8135
|
+
};
|
|
8136
|
+
|
|
8137
|
+
export type ReleaseWhatsAppPhoneNumberResponse = ({
|
|
8138
|
+
message?: string;
|
|
8139
|
+
phoneNumber?: {
|
|
8140
|
+
id?: string;
|
|
8141
|
+
phoneNumber?: string;
|
|
8142
|
+
/**
|
|
8143
|
+
* "released"
|
|
8144
|
+
*/
|
|
8145
|
+
status?: string;
|
|
8146
|
+
releasedAt?: string;
|
|
8147
|
+
};
|
|
8148
|
+
});
|
|
8149
|
+
|
|
8150
|
+
export type ReleaseWhatsAppPhoneNumberError = (unknown | {
|
|
8151
|
+
error?: string;
|
|
8152
|
+
});
|
|
8153
|
+
|
|
8154
|
+
export type RequestWhatsAppVerificationCodeData = {
|
|
8155
|
+
body?: {
|
|
8156
|
+
/**
|
|
8157
|
+
* Delivery method for the verification code
|
|
8158
|
+
*/
|
|
8159
|
+
method?: 'SMS' | 'VOICE';
|
|
8160
|
+
};
|
|
8161
|
+
path: {
|
|
8162
|
+
/**
|
|
8163
|
+
* Phone number record ID
|
|
8164
|
+
*/
|
|
8165
|
+
phoneNumberId: string;
|
|
8166
|
+
};
|
|
8167
|
+
};
|
|
8168
|
+
|
|
8169
|
+
export type RequestWhatsAppVerificationCodeResponse = ({
|
|
8170
|
+
message?: string;
|
|
8171
|
+
method?: 'SMS' | 'VOICE';
|
|
8172
|
+
});
|
|
8173
|
+
|
|
8174
|
+
export type RequestWhatsAppVerificationCodeError = (unknown | {
|
|
8175
|
+
error?: string;
|
|
8176
|
+
});
|
|
8177
|
+
|
|
8178
|
+
export type VerifyWhatsAppPhoneNumberData = {
|
|
8179
|
+
body: {
|
|
8180
|
+
/**
|
|
8181
|
+
* 6-digit verification code
|
|
8182
|
+
*/
|
|
8183
|
+
code: string;
|
|
8184
|
+
};
|
|
8185
|
+
path: {
|
|
8186
|
+
/**
|
|
8187
|
+
* Phone number record ID
|
|
8188
|
+
*/
|
|
8189
|
+
phoneNumberId: string;
|
|
8190
|
+
};
|
|
8191
|
+
};
|
|
8192
|
+
|
|
8193
|
+
export type VerifyWhatsAppPhoneNumberResponse = ({
|
|
8194
|
+
message?: string;
|
|
8195
|
+
metaVerifiedAt?: string;
|
|
8196
|
+
metaVerificationExpiresAt?: string;
|
|
8197
|
+
});
|
|
8198
|
+
|
|
8199
|
+
export type VerifyWhatsAppPhoneNumberError = (unknown | {
|
|
8200
|
+
error?: string;
|
|
8201
|
+
});
|