import { TPolicy } from "../classes/policy-item.class"; import { TValidateSchemaMeta } from "../interfaces/validate-schema-data.interface"; export declare const POLICY_META_KEY = "POLICY_META"; export declare const POLICY_KEY = "POLICY"; export declare const sugPolicyDelimiter = "|_S_|"; /** * Register function as policy * @param {Policy|string} policyId - optional, if not set {class name}.{function name} will be use * @returns {(policyClass: any, propertyKey: string, descriptor: PropertyDescriptor) => any} * @constructor */ declare function Policy(): any; declare function Policy(policyId: string): any; /** * Apply policy on decorated function. * The policy got selected by the policyId * * @param {string|Function} policy * @param {number} failedResponseCode * @param policyMeta * @returns {(contextClass: any, propertyKey: string, descriptor: PropertyDescriptor) => any} * @constructor */ declare function UsePolicy(policy: TPolicy | string): any; declare function UsePolicy(policy: TPolicy | string, failedResponseCode: number): any; declare function UsePolicy(policy: TPolicy | string, failedResponseCode: number, ...policyMeta: any[]): any; declare function UsePolicySync(policy: TPolicy | string): any; declare function UsePolicySync(policy: TPolicy | string, failedResponseCode: number): any; declare function UsePolicySync(policy: TPolicy | string, failedResponseCode: number, ...policyMeta: any[]): any; /** * Predefined policy which check the arguments schema * * @param {number} failedResponseCode * @param {TValidateSchemaData} policyMeta * @returns {(contextClass: any, propertyKey: string, descriptor: PropertyDescriptor) => any} * @constructor */ declare const ValidateSchemaPolicy: (failedResponseCode?: number, ...policyMeta: TValidateSchemaMeta[]) => any; declare const ValidateSchemaPolicySync: (failedResponseCode?: number, ...policyMeta: TValidateSchemaMeta[]) => any; export { Policy, UsePolicy, UsePolicySync, ValidateSchemaPolicy, ValidateSchemaPolicySync };