/** * 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 { ResourceActionCreate } from '../types'; import { ResourceActionRead } from '../types'; import { ResourceActionUpdate } from '../types'; /** * ResourceActionsApi - axios parameter creator * @export */ export declare const ResourceActionsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates a new action that can affect the resource. * @summary Create Resource Action * @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 {ResourceActionCreate} resourceActionCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceAction: (projId: string, envId: string, resourceId: string, resourceActionCreate: ResourceActionCreate, options?: AxiosRequestConfig) => Promise; /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceAction: (projId: string, envId: string, resourceId: string, actionId: string, options?: AxiosRequestConfig) => Promise; /** * Gets a single action defined on the resource, if such action exists. * @summary Get Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceAction: (projId: string, envId: string, resourceId: string, actionId: string, options?: AxiosRequestConfig) => Promise; /** * Lists all the actions defined on the resource. * @summary List Resource Actions * @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} */ listResourceActions: (projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {ResourceActionUpdate} resourceActionUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceAction: (projId: string, envId: string, resourceId: string, actionId: string, resourceActionUpdate: ResourceActionUpdate, options?: AxiosRequestConfig) => Promise; }; /** * ResourceActionsApi - functional programming interface * @export */ export declare const ResourceActionsApiFp: (configuration?: Configuration) => { /** * Creates a new action that can affect the resource. * @summary Create Resource Action * @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 {ResourceActionCreate} resourceActionCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceAction(projId: string, envId: string, resourceId: string, resourceActionCreate: ResourceActionCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceAction(projId: string, envId: string, resourceId: string, actionId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a single action defined on the resource, if such action exists. * @summary Get Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceAction(projId: string, envId: string, resourceId: string, actionId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists all the actions defined on the resource. * @summary List Resource Actions * @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} */ listResourceActions(projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {ResourceActionUpdate} resourceActionUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceAction(projId: string, envId: string, resourceId: string, actionId: string, resourceActionUpdate: ResourceActionUpdate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * ResourceActionsApi - factory interface * @export */ export declare const ResourceActionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates a new action that can affect the resource. * @summary Create Resource Action * @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 {ResourceActionCreate} resourceActionCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createResourceAction(projId: string, envId: string, resourceId: string, resourceActionCreate: ResourceActionCreate, options?: any): AxiosPromise; /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteResourceAction(projId: string, envId: string, resourceId: string, actionId: string, options?: any): AxiosPromise; /** * Gets a single action defined on the resource, if such action exists. * @summary Get Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getResourceAction(projId: string, envId: string, resourceId: string, actionId: string, options?: any): AxiosPromise; /** * Lists all the actions defined on the resource. * @summary List Resource Actions * @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} */ listResourceActions(projId: string, envId: string, resourceId: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Action * @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} actionId Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @param {ResourceActionUpdate} resourceActionUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateResourceAction(projId: string, envId: string, resourceId: string, actionId: string, resourceActionUpdate: ResourceActionUpdate, options?: any): AxiosPromise; }; /** * Request parameters for createResourceAction operation in ResourceActionsApi. * @export * @interface ResourceActionsApiCreateResourceActionRequest */ export interface ResourceActionsApiCreateResourceActionRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceActionsApiCreateResourceAction */ 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 ResourceActionsApiCreateResourceAction */ 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 ResourceActionsApiCreateResourceAction */ readonly resourceId: string; /** * * @type {ResourceActionCreate} * @memberof ResourceActionsApiCreateResourceAction */ readonly resourceActionCreate: ResourceActionCreate; } /** * Request parameters for deleteResourceAction operation in ResourceActionsApi. * @export * @interface ResourceActionsApiDeleteResourceActionRequest */ export interface ResourceActionsApiDeleteResourceActionRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceActionsApiDeleteResourceAction */ 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 ResourceActionsApiDeleteResourceAction */ 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 ResourceActionsApiDeleteResourceAction */ readonly resourceId: string; /** * Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @type {string} * @memberof ResourceActionsApiDeleteResourceAction */ readonly actionId: string; } /** * Request parameters for getResourceAction operation in ResourceActionsApi. * @export * @interface ResourceActionsApiGetResourceActionRequest */ export interface ResourceActionsApiGetResourceActionRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceActionsApiGetResourceAction */ 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 ResourceActionsApiGetResourceAction */ 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 ResourceActionsApiGetResourceAction */ readonly resourceId: string; /** * Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @type {string} * @memberof ResourceActionsApiGetResourceAction */ readonly actionId: string; } /** * Request parameters for listResourceActions operation in ResourceActionsApi. * @export * @interface ResourceActionsApiListResourceActionsRequest */ export interface ResourceActionsApiListResourceActionsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceActionsApiListResourceActions */ 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 ResourceActionsApiListResourceActions */ 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 ResourceActionsApiListResourceActions */ readonly resourceId: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof ResourceActionsApiListResourceActions */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof ResourceActionsApiListResourceActions */ readonly perPage?: number; } /** * Request parameters for updateResourceAction operation in ResourceActionsApi. * @export * @interface ResourceActionsApiUpdateResourceActionRequest */ export interface ResourceActionsApiUpdateResourceActionRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ResourceActionsApiUpdateResourceAction */ 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 ResourceActionsApiUpdateResourceAction */ 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 ResourceActionsApiUpdateResourceAction */ readonly resourceId: string; /** * Either the unique id of the action, or the URL-friendly key of the action (i.e: the \"slug\"). * @type {string} * @memberof ResourceActionsApiUpdateResourceAction */ readonly actionId: string; /** * * @type {ResourceActionUpdate} * @memberof ResourceActionsApiUpdateResourceAction */ readonly resourceActionUpdate: ResourceActionUpdate; } /** * ResourceActionsApi - object-oriented interface * @export * @class ResourceActionsApi * @extends {BaseAPI} */ export declare class ResourceActionsApi extends BaseAPI { /** * Creates a new action that can affect the resource. * @summary Create Resource Action * @param {ResourceActionsApiCreateResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceActionsApi */ createResourceAction(requestParameters: ResourceActionsApiCreateResourceActionRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes the action and all its related data. This includes any permissions granted to perform the action. * @summary Delete Resource Action * @param {ResourceActionsApiDeleteResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceActionsApi */ deleteResourceAction(requestParameters: ResourceActionsApiDeleteResourceActionRequest, options?: AxiosRequestConfig): Promise>; /** * Gets a single action defined on the resource, if such action exists. * @summary Get Resource Action * @param {ResourceActionsApiGetResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceActionsApi */ getResourceAction(requestParameters: ResourceActionsApiGetResourceActionRequest, options?: AxiosRequestConfig): Promise>; /** * Lists all the actions defined on the resource. * @summary List Resource Actions * @param {ResourceActionsApiListResourceActionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceActionsApi */ listResourceActions(requestParameters: ResourceActionsApiListResourceActionsRequest, options?: AxiosRequestConfig): Promise>; /** * Partially updates the action defined on a resource. Fields that will be provided will be completely overwritten. * @summary Update Resource Action * @param {ResourceActionsApiUpdateResourceActionRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ResourceActionsApi */ updateResourceAction(requestParameters: ResourceActionsApiUpdateResourceActionRequest, options?: AxiosRequestConfig): Promise>; }