UNPKG

@drip_sync/drip

Version:

Scalable incremental sync for MongoDB aggregation pipelines

179 lines (178 loc) 5.25 kB
import { ObjectId, Timestamp } from "mongodb"; import z from "zod"; export declare const zodPCSInsertionEvent: z.ZodObject<z.objectUtil.extendShape<{ _id: z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>; ct: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>; o: z.ZodString; }, { o: z.ZodLiteral<"i">; k: z.ZodRecord<z.ZodString, z.ZodUnknown>; a: z.ZodRecord<z.ZodString, z.ZodUnknown>; }>, "strip", z.ZodTypeAny, { _id: ObjectId; ct: Timestamp; o: "i"; k: Record<string, unknown>; a: Record<string, unknown>; }, { _id: ObjectId; ct: Timestamp; o: "i"; k: Record<string, unknown>; a: Record<string, unknown>; }>; export declare const zodPCSUpdateEvent: z.ZodObject<z.objectUtil.extendShape<{ _id: z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>; ct: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>; o: z.ZodString; }, { o: z.ZodLiteral<"u">; k: z.ZodRecord<z.ZodString, z.ZodUnknown>; b: z.ZodRecord<z.ZodString, z.ZodUnknown>; a: z.ZodRecord<z.ZodString, z.ZodUnknown>; u: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }>, "strip", z.ZodTypeAny, { _id: ObjectId; ct: Timestamp; o: "u"; k: Record<string, unknown>; a: Record<string, unknown>; b: Record<string, unknown>; u?: Record<string, unknown> | undefined; }, { _id: ObjectId; ct: Timestamp; o: "u"; k: Record<string, unknown>; a: Record<string, unknown>; b: Record<string, unknown>; u?: Record<string, unknown> | undefined; }>; export declare const zodPCSDeletionEvent: z.ZodObject<z.objectUtil.extendShape<{ _id: z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>; ct: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>; o: z.ZodString; }, { o: z.ZodLiteral<"d">; k: z.ZodRecord<z.ZodString, z.ZodUnknown>; b: z.ZodRecord<z.ZodString, z.ZodUnknown>; }>, "strip", z.ZodTypeAny, { _id: ObjectId; ct: Timestamp; o: "d"; k: Record<string, unknown>; b: Record<string, unknown>; }, { _id: ObjectId; ct: Timestamp; o: "d"; k: Record<string, unknown>; b: Record<string, unknown>; }>; export declare const zodPCSNoopEvent: z.ZodObject<z.objectUtil.extendShape<{ _id: z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>; ct: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>; o: z.ZodString; }, { o: z.ZodLiteral<"n">; w: z.ZodDate; }>, "strip", z.ZodTypeAny, { _id: ObjectId; ct: Timestamp; o: "n"; w: Date; }, { _id: ObjectId; ct: Timestamp; o: "n"; w: Date; }>; export declare const zodPCSEvent: z.ZodDiscriminatedUnion<"o", [z.ZodObject<z.objectUtil.extendShape<{ _id: z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>; ct: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>; o: z.ZodString; }, { o: z.ZodLiteral<"d">; k: z.ZodRecord<z.ZodString, z.ZodUnknown>; b: z.ZodRecord<z.ZodString, z.ZodUnknown>; }>, "strip", z.ZodTypeAny, { _id: ObjectId; ct: Timestamp; o: "d"; k: Record<string, unknown>; b: Record<string, unknown>; }, { _id: ObjectId; ct: Timestamp; o: "d"; k: Record<string, unknown>; b: Record<string, unknown>; }>, z.ZodObject<z.objectUtil.extendShape<{ _id: z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>; ct: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>; o: z.ZodString; }, { o: z.ZodLiteral<"n">; w: z.ZodDate; }>, "strip", z.ZodTypeAny, { _id: ObjectId; ct: Timestamp; o: "n"; w: Date; }, { _id: ObjectId; ct: Timestamp; o: "n"; w: Date; }>, z.ZodObject<z.objectUtil.extendShape<{ _id: z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>; ct: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>; o: z.ZodString; }, { o: z.ZodLiteral<"i">; k: z.ZodRecord<z.ZodString, z.ZodUnknown>; a: z.ZodRecord<z.ZodString, z.ZodUnknown>; }>, "strip", z.ZodTypeAny, { _id: ObjectId; ct: Timestamp; o: "i"; k: Record<string, unknown>; a: Record<string, unknown>; }, { _id: ObjectId; ct: Timestamp; o: "i"; k: Record<string, unknown>; a: Record<string, unknown>; }>, z.ZodObject<z.objectUtil.extendShape<{ _id: z.ZodType<ObjectId, z.ZodTypeDef, ObjectId>; ct: z.ZodType<Timestamp, z.ZodTypeDef, Timestamp>; o: z.ZodString; }, { o: z.ZodLiteral<"u">; k: z.ZodRecord<z.ZodString, z.ZodUnknown>; b: z.ZodRecord<z.ZodString, z.ZodUnknown>; a: z.ZodRecord<z.ZodString, z.ZodUnknown>; u: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>; }>, "strip", z.ZodTypeAny, { _id: ObjectId; ct: Timestamp; o: "u"; k: Record<string, unknown>; a: Record<string, unknown>; b: Record<string, unknown>; u?: Record<string, unknown> | undefined; }, { _id: ObjectId; ct: Timestamp; o: "u"; k: Record<string, unknown>; a: Record<string, unknown>; b: Record<string, unknown>; u?: Record<string, unknown> | undefined; }>]>; export type PCSInsertionEvent = z.infer<typeof zodPCSInsertionEvent>; export type PCSUpdateEvent = z.infer<typeof zodPCSUpdateEvent>; export type PCSDeletionEvent = z.infer<typeof zodPCSDeletionEvent>; export type PCSNoopEvent = z.infer<typeof zodPCSNoopEvent>; export type PCSEvent = z.infer<typeof zodPCSEvent>;