/** * 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 { AddRolePermissions } from '../types'; import { RemoveRolePermissions } from '../types'; import { RoleCreate } from '../types'; import { RoleRead } from '../types'; import { RoleUpdate } from '../types'; /** * RolesApi - axios parameter creator * @export */ export declare const RolesApiAxiosParamCreator: (configuration?: Configuration) => { /** * This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. * @summary Add Parent Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ addParentRole: (projId: string, envId: string, roleId: string, parentRoleId: string, options?: AxiosRequestConfig) => Promise; /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions To Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {AddRolePermissions} addRolePermissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignPermissionsToRole: (projId: string, envId: string, roleId: string, addRolePermissions: AddRolePermissions, options?: AxiosRequestConfig) => Promise; /** * Creates a new tenant role. * @summary Create Role * @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 {RoleCreate} roleCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRole: (projId: string, envId: string, roleCreate: RoleCreate, options?: AxiosRequestConfig) => Promise; /** * Deletes a tenant role and all its related data. This includes any permissions granted to said role. * @summary Delete Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRole: (projId: string, envId: string, roleId: string, options?: AxiosRequestConfig) => Promise; /** * Gets a single tenant role, if such role exists. * @summary Get Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRole: (projId: string, envId: string, roleId: string, options?: AxiosRequestConfig) => Promise; /** * Lists all tenant roles. * @summary List Roles * @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 {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} */ listRoles: (projId: string, envId: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. * @summary Remove Parent Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeParentRole: (projId: string, envId: string, roleId: string, parentRoleId: string, options?: AxiosRequestConfig) => Promise; /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions From Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RemoveRolePermissions} removeRolePermissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ removePermissionsFromRole: (projId: string, envId: string, roleId: string, removeRolePermissions: RemoveRolePermissions, options?: AxiosRequestConfig) => Promise; /** * Partially updates a tenant role. Fields that will be provided will be completely overwritten. * @summary Update Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RoleUpdate} roleUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateRole: (projId: string, envId: string, roleId: string, roleUpdate: RoleUpdate, options?: AxiosRequestConfig) => Promise; }; /** * RolesApi - functional programming interface * @export */ export declare const RolesApiFp: (configuration?: Configuration) => { /** * This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. * @summary Add Parent Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ addParentRole(projId: string, envId: string, roleId: string, parentRoleId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions To Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {AddRolePermissions} addRolePermissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignPermissionsToRole(projId: string, envId: string, roleId: string, addRolePermissions: AddRolePermissions, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Creates a new tenant role. * @summary Create Role * @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 {RoleCreate} roleCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRole(projId: string, envId: string, roleCreate: RoleCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes a tenant role and all its related data. This includes any permissions granted to said role. * @summary Delete Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRole(projId: string, envId: string, roleId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a single tenant role, if such role exists. * @summary Get Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRole(projId: string, envId: string, roleId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists all tenant roles. * @summary List Roles * @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 {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} */ listRoles(projId: string, envId: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. * @summary Remove Parent Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeParentRole(projId: string, envId: string, roleId: string, parentRoleId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions From Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RemoveRolePermissions} removeRolePermissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ removePermissionsFromRole(projId: string, envId: string, roleId: string, removeRolePermissions: RemoveRolePermissions, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Partially updates a tenant role. Fields that will be provided will be completely overwritten. * @summary Update Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RoleUpdate} roleUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateRole(projId: string, envId: string, roleId: string, roleUpdate: RoleUpdate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * RolesApi - factory interface * @export */ export declare const RolesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. * @summary Add Parent Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ addParentRole(projId: string, envId: string, roleId: string, parentRoleId: string, options?: any): AxiosPromise; /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions To Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {AddRolePermissions} addRolePermissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignPermissionsToRole(projId: string, envId: string, roleId: string, addRolePermissions: AddRolePermissions, options?: any): AxiosPromise; /** * Creates a new tenant role. * @summary Create Role * @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 {RoleCreate} roleCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createRole(projId: string, envId: string, roleCreate: RoleCreate, options?: any): AxiosPromise; /** * Deletes a tenant role and all its related data. This includes any permissions granted to said role. * @summary Delete Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteRole(projId: string, envId: string, roleId: string, options?: any): AxiosPromise; /** * Gets a single tenant role, if such role exists. * @summary Get Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getRole(projId: string, envId: string, roleId: string, options?: any): AxiosPromise; /** * Lists all tenant roles. * @summary List Roles * @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 {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} */ listRoles(projId: string, envId: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. * @summary Remove Parent Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {string} parentRoleId Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ removeParentRole(projId: string, envId: string, roleId: string, parentRoleId: string, options?: any): AxiosPromise; /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions From Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RemoveRolePermissions} removeRolePermissions * @param {*} [options] Override http request option. * @throws {RequiredError} */ removePermissionsFromRole(projId: string, envId: string, roleId: string, removeRolePermissions: RemoveRolePermissions, options?: any): AxiosPromise; /** * Partially updates a tenant role. Fields that will be provided will be completely overwritten. * @summary Update Role * @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} roleId Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @param {RoleUpdate} roleUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateRole(projId: string, envId: string, roleId: string, roleUpdate: RoleUpdate, options?: any): AxiosPromise; }; /** * Request parameters for addParentRole operation in RolesApi. * @export * @interface RolesApiAddParentRoleRequest */ export interface RolesApiAddParentRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiAddParentRole */ 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 RolesApiAddParentRole */ readonly envId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiAddParentRole */ readonly roleId: string; /** * Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiAddParentRole */ readonly parentRoleId: string; } /** * Request parameters for assignPermissionsToRole operation in RolesApi. * @export * @interface RolesApiAssignPermissionsToRoleRequest */ export interface RolesApiAssignPermissionsToRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiAssignPermissionsToRole */ 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 RolesApiAssignPermissionsToRole */ readonly envId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiAssignPermissionsToRole */ readonly roleId: string; /** * * @type {AddRolePermissions} * @memberof RolesApiAssignPermissionsToRole */ readonly addRolePermissions: AddRolePermissions; } /** * Request parameters for createRole operation in RolesApi. * @export * @interface RolesApiCreateRoleRequest */ export interface RolesApiCreateRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiCreateRole */ 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 RolesApiCreateRole */ readonly envId: string; /** * * @type {RoleCreate} * @memberof RolesApiCreateRole */ readonly roleCreate: RoleCreate; } /** * Request parameters for deleteRole operation in RolesApi. * @export * @interface RolesApiDeleteRoleRequest */ export interface RolesApiDeleteRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiDeleteRole */ 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 RolesApiDeleteRole */ readonly envId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiDeleteRole */ readonly roleId: string; } /** * Request parameters for getRole operation in RolesApi. * @export * @interface RolesApiGetRoleRequest */ export interface RolesApiGetRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiGetRole */ 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 RolesApiGetRole */ readonly envId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiGetRole */ readonly roleId: string; } /** * Request parameters for listRoles operation in RolesApi. * @export * @interface RolesApiListRolesRequest */ export interface RolesApiListRolesRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiListRoles */ 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 RolesApiListRoles */ readonly envId: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof RolesApiListRoles */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof RolesApiListRoles */ readonly perPage?: number; } /** * Request parameters for removeParentRole operation in RolesApi. * @export * @interface RolesApiRemoveParentRoleRequest */ export interface RolesApiRemoveParentRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiRemoveParentRole */ 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 RolesApiRemoveParentRole */ readonly envId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiRemoveParentRole */ readonly roleId: string; /** * Either the unique id of the parent role, or the URL-friendly key of the parent role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiRemoveParentRole */ readonly parentRoleId: string; } /** * Request parameters for removePermissionsFromRole operation in RolesApi. * @export * @interface RolesApiRemovePermissionsFromRoleRequest */ export interface RolesApiRemovePermissionsFromRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiRemovePermissionsFromRole */ 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 RolesApiRemovePermissionsFromRole */ readonly envId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiRemovePermissionsFromRole */ readonly roleId: string; /** * * @type {RemoveRolePermissions} * @memberof RolesApiRemovePermissionsFromRole */ readonly removeRolePermissions: RemoveRolePermissions; } /** * Request parameters for updateRole operation in RolesApi. * @export * @interface RolesApiUpdateRoleRequest */ export interface RolesApiUpdateRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RolesApiUpdateRole */ 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 RolesApiUpdateRole */ readonly envId: string; /** * Either the unique id of the role, or the URL-friendly key of the role (i.e: the \"slug\"). * @type {string} * @memberof RolesApiUpdateRole */ readonly roleId: string; /** * * @type {RoleUpdate} * @memberof RolesApiUpdateRole */ readonly roleUpdate: RoleUpdate; } /** * RolesApi - object-oriented interface * @export * @class RolesApi * @extends {BaseAPI} */ export declare class RolesApi extends BaseAPI { /** * This endpoint is part of the role hierarchy feature. Makes role with id `role_id` extend the role with id `parent_role_id`. In other words, `role_id` will automatically be assigned any permissions that are granted to `parent_role_id`. We can say the `role_id` **extends** `parent_role_id` or **inherits** from `parent_role_id`. If `role_id` is already an ancestor of `parent_role_id`, the request will fail with HTTP 400 to prevent a cycle in the role hierarchy. * @summary Add Parent Role * @param {RolesApiAddParentRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ addParentRole(requestParameters: RolesApiAddParentRoleRequest, options?: AxiosRequestConfig): Promise>; /** * Assign permissions to role. If some of the permissions specified are already assigned, will skip them. * @summary Assign Permissions To Role * @param {RolesApiAssignPermissionsToRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ assignPermissionsToRole(requestParameters: RolesApiAssignPermissionsToRoleRequest, options?: AxiosRequestConfig): Promise>; /** * Creates a new tenant role. * @summary Create Role * @param {RolesApiCreateRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ createRole(requestParameters: RolesApiCreateRoleRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes a tenant role and all its related data. This includes any permissions granted to said role. * @summary Delete Role * @param {RolesApiDeleteRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ deleteRole(requestParameters: RolesApiDeleteRoleRequest, options?: AxiosRequestConfig): Promise>; /** * Gets a single tenant role, if such role exists. * @summary Get Role * @param {RolesApiGetRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ getRole(requestParameters: RolesApiGetRoleRequest, options?: AxiosRequestConfig): Promise>; /** * Lists all tenant roles. * @summary List Roles * @param {RolesApiListRolesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ listRoles(requestParameters: RolesApiListRolesRequest, options?: AxiosRequestConfig): Promise>; /** * This endpoint is part of the role hierarchy feature. Removes `parent_role_id` from the list of parent roles of role with id `role_id`. In other words, `role_id` will no longer be automatically assigned permissions that are granted to `parent_role_id`. We can say the `role_id` **not longer extends** `parent_role_id` or **no longer inherits** from `parent_role_id`. * @summary Remove Parent Role * @param {RolesApiRemoveParentRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ removeParentRole(requestParameters: RolesApiRemoveParentRoleRequest, options?: AxiosRequestConfig): Promise>; /** * Remove permissions from role. If some of the permissions specified are already unassigned, will skip them. * @summary Remove Permissions From Role * @param {RolesApiRemovePermissionsFromRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ removePermissionsFromRole(requestParameters: RolesApiRemovePermissionsFromRoleRequest, options?: AxiosRequestConfig): Promise>; /** * Partially updates a tenant role. Fields that will be provided will be completely overwritten. * @summary Update Role * @param {RolesApiUpdateRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RolesApi */ updateRole(requestParameters: RolesApiUpdateRoleRequest, options?: AxiosRequestConfig): Promise>; }