import type { RuleType } from '@midwayjs/validate'; import type { TupleToUnion } from '@waiting/shared-types'; type Dto = new () => T; type SchemaMethod = keyof RuleType.Schema; export type DtoFromResultType = Omit> : never, KE extends (keyof T)[] ? TupleToUnion : never>; /** * Convert a DTO to a new DTO, excluding some keys, and all of the validation RuleType on keys are optional. * @param KExclusiveKeys * - if undefined or null, or empty [], all keys will be included; otherwise this keys will be omitted * - exclusiveKeys high priority then inclusiveKeys * @param KInclusiveKeys * - if undefined or '*' or empty [], all keys will be included; otherwise this keys will be picked * @requires TypeScript >= 5.3 */ export declare function OptionalDto(dto: Dto, exclusiveKeys: KExclusiveKeys, inclusiveKeys?: KInclusiveKeys | void | '*'): Dto>>; /** * Convert a DTO to a new DTO, excluding some keys, and all of the validation RuleType on keys are required. * @param KExclusiveKeys * - if undefined or null, or empty [], all keys will be included; otherwise this keys will be omitted * - exclusiveKeys high priority then inclusiveKeys * @param KInclusiveKeys * - if undefined or '*' or empty [], all keys will be included; otherwise this keys will be picked * @requires TypeScript >= 5.3 */ export declare function RequiredDto(dto: Dto, exclusiveKeys: KExclusiveKeys, inclusiveKeys?: KInclusiveKeys | void | '*'): Dto>>; /** * Convert a DTO to a new DTO, excluding some keys, and all of the validation RuleType on keys are optional. * @param KExclusiveKeys * - if undefined or null, or empty [], all keys will be included; otherwise this keys will be omitted * - exclusiveKeys high priority then inclusiveKeys * @param KInclusiveKeys * - if undefined or '*' or empty [], all keys will be included; otherwise this keys will be picked */ export declare function DtoFrom(dto: Dto, schemaMethods: SchemaMethod[], exclusiveKeys: KExclusiveKeys, inclusiveKeys?: KInclusiveKeys | void | '*'): Dto>; export {};