@rnaga/wp-node
Version:
👉 **[View Full Documentation at rnaga.github.io/wp-node →](https://rnaga.github.io/wp-node/)**
32 lines • 1.38 kB
TypeScript
import { Config } from "../config";
import { Components } from "./components";
import { Logger } from "./logger";
import { Meta } from "./meta";
import { Role } from "./role";
import { QueryUtil } from "./utils/query.util";
import type * as types from "../types";
export declare class User {
meta: Meta;
private logger;
private queryUtil;
private components;
private config;
private userRef;
private _props;
private _roles;
private _role;
constructor(meta: Meta, logger: Logger, queryUtil: QueryUtil, components: Components, config: Config, userRef: string | number, _props: types.Tables["users"], _roles: string[]);
hasCapabilities(capabilities: string[], options?: {
blogIds: number[];
}): Promise<boolean>;
role(): Promise<Role>;
roles(): Promise<string[]>;
get props(): types.WpUsers | undefined;
private setDefaultProps;
private setAnonymous;
can<T extends types.RoleCapabilityActions>(action: T, ...args: types.TMapMetaCapArgs<T>): Promise<boolean>;
can<T extends string>(action?: T, ...args: types.TMapMetaCapArgs<T>): Promise<boolean>;
bulkCan<T extends types.RoleCapabilityActions>(actionOrArrArgs: T | [T, ...types.TMapMetaCapArgs<T>][], arrArgs?: types.TMapMetaCapArgs<T>[]): Promise<[T, types.TMapMetaCapArgs<T>, boolean][]>;
private init;
}
//# sourceMappingURL=user.d.ts.map