import { Logger } from 'winston'; import { IPermitConfig } from '../config'; import { ConditionSetCreate, ConditionSetRead, ConditionSetUpdate } from '../openapi'; import { BasePermitApi, IPagination } from './base'; export { ConditionSetCreate, ConditionSetRead, ConditionSetUpdate } from '../openapi'; export interface IConditionSetsApi { /** * Retrieves a list of condition sets. * * @param pagination The pagination options, @see {@link IPagination} * @returns A promise that resolves to an array of condition sets. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ list(pagination?: IPagination): Promise; /** * Retrieves a condition set by its key. * * @param conditionSetKey The key of the condition set. * @returns A promise that resolves to the condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ get(conditionSetKey: string): Promise; /** * Retrieves a condition set by its key. * Alias for the {@link get} method. * * @param conditionSetKey The key of the condition set. * @returns A promise that resolves to the condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ getByKey(conditionSetKey: string): Promise; /** * Retrieves a condition set by its ID. * Alias for the {@link get} method. * * @param conditionSetId The ID of the condition set. * @returns A promise that resolves to the condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ getById(conditionSetId: string): Promise; /** * Creates a new condition set. * * @param conditionSetData The data for the new condition set. * @returns A promise that resolves to the created condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ create(conditionSetData: ConditionSetCreate): Promise; /** * Updates a condition set. * * @param conditionSetKey The key of the condition set. * @param conditionSetData The updated data for the condition set. * @returns A promise that resolves to the updated condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ update(conditionSetKey: string, conditionSetData: ConditionSetUpdate): Promise; /** * Deletes a condition set. * * @param conditionSetKey The key of the condition set to delete. * @returns A promise that resolves when the condition set is deleted. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ delete(conditionSetKey: string): Promise; } /** * The ConditionSetsApi class provides methods for interacting with condition sets using the Permit REST API. */ export declare class ConditionSetsApi extends BasePermitApi implements IConditionSetsApi { private conditionSets; /** * Creates an instance of the ConditionSetsApi. * @param config - The configuration object for the Permit SDK. * @param logger - The logger instance for logging. */ constructor(config: IPermitConfig, logger: Logger); /** * Retrieves a list of condition sets. * * @param pagination The pagination options, @see {@link IPagination} * @returns A promise that resolves to an array of condition sets. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ list(pagination?: IPagination): Promise; /** * Retrieves a condition set by its key. * * @param conditionSetKey The key of the condition set. * @returns A promise that resolves to the condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ get(conditionSetKey: string): Promise; /** * Retrieves a condition set by its key. * Alias for the {@link get} method. * * @param conditionSetKey The key of the condition set. * @returns A promise that resolves to the condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ getByKey(conditionSetKey: string): Promise; /** * Retrieves a condition set by its ID. * Alias for the {@link get} method. * * @param conditionSetId The ID of the condition set. * @returns A promise that resolves to the condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ getById(conditionSetId: string): Promise; /** * Creates a new condition set. * * @param conditionSetData The data for the new condition set. * @returns A promise that resolves to the created condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ create(conditionSetData: ConditionSetCreate): Promise; /** * Updates a condition set. * * @param conditionSetKey The key of the condition set. * @param conditionSetData The updated data for the condition set. * @returns A promise that resolves to the updated condition set. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ update(conditionSetKey: string, conditionSetData: ConditionSetUpdate): Promise; /** * Deletes a condition set. * * @param conditionSetKey The key of the condition set to delete. * @returns A promise that resolves when the condition set is deleted. * @throws {@link PermitApiError} If the API returns an error HTTP status code. * @throws {@link PermitContextError} If the configured {@link ApiContext} does not match the required endpoint context. */ delete(conditionSetKey: string): Promise; }