/** * 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 { ResourceAttributeCreate } from '../types'; import { ResourceAttributeRead } from '../types'; import { ResourceAttributeUpdate } from '../types'; /** * ResourceAttributesApi - axios parameter creator * @export */ export declare const ResourceAttributesApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates a new attribute as part of the resource definition. * @summary Create Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceAttributeCreate} resourceAttributeCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceAttribute: (projId: string, envId: string, resourceId: string, resourceAttributeCreate: ResourceAttributeCreate, options?: AxiosRequestConfig) => Promise; /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @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} */ deleteResourceAttribute: (projId: string, envId: string, resourceId: string, attributeId: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Gets a single attribute defined on the resource, if such attribute exists. * @summary Get Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceAttribute: (projId: string, envId: string, resourceId: string, attributeId: string, options?: AxiosRequestConfig) => Promise; /** * Lists all the attributes defined on the resource. * @summary List Resource Attributes * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @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} */ listResourceAttributes: (projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Partially updates the attribute defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceAttribute: (projId: string, envId: string, resourceId: string, attributeId: string, resourceAttributeUpdate: ResourceAttributeUpdate, options?: AxiosRequestConfig) => Promise; }; /** * ResourceAttributesApi - functional programming interface * @export */ export declare const ResourceAttributesApiFp: (configuration?: Configuration) => { /** * Creates a new attribute as part of the resource definition. * @summary Create Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceAttributeCreate} resourceAttributeCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceAttribute(projId: string, envId: string, resourceId: string, resourceAttributeCreate: ResourceAttributeCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @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} */ deleteResourceAttribute(projId: string, envId: string, resourceId: string, attributeId: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a single attribute defined on the resource, if such attribute exists. * @summary Get Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceAttribute(projId: string, envId: string, resourceId: string, attributeId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists all the attributes defined on the resource. * @summary List Resource Attributes * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @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} */ listResourceAttributes(projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Partially updates the attribute defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceAttribute(projId: string, envId: string, resourceId: string, attributeId: string, resourceAttributeUpdate: ResourceAttributeUpdate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * ResourceAttributesApi - factory interface * @export */ export declare const ResourceAttributesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates a new attribute as part of the resource definition. * @summary Create Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {ResourceAttributeCreate} resourceAttributeCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceAttribute(projId: string, envId: string, resourceId: string, resourceAttributeCreate: ResourceAttributeCreate, options?: any): AxiosPromise; /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @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} */ deleteResourceAttribute(projId: string, envId: string, resourceId: string, attributeId: string, page?: number, perPage?: number, options?: any): AxiosPromise; /** * Gets a single attribute defined on the resource, if such attribute exists. * @summary Get Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceAttribute(projId: string, envId: string, resourceId: string, attributeId: string, options?: any): AxiosPromise; /** * Lists all the attributes defined on the resource. * @summary List Resource Attributes * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @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} */ listResourceAttributes(projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * Partially updates the attribute defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Attribute * @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} resourceId Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @param {string} attributeId Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @param {ResourceAttributeUpdate} resourceAttributeUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceAttribute(projId: string, envId: string, resourceId: string, attributeId: string, resourceAttributeUpdate: ResourceAttributeUpdate, options?: any): AxiosPromise; }; /** * Request parameters for createResourceAttribute operation in ResourceAttributesApi. * @export * @interface ResourceAttributesApiCreateResourceAttributeRequest */ export interface ResourceAttributesApiCreateResourceAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiCreateResourceAttribute */ 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 ResourceAttributesApiCreateResourceAttribute */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiCreateResourceAttribute */ readonly resourceId: string; /** * * @type {ResourceAttributeCreate} * @memberof ResourceAttributesApiCreateResourceAttribute */ readonly resourceAttributeCreate: ResourceAttributeCreate; } /** * Request parameters for deleteResourceAttribute operation in ResourceAttributesApi. * @export * @interface ResourceAttributesApiDeleteResourceAttributeRequest */ export interface ResourceAttributesApiDeleteResourceAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiDeleteResourceAttribute */ 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 ResourceAttributesApiDeleteResourceAttribute */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiDeleteResourceAttribute */ readonly resourceId: string; /** * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiDeleteResourceAttribute */ readonly attributeId: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof ResourceAttributesApiDeleteResourceAttribute */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof ResourceAttributesApiDeleteResourceAttribute */ readonly perPage?: number; } /** * Request parameters for getResourceAttribute operation in ResourceAttributesApi. * @export * @interface ResourceAttributesApiGetResourceAttributeRequest */ export interface ResourceAttributesApiGetResourceAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiGetResourceAttribute */ 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 ResourceAttributesApiGetResourceAttribute */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiGetResourceAttribute */ readonly resourceId: string; /** * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiGetResourceAttribute */ readonly attributeId: string; } /** * Request parameters for listResourceAttributes operation in ResourceAttributesApi. * @export * @interface ResourceAttributesApiListResourceAttributesRequest */ export interface ResourceAttributesApiListResourceAttributesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiListResourceAttributes */ 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 ResourceAttributesApiListResourceAttributes */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiListResourceAttributes */ readonly resourceId: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof ResourceAttributesApiListResourceAttributes */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof ResourceAttributesApiListResourceAttributes */ readonly perPage?: number; } /** * Request parameters for updateResourceAttribute operation in ResourceAttributesApi. * @export * @interface ResourceAttributesApiUpdateResourceAttributeRequest */ export interface ResourceAttributesApiUpdateResourceAttributeRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiUpdateResourceAttribute */ 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 ResourceAttributesApiUpdateResourceAttribute */ readonly envId: string; /** * Either the unique id of the resource, or the URL-friendly key of the resource (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiUpdateResourceAttribute */ readonly resourceId: string; /** * Either the unique id of the attribute, or the URL-friendly key of the attribute (i.e: the \"slug\"). * @type {string} * @memberof ResourceAttributesApiUpdateResourceAttribute */ readonly attributeId: string; /** * * @type {ResourceAttributeUpdate} * @memberof ResourceAttributesApiUpdateResourceAttribute */ readonly resourceAttributeUpdate: ResourceAttributeUpdate; } /** * ResourceAttributesApi - object-oriented interface * @export * @class ResourceAttributesApi * @extends {BaseAPI} */ export declare class ResourceAttributesApi extends BaseAPI { /** * Creates a new attribute as part of the resource definition. * @summary Create Resource Attribute * @param {ResourceAttributesApiCreateResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceAttributesApi */ createResourceAttribute(requestParameters: ResourceAttributesApiCreateResourceAttributeRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes the attribute and all its related data. Note: If the attribute is used by policies, removing it will cause the attribute to evaluate as `undefined`. * @summary Delete Resource Attribute * @param {ResourceAttributesApiDeleteResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceAttributesApi */ deleteResourceAttribute(requestParameters: ResourceAttributesApiDeleteResourceAttributeRequest, options?: AxiosRequestConfig): Promise>; /** * Gets a single attribute defined on the resource, if such attribute exists. * @summary Get Resource Attribute * @param {ResourceAttributesApiGetResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceAttributesApi */ getResourceAttribute(requestParameters: ResourceAttributesApiGetResourceAttributeRequest, options?: AxiosRequestConfig): Promise>; /** * Lists all the attributes defined on the resource. * @summary List Resource Attributes * @param {ResourceAttributesApiListResourceAttributesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceAttributesApi */ listResourceAttributes(requestParameters: ResourceAttributesApiListResourceAttributesRequest, options?: AxiosRequestConfig): Promise>; /** * Partially updates the attribute defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Attribute * @param {ResourceAttributesApiUpdateResourceAttributeRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceAttributesApi */ updateResourceAttribute(requestParameters: ResourceAttributesApiUpdateResourceAttributeRequest, options?: AxiosRequestConfig): Promise>; }