@lyxa.ai/types
Version:
Lyxa type definitions and validation schemas for both frontend and backend
933 lines (932 loc) • 35.4 kB
TypeScript
import { z } from 'zod';
import { DTO } from './global-validation';
import { ActionType, GeoLocationType, HolidayWorkStatus, Language, UserOrderCompletionScope, WeekDay, WorkStatus } from '../enum';
export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
size: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
sort: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<-1>]>>>;
query: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
search: z.ZodOptional<z.ZodObject<{
searchKey: z.ZodString;
searchFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
searchKey: string;
searchFields?: string[] | undefined;
}, {
searchKey: string;
searchFields?: string[] | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
size: number;
page: number;
search?: {
searchKey: string;
searchFields?: string[] | undefined;
} | undefined;
sort?: Record<string, 1 | -1> | undefined;
populate?: any;
select?: Record<string, 0 | 1> | undefined;
query?: Record<string, any> | undefined;
}, {
search?: {
searchKey: string;
searchFields?: string[] | undefined;
} | undefined;
sort?: Record<string, 1 | -1> | undefined;
size?: number | undefined;
populate?: any;
select?: Record<string, 0 | 1> | undefined;
query?: Record<string, any> | undefined;
page?: number | undefined;
}>>;
export type FilterDTO = z.infer<typeof FilterSchema>;
export declare const StringSchema: z.ZodString;
export declare const AddressSchema: z.ZodObject<{
address: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
description: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
city: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
state: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
country: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
location: z.ZodObject<{
type: z.ZodDefault<z.ZodNativeEnum<typeof GeoLocationType>>;
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
type: GeoLocationType;
coordinates: [number, number];
}, {
coordinates: [number, number];
type?: GeoLocationType | undefined;
}>;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
zone: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
}, "strip", z.ZodTypeAny, {
location: {
type: GeoLocationType;
coordinates: [number, number];
};
address: string;
city: string;
country: string;
latitude: number;
longitude: number;
description?: string | undefined;
state?: string | undefined;
zone?: import("mongoose").Types.ObjectId | undefined;
}, {
location: {
coordinates: [number, number];
type?: GeoLocationType | undefined;
};
address: string;
city: string;
country: string;
latitude: number;
longitude: number;
description?: string | undefined;
state?: string | undefined;
zone?: string | import("mongoose").Types.ObjectId | undefined;
}>;
export type AddressDTO = DTO<typeof AddressSchema>;
export declare const UserAddressSchema: z.ZodObject<{
address: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
description: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
city: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
state: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
country: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
location: z.ZodObject<{
type: z.ZodDefault<z.ZodNativeEnum<typeof GeoLocationType>>;
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
type: GeoLocationType;
coordinates: [number, number];
}, {
coordinates: [number, number];
type?: GeoLocationType | undefined;
}>;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
zone: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
} & {
addressLabel: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
apartment: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
buildingName: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
}, "strip", z.ZodTypeAny, {
location: {
type: GeoLocationType;
coordinates: [number, number];
};
address: string;
city: string;
country: string;
latitude: number;
longitude: number;
addressLabel: string;
apartment: string;
buildingName: string;
description?: string | undefined;
state?: string | undefined;
zone?: import("mongoose").Types.ObjectId | undefined;
deliveryOption?: string | undefined;
instructions?: string | undefined;
}, {
location: {
coordinates: [number, number];
type?: GeoLocationType | undefined;
};
address: string;
city: string;
country: string;
latitude: number;
longitude: number;
addressLabel: string;
apartment: string;
buildingName: string;
description?: string | undefined;
state?: string | undefined;
zone?: string | import("mongoose").Types.ObjectId | undefined;
deliveryOption?: string | undefined;
instructions?: string | undefined;
}>;
export type UserAddressDTO = DTO<typeof UserAddressSchema>;
export declare const RegularOrderAddressSchema: z.ZodObject<{
address: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
description: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
city: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
state: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
country: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
location: z.ZodObject<{
type: z.ZodDefault<z.ZodNativeEnum<typeof GeoLocationType>>;
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
type: GeoLocationType;
coordinates: [number, number];
}, {
coordinates: [number, number];
type?: GeoLocationType | undefined;
}>;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
zone: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
} & {
addressLabel: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
apartment: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
buildingName: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
} & {
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
}, "strip", z.ZodTypeAny, {
_id: import("mongoose").Types.ObjectId;
location: {
type: GeoLocationType;
coordinates: [number, number];
};
address: string;
city: string;
country: string;
latitude: number;
longitude: number;
addressLabel: string;
apartment: string;
buildingName: string;
description?: string | undefined;
state?: string | undefined;
zone?: import("mongoose").Types.ObjectId | undefined;
deliveryOption?: string | undefined;
instructions?: string | undefined;
}, {
_id: string | import("mongoose").Types.ObjectId;
location: {
coordinates: [number, number];
type?: GeoLocationType | undefined;
};
address: string;
city: string;
country: string;
latitude: number;
longitude: number;
addressLabel: string;
apartment: string;
buildingName: string;
description?: string | undefined;
state?: string | undefined;
zone?: string | import("mongoose").Types.ObjectId | undefined;
deliveryOption?: string | undefined;
instructions?: string | undefined;
}>;
export type RegularOrderAddressDTO = DTO<typeof RegularOrderAddressSchema>;
export declare const CourierAddressSchema: z.ZodObject<{
address: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
description: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
city: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
state: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
country: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
location: z.ZodObject<{
type: z.ZodDefault<z.ZodNativeEnum<typeof GeoLocationType>>;
coordinates: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
}, "strip", z.ZodTypeAny, {
type: GeoLocationType;
coordinates: [number, number];
}, {
coordinates: [number, number];
type?: GeoLocationType | undefined;
}>;
latitude: z.ZodNumber;
longitude: z.ZodNumber;
zone: z.ZodOptional<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>>;
} & {
addressLabel: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
apartment: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
buildingName: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
deliveryOption: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
instructions: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
} & {
name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
phoneNumber: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
name: string;
location: {
type: GeoLocationType;
coordinates: [number, number];
};
address: string;
city: string;
country: string;
latitude: number;
longitude: number;
addressLabel: string;
apartment: string;
buildingName: string;
phoneNumber: string;
description?: string | undefined;
state?: string | undefined;
zone?: import("mongoose").Types.ObjectId | undefined;
deliveryOption?: string | undefined;
instructions?: string | undefined;
}, {
name: string;
location: {
coordinates: [number, number];
type?: GeoLocationType | undefined;
};
address: string;
city: string;
country: string;
latitude: number;
longitude: number;
addressLabel: string;
apartment: string;
buildingName: string;
phoneNumber: string;
description?: string | undefined;
state?: string | undefined;
zone?: string | import("mongoose").Types.ObjectId | undefined;
deliveryOption?: string | undefined;
instructions?: string | undefined;
}>;
export type CourierAddressDTO = DTO<typeof CourierAddressSchema>;
export declare const DurationSchema: z.ZodObject<{
start: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
end: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>>;
}, "strip", z.ZodTypeAny, {
start: Date;
end?: Date | undefined;
}, {
start: string | Date;
end?: string | Date | undefined;
}>;
export declare const NormalHourSchema: z.ZodObject<{
day: z.ZodNativeEnum<typeof WeekDay>;
status: z.ZodNativeEnum<typeof WorkStatus>;
openingHours: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
start: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
end: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, "many">>, {
end: string;
start: string;
}[], {
end: string;
start: string;
}[] | undefined>;
}, "strip", z.ZodTypeAny, {
day: WeekDay;
status: WorkStatus;
openingHours: {
end: string;
start: string;
}[];
}, {
day: WeekDay;
status: WorkStatus;
openingHours?: {
end: string;
start: string;
}[] | undefined;
}>;
export declare const HolidayHourSchema: z.ZodObject<{
date: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
status: z.ZodNativeEnum<typeof HolidayWorkStatus>;
closingHour: z.ZodEffects<z.ZodEffects<z.ZodObject<{
start: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
end: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, {
end: string;
start: string;
}, {
end: string;
start: string;
}>;
}, "strip", z.ZodTypeAny, {
date: Date;
status: HolidayWorkStatus;
closingHour: {
end: string;
start: string;
};
}, {
date: string | Date;
status: HolidayWorkStatus;
closingHour: {
end: string;
start: string;
};
}>;
export declare const WorkHourSettingSchema: z.ZodObject<{
normalHours: z.ZodDefault<z.ZodArray<z.ZodObject<{
day: z.ZodNativeEnum<typeof WeekDay>;
status: z.ZodNativeEnum<typeof WorkStatus>;
openingHours: z.ZodEffects<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
start: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
end: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, "many">>, {
end: string;
start: string;
}[], {
end: string;
start: string;
}[] | undefined>;
}, "strip", z.ZodTypeAny, {
day: WeekDay;
status: WorkStatus;
openingHours: {
end: string;
start: string;
}[];
}, {
day: WeekDay;
status: WorkStatus;
openingHours?: {
end: string;
start: string;
}[] | undefined;
}>, "many">>;
holidayHours: z.ZodDefault<z.ZodArray<z.ZodObject<{
date: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
status: z.ZodNativeEnum<typeof HolidayWorkStatus>;
closingHour: z.ZodEffects<z.ZodEffects<z.ZodObject<{
start: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
end: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, {
end: string;
start: string;
}, {
end: string;
start: string;
}>, {
end: string;
start: string;
}, {
end: string;
start: string;
}>;
}, "strip", z.ZodTypeAny, {
date: Date;
status: HolidayWorkStatus;
closingHour: {
end: string;
start: string;
};
}, {
date: string | Date;
status: HolidayWorkStatus;
closingHour: {
end: string;
start: string;
};
}>, "many">>;
}, "strip", z.ZodTypeAny, {
normalHours: {
day: WeekDay;
status: WorkStatus;
openingHours: {
end: string;
start: string;
}[];
}[];
holidayHours: {
date: Date;
status: HolidayWorkStatus;
closingHour: {
end: string;
start: string;
};
}[];
}, {
normalHours?: {
day: WeekDay;
status: WorkStatus;
openingHours?: {
end: string;
start: string;
}[] | undefined;
}[] | undefined;
holidayHours?: {
date: string | Date;
status: HolidayWorkStatus;
closingHour: {
end: string;
start: string;
};
}[] | undefined;
}>;
export declare const LoginSchema: z.ZodObject<{
email: z.ZodEffects<z.ZodString, string, string>;
password: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
email: string;
password: string;
}, {
email: string;
password: string;
}>;
export type LoginDTO = DTO<typeof LoginSchema>;
declare const metadataSchema: z.ZodObject<{
page: z.ZodNumber;
size: z.ZodNumber;
totalElements: z.ZodNumber;
totalPages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}>;
export declare const createPaginatedSchema: <T>(documentSchema: z.ZodSchema<T>) => z.ZodObject<{
metadata: z.ZodOptional<z.ZodObject<{
page: z.ZodNumber;
size: z.ZodNumber;
totalElements: z.ZodNumber;
totalPages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}>>;
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
}, "strip", z.ZodTypeAny, {
documents: T[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}, {
documents: T[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}>;
export declare const createResponseSchema: <T>(schema: z.ZodSchema<T>) => z.ZodObject<{
success: z.ZodBoolean;
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
metadata: z.ZodOptional<z.ZodObject<{
page: z.ZodNumber;
size: z.ZodNumber;
totalElements: z.ZodNumber;
totalPages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}>>;
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
}, "strip", z.ZodTypeAny, {
documents: T[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}, {
documents: T[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
}, "strip", z.ZodTypeAny, z.objectUtil.addQuestionMarks<z.baseObjectOutputType<{
success: z.ZodBoolean;
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
metadata: z.ZodOptional<z.ZodObject<{
page: z.ZodNumber;
size: z.ZodNumber;
totalElements: z.ZodNumber;
totalPages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}>>;
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
}, "strip", z.ZodTypeAny, {
documents: T[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}, {
documents: T[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
}>, any> extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never, z.baseObjectInputType<{
success: z.ZodBoolean;
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
metadata: z.ZodOptional<z.ZodObject<{
page: z.ZodNumber;
size: z.ZodNumber;
totalElements: z.ZodNumber;
totalPages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}>>;
documents: z.ZodArray<z.ZodType<T, z.ZodTypeDef, T>, "many">;
}, "strip", z.ZodTypeAny, {
documents: T[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}, {
documents: T[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}>, z.ZodType<T, z.ZodTypeDef, T>]>>;
}> extends infer T_2 ? { [k_1 in keyof T_2]: T_2[k_1]; } : never>;
export type PaginatedDTO<T> = {
metadata: DTO<typeof metadataSchema>;
documents: T[];
};
export type ResponseDTO<T> = {
success: boolean;
message: string;
data?: T;
};
export declare const TokenSchema: z.ZodObject<{
accessToken: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
refreshToken: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
accessToken: string;
refreshToken: string;
}, {
accessToken: string;
refreshToken: string;
}>;
export declare const UpdateSortingOrderSchema: z.ZodObject<{
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
newPosition: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
_id: import("mongoose").Types.ObjectId;
newPosition: number;
}, {
_id: string | import("mongoose").Types.ObjectId;
newPosition: number;
}>;
export type UpdateSortingOrderDTO = DTO<typeof UpdateSortingOrderSchema>;
export declare const DeleteSchema: z.ZodObject<{
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
softDelete: z.ZodDefault<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
_id: import("mongoose").Types.ObjectId;
softDelete: boolean;
}, {
_id: string | import("mongoose").Types.ObjectId;
softDelete?: boolean | undefined;
}>;
export type DeleteDTO = DTO<typeof DeleteSchema>;
export declare const IdSchema: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
export declare const GetByIdInputSchema: z.ZodObject<{
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
}, "strip", z.ZodTypeAny, {
_id: import("mongoose").Types.ObjectId;
populate?: any;
select?: Record<string, 0 | 1> | undefined;
}, {
_id: string | import("mongoose").Types.ObjectId;
populate?: any;
select?: Record<string, 0 | 1> | undefined;
}>;
export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
export declare const GetProductByIdInputSchema: z.ZodObject<{
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
withAttributeHiddenItems: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
withAddonsHiddenItems: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
}, "strip", z.ZodTypeAny, {
_id: import("mongoose").Types.ObjectId;
withAttributeHiddenItems: boolean;
withAddonsHiddenItems: boolean;
populate?: any;
select?: Record<string, 0 | 1> | undefined;
}, {
_id: string | import("mongoose").Types.ObjectId;
populate?: any;
select?: Record<string, 0 | 1> | undefined;
withAttributeHiddenItems?: boolean | undefined;
withAddonsHiddenItems?: boolean | undefined;
}>;
export type GetProductByIdInputDTO = DTO<typeof GetProductByIdInputSchema>;
export declare const GetOrderByIdInputSchema: z.ZodObject<{
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
}, "strip", z.ZodTypeAny, {
_id: import("mongoose").Types.ObjectId;
populate?: any;
select?: Record<string, 0 | 1> | undefined;
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
}, {
_id: string | import("mongoose").Types.ObjectId;
populate?: any;
select?: Record<string, 0 | 1> | undefined;
userOrderCompletionScope?: UserOrderCompletionScope | undefined;
}>;
export type GetOrderByIdInputDTO = DTO<typeof GetOrderByIdInputSchema>;
export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
}, "strip", z.ZodTypeAny, {
populate?: any;
select?: Record<string, 0 | 1> | undefined;
}, {
populate?: any;
select?: Record<string, 0 | 1> | undefined;
}>>;
export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
export declare const GetOneQuerySchema: z.ZodObject<{
query: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
}, "strip", z.ZodTypeAny, {
populate?: any;
select?: Record<string, 0 | 1> | undefined;
query?: Record<string, any> | undefined;
}, {
populate?: any;
select?: Record<string, 0 | 1> | undefined;
query?: Record<string, any> | undefined;
}>;
export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
declare const ShareableLinkSchema: z.ZodObject<{
link: z.ZodString;
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
}, "strip", z.ZodTypeAny, {
link: string;
message: string;
}, {
link: string;
message: string;
}>;
export declare const ShareableLinkResponseSchema: z.ZodObject<{
success: z.ZodBoolean;
message: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
data: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
metadata: z.ZodOptional<z.ZodObject<{
page: z.ZodNumber;
size: z.ZodNumber;
totalElements: z.ZodNumber;
totalPages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}, {
size: number;
page: number;
totalElements: number;
totalPages: number;
}>>;
documents: z.ZodArray<z.ZodType<{
link: string;
message: string;
}, z.ZodTypeDef, {
link: string;
message: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
documents: {
link: string;
message: string;
}[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}, {
documents: {
link: string;
message: string;
}[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
}>, z.ZodType<{
link: string;
message: string;
}, z.ZodTypeDef, {
link: string;
message: string;
}>]>>;
}, "strip", z.ZodTypeAny, {
message: string;
success: boolean;
data?: {
link: string;
message: string;
} | {
documents: {
link: string;
message: string;
}[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
} | undefined;
}, {
message: string;
success: boolean;
data?: {
link: string;
message: string;
} | {
documents: {
link: string;
message: string;
}[];
metadata?: {
size: number;
page: number;
totalElements: number;
totalPages: number;
} | undefined;
} | undefined;
}>;
export type ShareableLinkDTO = DTO<typeof ShareableLinkSchema>;
export declare const UpdateFcmTokenInputSchema: z.ZodObject<{
fcmToken: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
action: z.ZodNativeEnum<typeof ActionType>;
}, "strip", z.ZodTypeAny, {
fcmToken: string;
action: ActionType;
}, {
fcmToken: string;
action: ActionType;
}>;
export type UpdateFcmTokenInputDTO = DTO<typeof UpdateFcmTokenInputSchema>;
export declare const AssignRiderSchema: z.ZodObject<{
_id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
language: z.ZodNativeEnum<typeof Language>;
}, "strip", z.ZodTypeAny, {
language: Language;
_id: import("mongoose").Types.ObjectId;
}, {
language: Language;
_id: string | import("mongoose").Types.ObjectId;
}>;
export type AssignRiderDTO = DTO<typeof AssignRiderSchema>;
export {};