@acidify/core 0.3.4 → 0.4.1

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.
@@ -127,6 +127,20 @@ export declare namespace SignResult {
127
127
  const constructor: abstract new () => SignResult;
128
128
  }
129
129
  }
130
+ export declare class SsoResponse {
131
+ constructor(retCode: number, command: string, response: Int8Array, sequence: number, extra?: Nullable<string>);
132
+ get retCode(): number;
133
+ get command(): string;
134
+ get response(): Int8Array;
135
+ get sequence(): number;
136
+ get extra(): Nullable<string>;
137
+ }
138
+ export declare namespace SsoResponse {
139
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
140
+ namespace $metadata$ {
141
+ const constructor: abstract new () => SsoResponse;
142
+ }
143
+ }
130
144
  export declare class BotFriend /* extends BotEntity<BotFriendData> */ {
131
145
  private constructor();
132
146
  get uin(): bigint;
@@ -474,6 +488,19 @@ export declare namespace MessageReceiveEvent {
474
488
  const constructor: abstract new () => MessageReceiveEvent;
475
489
  }
476
490
  }
491
+ export declare class PinChangedEvent implements AcidifyEvent {
492
+ constructor(scene: MessageScene, peerUin: bigint, isPinned: boolean);
493
+ get scene(): MessageScene;
494
+ get peerUin(): bigint;
495
+ get isPinned(): boolean;
496
+ readonly __doNotUseOrImplementIt: AcidifyEvent["__doNotUseOrImplementIt"];
497
+ }
498
+ export declare namespace PinChangedEvent {
499
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
500
+ namespace $metadata$ {
501
+ const constructor: abstract new () => PinChangedEvent;
502
+ }
503
+ }
477
504
  export declare class QRCodeGeneratedEvent implements AcidifyEvent {
478
505
  constructor(url: string, png: Int8Array);
479
506
  get url(): string;
@@ -957,9 +984,12 @@ export declare namespace BotIncomingSegment {
957
984
  }
958
985
  }
959
986
  class MarketFace extends BotIncomingSegment.$metadata$.constructor {
960
- constructor(url: string, summary: string);
987
+ constructor(url: string, summary: string, emojiId: string, emojiPackageId: number, key: string);
961
988
  get url(): string;
962
989
  get summary(): string;
990
+ get emojiId(): string;
991
+ get emojiPackageId(): number;
992
+ get key(): string;
963
993
  toString(): string;
964
994
  }
965
995
  namespace MarketFace {
@@ -1407,6 +1437,21 @@ export declare namespace BotGroupNotification {
1407
1437
  }
1408
1438
  }
1409
1439
  }
1440
+ export declare class BotPinnedChats {
1441
+ constructor(friendUins: KtList<bigint>, groupUins: KtList<bigint>);
1442
+ get friendUins(): KtList<bigint>;
1443
+ get groupUins(): KtList<bigint>;
1444
+ copy(friendUins?: KtList<bigint>, groupUins?: KtList<bigint>): BotPinnedChats;
1445
+ toString(): string;
1446
+ hashCode(): number;
1447
+ equals(other: Nullable<any>): boolean;
1448
+ }
1449
+ export declare namespace BotPinnedChats {
1450
+ /** @deprecated $metadata$ is used for internal purposes, please don't use it in your code, because it can be removed at any moment */
1451
+ namespace $metadata$ {
1452
+ const constructor: abstract new () => BotPinnedChats;
1453
+ }
1454
+ }
1410
1455
  export declare class BotUserInfo {
1411
1456
  constructor(uin: bigint, nickname: string, bio: string, gender: UserInfoGender, remark: string, level: number, country: string, city: string, school: string, registerTime: bigint, age: number, qid: string);
1412
1457
  get uin(): bigint;
@@ -1608,10 +1653,11 @@ export declare class Bot /* implements CoroutineScope */ {
1608
1653
  get uin(): bigint;
1609
1654
  get uid(): string;
1610
1655
  get isLoggedIn(): boolean;
1611
- qrCodeLogin(queryInterval?: bigint): Promise<void>;
1612
- online(): Promise<void>;
1656
+ unsafeSendPacket(cmd: string, payload: Int8Array, timeoutMillis?: bigint): Promise<SsoResponse>;
1657
+ qrCodeLogin(queryInterval: bigint | undefined, preloadContacts: boolean): Promise<void>;
1658
+ online(preloadContacts?: boolean): Promise<void>;
1613
1659
  offline(): Promise<void>;
1614
- login(): Promise<void>;
1660
+ login(queryInterval: bigint, preloadContacts: boolean): Promise<void>;
1615
1661
  fetchUserInfoByUin(uin: bigint): Promise<BotUserInfo>;
1616
1662
  fetchUserInfoByUid(uid: string): Promise<BotUserInfo>;
1617
1663
  fetchFriends(): Promise<Array<BotFriendData>>;
@@ -1625,6 +1671,13 @@ export declare class Bot /* implements CoroutineScope */ {
1625
1671
  getGroupMember(groupUin: bigint, memberUin: bigint, forceUpdate?: boolean): Promise<Nullable<BotGroupMember>>;
1626
1672
  getUinByUid(uid: string): Promise<bigint>;
1627
1673
  getUidByUin(uin: bigint, mayComeFromGroupUin?: Nullable<bigint>): Promise<string>;
1674
+ getCustomFaceUrl(): Promise<Array<string>>;
1675
+ getPins(): Promise<BotPinnedChats>;
1676
+ setFriendPin(friendUin: bigint, isPinned: boolean): Promise<void>;
1677
+ setGroupPin(groupUin: bigint, isPinned: boolean): Promise<void>;
1678
+ setAvatar(imageData: Int8Array): Promise<void>;
1679
+ setNickname(nickname: string): Promise<void>;
1680
+ setBio(bio: string): Promise<void>;
1628
1681
  getSKey(): Promise<string>;
1629
1682
  getPSKey(domain: string): Promise<string>;
1630
1683
  getCookies(domain: string): Promise<KtMap<string, string>>;
@@ -1708,6 +1761,8 @@ export declare class Bot /* implements CoroutineScope */ {
1708
1761
  onGroupNudge(callback: (p0: GroupNudgeEvent) => any): void;
1709
1762
  offGroupNudge(callback: (p0: GroupNudgeEvent) => any): boolean;
1710
1763
  onGroupWholeMute(callback: (p0: GroupWholeMuteEvent) => any): void;
1764
+ onPinChanged(callback: (p0: PinChangedEvent) => any): void;
1765
+ offPinChanged(callback: (p0: PinChangedEvent) => any): boolean;
1711
1766
  offGroupWholeMute(callback: (p0: GroupWholeMuteEvent) => any): boolean;
1712
1767
  onMessageReceive(callback: (p0: MessageReceiveEvent) => any): void;
1713
1768
  offMessageReceive(callback: (p0: MessageReceiveEvent) => any): boolean;