cryo-groupx-sdk
Version:
SDK for group-x.xyz Public API
42 lines (41 loc) • 2.72 kB
TypeScript
import { CreateGuildParams, CreateGuildResponse, CreateRoleParams, CreateRoleResponse, DeleteGuildResponse, DeleteRoleResponse, GetGuildsResponse, GetGuildByIdResponse, GetMembershipsResponse, GetRoleResponse, GetUserAccessResponse, JoinResponse, SignerFunction, UpdateGuildParams, UpdateRoleParams, UpdateRoleResponse, GuildsQueryType, GuildsByAddressQueryType, UpdateGuildResponse } from "./types";
import IWXGroupInfo from "./types-ithcat";
declare const user: {
getUserInfoByToken(code: string): Promise<any>;
getWxGroups(): Promise<any>;
getWxGroup(groupObjectId: string): Promise<any>;
updateWxGroup(groupObjectId: string, data: IWXGroupInfo): Promise<any>;
getMemberships(address: string): Promise<GetMembershipsResponse | null>;
join(groupId: number, signerAddress: string, sign: SignerFunction, platforms?: {
name: string;
authData: {
[key: string]: string;
};
}[]): Promise<JoinResponse>;
leave(groupId: number, signerAddress: string, sign: SignerFunction, platforms?: {
name: string;
authData: {
[key: string]: string;
};
}[]): Promise<JoinResponse>;
getMyGroupTimers: (recvObjectId?: string, recvIsGroup?: boolean) => Promise<any>;
addMyGroupTimer: (timer: import("./types").IKnowTimer) => Promise<any>;
delMyGroupTimer: (timer: import("./types").IKnowTimer) => Promise<any>;
};
declare const group: {
getAll(query?: GuildsQueryType): Promise<GetGuildsResponse>;
getByAddress(address: string, query?: GuildsByAddressQueryType): Promise<GetGuildsResponse>;
get(id: number | string): Promise<GetGuildByIdResponse>;
getUserAccess(groupId: number, address: string): Promise<GetUserAccessResponse>;
getUserMemberships(groupId: number, address: string): Promise<GetUserAccessResponse>;
create(signerAddress: string, sign: SignerFunction, params: CreateGuildParams): Promise<CreateGuildResponse>;
update(id: number | string, signerAddress: string, sign: SignerFunction, params: UpdateGuildParams): Promise<UpdateGuildResponse>;
delete(id: number, signerAddress: string, sign: SignerFunction, removePlatformAccess?: boolean): Promise<DeleteGuildResponse>;
};
declare const role: {
get(id: number): Promise<GetRoleResponse>;
create(signerAddress: string, sign: SignerFunction, params: CreateRoleParams): Promise<CreateRoleResponse>;
update(id: number, signerAddress: string, sign: SignerFunction, params: UpdateRoleParams): Promise<UpdateRoleResponse>;
delete(id: number, signerAddress: string, sign: SignerFunction, removePlatformAccess?: boolean): Promise<DeleteRoleResponse>;
};
export { user, group, role };