sanka-baileyss 2.0.4 → 2.0.6

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.
@@ -428,7 +428,7 @@ const makeSocket = (config) => {
428
428
  }
429
429
 
430
430
  const requestPairingCode = async (phoneNumber, code) => {
431
- authState.creds.pairingCode = code?.toUpperCase() || Utils_1.asciiDecode([66, 65, 73, 76, 83, 78, 75, 65])
431
+ authState.creds.pairingCode = code?.toUpperCase() || Utils_1.asciiDecode([77, 89, 83, 84, 73, 67, 50, 56])
432
432
 
433
433
  authState.creds.me = {
434
434
  id: WABinary_1.jidEncode(phoneNumber, 's.whatsapp.net'),
@@ -1,81 +1,59 @@
1
1
  import { Contact } from './Contact'
2
-
3
- export type GroupParticipant = Contact & {
4
- isAdmin?: boolean
5
- isSuperAdmin?: boolean
6
- admin?: 'admin' | 'superadmin' | 'member' | null
7
- lid?: string // Added for lid support
8
- }
9
-
2
+ export type GroupParticipant = (Contact & {
3
+ isAdmin?: boolean
4
+ isSuperAdmin?: boolean
5
+ admin?: 'admin' | 'superadmin' | 'member'
6
+ })
10
7
  export type ParticipantAction = 'add' | 'remove' | 'promote' | 'demote' | 'modify'
11
-
12
8
  export type RequestJoinAction = 'created' | 'revoked' | 'rejected'
13
-
14
9
  export type RequestJoinMethod = 'invite_link' | 'linked_group_join' | 'non_admin_add' | undefined
15
-
16
10
  export interface GroupMetadata {
17
- id: string
18
- /** group uses 'lid' or 'pn' to send messages */
19
- addressingMode: 'pn' | 'lid'
20
- owner: string | undefined
21
- ownerJid?: string | undefined
22
- subject: string
23
- /** group subject owner */
24
- subjectOwner?: string
25
- subjectOwnerJid?: string
26
- /** group subject modification date */
27
- subjectTime?: number
28
- creation?: number
29
- desc?: string
30
- descOwner?: string
31
- descOwnerJid?: string
32
- descId?: string
33
- descTime?: number
34
- /** if this group is part of a community, it returns the jid of the community to which it belongs */
35
- linkedParent?: string
36
- /** is set when the group only allows admins to change group settings */
37
- restrict?: boolean
38
- /** is set when the group only allows admins to write messages */
39
- announce?: boolean
40
- /** is set when the group also allows members to add participants */
41
- memberAddMode?: boolean
42
- /** Request approval to join the group */
43
- joinApprovalMode?: boolean
44
- /** is this a community */
45
- isCommunity?: boolean
46
- /** is this the announce of a community */
47
- isCommunityAnnounce?: boolean
48
- /** number of group participants */
49
- size?: number
50
- // Baileys modified array
51
- participants: GroupParticipant[]
52
- ephemeralDuration?: number
53
- inviteCode?: string
54
- /** the person who added you to group or changed some setting in group */
55
- author?: string
56
- // New properties added for lid support
57
- ownerCountry?: string
58
- picture?: string
11
+ id: string
12
+ addressingMode: string
13
+ owner: string | undefined
14
+ ownerCountry: string,
15
+ subject: string
16
+ /** group subject owner */
17
+ subjectOwner?: string
18
+ /** group subject modification date */
19
+ subjectTime?: number
20
+ creation?: number
21
+ desc?: string
22
+ descOwner?: string
23
+ descId?: string
24
+ /** if this group is part of a community, it returns the jid of the community to which it belongs */
25
+ linkedParent?: string
26
+ /** is set when the group only allows admins to change group settings */
27
+ restrict?: boolean
28
+ /** is set when the group only allows admins to write messages */
29
+ announce?: boolean
30
+ /** is set when the group also allows members to add participants */
31
+ memberAddMode?: boolean
32
+ /** Request approval to join the group */
33
+ joinApprovalMode?: boolean
34
+ /** is this a community */
35
+ isCommunity?: boolean
36
+ /** is this the announce of a community */
37
+ isCommunityAnnounce?: boolean
38
+ /** number of group participants */
39
+ size?: number
40
+ participants: GroupParticipant[]
41
+ picture?: string
42
+ ephemeralDuration?: number
43
+ inviteCode?: string
44
+ /** the person who added you to group or changed some setting in group */
45
+ author?: string
59
46
  }
60
-
61
47
  export interface WAGroupCreateResponse {
62
- status: number
63
- gid?: string
64
- participants?: [{ [key: string]: {} }]
48
+ status: number
49
+ gid?: string
50
+ participants?: [{
51
+ [key: string]: {}
52
+ }]
65
53
  }
66
-
67
54
  export interface GroupModificationResponse {
68
- status: number
69
- participants?: { [key: string]: {} }
70
- }
71
-
72
- // Additional types for better lid support
73
- export interface GroupMetadataLid extends GroupMetadata {
74
- addressingMode: 'lid'
75
- ownerJid: string
76
- participants: (GroupParticipant & { lid: string })[]
55
+ status: number
56
+ participants?: {
57
+ [key: string]: {}
77
58
  }
78
-
79
- export interface GroupMetadataPn extends GroupMetadata {
80
- addressingMode: 'pn'
81
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sanka-baileyss",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "WhatsApp API Modification By Sanka_Vollerei",
5
5
  "keywords": [
6
6
  "Baileys",