@lucidcms/core
Version:
The core of the Lucid CMS. It's responsible for spinning up the API and serving the CMS.
1,461 lines (1,459 loc) • 165 kB
TypeScript
import z, { ZodType, z as z$1 } from "zod/v4";
import { Context, Hono } from "hono";
import * as kysely13 from "kysely";
import { ColumnDataType, ColumnDefinitionBuilder, ColumnType, Dialect, Generated, JSONColumnType, Kysely, KyselyPlugin, Migration, Transaction } from "kysely";
import { Readable } from "node:stream";
import { InlineConfig } from "vite";
import { jsonArrayFrom } from "kysely/helpers/sqlite";
import * as stream215 from "stream";
import { AddressInfo } from "node:net";
//#region src/constants/constants.d.ts
declare const _default: Readonly<{
locales: readonly ["en"];
swaggerRoutePrefix: "/documentation";
headers: {
csrf: string;
contentLocale: string;
};
cookies: {
csrf: string;
refreshToken: string;
accessToken: string;
};
scrypt: {
N: number;
r: number;
p: number;
dkLen: number;
};
seedDefaults: {
roles: {
name: string;
description: string;
permissions: Permission[];
}[];
};
fieldBuiler: {
maxRepeaterDepth: number;
};
collectionBuilder: {
isLocked: boolean;
useDrafts: boolean;
useRevisions: boolean;
useTranslations: boolean;
useAutoSave: boolean;
};
customFields: {
link: {
targets: string[];
};
};
query: {
page: number;
perPage: number;
};
locations: {
resetPassword: string;
};
errors: {
name: string;
message: string;
status: number;
code: undefined;
errors: undefined;
};
emailTemplates: {
resetPassword: string;
userInvite: string;
passwordResetSuccess: string;
emailChanged: string;
};
emailRenderedOutput: "email-templates.json";
rateLimit: {
max: number;
timeWindow: string;
};
directories: {
public: string;
temp: string;
};
vite: {
dist: string;
mount: string;
html: string;
rootSelector: string;
buildMetadata: string;
port: number;
};
brickTypes: {
readonly builder: "builder";
readonly fixed: "fixed";
};
db: {
prefix: string;
collectionKeysJoin: string;
generatedColumnPrefix: "_";
};
logScopes: {
readonly lucid: "lucid";
readonly migrations: "migrations";
readonly cron: "cron";
readonly config: "config";
readonly sync: "sync";
readonly query: "query";
readonly http: "http";
readonly validation: "validation";
};
retention: {
deletedCollections: number;
deletedLocales: number;
};
cronSchedule: "0 0 * * *";
csrfExpiration: 604800;
refreshTokenExpiration: 604800;
accessTokenExpiration: 300;
passwordResetTokenExpirationMinutes: 15;
userInviteTokenExpirationMinutes: 1440;
documentation: "https://lucidcms.io/getting-started";
lucidUi: "https://lucidui.io/";
mediaAwaitingSyncInterval: 3600000;
media: {
imagePresetQuality: number;
};
config: {
filename: string;
extensions: string[];
};
}>;
//#endregion
//#region src/types/shared.d.ts
type SupportedLocales = (typeof _default.locales)[number];
type LocaleValue = Partial<Record<SupportedLocales, string>> | string;
interface TranslationsObj {
localeCode: string;
value: string | null;
}
//# sourceMappingURL=shared.d.ts.map
//#endregion
//#region src/libs/builders/brick-builder/types.d.ts
interface BrickConfigProps {
details?: {
name?: LocaleValue;
summary?: LocaleValue;
};
preview?: {
image?: string;
};
}
interface BrickConfig {
key: string;
details: {
name: LocaleValue;
summary?: LocaleValue;
};
preview?: {
image?: string;
};
}
type BrickTypes = (typeof _default.brickTypes)[keyof typeof _default.brickTypes];
//# sourceMappingURL=types.d.ts.map
//#endregion
//#region src/libs/db/adapter.d.ts
declare abstract class DatabaseAdapter {
db: Kysely<LucidDB> | undefined;
adapter: string;
constructor(config: {
adapter: string;
dialect: Dialect;
plugins?: Array<KyselyPlugin>;
});
abstract initialise(): Promise<void>;
/**
* Return your Kysely DB's adapters jsonArrayFrom helper that aggregates a subquery into a JSON array
*/
abstract get jsonArrayFrom(): typeof jsonArrayFrom;
/**
* Configure the features your DB supports, default values and fallback data types
*/
abstract get config(): DatabaseConfig;
/**
* Infers the database schema. Uses the transaction client if provided, otherwise falls back to the base client
*/
abstract inferSchema(tx?: KyselyDB): Promise<InferredTable[]>;
/**
* Handles formatting of certain values based on the columns data type. This is used specifically for default values
*/
abstract formatDefaultValue(type: ColumnDataType, value: unknown): unknown;
/**
* Handles formatting of certain values based on the columns data type
* - booleans are returned as either a boolean or 1/0 depending on adapter support
* - json is stringified
*/
formatInsertValue<T>(type: ColumnDataType, value: unknown): T;
/**
* A helper for returning supported column data types
*/
getDataType(type: keyof DatabaseConfig["dataTypes"], ...args: unknown[]): ColumnDataType;
/**
* A helper for extending a column definition based on auto increment support
*/
primaryKeyColumnBuilder(col: ColumnDefinitionBuilder): ColumnDefinitionBuilder;
/**
* A helper for feature support
*/
supports(key: keyof DatabaseConfig["support"]): boolean;
/**
* A helper for accessing the config default values
*/
getDefault<T extends keyof DatabaseConfig["defaults"], K extends keyof DatabaseConfig["defaults"][T] | undefined = undefined>(type: T, key?: K): K extends keyof DatabaseConfig["defaults"][T] ? DatabaseConfig["defaults"][T][K] : DatabaseConfig["defaults"][T];
/**
* Runs all migrations that have not been ran yet. This doesnt include the generated migrations for collections
* @todo expose migrations so they can be extended?
*/
migrateToLatest(): Promise<void>;
/**
* Checks if there are any pending migrations that need to be executed
*/
needsMigration(db: KyselyDB): Promise<boolean>;
/**
* Returns the database client instance
*/
get client(): Kysely<LucidDB>;
/**
* Returns the migrations for the database
*/
get migrations(): {
"00000001-locales": kysely13.Migration;
"00000002-translations": kysely13.Migration;
"00000003-options": kysely13.Migration;
"00000004-users-and-permissions": kysely13.Migration;
"00000005-emails": kysely13.Migration;
"00000006-media": kysely13.Migration;
"00000007-collections": kysely13.Migration;
"00000008-integrations": kysely13.Migration;
};
}
//# sourceMappingURL=adapter.d.ts.map
//#endregion
//#region src/libs/collection/schema/types.d.ts
type TableType = "document" | "versions" | "document-fields" | "brick" | "repeater";
type CollectionSchemaColumn = {
name: string;
source: "core" | "field";
type: ColumnDataType;
nullable?: boolean;
default?: unknown;
foreignKey?: {
table: string;
column: string;
onDelete?: OnDelete;
onUpdate?: OnUpdate;
};
customField?: {
type: FieldTypes;
};
unique?: boolean;
primary?: boolean;
};
type CollectionSchemaTable<TableName = string> = {
name: TableName;
type: TableType;
key: {
collection: string;
brick?: string;
repeater?: Array<string>;
};
columns: Array<CollectionSchemaColumn>;
};
//#endregion
//#region src/libs/collection/migration/types.d.ts
type ModifyColumnOperation = {
type: "modify";
column: CollectionSchemaColumn;
changes: {
type?: {
from: ColumnDataType;
to: ColumnDataType;
};
nullable?: {
from: boolean | undefined;
to: boolean | undefined;
};
default?: {
from: unknown;
to: unknown;
};
foreignKey?: {
from: CollectionSchemaColumn["foreignKey"];
to: CollectionSchemaColumn["foreignKey"];
};
unique?: {
from: boolean | undefined;
to: boolean | undefined;
};
};
};
type AddColumnOperation = {
type: "add";
column: CollectionSchemaColumn;
};
type RemoveColumnOperation = {
type: "remove";
columnName: string;
};
type ColumnOperation = AddColumnOperation | ModifyColumnOperation | RemoveColumnOperation;
type TableMigration = {
type: "create" | "modify" | "remove";
priority: number;
tableName: string;
tableType?: TableType;
key?: {
collection: string;
brick?: string;
repeater?: Array<string>;
};
columnOperations: ColumnOperation[];
};
type MigrationPlan = {
collectionKey: string;
tables: TableMigration[];
};
//# sourceMappingURL=types.d.ts.map
//#endregion
//#region src/libs/db/types.d.ts
type KyselyDB = Kysely<LucidDB> | Transaction<LucidDB>;
type MigrationFn = (adapter: DatabaseAdapter) => Migration;
type Select<T> = { [P in keyof T]: T[P] extends {
__select__: infer S;
} ? S : T[P] };
type Insert<T> = { [P in keyof T]: T[P] extends {
__insert__: infer S;
} ? S : T[P] };
type Update<T> = { [P in keyof T]: T[P] extends {
__update__: infer S;
} ? S : T[P] };
type DefaultValueType<T> = T extends object ? keyof T extends never ? T : { [K in keyof T]: T[K] } : T;
type DocumentVersionType = "draft" | "published" | "revision";
type OnDelete = "cascade" | "set null" | "restrict" | "no action";
type OnUpdate = "cascade" | "set null" | "no action" | "restrict";
type DatabaseConfig = {
support: {
/**
* Whether the database supports the ALTER COLUMN statement.
*/
alterColumn: boolean;
/**
* Whether multiple columns can be altered in a single ALTER TABLE statement.
* Some databases require separate statements for each column modification.
*/
multipleAlterTables: boolean;
/**
* Set to true if the database supports boolean column data types.
* If you're database doesnt, booleans are stored as integers as either 1 or 0.
*/
boolean: boolean;
/**
* Determines if a primary key colum needs auto increment.
*/
autoIncrement: boolean;
};
/**
* Maps column data types to their database-specific implementations.
* Each adapter maps these standard types to what their database supports:
*
* Examples:
* - 'primary' maps to 'serial' in PostgreSQL, 'integer' in SQLite (with autoincrement)
* - 'boolean' maps to 'boolean' in PostgreSQL, 'integer' in SQLite
* - 'json' maps to 'jsonb' in PostgreSQL, 'json' in SQLite
*/
dataTypes: {
primary: ColumnDataType;
integer: ColumnDataType;
boolean: ColumnDataType;
json: ColumnDataType;
text: ColumnDataType;
timestamp: ColumnDataType;
char: ((length: number) => ColumnDataType) | ColumnDataType;
varchar: ((length?: number) => ColumnDataType) | ColumnDataType;
};
/**
* Maps column default values to their database-specific implementations.
* Each adapter maps these values to what their database supports:
*
* Examples:
* - 'timestamp.now' maps to 'NOW()' in PostgreSQL and 'CURRENT_TIMESTAMP' in SQLite
* - 'boolean.true' maps to 'true' in PostgreSQL and '1' in SQLite
*
* Remember that the values used here should reflect the column dataTypes as well as database support.
*/
defaults: {
timestamp: {
now: string;
};
boolean: {
true: true | 1;
false: false | 0;
};
};
/**
* The operator used for fuzzy text matching.
*/
fuzzOperator: "like" | "ilike" | "%";
};
interface InferredColumn {
name: string;
type: ColumnDataType;
nullable: boolean;
default: unknown | null;
unique?: boolean;
primary?: boolean;
foreignKey?: {
table: string;
column: string;
onDelete?: OnDelete;
onUpdate?: OnUpdate;
};
}
interface InferredTable {
name: string;
columns: InferredColumn[];
}
type TimestampMutateable = ColumnType<string | Date | null, string | undefined, string | null>;
type TimestampImmutable = ColumnType<string | Date, string | undefined, never>;
/** Should only be used for DB column insert/response values. Everything else should be using booleans and can be converted for response/insert with boolean helpers */
type BooleanInt = 0 | 1 | boolean;
interface LucidLocales {
code: string;
created_at: TimestampImmutable;
updated_at: TimestampMutateable;
is_deleted: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
is_deleted_at: TimestampMutateable;
}
interface LucidTranslationKeys {
id: Generated<number>;
created_at: TimestampImmutable;
}
interface LucidTranslations {
id: Generated<number>;
translation_key_id: number;
locale_code: string;
value: string | null;
}
interface LucidOptions {
name: OptionName;
value_int: number | null;
value_text: string | null;
value_bool: BooleanInt | null;
}
interface LucidUsers {
id: Generated<number>;
super_admin: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
email: string;
username: string;
first_name: string | null;
last_name: string | null;
password: ColumnType<string, string | undefined, string>;
secret: ColumnType<string, string, string>;
triggered_password_reset: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
is_deleted: BooleanInt | null;
is_deleted_at: TimestampMutateable;
deleted_by: number | null;
created_at: TimestampImmutable;
updated_at: TimestampMutateable;
}
interface LucidRoles {
id: Generated<number>;
name: string;
description: string | null;
created_at: TimestampImmutable;
updated_at: TimestampMutateable;
}
interface LucidRolePermissions {
id: Generated<number>;
role_id: number;
permission: string;
created_at: TimestampImmutable;
updated_at: TimestampMutateable;
}
interface LucidUserRoles {
id: Generated<number>;
user_id: number | null;
role_id: number | null;
created_at: TimestampImmutable;
updated_at: TimestampMutateable;
}
interface LucidUserTokens {
id: Generated<number>;
user_id: number | null;
token_type: "password_reset" | "refresh";
token: string;
created_at: TimestampImmutable;
expiry_date: TimestampMutateable;
}
interface LucidEmails {
id: Generated<number>;
email_hash: string;
from_address: string;
from_name: string;
to_address: string;
subject: string;
cc: string | null;
bcc: string | null;
delivery_status: "pending" | "delivered" | "failed";
template: string;
data: JSONColumnType<Record<string, unknown>, Record<string, unknown> | null, Record<string, unknown> | null>;
strategy_identifier: string;
strategy_data: JSONColumnType<Record<string, unknown>, Record<string, unknown> | null, Record<string, unknown> | null>;
type: "internal" | "external";
sent_count: number;
error_count: number;
last_error_message: string | null;
last_attempt_at: TimestampMutateable;
last_success_at: TimestampMutateable;
created_at: TimestampImmutable;
}
interface LucidMedia {
id: Generated<number>;
key: string;
e_tag: string | null;
public: BooleanInt;
type: string;
mime_type: string;
file_extension: string;
file_size: number;
width: number | null;
height: number | null;
blur_hash: string | null;
average_colour: string | null;
is_dark: BooleanInt | null;
is_light: BooleanInt | null;
custom_meta: string | null;
title_translation_key_id: number | null;
alt_translation_key_id: number | null;
created_at: TimestampImmutable;
updated_at: TimestampMutateable;
}
interface LucidMediaAwaitingSync {
key: string;
timestamp: TimestampImmutable;
}
interface HeadlessProcessedImages {
key: string;
media_key: string | null;
file_size: number;
}
interface LucidCollections {
key: string;
is_deleted: ColumnType<BooleanInt, BooleanInt | undefined, BooleanInt>;
is_deleted_at: TimestampMutateable;
created_at: TimestampImmutable;
}
interface LucidCollectionMigrations {
id: Generated<number>;
collection_key: string;
migration_plans: JSONColumnType<MigrationPlan, MigrationPlan, MigrationPlan>;
created_at: TimestampImmutable;
}
interface LucidClientIntegrations {
id: Generated<number>;
name: string;
description: string | null;
enabled: BooleanInt;
key: string;
api_key: string;
secret: string;
created_at: TimestampImmutable;
updated_at: TimestampMutateable;
}
type LucidDocumentTableName = `lucid_document__${string}`;
interface LucidDocumentTable {
id: Generated<number>;
collection_key: string;
is_deleted: BooleanInt;
is_deleted_at: TimestampMutateable;
deleted_by: number;
created_by: number;
created_at: TimestampImmutable;
updated_by: number;
updated_at: TimestampMutateable;
}
type LucidVersionTableName = `lucid_document__${string}__versions`;
interface LucidVersionTable {
id: Generated<number>;
collection_key: string;
document_id: number;
type: DocumentVersionType;
promoted_from: number | null;
created_by: number | null;
updated_by: number | null;
created_at: TimestampImmutable;
updated_at: TimestampMutateable;
}
type LucidBrickTableName = `lucid_document__${string}__fields` | `lucid_document__${string}__${string}` | `lucid_document__${string}__${string}__${string}`;
type CustomFieldColumnName = string;
interface LucidBricksTable {
id: Generated<number>;
collection_key: string;
document_id: number;
document_version_id: number;
locale: string;
position: number;
is_open: BooleanInt;
brick_type?: BrickTypes;
brick_instance_id?: string;
brick_id_ref?: number;
parent_id?: number | null;
parent_id_ref?: number | null;
brick_id?: number;
[key: CustomFieldColumnName]: unknown;
}
interface LucidDB {
lucid_locales: LucidLocales;
lucid_translation_keys: LucidTranslationKeys;
lucid_translations: LucidTranslations;
lucid_options: LucidOptions;
lucid_users: LucidUsers;
lucid_roles: LucidRoles;
lucid_role_permissions: LucidRolePermissions;
lucid_user_roles: LucidUserRoles;
lucid_user_tokens: LucidUserTokens;
lucid_emails: LucidEmails;
lucid_media: LucidMedia;
lucid_media_awaiting_sync: LucidMediaAwaitingSync;
lucid_processed_images: HeadlessProcessedImages;
lucid_client_integrations: LucidClientIntegrations;
lucid_collections: LucidCollections;
lucid_collection_migrations: LucidCollectionMigrations;
[key: LucidDocumentTableName]: LucidDocumentTable;
[key: LucidVersionTableName]: LucidVersionTable;
[key: LucidBrickTableName]: LucidBricksTable;
}
//#endregion
//#region src/libs/builders/brick-builder/index.d.ts
declare class BrickBuilder extends FieldBuilder {
key: string;
config: BrickConfig;
constructor(key: string, config?: BrickConfigProps);
addFields(Builder: BrickBuilder | FieldBuilder): this;
addTab(key: string, props?: CFProps<"tab">): this;
}
//#endregion
//#region src/libs/builders/collection-builder/schema.d.ts
declare const CollectionConfigSchema: z.ZodObject<{
key: z.ZodString;
mode: z.ZodEnum<{
single: "single";
multiple: "multiple";
}>;
details: z.ZodObject<{
name: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
en: "en";
}>, z.ZodString>]>;
singularName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
en: "en";
}>, z.ZodString>]>;
summary: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<{
en: "en";
}>, z.ZodString>]>>;
}, z.core.$strip>;
config: z.ZodOptional<z.ZodObject<{
isLocked: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
useTranslations: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
useDrafts: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
useRevisions: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
useAutoSave: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
}, z.core.$strip>>;
hooks: z.ZodOptional<z.ZodArray<z.ZodObject<{
event: z.ZodString;
handler: z.ZodUnknown;
}, z.core.$strip>>>;
bricks: z.ZodOptional<z.ZodObject<{
fixed: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
builder: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
}, z.core.$strip>>;
}, z.core.$strip>;
//#endregion
//#region src/schemas/collection-bricks.d.ts
declare const brickInputSchema: z.ZodObject<{
id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
ref: z.ZodString;
key: z.ZodString;
order: z.ZodNumber;
type: z.ZodUnion<readonly [z.ZodLiteral<"builder">, z.ZodLiteral<"fixed">]>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
}, z.core.$strip>;
type BrickInputSchema = z.infer<typeof brickInputSchema>;
//#endregion
//#region src/schemas/collection-fields.d.ts
declare const fieldInputSchema: z.ZodObject<{
key: z.ZodString;
type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>;
}, z.core.$strip>>>;
}, z.core.$strip>;
type FieldInputSchema = z.infer<typeof fieldInputSchema>;
//#endregion
//#region src/types/errors.d.ts
interface LucidErrorData {
type?: "validation" | "basic" | "forbidden" | "authorisation" | "cron" | "plugin";
name?: string;
message?: string;
status?: number;
code?: "csrf" | "login" | "authorisation" | "rate_limit" | "not_found";
zod?: z.ZodError;
errors?: ErrorResult;
}
type ErrorResultValue = ErrorResultObj | ErrorResultObj[] | FieldError[] | GroupError[] | BrickError[] | string | undefined;
interface ErrorResultObj {
code?: string;
message?: string;
children?: ErrorResultObj[];
[key: string]: ErrorResultValue;
}
type ErrorResult = Record<string, ErrorResultValue>;
interface FieldError {
key: string;
/** Set if the error occured on a translation value, or it uses the default locale code when the field supports translations but only a value is given. Otherwise this is undefined. */
localeCode: string | null;
message: string;
groupErrors?: Array<GroupError>;
}
interface GroupError {
ref: string;
order: number;
fields: FieldError[];
}
interface BrickError {
ref: string;
key: string;
order: number;
fields: FieldError[];
}
//# sourceMappingURL=errors.d.ts.map
//#endregion
//#region src/schemas/documents.d.ts
declare const controllerSchemas$5: {
createSingle: {
body: z.ZodObject<{
publish: z.ZodBoolean;
bricks: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
ref: z.ZodString;
key: z.ZodString;
order: z.ZodNumber;
type: z.ZodUnion<readonly [z.ZodLiteral<"builder">, z.ZodLiteral<"fixed">]>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
}, z.core.$strip>;
query: {
string: undefined;
formatted: undefined;
};
params: z.ZodObject<{
collectionKey: z.ZodString;
}, z.core.$strip>;
response: z.ZodObject<{
id: z.ZodNumber;
}, z.core.$strip>;
};
createVersion: {
body: z.ZodObject<{
publish: z.ZodBoolean;
bricks: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
ref: z.ZodString;
key: z.ZodString;
order: z.ZodNumber;
type: z.ZodUnion<readonly [z.ZodLiteral<"builder">, z.ZodLiteral<"fixed">]>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
}, z.core.$strip>;
query: {
string: undefined;
formatted: undefined;
};
params: z.ZodObject<{
id: z.ZodString;
collectionKey: z.ZodString;
}, z.core.$strip>;
response: z.ZodObject<{
id: z.ZodNumber;
}, z.core.$strip>;
};
updateVersion: {
body: z.ZodObject<{
bricks: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
ref: z.ZodString;
key: z.ZodString;
order: z.ZodNumber;
type: z.ZodUnion<readonly [z.ZodLiteral<"builder">, z.ZodLiteral<"fixed">]>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodUnion<readonly [z.ZodLiteral<"text">, z.ZodLiteral<"wysiwyg">, z.ZodLiteral<"media">, z.ZodLiteral<"number">, z.ZodLiteral<"checkbox">, z.ZodLiteral<"select">, z.ZodLiteral<"textarea">, z.ZodLiteral<"json">, z.ZodLiteral<"colour">, z.ZodLiteral<"datetime">, z.ZodLiteral<"link">, z.ZodLiteral<"repeater">, z.ZodLiteral<"user">, z.ZodLiteral<"document">]>;
translations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
groups: z.ZodOptional<z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodOptional<z.ZodNumber>;
open: z.ZodOptional<z.ZodBoolean>;
fields: z.ZodArray<z.ZodObject< /*elided*/any, z.core.$strip>>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
}, z.core.$strip>;
query: {
string: undefined;
formatted: undefined;
};
params: z.ZodObject<{
id: z.ZodString;
collectionKey: z.ZodString;
versionId: z.ZodString;
}, z.core.$strip>;
response: z.ZodObject<{
id: z.ZodNumber;
}, z.core.$strip>;
};
deleteMultiple: {
body: z.ZodObject<{
ids: z.ZodArray<z.ZodNumber>;
}, z.core.$strip>;
query: {
string: undefined;
formatted: undefined;
};
params: z.ZodObject<{
collectionKey: z.ZodString;
}, z.core.$strip>;
response: undefined;
};
deleteSingle: {
body: undefined;
query: {
string: undefined;
formatted: undefined;
};
params: z.ZodObject<{
collectionKey: z.ZodString;
id: z.ZodString;
}, z.core.$strip>;
response: undefined;
};
getMultipleRevisions: {
body: undefined;
query: {
string: z.ZodObject<{
"filter[createdBy]": z.ZodOptional<z.ZodString>;
sort: z.ZodOptional<z.ZodString>;
page: z.ZodOptional<z.ZodString>;
perPage: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
formatted: z.ZodObject<{
filter: z.ZodOptional<z.ZodObject<{
createdBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>, z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>]>>;
}, z.core.$strip>>;
sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodEnum<{
createdAt: "createdAt";
}>;
value: z.ZodEnum<{
asc: "asc";
desc: "desc";
}>;
}, z.core.$strip>>>;
page: z.ZodNumber;
perPage: z.ZodNumber;
}, z.core.$strip>;
};
params: z.ZodObject<{
collectionKey: z.ZodString;
id: z.ZodString;
}, z.core.$strip>;
response: z.ZodArray<z.ZodObject<{
id: z.ZodNumber;
versionType: z.ZodEnum<{
draft: "draft";
published: "published";
revision: "revision";
}>;
promotedFrom: z.ZodNullable<z.ZodNumber>;
createdAt: z.ZodNullable<z.ZodString>;
createdBy: z.ZodNullable<z.ZodNumber>;
document: z.ZodObject<{
id: z.ZodNullable<z.ZodNumber>;
collectionKey: z.ZodNullable<z.ZodString>;
createdBy: z.ZodNullable<z.ZodNumber>;
createdAt: z.ZodNullable<z.ZodString>;
updatedAt: z.ZodNullable<z.ZodString>;
updatedBy: z.ZodNullable<z.ZodNumber>;
}, z.core.$strip>;
bricks: z.ZodObject<{
fixed: z.ZodArray<z.ZodObject<{
brickKey: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>;
builder: z.ZodArray<z.ZodObject<{
brickKey: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>;
}, z.core.$strip>;
}, z.core.$strip>>;
};
getMultiple: {
query: {
string: z.ZodObject<{
"filter[id]": z.ZodOptional<z.ZodString>;
"filter[createdBy]": z.ZodOptional<z.ZodString>;
"filter[updatedBy]": z.ZodOptional<z.ZodString>;
"filter[createdAt]": z.ZodOptional<z.ZodString>;
"filter[updatedAt]": z.ZodOptional<z.ZodString>;
"filter[_customFieldKey]": z.ZodOptional<z.ZodString>;
"filter[brickKey._customFieldKey]": z.ZodOptional<z.ZodString>;
"filter[brickKey.repeaterKey._customFieldKey]": z.ZodOptional<z.ZodString>;
sort: z.ZodOptional<z.ZodString>;
page: z.ZodOptional<z.ZodString>;
perPage: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
formatted: z.ZodObject<{
filter: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>, z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>]>>, z.ZodObject<{
id: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>, z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>]>>;
createdBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>, z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>]>>;
updatedBy: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>, z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>]>>;
createdAt: z.ZodOptional<z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>>;
updatedAt: z.ZodOptional<z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>>;
}, z.core.$strip>]>>;
sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
key: z.ZodEnum<{
createdAt: "createdAt";
updatedAt: "updatedAt";
}>;
value: z.ZodEnum<{
asc: "asc";
desc: "desc";
}>;
}, z.core.$strip>>>;
page: z.ZodNumber;
perPage: z.ZodNumber;
}, z.core.$strip>;
};
params: z.ZodObject<{
collectionKey: z.ZodString;
status: z.ZodEnum<{
draft: "draft";
published: "published";
}>;
}, z.core.$strip>;
body: undefined;
response: z.ZodArray<z.ZodObject<{
id: z.ZodNumber;
collectionKey: z.ZodString;
status: z.ZodNullable<z.ZodEnum<{
draft: "draft";
published: "published";
revision: "revision";
}>>;
versionId: z.ZodNullable<z.ZodNumber>;
version: z.ZodObject<{
draft: z.ZodNullable<z.ZodObject<{
id: z.ZodNullable<z.ZodNumber>;
promotedFrom: z.ZodNullable<z.ZodNumber>;
createdAt: z.ZodNullable<z.ZodString>;
createdBy: z.ZodNullable<z.ZodNumber>;
}, z.core.$strip>>;
published: z.ZodNullable<z.ZodObject<{
id: z.ZodNullable<z.ZodNumber>;
promotedFrom: z.ZodNullable<z.ZodNumber>;
createdAt: z.ZodNullable<z.ZodString>;
createdBy: z.ZodNullable<z.ZodNumber>;
}, z.core.$strip>>;
}, z.core.$strip>;
createdBy: z.ZodNullable<z.ZodObject<{
id: z.ZodNumber;
email: z.ZodNullable<z.ZodEmail>;
firstName: z.ZodNullable<z.ZodString>;
lastName: z.ZodNullable<z.ZodString>;
username: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>;
updatedBy: z.ZodNullable<z.ZodObject<{
id: z.ZodNumber;
email: z.ZodNullable<z.ZodEmail>;
firstName: z.ZodNullable<z.ZodString>;
lastName: z.ZodNullable<z.ZodString>;
username: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>;
createdAt: z.ZodNullable<z.ZodString>;
updatedAt: z.ZodNullable<z.ZodString>;
bricks: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
id: z.ZodNumber;
key: z.ZodString;
ref: z.ZodString;
order: z.ZodNumber;
open: z.ZodBoolean;
type: z.ZodEnum<{
builder: "builder";
fixed: "fixed";
}>;
readonly fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodString;
groupRef: z.ZodOptional<z.ZodString>;
translations: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
meta: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>>;
readonly groups: z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodNumber;
open: z.ZodBoolean;
readonly fields: z.ZodArray<z.ZodAny>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>>>>;
fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodString;
groupRef: z.ZodOptional<z.ZodString>;
translations: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
meta: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>>;
readonly groups: z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodNumber;
open: z.ZodBoolean;
readonly fields: z.ZodArray<z.ZodAny>;
}, z.core.$strip>>;
}, z.core.$strip>>>>;
}, z.core.$strip>>;
};
getSingle: {
query: {
string: z.ZodObject<{
include: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
formatted: z.ZodObject<{
include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
bricks: "bricks";
}>>>;
}, z.core.$strip>;
};
params: z.ZodObject<{
id: z.ZodString;
statusOrId: z.ZodUnion<readonly [z.ZodLiteral<"published">, z.ZodLiteral<"draft">, z.ZodString]>;
collectionKey: z.ZodString;
}, z.core.$strip>;
body: undefined;
response: z.ZodObject<{
id: z.ZodNumber;
collectionKey: z.ZodString;
status: z.ZodNullable<z.ZodEnum<{
draft: "draft";
published: "published";
revision: "revision";
}>>;
versionId: z.ZodNullable<z.ZodNumber>;
version: z.ZodObject<{
draft: z.ZodNullable<z.ZodObject<{
id: z.ZodNullable<z.ZodNumber>;
promotedFrom: z.ZodNullable<z.ZodNumber>;
createdAt: z.ZodNullable<z.ZodString>;
createdBy: z.ZodNullable<z.ZodNumber>;
}, z.core.$strip>>;
published: z.ZodNullable<z.ZodObject<{
id: z.ZodNullable<z.ZodNumber>;
promotedFrom: z.ZodNullable<z.ZodNumber>;
createdAt: z.ZodNullable<z.ZodString>;
createdBy: z.ZodNullable<z.ZodNumber>;
}, z.core.$strip>>;
}, z.core.$strip>;
createdBy: z.ZodNullable<z.ZodObject<{
id: z.ZodNumber;
email: z.ZodNullable<z.ZodEmail>;
firstName: z.ZodNullable<z.ZodString>;
lastName: z.ZodNullable<z.ZodString>;
username: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>;
updatedBy: z.ZodNullable<z.ZodObject<{
id: z.ZodNumber;
email: z.ZodNullable<z.ZodEmail>;
firstName: z.ZodNullable<z.ZodString>;
lastName: z.ZodNullable<z.ZodString>;
username: z.ZodNullable<z.ZodString>;
}, z.core.$strip>>;
createdAt: z.ZodNullable<z.ZodString>;
updatedAt: z.ZodNullable<z.ZodString>;
bricks: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
id: z.ZodNumber;
key: z.ZodString;
ref: z.ZodString;
order: z.ZodNumber;
open: z.ZodBoolean;
type: z.ZodEnum<{
builder: "builder";
fixed: "fixed";
}>;
readonly fields: z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodString;
groupRef: z.ZodOptional<z.ZodString>;
translations: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
meta: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>>;
readonly groups: z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodNumber;
open: z.ZodBoolean;
readonly fields: z.ZodArray<z.ZodAny>;
}, z.core.$strip>>;
}, z.core.$strip>>;
}, z.core.$strip>>>>;
fields: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
key: z.ZodString;
type: z.ZodString;
groupRef: z.ZodOptional<z.ZodString>;
translations: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodAny>>;
value: z.ZodOptional<z.ZodAny>;
meta: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodAny, z.ZodAny>, z.ZodAny]>>;
readonly groups: z.ZodArray<z.ZodObject<{
ref: z.ZodString;
order: z.ZodNumber;
open: z.ZodBoolean;
readonly fields: z.ZodArray<z.ZodAny>;
}, z.core.$strip>>;
}, z.core.$strip>>>>;
}, z.core.$strip>;
};
promoteVersion: {
body: z.ZodObject<{
versionType: z.ZodEnum<{
draft: "draft";
published: "published";
}>;
}, z.core.$strip>;
query: {
string: undefined;
formatted: undefined;
};
params: z.ZodObject<{
collectionKey: z.ZodString;
id: z.ZodString;
versionId: z.ZodString;
}, z.core.$strip>;
response: undefined;
};
restoreRevision: {
body: undefined;
query: {
string: undefined;
formatted: undefined;
};
params: z.ZodObject<{
collectionKey: z.ZodString;
id: z.ZodString;
versionId: z.ZodString;
}, z.core.$strip>;
response: undefined;
};
client: {
getSingle: {
query: {
string: z.ZodObject<{
"filter[id]": z.ZodOptional<z.ZodString>;
"filter[createdBy]": z.ZodOptional<z.ZodString>;
"filter[updatedBy]": z.ZodOptional<z.ZodString>;
"filter[createdAt]": z.ZodOptional<z.ZodString>;
"filter[updatedAt]": z.ZodOptional<z.ZodString>;
"filter[_customFieldKey]": z.ZodOptional<z.ZodString>;
"filter[brickKey._customFieldKey]": z.ZodOptional<z.ZodString>;
"filter[brickKey.repeaterKey._customFieldKey]": z.ZodOptional<z.ZodString>;
include: z.ZodOptional<z.ZodString>;
page: z.ZodOptional<z.ZodString>;
perPage: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
formatted: z.ZodObject<{
filter: z.ZodOptional<z.ZodUnion<readonly [z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>, z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodNumber, z.ZodArray<z.ZodNumber>]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";
}>>;
}, z.core.$strip>]>>, z.ZodObject<{
id: z.ZodOptional<z.ZodObject<{
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
operator: z.ZodOptional<z.ZodEnum<{
in: "in";
"=": "=";
"%": "%";
like: "like";
ilike: "ilike";
"not in": "not in";
"<>": "<>";
"is not": "is not";
is: "is";
"!=": "!=";