/** * 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 { PaginatedResultUserRead } from '../types'; import { TenantCreate } from '../types'; import { TenantRead } from '../types'; import { TenantUpdate } from '../types'; /** * TenantsApi - axios parameter creator * @export */ export declare const TenantsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Creates a new tenant inside the Permit.io system. If the tenant is already created: will return 200 instead of 201, and will return the existing tenant object in the response body. * @summary Create Tenant * @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 {TenantCreate} tenantCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTenant: (projId: string, envId: string, tenantCreate: TenantCreate, options?: AxiosRequestConfig) => Promise; /** * Deletes the tenant and all its related data. * @summary Delete Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTenant: (projId: string, envId: string, tenantId: string, options?: AxiosRequestConfig) => Promise; /** * Deletes a user under a tenant. * @summary Delete Tenant User * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTenantUser: (projId: string, envId: string, tenantId: string, userId: string, options?: AxiosRequestConfig) => Promise; /** * Gets a tenant, if such tenant exists. Otherwise returns 404. * @summary Get Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTenant: (projId: string, envId: string, tenantId: string, options?: AxiosRequestConfig) => Promise; /** * * @summary List Tenant Users * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (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} [search] Text search for the email field * @param {string} [role] Match users with a specific role * @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} */ listTenantUsers: (projId: string, tenantId: string, envId: string, search?: string, role?: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Lists all the tenants defined within an environment. * @summary List Tenants * @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} [search] Text search for the tenant name or key * @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} */ listTenants: (projId: string, envId: string, search?: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Partially updates the tenant definition. Fields that will be provided will be completely overwritten. * @summary Update Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {TenantUpdate} tenantUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateTenant: (projId: string, envId: string, tenantId: string, tenantUpdate: TenantUpdate, options?: AxiosRequestConfig) => Promise; }; /** * TenantsApi - functional programming interface * @export */ export declare const TenantsApiFp: (configuration?: Configuration) => { /** * Creates a new tenant inside the Permit.io system. If the tenant is already created: will return 200 instead of 201, and will return the existing tenant object in the response body. * @summary Create Tenant * @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 {TenantCreate} tenantCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTenant(projId: string, envId: string, tenantCreate: TenantCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes the tenant and all its related data. * @summary Delete Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTenant(projId: string, envId: string, tenantId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes a user under a tenant. * @summary Delete Tenant User * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTenantUser(projId: string, envId: string, tenantId: string, userId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a tenant, if such tenant exists. Otherwise returns 404. * @summary Get Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTenant(projId: string, envId: string, tenantId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * * @summary List Tenant Users * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (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} [search] Text search for the email field * @param {string} [role] Match users with a specific role * @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} */ listTenantUsers(projId: string, tenantId: string, envId: string, search?: string, role?: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists all the tenants defined within an environment. * @summary List Tenants * @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} [search] Text search for the tenant name or key * @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} */ listTenants(projId: string, envId: string, search?: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Partially updates the tenant definition. Fields that will be provided will be completely overwritten. * @summary Update Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {TenantUpdate} tenantUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateTenant(projId: string, envId: string, tenantId: string, tenantUpdate: TenantUpdate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * TenantsApi - factory interface * @export */ export declare const TenantsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Creates a new tenant inside the Permit.io system. If the tenant is already created: will return 200 instead of 201, and will return the existing tenant object in the response body. * @summary Create Tenant * @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 {TenantCreate} tenantCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createTenant(projId: string, envId: string, tenantCreate: TenantCreate, options?: any): AxiosPromise; /** * Deletes the tenant and all its related data. * @summary Delete Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTenant(projId: string, envId: string, tenantId: string, options?: any): AxiosPromise; /** * Deletes a user under a tenant. * @summary Delete Tenant User * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {string} userId Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deleteTenantUser(projId: string, envId: string, tenantId: string, userId: string, options?: any): AxiosPromise; /** * Gets a tenant, if such tenant exists. Otherwise returns 404. * @summary Get Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getTenant(projId: string, envId: string, tenantId: string, options?: any): AxiosPromise; /** * * @summary List Tenant Users * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (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} [search] Text search for the email field * @param {string} [role] Match users with a specific role * @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} */ listTenantUsers(projId: string, tenantId: string, envId: string, search?: string, role?: string, page?: number, perPage?: number, options?: any): AxiosPromise; /** * Lists all the tenants defined within an environment. * @summary List Tenants * @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} [search] Text search for the tenant name or key * @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} */ listTenants(projId: string, envId: string, search?: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * Partially updates the tenant definition. Fields that will be provided will be completely overwritten. * @summary Update Tenant * @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} tenantId Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @param {TenantUpdate} tenantUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateTenant(projId: string, envId: string, tenantId: string, tenantUpdate: TenantUpdate, options?: any): AxiosPromise; }; /** * Request parameters for createTenant operation in TenantsApi. * @export * @interface TenantsApiCreateTenantRequest */ export interface TenantsApiCreateTenantRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiCreateTenant */ 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 TenantsApiCreateTenant */ readonly envId: string; /** * * @type {TenantCreate} * @memberof TenantsApiCreateTenant */ readonly tenantCreate: TenantCreate; } /** * Request parameters for deleteTenant operation in TenantsApi. * @export * @interface TenantsApiDeleteTenantRequest */ export interface TenantsApiDeleteTenantRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiDeleteTenant */ 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 TenantsApiDeleteTenant */ readonly envId: string; /** * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiDeleteTenant */ readonly tenantId: string; } /** * Request parameters for deleteTenantUser operation in TenantsApi. * @export * @interface TenantsApiDeleteTenantUserRequest */ export interface TenantsApiDeleteTenantUserRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiDeleteTenantUser */ 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 TenantsApiDeleteTenantUser */ readonly envId: string; /** * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiDeleteTenantUser */ readonly tenantId: string; /** * Either the unique id of the user, or the URL-friendly key of the user (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiDeleteTenantUser */ readonly userId: string; } /** * Request parameters for getTenant operation in TenantsApi. * @export * @interface TenantsApiGetTenantRequest */ export interface TenantsApiGetTenantRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiGetTenant */ 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 TenantsApiGetTenant */ readonly envId: string; /** * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiGetTenant */ readonly tenantId: string; } /** * Request parameters for listTenantUsers operation in TenantsApi. * @export * @interface TenantsApiListTenantUsersRequest */ export interface TenantsApiListTenantUsersRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiListTenantUsers */ readonly projId: string; /** * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiListTenantUsers */ readonly tenantId: string; /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiListTenantUsers */ readonly envId: string; /** * Text search for the email field * @type {string} * @memberof TenantsApiListTenantUsers */ readonly search?: string; /** * Match users with a specific role * @type {string} * @memberof TenantsApiListTenantUsers */ readonly role?: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof TenantsApiListTenantUsers */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof TenantsApiListTenantUsers */ readonly perPage?: number; } /** * Request parameters for listTenants operation in TenantsApi. * @export * @interface TenantsApiListTenantsRequest */ export interface TenantsApiListTenantsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiListTenants */ 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 TenantsApiListTenants */ readonly envId: string; /** * Text search for the tenant name or key * @type {string} * @memberof TenantsApiListTenants */ readonly search?: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof TenantsApiListTenants */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof TenantsApiListTenants */ readonly perPage?: number; } /** * Request parameters for updateTenant operation in TenantsApi. * @export * @interface TenantsApiUpdateTenantRequest */ export interface TenantsApiUpdateTenantRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiUpdateTenant */ 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 TenantsApiUpdateTenant */ readonly envId: string; /** * Either the unique id of the tenant, or the URL-friendly key of the tenant (i.e: the \"slug\"). * @type {string} * @memberof TenantsApiUpdateTenant */ readonly tenantId: string; /** * * @type {TenantUpdate} * @memberof TenantsApiUpdateTenant */ readonly tenantUpdate: TenantUpdate; } /** * TenantsApi - object-oriented interface * @export * @class TenantsApi * @extends {BaseAPI} */ export declare class TenantsApi extends BaseAPI { /** * Creates a new tenant inside the Permit.io system. If the tenant is already created: will return 200 instead of 201, and will return the existing tenant object in the response body. * @summary Create Tenant * @param {TenantsApiCreateTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TenantsApi */ createTenant(requestParameters: TenantsApiCreateTenantRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes the tenant and all its related data. * @summary Delete Tenant * @param {TenantsApiDeleteTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TenantsApi */ deleteTenant(requestParameters: TenantsApiDeleteTenantRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes a user under a tenant. * @summary Delete Tenant User * @param {TenantsApiDeleteTenantUserRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TenantsApi */ deleteTenantUser(requestParameters: TenantsApiDeleteTenantUserRequest, options?: AxiosRequestConfig): Promise>; /** * Gets a tenant, if such tenant exists. Otherwise returns 404. * @summary Get Tenant * @param {TenantsApiGetTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TenantsApi */ getTenant(requestParameters: TenantsApiGetTenantRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary List Tenant Users * @param {TenantsApiListTenantUsersRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TenantsApi */ listTenantUsers(requestParameters: TenantsApiListTenantUsersRequest, options?: AxiosRequestConfig): Promise>; /** * Lists all the tenants defined within an environment. * @summary List Tenants * @param {TenantsApiListTenantsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TenantsApi */ listTenants(requestParameters: TenantsApiListTenantsRequest, options?: AxiosRequestConfig): Promise>; /** * Partially updates the tenant definition. Fields that will be provided will be completely overwritten. * @summary Update Tenant * @param {TenantsApiUpdateTenantRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof TenantsApi */ updateTenant(requestParameters: TenantsApiUpdateTenantRequest, options?: AxiosRequestConfig): Promise>; }