@jkt48connect-corp/baileys 7.2.8 → 7.2.9

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.
Files changed (78) hide show
  1. package/lib/Socket/socket.js +1 -1
  2. package/package.json +1 -1
  3. package/WAProto/index.d.ts +0 -48955
  4. package/lib/Defaults/index.d.ts +0 -282
  5. package/lib/Signal/libsignal.d.ts +0 -3
  6. package/lib/Socket/Client/abstract-socket-client.d.ts +0 -15
  7. package/lib/Socket/Client/index.d.ts +0 -3
  8. package/lib/Socket/Client/mobile-socket-client.d.ts +0 -12
  9. package/lib/Socket/Client/web-socket-client.d.ts +0 -12
  10. package/lib/Socket/business.d.ts +0 -170
  11. package/lib/Socket/chats.d.ts +0 -79
  12. package/lib/Socket/groups.d.ts +0 -113
  13. package/lib/Socket/index.d.ts +0 -172
  14. package/lib/Socket/messages-recv.d.ts +0 -158
  15. package/lib/Socket/messages-send.d.ts +0 -149
  16. package/lib/Socket/newsletter.d.ts +0 -132
  17. package/lib/Socket/registration.d.ts +0 -264
  18. package/lib/Socket/socket.d.ts +0 -42
  19. package/lib/Store/index.d.ts +0 -3
  20. package/lib/Store/make-cache-manager-store.d.ts +0 -14
  21. package/lib/Store/make-in-memory-store.d.ts +0 -117
  22. package/lib/Store/make-ordered-dictionary.d.ts +0 -13
  23. package/lib/Store/object-repository.d.ts +0 -10
  24. package/lib/Types/Auth.d.ts +0 -109
  25. package/lib/Types/Call.d.ts +0 -13
  26. package/lib/Types/Chat.d.ts +0 -107
  27. package/lib/Types/Contact.d.ts +0 -19
  28. package/lib/Types/Events.d.ts +0 -172
  29. package/lib/Types/GroupMetadata.d.ts +0 -56
  30. package/lib/Types/Label.d.ts +0 -46
  31. package/lib/Types/LabelAssociation.d.ts +0 -29
  32. package/lib/Types/Message.d.ts +0 -424
  33. package/lib/Types/Newsletter.d.ts +0 -92
  34. package/lib/Types/Product.d.ts +0 -78
  35. package/lib/Types/Signal.d.ts +0 -57
  36. package/lib/Types/Socket.d.ts +0 -116
  37. package/lib/Types/State.d.ts +0 -27
  38. package/lib/Types/index.d.ts +0 -66
  39. package/lib/Utils/auth-utils.d.ts +0 -18
  40. package/lib/Utils/baileys-event-stream.d.ts +0 -16
  41. package/lib/Utils/business.d.ts +0 -22
  42. package/lib/Utils/chat-utils.d.ts +0 -70
  43. package/lib/Utils/crypto.d.ts +0 -40
  44. package/lib/Utils/decode-wa-message.d.ts +0 -36
  45. package/lib/Utils/event-buffer.d.ts +0 -35
  46. package/lib/Utils/generics.d.ts +0 -88
  47. package/lib/Utils/history.d.ts +0 -19
  48. package/lib/Utils/index.d.ts +0 -17
  49. package/lib/Utils/link-preview.d.ts +0 -21
  50. package/lib/Utils/logger.d.ts +0 -2
  51. package/lib/Utils/lt-hash.d.ts +0 -12
  52. package/lib/Utils/make-mutex.d.ts +0 -7
  53. package/lib/Utils/messages-media.d.ts +0 -113
  54. package/lib/Utils/messages.d.ts +0 -74
  55. package/lib/Utils/noise-handler.d.ts +0 -20
  56. package/lib/Utils/process-message.d.ts +0 -41
  57. package/lib/Utils/signal.d.ts +0 -32
  58. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -12
  59. package/lib/Utils/validate-connection.d.ts +0 -11
  60. package/lib/WABinary/constants.d.ts +0 -27
  61. package/lib/WABinary/decode.d.ts +0 -6
  62. package/lib/WABinary/encode.d.ts +0 -2
  63. package/lib/WABinary/generic-utils.d.ts +0 -14
  64. package/lib/WABinary/index.d.ts +0 -5
  65. package/lib/WABinary/jid-utils.d.ts +0 -31
  66. package/lib/WABinary/types.d.ts +0 -18
  67. package/lib/WAM/BinaryInfo.d.ts +0 -8
  68. package/lib/WAM/constants.d.ts +0 -38
  69. package/lib/WAM/encode.d.ts +0 -2
  70. package/lib/WAM/index.d.ts +0 -3
  71. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -9
  72. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -22
  73. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -12
  74. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -12
  75. package/lib/WAUSync/Protocols/index.d.ts +0 -4
  76. package/lib/WAUSync/USyncQuery.d.ts +0 -26
  77. package/lib/WAUSync/USyncUser.d.ts +0 -10
  78. package/lib/WAUSync/index.d.ts +0 -3
