zaileys 0.29.17-beta → 0.29.18-beta
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/dist/index.cjs +1 -0
- package/dist/{types/classes/client.d.ts → index.d.mts} +83 -22
- package/dist/index.mjs +1 -0
- package/package.json +10 -6
- package/dist/classes/Client.d.ts +0 -17
- package/dist/classes/Event.d.ts +0 -12
- package/dist/classes/Parser.d.ts +0 -3
- package/dist/database/handler.d.ts +0 -12
- package/dist/database/schema.d.ts +0 -63
- package/dist/helpers/adapter.d.ts +0 -57
- package/dist/helpers/error.d.ts +0 -8
- package/dist/index.esm.js +0 -2
- package/dist/index.esm.js.map +0 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +0 -1
- package/dist/types/adapter/general.d.ts +0 -156
- package/dist/types/classes/event.d.ts +0 -65
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
type Awaitable<T> = T | Promise<T>;
|
|
2
|
-
export type AuthAdapterHandlerType = Promise<{
|
|
3
|
-
state: AuthenticationState;
|
|
4
|
-
saveCreds: () => Promise<void>;
|
|
5
|
-
clear: () => Promise<void>;
|
|
6
|
-
removeCreds: () => Promise<void>;
|
|
7
|
-
}>;
|
|
8
|
-
type Contact = {
|
|
9
|
-
id: string;
|
|
10
|
-
lid?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
notify?: string;
|
|
13
|
-
verifiedName?: string;
|
|
14
|
-
imgUrl?: string | null;
|
|
15
|
-
status?: string;
|
|
16
|
-
};
|
|
17
|
-
type Account = {
|
|
18
|
-
details?: Uint8Array | null;
|
|
19
|
-
accountSignatureKey?: Uint8Array | null;
|
|
20
|
-
accountSignature?: Uint8Array | null;
|
|
21
|
-
deviceSignature?: Uint8Array | null;
|
|
22
|
-
};
|
|
23
|
-
type SignedKeyPair = {
|
|
24
|
-
keyPair: KeyPair;
|
|
25
|
-
signature: Uint8Array;
|
|
26
|
-
keyId: number;
|
|
27
|
-
timestampS?: number;
|
|
28
|
-
};
|
|
29
|
-
type ProtocolAddress = {
|
|
30
|
-
name: string;
|
|
31
|
-
deviceId: number;
|
|
32
|
-
};
|
|
33
|
-
type SignalIdentity = {
|
|
34
|
-
identifier: ProtocolAddress;
|
|
35
|
-
identifierKey: Uint8Array;
|
|
36
|
-
};
|
|
37
|
-
type LTHashState = {
|
|
38
|
-
version: number;
|
|
39
|
-
hash: Buffer;
|
|
40
|
-
indexValueMap: {
|
|
41
|
-
[indexMacBase64: string]: {
|
|
42
|
-
valueMac: Uint8Array | Buffer;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
type SignalCreds = {
|
|
47
|
-
readonly signedIdentityKey: KeyPair;
|
|
48
|
-
readonly signedPreKey: SignedKeyPair;
|
|
49
|
-
readonly registrationId: number;
|
|
50
|
-
};
|
|
51
|
-
type AccountSettings = {
|
|
52
|
-
unarchiveChats: boolean;
|
|
53
|
-
defaultDisappearingMode?: Pick<any, "ephemeralExpiration" | "ephemeralSettingTimestamp">;
|
|
54
|
-
};
|
|
55
|
-
type SignalKeyStore = {
|
|
56
|
-
get<T extends keyof SignalDataTypeMap>(type: T, ids: string[]): Awaitable<{
|
|
57
|
-
[id: string]: SignalDataTypeMap[T];
|
|
58
|
-
}>;
|
|
59
|
-
set(data: SignalDataSet): Awaitable<void>;
|
|
60
|
-
clear?(): Awaitable<void>;
|
|
61
|
-
};
|
|
62
|
-
interface RegistrationOptions {
|
|
63
|
-
phoneNumber?: string;
|
|
64
|
-
phoneNumberCountryCode: string;
|
|
65
|
-
phoneNumberNationalNumber: string;
|
|
66
|
-
phoneNumberMobileCountryCode: string;
|
|
67
|
-
phoneNumberMobileNetworkCode: string;
|
|
68
|
-
method?: "sms" | "voice" | "captcha";
|
|
69
|
-
captcha?: string;
|
|
70
|
-
}
|
|
71
|
-
export type SslOptions = {
|
|
72
|
-
pfx?: string;
|
|
73
|
-
key?: string | string[] | Buffer | Buffer[];
|
|
74
|
-
passphrase?: string;
|
|
75
|
-
cert?: string | string[] | Buffer | Buffer[];
|
|
76
|
-
ca?: string | string[] | Buffer | Buffer[];
|
|
77
|
-
crl?: string | string[];
|
|
78
|
-
ciphers?: string;
|
|
79
|
-
rejectUnauthorized?: boolean;
|
|
80
|
-
minVersion?: string;
|
|
81
|
-
maxVersion?: string;
|
|
82
|
-
verifyIdentity?: boolean;
|
|
83
|
-
};
|
|
84
|
-
export type Fingerprint = {
|
|
85
|
-
rawId: number;
|
|
86
|
-
currentIndex: number;
|
|
87
|
-
deviceIndexes: number[];
|
|
88
|
-
};
|
|
89
|
-
export type AppDataSync = {
|
|
90
|
-
keyData: Uint8Array;
|
|
91
|
-
fingerprint: Fingerprint;
|
|
92
|
-
timestamp: Long | number;
|
|
93
|
-
};
|
|
94
|
-
export type SignalDataTypeMap = {
|
|
95
|
-
session: Uint8Array;
|
|
96
|
-
"pre-key": KeyPair;
|
|
97
|
-
"sender-key": Uint8Array;
|
|
98
|
-
"app-state-sync-key": AppDataSync;
|
|
99
|
-
"app-state-sync-version": LTHashState;
|
|
100
|
-
"sender-key-memory": {
|
|
101
|
-
[jid: string]: boolean;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
export type SignalDataSet = {
|
|
105
|
-
[T in keyof SignalDataTypeMap]?: {
|
|
106
|
-
[id: string]: SignalDataTypeMap[T] | null;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
export type KeyPair = {
|
|
110
|
-
public: Uint8Array;
|
|
111
|
-
private: Uint8Array;
|
|
112
|
-
};
|
|
113
|
-
export type sqlData = {
|
|
114
|
-
constructor: {
|
|
115
|
-
name: "RowDataPacket";
|
|
116
|
-
};
|
|
117
|
-
value?: object[];
|
|
118
|
-
};
|
|
119
|
-
export type valueReplacer = {
|
|
120
|
-
data: number[];
|
|
121
|
-
type: string;
|
|
122
|
-
};
|
|
123
|
-
export type valueReviver = {
|
|
124
|
-
data: string;
|
|
125
|
-
type: string;
|
|
126
|
-
};
|
|
127
|
-
export type AuthenticationState = {
|
|
128
|
-
creds: AuthenticationCreds;
|
|
129
|
-
keys: SignalKeyStore;
|
|
130
|
-
};
|
|
131
|
-
export type AuthenticationCreds = SignalCreds & {
|
|
132
|
-
readonly noiseKey: KeyPair;
|
|
133
|
-
readonly pairingEphemeralKeyPair: KeyPair;
|
|
134
|
-
advSecretKey: string;
|
|
135
|
-
me?: Contact;
|
|
136
|
-
account?: Account;
|
|
137
|
-
signalIdentities?: SignalIdentity[];
|
|
138
|
-
myAppStateKeyId?: string;
|
|
139
|
-
firstUnuploadedPreKeyId: number;
|
|
140
|
-
nextPreKeyId: number;
|
|
141
|
-
lastAccountSyncTimestamp?: number;
|
|
142
|
-
platform?: string;
|
|
143
|
-
processedHistoryMessages: Pick<any, "key" | "messageTimestamp">[];
|
|
144
|
-
accountSyncCounter: number;
|
|
145
|
-
accountSettings: AccountSettings;
|
|
146
|
-
deviceId: string;
|
|
147
|
-
phoneId: string;
|
|
148
|
-
identityId: Buffer;
|
|
149
|
-
registered: boolean;
|
|
150
|
-
backupToken: Buffer;
|
|
151
|
-
registration: RegistrationOptions;
|
|
152
|
-
pairingCode: string | undefined;
|
|
153
|
-
lastPropHash: string | undefined;
|
|
154
|
-
routingInfo: Buffer | undefined;
|
|
155
|
-
};
|
|
156
|
-
export {};
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
declare const EventConnectionType: z.ZodObject<{
|
|
3
|
-
status: z.ZodEnum<["connecting", "open", "close"]>;
|
|
4
|
-
}, "strip", z.ZodTypeAny, {
|
|
5
|
-
status: "connecting" | "open" | "close";
|
|
6
|
-
}, {
|
|
7
|
-
status: "connecting" | "open" | "close";
|
|
8
|
-
}>;
|
|
9
|
-
declare const EventMessagesType: z.ZodObject<{
|
|
10
|
-
messages: z.ZodObject<{
|
|
11
|
-
remoteJid: z.ZodString;
|
|
12
|
-
id: z.ZodString;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
id: string;
|
|
15
|
-
remoteJid: string;
|
|
16
|
-
}, {
|
|
17
|
-
id: string;
|
|
18
|
-
remoteJid: string;
|
|
19
|
-
}>;
|
|
20
|
-
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
messages: {
|
|
22
|
-
id: string;
|
|
23
|
-
remoteJid: string;
|
|
24
|
-
};
|
|
25
|
-
}, {
|
|
26
|
-
messages: {
|
|
27
|
-
id: string;
|
|
28
|
-
remoteJid: string;
|
|
29
|
-
};
|
|
30
|
-
}>;
|
|
31
|
-
declare const EventCallType: z.ZodObject<{
|
|
32
|
-
call: z.ZodObject<{
|
|
33
|
-
id: z.ZodString;
|
|
34
|
-
from: z.ZodString;
|
|
35
|
-
timestamp: z.ZodNumber;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
id: string;
|
|
38
|
-
timestamp: number;
|
|
39
|
-
from: string;
|
|
40
|
-
}, {
|
|
41
|
-
id: string;
|
|
42
|
-
timestamp: number;
|
|
43
|
-
from: string;
|
|
44
|
-
}>;
|
|
45
|
-
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
call: {
|
|
47
|
-
id: string;
|
|
48
|
-
timestamp: number;
|
|
49
|
-
from: string;
|
|
50
|
-
};
|
|
51
|
-
}, {
|
|
52
|
-
call: {
|
|
53
|
-
id: string;
|
|
54
|
-
timestamp: number;
|
|
55
|
-
from: string;
|
|
56
|
-
};
|
|
57
|
-
}>;
|
|
58
|
-
declare const EventEnumType: z.ZodEnum<["connection", "messages", "call"]>;
|
|
59
|
-
export type EventEnumType = z.infer<typeof EventEnumType>;
|
|
60
|
-
export type EventCallbackType = {
|
|
61
|
-
connection: (data: z.infer<typeof EventConnectionType>) => void;
|
|
62
|
-
messages: (data: z.infer<typeof EventMessagesType>) => void;
|
|
63
|
-
call: (data: z.infer<typeof EventCallType>) => void;
|
|
64
|
-
};
|
|
65
|
-
export {};
|