/** * 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 { EnvironmentCopy } from '../types'; import { EnvironmentCreate } from '../types'; import { EnvironmentRead } from '../types'; import { EnvironmentStats } from '../types'; import { EnvironmentUpdate } from '../types'; /** * EnvironmentsApi - axios parameter creator * @export */ export declare const EnvironmentsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. * @summary Copy Environment * @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 {EnvironmentCopy} environmentCopy * @param {*} [options] Override http request option. * @throws {RequiredError} */ copyEnvironment: (projId: string, envId: string, environmentCopy: EnvironmentCopy, options?: AxiosRequestConfig) => Promise; /** * Creates a new environment under a given project. * @summary Create Environment * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {EnvironmentCreate} environmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createEnvironment: (projId: string, environmentCreate: EnvironmentCreate, options?: AxiosRequestConfig) => Promise; /** * Deletes an environment and all its related data. * @summary Delete Environment * @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 {*} [options] Override http request option. * @throws {RequiredError} */ deleteEnvironment: (projId: string, envId: string, options?: AxiosRequestConfig) => Promise; /** * Gets a single environment matching the given env_id, if such environment exists. * @summary Get Environment * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getEnvironment: (projId: string, envId: string, options?: AxiosRequestConfig) => Promise; /** * Lists all the environments under a given project. * @summary List Environments * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (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} */ listEnvironments: (projId: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * * @summary Stats Environments * @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 {*} [options] Override http request option. * @throws {RequiredError} */ statsEnvironments: (projId: string, envId: string, options?: AxiosRequestConfig) => Promise; /** * Updates the environment. * @summary Update Environment * @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 {EnvironmentUpdate} environmentUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateEnvironment: (projId: string, envId: string, environmentUpdate: EnvironmentUpdate, options?: AxiosRequestConfig) => Promise; }; /** * EnvironmentsApi - functional programming interface * @export */ export declare const EnvironmentsApiFp: (configuration?: Configuration) => { /** * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. * @summary Copy Environment * @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 {EnvironmentCopy} environmentCopy * @param {*} [options] Override http request option. * @throws {RequiredError} */ copyEnvironment(projId: string, envId: string, environmentCopy: EnvironmentCopy, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Creates a new environment under a given project. * @summary Create Environment * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {EnvironmentCreate} environmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createEnvironment(projId: string, environmentCreate: EnvironmentCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes an environment and all its related data. * @summary Delete Environment * @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 {*} [options] Override http request option. * @throws {RequiredError} */ deleteEnvironment(projId: string, envId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a single environment matching the given env_id, if such environment exists. * @summary Get Environment * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getEnvironment(projId: string, envId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists all the environments under a given project. * @summary List Environments * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (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} */ listEnvironments(projId: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * * @summary Stats Environments * @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 {*} [options] Override http request option. * @throws {RequiredError} */ statsEnvironments(projId: string, envId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Updates the environment. * @summary Update Environment * @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 {EnvironmentUpdate} environmentUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateEnvironment(projId: string, envId: string, environmentUpdate: EnvironmentUpdate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * EnvironmentsApi - factory interface * @export */ export declare const EnvironmentsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. * @summary Copy Environment * @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 {EnvironmentCopy} environmentCopy * @param {*} [options] Override http request option. * @throws {RequiredError} */ copyEnvironment(projId: string, envId: string, environmentCopy: EnvironmentCopy, options?: any): AxiosPromise; /** * Creates a new environment under a given project. * @summary Create Environment * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {EnvironmentCreate} environmentCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createEnvironment(projId: string, environmentCreate: EnvironmentCreate, options?: any): AxiosPromise; /** * Deletes an environment and all its related data. * @summary Delete Environment * @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 {*} [options] Override http request option. * @throws {RequiredError} */ deleteEnvironment(projId: string, envId: string, options?: any): AxiosPromise; /** * Gets a single environment matching the given env_id, if such environment exists. * @summary Get Environment * @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 {*} [options] Override http request option. * @throws {RequiredError} */ getEnvironment(projId: string, envId: string, options?: any): AxiosPromise; /** * Lists all the environments under a given project. * @summary List Environments * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (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} */ listEnvironments(projId: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * * @summary Stats Environments * @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 {*} [options] Override http request option. * @throws {RequiredError} */ statsEnvironments(projId: string, envId: string, options?: any): AxiosPromise; /** * Updates the environment. * @summary Update Environment * @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 {EnvironmentUpdate} environmentUpdate * @param {*} [options] Override http request option. * @throws {RequiredError} */ updateEnvironment(projId: string, envId: string, environmentUpdate: EnvironmentUpdate, options?: any): AxiosPromise; }; /** * Request parameters for copyEnvironment operation in EnvironmentsApi. * @export * @interface EnvironmentsApiCopyEnvironmentRequest */ export interface EnvironmentsApiCopyEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof EnvironmentsApiCopyEnvironment */ 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 EnvironmentsApiCopyEnvironment */ readonly envId: string; /** * * @type {EnvironmentCopy} * @memberof EnvironmentsApiCopyEnvironment */ readonly environmentCopy: EnvironmentCopy; } /** * Request parameters for createEnvironment operation in EnvironmentsApi. * @export * @interface EnvironmentsApiCreateEnvironmentRequest */ export interface EnvironmentsApiCreateEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof EnvironmentsApiCreateEnvironment */ readonly projId: string; /** * * @type {EnvironmentCreate} * @memberof EnvironmentsApiCreateEnvironment */ readonly environmentCreate: EnvironmentCreate; } /** * Request parameters for deleteEnvironment operation in EnvironmentsApi. * @export * @interface EnvironmentsApiDeleteEnvironmentRequest */ export interface EnvironmentsApiDeleteEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof EnvironmentsApiDeleteEnvironment */ 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 EnvironmentsApiDeleteEnvironment */ readonly envId: string; } /** * Request parameters for getEnvironment operation in EnvironmentsApi. * @export * @interface EnvironmentsApiGetEnvironmentRequest */ export interface EnvironmentsApiGetEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof EnvironmentsApiGetEnvironment */ 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 EnvironmentsApiGetEnvironment */ readonly envId: string; } /** * Request parameters for listEnvironments operation in EnvironmentsApi. * @export * @interface EnvironmentsApiListEnvironmentsRequest */ export interface EnvironmentsApiListEnvironmentsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof EnvironmentsApiListEnvironments */ readonly projId: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof EnvironmentsApiListEnvironments */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof EnvironmentsApiListEnvironments */ readonly perPage?: number; } /** * Request parameters for statsEnvironments operation in EnvironmentsApi. * @export * @interface EnvironmentsApiStatsEnvironmentsRequest */ export interface EnvironmentsApiStatsEnvironmentsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof EnvironmentsApiStatsEnvironments */ 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 EnvironmentsApiStatsEnvironments */ readonly envId: string; } /** * Request parameters for updateEnvironment operation in EnvironmentsApi. * @export * @interface EnvironmentsApiUpdateEnvironmentRequest */ export interface EnvironmentsApiUpdateEnvironmentRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof EnvironmentsApiUpdateEnvironment */ 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 EnvironmentsApiUpdateEnvironment */ readonly envId: string; /** * * @type {EnvironmentUpdate} * @memberof EnvironmentsApiUpdateEnvironment */ readonly environmentUpdate: EnvironmentUpdate; } /** * EnvironmentsApi - object-oriented interface * @export * @class EnvironmentsApi * @extends {BaseAPI} */ export declare class EnvironmentsApi extends BaseAPI { /** * Copy environment This endpoint either duplicates an existing environment to a new environment in the same project, or copies from an existing environment to another existing environment. The `scope` object controls which objects will be copied to the target environment. To clone to a new environment, the user must have write permissions to the containing project. To clone into an existing environment, the user must have write permissions to the target environment. Copying environments across projects or organizations is not allowed. * @summary Copy Environment * @param {EnvironmentsApiCopyEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EnvironmentsApi */ copyEnvironment(requestParameters: EnvironmentsApiCopyEnvironmentRequest, options?: AxiosRequestConfig): Promise>; /** * Creates a new environment under a given project. * @summary Create Environment * @param {EnvironmentsApiCreateEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EnvironmentsApi */ createEnvironment(requestParameters: EnvironmentsApiCreateEnvironmentRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes an environment and all its related data. * @summary Delete Environment * @param {EnvironmentsApiDeleteEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EnvironmentsApi */ deleteEnvironment(requestParameters: EnvironmentsApiDeleteEnvironmentRequest, options?: AxiosRequestConfig): Promise>; /** * Gets a single environment matching the given env_id, if such environment exists. * @summary Get Environment * @param {EnvironmentsApiGetEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EnvironmentsApi */ getEnvironment(requestParameters: EnvironmentsApiGetEnvironmentRequest, options?: AxiosRequestConfig): Promise>; /** * Lists all the environments under a given project. * @summary List Environments * @param {EnvironmentsApiListEnvironmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EnvironmentsApi */ listEnvironments(requestParameters: EnvironmentsApiListEnvironmentsRequest, options?: AxiosRequestConfig): Promise>; /** * * @summary Stats Environments * @param {EnvironmentsApiStatsEnvironmentsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EnvironmentsApi */ statsEnvironments(requestParameters: EnvironmentsApiStatsEnvironmentsRequest, options?: AxiosRequestConfig): Promise>; /** * Updates the environment. * @summary Update Environment * @param {EnvironmentsApiUpdateEnvironmentRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof EnvironmentsApi */ updateEnvironment(requestParameters: EnvironmentsApiUpdateEnvironmentRequest, options?: AxiosRequestConfig): Promise>; }