import z$1, { z } from "zod"; import { Option, Result } from "@globalart/oxide"; //#region src/envelope.d.ts interface IMessageMetadata { keys?: Record; headers?: Record; } interface IEnvelope { id: string; payload: TPayload; meta: TMeta; } declare abstract class BaseEnvelope implements IEnvelope { readonly payload: TPayload; readonly meta: TMeta; readonly id: string; constructor(payload: TPayload, meta?: TMeta, id?: string); } //#endregion //#region src/aggregate-root.d.ts declare abstract class AggregateRoot> { #private; get domainEvents(): E[]; set domainEvents(events: E[]); addDomainEvent(event: E): void; removeEvents(events: E[]): void; } //#endregion //#region src/command.d.ts type CommandProps = Omit & Partial; declare const commandSchema: (commandName: TName, payload: TPayload) => z.ZodObject<{ id: z.ZodUUID; command: z.ZodLiteral; payload: TPayload; }, z.core.$strip>; declare abstract class Command { readonly commandId: string; readonly correlationId: string; readonly causationId?: string; readonly topic?: string; constructor(props: CommandProps); } interface IEnvelopeCommand extends IEnvelope { command: TName; } interface IEnvelopeCommandJSON { id: string; command: TName; payload: TPayload; meta: TMeta; } declare abstract class BaseCommand extends BaseEnvelope implements IEnvelopeCommand { readonly command: TName; readonly topic?: string; constructor(command: TName, payload: TPayload, meta?: TMeta, id?: string, topic?: string); toJSON(): IEnvelopeCommandJSON; } //#endregion //#region src/command-bus.d.ts interface ICommandBus { execute(command: TCommand): Promise; } //#endregion //#region src/command-handler.d.ts interface ICommandHandler { execute(command: TCommand): Promise; } //#endregion //#region src/event.d.ts declare const eventSchema: (eventName: TName, payload: TPayload) => z.ZodObject<{ id: z.ZodUUID; event: z.ZodLiteral; payload: TPayload; timestamp: z.ZodCoercedDate; }, z.core.$strip>; interface IEvent extends IEnvelope { event: TName; timestamp: Date; } interface IEventJSON { id: string; event: TName; payload: TPayload; timestamp: string; meta: TMeta; } declare abstract class BaseEvent extends BaseEnvelope implements IEvent { readonly event: TName; readonly timestamp: Date; readonly topic?: string; constructor(event: TName, payload: TPayload, meta?: TMeta, id?: string, timestamp?: Date, topic?: string); toJSON(): IEventJSON; } //#endregion //#region src/event-handler.d.ts interface IEventHandler { handle(event: TEvent): Promise | TResult; } //#endregion //#region src/exception.base.d.ts interface SerializedException { message: string; code: string; correlationId?: string; statusCode?: number; stack?: string; cause?: string; metadata?: unknown; } declare abstract class ExceptionBase extends Error { readonly message: string; readonly cause?: Error | undefined; readonly metadata?: unknown | undefined; abstract code: string; readonly correlationId?: string; readonly statusCode?: number; /** * * @param message * @param correlationId * @param cause * @param metadata */ constructor(message: string, statusCode?: number, correlationId?: string, cause?: Error | undefined, metadata?: unknown | undefined); toJSON(): SerializedException; } //#endregion //#region src/filter/base.filter.d.ts declare const baseFilter: z.ZodObject<{ field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>; //#endregion //#region src/filter/conjunction.d.ts declare const conjunctions: z.ZodUnion, z.ZodLiteral<"$or">, z.ZodLiteral<"$not">]>; type IConjunction = z.infer; //#endregion //#region src/specification.d.ts interface ISpecVisitor { or(left: ISpecification, right: ISpecification): this; not(): this; } interface ISpecification { isSatisfiedBy(t: T): boolean; mutate(t: T): Result; accept(v: V): Result; } declare abstract class CompositeSpecification implements ISpecification { abstract isSatisfiedBy(t: T): boolean; abstract mutate(t: T): Result; abstract accept(v: V): Result; and(s: ISpecification): CompositeSpecification; or(s: ISpecification): CompositeSpecification; not(): Not; } declare class Not extends CompositeSpecification { readonly spec: ISpecification; constructor(spec: ISpecification); isSatisfiedBy(t: T): boolean; mutate(): Result; accept(v: V): Result; } declare const and: (...specs: CompositeSpecification[]) => Option>; declare const andOptions: (...specs: Option>[]) => Option>; declare const or: (...specs: CompositeSpecification[]) => Option>; //#endregion //#region src/value-objects/value-object.d.ts type Primitives = string | number | boolean | null; interface DomainPrimitive { value: T; } type ValueObjectProps = T extends Primitives | Date ? DomainPrimitive : T; declare abstract class ValueObject { protected readonly props: ValueObjectProps; constructor(props: ValueObjectProps); equals(vo?: ValueObject): boolean; static isValueObject(obj: unknown): obj is ValueObject; unpack(): T; private isDomainPrimitive; } //#endregion //#region src/filter/fields/boolean/boolean-field.type.d.ts declare const booleanFieldValue: z.ZodNullable; type IBooleanFieldValue = z.infer; //#endregion //#region src/filter/fields/boolean/boolean.filter.d.ts declare const booleanFilterOperators: z.ZodUnion, z.ZodLiteral<"$neq">]>; declare const booleanFilterValue: z.ZodNullable; declare const booleanFilter: z.ZodObject<{ type: z.ZodLiteral<"boolean">; operator: z.ZodUnion, z.ZodLiteral<"$neq">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>; type IBooleanFilter = z.infer; type IBooleanFilterOperator = z.infer; //#endregion //#region src/filter/fields/date/date-field.type.d.ts declare const dateFieldValue: z.ZodNullable; type IDateFieldValue = z.infer; //#endregion //#region src/filter/fields/date/date-field-value.d.ts declare class DateFieldValue extends FieldValueBase { constructor(value: IDateFieldValue); accept(visitor: IFieldValueVisitor): void; static fromNullableString(str: string | null): DateFieldValue; } //#endregion //#region src/filter/fields/number/number-field.type.d.ts declare const numberFieldValue: z.ZodUnion<[z.ZodNumber, z.ZodNull]>; type INumberFieldValue = z.infer; //#endregion //#region src/filter/fields/number/number-field-value.d.ts declare class NumberFieldValue extends FieldValueBase { constructor(value: INumberFieldValue); accept(visitor: IFieldValueVisitor): void; } //#endregion //#region src/filter/fields/string/string-field.type.d.ts declare const stringFieldValue: z.ZodNullable; type IStringFieldValue = z.infer; //#endregion //#region src/filter/fields/string/string-field-value.d.ts declare class StringFieldValue extends FieldValueBase { constructor(value: IStringFieldValue); accept(visitor: IFieldValueVisitor): void; } //#endregion //#region src/filter/fields/field-value.visitor.d.ts interface IFieldValueVisitor { number(value: NumberFieldValue): void; string(value: StringFieldValue): void; date(value: DateFieldValue): void; boolean(value: BooleanFieldValue): void; } //#endregion //#region src/filter/fields/field.type.d.ts type UnpackedFieldValue = IStringFieldValue | INumberFieldValue | IDateFieldValue | IBooleanFieldValue; //#endregion //#region src/filter/fields/field-value.base.d.ts declare abstract class FieldValueBase extends ValueObject { abstract accept(visitor: IFieldValueVisitor): void; } //#endregion //#region src/filter/fields/boolean/boolean-field-value.d.ts declare class BooleanFieldValue extends FieldValueBase { constructor(value: IBooleanFieldValue); accept(visitor: IFieldValueVisitor): void; } //#endregion //#region src/filter/specifications/boolean.specification.d.ts declare class BooleanEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class BooleanNotEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } //#endregion //#region src/filter/specifications/date.specification.d.ts declare class DateEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class DateGreaterThan extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class DateLessThan extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class DateGreaterThanOrEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class DateLessThanOrEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class DateIsToday extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class DateIsTomorrow extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class DateIsYesterday extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class DateBetween extends BaseFilterSpecification { field: string; dateStart: Date; dateEnd: Date; relation?: string | undefined; constructor(field: string, dateStart: Date, dateEnd: Date, relation?: string | undefined); isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } //#endregion //#region src/filter/specifications/number.specification.d.ts declare class NumberEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class NumberGreaterThan extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class NumberLessThan extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class NumberGreaterThanOrEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class NumberLessThanOrEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class NumberEmpty extends BaseFilterSpecification { readonly field: string; constructor(field: string); isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } //#endregion //#region src/filter/specifications/string.specification.d.ts declare class StringEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class StringNotEqual extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class StringContain extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class StringStartsWith extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class StringEndsWith extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class StringRegex extends BaseFilterSpecification { isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } declare class StringEmpty extends BaseFilterSpecification { constructor(field: string); isSatisfiedBy(value: unknown): boolean; accept(v: IFilterBaseVisitor): Result; } //#endregion //#region src/filter/filter-specification-visitor.base.d.ts interface IFilterSpecBaseVisitor { idEqual(): void; idsIn(): void; } interface IFilterValueBaseVisitor { stringEqual(s: StringEqual): void; stringNotEqual(s: StringNotEqual): void; stringContain(s: StringContain): void; stringStartsWith(s: StringStartsWith): void; stringEndsWith(s: StringEndsWith): void; stringRegex(s: StringRegex): void; stringEmpty(s: StringEmpty): void; booleanEqual(s: BooleanEqual): void; booleanNotEqual(s: BooleanNotEqual): void; like(): void; numberEqual(s: NumberEqual): void; numberGreaterThan(s: NumberGreaterThan): void; numberLessThan(s: NumberLessThan): void; numberGreaterThanOrEqual(s: NumberGreaterThanOrEqual): void; numberLessThanOrEqual(s: NumberLessThanOrEqual): void; numberEmpty(s: NumberEmpty): void; dateEqual(s: DateEqual): void; dateGreaterThan(s: DateGreaterThan): void; dateLessThan(s: DateLessThan): void; dateGreaterThanOrEqual(s: DateGreaterThanOrEqual): void; dateLessThanOrEqual(s: DateLessThanOrEqual): void; dateIsToday(s: DateIsToday): void; dateIsTomorrow(s: DateIsTomorrow): void; dateIsYesterday(s: DateIsYesterday): void; dateBetween(s: DateBetween): void; dateRangeEqual(): void; dateRangeEmpty(): void; dateRangeDateEqual(): void; dateRangeDateGreaterThan(): void; dateRangeDateLessThan(): void; dateRangeDateGreaterThanOrEqual(): void; dateRangeDateLessThanOrEqual(): void; boolIsTrue(): void; boolIsFalse(): void; jsonEmpty(): void; } type IFilterBaseVisitor = IFilterSpecBaseVisitor & IFilterValueBaseVisitor & ISpecVisitor; //#endregion //#region src/filter/filter-specification.base.d.ts declare abstract class BaseFilterSpecification extends CompositeSpecification { readonly field: string; readonly value: V; readonly relation?: string | undefined; constructor(field: string, value: V, relation?: string | undefined); mutate(t: E): Result; } //#endregion //#region src/filter/filter.d.ts declare const filterRootFilter: (filters: [T, ...T[]]) => z.ZodUnion<[z.ZodType<{ conjunction?: IConjunction; children?: (z.infer>> | z.infer>)[]; }, unknown, z.core.$ZodTypeInternals<{ conjunction?: IConjunction; children?: (z.infer>> | z.infer>)[]; }, unknown>>, z.ZodArray, z.ZodType<{ conjunction?: IConjunction; children?: (z.infer>> | z.infer>)[]; }, unknown, z.core.$ZodTypeInternals<{ conjunction?: IConjunction; children?: (z.infer>> | z.infer>)[]; }, unknown>>]>>]>; declare const filter: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"number">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"string">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$contains">, z.ZodLiteral<"$not_contains">, z.ZodLiteral<"$starts_with">, z.ZodLiteral<"$ends_with">, z.ZodLiteral<"$regex">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"date">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$between">, z.ZodLiteral<"$is_today">, z.ZodLiteral<"$is_tomorrow">, z.ZodLiteral<"$is_yesterday">, z.ZodLiteral<"$is_not_today">]>; value: z.ZodUnion<[z.ZodNullable, z.ZodTuple<[z.ZodString, z.ZodString], null>]>; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"boolean">; operator: z.ZodUnion, z.ZodLiteral<"$neq">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>], "type">; type IFilter = z.infer; type IFilters = IFilter[]; interface IGroup { conjunction?: IConjunction; children?: IFilterOrGroupList; } type IFilterOrGroup = Filter | IGroup; declare const filterOrGroupList: z.ZodArray; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"string">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$contains">, z.ZodLiteral<"$not_contains">, z.ZodLiteral<"$starts_with">, z.ZodLiteral<"$ends_with">, z.ZodLiteral<"$regex">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"date">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$between">, z.ZodLiteral<"$is_today">, z.ZodLiteral<"$is_tomorrow">, z.ZodLiteral<"$is_yesterday">, z.ZodLiteral<"$is_not_today">]>; value: z.ZodUnion<[z.ZodNullable, z.ZodTuple<[z.ZodString, z.ZodString], null>]>; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"boolean">; operator: z.ZodUnion, z.ZodLiteral<"$neq">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>], "type">, z.ZodType, unknown, z.core.$ZodTypeInternals, unknown>>]>>; type IFilterOrGroupList = IFilterOrGroup[]; declare const rootFilter: z.ZodUnion<[z.ZodUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"number">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"string">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$contains">, z.ZodLiteral<"$not_contains">, z.ZodLiteral<"$starts_with">, z.ZodLiteral<"$ends_with">, z.ZodLiteral<"$regex">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"date">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$between">, z.ZodLiteral<"$is_today">, z.ZodLiteral<"$is_tomorrow">, z.ZodLiteral<"$is_yesterday">, z.ZodLiteral<"$is_not_today">]>; value: z.ZodUnion<[z.ZodNullable, z.ZodTuple<[z.ZodString, z.ZodString], null>]>; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"boolean">; operator: z.ZodUnion, z.ZodLiteral<"$neq">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>], "type">, z.ZodType, unknown, z.core.$ZodTypeInternals, unknown>>]>, z.ZodArray; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"string">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$contains">, z.ZodLiteral<"$not_contains">, z.ZodLiteral<"$starts_with">, z.ZodLiteral<"$ends_with">, z.ZodLiteral<"$regex">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"date">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$between">, z.ZodLiteral<"$is_today">, z.ZodLiteral<"$is_tomorrow">, z.ZodLiteral<"$is_yesterday">, z.ZodLiteral<"$is_not_today">]>; value: z.ZodUnion<[z.ZodNullable, z.ZodTuple<[z.ZodString, z.ZodString], null>]>; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"boolean">; operator: z.ZodUnion, z.ZodLiteral<"$neq">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>], "type">, z.ZodType, unknown, z.core.$ZodTypeInternals, unknown>>]>>]>; type IRootFilter = IFilterOrGroup | IFilterOrGroupList; declare const isGroup: (filterOrGroup: IFilterOrGroup) => filterOrGroup is IGroup; declare const isFilter: (filterOrGroup: IFilterOrGroup) => filterOrGroup is IFilter; declare const operators: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>, z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$contains">, z.ZodLiteral<"$not_contains">, z.ZodLiteral<"$starts_with">, z.ZodLiteral<"$ends_with">, z.ZodLiteral<"$regex">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>]>; type IOperator = z.infer; type IFieldType = "number"; declare const operatorsMap: Record; declare const convertFilterSpec: (filter: IRootFilter | string) => Option; declare const isEmptyFilter: (filter: IRootFilter) => boolean; //#endregion //#region src/filter/fields/date/date.filter.d.ts declare const dateFilterOperators: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$between">, z.ZodLiteral<"$is_today">, z.ZodLiteral<"$is_tomorrow">, z.ZodLiteral<"$is_yesterday">, z.ZodLiteral<"$is_not_today">]>; declare const dateFilterValue: z.ZodUnion<[z.ZodNullable, z.ZodTuple<[z.ZodString, z.ZodString], null>]>; declare const dateFilter: z.ZodObject<{ type: z.ZodLiteral<"date">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$between">, z.ZodLiteral<"$is_today">, z.ZodLiteral<"$is_tomorrow">, z.ZodLiteral<"$is_yesterday">, z.ZodLiteral<"$is_not_today">]>; value: z.ZodUnion<[z.ZodNullable, z.ZodTuple<[z.ZodString, z.ZodString], null>]>; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>; type IDateFilter = z.infer; type IDateFilterValue = z.infer; type IDateFilterOperator = z.infer; //#endregion //#region src/filter/fields/number/number.filter.d.ts declare const numberFilterOperators: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; type INumberFilterOperators = z.infer; declare const numberFilterValue: z.ZodNullable; declare const numberFilter: z.ZodObject<{ type: z.ZodLiteral<"number">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$gt">, z.ZodLiteral<"$gte">, z.ZodLiteral<"$lt">, z.ZodLiteral<"$lte">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>; type INumberFilter = z.infer; type INumberFilterValue = z.infer; //#endregion //#region src/filter/fields/string/string.filter.d.ts declare const stringFilterOperators: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$contains">, z.ZodLiteral<"$not_contains">, z.ZodLiteral<"$starts_with">, z.ZodLiteral<"$ends_with">, z.ZodLiteral<"$regex">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; declare const stringFilterValue: z.ZodNullable; declare const stringFilter: z.ZodObject<{ type: z.ZodLiteral<"string">; operator: z.ZodUnion, z.ZodLiteral<"$neq">, z.ZodLiteral<"$contains">, z.ZodLiteral<"$not_contains">, z.ZodLiteral<"$starts_with">, z.ZodLiteral<"$ends_with">, z.ZodLiteral<"$regex">, z.ZodLiteral<"$is_empty">, z.ZodLiteral<"$is_not_empty">]>; value: z.ZodNullable; field: z.ZodString; relation: z.ZodOptional; }, z.core.$strip>; type IStringFilter = z.infer; type IStringFilterOperator = z.infer; //#endregion //#region src/filter/operators.d.ts declare const $eq: z.ZodLiteral<"$eq">; declare const $neq: z.ZodLiteral<"$neq">; declare const $contains: z.ZodLiteral<"$contains">; declare const $not_contains: z.ZodLiteral<"$not_contains">; declare const $starts_with: z.ZodLiteral<"$starts_with">; declare const $ends_with: z.ZodLiteral<"$ends_with">; declare const $regex: z.ZodLiteral<"$regex">; declare const $is_true: z.ZodLiteral<"$is_true">; declare const $is_false: z.ZodLiteral<"$is_false">; declare const $in: z.ZodLiteral<"$in">; declare const $nin: z.ZodLiteral<"$nin">; declare const $gt: z.ZodLiteral<"$gt">; declare const $lt: z.ZodLiteral<"$lt">; declare const $gte: z.ZodLiteral<"$gte">; declare const $lte: z.ZodLiteral<"$lte">; declare const $start_eq: z.ZodLiteral<"$start_eq">; declare const $start_neq: z.ZodLiteral<"$start_neq">; declare const $start_gt: z.ZodLiteral<"$start_gt">; declare const $start_lt: z.ZodLiteral<"$start_lt">; declare const $start_gte: z.ZodLiteral<"$start_gte">; declare const $start_lte: z.ZodLiteral<"$start_lte">; declare const $end_eq: z.ZodLiteral<"$end_eq">; declare const $end_neq: z.ZodLiteral<"$end_neq">; declare const $end_gt: z.ZodLiteral<"$end_gt">; declare const $end_lt: z.ZodLiteral<"$end_lt">; declare const $end_gte: z.ZodLiteral<"$end_gte">; declare const $end_lte: z.ZodLiteral<"$end_lte">; declare const $is_empty: z.ZodLiteral<"$is_empty">; declare const $is_not_empty: z.ZodLiteral<"$is_not_empty">; declare const $is_today: z.ZodLiteral<"$is_today">; declare const $is_not_today: z.ZodLiteral<"$is_not_today">; declare const $is_tomorrow: z.ZodLiteral<"$is_tomorrow">; declare const $is_yesterday: z.ZodLiteral<"$is_yesterday">; declare const $between: z.ZodLiteral<"$between">; declare const $has_file_type: z.ZodLiteral<"$has_file_type">; declare const $has_file_extension: z.ZodLiteral<"$has_file_extension">; declare const $is_root: z.ZodLiteral<"$is_root">; declare const $is_me: z.ZodLiteral<"$is_me">; declare const $is_not_me: z.ZodLiteral<"$is_not_me">; declare const operatorsWihtoutValue: z.ZodUnion, z.ZodLiteral<"$is_not_empty">, z.ZodLiteral<"$is_today">, z.ZodLiteral<"$is_not_today">, z.ZodLiteral<"$is_tomorrow">, z.ZodLiteral<"$is_yesterday">, z.ZodLiteral<"$is_root">, z.ZodLiteral<"$is_me">, z.ZodLiteral<"$is_not_me">]>; declare const isOperatorWithoutValue: (value: string) => boolean; //#endregion //#region src/filter/root-filter.d.ts declare class RootFilter extends ValueObject> { get value(): IGroup | IFilterOrGroupList | ValueObjectProps; get group(): IGroup | { conjunction: string; children: IFilterOrGroupList; } | { conjunction: string; children: ValueObjectProps[]; }; getSpec(): Option; toJSON(): IGroup | IFilterOrGroupList | ValueObjectProps; } //#endregion //#region src/outbox.d.ts interface IOutboxService> { save(d: DO): Promise; saveMany(d: DO[]): Promise; } //#endregion //#region src/pagination.d.ts declare const paginationSchema: z.ZodObject<{ limit: z.ZodOptional>>; offset: z.ZodOptional>>; }, z.core.$strip>; type IPagination = z.infer; declare const paginatedResponseSchema: z.ZodObject<{ limit: z.ZodOptional>>; offset: z.ZodOptional>>; total: z.ZodNumber; }, z.core.$strip>; //#endregion //#region src/query.d.ts declare abstract class Query {} //#endregion //#region src/query-bus.d.ts interface IQueryBus { execute(command: TQuery): Promise; } //#endregion //#region src/query-handler.d.ts interface IQueryHandler { execute(query: TQuery): Promise; } //#endregion //#region src/sort.d.ts declare const sortingSchema: z.ZodRecord>; type ISorting = z.infer; //#endregion //#region src/repository.d.ts interface IRepositoryOption { pagination?: IPagination; sorting?: ISorting; } interface PaginatedRepositoryMethodResult { data: T[]; total: number; limit: number; offset: number; } //#endregion //#region src/uow.d.ts interface IUnitOfWork { begin(): Promise; commit(): Promise; rollback(): Promise; conn(): T; } //#endregion //#region src/utils.d.ts declare function convertPropsToObject(props: any): any; //#endregion //#region src/value-objects/boolean.vo.d.ts declare const booleanSchema: z$1.ZodBoolean; type IBoolean = z$1.infer; declare class BoolVO extends ValueObject { constructor(value: IBoolean); get value(): IBoolean; static fromBoolean(value: IBoolean): BoolVO; static True(): BoolVO; static False(): BoolVO; } //#endregion //#region src/value-objects/date.vo.d.ts declare const dateSchema: z$1.ZodDate; type IDate = z$1.infer; declare class DateVO extends ValueObject { constructor(value: IDate); get value(): Date; static fromDate(value: Date): DateVO; static now(): DateVO; } //#endregion //#region src/value-objects/id.vo.d.ts declare const idSchema: z$1.ZodAny; type IId = z$1.infer; declare abstract class ID extends ValueObject { constructor(value: T); get value(): T; } //#endregion //#region src/value-objects/nanoid.vo.d.ts declare const nanoidSchema: z$1.ZodString; type INanoid = z$1.infer; declare abstract class NanoID extends ID { private static ALPHABETS; static createId(prefix?: string, size?: number): string; get value(): number; } //#endregion //#region src/value-objects/integer.vo.d.ts declare const integerSchema: z$1.ZodNumber; type IInteger = z$1.infer; declare class IntegerVO extends ValueObject { constructor(value: IInteger); get value(): IInteger; static fromNumber(value: IInteger): IntegerVO; } //#endregion //#region src/value-objects/string.vo.d.ts declare const stringSchema: z$1.ZodString; type IString = z$1.infer; declare class StringVO extends ValueObject { constructor(value: IString); get value(): IString; static fromString(value: IString): StringVO; static empty(): StringVO; } //#endregion //#region src/value-objects/uuid.vo.d.ts declare const uuidSchema: z$1.ZodUUID; type IUuid = z$1.infer; declare abstract class UUID extends ID { static createId(): string; get value(): number; } //#endregion //#region src/value-objects/email.vo.d.ts declare const emailSchema: z$1.ZodEmail; type IEmail = z$1.infer; declare class EmailVO extends ValueObject { constructor(value: IEmail); static create(value: IEmail): EmailVO; get value(): IEmail; } //#endregion //#region src/value-objects/color.vo.d.ts declare const colorSchema: z$1.ZodCustomStringFormat<"hex">; type IColor = z$1.infer; declare class ColorVO extends ValueObject { constructor(value: IColor); static create(value: IColor): ColorVO; get value(): IColor; } //#endregion //#region src/classes/is-present.d.ts declare const isPresent: (value: unknown) => boolean; //#endregion export { $between, $contains, $end_eq, $end_gt, $end_gte, $end_lt, $end_lte, $end_neq, $ends_with, $eq, $gt, $gte, $has_file_extension, $has_file_type, $in, $is_empty, $is_false, $is_me, $is_not_empty, $is_not_me, $is_not_today, $is_root, $is_today, $is_tomorrow, $is_true, $is_yesterday, $lt, $lte, $neq, $nin, $not_contains, $regex, $start_eq, $start_gt, $start_gte, $start_lt, $start_lte, $start_neq, $starts_with, AggregateRoot, BaseCommand, BaseEnvelope, BaseEvent, BaseFilterSpecification, BoolVO, BooleanEqual, BooleanFieldValue, BooleanNotEqual, ColorVO, Command, CommandProps, CompositeSpecification, DateBetween, DateEqual, DateFieldValue, DateGreaterThan, DateGreaterThanOrEqual, DateIsToday, DateIsTomorrow, DateIsYesterday, DateLessThan, DateLessThanOrEqual, DateVO, DomainPrimitive, EmailVO, ExceptionBase, FieldValueBase, IBoolean, IBooleanFieldValue, IBooleanFilter, IBooleanFilterOperator, IColor, ICommandBus, ICommandHandler, IConjunction, ID, IDate, IDateFieldValue, IDateFilter, IDateFilterOperator, IDateFilterValue, IEmail, IEnvelope, IEnvelopeCommand, IEnvelopeCommandJSON, IEvent, IEventHandler, IEventJSON, type IMessageMetadata as IEventMetadata, IMessageMetadata, IFieldValueVisitor, IFilter, IFilterBaseVisitor, IFilterOrGroup, IFilterOrGroupList, IFilters, IGroup, IId, IInteger, INanoid, INumberFieldValue, INumberFilter, INumberFilterOperators, INumberFilterValue, IOperator, IOutboxService, IPagination, IQueryBus, IQueryHandler, IRepositoryOption, IRootFilter, ISorting, ISpecVisitor, ISpecification, IString, IStringFieldValue, IStringFilter, IStringFilterOperator, IUnitOfWork, IUuid, IntegerVO, NanoID, NumberEmpty, NumberEqual, NumberFieldValue, NumberGreaterThan, NumberGreaterThanOrEqual, NumberLessThan, NumberLessThanOrEqual, PaginatedRepositoryMethodResult, Primitives, Query, RootFilter, SerializedException, StringContain, StringEmpty, StringEndsWith, StringEqual, StringFieldValue, StringNotEqual, StringRegex, StringStartsWith, StringVO, UUID, UnpackedFieldValue, ValueObject, ValueObjectProps, and, andOptions, baseFilter, booleanFieldValue, booleanFilter, booleanFilterOperators, booleanFilterValue, booleanSchema, commandSchema, conjunctions, convertFilterSpec, convertPropsToObject, dateFieldValue, dateFilter, dateFilterOperators, dateFilterValue, dateSchema, eventSchema, filterOrGroupList, filterRootFilter, idSchema, integerSchema, isEmptyFilter, isFilter, isGroup, isOperatorWithoutValue, isPresent, nanoidSchema, numberFieldValue, numberFilter, numberFilterOperators, numberFilterValue, operators, operatorsMap, operatorsWihtoutValue, or, paginatedResponseSchema, paginationSchema, rootFilter, sortingSchema, stringFieldValue, stringFilter, stringFilterOperators, stringFilterValue, stringSchema, uuidSchema }; //# sourceMappingURL=index.d.cts.map