import * as z from 'zod'; import { type SatelliteEnv } from '../schemas/satellite.env'; import { JUNO_FUNCTION_TYPE } from './constants'; import { type CustomFunctionWithArgs, type CustomFunctionWithArgsAndResult, type CustomFunctionWithoutArgsAndResult, type CustomFunctionWithResult } from './schemas/function'; /** * @see Update */ export declare const UpdateSchema: z.ZodUnion; args: z.ZodCustom, z.ZodObject>; result: z.ZodCustom, z.ZodObject>; handler: z.ZodCustom, z.ZodUnion]>>, z.core.$InferInnerFunctionType, z.ZodUnion]>>>; guard: z.ZodOptional, z.core.$InferInnerFunctionType>>; hidden: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"__juno_function_update">; args: z.ZodCustom, z.ZodObject>; handler: z.ZodCustom, z.ZodUnion]>>, z.core.$InferInnerFunctionType, z.ZodUnion]>>>; guard: z.ZodOptional, z.core.$InferInnerFunctionType>>; hidden: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"__juno_function_update">; result: z.ZodCustom, z.ZodObject>; handler: z.ZodCustom, z.ZodUnion]>>, z.core.$InferInnerFunctionType, z.ZodUnion]>>>; guard: z.ZodOptional, z.core.$InferInnerFunctionType>>; hidden: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"__juno_function_update">; handler: z.ZodCustom, z.ZodUnion]>>, z.core.$InferInnerFunctionType, z.ZodUnion]>>>; guard: z.ZodOptional, z.core.$InferInnerFunctionType>>; hidden: z.ZodOptional; }, z.core.$strict>]>; /** * The input shape for defining an update serverless function. * Does not include `type`, which is injected by `defineUpdate`. */ export type Update = Omit, 'type'> | Omit, 'type'> | Omit, 'type'> | Omit; /** * A update function definition with `type` injected by `defineUpdate`. * Queries are read-only functions that do not modify state. */ export type UpdateDefinition = Update & { type: typeof JUNO_FUNCTION_TYPE.UPDATE; }; export declare const UpdateFnSchema: (updateSchema: T) => z.ZodFunction], null>, T>; /** * A factory function that receives the satellite environment and returns an update definition. */ export type UpdateFn = (env: SatelliteEnv) => Update; export declare const UpdateFnOrObjectSchema: (updateSchema: T) => z.ZodUnion], null>, T>, z.core.$InferInnerFunctionType], null>, T>>]>; /** * A update definition or a factory function that returns one. */ export type UpdateFnOrObject = Update | UpdateFn; export declare function defineUpdate(update: Update): UpdateDefinition; export declare function defineUpdate(update: UpdateFn): (env: SatelliteEnv) => UpdateDefinition; export declare function defineUpdate(update: UpdateFnOrObject): UpdateDefinition | ((env: SatelliteEnv) => UpdateDefinition);