@elek-io/core 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -10
- package/dist/browser/index.browser.d.ts +5881 -5883
- package/dist/browser/index.browser.js +322 -319
- package/dist/browser/index.browser.js.map +1 -1
- package/dist/node/index.node.d.ts +5881 -5883
- package/dist/node/index.node.js +339 -336
- package/dist/node/index.node.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/schema/assetSchema.ts","../../src/schema/baseSchema.ts","../../src/schema/fileSchema.ts","../../src/schema/collectionSchema.ts","../../src/schema/entrySchema.ts","../../src/schema/valueSchema.ts","../../src/schema/coreSchema.ts","../../src/schema/gitSchema.ts","../../src/schema/gitTagSchema.ts","../../src/schema/projectSchema.ts","../../src/schema/serviceSchema.ts","../../src/schema/userSchema.ts","../../src/util/shared.ts"],"sourcesContent":["import z from 'zod';\nimport {\n objectTypeSchema,\n supportedAssetExtensionSchema,\n supportedAssetMimeTypeSchema,\n uuidSchema,\n} from './baseSchema.js';\nimport { baseFileWithLanguageSchema } from './fileSchema.js';\n\nexport const assetFileSchema = baseFileWithLanguageSchema.extend({\n objectType: z.literal(objectTypeSchema.Enum.asset).readonly(),\n name: z.string(),\n description: z.string(),\n extension: supportedAssetExtensionSchema.readonly(),\n mimeType: supportedAssetMimeTypeSchema.readonly(),\n /**\n * Total size in bytes\n */\n size: z.number().readonly(),\n});\nexport type AssetFile = z.infer<typeof assetFileSchema>;\n\nexport const assetSchema = assetFileSchema.extend({\n /**\n * Absolute path on this filesystem\n */\n absolutePath: z.string().readonly(),\n});\nexport type Asset = z.infer<typeof assetSchema>;\n\nexport const assetExportSchema = assetSchema.extend({});\nexport type AssetExport = z.infer<typeof assetExportSchema>;\n\nexport const createAssetSchema = assetFileSchema\n .pick({\n name: true,\n description: true,\n language: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n /**\n * Path of the file to add as a new Asset\n */\n filePath: z.string().readonly(),\n });\nexport type CreateAssetProps = z.infer<typeof createAssetSchema>;\n\nexport const readAssetSchema = assetFileSchema\n .pick({\n id: true,\n language: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n });\nexport type ReadAssetProps = z.infer<typeof readAssetSchema>;\n\nexport const updateAssetSchema = assetFileSchema\n .pick({\n id: true,\n name: true,\n description: true,\n language: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n /**\n * Path of the new file to update the Asset with\n */\n newFilePath: z.string().readonly().optional(),\n });\nexport type UpdateAssetProps = z.infer<typeof updateAssetSchema>;\n\nexport const deleteAssetSchema = assetFileSchema\n .pick({\n id: true,\n language: true,\n extension: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n });\nexport type DeleteAssetProps = z.infer<typeof deleteAssetSchema>;\n\nexport const countAssetsSchema = z.object({ projectId: uuidSchema.readonly() });\nexport type CountAssetsProps = z.infer<typeof countAssetsSchema>;\n","import z from 'zod';\n\nexport const environmentSchema = z.enum(['production', 'development', 'test']);\nexport type Environment = z.infer<typeof environmentSchema>;\n\n/**\n * All currently supported, BCP 47 compliant language tags\n *\n * The support depends on the tools and libraries we use.\n * We can't support a given language, if there is no support\n * for it from used third parties. Currently, to check if a langauge\n * tag can be added to this list, it needs to be supported by:\n * - DeepL translation API\n *\n * @see https://www.deepl.com/docs-api/other-functions/listing-supported-languages/\n */\nexport const supportedLanguageSchema = z.enum([\n /**\n * Bulgarian\n */\n 'bg', //\n 'cs', // Czech\n 'da', // Danish\n 'de', // German\n 'el', // Greek\n 'en', // (US) English\n 'es', // Spanish\n 'et', // Estonian\n 'fi', // Finnish\n 'fr', // French\n 'hu', // Hungarian\n 'it', // Italian\n 'ja', // Japanese\n 'lt', // Lithuanian\n 'lv', // Latvian\n 'nl', // Dutch\n 'pl', // Polish\n 'pt', // Portuguese\n 'ro', // Romanian\n 'ru', // Russian\n 'sk', // Slovak\n 'sl', // Slovenian\n 'sv', // Swedish\n 'zh', // (Simplified) Chinese\n]);\nexport type SupportedLanguage = z.infer<typeof supportedLanguageSchema>;\n\nexport const supportedIconSchema = z.enum(['home', 'plus', 'foobar']);\nexport type SupportedIcon = z.infer<typeof supportedIconSchema>;\n\nexport const supportedAssetMimeTypeSchema = z.enum([\n 'image/avif',\n 'image/gif',\n 'image/jpeg',\n 'image/png',\n 'image/svg+xml',\n 'image/webp',\n 'application/pdf',\n 'application/zip',\n 'video/mp4',\n 'video/webm',\n 'audio/webm',\n 'audio/flac',\n]);\nexport type SupportedAssetMimeType = z.infer<\n typeof supportedAssetMimeTypeSchema\n>;\n\n/**\n * Files we currently support for Assets\n *\n * Detection of binary-based files is done by \"file-type\" dependency\n * @see https://github.com/sindresorhus/file-type?tab=readme-ov-file#supported-file-types\n */\nexport const supportedAssetExtensionSchema = z.enum([\n 'avif',\n 'gif',\n 'jpg',\n 'jpeg',\n 'png',\n 'svg',\n 'webp',\n 'pdf',\n 'zip',\n 'mp4',\n 'webm',\n 'flac',\n 'json',\n]);\nexport type SupportedAssetExtension = z.infer<\n typeof supportedAssetExtensionSchema\n>;\n\nexport const supportedAssetTypeSchema = z.object({\n extension: supportedAssetExtensionSchema,\n mimeType: supportedAssetMimeTypeSchema,\n});\nexport type SupportedAssetType = z.infer<typeof supportedAssetTypeSchema>;\n\nexport const objectTypeSchema = z.enum([\n 'project',\n 'asset',\n 'collection',\n 'entry',\n 'value',\n 'sharedValue',\n]);\nexport type ObjectType = z.infer<typeof objectTypeSchema>;\n\nexport const versionSchema = z.string();\n// .refine((version) => {\n// if (Semver.valid(version) !== null) {\n// return true;\n// }\n// return false;\n// }, 'String must follow the Semantic Versioning format (https://semver.org/)');\nexport type Version = z.infer<typeof versionSchema>;\n\nexport const uuidSchema = z.string().uuid('shared.invalidUuid');\nexport type Uuid = z.infer<typeof uuidSchema>;\n\n/**\n * A record that can be used to translate a string value into all supported languages\n */\nexport const translatableStringSchema = z.record(\n supportedLanguageSchema,\n z.string().trim().min(1, 'shared.translatableStringRequired')\n);\nexport type TranslatableString = z.infer<typeof translatableStringSchema>;\n\n/**\n * A record that can be used to translate a number value into all supported languages\n */\nexport const translatableNumberSchema = z.record(\n supportedLanguageSchema,\n z.number({ required_error: 'shared.translatableNumberRequired' })\n);\nexport type TranslatableNumber = z.infer<typeof translatableNumberSchema>;\n\n/**\n * A record that can be used to translate a boolean value into all supported languages\n */\nexport const translatableBooleanSchema = z.record(\n supportedLanguageSchema,\n z.boolean({ required_error: 'shared.translatableBooleanRequired' })\n);\nexport type TranslatableBoolean = z.infer<typeof translatableBooleanSchema>;\n\nexport function translatableArrayOf<T extends z.ZodTypeAny>(schema: T) {\n return z.record(supportedLanguageSchema, z.array(schema));\n}\n","import z from 'zod';\nimport {\n supportedAssetExtensionSchema,\n supportedLanguageSchema,\n uuidSchema,\n} from './baseSchema.js';\n\n/**\n * A basic file structure every elek.io file on disk has to follow\n */\nexport const baseFileSchema = z.object({\n /**\n * The ID of the file\n *\n * The ID is part of the files name.\n */\n id: uuidSchema.readonly(),\n /**\n * The datetime of the file being created is set by the service of \"objectType\" while creating it\n */\n created: z.string().datetime().readonly(),\n /**\n * The datetime of the file being updated is set by the service of \"objectType\" while updating it\n */\n updated: z.string().datetime().nullable(),\n});\nexport type BaseFile = z.infer<typeof baseFileSchema>;\n\nexport const baseFileWithLanguageSchema = baseFileSchema.extend({\n /**\n * The language of the file\n *\n * The language is part of the files name and together with it's ID the only unique identifier.\n * That's why the language cannot be changed after creating the file.\n *\n * @todo Maybe remove the above restriction by implementing logic to handle changing the files language inside all services\n */\n language: supportedLanguageSchema.readonly(),\n});\nexport type BaseFileWithLanguage = z.infer<typeof baseFileWithLanguageSchema>;\n\nexport const fileReferenceSchema = z.object({\n id: uuidSchema,\n language: supportedLanguageSchema.optional(),\n extension: supportedAssetExtensionSchema.optional(),\n});\nexport type FileReference = z.infer<typeof fileReferenceSchema>;\n","import z from 'zod';\nimport {\n objectTypeSchema,\n supportedIconSchema,\n translatableStringSchema,\n uuidSchema,\n} from './baseSchema.js';\nimport { entryExportSchema } from './entrySchema.js';\nimport { baseFileSchema } from './fileSchema.js';\nimport { valueDefinitionSchema } from './valueSchema.js';\n\nexport const collectionFileSchema = baseFileSchema.extend({\n objectType: z.literal(objectTypeSchema.Enum.collection).readonly(),\n name: z.object({\n singular: translatableStringSchema,\n plural: translatableStringSchema,\n }),\n slug: z.object({\n singular: z.string(),\n plural: z.string(),\n }),\n description: translatableStringSchema,\n icon: supportedIconSchema,\n valueDefinitions: z.array(valueDefinitionSchema),\n});\nexport type CollectionFile = z.infer<typeof collectionFileSchema>;\n\nexport const collectionSchema = collectionFileSchema.extend({});\nexport type Collection = z.infer<typeof collectionSchema>;\n\nexport const collectionExportSchema = collectionSchema.extend({\n entries: z.array(entryExportSchema),\n});\nexport type CollectionExport = z.infer<typeof collectionExportSchema>;\n\nexport const createCollectionSchema = collectionSchema\n .omit({\n id: true,\n objectType: true,\n created: true,\n updated: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n });\nexport type CreateCollectionProps = z.infer<typeof createCollectionSchema>;\n\nexport const readCollectionSchema = z.object({\n id: uuidSchema.readonly(),\n projectId: uuidSchema.readonly(),\n});\nexport type ReadCollectionProps = z.infer<typeof readCollectionSchema>;\n\nexport const updateCollectionSchema = collectionFileSchema\n .pick({\n id: true,\n name: true,\n slug: true,\n description: true,\n icon: true,\n valueDefinitions: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n });\nexport type UpdateCollectionProps = z.infer<typeof updateCollectionSchema>;\n\nexport const deleteCollectionSchema = readCollectionSchema.extend({});\nexport type DeleteCollectionProps = z.infer<typeof deleteCollectionSchema>;\n\nexport const countCollectionsSchema = z.object({\n projectId: uuidSchema.readonly(),\n});\nexport type CountCollectionsProps = z.infer<typeof countCollectionsSchema>;\n","import z from 'zod';\nimport type { Asset } from './assetSchema.js';\nimport {\n objectTypeSchema,\n uuidSchema,\n type SupportedLanguage,\n} from './baseSchema.js';\nimport { baseFileSchema } from './fileSchema.js';\nimport {\n resolvedValueSchema,\n valueSchema,\n type DirectValue,\n type ReferencedValue,\n} from './valueSchema.js';\n\nexport const entryFileSchema = baseFileSchema.extend({\n objectType: z.literal(objectTypeSchema.Enum.entry).readonly(),\n values: z.array(valueSchema),\n});\nexport type EntryFile = z.infer<typeof entryFileSchema>;\n\n// @see https://github.com/colinhacks/zod?tab=readme-ov-file#recursive-types\nexport type Entry = z.infer<typeof entryFileSchema> & {\n values: (\n | DirectValue\n | (ReferencedValue & {\n content: Partial<Record<SupportedLanguage, (Asset | Entry)[]>>;\n })\n )[];\n};\nexport const entrySchema = entryFileSchema.extend({\n values: z.array(z.lazy(() => resolvedValueSchema)),\n}) satisfies z.ZodType<Entry>;\n\nexport const entryExportSchema = entrySchema.extend({});\nexport type EntryExport = z.infer<typeof entryExportSchema>;\n\nexport const createEntrySchema = entryFileSchema\n .omit({\n id: true,\n objectType: true,\n created: true,\n updated: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n collectionId: uuidSchema.readonly(),\n values: z.array(valueSchema),\n });\nexport type CreateEntryProps = z.infer<typeof createEntrySchema>;\n\nexport const readEntrySchema = z.object({\n id: uuidSchema.readonly(),\n projectId: uuidSchema.readonly(),\n collectionId: uuidSchema.readonly(),\n});\nexport type ReadEntryProps = z.infer<typeof readEntrySchema>;\n\nexport const updateEntrySchema = entrySchema\n .omit({\n objectType: true,\n created: true,\n updated: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n collectionId: uuidSchema.readonly(),\n });\nexport type UpdateEntryProps = z.infer<typeof updateEntrySchema>;\n\nexport const deleteEntrySchema = readEntrySchema.extend({});\nexport type DeleteEntryProps = z.infer<typeof deleteEntrySchema>;\n\nexport const countEntriesSchema = z.object({\n projectId: uuidSchema.readonly(),\n collectionId: uuidSchema.readonly(),\n});\nexport type CountEntriesProps = z.infer<typeof countEntriesSchema>;\n","import z from 'zod';\nimport { assetSchema, type Asset } from './assetSchema.js';\nimport {\n objectTypeSchema,\n supportedAssetMimeTypeSchema,\n supportedLanguageSchema,\n translatableArrayOf,\n translatableBooleanSchema,\n translatableNumberSchema,\n translatableStringSchema,\n uuidSchema,\n} from './baseSchema.js';\nimport { entrySchema, type Entry } from './entrySchema.js';\n\nexport const ValueTypeSchema = z.enum([\n 'string',\n 'number',\n 'boolean',\n 'reference',\n]);\nexport type ValueType = z.infer<typeof ValueTypeSchema>;\n\nexport const ValueInputTypeSchema = z.enum([\n // String\n 'text',\n 'textarea',\n 'email',\n // 'password', @todo maybe if there is a usecase\n 'url',\n 'ip',\n 'date',\n 'time',\n 'datetime',\n 'telephone',\n // Number\n 'number',\n 'range',\n // Boolean\n 'toggle',\n // Reference\n 'asset',\n 'entry',\n // 'sharedValue', // @todo\n]);\nexport type ValueInputType = z.infer<typeof ValueInputTypeSchema>;\n\nexport const ValueInputWidthSchema = z.enum(['12', '6', '4', '3']);\n\nexport const ValueDefinitionBaseSchema = z.object({\n id: uuidSchema.readonly(),\n label: translatableStringSchema,\n description: translatableStringSchema,\n isRequired: z.boolean(),\n isDisabled: z.boolean(),\n isUnique: z.boolean(),\n inputWidth: ValueInputWidthSchema,\n});\nexport type ValueDefinitionBase = z.infer<typeof ValueDefinitionBaseSchema>;\n\n/**\n * String based Values\n */\n\nexport const StringValueDefinitionBaseSchema = ValueDefinitionBaseSchema.extend(\n {\n valueType: z.literal(ValueTypeSchema.Enum.string),\n defaultValue: z.string().nullable(),\n }\n);\n\nexport const textValueDefinitionSchema = StringValueDefinitionBaseSchema.extend(\n {\n inputType: z.literal(ValueInputTypeSchema.Enum.text),\n min: z.number().nullable(),\n max: z.number().nullable(),\n }\n);\nexport type TextValueDefinition = z.infer<typeof textValueDefinitionSchema>;\n\nexport const textareaValueDefinitionSchema =\n StringValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.textarea),\n min: z.number().nullable(),\n max: z.number().nullable(),\n });\nexport type TextareaValueDefinition = z.infer<\n typeof textareaValueDefinitionSchema\n>;\n\nexport const emailValueDefinitionSchema =\n StringValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.email),\n defaultValue: z.string().email().nullable(),\n });\nexport type EmailValueDefinition = z.infer<typeof emailValueDefinitionSchema>;\n\n// @todo why should we support password Values? Client saves it in clear text anyways\n// export const passwordFieldDefinitionSchema =\n// StringFieldDefinitionBaseSchema.extend({\n// inputType: z.literal(FieldInputTypeSchema.Enum.password),\n// });\n\nexport const urlValueDefinitionSchema = StringValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.url),\n defaultValue: z.string().url().nullable(),\n});\nexport type UrlValueDefinition = z.infer<typeof urlValueDefinitionSchema>;\n\nexport const ipValueDefinitionSchema = StringValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.ip),\n defaultValue: z.string().ip().nullable(),\n});\nexport type IpValueDefinition = z.infer<typeof ipValueDefinitionSchema>;\n\nexport const dateValueDefinitionSchema = StringValueDefinitionBaseSchema.extend(\n {\n inputType: z.literal(ValueInputTypeSchema.Enum.date),\n defaultValue: z.string().date().nullable(),\n }\n);\nexport type DateValueDefinition = z.infer<typeof dateValueDefinitionSchema>;\n\nexport const timeValueDefinitionSchema = StringValueDefinitionBaseSchema.extend(\n {\n inputType: z.literal(ValueInputTypeSchema.Enum.time),\n defaultValue: z.string().time().nullable(),\n }\n);\nexport type TimeValueDefinition = z.infer<typeof timeValueDefinitionSchema>;\n\nexport const datetimeValueDefinitionSchema =\n StringValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.datetime),\n defaultValue: z.string().datetime().nullable(),\n });\nexport type DatetimeValueDefinition = z.infer<\n typeof datetimeValueDefinitionSchema\n>;\n\nexport const telephoneValueDefinitionSchema =\n StringValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.telephone),\n // defaultValue: z.string().e164(), @todo when zod v4 releases @see https://github.com/colinhacks/zod/pull/3476\n });\nexport type TelephoneValueDefinition = z.infer<\n typeof telephoneValueDefinitionSchema\n>;\n\nexport const stringValueDefinitionSchema = z.union([\n textValueDefinitionSchema,\n textareaValueDefinitionSchema,\n emailValueDefinitionSchema,\n urlValueDefinitionSchema,\n ipValueDefinitionSchema,\n dateValueDefinitionSchema,\n timeValueDefinitionSchema,\n datetimeValueDefinitionSchema,\n telephoneValueDefinitionSchema,\n]);\nexport type StringValueDefinition = z.infer<typeof stringValueDefinitionSchema>;\n\n/**\n * Number based Values\n */\n\nexport const NumberValueDefinitionBaseSchema = ValueDefinitionBaseSchema.extend(\n {\n valueType: z.literal(ValueTypeSchema.Enum.number),\n min: z.number().nullable(),\n max: z.number().nullable(),\n isUnique: z.literal(false),\n defaultValue: z.number().nullable(),\n }\n);\n\nexport const numberValueDefinitionSchema =\n NumberValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.number),\n });\nexport type NumberValueDefinition = z.infer<typeof numberValueDefinitionSchema>;\n\nexport const rangeValueDefinitionSchema =\n NumberValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.range),\n // Overwrite from nullable to required because a range needs min, max and default to work and is required, since it always returns a number\n isRequired: z.literal(true),\n min: z.number(),\n max: z.number(),\n defaultValue: z.number(),\n });\nexport type RangeValueDefinition = z.infer<typeof rangeValueDefinitionSchema>;\n\n/**\n * Boolean based Values\n */\n\nexport const BooleanValueDefinitionBaseSchema =\n ValueDefinitionBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.boolean),\n // Overwrite from nullable to required because a boolean needs a default to work and is required, since it always is either true or false\n isRequired: z.literal(true),\n defaultValue: z.boolean(),\n isUnique: z.literal(false),\n });\n\nexport const toggleValueDefinitionSchema =\n BooleanValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.toggle),\n });\nexport type ToggleValueDefinition = z.infer<typeof toggleValueDefinitionSchema>;\n\n/**\n * Reference based Values\n */\n\nexport const ReferenceValueDefinitionBaseSchema =\n ValueDefinitionBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.reference),\n });\n\nexport const assetValueDefinitionSchema =\n ReferenceValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.asset),\n allowedMimeTypes: z.array(supportedAssetMimeTypeSchema).min(1),\n min: z.number().nullable(),\n max: z.number().nullable(),\n });\nexport type AssetValueDefinition = z.infer<typeof assetValueDefinitionSchema>;\n\nexport const entryValueDefinitionSchema =\n ReferenceValueDefinitionBaseSchema.extend({\n inputType: z.literal(ValueInputTypeSchema.Enum.entry),\n ofCollections: z.array(uuidSchema),\n min: z.number().nullable(),\n max: z.number().nullable(),\n });\nexport type EntryValueDefinition = z.infer<typeof entryValueDefinitionSchema>;\n\n// export const sharedValueDefinitionSchema =\n// ReferenceValueDefinitionBaseSchema.extend({\n// inputType: z.literal(ValueInputTypeSchema.Enum.sharedValue),\n// // The shared Value can have any of the direct types\n// // but not any reference itself (a shared Value cannot have a reference to another shared Value / Asset or any other future reference)\n// sharedValueType: z.union([\n// z.literal(ValueTypeSchema.Enum.boolean),\n// z.literal(ValueTypeSchema.Enum.number),\n// z.literal(ValueTypeSchema.Enum.string),\n// ]),\n// });\n// export type SharedValueValueDefinition = z.infer<\n// typeof sharedValueDefinitionSchema\n// >;\n\n/**\n * A Value definition can be any of the listed definitions above\n */\n\nexport const valueDefinitionSchema = z.union([\n stringValueDefinitionSchema,\n numberValueDefinitionSchema,\n rangeValueDefinitionSchema,\n toggleValueDefinitionSchema,\n assetValueDefinitionSchema,\n entryValueDefinitionSchema,\n // sharedValueDefinitionSchema,\n]);\nexport type ValueDefinition = z.infer<typeof valueDefinitionSchema>;\n\nexport const valueContentReferenceBase = z.object({\n id: uuidSchema,\n});\n\nexport const valueContentReferenceWithLanguageBase =\n valueContentReferenceBase.extend({\n language: supportedLanguageSchema,\n });\n\nexport const valueContentReferenceToAssetSchema =\n valueContentReferenceWithLanguageBase.extend({\n objectType: z.literal(objectTypeSchema.Enum.asset),\n });\nexport type ValueContentReferenceToAsset = z.infer<\n typeof valueContentReferenceToAssetSchema\n>;\n\nexport const valueContentReferenceToCollectionSchema =\n valueContentReferenceBase.extend({\n objectType: z.literal(objectTypeSchema.Enum.collection),\n });\nexport type ValueContentReferenceToCollection = z.infer<\n typeof valueContentReferenceToCollectionSchema\n>;\n\nexport const valueContentReferenceToEntrySchema =\n valueContentReferenceBase.extend({\n objectType: z.literal(objectTypeSchema.Enum.entry),\n });\nexport type ValueContentReferenceToEntry = z.infer<\n typeof valueContentReferenceToEntrySchema\n>;\n\n// export const valueContentReferenceToSharedValueSchema = z.object({\n// referenceObjectType: z.literal(objectTypeSchema.Enum.sharedValue),\n// references: z.object({\n// id: uuidSchema,\n// language: supportedLanguageSchema,\n// }),\n// });\n// export type ValueContentReferenceToSharedValue = z.infer<\n// typeof valueContentReferenceToSharedValueSchema\n// >;\n\n// export const sharedValueFileSchema = baseFileWithLanguageSchema.extend({\n// objectType: z.literal(objectTypeSchema.Enum.sharedValue).readonly(),\n// valueType: ValueTypeSchema.exclude(['reference']).readonly(),\n// // valueType: ValueTypeSchema.readonly(), @todo do we allow shared Values to reference assets or others?\n// content: z.union([\n// z.string(),\n// z.number(),\n// z.boolean(),\n// z.string().optional(),\n// z.number().optional(),\n// z.boolean().optional(),\n// // valueContentReferenceToAssetSchema, @todo do we allow shared Values to reference assets or others?\n// // valueContentReferenceToSharedValueSchema,\n// ]),\n// });\n// export type SharedValueFile = z.infer<typeof sharedValueFileSchema>;\n\n// export const sharedValueSchema = sharedValueFileSchema.extend({});\n// export type SharedValue = z.infer<typeof sharedValueSchema>;\n\n// export const sharedValueExportSchema = sharedValueSchema.extend({});\n// export type SharedValueExport = z.infer<typeof sharedValueExportSchema>;\n\n// export const resolvedValueContentReferenceToSharedValueSchema =\n// valueContentReferenceToSharedValueSchema.extend({\n// references: z.object({\n// id: uuidSchema,\n// language: supportedLanguageSchema,\n// resolved: sharedValueSchema,\n// }),\n// });\n// export type ResolvedValueContentReferenceToSharedValue = z.infer<\n// typeof resolvedValueContentReferenceToSharedValueSchema\n// >;\n\nexport const valueContentReferenceSchema = z.union([\n valueContentReferenceToAssetSchema,\n valueContentReferenceToCollectionSchema,\n valueContentReferenceToEntrySchema,\n // valueContentReferenceToSharedValueSchema,\n]);\nexport type ValueContentReference = z.infer<typeof valueContentReferenceSchema>;\n\nexport const resolvedValueContentReferenceSchema: z.ZodUnion<\n [z.ZodType<Asset>, z.ZodType<Entry>]\n> = z.union([\n assetSchema,\n z.lazy(() => entrySchema), // Circular dependency / recursive type @see https://github.com/colinhacks/zod?tab=readme-ov-file#recursive-types\n // resolvedValueContentReferenceToSharedValueSchema,\n]);\nexport type ResolvedValueContentReference = z.infer<\n typeof resolvedValueContentReferenceSchema\n>;\n\nexport const directValueBaseSchema = z.object({\n objectType: z.literal(objectTypeSchema.Enum.value).readonly(),\n definitionId: uuidSchema.readonly(),\n});\n\nexport const directStringValueSchema = directValueBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.string).readonly(),\n content: translatableStringSchema,\n});\nexport type DirectStringValue = z.infer<typeof directStringValueSchema>;\n\nexport const directNumberValueSchema = directValueBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.number).readonly(),\n content: translatableNumberSchema,\n});\nexport type DirectNumberValue = z.infer<typeof directNumberValueSchema>;\n\nexport const directBooleanValueSchema = directValueBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.boolean).readonly(),\n content: translatableBooleanSchema,\n});\nexport type DirectBooleanValue = z.infer<typeof directBooleanValueSchema>;\n\nexport const directValueSchema = z.union([\n directStringValueSchema,\n directNumberValueSchema,\n directBooleanValueSchema,\n]);\nexport type DirectValue = z.infer<typeof directValueSchema>;\n\nexport const referencedValueSchema = z.object({\n objectType: z.literal(objectTypeSchema.Enum.value).readonly(),\n definitionId: uuidSchema.readonly(),\n valueType: z.literal(ValueTypeSchema.Enum.reference).readonly(),\n content: translatableArrayOf(valueContentReferenceSchema),\n});\nexport type ReferencedValue = z.infer<typeof referencedValueSchema>;\n\nexport const valueSchema = z.union([directValueSchema, referencedValueSchema]);\nexport type Value = z.infer<typeof valueSchema>;\n\nexport const resolvedReferencedValueSchema = referencedValueSchema.extend({\n content: translatableArrayOf(resolvedValueContentReferenceSchema),\n});\nexport type ResolvedReferencedValue = z.infer<\n typeof resolvedReferencedValueSchema\n>;\n\nexport const resolvedValueSchema = z.union([\n directValueSchema,\n resolvedReferencedValueSchema,\n]);\nexport type ResolvedValue = z.infer<typeof resolvedValueSchema>;\n\n/**\n * Dynamic zod schema generation\n */\n\n/**\n * Generates a zod schema to check a Values content, based on given ValueDefinition\n */\nexport function getValueContentSchemaFromDefinition(\n definition: ValueDefinition\n) {\n switch (definition.valueType) {\n case ValueTypeSchema.Enum.boolean:\n return getBooleanValueContentSchema();\n case ValueTypeSchema.Enum.number:\n return getNumberValueContentSchema(definition);\n case ValueTypeSchema.Enum.string:\n return getStringValueContentSchema(definition);\n case ValueTypeSchema.Enum.reference:\n return getReferenceValueContentSchema(definition);\n default:\n throw new Error(\n // @ts-expect-error\n `Error generating schema for unsupported ValueType \"${definition.valueType}\"`\n );\n }\n}\n\nfunction getBooleanValueContentSchema() {\n return z.boolean();\n}\n\nfunction getNumberValueContentSchema(\n definition: NumberValueDefinition | RangeValueDefinition\n) {\n let schema = z.number();\n\n if (definition.min) {\n schema = schema.min(definition.min);\n }\n if (definition.max) {\n schema = schema.max(definition.max);\n }\n\n if (definition.isRequired === false) {\n return schema.nullable();\n }\n\n return schema;\n}\n\nfunction getStringValueContentSchema(definition: StringValueDefinition) {\n let schema = z.string().trim(); // Additionally trim whitespace\n\n if ('min' in definition && definition.min) {\n schema = schema.min(definition.min);\n }\n if ('max' in definition && definition.max) {\n schema = schema.max(definition.max);\n }\n\n switch (definition.inputType) {\n case ValueInputTypeSchema.Enum.email:\n schema = schema.email();\n break;\n case ValueInputTypeSchema.Enum.url:\n schema = schema.url();\n break;\n case ValueInputTypeSchema.Enum.ip:\n schema = schema.ip();\n break;\n case ValueInputTypeSchema.Enum.date:\n schema = schema.date();\n break;\n case ValueInputTypeSchema.Enum.time:\n schema = schema.time();\n break;\n case ValueInputTypeSchema.Enum.datetime:\n schema = schema.datetime();\n break;\n case ValueInputTypeSchema.Enum.telephone:\n // @todo z.string().e164() when zod v4 releases @see https://github.com/colinhacks/zod/pull/3476\n break;\n }\n\n if (definition.isRequired === false) {\n return schema.nullable();\n }\n\n return schema.min(1, 'shared.stringValueRequired'); // @see https://github.com/colinhacks/zod/issues/2466\n}\n\nfunction getReferenceValueContentSchema(\n definition: AssetValueDefinition | EntryValueDefinition // | SharedValueValueDefinition\n) {\n let schema;\n\n switch (definition.inputType) {\n case ValueInputTypeSchema.Enum.asset:\n {\n schema = z.array(valueContentReferenceToAssetSchema);\n }\n break;\n case ValueInputTypeSchema.Enum.entry:\n {\n schema = z.array(valueContentReferenceToEntrySchema);\n }\n break;\n // case ValueInputTypeSchema.Enum.sharedValue: {\n // let schema = valueContentReferenceToSharedValueSchema.extend({}); // Deep copy to not overwrite the base schema\n\n // if (definition.isRequired) {\n // const requiredReferences = schema.shape.references.min(\n // 1,\n // 'shared.assetValueRequired'\n // );\n // schema = schema.extend({\n // references: requiredReferences,\n // });\n // }\n\n // return valueContentReferenceToSharedValueSchema;\n // }\n }\n\n if (definition.isRequired) {\n schema = schema.min(1, 'shared.referenceRequired');\n }\n\n if (definition.min) {\n schema = schema.min(definition.min);\n }\n\n if (definition.max) {\n schema = schema.max(definition.max);\n }\n\n return schema;\n}\n\n/**\n * ---\n */\n\n// export const createSharedValueSchema = sharedValueFileSchema\n// .pick({\n// valueType: true,\n// content: true,\n// language: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// });\n// export type CreateSharedValueProps = z.infer<typeof createSharedValueSchema>;\n\n// export const readSharedValueSchema = sharedValueFileSchema\n// .pick({\n// id: true,\n// language: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// });\n// export type ReadSharedValueProps = z.infer<typeof readSharedValueSchema>;\n\n// export const updateSharedValueSchema = sharedValueFileSchema\n// .pick({\n// id: true,\n// language: true,\n// content: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// });\n// export type UpdateSharedValueProps = z.infer<typeof updateSharedValueSchema>;\n\n// export const deleteSharedValueSchema = sharedValueFileSchema\n// .pick({\n// id: true,\n// language: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// });\n// export type DeleteSharedValueProps = z.infer<typeof deleteSharedValueSchema>;\n\n/**\n * @todo maybe we need to validate Values and shared Values\n */\n// export const validateValueSchema = sharedValueFileSchema\n// .pick({\n// id: true,\n// language: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// definition: valueDefinitionSchema.readonly(),\n// });\n// export type ValidateValueProps = z.infer<typeof validateValueSchema>;\n\n// export const countValuesSchema = z.object({ projectId: uuidSchema.readonly() });\n// export type CountValuesProps = z.infer<typeof countValuesSchema>;\n","import { z } from 'zod';\nimport { environmentSchema, versionSchema } from './baseSchema.js';\n\n/**\n * Options that can be passed to elek.io core\n */\nexport const elekIoCoreOptionsSchema = z.object({\n /**\n * The environment elek.io Core is currently running in\n */\n environment: environmentSchema,\n /**\n * The current version of elek.io Core\n */\n version: versionSchema,\n file: z.object({\n json: z.object({\n /**\n * If set, adds indentation with spaces (number) or escape character (string)\n * and line break characters to saved JSON files on disk, to make them easier to read.\n * Defaults to 2 spaces of indentation.\n */\n indentation: z.union([z.number(), z.string()]),\n }),\n }),\n});\nexport type ElekIoCoreOptions = z.infer<typeof elekIoCoreOptionsSchema>;\n\nexport const constructorElekIoCoreSchema = elekIoCoreOptionsSchema\n .omit({\n version: true,\n })\n .partial({\n environment: true,\n file: true,\n })\n .optional();\nexport type ConstructorElekIoCoreProps = z.infer<\n typeof constructorElekIoCoreSchema\n>;\n","import { z } from 'zod';\n\n/**\n * Path to the git repository\n */\nexport const gitRepositoryPathSchema = z.string();\n\n/**\n * Signature git uses to identify users\n */\nexport const gitSignatureSchema = z.object({\n name: z.string(),\n email: z.string(),\n});\nexport type GitSignature = z.infer<typeof gitSignatureSchema>;\n\nexport const gitCommitSchema = z.object({\n /**\n * SHA-1 hash of the commit\n */\n hash: z.string(),\n message: z.string(),\n author: gitSignatureSchema,\n datetime: z.string().datetime(),\n tag: z.string().nullable(),\n});\nexport type GitCommit = z.infer<typeof gitCommitSchema>;\n\n/**\n * Icons for usage in commit messages\n *\n * @see https://gitmoji.dev/\n */\nenum GitCommitIconNative {\n INIT = ':tada:',\n CREATE = ':heavy_plus_sign:',\n UPDATE = ':wrench:',\n DELETE = ':fire:',\n}\nexport const gitCommitIconSchema = z.nativeEnum(GitCommitIconNative);\nexport type GitCommitIcon = z.infer<typeof gitCommitIconSchema>;\n\nexport const gitInitOptionsSchema = z.object({\n /**\n * Use the specified name for the initial branch in the newly created repository. If not specified, fall back to the default name (currently master, but this is subject to change in the future; the name can be customized via the init.defaultBranch configuration variable).\n */\n initialBranch: z.string(),\n});\nexport type GitInitOptions = z.infer<typeof gitInitOptionsSchema>;\n\nexport const gitCloneOptionsSchema = z.object({\n /**\n * Create a shallow clone with a history truncated to the specified number of commits. Implies --single-branch unless --no-single-branch is given to fetch the histories near the tips of all branches. If you want to clone submodules shallowly, also pass --shallow-submodules.\n */\n depth: z.number(),\n /**\n * Clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary branch remote’s HEAD points at. Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning. If the HEAD at the remote did not point at any branch when --single-branch clone was made, no remote-tracking branch is created.\n */\n singleBranch: z.boolean(),\n /**\n * Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository’s HEAD, point to <name> branch instead. In a non-bare repository, this is the branch that will be checked out. --branch can also take tags and detaches the HEAD at that commit in the resulting repository.\n */\n branch: z.string(),\n});\nexport type GitCloneOptions = z.infer<typeof gitCloneOptionsSchema>;\n\nexport const gitSwitchOptionsSchema = z.object({\n /**\n * If true, creates a new local branch and then switches to it\n *\n * @see https://git-scm.com/docs/git-switch#Documentation/git-switch.txt---createltnew-branchgt\n */\n isNew: z.boolean().optional(),\n});\nexport type GitSwitchOptions = z.infer<typeof gitSwitchOptionsSchema>;\n\nexport const gitLogOptionsSchema = z.object({\n /**\n * Limit the result to given number of commits\n */\n limit: z.number().optional(),\n /**\n * Only list commits that are between given SHAs or tag names\n *\n * Note that the commits of from and to are not included in the result\n */\n between: z.object({\n /**\n * From the oldest commit\n */\n from: z.string(),\n /**\n * To the newest commit\n *\n * Defaults to the current HEAD\n */\n to: z.string().optional(),\n }),\n});\nexport type GitLogOptions = z.infer<typeof gitLogOptionsSchema>;\n","import { z } from 'zod';\nimport { uuidSchema } from './baseSchema.js';\nimport {\n gitCommitSchema,\n gitRepositoryPathSchema,\n gitSignatureSchema,\n} from './gitSchema.js';\n\nexport const gitTagSchema = z.object({\n id: uuidSchema,\n message: z.string(),\n author: gitSignatureSchema,\n datetime: z.string().datetime(),\n});\nexport type GitTag = z.infer<typeof gitTagSchema>;\n\nexport const createGitTagSchema = gitTagSchema\n .pick({\n message: true,\n })\n .extend({\n path: gitRepositoryPathSchema,\n hash: gitCommitSchema.shape.hash.optional(),\n });\nexport type CreateGitTagProps = z.infer<typeof createGitTagSchema>;\n\nexport const readGitTagSchema = z.object({\n path: gitRepositoryPathSchema,\n id: uuidSchema.readonly(),\n});\nexport type ReadGitTagProps = z.infer<typeof readGitTagSchema>;\n\nexport const deleteGitTagSchema = readGitTagSchema.extend({});\nexport type DeleteGitTagProps = z.infer<typeof deleteGitTagSchema>;\n\nexport const countGitTagsSchema = z.object({\n path: gitRepositoryPathSchema,\n});\nexport type CountGitTagsProps = z.infer<typeof countGitTagsSchema>;\n","import { z } from 'zod';\nimport { assetExportSchema } from './assetSchema.js';\nimport {\n objectTypeSchema,\n supportedLanguageSchema,\n uuidSchema,\n versionSchema,\n} from './baseSchema.js';\nimport { collectionExportSchema } from './collectionSchema.js';\nimport { baseFileSchema } from './fileSchema.js';\nimport { gitSwitchOptionsSchema } from './gitSchema.js';\n\nexport const projectStatusSchema = z.enum(['foo', 'bar', 'todo']);\nexport type ProjectStatus = z.infer<typeof projectStatusSchema>;\n\nexport const projectSettingsSchema = z.object({\n language: z.object({\n default: supportedLanguageSchema,\n supported: z.array(supportedLanguageSchema),\n }),\n});\nexport type ProjectSettings = z.infer<typeof projectSettingsSchema>;\n\nexport const projectFolderSchema = z.enum([\n 'assets',\n 'collections',\n 'shared-values',\n 'lfs',\n // 'logs',\n // 'public',\n // 'theme',\n]);\nexport type ProjectFolder = z.infer<typeof projectFolderSchema>;\n\nexport const projectFileSchema = baseFileSchema.extend({\n objectType: z.literal(objectTypeSchema.Enum.project).readonly(),\n coreVersion: versionSchema,\n name: z.string().trim().min(1, 'shared.projectNameRequired'),\n description: z.string().trim().min(1, 'shared.projectDescriptionRequired'),\n version: versionSchema,\n status: projectStatusSchema,\n settings: projectSettingsSchema,\n});\nexport type ProjectFile = z.infer<typeof projectFileSchema>;\n\nexport const projectSchema = projectFileSchema.extend({});\nexport type Project = z.infer<typeof projectSchema>;\n\nexport const projectExportSchema = projectSchema.extend({\n assets: z.array(assetExportSchema),\n collections: z.array(collectionExportSchema),\n});\nexport type ProjectExport = z.infer<typeof projectExportSchema>;\n\nexport const createProjectSchema = projectSchema\n .pick({\n name: true,\n description: true,\n settings: true,\n })\n .partial({\n description: true,\n settings: true,\n });\nexport type CreateProjectProps = z.infer<typeof createProjectSchema>;\n\nexport const readProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type ReadProjectProps = z.infer<typeof readProjectSchema>;\n\nexport const updateProjectSchema = projectSchema\n .pick({\n id: true,\n name: true,\n description: true,\n settings: true,\n })\n .partial({\n name: true,\n description: true,\n settings: true,\n });\nexport type UpdateProjectProps = z.infer<typeof updateProjectSchema>;\n\nexport const upgradeProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type UpgradeProjectProps = z.infer<typeof upgradeProjectSchema>;\n\nexport const deleteProjectSchema = readProjectSchema.extend({});\nexport type DeleteProjectProps = z.infer<typeof deleteProjectSchema>;\n\nexport const projectUpgradeSchema = z.object({\n /**\n * The Core version the Project will be upgraded to\n */\n to: versionSchema.readonly(),\n /**\n * Function that will be executed in the process of upgrading a Project\n */\n run: z.function().args(projectFileSchema).returns(z.promise(z.void())),\n});\nexport type ProjectUpgrade = z.infer<typeof projectUpgradeSchema>;\n\nexport const cloneProjectSchema = z.object({\n url: z.string(),\n});\nexport type CloneProjectProps = z.infer<typeof cloneProjectSchema>;\n\nexport const listBranchesProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type ListBranchesProjectProps = z.infer<\n typeof listBranchesProjectSchema\n>;\n\nexport const currentBranchProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type CurrentBranchProjectProps = z.infer<\n typeof currentBranchProjectSchema\n>;\n\nexport const switchBranchProjectSchema = z.object({\n id: uuidSchema.readonly(),\n branch: z.string(),\n options: gitSwitchOptionsSchema.optional(),\n});\nexport type SwitchBranchProjectProps = z.infer<\n typeof switchBranchProjectSchema\n>;\n\nexport const getRemoteOriginUrlProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type GetRemoteOriginUrlProjectProps = z.infer<\n typeof getRemoteOriginUrlProjectSchema\n>;\n\nexport const setRemoteOriginUrlProjectSchema = z.object({\n id: uuidSchema.readonly(),\n url: z.string(),\n});\nexport type SetRemoteOriginUrlProjectProps = z.infer<\n typeof setRemoteOriginUrlProjectSchema\n>;\n\nexport const getChangesProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type GetChangesProjectProps = z.infer<typeof getChangesProjectSchema>;\n\nexport const synchronizeProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type SynchronizeProjectProps = z.infer<typeof synchronizeProjectSchema>;\n\nexport const searchProjectSchema = z.object({\n id: uuidSchema.readonly(),\n query: z.string(),\n language: supportedLanguageSchema,\n type: z.array(objectTypeSchema).optional(),\n});\nexport type SearchProjectProps = z.infer<typeof searchProjectSchema>;\n","import { z } from 'zod';\nimport { uuidSchema } from './baseSchema.js';\nimport { gitRepositoryPathSchema } from './gitSchema.js';\n\nexport const serviceTypeSchema = z.enum([\n 'Git',\n 'GitTag',\n 'User',\n 'Project',\n 'Asset',\n 'JsonFile',\n 'Search',\n 'Collection',\n 'Entry',\n 'Value',\n]);\nexport type ServiceType = z.infer<typeof serviceTypeSchema>;\n\nexport interface PaginatedList<T> {\n total: number;\n limit: number;\n offset: number;\n list: T[];\n}\n\nexport interface PaginationOptions {\n limit: number;\n offset: number;\n}\n\n/**\n * Implements create, read, update and delete methods\n */\nexport interface CrudService<T> {\n create: (props: any) => Promise<T>;\n read: (props: any) => Promise<T>;\n update: (props: any) => Promise<T>;\n delete: (props: any) => Promise<void>;\n}\n\n/**\n * Implements list and count methods additionally\n * to create, read, update and delete\n */\nexport interface ExtendedCrudService<T> extends CrudService<T> {\n /**\n * Returns a list of this services objects\n */\n list: (...props: any) => Promise<PaginatedList<T>>;\n /**\n * Returns the total number of this services objects\n */\n count: (...props: any) => Promise<number>;\n}\n\nconst listSchema = z.object({\n projectId: uuidSchema,\n limit: z.number().optional(),\n offset: z.number().optional(),\n});\n\nexport const listCollectionsSchema = listSchema;\nexport type ListCollectionsProps = z.infer<typeof listCollectionsSchema>;\n\nexport const listEntriesSchema = listSchema.extend({\n collectionId: uuidSchema,\n});\nexport type ListEntriesProps = z.infer<typeof listEntriesSchema>;\n\nexport const listAssetsSchema = listSchema;\nexport type ListAssetsProps = z.infer<typeof listAssetsSchema>;\n\n// export const listSharedValuesSchema = listSchema(sharedValueSchema);\n// export type ListSharedValuesProps = z.infer<typeof listSharedValuesSchema>;\n\nexport const listProjectsSchema = listSchema.omit({\n projectId: true,\n});\nexport type ListProjectsProps = z.infer<typeof listProjectsSchema>;\n\nexport const listGitTagsSchema = z.object({\n path: gitRepositoryPathSchema,\n});\nexport type ListGitTagsProps = z.infer<typeof listGitTagsSchema>;\n","import z from 'zod';\nimport { supportedLanguageSchema, uuidSchema } from './baseSchema.js';\nimport { gitSignatureSchema } from './gitSchema.js';\n\nexport const UserTypeSchema = z.enum(['local', 'cloud']);\n\nexport const baseUserSchema = gitSignatureSchema.extend({\n userType: UserTypeSchema,\n language: supportedLanguageSchema,\n});\nexport type BaseUser = z.infer<typeof baseUserSchema>;\n\nexport const localUserSchema = baseUserSchema.extend({\n userType: z.literal(UserTypeSchema.Enum.local),\n});\nexport type LocalUser = z.infer<typeof localUserSchema>;\n\nexport const cloudUserSchema = baseUserSchema.extend({\n userType: z.literal(UserTypeSchema.Enum.cloud),\n id: uuidSchema,\n});\nexport type CloudUser = z.infer<typeof cloudUserSchema>;\n\nexport const userFileSchema = z.union([localUserSchema, cloudUserSchema]);\nexport type UserFile = z.infer<typeof userFileSchema>;\n\nexport const userSchema = userFileSchema;\nexport type User = z.infer<typeof userSchema>;\n\nexport const setUserSchema = userSchema;\nexport type SetUserProps = z.infer<typeof setUserSchema>;\n","import slugify from '@sindresorhus/slugify';\nimport { v4 as generateUuid } from 'uuid';\nimport { type Uuid } from '../schema/baseSchema.js';\n\n/**\n * Returns a new UUID\n */\nexport function uuid(): Uuid {\n return generateUuid();\n}\n\n/**\n * Returns a string representing date and time\n * in a simplified format based on ISO 8601.\n * The timezone is always UTC.\n *\n * - If value is not given, the current date and time is used\n * - If value is given, it's converted to above representation and UTC timezone\n *\n * @example 'YYYY-MM-DDTHH:mm:ss.sssZ'\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString\n * @see https://en.wikipedia.org/wiki/ISO_8601\n */\nexport function datetime(value?: number | string | Date) {\n if (!value) {\n return new Date().toISOString();\n }\n return new Date(value).toISOString();\n}\n\n/**\n * Returns the slug of given string\n */\nexport function slug(string: string): string {\n return slugify(string, {\n separator: '-',\n lowercase: true,\n decamelize: true,\n });\n}\n"],"mappings":";AAAA,OAAOA,QAAO;;;ACAd,OAAO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9B,CAAC;AAEM,IAAM,wBAAwB;AAG9B,IAAM,oBAAoB,WAAW,OAAO;AAAA,EACjD,cAAc;AAChB,CAAC;AAGM,IAAM,mBAAmB;AAMzB,IAAM,qBAAqB,WAAW,KAAK;AAAA,EAChD,WAAW;AACb,CAAC;AAGM,IAAM,oBAAoBA,IAAE,OAAO;AAAA,EACxC,MAAM;AACR,CAAC;;;AClFD,OAAOC,SAAO;AAIP,IAAM,iBAAiBC,IAAE,KAAK,CAAC,SAAS,OAAO,CAAC;AAEhD,IAAM,iBAAiB,mBAAmB,OAAO;AAAA,EACtD,UAAU;AAAA,EACV,UAAU;AACZ,CAAC;AAGM,IAAM,kBAAkB,eAAe,OAAO;AAAA,EACnD,UAAUA,IAAE,QAAQ,eAAe,KAAK,KAAK;AAC/C,CAAC;AAGM,IAAM,kBAAkB,eAAe,OAAO;AAAA,EACnD,UAAUA,IAAE,QAAQ,eAAe,KAAK,KAAK;AAAA,EAC7C,IAAI;AACN,CAAC;AAGM,IAAM,iBAAiBA,IAAE,MAAM,CAAC,iBAAiB,eAAe,CAAC;AAGjE,IAAM,aAAa;AAGnB,IAAM,gBAAgB;;;AC7B7B,OAAO,aAAa;AACpB,SAAS,MAAM,oBAAoB;AAM5B,SAAS,OAAa;AAC3B,SAAO,aAAa;AACtB;AAeO,SAAS,SAAS,OAAgC;AACvD,MAAI,CAAC,OAAO;AACV,YAAO,oBAAI,KAAK,GAAE,YAAY;AAAA,EAChC;AACA,SAAO,IAAI,KAAK,KAAK,EAAE,YAAY;AACrC;AAKO,SAAS,KAAK,QAAwB;AAC3C,SAAO,QAAQ,QAAQ;AAAA,IACrB,WAAW;AAAA,IACX,WAAW;AAAA,IACX,YAAY;AAAA,EACd,CAAC;AACH;","names":["z","z","z","z","z","z","z","z","z","z","z","z","z","GitCommitIconNative","z","z","z","z","z","z","z","z"]}
|
|
1
|
+
{"version":3,"sources":["../../src/schema/assetSchema.ts","../../src/schema/baseSchema.ts","../../src/schema/fileSchema.ts","../../src/schema/collectionSchema.ts","../../src/schema/entrySchema.ts","../../src/schema/valueSchema.ts","../../src/schema/fieldSchema.ts","../../src/schema/coreSchema.ts","../../src/schema/gitSchema.ts","../../src/schema/gitTagSchema.ts","../../src/schema/projectSchema.ts","../../src/schema/serviceSchema.ts","../../src/schema/userSchema.ts","../../src/util/shared.ts"],"sourcesContent":["import z from 'zod';\nimport {\n objectTypeSchema,\n supportedAssetExtensionSchema,\n supportedAssetMimeTypeSchema,\n uuidSchema,\n} from './baseSchema.js';\nimport { baseFileWithLanguageSchema } from './fileSchema.js';\n\nexport const assetFileSchema = baseFileWithLanguageSchema.extend({\n objectType: z.literal(objectTypeSchema.Enum.asset).readonly(),\n name: z.string(),\n description: z.string(),\n extension: supportedAssetExtensionSchema.readonly(),\n mimeType: supportedAssetMimeTypeSchema.readonly(),\n /**\n * Total size in bytes\n */\n size: z.number().readonly(),\n});\nexport type AssetFile = z.infer<typeof assetFileSchema>;\n\nexport const assetSchema = assetFileSchema.extend({\n /**\n * Absolute path on this filesystem\n */\n absolutePath: z.string().readonly(),\n});\nexport type Asset = z.infer<typeof assetSchema>;\n\nexport const assetExportSchema = assetSchema.extend({});\nexport type AssetExport = z.infer<typeof assetExportSchema>;\n\nexport const createAssetSchema = assetFileSchema\n .pick({\n name: true,\n description: true,\n language: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n /**\n * Path of the file to add as a new Asset\n */\n filePath: z.string().readonly(),\n });\nexport type CreateAssetProps = z.infer<typeof createAssetSchema>;\n\nexport const readAssetSchema = assetFileSchema\n .pick({\n id: true,\n language: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n });\nexport type ReadAssetProps = z.infer<typeof readAssetSchema>;\n\nexport const updateAssetSchema = assetFileSchema\n .pick({\n id: true,\n name: true,\n description: true,\n language: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n /**\n * Path of the new file to update the Asset with\n */\n newFilePath: z.string().readonly().optional(),\n });\nexport type UpdateAssetProps = z.infer<typeof updateAssetSchema>;\n\nexport const deleteAssetSchema = assetFileSchema\n .pick({\n id: true,\n language: true,\n extension: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n });\nexport type DeleteAssetProps = z.infer<typeof deleteAssetSchema>;\n\nexport const countAssetsSchema = z.object({ projectId: uuidSchema.readonly() });\nexport type CountAssetsProps = z.infer<typeof countAssetsSchema>;\n","import z from 'zod';\n\nexport const environmentSchema = z.enum(['production', 'development', 'test']);\nexport type Environment = z.infer<typeof environmentSchema>;\n\n/**\n * All currently supported, BCP 47 compliant language tags\n *\n * The support depends on the tools and libraries we use.\n * We can't support a given language, if there is no support\n * for it from used third parties. Currently, to check if a langauge\n * tag can be added to this list, it needs to be supported by:\n * - DeepL translation API\n *\n * @see https://www.deepl.com/docs-api/other-functions/listing-supported-languages/\n */\nexport const supportedLanguageSchema = z.enum([\n /**\n * Bulgarian\n */\n 'bg', //\n 'cs', // Czech\n 'da', // Danish\n 'de', // German\n 'el', // Greek\n 'en', // (US) English\n 'es', // Spanish\n 'et', // Estonian\n 'fi', // Finnish\n 'fr', // French\n 'hu', // Hungarian\n 'it', // Italian\n 'ja', // Japanese\n 'lt', // Lithuanian\n 'lv', // Latvian\n 'nl', // Dutch\n 'pl', // Polish\n 'pt', // Portuguese\n 'ro', // Romanian\n 'ru', // Russian\n 'sk', // Slovak\n 'sl', // Slovenian\n 'sv', // Swedish\n 'zh', // (Simplified) Chinese\n]);\nexport type SupportedLanguage = z.infer<typeof supportedLanguageSchema>;\n\nexport const supportedIconSchema = z.enum(['home', 'plus', 'foobar']);\nexport type SupportedIcon = z.infer<typeof supportedIconSchema>;\n\nexport const supportedAssetMimeTypeSchema = z.enum([\n 'image/avif',\n 'image/gif',\n 'image/jpeg',\n 'image/png',\n 'image/svg+xml',\n 'image/webp',\n 'application/pdf',\n 'application/zip',\n 'video/mp4',\n 'video/webm',\n 'audio/webm',\n 'audio/flac',\n]);\nexport type SupportedAssetMimeType = z.infer<\n typeof supportedAssetMimeTypeSchema\n>;\n\n/**\n * Files we currently support for Assets\n *\n * Detection of binary-based files is done by \"file-type\" dependency\n * @see https://github.com/sindresorhus/file-type?tab=readme-ov-file#supported-file-types\n */\nexport const supportedAssetExtensionSchema = z.enum([\n 'avif',\n 'gif',\n 'jpg',\n 'jpeg',\n 'png',\n 'svg',\n 'webp',\n 'pdf',\n 'zip',\n 'mp4',\n 'webm',\n 'flac',\n 'json',\n]);\nexport type SupportedAssetExtension = z.infer<\n typeof supportedAssetExtensionSchema\n>;\n\nexport const supportedAssetTypeSchema = z.object({\n extension: supportedAssetExtensionSchema,\n mimeType: supportedAssetMimeTypeSchema,\n});\nexport type SupportedAssetType = z.infer<typeof supportedAssetTypeSchema>;\n\nexport const objectTypeSchema = z.enum([\n 'project',\n 'asset',\n 'collection',\n 'entry',\n 'value',\n 'sharedValue',\n]);\nexport type ObjectType = z.infer<typeof objectTypeSchema>;\n\nexport const versionSchema = z.string();\n// .refine((version) => {\n// if (Semver.valid(version) !== null) {\n// return true;\n// }\n// return false;\n// }, 'String must follow the Semantic Versioning format (https://semver.org/)');\nexport type Version = z.infer<typeof versionSchema>;\n\nexport const uuidSchema = z.string().uuid('shared.invalidUuid');\nexport type Uuid = z.infer<typeof uuidSchema>;\n\n/**\n * A record that can be used to translate a string value into all supported languages\n */\nexport const translatableStringSchema = z.record(\n supportedLanguageSchema,\n z.string().trim().min(1, 'shared.translatableStringRequired')\n);\nexport type TranslatableString = z.infer<typeof translatableStringSchema>;\n\n/**\n * A record that can be used to translate a number value into all supported languages\n */\nexport const translatableNumberSchema = z.record(\n supportedLanguageSchema,\n z.number({ required_error: 'shared.translatableNumberRequired' })\n);\nexport type TranslatableNumber = z.infer<typeof translatableNumberSchema>;\n\n/**\n * A record that can be used to translate a boolean value into all supported languages\n */\nexport const translatableBooleanSchema = z.record(\n supportedLanguageSchema,\n z.boolean({ required_error: 'shared.translatableBooleanRequired' })\n);\nexport type TranslatableBoolean = z.infer<typeof translatableBooleanSchema>;\n\nexport function translatableArrayOf<T extends z.ZodTypeAny>(schema: T) {\n return z.record(supportedLanguageSchema, z.array(schema));\n}\n","import z from 'zod';\nimport {\n supportedAssetExtensionSchema,\n supportedLanguageSchema,\n uuidSchema,\n} from './baseSchema.js';\n\n/**\n * A basic file structure every elek.io file on disk has to follow\n */\nexport const baseFileSchema = z.object({\n /**\n * The ID of the file\n *\n * The ID is part of the files name.\n */\n id: uuidSchema.readonly(),\n /**\n * The datetime of the file being created is set by the service of \"objectType\" while creating it\n */\n created: z.string().datetime().readonly(),\n /**\n * The datetime of the file being updated is set by the service of \"objectType\" while updating it\n */\n updated: z.string().datetime().nullable(),\n});\nexport type BaseFile = z.infer<typeof baseFileSchema>;\n\nexport const baseFileWithLanguageSchema = baseFileSchema.extend({\n /**\n * The language of the file\n *\n * The language is part of the files name and together with it's ID the only unique identifier.\n * That's why the language cannot be changed after creating the file.\n *\n * @todo Maybe remove the above restriction by implementing logic to handle changing the files language inside all services\n */\n language: supportedLanguageSchema.readonly(),\n});\nexport type BaseFileWithLanguage = z.infer<typeof baseFileWithLanguageSchema>;\n\nexport const fileReferenceSchema = z.object({\n id: uuidSchema,\n language: supportedLanguageSchema.optional(),\n extension: supportedAssetExtensionSchema.optional(),\n});\nexport type FileReference = z.infer<typeof fileReferenceSchema>;\n","import z from 'zod';\nimport {\n objectTypeSchema,\n supportedIconSchema,\n translatableStringSchema,\n uuidSchema,\n} from './baseSchema.js';\nimport { entryExportSchema } from './entrySchema.js';\nimport { fieldDefinitionSchema } from './fieldSchema.js';\nimport { baseFileSchema } from './fileSchema.js';\n\nexport const collectionFileSchema = baseFileSchema.extend({\n objectType: z.literal(objectTypeSchema.Enum.collection).readonly(),\n name: z.object({\n singular: translatableStringSchema,\n plural: translatableStringSchema,\n }),\n slug: z.object({\n singular: z.string(),\n plural: z.string(),\n }),\n description: translatableStringSchema,\n icon: supportedIconSchema,\n fieldDefinitions: z.array(fieldDefinitionSchema),\n});\nexport type CollectionFile = z.infer<typeof collectionFileSchema>;\n\nexport const collectionSchema = collectionFileSchema.extend({});\nexport type Collection = z.infer<typeof collectionSchema>;\n\nexport const collectionExportSchema = collectionSchema.extend({\n entries: z.array(entryExportSchema),\n});\nexport type CollectionExport = z.infer<typeof collectionExportSchema>;\n\nexport const createCollectionSchema = collectionSchema\n .omit({\n id: true,\n objectType: true,\n created: true,\n updated: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n });\nexport type CreateCollectionProps = z.infer<typeof createCollectionSchema>;\n\nexport const readCollectionSchema = z.object({\n id: uuidSchema.readonly(),\n projectId: uuidSchema.readonly(),\n});\nexport type ReadCollectionProps = z.infer<typeof readCollectionSchema>;\n\nexport const updateCollectionSchema = collectionFileSchema\n .pick({\n id: true,\n name: true,\n slug: true,\n description: true,\n icon: true,\n fieldDefinitions: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n });\nexport type UpdateCollectionProps = z.infer<typeof updateCollectionSchema>;\n\nexport const deleteCollectionSchema = readCollectionSchema.extend({});\nexport type DeleteCollectionProps = z.infer<typeof deleteCollectionSchema>;\n\nexport const countCollectionsSchema = z.object({\n projectId: uuidSchema.readonly(),\n});\nexport type CountCollectionsProps = z.infer<typeof countCollectionsSchema>;\n","import z from 'zod';\nimport type { Asset } from './assetSchema.js';\nimport {\n objectTypeSchema,\n uuidSchema,\n type SupportedLanguage,\n} from './baseSchema.js';\nimport { baseFileSchema } from './fileSchema.js';\nimport {\n resolvedValueSchema,\n valueSchema,\n type DirectValue,\n type ReferencedValue,\n} from './valueSchema.js';\n\nexport const entryFileSchema = baseFileSchema.extend({\n objectType: z.literal(objectTypeSchema.Enum.entry).readonly(),\n values: z.array(valueSchema),\n});\nexport type EntryFile = z.infer<typeof entryFileSchema>;\n\n// @see https://github.com/colinhacks/zod?tab=readme-ov-file#recursive-types\nexport type Entry = z.infer<typeof entryFileSchema> & {\n values: (\n | DirectValue\n | (ReferencedValue & {\n content: Partial<Record<SupportedLanguage, (Asset | Entry)[]>>;\n })\n )[];\n};\nexport const entrySchema = entryFileSchema.extend({\n values: z.array(z.lazy(() => resolvedValueSchema)),\n}) satisfies z.ZodType<Entry>;\n\nexport const entryExportSchema = entrySchema.extend({});\nexport type EntryExport = z.infer<typeof entryExportSchema>;\n\nexport const createEntrySchema = entryFileSchema\n .omit({\n id: true,\n objectType: true,\n created: true,\n updated: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n collectionId: uuidSchema.readonly(),\n values: z.array(valueSchema),\n });\nexport type CreateEntryProps = z.infer<typeof createEntrySchema>;\n\nexport const readEntrySchema = z.object({\n id: uuidSchema.readonly(),\n projectId: uuidSchema.readonly(),\n collectionId: uuidSchema.readonly(),\n});\nexport type ReadEntryProps = z.infer<typeof readEntrySchema>;\n\nexport const updateEntrySchema = entrySchema\n .omit({\n objectType: true,\n created: true,\n updated: true,\n })\n .extend({\n projectId: uuidSchema.readonly(),\n collectionId: uuidSchema.readonly(),\n });\nexport type UpdateEntryProps = z.infer<typeof updateEntrySchema>;\n\nexport const deleteEntrySchema = readEntrySchema.extend({});\nexport type DeleteEntryProps = z.infer<typeof deleteEntrySchema>;\n\nexport const countEntriesSchema = z.object({\n projectId: uuidSchema.readonly(),\n collectionId: uuidSchema.readonly(),\n});\nexport type CountEntriesProps = z.infer<typeof countEntriesSchema>;\n","import z from 'zod';\nimport { assetSchema, type Asset } from './assetSchema.js';\nimport {\n objectTypeSchema,\n supportedLanguageSchema,\n translatableArrayOf,\n translatableBooleanSchema,\n translatableNumberSchema,\n translatableStringSchema,\n uuidSchema,\n} from './baseSchema.js';\nimport { entrySchema, type Entry } from './entrySchema.js';\n\nexport const ValueTypeSchema = z.enum([\n 'string',\n 'number',\n 'boolean',\n 'reference',\n]);\nexport type ValueType = z.infer<typeof ValueTypeSchema>;\n\nexport const valueContentReferenceBase = z.object({\n id: uuidSchema,\n});\n\nexport const valueContentReferenceWithLanguageBase =\n valueContentReferenceBase.extend({\n language: supportedLanguageSchema,\n });\n\nexport const valueContentReferenceToAssetSchema =\n valueContentReferenceWithLanguageBase.extend({\n objectType: z.literal(objectTypeSchema.Enum.asset),\n });\nexport type ValueContentReferenceToAsset = z.infer<\n typeof valueContentReferenceToAssetSchema\n>;\n\nexport const valueContentReferenceToCollectionSchema =\n valueContentReferenceBase.extend({\n objectType: z.literal(objectTypeSchema.Enum.collection),\n });\nexport type ValueContentReferenceToCollection = z.infer<\n typeof valueContentReferenceToCollectionSchema\n>;\n\nexport const valueContentReferenceToEntrySchema =\n valueContentReferenceBase.extend({\n objectType: z.literal(objectTypeSchema.Enum.entry),\n });\nexport type ValueContentReferenceToEntry = z.infer<\n typeof valueContentReferenceToEntrySchema\n>;\n\n// export const valueContentReferenceToSharedValueSchema = z.object({\n// referenceObjectType: z.literal(objectTypeSchema.Enum.sharedValue),\n// references: z.object({\n// id: uuidSchema,\n// language: supportedLanguageSchema,\n// }),\n// });\n// export type ValueContentReferenceToSharedValue = z.infer<\n// typeof valueContentReferenceToSharedValueSchema\n// >;\n\n// export const sharedValueFileSchema = baseFileWithLanguageSchema.extend({\n// objectType: z.literal(objectTypeSchema.Enum.sharedValue).readonly(),\n// valueType: ValueTypeSchema.exclude(['reference']).readonly(),\n// // valueType: ValueTypeSchema.readonly(), @todo do we allow shared Values to reference assets or others?\n// content: z.union([\n// z.string(),\n// z.number(),\n// z.boolean(),\n// z.string().optional(),\n// z.number().optional(),\n// z.boolean().optional(),\n// // valueContentReferenceToAssetSchema, @todo do we allow shared Values to reference assets or others?\n// // valueContentReferenceToSharedValueSchema,\n// ]),\n// });\n// export type SharedValueFile = z.infer<typeof sharedValueFileSchema>;\n\n// export const sharedValueSchema = sharedValueFileSchema.extend({});\n// export type SharedValue = z.infer<typeof sharedValueSchema>;\n\n// export const sharedValueExportSchema = sharedValueSchema.extend({});\n// export type SharedValueExport = z.infer<typeof sharedValueExportSchema>;\n\n// export const resolvedValueContentReferenceToSharedValueSchema =\n// valueContentReferenceToSharedValueSchema.extend({\n// references: z.object({\n// id: uuidSchema,\n// language: supportedLanguageSchema,\n// resolved: sharedValueSchema,\n// }),\n// });\n// export type ResolvedValueContentReferenceToSharedValue = z.infer<\n// typeof resolvedValueContentReferenceToSharedValueSchema\n// >;\n\nexport const valueContentReferenceSchema = z.union([\n valueContentReferenceToAssetSchema,\n valueContentReferenceToCollectionSchema,\n valueContentReferenceToEntrySchema,\n // valueContentReferenceToSharedValueSchema,\n]);\nexport type ValueContentReference = z.infer<typeof valueContentReferenceSchema>;\n\nexport const resolvedValueContentReferenceSchema: z.ZodUnion<\n [z.ZodType<Asset>, z.ZodType<Entry>]\n> = z.union([\n assetSchema,\n z.lazy(() => entrySchema), // Circular dependency / recursive type @see https://github.com/colinhacks/zod?tab=readme-ov-file#recursive-types\n // resolvedValueContentReferenceToSharedValueSchema,\n]);\nexport type ResolvedValueContentReference = z.infer<\n typeof resolvedValueContentReferenceSchema\n>;\n\nexport const directValueBaseSchema = z.object({\n objectType: z.literal(objectTypeSchema.Enum.value).readonly(),\n fieldDefinitionId: uuidSchema.readonly(),\n});\n\nexport const directStringValueSchema = directValueBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.string).readonly(),\n content: translatableStringSchema,\n});\nexport type DirectStringValue = z.infer<typeof directStringValueSchema>;\n\nexport const directNumberValueSchema = directValueBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.number).readonly(),\n content: translatableNumberSchema,\n});\nexport type DirectNumberValue = z.infer<typeof directNumberValueSchema>;\n\nexport const directBooleanValueSchema = directValueBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.boolean).readonly(),\n content: translatableBooleanSchema,\n});\nexport type DirectBooleanValue = z.infer<typeof directBooleanValueSchema>;\n\nexport const directValueSchema = z.union([\n directStringValueSchema,\n directNumberValueSchema,\n directBooleanValueSchema,\n]);\nexport type DirectValue = z.infer<typeof directValueSchema>;\n\nexport const referencedValueSchema = z.object({\n objectType: z.literal(objectTypeSchema.Enum.value).readonly(),\n fieldDefinitionId: uuidSchema.readonly(),\n valueType: z.literal(ValueTypeSchema.Enum.reference).readonly(),\n content: translatableArrayOf(valueContentReferenceSchema),\n});\nexport type ReferencedValue = z.infer<typeof referencedValueSchema>;\n\nexport const valueSchema = z.union([directValueSchema, referencedValueSchema]);\nexport type Value = z.infer<typeof valueSchema>;\n\nexport const resolvedReferencedValueSchema = referencedValueSchema.extend({\n content: translatableArrayOf(resolvedValueContentReferenceSchema),\n});\nexport type ResolvedReferencedValue = z.infer<\n typeof resolvedReferencedValueSchema\n>;\n\nexport const resolvedValueSchema = z.union([\n directValueSchema,\n resolvedReferencedValueSchema,\n]);\nexport type ResolvedValue = z.infer<typeof resolvedValueSchema>;\n\n/**\n * ---\n */\n\n// export const createSharedValueSchema = sharedValueFileSchema\n// .pick({\n// valueType: true,\n// content: true,\n// language: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// });\n// export type CreateSharedValueProps = z.infer<typeof createSharedValueSchema>;\n\n// export const readSharedValueSchema = sharedValueFileSchema\n// .pick({\n// id: true,\n// language: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// });\n// export type ReadSharedValueProps = z.infer<typeof readSharedValueSchema>;\n\n// export const updateSharedValueSchema = sharedValueFileSchema\n// .pick({\n// id: true,\n// language: true,\n// content: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// });\n// export type UpdateSharedValueProps = z.infer<typeof updateSharedValueSchema>;\n\n// export const deleteSharedValueSchema = sharedValueFileSchema\n// .pick({\n// id: true,\n// language: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// });\n// export type DeleteSharedValueProps = z.infer<typeof deleteSharedValueSchema>;\n\n/**\n * @todo maybe we need to validate Values and shared Values\n */\n// export const validateValueSchema = sharedValueFileSchema\n// .pick({\n// id: true,\n// language: true,\n// })\n// .extend({\n// projectId: uuidSchema.readonly(),\n// definition: FieldDefinitionSchema.readonly(),\n// });\n// export type ValidateValueProps = z.infer<typeof validateValueSchema>;\n\n// export const countValuesSchema = z.object({ projectId: uuidSchema.readonly() });\n// export type CountValuesProps = z.infer<typeof countValuesSchema>;\n","import { z } from 'zod';\nimport {\n supportedAssetMimeTypeSchema,\n translatableStringSchema,\n uuidSchema,\n} from './baseSchema.js';\nimport {\n valueContentReferenceToAssetSchema,\n valueContentReferenceToEntrySchema,\n ValueTypeSchema,\n} from './valueSchema.js';\n\nexport const FieldTypeSchema = z.enum([\n // String Values\n 'text',\n 'textarea',\n 'email',\n // 'password', @todo maybe if there is a usecase\n 'url',\n 'ip',\n 'date',\n 'time',\n 'datetime',\n 'telephone',\n // Number Values\n 'number',\n 'range',\n // Boolean Values\n 'toggle',\n // Reference Values\n 'asset',\n 'entry',\n // 'sharedValue', // @todo\n]);\nexport type FieldType = z.infer<typeof FieldTypeSchema>;\n\nexport const FieldWidthSchema = z.enum(['12', '6', '4', '3']);\n\nexport const FieldDefinitionBaseSchema = z.object({\n id: uuidSchema.readonly(),\n label: translatableStringSchema,\n description: translatableStringSchema,\n isRequired: z.boolean(),\n isDisabled: z.boolean(),\n isUnique: z.boolean(),\n inputWidth: FieldWidthSchema,\n});\nexport type FieldDefinitionBase = z.infer<typeof FieldDefinitionBaseSchema>;\n\n/**\n * String based Field definitions\n */\n\nexport const StringFieldDefinitionBaseSchema = FieldDefinitionBaseSchema.extend(\n {\n valueType: z.literal(ValueTypeSchema.Enum.string),\n defaultValue: z.string().nullable(),\n }\n);\n\nexport const textFieldDefinitionSchema = StringFieldDefinitionBaseSchema.extend(\n {\n fieldType: z.literal(FieldTypeSchema.Enum.text),\n min: z.number().nullable(),\n max: z.number().nullable(),\n }\n);\nexport type TextFieldDefinition = z.infer<typeof textFieldDefinitionSchema>;\n\nexport const textareaFieldDefinitionSchema =\n StringFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.textarea),\n min: z.number().nullable(),\n max: z.number().nullable(),\n });\nexport type TextareaFieldDefinition = z.infer<\n typeof textareaFieldDefinitionSchema\n>;\n\nexport const emailFieldDefinitionSchema =\n StringFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.email),\n defaultValue: z.string().email().nullable(),\n });\nexport type EmailFieldDefinition = z.infer<typeof emailFieldDefinitionSchema>;\n\n// @todo why should we support password Values? Client saves it in clear text anyways\n// export const passwordFieldDefinitionSchema =\n// StringFieldDefinitionBaseSchema.extend({\n// fieldType: z.literal(FieldfieldTypeSchema.Enum.password),\n// });\n\nexport const urlFieldDefinitionSchema = StringFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.url),\n defaultValue: z.string().url().nullable(),\n});\nexport type UrlFieldDefinition = z.infer<typeof urlFieldDefinitionSchema>;\n\nexport const ipFieldDefinitionSchema = StringFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.ip),\n defaultValue: z.string().ip().nullable(),\n});\nexport type IpFieldDefinition = z.infer<typeof ipFieldDefinitionSchema>;\n\nexport const dateFieldDefinitionSchema = StringFieldDefinitionBaseSchema.extend(\n {\n fieldType: z.literal(FieldTypeSchema.Enum.date),\n defaultValue: z.string().date().nullable(),\n }\n);\nexport type DateFieldDefinition = z.infer<typeof dateFieldDefinitionSchema>;\n\nexport const timeFieldDefinitionSchema = StringFieldDefinitionBaseSchema.extend(\n {\n fieldType: z.literal(FieldTypeSchema.Enum.time),\n defaultValue: z.string().time().nullable(),\n }\n);\nexport type TimeFieldDefinition = z.infer<typeof timeFieldDefinitionSchema>;\n\nexport const datetimeFieldDefinitionSchema =\n StringFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.datetime),\n defaultValue: z.string().datetime().nullable(),\n });\nexport type DatetimeFieldDefinition = z.infer<\n typeof datetimeFieldDefinitionSchema\n>;\n\nexport const telephoneFieldDefinitionSchema =\n StringFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.telephone),\n // defaultValue: z.string().e164(), @todo when zod v4 releases @see https://github.com/colinhacks/zod/pull/3476\n });\nexport type TelephoneFieldDefinition = z.infer<\n typeof telephoneFieldDefinitionSchema\n>;\n\nexport const stringFieldDefinitionSchema = z.union([\n textFieldDefinitionSchema,\n textareaFieldDefinitionSchema,\n emailFieldDefinitionSchema,\n urlFieldDefinitionSchema,\n ipFieldDefinitionSchema,\n dateFieldDefinitionSchema,\n timeFieldDefinitionSchema,\n datetimeFieldDefinitionSchema,\n telephoneFieldDefinitionSchema,\n]);\nexport type StringFieldDefinition = z.infer<typeof stringFieldDefinitionSchema>;\n\n/**\n * Number based Field definitions\n */\n\nexport const NumberFieldDefinitionBaseSchema = FieldDefinitionBaseSchema.extend(\n {\n valueType: z.literal(ValueTypeSchema.Enum.number),\n min: z.number().nullable(),\n max: z.number().nullable(),\n isUnique: z.literal(false),\n defaultValue: z.number().nullable(),\n }\n);\n\nexport const numberFieldDefinitionSchema =\n NumberFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.number),\n });\nexport type NumberFieldDefinition = z.infer<typeof numberFieldDefinitionSchema>;\n\nexport const rangeFieldDefinitionSchema =\n NumberFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.range),\n // Overwrite from nullable to required because a range needs min, max and default to work and is required, since it always returns a number\n isRequired: z.literal(true),\n min: z.number(),\n max: z.number(),\n defaultValue: z.number(),\n });\nexport type RangeFieldDefinition = z.infer<typeof rangeFieldDefinitionSchema>;\n\n/**\n * Boolean based Field definitions\n */\n\nexport const BooleanFieldDefinitionBaseSchema =\n FieldDefinitionBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.boolean),\n // Overwrite from nullable to required because a boolean needs a default to work and is required, since it always is either true or false\n isRequired: z.literal(true),\n defaultValue: z.boolean(),\n isUnique: z.literal(false),\n });\n\nexport const toggleFieldDefinitionSchema =\n BooleanFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.toggle),\n });\nexport type ToggleFieldDefinition = z.infer<typeof toggleFieldDefinitionSchema>;\n\n/**\n * Reference based Field definitions\n */\n\nexport const ReferenceFieldDefinitionBaseSchema =\n FieldDefinitionBaseSchema.extend({\n valueType: z.literal(ValueTypeSchema.Enum.reference),\n });\n\nexport const assetFieldDefinitionSchema =\n ReferenceFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.asset),\n allowedMimeTypes: z.array(supportedAssetMimeTypeSchema).min(1),\n min: z.number().nullable(),\n max: z.number().nullable(),\n });\nexport type AssetFieldDefinition = z.infer<typeof assetFieldDefinitionSchema>;\n\nexport const entryFieldDefinitionSchema =\n ReferenceFieldDefinitionBaseSchema.extend({\n fieldType: z.literal(FieldTypeSchema.Enum.entry),\n ofCollections: z.array(uuidSchema),\n min: z.number().nullable(),\n max: z.number().nullable(),\n });\nexport type EntryFieldDefinition = z.infer<typeof entryFieldDefinitionSchema>;\n\n// export const sharedValueDefinitionSchema =\n// ReferenceValueDefinitionBaseSchema.extend({\n// fieldType: z.literal(ValueInputTypeSchema.Enum.sharedValue),\n// // The shared Value can have any of the direct types\n// // but not any reference itself (a shared Value cannot have a reference to another shared Value / Asset or any other future reference)\n// sharedValueType: z.union([\n// z.literal(ValueTypeSchema.Enum.boolean),\n// z.literal(ValueTypeSchema.Enum.number),\n// z.literal(ValueTypeSchema.Enum.string),\n// ]),\n// });\n// export type SharedValueValueDefinition = z.infer<\n// typeof sharedValueDefinitionSchema\n// >;\n\nexport const fieldDefinitionSchema = z.union([\n stringFieldDefinitionSchema,\n numberFieldDefinitionSchema,\n rangeFieldDefinitionSchema,\n toggleFieldDefinitionSchema,\n assetFieldDefinitionSchema,\n entryFieldDefinitionSchema,\n // sharedValueDefinitionSchema,\n]);\nexport type FieldDefinition = z.infer<typeof fieldDefinitionSchema>;\n\n/**\n * Dynamic zod schema generation\n */\n\n/**\n * Generates a zod schema to check a Values content, based on given Fields definition\n */\nexport function getValueContentSchemaFromFieldDefinition(\n fieldDefinition: FieldDefinition\n) {\n switch (fieldDefinition.valueType) {\n case ValueTypeSchema.Enum.boolean:\n return getBooleanValueContentSchema();\n case ValueTypeSchema.Enum.number:\n return getNumberValueContentSchema(fieldDefinition);\n case ValueTypeSchema.Enum.string:\n return getStringValueContentSchema(fieldDefinition);\n case ValueTypeSchema.Enum.reference:\n return getReferenceValueContentSchema(fieldDefinition);\n default:\n throw new Error(\n // @ts-expect-error\n `Error generating schema for unsupported ValueType \"${fieldDefinition.valueType}\"`\n );\n }\n}\n\nfunction getBooleanValueContentSchema() {\n return z.boolean();\n}\n\nfunction getNumberValueContentSchema(\n definition: NumberFieldDefinition | RangeFieldDefinition\n) {\n let schema = z.number();\n\n if (definition.min) {\n schema = schema.min(definition.min);\n }\n if (definition.max) {\n schema = schema.max(definition.max);\n }\n\n if (definition.isRequired === false) {\n return schema.nullable();\n }\n\n return schema;\n}\n\nfunction getStringValueContentSchema(definition: StringFieldDefinition) {\n let schema = z.string().trim(); // Additionally trim whitespace\n\n if ('min' in definition && definition.min) {\n schema = schema.min(definition.min);\n }\n if ('max' in definition && definition.max) {\n schema = schema.max(definition.max);\n }\n\n switch (definition.fieldType) {\n case FieldTypeSchema.Enum.email:\n schema = schema.email();\n break;\n case FieldTypeSchema.Enum.url:\n schema = schema.url();\n break;\n case FieldTypeSchema.Enum.ip:\n schema = schema.ip();\n break;\n case FieldTypeSchema.Enum.date:\n schema = schema.date();\n break;\n case FieldTypeSchema.Enum.time:\n schema = schema.time();\n break;\n case FieldTypeSchema.Enum.datetime:\n schema = schema.datetime();\n break;\n case FieldTypeSchema.Enum.telephone:\n // @todo z.string().e164() when zod v4 releases @see https://github.com/colinhacks/zod/pull/3476\n break;\n }\n\n if (definition.isRequired === false) {\n return schema.nullable();\n }\n\n return schema.min(1, 'shared.stringValueRequired'); // @see https://github.com/colinhacks/zod/issues/2466\n}\n\nfunction getReferenceValueContentSchema(\n definition: AssetFieldDefinition | EntryFieldDefinition // | SharedValueFieldDefinition\n) {\n let schema;\n\n switch (definition.fieldType) {\n case FieldTypeSchema.Enum.asset:\n {\n schema = z.array(valueContentReferenceToAssetSchema);\n }\n break;\n case FieldTypeSchema.Enum.entry:\n {\n schema = z.array(valueContentReferenceToEntrySchema);\n }\n break;\n // case ValueInputTypeSchema.Enum.sharedValue: {\n // let schema = valueContentReferenceToSharedValueSchema.extend({}); // Deep copy to not overwrite the base schema\n\n // if (definition.isRequired) {\n // const requiredReferences = schema.shape.references.min(\n // 1,\n // 'shared.assetValueRequired'\n // );\n // schema = schema.extend({\n // references: requiredReferences,\n // });\n // }\n\n // return valueContentReferenceToSharedValueSchema;\n // }\n }\n\n if (definition.isRequired) {\n schema = schema.min(1, 'shared.referenceRequired');\n }\n\n if (definition.min) {\n schema = schema.min(definition.min);\n }\n\n if (definition.max) {\n schema = schema.max(definition.max);\n }\n\n return schema;\n}\n","import { z } from 'zod';\nimport { environmentSchema, versionSchema } from './baseSchema.js';\n\n/**\n * Options that can be passed to elek.io core\n */\nexport const elekIoCoreOptionsSchema = z.object({\n /**\n * The environment elek.io Core is currently running in\n */\n environment: environmentSchema,\n /**\n * The current version of elek.io Core\n */\n version: versionSchema,\n file: z.object({\n json: z.object({\n /**\n * If set, adds indentation with spaces (number) or escape character (string)\n * and line break characters to saved JSON files on disk, to make them easier to read.\n * Defaults to 2 spaces of indentation.\n */\n indentation: z.union([z.number(), z.string()]),\n }),\n }),\n});\nexport type ElekIoCoreOptions = z.infer<typeof elekIoCoreOptionsSchema>;\n\nexport const constructorElekIoCoreSchema = elekIoCoreOptionsSchema\n .omit({\n version: true,\n })\n .partial({\n environment: true,\n file: true,\n })\n .optional();\nexport type ConstructorElekIoCoreProps = z.infer<\n typeof constructorElekIoCoreSchema\n>;\n","import { z } from 'zod';\n\n/**\n * Path to the git repository\n */\nexport const gitRepositoryPathSchema = z.string();\n\n/**\n * Signature git uses to identify users\n */\nexport const gitSignatureSchema = z.object({\n name: z.string(),\n email: z.string(),\n});\nexport type GitSignature = z.infer<typeof gitSignatureSchema>;\n\nexport const gitCommitSchema = z.object({\n /**\n * SHA-1 hash of the commit\n */\n hash: z.string(),\n message: z.string(),\n author: gitSignatureSchema,\n datetime: z.string().datetime(),\n tag: z.string().nullable(),\n});\nexport type GitCommit = z.infer<typeof gitCommitSchema>;\n\n/**\n * Icons for usage in commit messages\n *\n * @see https://gitmoji.dev/\n */\nenum GitCommitIconNative {\n INIT = ':tada:',\n CREATE = ':heavy_plus_sign:',\n UPDATE = ':wrench:',\n DELETE = ':fire:',\n}\nexport const gitCommitIconSchema = z.nativeEnum(GitCommitIconNative);\nexport type GitCommitIcon = z.infer<typeof gitCommitIconSchema>;\n\nexport const gitInitOptionsSchema = z.object({\n /**\n * Use the specified name for the initial branch in the newly created repository. If not specified, fall back to the default name (currently master, but this is subject to change in the future; the name can be customized via the init.defaultBranch configuration variable).\n */\n initialBranch: z.string(),\n});\nexport type GitInitOptions = z.infer<typeof gitInitOptionsSchema>;\n\nexport const gitCloneOptionsSchema = z.object({\n /**\n * Create a shallow clone with a history truncated to the specified number of commits. Implies --single-branch unless --no-single-branch is given to fetch the histories near the tips of all branches. If you want to clone submodules shallowly, also pass --shallow-submodules.\n */\n depth: z.number(),\n /**\n * Clone only the history leading to the tip of a single branch, either specified by the --branch option or the primary branch remote’s HEAD points at. Further fetches into the resulting repository will only update the remote-tracking branch for the branch this option was used for the initial cloning. If the HEAD at the remote did not point at any branch when --single-branch clone was made, no remote-tracking branch is created.\n */\n singleBranch: z.boolean(),\n /**\n * Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository’s HEAD, point to <name> branch instead. In a non-bare repository, this is the branch that will be checked out. --branch can also take tags and detaches the HEAD at that commit in the resulting repository.\n */\n branch: z.string(),\n});\nexport type GitCloneOptions = z.infer<typeof gitCloneOptionsSchema>;\n\nexport const gitSwitchOptionsSchema = z.object({\n /**\n * If true, creates a new local branch and then switches to it\n *\n * @see https://git-scm.com/docs/git-switch#Documentation/git-switch.txt---createltnew-branchgt\n */\n isNew: z.boolean().optional(),\n});\nexport type GitSwitchOptions = z.infer<typeof gitSwitchOptionsSchema>;\n\nexport const gitLogOptionsSchema = z.object({\n /**\n * Limit the result to given number of commits\n */\n limit: z.number().optional(),\n /**\n * Only list commits that are between given SHAs or tag names\n *\n * Note that the commits of from and to are not included in the result\n */\n between: z.object({\n /**\n * From the oldest commit\n */\n from: z.string(),\n /**\n * To the newest commit\n *\n * Defaults to the current HEAD\n */\n to: z.string().optional(),\n }),\n});\nexport type GitLogOptions = z.infer<typeof gitLogOptionsSchema>;\n","import { z } from 'zod';\nimport { uuidSchema } from './baseSchema.js';\nimport {\n gitCommitSchema,\n gitRepositoryPathSchema,\n gitSignatureSchema,\n} from './gitSchema.js';\n\nexport const gitTagSchema = z.object({\n id: uuidSchema,\n message: z.string(),\n author: gitSignatureSchema,\n datetime: z.string().datetime(),\n});\nexport type GitTag = z.infer<typeof gitTagSchema>;\n\nexport const createGitTagSchema = gitTagSchema\n .pick({\n message: true,\n })\n .extend({\n path: gitRepositoryPathSchema,\n hash: gitCommitSchema.shape.hash.optional(),\n });\nexport type CreateGitTagProps = z.infer<typeof createGitTagSchema>;\n\nexport const readGitTagSchema = z.object({\n path: gitRepositoryPathSchema,\n id: uuidSchema.readonly(),\n});\nexport type ReadGitTagProps = z.infer<typeof readGitTagSchema>;\n\nexport const deleteGitTagSchema = readGitTagSchema.extend({});\nexport type DeleteGitTagProps = z.infer<typeof deleteGitTagSchema>;\n\nexport const countGitTagsSchema = z.object({\n path: gitRepositoryPathSchema,\n});\nexport type CountGitTagsProps = z.infer<typeof countGitTagsSchema>;\n","import { z } from 'zod';\nimport { assetExportSchema } from './assetSchema.js';\nimport {\n objectTypeSchema,\n supportedLanguageSchema,\n uuidSchema,\n versionSchema,\n} from './baseSchema.js';\nimport { collectionExportSchema } from './collectionSchema.js';\nimport { baseFileSchema } from './fileSchema.js';\nimport { gitSwitchOptionsSchema } from './gitSchema.js';\n\nexport const projectStatusSchema = z.enum(['foo', 'bar', 'todo']);\nexport type ProjectStatus = z.infer<typeof projectStatusSchema>;\n\nexport const projectSettingsSchema = z.object({\n language: z.object({\n default: supportedLanguageSchema,\n supported: z.array(supportedLanguageSchema),\n }),\n});\nexport type ProjectSettings = z.infer<typeof projectSettingsSchema>;\n\nexport const projectFolderSchema = z.enum([\n 'assets',\n 'collections',\n 'shared-values',\n 'lfs',\n // 'logs',\n // 'public',\n // 'theme',\n]);\nexport type ProjectFolder = z.infer<typeof projectFolderSchema>;\n\nexport const projectFileSchema = baseFileSchema.extend({\n objectType: z.literal(objectTypeSchema.Enum.project).readonly(),\n coreVersion: versionSchema,\n name: z.string().trim().min(1, 'shared.projectNameRequired'),\n description: z.string().trim().min(1, 'shared.projectDescriptionRequired'),\n version: versionSchema,\n status: projectStatusSchema,\n settings: projectSettingsSchema,\n});\nexport type ProjectFile = z.infer<typeof projectFileSchema>;\n\nexport const projectSchema = projectFileSchema.extend({});\nexport type Project = z.infer<typeof projectSchema>;\n\nexport const projectExportSchema = projectSchema.extend({\n assets: z.array(assetExportSchema),\n collections: z.array(collectionExportSchema),\n});\nexport type ProjectExport = z.infer<typeof projectExportSchema>;\n\nexport const createProjectSchema = projectSchema\n .pick({\n name: true,\n description: true,\n settings: true,\n })\n .partial({\n description: true,\n settings: true,\n });\nexport type CreateProjectProps = z.infer<typeof createProjectSchema>;\n\nexport const readProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type ReadProjectProps = z.infer<typeof readProjectSchema>;\n\nexport const updateProjectSchema = projectSchema\n .pick({\n id: true,\n name: true,\n description: true,\n settings: true,\n })\n .partial({\n name: true,\n description: true,\n settings: true,\n });\nexport type UpdateProjectProps = z.infer<typeof updateProjectSchema>;\n\nexport const upgradeProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type UpgradeProjectProps = z.infer<typeof upgradeProjectSchema>;\n\nexport const deleteProjectSchema = readProjectSchema.extend({});\nexport type DeleteProjectProps = z.infer<typeof deleteProjectSchema>;\n\nexport const projectUpgradeSchema = z.object({\n /**\n * The Core version the Project will be upgraded to\n */\n to: versionSchema.readonly(),\n /**\n * Function that will be executed in the process of upgrading a Project\n */\n run: z.function().args(projectFileSchema).returns(z.promise(z.void())),\n});\nexport type ProjectUpgrade = z.infer<typeof projectUpgradeSchema>;\n\nexport const cloneProjectSchema = z.object({\n url: z.string(),\n});\nexport type CloneProjectProps = z.infer<typeof cloneProjectSchema>;\n\nexport const listBranchesProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type ListBranchesProjectProps = z.infer<\n typeof listBranchesProjectSchema\n>;\n\nexport const currentBranchProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type CurrentBranchProjectProps = z.infer<\n typeof currentBranchProjectSchema\n>;\n\nexport const switchBranchProjectSchema = z.object({\n id: uuidSchema.readonly(),\n branch: z.string(),\n options: gitSwitchOptionsSchema.optional(),\n});\nexport type SwitchBranchProjectProps = z.infer<\n typeof switchBranchProjectSchema\n>;\n\nexport const getRemoteOriginUrlProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type GetRemoteOriginUrlProjectProps = z.infer<\n typeof getRemoteOriginUrlProjectSchema\n>;\n\nexport const setRemoteOriginUrlProjectSchema = z.object({\n id: uuidSchema.readonly(),\n url: z.string(),\n});\nexport type SetRemoteOriginUrlProjectProps = z.infer<\n typeof setRemoteOriginUrlProjectSchema\n>;\n\nexport const getChangesProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type GetChangesProjectProps = z.infer<typeof getChangesProjectSchema>;\n\nexport const synchronizeProjectSchema = z.object({\n id: uuidSchema.readonly(),\n});\nexport type SynchronizeProjectProps = z.infer<typeof synchronizeProjectSchema>;\n\nexport const searchProjectSchema = z.object({\n id: uuidSchema.readonly(),\n query: z.string(),\n language: supportedLanguageSchema,\n type: z.array(objectTypeSchema).optional(),\n});\nexport type SearchProjectProps = z.infer<typeof searchProjectSchema>;\n","import { z } from 'zod';\nimport { uuidSchema } from './baseSchema.js';\nimport { gitRepositoryPathSchema } from './gitSchema.js';\n\nexport const serviceTypeSchema = z.enum([\n 'Git',\n 'GitTag',\n 'User',\n 'Project',\n 'Asset',\n 'JsonFile',\n 'Search',\n 'Collection',\n 'Entry',\n 'Value',\n]);\nexport type ServiceType = z.infer<typeof serviceTypeSchema>;\n\nexport interface PaginatedList<T> {\n total: number;\n limit: number;\n offset: number;\n list: T[];\n}\n\nexport interface PaginationOptions {\n limit: number;\n offset: number;\n}\n\n/**\n * Implements create, read, update and delete methods\n */\nexport interface CrudService<T> {\n create: (props: any) => Promise<T>;\n read: (props: any) => Promise<T>;\n update: (props: any) => Promise<T>;\n delete: (props: any) => Promise<void>;\n}\n\n/**\n * Implements list and count methods additionally\n * to create, read, update and delete\n */\nexport interface ExtendedCrudService<T> extends CrudService<T> {\n /**\n * Returns a list of this services objects\n */\n list: (...props: any) => Promise<PaginatedList<T>>;\n /**\n * Returns the total number of this services objects\n */\n count: (...props: any) => Promise<number>;\n}\n\nconst listSchema = z.object({\n projectId: uuidSchema,\n limit: z.number().optional(),\n offset: z.number().optional(),\n});\n\nexport const listCollectionsSchema = listSchema;\nexport type ListCollectionsProps = z.infer<typeof listCollectionsSchema>;\n\nexport const listEntriesSchema = listSchema.extend({\n collectionId: uuidSchema,\n});\nexport type ListEntriesProps = z.infer<typeof listEntriesSchema>;\n\nexport const listAssetsSchema = listSchema;\nexport type ListAssetsProps = z.infer<typeof listAssetsSchema>;\n\n// export const listSharedValuesSchema = listSchema(sharedValueSchema);\n// export type ListSharedValuesProps = z.infer<typeof listSharedValuesSchema>;\n\nexport const listProjectsSchema = listSchema.omit({\n projectId: true,\n});\nexport type ListProjectsProps = z.infer<typeof listProjectsSchema>;\n\nexport const listGitTagsSchema = z.object({\n path: gitRepositoryPathSchema,\n});\nexport type ListGitTagsProps = z.infer<typeof listGitTagsSchema>;\n","import z from 'zod';\nimport { supportedLanguageSchema, uuidSchema } from './baseSchema.js';\nimport { gitSignatureSchema } from './gitSchema.js';\n\nexport const UserTypeSchema = z.enum(['local', 'cloud']);\n\nexport const baseUserSchema = gitSignatureSchema.extend({\n userType: UserTypeSchema,\n language: supportedLanguageSchema,\n});\nexport type BaseUser = z.infer<typeof baseUserSchema>;\n\nexport const localUserSchema = baseUserSchema.extend({\n userType: z.literal(UserTypeSchema.Enum.local),\n});\nexport type LocalUser = z.infer<typeof localUserSchema>;\n\nexport const cloudUserSchema = baseUserSchema.extend({\n userType: z.literal(UserTypeSchema.Enum.cloud),\n id: uuidSchema,\n});\nexport type CloudUser = z.infer<typeof cloudUserSchema>;\n\nexport const userFileSchema = z.union([localUserSchema, cloudUserSchema]);\nexport type UserFile = z.infer<typeof userFileSchema>;\n\nexport const userSchema = userFileSchema;\nexport type User = z.infer<typeof userSchema>;\n\nexport const setUserSchema = userSchema;\nexport type SetUserProps = z.infer<typeof setUserSchema>;\n","import slugify from '@sindresorhus/slugify';\nimport { v4 as generateUuid } from 'uuid';\nimport { type Uuid } from '../schema/baseSchema.js';\n\n/**\n * Returns a new UUID\n */\nexport function uuid(): Uuid {\n return generateUuid();\n}\n\n/**\n * Returns a string representing date and time\n * in a simplified format based on ISO 8601.\n * The timezone is always UTC.\n *\n * - If value is not given, the current date and time is used\n * - If value is given, it's converted to above representation and UTC timezone\n *\n * @example 'YYYY-MM-DDTHH:mm:ss.sssZ'\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString\n * @see https://en.wikipedia.org/wiki/ISO_8601\n */\nexport function datetime(value?: number | string | Date) {\n if (!value) {\n return new Date().toISOString();\n }\n return new Date(value).toISOString();\n}\n\n/**\n * Returns the slug of given string\n */\nexport function slug(string: string): string {\n return slugify(string, {\n separator: '-',\n lowercase: true,\n decamelize: true,\n });\n}\n"],"mappings":";AAAA,OAAOA,QAAO;;;ACAd,OAAO,OAAO;AAEP,IAAM,oBAAoB,EAAE,KAAK,CAAC,cAAc,eAAe,MAAM,CAAC;AActE,IAAM,0BAA0B,EAAE,KAAK;AAAA;AAAA;AAAA;AAAA,EAI5C;AAA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