UNPKG

@linode/validation

Version:

Yup validation schemas for use with the Linode APIv4

102 lines 3.3 kB
export declare const createDatabaseSchema: import("yup").ObjectSchema<{ label: string; engine: string; region: string; type: string; cluster_size: number; }, import("yup").AnyObject, { label: undefined; engine: undefined; region: undefined; type: undefined; cluster_size: undefined; }, "">; export declare const getDynamicDatabaseSchema: (isVPCSelected: boolean) => import("yup").ObjectSchema<{ label: string; engine: string; region: string; type: string; cluster_size: number; }, import("yup").AnyObject, { label: undefined; engine: undefined; region: undefined; type: undefined; cluster_size: undefined; }, "">; export declare const updateMaintenanceSchema: import("yup").ObjectSchema<{ frequency: "weekly" | "monthly" | undefined; hour_of_day: number | undefined; day_of_week: number | undefined; week_of_month: number | null | undefined; }, import("yup").AnyObject, { frequency: undefined; hour_of_day: undefined; day_of_week: undefined; week_of_month: undefined; }, "">; export declare const updateDatabaseSchema: import("yup").ObjectSchema<{ label: import("yup").Maybe<string | undefined>; allow_list: import("yup").Maybe<(string | undefined)[] | undefined>; updates: { frequency?: string | undefined; hour_of_day?: number | undefined; day_of_week?: number | undefined; week_of_month?: number | null | undefined; duration?: number | undefined; } | null | undefined; type: import("yup").Maybe<string | undefined>; }, import("yup").AnyObject, { label: undefined; allow_list: ""; updates: { frequency: undefined; duration: undefined; hour_of_day: undefined; day_of_week: undefined; week_of_month: undefined; }; type: undefined; }, "">; export declare const updatePrivateNetworkSchema: import("yup").ObjectSchema<{ private_network: { vpc_id: number; subnet_id: number; public_access: boolean; }; }, import("yup").AnyObject, { private_network: { vpc_id: undefined; subnet_id: undefined; public_access: false; }; }, "">; /** * Main function that creates a Yup validation schema dynamically based on API configurations. */ export declare const createDynamicAdvancedConfigSchema: (allConfigurations: any[]) => import("yup").ObjectSchema<{}, import("yup").AnyObject, {}, "">; export declare const createDatabaseConnectionPoolSchema: import("yup").ObjectSchema<{ database: string; mode: NonNullable<"transaction" | "session" | "statement" | undefined>; label: string; size: number; username: string; }, import("yup").AnyObject, { database: undefined; mode: undefined; label: undefined; size: undefined; username: undefined; }, "">; export declare const updateDatabaseConnectionPoolSchema: import("yup").ObjectSchema<{ database: string | undefined; mode: "transaction" | "session" | "statement" | undefined; size: number | undefined; username: string | null | undefined; }, import("yup").AnyObject, { database: undefined; mode: undefined; size: undefined; username: undefined; }, "">; //# sourceMappingURL=databases.schema.d.ts.map