/** * 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 { ConditionSetRuleCreate } from '../types'; import { ConditionSetRuleRead } from '../types'; import { ConditionSetRuleRemove } from '../types'; /** * ConditionSetRulesApi - axios parameter creator * @export */ export declare const ConditionSetRulesApiAxiosParamCreator: (configuration?: Configuration) => { /** * Grant permissions to a user set *on* a resource set. If the permission is already granted, it is skipped. * @summary Assign Set Permissions * @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 {ConditionSetRuleCreate} conditionSetRuleCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignSetPermissions: (projId: string, envId: string, conditionSetRuleCreate: ConditionSetRuleCreate, options?: AxiosRequestConfig) => Promise; /** * Lists the condition set rules matching the filter. - If the `user_set` filter is present, will only return the permissions set of that user set. - If the `permission` filter is present, will only return the permissions sets that equals to the queried permission. - If the `resource_set` filter is present, will only return the permissions set of that resource set. * @summary List Set Permissions * @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} [userSet] optional user set filter, will only return rules where the permission is granted to this user set * @param {string} [permission] optional permission filter, will only return condition set rules granting this permission * @param {string} [resourceSet] optional resource set filter, will only return rules where the permission is granted on this resource set * @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} */ listSetPermissions: (projId: string, envId: string, userSet?: string, permission?: string, resourceSet?: string, page?: number, perPage?: number, options?: AxiosRequestConfig) => Promise; /** * Revokes permissions to a user set *on* a resource set. If the permission is not granted, it is skipped. * @summary Unassign Set Permissions * @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 {ConditionSetRuleRemove} conditionSetRuleRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ unassignSetPermissions: (projId: string, envId: string, conditionSetRuleRemove: ConditionSetRuleRemove, options?: AxiosRequestConfig) => Promise; }; /** * ConditionSetRulesApi - functional programming interface * @export */ export declare const ConditionSetRulesApiFp: (configuration?: Configuration) => { /** * Grant permissions to a user set *on* a resource set. If the permission is already granted, it is skipped. * @summary Assign Set Permissions * @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 {ConditionSetRuleCreate} conditionSetRuleCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignSetPermissions(projId: string, envId: string, conditionSetRuleCreate: ConditionSetRuleCreate, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Lists the condition set rules matching the filter. - If the `user_set` filter is present, will only return the permissions set of that user set. - If the `permission` filter is present, will only return the permissions sets that equals to the queried permission. - If the `resource_set` filter is present, will only return the permissions set of that resource set. * @summary List Set Permissions * @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} [userSet] optional user set filter, will only return rules where the permission is granted to this user set * @param {string} [permission] optional permission filter, will only return condition set rules granting this permission * @param {string} [resourceSet] optional resource set filter, will only return rules where the permission is granted on this resource set * @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} */ listSetPermissions(projId: string, envId: string, userSet?: string, permission?: string, resourceSet?: string, page?: number, perPage?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Revokes permissions to a user set *on* a resource set. If the permission is not granted, it is skipped. * @summary Unassign Set Permissions * @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 {ConditionSetRuleRemove} conditionSetRuleRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ unassignSetPermissions(projId: string, envId: string, conditionSetRuleRemove: ConditionSetRuleRemove, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; }; /** * ConditionSetRulesApi - factory interface * @export */ export declare const ConditionSetRulesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Grant permissions to a user set *on* a resource set. If the permission is already granted, it is skipped. * @summary Assign Set Permissions * @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 {ConditionSetRuleCreate} conditionSetRuleCreate * @param {*} [options] Override http request option. * @throws {RequiredError} */ assignSetPermissions(projId: string, envId: string, conditionSetRuleCreate: ConditionSetRuleCreate, options?: any): AxiosPromise>; /** * Lists the condition set rules matching the filter. - If the `user_set` filter is present, will only return the permissions set of that user set. - If the `permission` filter is present, will only return the permissions sets that equals to the queried permission. - If the `resource_set` filter is present, will only return the permissions set of that resource set. * @summary List Set Permissions * @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} [userSet] optional user set filter, will only return rules where the permission is granted to this user set * @param {string} [permission] optional permission filter, will only return condition set rules granting this permission * @param {string} [resourceSet] optional resource set filter, will only return rules where the permission is granted on this resource set * @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} */ listSetPermissions(projId: string, envId: string, userSet?: string, permission?: string, resourceSet?: string, page?: number, perPage?: number, options?: any): AxiosPromise>; /** * Revokes permissions to a user set *on* a resource set. If the permission is not granted, it is skipped. * @summary Unassign Set Permissions * @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 {ConditionSetRuleRemove} conditionSetRuleRemove * @param {*} [options] Override http request option. * @throws {RequiredError} */ unassignSetPermissions(projId: string, envId: string, conditionSetRuleRemove: ConditionSetRuleRemove, options?: any): AxiosPromise; }; /** * Request parameters for assignSetPermissions operation in ConditionSetRulesApi. * @export * @interface ConditionSetRulesApiAssignSetPermissionsRequest */ export interface ConditionSetRulesApiAssignSetPermissionsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ConditionSetRulesApiAssignSetPermissions */ 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 ConditionSetRulesApiAssignSetPermissions */ readonly envId: string; /** * * @type {ConditionSetRuleCreate} * @memberof ConditionSetRulesApiAssignSetPermissions */ readonly conditionSetRuleCreate: ConditionSetRuleCreate; } /** * Request parameters for listSetPermissions operation in ConditionSetRulesApi. * @export * @interface ConditionSetRulesApiListSetPermissionsRequest */ export interface ConditionSetRulesApiListSetPermissionsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ConditionSetRulesApiListSetPermissions */ 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 ConditionSetRulesApiListSetPermissions */ readonly envId: string; /** * optional user set filter, will only return rules where the permission is granted to this user set * @type {string} * @memberof ConditionSetRulesApiListSetPermissions */ readonly userSet?: string; /** * optional permission filter, will only return condition set rules granting this permission * @type {string} * @memberof ConditionSetRulesApiListSetPermissions */ readonly permission?: string; /** * optional resource set filter, will only return rules where the permission is granted on this resource set * @type {string} * @memberof ConditionSetRulesApiListSetPermissions */ readonly resourceSet?: string; /** * Page number of the results to fetch, starting at 1. * @type {number} * @memberof ConditionSetRulesApiListSetPermissions */ readonly page?: number; /** * The number of results per page (max 100). * @type {number} * @memberof ConditionSetRulesApiListSetPermissions */ readonly perPage?: number; } /** * Request parameters for unassignSetPermissions operation in ConditionSetRulesApi. * @export * @interface ConditionSetRulesApiUnassignSetPermissionsRequest */ export interface ConditionSetRulesApiUnassignSetPermissionsRequest { /** * Either the unique id of the project, or the URL-friendly key of the project (i.e: the \"slug\"). * @type {string} * @memberof ConditionSetRulesApiUnassignSetPermissions */ 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 ConditionSetRulesApiUnassignSetPermissions */ readonly envId: string; /** * * @type {ConditionSetRuleRemove} * @memberof ConditionSetRulesApiUnassignSetPermissions */ readonly conditionSetRuleRemove: ConditionSetRuleRemove; } /** * ConditionSetRulesApi - object-oriented interface * @export * @class ConditionSetRulesApi * @extends {BaseAPI} */ export declare class ConditionSetRulesApi extends BaseAPI { /** * Grant permissions to a user set *on* a resource set. If the permission is already granted, it is skipped. * @summary Assign Set Permissions * @param {ConditionSetRulesApiAssignSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConditionSetRulesApi */ assignSetPermissions(requestParameters: ConditionSetRulesApiAssignSetPermissionsRequest, options?: AxiosRequestConfig): Promise>; /** * Lists the condition set rules matching the filter. - If the `user_set` filter is present, will only return the permissions set of that user set. - If the `permission` filter is present, will only return the permissions sets that equals to the queried permission. - If the `resource_set` filter is present, will only return the permissions set of that resource set. * @summary List Set Permissions * @param {ConditionSetRulesApiListSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConditionSetRulesApi */ listSetPermissions(requestParameters: ConditionSetRulesApiListSetPermissionsRequest, options?: AxiosRequestConfig): Promise>; /** * Revokes permissions to a user set *on* a resource set. If the permission is not granted, it is skipped. * @summary Unassign Set Permissions * @param {ConditionSetRulesApiUnassignSetPermissionsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ConditionSetRulesApi */ unassignSetPermissions(requestParameters: ConditionSetRulesApiUnassignSetPermissionsRequest, options?: AxiosRequestConfig): Promise>; }