/** * 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 { AuthnMeRead } from '../types'; import { DevLogin } from '../types'; import { EmbeddedLoginRequestOutput } from '../types'; import { LoginResult } from '../types'; import { UserFELoginRequestInput } from '../types'; import { UserLoginRequestInput } from '../types'; /** * AuthenticationApi - axios parameter creator * @export */ export declare const AuthenticationApiAxiosParamCreator: (configuration?: Configuration) => { /** * The dev-login endpoints allows a developer inside permit.io to log in with an email address. THIS IS ONLY AVAILABLE IN DEV MODE. * @summary (DEV MODE) Login * @param {DevLogin} devLogin * @param {*} [options] Override http request option. * @throws {RequiredError} */ devLogin: (devLogin: DevLogin, options?: AxiosRequestConfig) => Promise; /** * * @summary Elements Fe Login As * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {UserFELoginRequestInput} userFELoginRequestInput * @param {*} [options] Override http request option. * @throws {RequiredError} */ elementsFeLoginAs: (envId: string, userFELoginRequestInput: UserFELoginRequestInput, options?: AxiosRequestConfig) => Promise; /** * * @summary Elements Login As * @param {UserLoginRequestInput} userLoginRequestInput * @param {*} [options] Override http request option. * @throws {RequiredError} */ elementsLoginAs: (userLoginRequestInput: UserLoginRequestInput, options?: AxiosRequestConfig) => Promise; /** * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. * @summary Login * @param {string} [inviteCode] An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization. * @param {*} [options] Override http request option. * @throws {RequiredError} */ login: (inviteCode?: string, options?: AxiosRequestConfig) => Promise; /** * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. * @summary Login Elements * @param {string} token * @param {*} [options] Override http request option. * @throws {RequiredError} */ loginElements: (token: string, options?: AxiosRequestConfig) => Promise; /** * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. * @summary Logout Get * @param {*} [options] Override http request option. * @throws {RequiredError} */ logoutGet: (options?: AxiosRequestConfig) => Promise; /** * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. * @summary Logout Post * @param {*} [options] Override http request option. * @throws {RequiredError} */ logoutPost: (options?: AxiosRequestConfig) => Promise; /** * * @summary Me * @param {*} [options] Override http request option. * @throws {RequiredError} */ me: (options?: AxiosRequestConfig) => Promise; /** * Allows the user to switch his active organization (manipulates the user\'s login session). This route will return a new login cookie to the user. * @summary Switch Organization * @param {string} orgId the organization id the user wishes to switch to as the active org on the session * @param {*} [options] Override http request option. * @throws {RequiredError} */ switchOrganization: (orgId: string, options?: AxiosRequestConfig) => Promise; }; /** * AuthenticationApi - functional programming interface * @export */ export declare const AuthenticationApiFp: (configuration?: Configuration) => { /** * The dev-login endpoints allows a developer inside permit.io to log in with an email address. THIS IS ONLY AVAILABLE IN DEV MODE. * @summary (DEV MODE) Login * @param {DevLogin} devLogin * @param {*} [options] Override http request option. * @throws {RequiredError} */ devLogin(devLogin: DevLogin, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * * @summary Elements Fe Login As * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {UserFELoginRequestInput} userFELoginRequestInput * @param {*} [options] Override http request option. * @throws {RequiredError} */ elementsFeLoginAs(envId: string, userFELoginRequestInput: UserFELoginRequestInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * * @summary Elements Login As * @param {UserLoginRequestInput} userLoginRequestInput * @param {*} [options] Override http request option. * @throws {RequiredError} */ elementsLoginAs(userLoginRequestInput: UserLoginRequestInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. * @summary Login * @param {string} [inviteCode] An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization. * @param {*} [options] Override http request option. * @throws {RequiredError} */ login(inviteCode?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. * @summary Login Elements * @param {string} token * @param {*} [options] Override http request option. * @throws {RequiredError} */ loginElements(token: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. * @summary Logout Get * @param {*} [options] Override http request option. * @throws {RequiredError} */ logoutGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. * @summary Logout Post * @param {*} [options] Override http request option. * @throws {RequiredError} */ logoutPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * * @summary Me * @param {*} [options] Override http request option. * @throws {RequiredError} */ me(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Allows the user to switch his active organization (manipulates the user\'s login session). This route will return a new login cookie to the user. * @summary Switch Organization * @param {string} orgId the organization id the user wishes to switch to as the active org on the session * @param {*} [options] Override http request option. * @throws {RequiredError} */ switchOrganization(orgId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * AuthenticationApi - factory interface * @export */ export declare const AuthenticationApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * The dev-login endpoints allows a developer inside permit.io to log in with an email address. THIS IS ONLY AVAILABLE IN DEV MODE. * @summary (DEV MODE) Login * @param {DevLogin} devLogin * @param {*} [options] Override http request option. * @throws {RequiredError} */ devLogin(devLogin: DevLogin, options?: any): AxiosPromise; /** * * @summary Elements Fe Login As * @param {string} envId Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @param {UserFELoginRequestInput} userFELoginRequestInput * @param {*} [options] Override http request option. * @throws {RequiredError} */ elementsFeLoginAs(envId: string, userFELoginRequestInput: UserFELoginRequestInput, options?: any): AxiosPromise; /** * * @summary Elements Login As * @param {UserLoginRequestInput} userLoginRequestInput * @param {*} [options] Override http request option. * @throws {RequiredError} */ elementsLoginAs(userLoginRequestInput: UserLoginRequestInput, options?: any): AxiosPromise; /** * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. * @summary Login * @param {string} [inviteCode] An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization. * @param {*} [options] Override http request option. * @throws {RequiredError} */ login(inviteCode?: string, options?: any): AxiosPromise; /** * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. * @summary Login Elements * @param {string} token * @param {*} [options] Override http request option. * @throws {RequiredError} */ loginElements(token: string, options?: any): AxiosPromise; /** * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. * @summary Logout Get * @param {*} [options] Override http request option. * @throws {RequiredError} */ logoutGet(options?: any): AxiosPromise; /** * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. * @summary Logout Post * @param {*} [options] Override http request option. * @throws {RequiredError} */ logoutPost(options?: any): AxiosPromise; /** * * @summary Me * @param {*} [options] Override http request option. * @throws {RequiredError} */ me(options?: any): AxiosPromise; /** * Allows the user to switch his active organization (manipulates the user\'s login session). This route will return a new login cookie to the user. * @summary Switch Organization * @param {string} orgId the organization id the user wishes to switch to as the active org on the session * @param {*} [options] Override http request option. * @throws {RequiredError} */ switchOrganization(orgId: string, options?: any): AxiosPromise; }; /** * Request parameters for devLogin operation in AuthenticationApi. * @export * @interface AuthenticationApiDevLoginRequest */ export interface AuthenticationApiDevLoginRequest { /** * * @type {DevLogin} * @memberof AuthenticationApiDevLogin */ readonly devLogin: DevLogin; } /** * Request parameters for elementsFeLoginAs operation in AuthenticationApi. * @export * @interface AuthenticationApiElementsFeLoginAsRequest */ export interface AuthenticationApiElementsFeLoginAsRequest { /** * Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the \"slug\"). * @type {string} * @memberof AuthenticationApiElementsFeLoginAs */ readonly envId: string; /** * * @type {UserFELoginRequestInput} * @memberof AuthenticationApiElementsFeLoginAs */ readonly userFELoginRequestInput: UserFELoginRequestInput; } /** * Request parameters for elementsLoginAs operation in AuthenticationApi. * @export * @interface AuthenticationApiElementsLoginAsRequest */ export interface AuthenticationApiElementsLoginAsRequest { /** * * @type {UserLoginRequestInput} * @memberof AuthenticationApiElementsLoginAs */ readonly userLoginRequestInput: UserLoginRequestInput; } /** * Request parameters for login operation in AuthenticationApi. * @export * @interface AuthenticationApiLoginRequest */ export interface AuthenticationApiLoginRequest { /** * An optional invite code to an existing organization. If the invite code is provided and is valid, the member will gain access to that organization. * @type {string} * @memberof AuthenticationApiLogin */ readonly inviteCode?: string; } /** * Request parameters for loginElements operation in AuthenticationApi. * @export * @interface AuthenticationApiLoginElementsRequest */ export interface AuthenticationApiLoginElementsRequest { /** * * @type {string} * @memberof AuthenticationApiLoginElements */ readonly token: string; } /** * Request parameters for switchOrganization operation in AuthenticationApi. * @export * @interface AuthenticationApiSwitchOrganizationRequest */ export interface AuthenticationApiSwitchOrganizationRequest { /** * the organization id the user wishes to switch to as the active org on the session * @type {string} * @memberof AuthenticationApiSwitchOrganization */ readonly orgId: string; } /** * AuthenticationApi - object-oriented interface * @export * @class AuthenticationApi * @extends {BaseAPI} */ export declare class AuthenticationApi extends BaseAPI { /** * The dev-login endpoints allows a developer inside permit.io to log in with an email address. THIS IS ONLY AVAILABLE IN DEV MODE. * @summary (DEV MODE) Login * @param {AuthenticationApiDevLoginRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ devLogin(requestParameters: AuthenticationApiDevLoginRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Elements Fe Login As * @param {AuthenticationApiElementsFeLoginAsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ elementsFeLoginAs(requestParameters: AuthenticationApiElementsFeLoginAsRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Elements Login As * @param {AuthenticationApiElementsLoginAsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ elementsLoginAs(requestParameters: AuthenticationApiElementsLoginAsRequest, options?: AxiosRequestConfig): Promise>; /** * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. * @summary Login * @param {AuthenticationApiLoginRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ login(requestParameters?: AuthenticationApiLoginRequest, options?: AxiosRequestConfig): Promise>; /** * The login endpoint allows the frontend app to exchange a user JWT with a user session. The user session is stored on an httpOnly + secure cookie. * @summary Login Elements * @param {AuthenticationApiLoginElementsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ loginElements(requestParameters: AuthenticationApiLoginElementsRequest, options?: AxiosRequestConfig): Promise>; /** * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. * @summary Logout Get * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ logoutGet(options?: AxiosRequestConfig): Promise>; /** * The logout endpoint deletes the session cookie of a logged in user and invalidates cached VCs. * @summary Logout Post * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ logoutPost(options?: AxiosRequestConfig): Promise>; /** * * @summary Me * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ me(options?: AxiosRequestConfig): Promise>; /** * Allows the user to switch his active organization (manipulates the user\'s login session). This route will return a new login cookie to the user. * @summary Switch Organization * @param {AuthenticationApiSwitchOrganizationRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof AuthenticationApi */ switchOrganization(requestParameters: AuthenticationApiSwitchOrganizationRequest, options?: AxiosRequestConfig): Promise>; }