arlas-permissions-api
Version:
Persists data
135 lines (134 loc) • 2.96 kB
TypeScript
/// <reference path="custom.d.ts" />
import { Configuration } from "./configuration";
/**
*
* @export
*/
export declare const COLLECTION_FORMATS: {
csv: string;
ssv: string;
tsv: string;
pipes: string;
};
/**
*
* @export
* @interface FetchAPI
*/
export interface FetchAPI {
(url: string, init?: any): Promise<Response>;
}
/**
*
* @export
* @interface FetchArgs
*/
export interface FetchArgs {
url: string;
options: any;
}
/**
*
* @export
* @class BaseAPI
*/
export declare class BaseAPI {
protected basePath: string;
protected fetch: FetchAPI;
protected configuration: Configuration;
constructor(configuration?: Configuration, basePath?: string, fetch?: FetchAPI);
}
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export declare class RequiredError extends Error {
field: string;
name: "RequiredError";
constructor(field: string, msg?: string);
}
/**
*
* @export
* @interface ModelError
*/
export interface ModelError {
/**
*
* @type {number}
* @memberof ModelError
*/
status?: number;
/**
*
* @type {string}
* @memberof ModelError
*/
message?: string;
/**
*
* @type {string}
* @memberof ModelError
*/
error?: string;
}
/**
*
* @export
* @interface Resource
*/
export interface Resource {
/**
*
* @type {string}
* @memberof Resource
*/
verb: string;
/**
*
* @type {string}
* @memberof Resource
*/
path: string;
}
/**
* AuthorizeApi - fetch parameter creator
* @export
*/
export declare const AuthorizeApiFetchParamCreator: (configuration?: Configuration) => {
get(filter: string, pretty?: boolean, options?: any): FetchArgs;
};
/**
* AuthorizeApi - functional programming interface
* @export
*/
export declare const AuthorizeApiFp: (configuration?: Configuration) => {
get(filter: string, pretty?: boolean, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Resource[]>;
};
/**
* AuthorizeApi - factory interface
* @export
*/
export declare const AuthorizeApiFactory: (configuration?: Configuration, fetch?: FetchAPI, basePath?: string) => {
get(filter: string, pretty?: boolean, options?: any): Promise<Resource[]>;
};
/**
* AuthorizeApi - object-oriented interface
* @export
* @class AuthorizeApi
* @extends {BaseAPI}
*/
export declare class AuthorizeApi extends BaseAPI {
/**
* Returns a list of permissions for the current context/user
* @summary Returns a list of permissions for the current context/user
* @param {string} filter A regex to apply to permissions uris in order to filter the returned list.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof AuthorizeApi
*/
get(filter: string, pretty?: boolean, options?: any): Promise<Resource[]>;
}