UNPKG

reduct-js

Version:

ReductStore Client SDK for Javascript/NodeJS/Typescript

62 lines (61 loc) 1.51 kB
/** * Token Permissions with server-side names */ export declare class OriginalTokenPermission { full_access: boolean; read?: string[]; write?: string[]; } /** * Token Permissions */ export declare class TokenPermissions { /** * Full access * The token allows to create, remove and update settings of buckets, manage tokens and read and write data. */ readonly fullAccess: boolean; /** * Read access * List of buckets allowed to read */ readonly read?: string[]; /** * Write access * List of buckets allowed to write */ readonly write?: string[]; static parse(data: OriginalTokenPermission): TokenPermissions; static serialize(data: TokenPermissions): OriginalTokenPermission; } /** * Token Info with server-side names */ export declare class OriginalTokenInfo { name: string; created_at: string; is_provisioned?: boolean | undefined; permissions?: OriginalTokenPermission; } /** * Information about an access token */ export declare class Token { /** * Name of the token */ readonly name: string; /** * Creation time of the token as unix timestamp in milliseconds */ readonly createdAt: number; /** * Is the token provisioned, and you can't remove it or change it */ readonly isProvisioned?: boolean; /** * Permissions of the token */ readonly permissions?: TokenPermissions; static parse(data: OriginalTokenInfo): Token; }