sanka-baileyss 2.0.8 → 2.1.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.
@@ -3,70 +3,68 @@ import { proto } from '../../WAProto'
3
3
  import { BaileysEventEmitter, ChatModification, ChatMutation, Contact, InitialAppStateSyncOptions, LTHashState, WAPatchCreate, WAPatchName } from '../Types'
4
4
  import { BinaryNode } from '../WABinary'
5
5
  import { ILogger } from './logger'
6
- import { LabelAssociationType } from '../Types/LabelAssociation'
7
-
8
6
  type FetchAppStateSyncKey = (keyId: string) => Promise<proto.Message.IAppStateSyncKeyData | null | undefined>
9
-
10
7
  export type ChatMutationMap = {
11
- [index: string]: ChatMutation
8
+ [index: string]: ChatMutation
12
9
  }
13
-
14
10
  export declare const newLTHashState: () => LTHashState
15
-
16
11
  export declare const encodeSyncdPatch: ({ type, index, syncAction, apiVersion, operation }: WAPatchCreate, myAppStateKeyId: string, state: LTHashState, getAppStateSyncKey: FetchAppStateSyncKey) => Promise<{
17
- patch: proto.ISyncdPatch
18
- state: LTHashState
12
+ patch: proto.ISyncdPatch
13
+ state: LTHashState
19
14
  }>
20
-
21
15
  export declare const decodeSyncdMutations: (msgMutations: (proto.ISyncdMutation | proto.ISyncdRecord)[], initialState: LTHashState, getAppStateSyncKey: FetchAppStateSyncKey, onMutation: (mutation: ChatMutation) => void, validateMacs: boolean) => Promise<{
22
- hash: Buffer
23
- indexValueMap: {
24
- [indexMacBase64: string]: {
25
- valueMac: Uint8Array | Buffer
26
- }
27
- }
16
+ hash: Buffer
17
+ indexValueMap: {
18
+ [indexMacBase64: string]: {
19
+ valueMac: Uint8Array | Buffer
20
+ }
21
+ }
28
22
  }>
29
-
30
23
  export declare const decodeSyncdPatch: (msg: proto.ISyncdPatch, name: WAPatchName, initialState: LTHashState, getAppStateSyncKey: FetchAppStateSyncKey, onMutation: (mutation: ChatMutation) => void, validateMacs: boolean) => Promise<{
31
- hash: Buffer
32
- indexValueMap: {
33
- [indexMacBase64: string]: {
34
- valueMac: Uint8Array | Buffer
35
- }
36
- }
24
+ hash: Buffer
25
+ indexValueMap: {
26
+ [indexMacBase64: string]: {
27
+ valueMac: Uint8Array | Buffer
28
+ }
29
+ }
37
30
  }>
38
-
39
31
  export declare const extractSyncdPatches: (result: BinaryNode, options: AxiosRequestConfig<{}>) => Promise<{
40
- [T in WAPatchName]: {
41
- patches: proto.ISyncdPatch[]
42
- hasMorePatches: boolean
43
- snapshot?: proto.ISyncdSnapshot | undefined
44
- }
32
+ critical_block: {
33
+ patches: proto.ISyncdPatch[]
34
+ hasMorePatches: boolean
35
+ snapshot?: proto.ISyncdSnapshot | undefined
36
+ }
37
+ critical_unblock_low: {
38
+ patches: proto.ISyncdPatch[]
39
+ hasMorePatches: boolean
40
+ snapshot?: proto.ISyncdSnapshot | undefined
41
+ }
42
+ regular_high: {
43
+ patches: proto.ISyncdPatch[]
44
+ hasMorePatches: boolean
45
+ snapshot?: proto.ISyncdSnapshot | undefined
46
+ }
47
+ regular_low: {
48
+ patches: proto.ISyncdPatch[]
49
+ hasMorePatches: boolean
50
+ snapshot?: proto.ISyncdSnapshot | undefined
51
+ }
52
+ regular: {
53
+ patches: proto.ISyncdPatch[]
54
+ hasMorePatches: boolean
55
+ snapshot?: proto.ISyncdSnapshot | undefined
56
+ }
45
57
  }>
46
-
47
58
  export declare const downloadExternalBlob: (blob: proto.IExternalBlobReference, options: AxiosRequestConfig<{}>) => Promise<Buffer>
48
59
  export declare const downloadExternalPatch: (blob: proto.IExternalBlobReference, options: AxiosRequestConfig<{}>) => Promise<proto.SyncdMutations>
49
-
50
60
  export declare const decodeSyncdSnapshot: (name: WAPatchName, snapshot: proto.ISyncdSnapshot, getAppStateSyncKey: FetchAppStateSyncKey, minimumVersionNumber: number | undefined, validateMacs?: boolean) => Promise<{
51
- state: LTHashState
52
- mutationMap: ChatMutationMap
61
+ state: LTHashState
62
+ mutationMap: ChatMutationMap
53
63
  }>
54
-
55
64
  export declare const decodePatches: (name: WAPatchName, syncds: proto.ISyncdPatch[], initial: LTHashState, getAppStateSyncKey: FetchAppStateSyncKey, options: AxiosRequestConfig<{}>, minimumVersionNumber?: number, logger?: ILogger, validateMacs?: boolean) => Promise<{
56
- state: LTHashState
57
- mutationMap: ChatMutationMap
65
+ state: LTHashState
66
+ mutationMap: ChatMutationMap
58
67
  }>
59
-
60
- export declare const chatModificationToAppPatch: (mod: ChatModification, jid: string) => WAPatchCreate & {
61
- syncAction: {
62
- timestamp?: number
63
- contactAction?: {
64
- fullName?: string
65
- lidJid?: string
66
- }
67
- }
68
- }
69
-
68
+ export declare const chatModificationToAppPatch: (mod: ChatModification, jid: string) => WAPatchCreate
70
69
  export declare const processSyncAction: (syncAction: ChatMutation, ev: BaileysEventEmitter, me: Contact, initialSyncOpts?: InitialAppStateSyncOptions, logger?: ILogger) => void
71
-
72
70
  export {}