Skip to content

Commit

Permalink
fix(Status): type definition (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjdd authored Oct 31, 2022
1 parent ee9cda4 commit abb2155
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions storage.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ export class Events {
unbind(eventName?: string, callback?: Function, context?: any): Events;
}

declare type Queriable = Object | File | Status;
declare type Queriable = Object | File;

declare class BaseQuery<T extends Queriable> extends BaseObject {
className: string;
Expand Down Expand Up @@ -1496,6 +1496,10 @@ export namespace Cloud {
}

export class Status {
id?: string;
createdAt?: Date;
updatedAt?: Date;
messageId?: number;
inboxType: string;
constructor(imageUrl?: string | null, message?: string | null);
constructor(data: Record<string, any>);
Expand All @@ -1519,15 +1523,16 @@ export class Status {
options?: AuthOptions
): Promise<any>;
static statusQuery(source?: User): Query<Object>;
static inboxQuery(owner?: User, inboxType?: string): InboxQuery<Status>;
static inboxQuery(owner?: User, inboxType?: string): InboxQuery;
get(key: string): any;
set(key: string, value: any): this;
destroy(options?: AuthOptions): Promise<any>;
toObject(): Object;
send(options?: AuthOptions): Promise<this>;
}

export class InboxQuery<T extends Queriable> extends Query<T> {
// @ts-ignore
export class InboxQuery extends Query<Status> {
sinceId(id: number): this;
maxId(id: number): this;
owner(owner: User): this;
Expand Down

0 comments on commit abb2155

Please sign in to comment.