@@ -1,424 +0,0 @@
1
- import { AxiosRequestConfig } from 'axios';
2
- import type { Logger } from 'pino';
3
- import type { Readable } from 'stream';
4
- import type { URL } from 'url';
5
- import { BinaryNode } from '../WABinary';
6
- import { proto } from '../../WAProto';
7
- import { MEDIA_HKDF_KEY_MAPPING } from '../Defaults';
8
- import type { GroupMetadata } from './GroupMetadata';
9
- import { CacheStore } from './Socket';
10
- export { proto as WAProto };
11
- export type WAMessage = proto.IWebMessageInfo;
12
- export type WAMessageContent = proto.IMessage;
13
- export type WAContactMessage = proto.Message.IContactMessage;
14
- export type WAContactsArrayMessage = proto.Message.IContactsArrayMessage;
15
- export type WAMessageKey = proto.IMessageKey;
16
- export type WATextMessage = proto.Message.IExtendedTextMessage;
17
- export type WAContextInfo = proto.IContextInfo;
18
- export type WALocationMessage = proto.Message.ILocationMessage;
19
- export type WALiveLocationMessage = proto.Message.ILiveLocationMessage;
20
- export type WAGenericMediaMessage = proto.Message.IVideoMessage | proto.Message.IImageMessage | proto.Message.IAudioMessage | proto.Message.IDocumentMessage | proto.Message.IStickerMessage;
21
- export import WAMessageStubType = proto.WebMessageInfo.StubType;
22
- export import WAMessageStatus = proto.WebMessageInfo.Status;
23
- export type WAMediaUpload = Buffer | {
24
- url: URL | string;
25
- } | {
26
- stream: Readable;
27
- };
28
- /** Set of message types that are supported by the library */
29
- export type MessageType = keyof proto.Message;
30
- export type DownloadableMessage = {
31
- mediaKey?: Uint8Array | null;
32
- directPath?: string | null;
33
- url?: string | null;
34
- };
35
- export type MessageReceiptType = 'read' | 'read-self' | 'hist_sync' | 'peer_msg' | 'sender' | 'inactive' | 'played' | undefined;
36
- export type MediaConnInfo = {
37
- auth: string;
38
- ttl: number;
39
- hosts: {
40
- hostname: string;
41
- maxContentLengthBytes: number;
42
- }[];
43
- fetchDate: Date;
44
- };
45
- export interface WAUrlInfo {
46
- 'canonical-url': string;
47
- 'matched-text': string;
48
- title: string;
49
- description?: string;
50
- jpegThumbnail?: Buffer;
51
- highQualityThumbnail?: proto.Message.IImageMessage;
52
- originalThumbnailUrl?: string;
53
- }
54
- export interface Media {
55
- image?: WAMediaUpload;
56
- video?: WAMediaUpload;
57
- }
58
- export interface Carousel {
59
- image?: WAMediaUpload;
60
- video?: WAMediaUpload;
61
- product?: WASendableProduct;
62
- title?: string;
63
- caption?: string;
64
- footer?: string;
65
- buttons?: proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton[];
66
- }
67
- type Mentionable = {
68
- /** list of jids that are mentioned in the accompanying text */
69
- mentions?: string[];
70
- };
71
- type Contextable = {
72
- /** add contextInfo to the message */
73
- contextInfo?: proto.IContextInfo;
74
- };
75
- type ViewOnce = {
76
- viewOnce?: boolean;
77
- };
78
- type Buttonable = {
79
- /** add buttons to the message */
80
- buttons?: proto.Message.ButtonsMessage.IButton[];
81
- };
82
- type Templatable = {
83
- /** add buttons to the message (conflicts with normal buttons)*/
84
- templateButtons?: proto.IHydratedTemplateButton[];
85
- footer?: string;
86
- };
87
- type Interactiveable = {
88
- /** add buttons to the message (conflicts with normal buttons)*/
89
- interactiveButtons?: proto.Message.InteractiveMessage.NativeFlowMessage.NativeFlowButton[];
90
- title?: string;
91
- subtitle?: string;
92
- media?: boolean;
93
- };
94
- type Shopable = {
95
- shop?: proto.Message.InteractiveMessage.ShopMessage.Surface;
96
- id?: string;
97
- title?: string;
98
- subtitle?: string;
99
- media?: boolean;
100
- };
101
- type Collectionable = {
102
- collection?: {
103
- bizJid?: string;
104
- id?: string;
105
- version?: number;
106
- };
107
- title?: string;
108
- subtitle?: string;
109
- media?: boolean;
110
- };
111
- type Cardsable = {
112
- cards?: Carousel[];
113
- title?: string;
114
- subtitle?: string;
115
- };
116
- type Editable = {
117
- edit?: WAMessageKey;
118
- };
119
- type Listable = {
120
- /** Sections of the List */
121
- sections?: proto.Message.ListMessage.ISection[];
122
- /** Title of a List Message only */
123
- title?: string;
124
- /** Text of the button on the list (required) */
125
- buttonText?: string;
126
- };
127
- type WithDimensions = {
128
- width?: number;
129
- height?: number;
130
- };
131
- export type PollMessageOptions = {
132
- name: string;
133
- selectableCount?: number;
134
- values: string[];
135
- /** 32 byte message secret to encrypt poll selections */
136
- messageSecret?: Uint8Array;
137
- toAnnouncementGroup?: boolean;
138
- };
139
- export type PollResultMessage = {
140
- name: string;
141
- votes: proto.Message.PollResultSnapshotMessage.PollVote[];
142
- messageSecret?: Uint8Array;
143
- };
144
- type SharePhoneNumber = {
145
- sharePhoneNumber: boolean;
146
- };
147
- type RequestPhoneNumber = {
148
- requestPhoneNumber: boolean;
149
- };
150
- export type WASendableProduct = Omit<proto.Message.ProductMessage.IProductSnapshot, 'productImage'> & {
151
- productImage: WAMediaUpload;
152
- };
153
- export type MediaType = keyof typeof MEDIA_HKDF_KEY_MAPPING;
154
- export type AnyMediaMessageContent = (({
155
- image: WAMediaUpload;
156
- caption?: string;
157
- jpegThumbnail?: string;
158
- } & Mentionable & Contextable & Buttonable & Templatable & Interactiveable & Shopable & Collectionable & Cardsable & WithDimensions) | ({
159
- video: WAMediaUpload;
160
- caption?: string;
161
- gifPlayback?: boolean;
162
- jpegThumbnail?: string;
163
- /** if set to true, will send as a `video note` */
164
- ptv?: boolean;
165
- } & Mentionable & Contextable & Buttonable & Templatable & Interactiveable & Shopable & Collectionable & Cardsable & WithDimensions) | {
166
- audio: WAMediaUpload;
167
- /** if set to true, will send as a `voice note` */
168
- ptt?: boolean;
169
- /** optionally tell the duration of the audio */
170
- seconds?: number;
171
- } | ({
172
- sticker: WAMediaUpload;
173
- isAnimated?: boolean;
174
- } & WithDimensions) | ({
175
- document: WAMediaUpload;
176
- mimetype: string;
177
- fileName?: string;
178
- caption?: string;
179
- } & Contextable & Buttonable & Templatable & Interactiveable & Shopable & Collectionable & Cardsable)) & {
180
- mimetype?: string;
181
- } & Editable;
182
- export type ButtonReplyInfo = {
183
- displayText: string;
184
- id: string;
185
- index: number;
186
- text: string;
187
- nativeFlow: proto.Message.InteractiveResponseMessage.NativeFlowResponseMessage;
188
- };
189
- export type GroupInviteInfo = {
190
- inviteCode: string;
191
- inviteExpiration: number;
192
- text: string;
193
- jid: string;
194
- subject: string;
195
- thumbnail: Buffer;
196
- };
197
- export type PinInChatInfo = {
198
- key: WAMessageKey;
199
- type?: number;
200
- time?: number;
201
- };
202
- export type KeepInChatInfo = {
203
- key: WAMessageKey;
204
- type?: number;
205
- time?: number;
206
- };
207
- export type CallCreationInfo = {
208
- time?: number;
209
- title?: string;
210
- type?: number;
211
- };
212
- export type PaymentInviteInfo = {
213
- type?: number;
214
- expiry?: number;
215
- };
216
- export type RequestPaymentInfo = {
217
- expiry: number;
218
- amount: number;
219
- currency: string;
220
- from: string;
221
- note?: string;
222
- sticker?: WAMediaUpload;
223
- background: string;
224
- /** add contextInfo to the message */
225
- contextInfo?: proto.IContextInfo;
226
- };
227
- export type EventsInfo = {
228
- isCanceled?: boolean;
229
- name: string;
230
- description: string;
231
- joinLink?: string;
232
- startTime?: number;
233
- messageSecret?: Uint8Array;
234
- };
235
- export type AdminInviteInfo = {
236
- inviteExpiration: number;
237
- text: string;
238
- jid: string;
239
- subject: string;
240
- thumbnail: Buffer;
241
- };
242
- export type OrderInfo = {
243
- id: number;
244
- thumbnail: string;
245
- itemCount: number;
246
- status: number;
247
- surface: number;
248
- title: string;
249
- text: string;
250
- seller: string;
251
- token: string;
252
- amount: number;
253
- currency: string;
254
- };
255
- export type AnyRegularMessageContent = (({
256
- text: string;
257
- linkPreview?: WAUrlInfo | null;
258
- } & Mentionable & Contextable & Buttonable & Templatable & Interactiveable & Shopable & Collectionable & Cardsable & Listable & Editable) | AnyMediaMessageContent | ({
259
- poll: PollMessageOptions;
260
- } | {
261
- pollResult: PollResultMessage;
262
- } & Mentionable & Contextable & Buttonable & Templatable & Editable) | {
263
- contacts: {
264
- displayName?: string;
265
- contacts: proto.Message.IContactMessage[];
266
- };
267
- } | {
268
- location: WALocationMessage;
269
- } | {
270
- liveLocation: WALiveLocationMessage;
271
- } | {
272
- react: proto.Message.IReactionMessage;
273
- } | {
274
- buttonReply: ButtonReplyInfo;
275
- type: 'template' | 'plain' | 'interactive';
276
- } | {
277
- groupInvite: GroupInviteInfo;
278
- } | {
279
- pin: WAMessageKey;
280
- type: proto.PinInChat.Type;
281
- /**
282
- * 24 hours, 7 days, 30 days
283
- */
284
- time?: 86400 | 604800 | 2592000;
285
- } | {
286
- keep: WAMessageKey;
287
- type: number;
288
- /**
289
- * 24 hours, 7 days, 90 days
290
- */
291
- time?: 86400 | 604800 | 7776000;
292
- } | {
293
- paymentInvite: PaymentInviteInfo;
294
- } | {
295
- requestPayment: RequestPaymentInfo;
296
- } | {
297
- event: EventsInfo;
298
- } | {
299
- order: OrderInfo;
300
- } | {
301
- call: CallCreationInfo;
302
- } | {
303
- inviteAdmin: AdminInviteInfo;
304
- } | {
305
- listReply: Omit<proto.Message.IListResponseMessage, 'contextInfo'>;
306
- } | ({
307
- product: WASendableProduct;
308
- businessOwnerJid?: string;
309
- body?: string;
310
- footer?: string;
311
- } & Mentionable & Contextable & Interactiveable & Shopable & Collectionable & Cardsable & WithDimensions) | SharePhoneNumber | RequestPhoneNumber) & ViewOnce;
312
- export type AnyMessageContent = AnyRegularMessageContent | {
313
- forward: WAMessage;
314
- force?: boolean;
315
- } | {
316
- /** Delete your message or anyone's message in a group (admin required) */
317
- delete: WAMessageKey;
318
- } | {
319
- disappearingMessagesInChat: boolean | number;
320
- };
321
- export type GroupMetadataParticipants = Pick<GroupMetadata, 'participants'>;
322
- type MinimalRelayOptions = {
323
- /** override the message ID with a custom provided string */
324
- messageId?: string;
325
- /** cached group metadata, use to prevent redundant requests to WA & speed up msg sending */
326
- cachedGroupMetadata?: (jid: string) => Promise<GroupMetadataParticipants | undefined>;
327
- };
328
- export type MessageRelayOptions = MinimalRelayOptions & {
329
- /** only send to a specific participant; used when a message decryption fails for a single user */
330
- participant?: {
331
- jid: string;
332
- count: number;
333
- };
334
- /** additional attributes to add to the WA binary node */
335
- additionalAttributes?: {
336
- [_: string]: string;
337
- };
338
- additionalNodes?: BinaryNode[];
339
- /** should we use the devices cache, or fetch afresh from the server; default assumed to be "true" */
340
- useUserDevicesCache?: boolean;
341
- /** jid list of participants for status@broadcast */
342
- statusJidList?: string[];
343
- };
344
- export type MiscMessageGenerationOptions = MinimalRelayOptions & {
345
- /** optional, if you want to manually set the timestamp of the message */
346
- timestamp?: Date;
347
- /** the message you want to quote */
348
- quoted?: WAMessage;
349
- additionalNodes?: BinaryNode[];
350
- /** disappearing messages settings */
351
- ephemeralExpiration?: number | string;
352
- /** timeout for media upload to WA server */
353
- mediaUploadTimeoutMs?: number;
354
- /** jid list of participants for status@broadcast */
355
- statusJidList?: string[];
356
- /** backgroundcolor for status */
357
- backgroundColor?: string;
358
- /** font type for status */
359
- font?: number;
360
- /** if it is broadcast */
361
- broadcast?: boolean;
362
- /** delay of message time */
363
- delay?: number;
364
- };
365
- export type MessageGenerationOptionsFromContent = MiscMessageGenerationOptions & {
366
- userJid: string;
367
- };
368
- export type WAMediaUploadFunctionOpts = {
369
- fileEncSha256B64: string;
370
- mediaType: MediaType;
371
- newsletter?: boolean;
372
- timeoutMs?: number;
373
- };
374
- export type WAMediaUploadFunction = (readStream: Readable | Buffer, opts: WAMediaUploadFunctionOpts) => Promise<{
375
- mediaUrl: string;
376
- directPath: string;
377
- handle?: string;
378
- }>;
379
- export type MediaGenerationOptions = {
380
- logger?: Logger;
381
- mediaTypeOverride?: MediaType;
382
- upload: WAMediaUploadFunction;
383
- /** cache media so it does not have to be uploaded again */
384
- mediaCache?: CacheStore;
385
- mediaUploadTimeoutMs?: number;
386
- options?: AxiosRequestConfig;
387
- /** the message you want to quote */
388
- quoted?: WAMessage;
389
- backgroundColor?: string;
390
- font?: number;
391
- /** The message is for newsletter? */
392
- newsletter?: boolean;
393
- };
394
- export type MessageContentGenerationOptions = MediaGenerationOptions & {
395
- getUrlInfo?: (text: string) => Promise<WAUrlInfo | undefined>;
396
- getProfilePicUrl?: (jid: string, type: 'image' | 'preview') => Promise<string | undefined>;
397
- };
398
- export type MessageGenerationOptions = MessageContentGenerationOptions & MessageGenerationOptionsFromContent;
399
- /**
400
- * Type of message upsert
401
- * 1. notify => notify the user, this message was just received
402
- * 2. append => append the message to the chat history, no notification required
403
- */
404
- export type MessageUpsertType = 'append' | 'notify';
405
- export type MessageUserReceipt = proto.IUserReceipt;
406
- export type WAMessageUpdate = {
407
- update: Partial<WAMessage>;
408
- key: proto.IMessageKey;
409
- };
410
- export type WAMessageCursor = {
411
- before: WAMessageKey | undefined;
412
- } | {
413
- after: WAMessageKey | undefined;
414
- };
415
- export type MessageUserReceiptUpdate = {
416
- key: proto.IMessageKey;
417
- receipt: MessageUserReceipt;
418
- };
419
- export type MediaDecryptionKeyInfo = {
420
- iv: Buffer;
421
- cipherKey: Buffer;
422
- macKey?: Buffer;
423
- };
424
- export type MinimalMessage = Pick<proto.IWebMessageInfo, 'key' | 'messageTimestamp'>;
@@ -1,92 +0,0 @@
1
- import { proto } from '../../WAProto';
2
- export type NewsletterReactionMode = 'ALL' | 'BASIC' | 'NONE';
3
- export type NewsletterState = 'ACTIVE' | 'GEOSUSPENDED' | 'SUSPENDED';
4
- export type NewsletterVerification = 'VERIFIED' | 'UNVERIFIED';
5
- export type NewsletterMute = 'ON' | 'OFF' | 'UNDEFINED';
6
- export type NewsletterViewRole = 'ADMIN' | 'GUEST' | 'OWNER' | 'SUBSCRIBER';
7
- export type NewsletterViewerMetadata = {
8
- mute: NewsletterMute;
9
- view_role: NewsletterViewRole;
10
- };
11
- export type NewsletterMetadata = {
12
- /**jid of newsletter */
13
- id: string;
14
- /**state of newsletter */
15
- state: NewsletterState;
16
- /**creation timestamp of newsletter */
17
- creation_time: number;
18
- /**name of newsletter */
19
- name: string;
20
- /**timestamp of last name modification of newsletter */
21
- nameTime: number;
22
- /**description of newsletter */
23
- description: string;
24
- /**timestamp of last description modification of newsletter */
25
- descriptionTime: number;
26
- /**invite code of newsletter */
27
- invite: string;
28
- /**i dont know */
29
- handle: null;
30
- /**direct path of picture */
31
- picture: string | null;
32
- /**direct path of picture preview (lower quality) */
33
- preview: string | null;
34
- /**reaction mode of newsletter */
35
- reaction_codes?: NewsletterReactionMode;
36
- /**subscribers count of newsletter */
37
- subscribers: number;
38
- /**verification state of newsletter */
39
- verification: NewsletterVerification;
40
- /**viewer metadata */
41
- viewer_metadata: NewsletterViewerMetadata;
42
- };
43
- export type SubscriberAction = 'promote' | 'demote';
44
- export type ReactionModeUpdate = {
45
- reaction_codes: {
46
- blocked_codes: null;
47
- enabled_ts_sec: null;
48
- value: NewsletterReactionMode;
49
- };
50
- };
51
- /**only exists reaction mode update */
52
- export type NewsletterSettingsUpdate = ReactionModeUpdate;
53
- export type NewsletterReaction = {
54
- count: number;
55
- code: string;
56
- };
57
- export type NewsletterFetchedUpdate = {
58
- /**id of message in newsletter, starts from 100 */
59
- server_id: string;
60
- /**count of views in this message */
61
- views?: number;
62
- /**reactions in this message */
63
- reactions: NewsletterReaction[];
64
- /**the message, if you requested only updates, you will not receive message */
65
- message?: proto.IWebMessageInfo;
66
- };
67
- export declare enum MexOperations {
68
- PROMOTE = "NotificationNewsletterAdminPromote",
69
- DEMOTE = "NotificationNewsletterAdminDemote",
70
- UPDATE = "NotificationNewsletterUpdate"
71
- }
72
- export declare enum XWAPaths {
73
- PROMOTE = "xwa2_notify_newsletter_admin_promote",
74
- DEMOTE = "xwa2_notify_newsletter_admin_demote",
75
- ADMIN_COUNT = "xwa2_newsletter_admin",
76
- CREATE = "xwa2_newsletter_create",
77
- NEWSLETTER = "xwa2_newsletter",
78
- METADATA_UPDATE = "xwa2_notify_newsletter_on_metadata_update"
79
- }
80
- export declare enum QueryIds {
81
- JOB_MUTATION = "7150902998257522",
82
- METADATA = "6620195908089573",
83
- UNFOLLOW = "7238632346214362",
84
- FOLLOW = "7871414976211147",
85
- UNMUTE = "7337137176362961",
86
- MUTE = "25151904754424642",
87
- CREATE = "6996806640408138",
88
- ADMIN_COUNT = "7130823597031706",
89
- CHANGE_OWNER = "7341777602580933",
90
- DELETE = "8316537688363079",
91
- DEMOTE = "6551828931592903"
92
- }
@@ -1,78 +0,0 @@
1
- import { WAMediaUpload } from './Message';
2
- export type CatalogResult = {
3
- data: {
4
- paging: {
5
- cursors: {
6
- before: string;
7
- after: string;
8
- };
9
- };
10
- data: any[];
11
- };
12
- };
13
- export type ProductCreateResult = {
14
- data: {
15
- product: {};
16
- };
17
- };
18
- export type CatalogStatus = {
19
- status: string;
20
- canAppeal: boolean;
21
- };
22
- export type CatalogCollection = {
23
- id: string;
24
- name: string;
25
- products: Product[];
26
- status: CatalogStatus;
27
- };
28
- export type ProductAvailability = 'in stock';
29
- export type ProductBase = {
30
- name: string;
31
- retailerId?: string;
32
- url?: string;
33
- description: string;
34
- price: number;
35
- currency: string;
36
- isHidden?: boolean;
37
- };
38
- export type ProductCreate = ProductBase & {
39
- /** ISO country code for product origin. Set to undefined for no country */
40
- originCountryCode: string | undefined;
41
- /** images of the product */
42
- images: WAMediaUpload[];
43
- };
44
- export type ProductUpdate = Omit<ProductCreate, 'originCountryCode'>;
45
- export type Product = ProductBase & {
46
- id: string;
47
- imageUrls: {
48
- [_: string]: string;
49
- };
50
- reviewStatus: {
51
- [_: string]: string;
52
- };
53
- availability: ProductAvailability;
54
- };
55
- export type OrderPrice = {
56
- currency: string;
57
- total: number;
58
- };
59
- export type OrderProduct = {
60
- id: string;
61
- imageUrl: string;
62
- name: string;
63
- quantity: number;
64
- currency: string;
65
- price: number;
66
- };
67
- export type OrderDetails = {
68
- price: OrderPrice;
69
- products: OrderProduct[];
70
- };
71
- export type CatalogCursor = string;
72
- export type GetCatalogOptions = {
73
- /** cursor to start from */
74
- cursor?: CatalogCursor;
75
- /** number of products to fetch */
76
- limit?: number;
77
- jid?: string;
78
- };
@@ -1,57 +0,0 @@
1
- import { proto } from '../../WAProto';
2
- type DecryptGroupSignalOpts = {
3
- group: string;
4
- authorJid: string;
5
- msg: Uint8Array;
6
- };
7
- type ProcessSenderKeyDistributionMessageOpts = {
8
- item: proto.Message.ISenderKeyDistributionMessage;
9
- authorJid: string;
10
- };
11
- type DecryptSignalProtoOpts = {
12
- jid: string;
13
- type: 'pkmsg' | 'msg';
14
- ciphertext: Uint8Array;
15
- };
16
- type EncryptMessageOpts = {
17
- jid: string;
18
- data: Uint8Array;
19
- };
20
- type EncryptGroupMessageOpts = {
21
- group: string;
22
- data: Uint8Array;
23
- meId: string;
24
- };
25
- type PreKey = {
26
- keyId: number;
27
- publicKey: Uint8Array;
28
- };
29
- type SignedPreKey = PreKey & {
30
- signature: Uint8Array;
31
- };
32
- type E2ESession = {
33
- registrationId: number;
34
- identityKey: Uint8Array;
35
- signedPreKey: SignedPreKey;
36
- preKey: PreKey;
37
- };
38
- type E2ESessionOpts = {
39
- jid: string;
40
- session: E2ESession;
41
- };
42
- export type SignalRepository = {
43
- decryptGroupMessage(opts: DecryptGroupSignalOpts): Promise<Uint8Array>;
44
- processSenderKeyDistributionMessage(opts: ProcessSenderKeyDistributionMessageOpts): Promise<void>;
45
- decryptMessage(opts: DecryptSignalProtoOpts): Promise<Uint8Array>;
46
- encryptMessage(opts: EncryptMessageOpts): Promise<{
47
- type: 'pkmsg' | 'msg';
48
- ciphertext: Uint8Array;
49
- }>;
50
- encryptGroupMessage(opts: EncryptGroupMessageOpts): Promise<{
51
- senderKeyDistributionMessage: Uint8Array;
52
- ciphertext: Uint8Array;
53
- }>;
54
- injectE2ESession(opts: E2ESessionOpts): Promise<void>;
55
- jidToSignalProtocolAddress(jid: string): string;
56
- };
57
- export {};