/** * 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 { PolicyRepoCreate } from '../types'; import { PolicyRepoRead } from '../types'; import { ProjectRead } from '../types'; /** * PolicyGitRepositoriesApi - axios parameter creator * @export */ export declare const PolicyGitRepositoriesApiAxiosParamCreator: (configuration?: Configuration) => { /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Activate Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ activatePolicyRepo: (projId: string, repoId: string, options?: AxiosRequestConfig) => Promise; /** * Creates a new policy repository configuration under a given project. The given repository is created with status \'pending\', it will be changed and used as the \'active\' repository for the policy only after a successful attempt to use it. The repository main branch must be present in the remote. * @summary Create Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {PolicyRepoCreate} policyRepoCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createPolicyRepo: (projId: string, policyRepoCreate: PolicyRepoCreate, options?: AxiosRequestConfig) => Promise; /** * Deletes an environment and all its related data. * @summary Delete Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deletePolicyRepo: (projId: string, repoId: string, options?: AxiosRequestConfig) => Promise; /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Disable Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ disableActivePolicyRepo: (projId: string, options?: AxiosRequestConfig) => Promise; /** * Gets the currently active repository, if such repository exists. * @summary Get Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getActivePolicyRepo: (projId: string, options?: AxiosRequestConfig) => Promise; /** * Gets a single repository matching the given repo_id, if such repository exists. * @summary Get Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPolicyRepo: (projId: string, repoId: string, options?: AxiosRequestConfig) => Promise; /** * Lists all the policy repositories under a given project. * @summary List Policy Repos * @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} */ listPolicyRepos: (projId: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; }; /** * PolicyGitRepositoriesApi - functional programming interface * @export */ export declare const PolicyGitRepositoriesApiFp: (configuration?: Configuration) => { /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Activate Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ activatePolicyRepo(projId: string, repoId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Creates a new policy repository configuration under a given project. The given repository is created with status \'pending\', it will be changed and used as the \'active\' repository for the policy only after a successful attempt to use it. The repository main branch must be present in the remote. * @summary Create Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {PolicyRepoCreate} policyRepoCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createPolicyRepo(projId: string, policyRepoCreate: PolicyRepoCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes an environment and all its related data. * @summary Delete Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deletePolicyRepo(projId: string, repoId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Disable Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ disableActivePolicyRepo(projId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets the currently active repository, if such repository exists. * @summary Get Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getActivePolicyRepo(projId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Gets a single repository matching the given repo_id, if such repository exists. * @summary Get Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPolicyRepo(projId: string, repoId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Lists all the policy repositories under a given project. * @summary List Policy Repos * @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} */ listPolicyRepos(projId: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; }; /** * PolicyGitRepositoriesApi - factory interface * @export */ export declare const PolicyGitRepositoriesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Activate Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ activatePolicyRepo(projId: string, repoId: string, options?: any): AxiosPromise; /** * Creates a new policy repository configuration under a given project. The given repository is created with status \'pending\', it will be changed and used as the \'active\' repository for the policy only after a successful attempt to use it. The repository main branch must be present in the remote. * @summary Create Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {PolicyRepoCreate} policyRepoCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ createPolicyRepo(projId: string, policyRepoCreate: PolicyRepoCreate, options?: any): AxiosPromise; /** * Deletes an environment and all its related data. * @summary Delete Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ deletePolicyRepo(projId: string, repoId: string, options?: any): AxiosPromise; /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Disable Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ disableActivePolicyRepo(projId: string, options?: any): AxiosPromise; /** * Gets the currently active repository, if such repository exists. * @summary Get Active Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getActivePolicyRepo(projId: string, options?: any): AxiosPromise; /** * Gets a single repository matching the given repo_id, if such repository exists. * @summary Get Policy Repo * @param {string} projId Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @param {string} repoId Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @param {*} [options] Override http request option. * @throws {RequiredError} */ getPolicyRepo(projId: string, repoId: string, options?: any): AxiosPromise; /** * Lists all the policy repositories under a given project. * @summary List Policy Repos * @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} */ listPolicyRepos(projId: string, page?: number, perPage?: number, options?: any): AxiosPromise>; }; /** * Request parameters for activatePolicyRepo operation in PolicyGitRepositoriesApi. * @export * @interface PolicyGitRepositoriesApiActivatePolicyRepoRequest */ export interface PolicyGitRepositoriesApiActivatePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiActivatePolicyRepo */ readonly projId: string; /** * Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiActivatePolicyRepo */ readonly repoId: string; } /** * Request parameters for createPolicyRepo operation in PolicyGitRepositoriesApi. * @export * @interface PolicyGitRepositoriesApiCreatePolicyRepoRequest */ export interface PolicyGitRepositoriesApiCreatePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiCreatePolicyRepo */ readonly projId: string; /** * * @type {PolicyRepoCreate} * @memberof PolicyGitRepositoriesApiCreatePolicyRepo */ readonly policyRepoCreate: PolicyRepoCreate; } /** * Request parameters for deletePolicyRepo operation in PolicyGitRepositoriesApi. * @export * @interface PolicyGitRepositoriesApiDeletePolicyRepoRequest */ export interface PolicyGitRepositoriesApiDeletePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiDeletePolicyRepo */ readonly projId: string; /** * Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiDeletePolicyRepo */ readonly repoId: string; } /** * Request parameters for disableActivePolicyRepo operation in PolicyGitRepositoriesApi. * @export * @interface PolicyGitRepositoriesApiDisableActivePolicyRepoRequest */ export interface PolicyGitRepositoriesApiDisableActivePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiDisableActivePolicyRepo */ readonly projId: string; } /** * Request parameters for getActivePolicyRepo operation in PolicyGitRepositoriesApi. * @export * @interface PolicyGitRepositoriesApiGetActivePolicyRepoRequest */ export interface PolicyGitRepositoriesApiGetActivePolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiGetActivePolicyRepo */ readonly projId: string; } /** * Request parameters for getPolicyRepo operation in PolicyGitRepositoriesApi. * @export * @interface PolicyGitRepositoriesApiGetPolicyRepoRequest */ export interface PolicyGitRepositoriesApiGetPolicyRepoRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiGetPolicyRepo */ readonly projId: string; /** * Either the unique id of the policy repo, or the URL-friendly key of the policy repo (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiGetPolicyRepo */ readonly repoId: string; } /** * Request parameters for listPolicyRepos operation in PolicyGitRepositoriesApi. * @export * @interface PolicyGitRepositoriesApiListPolicyReposRequest */ export interface PolicyGitRepositoriesApiListPolicyReposRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof PolicyGitRepositoriesApiListPolicyRepos */ readonly projId: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof PolicyGitRepositoriesApiListPolicyRepos */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof PolicyGitRepositoriesApiListPolicyRepos */ readonly perPage?: number; } /** * PolicyGitRepositoriesApi - object-oriented interface * @export * @class PolicyGitRepositoriesApi * @extends {BaseAPI} */ export declare class PolicyGitRepositoriesApi extends BaseAPI { /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Activate Policy Repo * @param {PolicyGitRepositoriesApiActivatePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PolicyGitRepositoriesApi */ activatePolicyRepo(requestParameters: PolicyGitRepositoriesApiActivatePolicyRepoRequest, options?: AxiosRequestConfig): Promise>; /** * Creates a new policy repository configuration under a given project. The given repository is created with status \'pending\', it will be changed and used as the \'active\' repository for the policy only after a successful attempt to use it. The repository main branch must be present in the remote. * @summary Create Policy Repo * @param {PolicyGitRepositoriesApiCreatePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PolicyGitRepositoriesApi */ createPolicyRepo(requestParameters: PolicyGitRepositoriesApiCreatePolicyRepoRequest, options?: AxiosRequestConfig): Promise>; /** * Deletes an environment and all its related data. * @summary Delete Policy Repo * @param {PolicyGitRepositoriesApiDeletePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PolicyGitRepositoriesApi */ deletePolicyRepo(requestParameters: PolicyGitRepositoriesApiDeletePolicyRepoRequest, options?: AxiosRequestConfig): Promise>; /** * Disable the currently active policy repo, this action means to turn off the gitops feature. If there is no active policy repo, this action will do nothing. * @summary Disable Active Policy Repo * @param {PolicyGitRepositoriesApiDisableActivePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PolicyGitRepositoriesApi */ disableActivePolicyRepo(requestParameters: PolicyGitRepositoriesApiDisableActivePolicyRepoRequest, options?: AxiosRequestConfig): Promise>; /** * Gets the currently active repository, if such repository exists. * @summary Get Active Policy Repo * @param {PolicyGitRepositoriesApiGetActivePolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PolicyGitRepositoriesApi */ getActivePolicyRepo(requestParameters: PolicyGitRepositoriesApiGetActivePolicyRepoRequest, options?: AxiosRequestConfig): Promise>; /** * Gets a single repository matching the given repo_id, if such repository exists. * @summary Get Policy Repo * @param {PolicyGitRepositoriesApiGetPolicyRepoRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PolicyGitRepositoriesApi */ getPolicyRepo(requestParameters: PolicyGitRepositoriesApiGetPolicyRepoRequest, options?: AxiosRequestConfig): Promise>; /** * Lists all the policy repositories under a given project. * @summary List Policy Repos * @param {PolicyGitRepositoriesApiListPolicyReposRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof PolicyGitRepositoriesApi */ listPolicyRepos(requestParameters: PolicyGitRepositoriesApiListPolicyReposRequest, options?: AxiosRequestConfig): Promise>; }