sauruspro-bail 0.0.0-stage → 5.0.0
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 +129 -2
- package/WAProto/GenerateStatics.sh +3 -0
- package/WAProto/WAProto.proto +6754 -0
- package/WAProto/fix-imports.js +85 -0
- package/WAProto/index.d.ts +79257 -0
- package/WAProto/index.js +242946 -0
- package/docs/CHANGELOG.md +22 -0
- package/docs/NEWSLETTER-STATUS.md +120 -0
- package/docs/SPR.md +51 -0
- package/engine-requirements.js +10 -0
- package/lib/Defaults/index.js +131 -0
- package/lib/Signal/Group/ciphertext-message.js +12 -0
- package/lib/Signal/Group/group-session-builder.js +30 -0
- package/lib/Signal/Group/group_cipher.js +82 -0
- package/lib/Signal/Group/index.js +12 -0
- package/lib/Signal/Group/keyhelper.js +18 -0
- package/lib/Signal/Group/sender-chain-key.js +26 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
- package/lib/Signal/Group/sender-key-message.js +66 -0
- package/lib/Signal/Group/sender-key-name.js +48 -0
- package/lib/Signal/Group/sender-key-record.js +41 -0
- package/lib/Signal/Group/sender-key-state.js +84 -0
- package/lib/Signal/Group/sender-message-key.js +26 -0
- package/lib/Signal/libsignal.js +431 -0
- package/lib/Signal/lid-mapping.js +277 -0
- package/lib/Socket/Client/index.js +3 -0
- package/lib/Socket/Client/types.js +11 -0
- package/lib/Socket/Client/websocket.js +54 -0
- package/lib/Socket/MessageBuilder.js +3729 -0
- package/lib/Socket/business.js +379 -0
- package/lib/Socket/chats.js +1198 -0
- package/lib/Socket/communities.js +431 -0
- package/lib/Socket/graphql.js +716 -0
- package/lib/Socket/groups.js +374 -0
- package/lib/Socket/index.js +92 -0
- package/lib/Socket/interop.js +463 -0
- package/lib/Socket/luxu.js +387 -0
- package/lib/Socket/message-builder.js +556 -0
- package/lib/Socket/messages-recv.js +1916 -0
- package/lib/Socket/messages-send.js +1516 -0
- package/lib/Socket/mex.js +54 -0
- package/lib/Socket/newsletter.js +641 -0
- package/lib/Socket/privacy.js +318 -0
- package/lib/Socket/socket.js +1115 -0
- package/lib/Socket/username.js +236 -0
- package/lib/Store/index.js +10 -0
- package/lib/Store/keyed-db.js +108 -0
- package/lib/Store/make-cache-manager-store.js +85 -0
- package/lib/Store/make-in-memory-store.js +244 -0
- package/lib/Store/make-ordered-dictionary.js +75 -0
- package/lib/Store/object-repository.js +32 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Bussines.js +2 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Chat.js +8 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/Label.js +25 -0
- package/lib/Types/LabelAssociation.js +7 -0
- package/lib/Types/Message.js +11 -0
- package/lib/Types/Mex.js +111 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Socket.js +3 -0
- package/lib/Types/State.js +56 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/index.js +26 -0
- package/lib/Utils/auth-utils.js +302 -0
- package/lib/Utils/browser-utils.js +48 -0
- package/lib/Utils/business.js +231 -0
- package/lib/Utils/chat-utils.js +872 -0
- package/lib/Utils/companion-reg-client-utils.js +35 -0
- package/lib/Utils/crypto.js +118 -0
- package/lib/Utils/decode-wa-message.js +350 -0
- package/lib/Utils/dinolith-spr.d.ts +26 -0
- package/lib/Utils/dinolith-spr.js +521 -0
- package/lib/Utils/event-buffer.js +622 -0
- package/lib/Utils/generics.js +403 -0
- package/lib/Utils/history.js +134 -0
- package/lib/Utils/identity-change-handler.js +50 -0
- package/lib/Utils/index.js +26 -0
- package/lib/Utils/link-preview.js +85 -0
- package/lib/Utils/logger.js +3 -0
- package/lib/Utils/lt-hash.js +8 -0
- package/lib/Utils/make-mutex.js +33 -0
- package/lib/Utils/message-composer.js +273 -0
- package/lib/Utils/message-retry-manager.js +265 -0
- package/lib/Utils/messages-media.js +870 -0
- package/lib/Utils/messages.js +1394 -0
- package/lib/Utils/newsletter-status.d.ts +163 -0
- package/lib/Utils/newsletter-status.js +738 -0
- package/lib/Utils/noise-handler.js +201 -0
- package/lib/Utils/offline-node-processor.js +40 -0
- package/lib/Utils/pre-key-manager.js +106 -0
- package/lib/Utils/process-message.js +630 -0
- package/lib/Utils/reporting-utils.js +258 -0
- package/lib/Utils/signal.js +201 -0
- package/lib/Utils/stanza-ack.js +38 -0
- package/lib/Utils/sticker.js +133 -0
- package/lib/Utils/sync-action-utils.js +49 -0
- package/lib/Utils/tc-token-utils.js +163 -0
- package/lib/Utils/use-multi-file-auth-state.js +121 -0
- package/lib/Utils/use-sqlite-auth-state.js +162 -0
- package/lib/Utils/validate-connection.js +203 -0
- package/lib/WABinary/constants.js +1301 -0
- package/lib/WABinary/decode.js +262 -0
- package/lib/WABinary/encode.js +220 -0
- package/lib/WABinary/generic-utils.js +204 -0
- package/lib/WABinary/index.js +6 -0
- package/lib/WABinary/jid-utils.js +98 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WAM/BinaryInfo.js +10 -0
- package/lib/WAM/constants.js +22853 -0
- package/lib/WAM/encode.js +150 -0
- package/lib/WAM/index.js +4 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +53 -0
- package/lib/WAUSync/Protocols/USyncBusinessProtocol.js +43 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +54 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncFeatureProtocol.js +58 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncPictureProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncSidelistProtocol.js +28 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +39 -0
- package/lib/WAUSync/Protocols/USyncTextStatusProtocol.js +38 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +27 -0
- package/lib/WAUSync/Protocols/index.js +12 -0
- package/lib/WAUSync/USyncQuery.js +151 -0
- package/lib/WAUSync/USyncUser.js +56 -0
- package/lib/WAUSync/index.js +3 -0
- package/lib/index.js +67 -0
- package/package.json +147 -5
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { proto } from '../../WAProto/index.js'
|
|
2
|
+
|
|
3
|
+
export type NewsletterStatusMediaType = 'audio' | 'gif' | 'image' | 'video'
|
|
4
|
+
export type NewsletterStatusInteractionType = 'question' | 'question_response' | 'question_reshare'
|
|
5
|
+
export type NewsletterStatusContentType = 'text' | 'media' | 'reaction'
|
|
6
|
+
|
|
7
|
+
export interface NewsletterStatusSendOptions {
|
|
8
|
+
messageId?: string
|
|
9
|
+
mediaHandle?: string | number
|
|
10
|
+
mediaId?: string | number
|
|
11
|
+
parentServerId?: string | number
|
|
12
|
+
responseServerId?: string | number
|
|
13
|
+
interactionType?: NewsletterStatusInteractionType
|
|
14
|
+
aiContent?: boolean
|
|
15
|
+
statusAttribution?: boolean
|
|
16
|
+
ackTimeoutMs?: number
|
|
17
|
+
resolveServerId?: boolean
|
|
18
|
+
serverIdTimeoutMs?: number
|
|
19
|
+
transport?: string
|
|
20
|
+
[key: string]: any
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface NewsletterStatusNodeInput {
|
|
24
|
+
jid: string
|
|
25
|
+
message?: proto.IMessage
|
|
26
|
+
payload?: Uint8Array
|
|
27
|
+
messageId: string
|
|
28
|
+
mediaType?: NewsletterStatusMediaType
|
|
29
|
+
mediaHandle?: string | number
|
|
30
|
+
mediaId?: string | number
|
|
31
|
+
parentServerId?: string | number
|
|
32
|
+
responseServerId?: string | number
|
|
33
|
+
interactionType?: NewsletterStatusInteractionType
|
|
34
|
+
aiContent?: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface NewsletterStatusReactionNodeInput {
|
|
38
|
+
jid: string
|
|
39
|
+
messageId: string
|
|
40
|
+
parentServerId: string | number
|
|
41
|
+
reaction: string
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface NewsletterStatusRevokeNodeInput {
|
|
45
|
+
jid: string
|
|
46
|
+
statusId: string
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface NewsletterStatusAck {
|
|
50
|
+
class?: string
|
|
51
|
+
from?: string
|
|
52
|
+
id?: string
|
|
53
|
+
t?: number
|
|
54
|
+
serverId?: number
|
|
55
|
+
edit?: string
|
|
56
|
+
error?: string
|
|
57
|
+
applicationError?: number
|
|
58
|
+
backoff?: number
|
|
59
|
+
node: any
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface NewsletterStatusFetchOptions {
|
|
63
|
+
count?: number
|
|
64
|
+
before?: string | number
|
|
65
|
+
after?: string | number
|
|
66
|
+
viewRole?: string
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface NewsletterStatusEntry {
|
|
70
|
+
id?: string
|
|
71
|
+
serverId?: number
|
|
72
|
+
t?: number
|
|
73
|
+
isSender: boolean
|
|
74
|
+
type?: string
|
|
75
|
+
edit?: string
|
|
76
|
+
mediaType?: NewsletterStatusMediaType
|
|
77
|
+
interactionType?: NewsletterStatusInteractionType
|
|
78
|
+
reaction?: string
|
|
79
|
+
adminProfile?: NewsletterAdminProfileInfo
|
|
80
|
+
paidPartnership: boolean
|
|
81
|
+
aiContent: boolean
|
|
82
|
+
editTimestamp?: number
|
|
83
|
+
originalTimestamp?: number
|
|
84
|
+
reactionCounts?: { code?: string, count?: number }[]
|
|
85
|
+
viewsCount?: number
|
|
86
|
+
responsesCount?: number
|
|
87
|
+
message?: proto.Message
|
|
88
|
+
node: any
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface NewsletterAdminProfileInfo {
|
|
92
|
+
id?: string
|
|
93
|
+
name?: string
|
|
94
|
+
pictureId?: string
|
|
95
|
+
pictureDirectPath?: string
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface NewsletterStatusUpdatesFetchOptions {
|
|
99
|
+
count?: number
|
|
100
|
+
since?: number
|
|
101
|
+
before?: string | number
|
|
102
|
+
after?: string | number
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface NewsletterStatusList {
|
|
106
|
+
jid?: string
|
|
107
|
+
t?: number
|
|
108
|
+
statuses: NewsletterStatusEntry[]
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export type NewsletterStatusSendResult = proto.WebMessageInfo & {
|
|
112
|
+
newsletterStatusServerId?: number
|
|
113
|
+
newsletterStatusAck?: NewsletterStatusAck
|
|
114
|
+
newsletterStatusResponse?: any
|
|
115
|
+
newsletterStatusDelivered?: any
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export const NEWSLETTER_SERVER_ID_MIN: number
|
|
119
|
+
export const NEWSLETTER_SERVER_ID_MAX: number
|
|
120
|
+
|
|
121
|
+
export function toNewsletterServerId(value: string | number, label?: string): string
|
|
122
|
+
|
|
123
|
+
export function waitForNewsletterStatusServerId(sock: any, options: {
|
|
124
|
+
jid?: string
|
|
125
|
+
messageId?: string
|
|
126
|
+
timeoutMs?: number
|
|
127
|
+
}): Promise<{ serverId: number, node: any } | undefined> & { cancel(): void }
|
|
128
|
+
|
|
129
|
+
export interface NewsletterStatusStanzaResult {
|
|
130
|
+
key: {
|
|
131
|
+
remoteJid: string
|
|
132
|
+
fromMe: true
|
|
133
|
+
id: string
|
|
134
|
+
}
|
|
135
|
+
status: number
|
|
136
|
+
newsletterStatusServerId?: number
|
|
137
|
+
newsletterStatusAck?: NewsletterStatusAck
|
|
138
|
+
newsletterStatusResponse?: any
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function getNewsletterStatusMediaType(message: proto.IMessage): NewsletterStatusMediaType | undefined
|
|
142
|
+
export function withNewsletterStatusAttribution<T extends Record<string, any>>(content: T): T
|
|
143
|
+
export function parseNewsletterStatusAck(node: any, reference?: { jid?: string, messageId?: string }): NewsletterStatusAck
|
|
144
|
+
export function buildNewsletterAdminProfileStatusMessage(message: proto.IMessage): proto.Message
|
|
145
|
+
export function buildNewsletterStatusNode(input: NewsletterStatusNodeInput): any
|
|
146
|
+
export function buildNewsletterStatusReactionNode(input: NewsletterStatusReactionNodeInput): any
|
|
147
|
+
export function buildNewsletterStatusRevokeNode(input: NewsletterStatusRevokeNodeInput): any
|
|
148
|
+
export function makeNewsletterStatusSender(sock: any, config: any): (jid: string, content: any, options?: NewsletterStatusSendOptions) => Promise<NewsletterStatusSendResult>
|
|
149
|
+
export function makeNewsletterStatusReactionSender(sock: any): (jid: string, parentServerId: string | number, reaction: string, options?: Pick<NewsletterStatusSendOptions, 'messageId' | 'ackTimeoutMs'>) => Promise<NewsletterStatusStanzaResult>
|
|
150
|
+
export function makeNewsletterStatusRevokeSender(sock: any): (jid: string, statusId: string, options?: Pick<NewsletterStatusSendOptions, 'ackTimeoutMs'>) => Promise<NewsletterStatusStanzaResult>
|
|
151
|
+
export function makeNewsletterStatusFetcher(sock: any): (jid: string, options?: NewsletterStatusFetchOptions) => Promise<NewsletterStatusList>
|
|
152
|
+
export function parseNewsletterStatusesResponse(node: any): NewsletterStatusList
|
|
153
|
+
export function parseNewsletterStatusUpdatesResponse(node: any): NewsletterStatusList
|
|
154
|
+
export function makeNewsletterStatusUpdatesFetcher(sock: any): (jid: string, options?: NewsletterStatusUpdatesFetchOptions) => Promise<NewsletterStatusList>
|
|
155
|
+
export function sendNewsletterStatus(sock: any, inputOrJid: any, content?: any, options?: NewsletterStatusSendOptions): Promise<NewsletterStatusSendResult>
|
|
156
|
+
export function sendNewsletterStatusReaction(sock: any, jid: string, parentServerId: string | number, reaction: string, options?: Pick<NewsletterStatusSendOptions, 'messageId' | 'ackTimeoutMs'>): Promise<NewsletterStatusStanzaResult>
|
|
157
|
+
export function revokeNewsletterStatus(sock: any, jid: string, serverId: string, options?: Pick<NewsletterStatusSendOptions, 'ackTimeoutMs'>): Promise<NewsletterStatusStanzaResult>
|
|
158
|
+
export function getNewsletterStatuses(sock: any, jid: string, options?: NewsletterStatusFetchOptions): Promise<NewsletterStatusList>
|
|
159
|
+
export function getNewsletterStatusUpdates(sock: any, jid: string, options?: NewsletterStatusUpdatesFetchOptions): Promise<NewsletterStatusList>
|
|
160
|
+
|
|
161
|
+
export const NEWSLETTER_STATUS_CONTENT_TYPES: Set<NewsletterStatusContentType>
|
|
162
|
+
export const NEWSLETTER_STATUS_MEDIA_TYPES: Set<NewsletterStatusMediaType>
|
|
163
|
+
export const NEWSLETTER_STATUS_WEB_MEDIA_TYPES: Set<NewsletterStatusMediaType>
|