/** * Permit.io API * Authorization as a service * * The version of the OpenAPI document: 2.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import { Configuration } from '../configuration'; import { RequestArgs, BaseAPI } from '../base'; import { ResourceInstanceCreate } from '../types'; import { ResourceInstanceRead } from '../types'; import { ResourceInstanceUpdate } from '../types'; /** * ResourceInstancesApi - axios parameter creator * @export */ export declare const ResourceInstancesApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates a new instance inside the Permit.io system. If the instance is already created: will return 200 instead of 201, and will return the existing instance object in the response body. * @summary Create Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceCreate} resourceInstanceCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceInstance: (projId: string, envId: string, resourceInstanceCreate: ResourceInstanceCreate, options?: AxiosRequestConfig) => Promise; /** * Deletes the instance and all its related data. * @summary Delete Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceInstance: (projId: string, envId: string, instanceId: string, options?: AxiosRequestConfig) => Promise; /** * Gets a instance, if such instance exists. Otherwise returns 404. * @summary Get Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceInstance: (projId: string, envId: string, instanceId: string, options?: AxiosRequestConfig) => Promise; /** * Lists all the resource instances defined within an environment. * @summary List Resource Instances * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [tenant] The tenant key or id to filter by * @param {string} [resource] The resource key or id to filter by * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. * @throws {RequiredError} */ listResourceInstances: (projId: string, envId: string, tenant?: string, resource?: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Partially updates the instance definition. Fields that will be provided will be completely overwritten. * @summary Update Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {ResourceInstanceUpdate} resourceInstanceUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceInstance: (projId: string, envId: string, instanceId: string, resourceInstanceUpdate: ResourceInstanceUpdate, options?: AxiosRequestConfig) => Promise; }; /** * ResourceInstancesApi - functional programming interface * @export */ export declare const ResourceInstancesApiFp: (configuration?: Configuration) => { /** * Creates a new instance inside the Permit.io system. If the instance is already created: will return 200 instead of 201, and will return the existing instance object in the response body. * @summary Create Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceCreate} resourceInstanceCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceInstance(projId: string, envId: string, resourceInstanceCreate: ResourceInstanceCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes the instance and all its related data. * @summary Delete Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceInstance(projId: string, envId: string, instanceId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a instance, if such instance exists. Otherwise returns 404. * @summary Get Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceInstance(projId: string, envId: string, instanceId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists all the resource instances defined within an environment. * @summary List Resource Instances * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [tenant] The tenant key or id to filter by * @param {string} [resource] The resource key or id to filter by * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. * @throws {RequiredError} */ listResourceInstances(projId: string, envId: string, tenant?: string, resource?: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Partially updates the instance definition. Fields that will be provided will be completely overwritten. * @summary Update Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {ResourceInstanceUpdate} resourceInstanceUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceInstance(projId: string, envId: string, instanceId: string, resourceInstanceUpdate: ResourceInstanceUpdate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * ResourceInstancesApi - factory interface * @export */ export declare const ResourceInstancesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates a new instance inside the Permit.io system. If the instance is already created: will return 200 instead of 201, and will return the existing instance object in the response body. * @summary Create Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {ResourceInstanceCreate} resourceInstanceCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceInstance(projId: string, envId: string, resourceInstanceCreate: ResourceInstanceCreate, options?: any): AxiosPromise; /** * Deletes the instance and all its related data. * @summary Delete Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceInstance(projId: string, envId: string, instanceId: string, options?: any): AxiosPromise; /** * Gets a instance, if such instance exists. Otherwise returns 404. * @summary Get Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceInstance(projId: string, envId: string, instanceId: string, options?: any): AxiosPromise; /** * Lists all the resource instances defined within an environment. * @summary List Resource Instances * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} [tenant] The tenant key or id to filter by * @param {string} [resource] The resource key or id to filter by * @param {number} [page] Page number of the results to fetch, starting at 1. * @param {number} [perPage] The number of results per page (max 100). * @param {*} [options] Override http request option. * @throws {RequiredError} */ listResourceInstances(projId: string, envId: string, tenant?: string, resource?: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * Partially updates the instance definition. Fields that will be provided will be completely overwritten. * @summary Update Resource Instance * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {string} instanceId Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @param {ResourceInstanceUpdate} resourceInstanceUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceInstance(projId: string, envId: string, instanceId: string, resourceInstanceUpdate: ResourceInstanceUpdate, options?: any): AxiosPromise; }; /** * Request parameters for createResourceInstance operation in ResourceInstancesApi. * @export * @interface ResourceInstancesApiCreateResourceInstanceRequest */ export interface ResourceInstancesApiCreateResourceInstanceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiCreateResourceInstance */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiCreateResourceInstance */ readonly envId: string; /** * * @type {ResourceInstanceCreate} * @memberof ResourceInstancesApiCreateResourceInstance */ readonly resourceInstanceCreate: ResourceInstanceCreate; } /** * Request parameters for deleteResourceInstance operation in ResourceInstancesApi. * @export * @interface ResourceInstancesApiDeleteResourceInstanceRequest */ export interface ResourceInstancesApiDeleteResourceInstanceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiDeleteResourceInstance */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiDeleteResourceInstance */ readonly envId: string; /** * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiDeleteResourceInstance */ readonly instanceId: string; } /** * Request parameters for getResourceInstance operation in ResourceInstancesApi. * @export * @interface ResourceInstancesApiGetResourceInstanceRequest */ export interface ResourceInstancesApiGetResourceInstanceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiGetResourceInstance */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiGetResourceInstance */ readonly envId: string; /** * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiGetResourceInstance */ readonly instanceId: string; } /** * Request parameters for listResourceInstances operation in ResourceInstancesApi. * @export * @interface ResourceInstancesApiListResourceInstancesRequest */ export interface ResourceInstancesApiListResourceInstancesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiListResourceInstances */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiListResourceInstances */ readonly envId: string; /** * The tenant key or id to filter by * @type {string} * @memberof ResourceInstancesApiListResourceInstances */ readonly tenant?: string; /** * The resource key or id to filter by * @type {string} * @memberof ResourceInstancesApiListResourceInstances */ readonly resource?: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof ResourceInstancesApiListResourceInstances */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof ResourceInstancesApiListResourceInstances */ readonly perPage?: number; } /** * Request parameters for updateResourceInstance operation in ResourceInstancesApi. * @export * @interface ResourceInstancesApiUpdateResourceInstanceRequest */ export interface ResourceInstancesApiUpdateResourceInstanceRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiUpdateResourceInstance */ readonly projId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiUpdateResourceInstance */ readonly envId: string; /** * Either the unique id of the resource instance, or the URL-friendly key of the resource instance (i.e: the \"slug\"). * @type {string} * @memberof ResourceInstancesApiUpdateResourceInstance */ readonly instanceId: string; /** * * @type {ResourceInstanceUpdate} * @memberof ResourceInstancesApiUpdateResourceInstance */ readonly resourceInstanceUpdate: ResourceInstanceUpdate; } /** * ResourceInstancesApi - object-oriented interface * @export * @class ResourceInstancesApi * @extends {BaseAPI} */ export declare class ResourceInstancesApi extends BaseAPI { /** * Creates a new instance inside the Permit.io system. If the instance is already created: will return 200 instead of 201, and will return the existing instance object in the response body. * @summary Create Resource Instance * @param {ResourceInstancesApiCreateResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceInstancesApi */ createResourceInstance(requestParameters: ResourceInstancesApiCreateResourceInstanceRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes the instance and all its related data. * @summary Delete Resource Instance * @param {ResourceInstancesApiDeleteResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceInstancesApi */ deleteResourceInstance(requestParameters: ResourceInstancesApiDeleteResourceInstanceRequest, options?: AxiosRequestConfig): Promise>; /** * Gets a instance, if such instance exists. Otherwise returns 404. * @summary Get Resource Instance * @param {ResourceInstancesApiGetResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceInstancesApi */ getResourceInstance(requestParameters: ResourceInstancesApiGetResourceInstanceRequest, options?: AxiosRequestConfig): Promise>; /** * Lists all the resource instances defined within an environment. * @summary List Resource Instances * @param {ResourceInstancesApiListResourceInstancesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceInstancesApi */ listResourceInstances(requestParameters: ResourceInstancesApiListResourceInstancesRequest, options?: AxiosRequestConfig): Promise>; /** * Partially updates the instance definition. Fields that will be provided will be completely overwritten. * @summary Update Resource Instance * @param {ResourceInstancesApiUpdateResourceInstanceRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceInstancesApi */ updateResourceInstance(requestParameters: ResourceInstancesApiUpdateResourceInstanceRequest, options?: AxiosRequestConfig): Promise>; }