/** * 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 { BulkRoleAssignmentReport } from '../types'; import { BulkRoleUnAssignmentReport } from '../types'; import { RoleAssignmentCreate } from '../types'; import { RoleAssignmentRead } from '../types'; import { RoleAssignmentRemove } from '../types'; /** * RoleAssignmentsApi - axios parameter creator * @export */ export declare const RoleAssignmentsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Assigns a role to a user within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign 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 {RoleAssignmentCreate} roleAssignmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignRole: (projId: string, envId: string, roleAssignmentCreate: RoleAssignmentCreate, options?: AxiosRequestConfig) => Promise; /** * * @summary Bulk Assign 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 {Array} roleAssignmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ bulkAssignRole: (projId: string, envId: string, roleAssignmentCreate: Array, options?: AxiosRequestConfig) => Promise; /** * * @summary Bulk Unassign 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 {Array} roleAssignmentRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ bulkUnassignRole: (projId: string, envId: string, roleAssignmentRemove: Array, options?: AxiosRequestConfig) => Promise; /** * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user. - If the `tenant` filter is present, will only return the role assignments in that tenant. - If the `role` filter is present, will only return role assignments that are granting that role. * @summary List Role Assignments * @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} [user] optional user filter, will only return role assignments granted to this user. * @param {string} [role] optional role filter, will only return role assignments granting this role. * @param {string} [tenant] optional tenant filter, will only return role assignments granted in that tenant. * @param {string} [resourceInstance] optional resource instance filter, will only return role assignments granted on that resource instance. * @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} */ listRoleAssignments: (projId: string, envId: string, user?: string, role?: string, tenant?: string, resourceInstance?: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Unassigns a user role within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign 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 {RoleAssignmentRemove} roleAssignmentRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ unassignRole: (projId: string, envId: string, roleAssignmentRemove: RoleAssignmentRemove, options?: AxiosRequestConfig) => Promise; }; /** * RoleAssignmentsApi - functional programming interface * @export */ export declare const RoleAssignmentsApiFp: (configuration?: Configuration) => { /** * Assigns a role to a user within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign 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 {RoleAssignmentCreate} roleAssignmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignRole(projId: string, envId: string, roleAssignmentCreate: RoleAssignmentCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * * @summary Bulk Assign 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 {Array} roleAssignmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ bulkAssignRole(projId: string, envId: string, roleAssignmentCreate: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * * @summary Bulk Unassign 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 {Array} roleAssignmentRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ bulkUnassignRole(projId: string, envId: string, roleAssignmentRemove: Array, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user. - If the `tenant` filter is present, will only return the role assignments in that tenant. - If the `role` filter is present, will only return role assignments that are granting that role. * @summary List Role Assignments * @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} [user] optional user filter, will only return role assignments granted to this user. * @param {string} [role] optional role filter, will only return role assignments granting this role. * @param {string} [tenant] optional tenant filter, will only return role assignments granted in that tenant. * @param {string} [resourceInstance] optional resource instance filter, will only return role assignments granted on that resource instance. * @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} */ listRoleAssignments(projId: string, envId: string, user?: string, role?: string, tenant?: string, resourceInstance?: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Unassigns a user role within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign 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 {RoleAssignmentRemove} roleAssignmentRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ unassignRole(projId: string, envId: string, roleAssignmentRemove: RoleAssignmentRemove, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * RoleAssignmentsApi - factory interface * @export */ export declare const RoleAssignmentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Assigns a role to a user within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign 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 {RoleAssignmentCreate} roleAssignmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignRole(projId: string, envId: string, roleAssignmentCreate: RoleAssignmentCreate, options?: any): AxiosPromise; /** * * @summary Bulk Assign 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 {Array} roleAssignmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ bulkAssignRole(projId: string, envId: string, roleAssignmentCreate: Array, options?: any): AxiosPromise; /** * * @summary Bulk Unassign 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 {Array} roleAssignmentRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ bulkUnassignRole(projId: string, envId: string, roleAssignmentRemove: Array, options?: any): AxiosPromise; /** * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user. - If the `tenant` filter is present, will only return the role assignments in that tenant. - If the `role` filter is present, will only return role assignments that are granting that role. * @summary List Role Assignments * @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} [user] optional user filter, will only return role assignments granted to this user. * @param {string} [role] optional role filter, will only return role assignments granting this role. * @param {string} [tenant] optional tenant filter, will only return role assignments granted in that tenant. * @param {string} [resourceInstance] optional resource instance filter, will only return role assignments granted on that resource instance. * @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} */ listRoleAssignments(projId: string, envId: string, user?: string, role?: string, tenant?: string, resourceInstance?: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * Unassigns a user role within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign 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 {RoleAssignmentRemove} roleAssignmentRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ unassignRole(projId: string, envId: string, roleAssignmentRemove: RoleAssignmentRemove, options?: any): AxiosPromise; }; /** * Request parameters for assignRole operation in RoleAssignmentsApi. * @export * @interface RoleAssignmentsApiAssignRoleRequest */ export interface RoleAssignmentsApiAssignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RoleAssignmentsApiAssignRole */ 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 RoleAssignmentsApiAssignRole */ readonly envId: string; /** * * @type {RoleAssignmentCreate} * @memberof RoleAssignmentsApiAssignRole */ readonly roleAssignmentCreate: RoleAssignmentCreate; } /** * Request parameters for bulkAssignRole operation in RoleAssignmentsApi. * @export * @interface RoleAssignmentsApiBulkAssignRoleRequest */ export interface RoleAssignmentsApiBulkAssignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RoleAssignmentsApiBulkAssignRole */ 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 RoleAssignmentsApiBulkAssignRole */ readonly envId: string; /** * * @type {Array} * @memberof RoleAssignmentsApiBulkAssignRole */ readonly roleAssignmentCreate: Array; } /** * Request parameters for bulkUnassignRole operation in RoleAssignmentsApi. * @export * @interface RoleAssignmentsApiBulkUnassignRoleRequest */ export interface RoleAssignmentsApiBulkUnassignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RoleAssignmentsApiBulkUnassignRole */ 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 RoleAssignmentsApiBulkUnassignRole */ readonly envId: string; /** * * @type {Array} * @memberof RoleAssignmentsApiBulkUnassignRole */ readonly roleAssignmentRemove: Array; } /** * Request parameters for listRoleAssignments operation in RoleAssignmentsApi. * @export * @interface RoleAssignmentsApiListRoleAssignmentsRequest */ export interface RoleAssignmentsApiListRoleAssignmentsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RoleAssignmentsApiListRoleAssignments */ 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 RoleAssignmentsApiListRoleAssignments */ readonly envId: string; /** * optional user filter, will only return role assignments granted to this user. * @type {string} * @memberof RoleAssignmentsApiListRoleAssignments */ readonly user?: string; /** * optional role filter, will only return role assignments granting this role. * @type {string} * @memberof RoleAssignmentsApiListRoleAssignments */ readonly role?: string; /** * optional tenant filter, will only return role assignments granted in that tenant. * @type {string} * @memberof RoleAssignmentsApiListRoleAssignments */ readonly tenant?: string; /** * optional resource instance filter, will only return role assignments granted on that resource instance. * @type {string} * @memberof RoleAssignmentsApiListRoleAssignments */ readonly resourceInstance?: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof RoleAssignmentsApiListRoleAssignments */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof RoleAssignmentsApiListRoleAssignments */ readonly perPage?: number; } /** * Request parameters for unassignRole operation in RoleAssignmentsApi. * @export * @interface RoleAssignmentsApiUnassignRoleRequest */ export interface RoleAssignmentsApiUnassignRoleRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof RoleAssignmentsApiUnassignRole */ 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 RoleAssignmentsApiUnassignRole */ readonly envId: string; /** * * @type {RoleAssignmentRemove} * @memberof RoleAssignmentsApiUnassignRole */ readonly roleAssignmentRemove: RoleAssignmentRemove; } /** * RoleAssignmentsApi - object-oriented interface * @export * @class RoleAssignmentsApi * @extends {BaseAPI} */ export declare class RoleAssignmentsApi extends BaseAPI { /** * Assigns a role to a user within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. * @summary Assign Role * @param {RoleAssignmentsApiAssignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoleAssignmentsApi */ assignRole(requestParameters: RoleAssignmentsApiAssignRoleRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Bulk Assign Role * @param {RoleAssignmentsApiBulkAssignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoleAssignmentsApi */ bulkAssignRole(requestParameters: RoleAssignmentsApiBulkAssignRoleRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Bulk Unassign Role * @param {RoleAssignmentsApiBulkUnassignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoleAssignmentsApi */ bulkUnassignRole(requestParameters: RoleAssignmentsApiBulkUnassignRoleRequest, options?: AxiosRequestConfig): Promise>; /** * Lists the role assignments defined within an environment. - If the `user` filter is present, will only return the role assignments of that user. - If the `tenant` filter is present, will only return the role assignments in that tenant. - If the `role` filter is present, will only return role assignments that are granting that role. * @summary List Role Assignments * @param {RoleAssignmentsApiListRoleAssignmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoleAssignmentsApi */ listRoleAssignments(requestParameters: RoleAssignmentsApiListRoleAssignmentsRequest, options?: AxiosRequestConfig): Promise>; /** * Unassigns a user role within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404. * @summary Unassign Role * @param {RoleAssignmentsApiUnassignRoleRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof RoleAssignmentsApi */ unassignRole(requestParameters: RoleAssignmentsApiUnassignRoleRequest, options?: AxiosRequestConfig): Promise>; }