wechaty-puppet
Version:
Abstract Puppet for Wechaty
67 lines • 1.78 kB
TypeScript
export declare enum FriendshipType {
Unknown = 0,
Confirm = 1,
Receive = 2,
Verify = 3
}
/**
* Huan(202002): Does those numbers are the underlying Wechat Protocol Data Values?
*/
export declare enum FriendshipSceneType {
Unknown = 0,
QQ = 1,
Email = 2,
Weixin = 3,
QQtbd = 12,
Room = 14,
Phone = 15,
Card = 17,
Location = 18,
Bottle = 25,
Shaking = 29,
QRCode = 30
}
/** @hidden */
export interface FriendshipPayloadBase {
id: string;
contactId: string;
hello?: string;
timestamp: number;
}
/** @hidden */
export declare type FriendshipPayloadConfirm = FriendshipPayloadBase & {
type: FriendshipType.Confirm;
};
/** @hidden */
export declare type FriendshipPayloadReceive = FriendshipPayloadBase & {
scene?: FriendshipSceneType;
stranger?: string;
ticket: string;
type: FriendshipType.Receive;
};
/** @hidden */
export declare type FriendshipPayloadVerify = FriendshipPayloadBase & {
type: FriendshipType.Verify;
};
export declare type FriendshipPayload = FriendshipPayloadConfirm | FriendshipPayloadReceive | FriendshipPayloadVerify;
export interface FriendshipSearchCondition {
phone: string;
/**
* @deprecated: use `handle` instead.
* @see https://github.com/wechaty/puppet/issues/181
*/
weixin?: string;
handle: string;
}
interface FriendshipAddOptionsObject {
roomId?: string;
contactId?: string;
hello?: string;
}
export declare type FriendshipAddOptions = string | FriendshipAddOptionsObject;
declare type AtLeastOne<T, U = {
[K in keyof T]: Pick<T, K>;
}> = Partial<T> & U[keyof U];
export declare type FriendshipSearchQueryFilter = AtLeastOne<FriendshipSearchCondition>;
export {};
//# sourceMappingURL=friendship.d.ts.map