actor-kit
Version:
Actor Kit is a library for running state machines in Cloudflare Workers, leveraging XState for robust state management. It provides a framework for managing the logic, lifecycle, persistence, synchronization, and access control of actors in a distributed
312 lines • 7.63 kB
TypeScript
import { z } from "zod";
export declare const BotManagementSchema: z.ZodObject<{
corporateProxy: z.ZodBoolean;
verifiedBot: z.ZodBoolean;
jsDetection: z.ZodObject<{
passed: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
passed: boolean;
}, {
passed: boolean;
}>;
staticResource: z.ZodBoolean;
detectionIds: z.ZodRecord<z.ZodString, z.ZodAny>;
score: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
corporateProxy: boolean;
verifiedBot: boolean;
jsDetection: {
passed: boolean;
};
staticResource: boolean;
detectionIds: Record<string, any>;
score: number;
}, {
corporateProxy: boolean;
verifiedBot: boolean;
jsDetection: {
passed: boolean;
};
staticResource: boolean;
detectionIds: Record<string, any>;
score: number;
}>;
export declare const EnvironmentSchema: z.ZodObject<{
ACTOR_KIT_SECRET: z.ZodString;
ACTOR_KIT_HOST: z.ZodString;
}, "strip", z.ZodTypeAny, {
ACTOR_KIT_SECRET: string;
ACTOR_KIT_HOST: string;
}, {
ACTOR_KIT_SECRET: string;
ACTOR_KIT_HOST: string;
}>;
export declare const RequestInfoSchema: z.ZodObject<{
longitude: z.ZodString;
latitude: z.ZodString;
continent: z.ZodString;
country: z.ZodString;
city: z.ZodString;
timezone: z.ZodString;
postalCode: z.ZodString;
region: z.ZodString;
regionCode: z.ZodString;
metroCode: z.ZodString;
botManagement: z.ZodObject<{
corporateProxy: z.ZodBoolean;
verifiedBot: z.ZodBoolean;
jsDetection: z.ZodObject<{
passed: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
passed: boolean;
}, {
passed: boolean;
}>;
staticResource: z.ZodBoolean;
detectionIds: z.ZodRecord<z.ZodString, z.ZodAny>;
score: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
corporateProxy: boolean;
verifiedBot: boolean;
jsDetection: {
passed: boolean;
};
staticResource: boolean;
detectionIds: Record<string, any>;
score: number;
}, {
corporateProxy: boolean;
verifiedBot: boolean;
jsDetection: {
passed: boolean;
};
staticResource: boolean;
detectionIds: Record<string, any>;
score: number;
}>;
}, "strip", z.ZodTypeAny, {
longitude: string;
latitude: string;
continent: string;
country: string;
city: string;
timezone: string;
postalCode: string;
region: string;
regionCode: string;
metroCode: string;
botManagement: {
corporateProxy: boolean;
verifiedBot: boolean;
jsDetection: {
passed: boolean;
};
staticResource: boolean;
detectionIds: Record<string, any>;
score: number;
};
}, {
longitude: string;
latitude: string;
continent: string;
country: string;
city: string;
timezone: string;
postalCode: string;
region: string;
regionCode: string;
metroCode: string;
botManagement: {
corporateProxy: boolean;
verifiedBot: boolean;
jsDetection: {
passed: boolean;
};
staticResource: boolean;
detectionIds: Record<string, any>;
score: number;
};
}>;
export declare const CallerSchema: z.ZodObject<{
id: z.ZodString;
type: z.ZodEnum<["client", "system", "service"]>;
}, "strip", z.ZodTypeAny, {
type: "client" | "system" | "service";
id: string;
}, {
type: "client" | "system" | "service";
id: string;
}>;
export declare const AnyEventSchema: z.ZodObject<{
type: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: string;
}, {
type: string;
}>;
export declare const SystemEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
type: z.ZodLiteral<"INITIALIZE">;
caller: z.ZodObject<{
type: z.ZodLiteral<"system">;
id: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "system";
id: string;
}, {
type: "system";
id: string;
}>;
}, "strip", z.ZodTypeAny, {
type: "INITIALIZE";
caller: {
type: "system";
id: string;
};
}, {
type: "INITIALIZE";
caller: {
type: "system";
id: string;
};
}>, z.ZodObject<{
type: z.ZodLiteral<"CONNECT">;
caller: z.ZodObject<{
type: z.ZodLiteral<"system">;
id: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "system";
id: string;
}, {
type: "system";
id: string;
}>;
connectingCaller: z.ZodObject<{
id: z.ZodString;
type: z.ZodEnum<["client", "system", "service"]>;
}, "strip", z.ZodTypeAny, {
type: "client" | "system" | "service";
id: string;
}, {
type: "client" | "system" | "service";
id: string;
}>;
}, "strip", z.ZodTypeAny, {
type: "CONNECT";
caller: {
type: "system";
id: string;
};
connectingCaller: {
type: "client" | "system" | "service";
id: string;
};
}, {
type: "CONNECT";
caller: {
type: "system";
id: string;
};
connectingCaller: {
type: "client" | "system" | "service";
id: string;
};
}>, z.ZodObject<{
type: z.ZodLiteral<"DISCONNECT">;
caller: z.ZodObject<{
type: z.ZodLiteral<"system">;
id: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "system";
id: string;
}, {
type: "system";
id: string;
}>;
disconnectingCaller: z.ZodObject<{
id: z.ZodString;
type: z.ZodEnum<["client", "system", "service"]>;
}, "strip", z.ZodTypeAny, {
type: "client" | "system" | "service";
id: string;
}, {
type: "client" | "system" | "service";
id: string;
}>;
}, "strip", z.ZodTypeAny, {
type: "DISCONNECT";
caller: {
type: "system";
id: string;
};
disconnectingCaller: {
type: "client" | "system" | "service";
id: string;
};
}, {
type: "DISCONNECT";
caller: {
type: "system";
id: string;
};
disconnectingCaller: {
type: "client" | "system" | "service";
id: string;
};
}>, z.ZodObject<{
type: z.ZodLiteral<"RESUME">;
caller: z.ZodObject<{
type: z.ZodLiteral<"system">;
id: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "system";
id: string;
}, {
type: "system";
id: string;
}>;
}, "strip", z.ZodTypeAny, {
type: "RESUME";
caller: {
type: "system";
id: string;
};
}, {
type: "RESUME";
caller: {
type: "system";
id: string;
};
}>, z.ZodObject<{
type: z.ZodLiteral<"MIGRATE">;
caller: z.ZodObject<{
type: z.ZodLiteral<"system">;
id: z.ZodString;
}, "strip", z.ZodTypeAny, {
type: "system";
id: string;
}, {
type: "system";
id: string;
}>;
operations: z.ZodArray<z.ZodAny, "many">;
}, "strip", z.ZodTypeAny, {
type: "MIGRATE";
caller: {
type: "system";
id: string;
};
operations: any[];
}, {
type: "MIGRATE";
caller: {
type: "system";
id: string;
};
operations: any[];
}>]>;
export declare const CallerIdTypeSchema: z.ZodEnum<["client", "service", "system"]>;
export declare const CallerStringSchema: z.ZodEffects<z.ZodString, {
type: "client" | "system" | "service";
id: string;
}, string>;
//# sourceMappingURL=schemas.d.ts.map