import { type Iso639Part2Alpha3Code } from "./iso639-part2-alpha3-codes.js"; import type { StandardMimeType } from "./mime.types.js"; import ObjectKey from "./object-key.js"; import * as v from "./valibot.js"; /** * 非負の整数であることを検証するスキーマです。 * * @example * ``` * import { UintSchema } from "@z-rack/core"; * * v.parse(UintSchema, 0); // => 0 * v.parse(UintSchema, 42); // => 42 * v.parse(UintSchema, -1); // => 例外 * v.parse(UintSchema, 1.5); // => 例外 * ``` */ export declare const UintSchema: import("valibot").SchemaWithPipe, import("valibot").SafeIntegerAction, import("valibot").MinValueAction, import("valibot").BrandAction]>; export type UintLike = v.InferInput; export type Uint = v.InferOutput; /** * 有効な UTF-8 文字列であり、指定された最大バイト数を超えないことを検証するスキーマを生成します。 * * @param maxBytes 許容する最大バイト数です。 * @returns 生成されたバリデーションスキーマです。 * * @example * ``` * import { Utf8Schema } from "@z-rack/core"; * * const schema = Utf8Schema(10); * v.parse(schema, "hello"); // => "hello" * v.parse(schema, "あ"); // => "あ" (3 bytes) * v.parse(schema, "a".repeat(11)); // => 例外 (11 > 10) * ``` */ export declare function Utf8Schema(maxBytes: number): import("valibot").SchemaWithPipe, import("@tai-kun/valibot-extra-lab").Utf8Action, import("@tai-kun/valibot-extra-lab").MaxBytesAction, import("valibot").BrandAction]>; export type Utf8Like = v.InferInput>; export type Utf8 = v.InferOutput>; export declare const BASE58_REGEX: RegExp; export declare const SHA256_HEX_REGEX: RegExp; /** * SHA-256 ハッシュの 16 進数表現であることを検証するスキーマです。 * * @example * ``` * import { Sha256HexSchema } from "@z-rack/core"; * * v.parse(Sha256HexSchema, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); * // => "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" * ``` */ export declare const Sha256HexSchema: import("valibot").SchemaWithPipe, import("valibot").LengthAction, import("valibot").RegexAction, import("valibot").BrandAction, import("valibot").BrandAction, "Sha256">]>; export type Sha256HexLike = v.InferInput; export type Sha256Hex = v.InferOutput; /** * タイムスタンプとして解釈可能な値(文字列、数値、Date)を検証し、ミリ秒単位の数値に変換するスキーマです。 * * @example * ``` * import { TimestampSchema } from "@z-rack/core"; * * v.parse(TimestampSchema, "2024-01-01T00:00:00Z"); // => 1704067200000 * v.parse(TimestampSchema, 1704067200000); // => 1704067200000 * v.parse(TimestampSchema, new Date("2024-01-01")); // => 1704067200000 * ``` */ export declare const TimestampSchema: import("valibot").SchemaWithPipe, import("valibot").NumberSchema, import("valibot").InstanceSchema], undefined>, import("@tai-kun/valibot-extra-lab").TransformAction, import("valibot").FiniteAction, import("valibot").BrandAction]>; export type TimestampLike = v.InferInput; export type Timestamp = v.InferOutput; /** * UUIDv7 形式のオブジェクト ID を検証するスキーマです。 * * @example * ``` * import { ObjectIdSchema } from "@z-rack/core"; * * v.parse(ObjectIdSchema, "018f3b6a-9b3a-7b8e-8b0a-9b3a7b8e8b0a"); * // => "018f3b6a-9b3a-7b8e-8b0a-9b3a7b8e8b0a" * ``` */ export declare const ObjectIdSchema: import("valibot").SchemaWithPipe, import("@tai-kun/valibot-extra-lab").Uuidv7Action, import("valibot").BrandAction, import("valibot").BrandAction, "UUIDv7">, import("valibot").BrandAction & v.Brand<"UUIDv7">, "ObjectId">]>; export type ObjectIdLike = v.InferInput; export type ObjectId = v.InferOutput; /** * 作成または更新を示すレコード種別を検証するスキーマです。 * * @example * ``` * import { CreatedRecordTypeSchema } from "@z-rack/core"; * * v.parse(CreatedRecordTypeSchema, "CREATE"); // => "CREATE" * ``` */ export declare const CreatedRecordTypeSchema: import("valibot").SchemaWithPipe, import("valibot").BrandAction<"CREATE" | "UPDATE_METADATA", "RecordType">]>; export type CreatedRecordTypeLike = v.InferInput; export type CreatedRecordType = v.InferOutput; /** * 削除を示すレコード種別を検証するスキーマです。 * * @example * ``` * import { DeletedRecordTypeSchema } from "@z-rack/core"; * * v.parse(DeletedRecordTypeSchema, "DELETE"); // => "DELETE" * ``` */ export declare const DeletedRecordTypeSchema: import("valibot").SchemaWithPipe, import("valibot").BrandAction<"DELETE", "RecordType">]>; export type DeletedRecordTypeLike = v.InferInput; export type DeletedRecordType = v.InferOutput; /** * レコードの操作種別を検証するスキーマです。 * * @example * ``` * import { RecordTypeSchema } from "@z-rack/core"; * * v.parse(RecordTypeSchema, "CREATE"); // => "CREATE" * v.parse(RecordTypeSchema, "UPDATE_METADATA"); // => "UPDATE_METADATA" * v.parse(RecordTypeSchema, "DELETE"); // => "DELETE" * ``` */ export declare const RecordTypeSchema: import("valibot").SchemaWithPipe, import("valibot").BrandAction<"CREATE" | "UPDATE_METADATA" | "DELETE", "RecordType">]>; export type RecordTypeLike = v.InferInput; export type RecordType = v.InferOutput; export declare const RecordTimestampSchema: import("valibot").SchemaWithPipe, import("valibot").NumberSchema, import("valibot").InstanceSchema], undefined>, import("@tai-kun/valibot-extra-lab").TransformAction, import("valibot").FiniteAction, import("valibot").BrandAction]>; export type RecordTimestampLike = v.InferInput; export type RecordTimestamp = v.InferOutput; /** * オブジェクトキーを検証し、ObjectKey インスタンスに変換するスキーマです。 * * 文字列または ObjectKey インスタンスを受け付けます。 * * @example * ``` * import { ObjectKeySchema } from "@z-rack/core"; * * v.parse(ObjectKeySchema, "foo/bar"); // ObjectKey * v.parse(ObjectKeySchema, v.parse(ObjectKey, "foo/bar")); // ObjectKey * ``` */ export declare const ObjectKeySchema: import("valibot").UnionSchema<[import("valibot").SchemaWithPipe, import("valibot").MinLengthAction, import("valibot").MaxLengthAction, import("@tai-kun/valibot-extra-lab").Utf8Action, import("@tai-kun/valibot-extra-lab").MaxBytesAction]>, import("@tai-kun/valibot-extra-lab").TransformAction]>, import("valibot").InstanceSchema], undefined>; export type ObjectKeyLike = v.InferInput; /** * Base58 エンコードされた UUIDv7 のエンティティ ID を検証するスキーマです。 * * @example * ``` * import { EntityIdSchema } from "@z-rack/core"; * * const id = v.parse(EntityIdSchema, "4BHG7qRQgKMxgXHgjyWCXt"); * console.log(id); // => "4BHG7qRQgKMxgXHgjyWCXt" * ``` */ export declare const EntityIdSchema: import("valibot").SchemaWithPipe, import("valibot").LengthAction, import("valibot").RegexAction, import("@tai-kun/valibot-extra-lab").TransformAction, import("@tai-kun/valibot-extra-lab").Uuidv7Action, import("@tai-kun/valibot-extra-lab").TransformAction, import("valibot").BrandAction, import("valibot").BrandAction, "UUIDv7">, import("valibot").BrandAction & v.Brand<"UUIDv7">, "Base58">, import("valibot").BrandAction & v.Brand<"UUIDv7"> & v.Brand<"Base58">, "EntityId">]>; export type EntityIdLike = v.InferInput; export type EntityId = v.InferOutput; /** * エンティティタグ(ETag)を検証するスキーマです。 * * @example * ``` * import { EntityTagSchema } from "@z-rack/core"; * * v.parse(EntityTagSchema, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"); * // => "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" * ``` */ export declare const EntityTagSchema: import("valibot").SchemaWithPipe, import("valibot").LengthAction, import("valibot").RegexAction, import("valibot").BrandAction, import("valibot").BrandAction, "Sha256">]>, import("valibot").BrandAction & v.Brand<"Sha256">, "EntityTag">]>; export type EntityTagLike = v.InferInput; export type EntityTag = v.InferOutput; /** * オブジェクトのサイズを検証するスキーマです。 * * @example * ``` * import { ObjectSizeSchema } from "@z-rack/core"; * * v.parse(ObjectSizeSchema, 1024); // => 1024 * v.parse(ObjectSizeSchema, 0); // => 0 * v.parse(ObjectSizeSchema, -1); // => 例外 * ``` */ export declare const ObjectSizeSchema: import("valibot").SchemaWithPipe, import("valibot").SafeIntegerAction, import("valibot").MinValueAction, import("valibot").BrandAction]>, import("valibot").MinValueAction, number & v.Brand<"Uint">, undefined>, import("valibot").MaxValueAction, number & v.Brand<"Uint">, undefined>, import("valibot").BrandAction, "ObjectSize">]>; export type ObjectSizeLike = v.InferInput; export type ObjectSize = v.InferOutput; export declare const MIN_OBJECT_SIZE: ObjectSize; export declare const MAX_OBJECT_SIZE: ObjectSize; /** * MIME タイプを検証し、小文字に正規化するスキーマです。 * * @example * ``` * import { MimeTypeSchema } from "@z-rack/core"; * * v.parse(MimeTypeSchema, "Application/Json"); // => "application/json" * ``` */ export declare const MimeTypeSchema: v.BaseSchema, v.BaseIssue>; export type MimeTypeLike = v.InferInput; export type MimeType = v.InferOutput; export declare const CreatedAtSchema: import("valibot").SchemaWithPipe, import("valibot").NumberSchema, import("valibot").InstanceSchema], undefined>, import("@tai-kun/valibot-extra-lab").TransformAction, import("valibot").FiniteAction, import("valibot").BrandAction]>; export type CreatedAtLike = v.InferInput; export type CreatedAt = v.InferOutput; export declare const LastModifiedAtSchema: import("valibot").SchemaWithPipe, import("valibot").NumberSchema, import("valibot").InstanceSchema], undefined>, import("@tai-kun/valibot-extra-lab").TransformAction, import("valibot").FiniteAction, import("valibot").BrandAction]>; export type LastModifiedAtLike = v.InferInput; export type LastModifiedAt = v.InferOutput; /** * ISO 639-2 T コード形式の言語コードを検証するスキーマです。 * * @example * ``` * import { LanguageSchema } from "@z-rack/core"; * * v.parse(LanguageSchema, "jpn"); // => "jpn" * v.parse(LanguageSchema, "eng"); // => "eng" * v.parse(LanguageSchema, "xyz"); // => 例外 * ``` */ export declare const LanguageSchema: import("valibot").SchemaWithPipe, import("valibot").BrandAction]>; export type LanguageLike = Iso639Part2Alpha3Code; export type Language = Iso639Part2Alpha3Code; /** * オブジェクトの説明文を検証するスキーマです。 * * @example * ``` * import { DescriptionSchema } from "@z-rack/core"; * * v.parse(DescriptionSchema, "これはサンプルです。"); * // => "これはサンプルです。" * ``` */ export declare const DescriptionSchema: import("valibot").SchemaWithPipe, import("@tai-kun/valibot-extra-lab").Utf8Action, import("valibot").BrandAction]>; export type DescriptionLike = v.InferInput; export type Description = v.InferOutput; /** * 検索クエリのテキストを検証するスキーマです。 * * @example * ``` * import { SearchTextSchema } from "@z-rack/core"; * * v.parse(SearchTextSchema, "検索キーワード"); * // => "検索キーワード" * ``` */ export declare const SearchTextSchema: import("valibot").SchemaWithPipe, import("@tai-kun/valibot-extra-lab").Utf8Action, import("valibot").BrandAction]>; export type SearchTextLike = v.InferInput; export type SearchText = v.InferOutput; /** * テキスト検索エンジンのフォーマット識別子を検証するスキーマです。 * * @example * ``` * import { TextSearchFormatSchema } from "@z-rack/core"; * * v.parse(TextSearchFormatSchema, "4BHG7qRQgKMxgXHgjyWCXt4BHG7qRQgKMxgXHgjyWCXt"); * // => "4BHG7qRQgKMxgXHgjyWCXt4BHG7qRQgKMxgXHgjyWCXt" * ``` */ export declare const TextSearchFormatSchema: import("valibot").SchemaWithPipe, import("valibot").LengthAction, import("valibot").RegexAction, import("valibot").BrandAction, import("valibot").BrandAction, "Base58">]>; export type TextSearchFormatLike = v.InferInput; export type TextSearchFormat = v.InferOutput; export declare const MIN_OBJECT_TAG_BYTES: Uint; export declare const MAX_OBJECT_TAG_BYTES: Uint; /** * オブジェクトのタグを検証するスキーマです。 * * @example * ``` * import { ObjectTagSchema } from "@z-rack/core"; * * v.parse(ObjectTagSchema, "important"); // => "important" * ``` */ export declare const ObjectTagSchema: import("valibot").SchemaWithPipe, import("@tai-kun/valibot-extra-lab").Utf8Action, import("@tai-kun/valibot-extra-lab").MaxBytesAction, import("valibot").BrandAction]>, import("valibot").BrandAction, "ObjectTag">]>; export type ObjectTagLike = v.InferInput; export type ObjectTag = v.InferOutput; /** * オブジェクトのタグ集合を検証するスキーマです。 * * 配列で渡された場合は Set に変換されます。最大 20 個まで保持できます。 * * @example * ``` * import { ObjectTagsSchema } from "@z-rack/core"; * * v.parse(ObjectTagsSchema, new Set(["a", "b"])); // => Set { "a", "b" } * v.parse(ObjectTagsSchema, ["a", "b"]); // => Set { "a", "b" } * ``` */ export declare const ObjectTagsSchema: import("valibot").SchemaWithPipe, import("@tai-kun/valibot-extra-lab").Utf8Action, import("@tai-kun/valibot-extra-lab").MaxBytesAction, import("valibot").BrandAction]>, import("valibot").BrandAction, "ObjectTag">]>, undefined>, import("valibot").SchemaWithPipe, import("@tai-kun/valibot-extra-lab").Utf8Action, import("@tai-kun/valibot-extra-lab").MaxBytesAction, import("valibot").BrandAction]>, import("valibot").BrandAction, "ObjectTag">]>, undefined>, import("@tai-kun/valibot-extra-lab").TransformAction<(string & v.Brand<"Utf8"> & v.Brand<"ObjectTag">)[], Set & v.Brand<"ObjectTag">>>]>], undefined>, import("valibot").MaxSizeAction & v.Brand<"ObjectTag">> | Set & v.Brand<"ObjectTag">>, 20, undefined>, import("valibot").BrandAction & v.Brand<"ObjectTag">> | Set & v.Brand<"ObjectTag">>, "ObjectTags">]>; export type ObjectTagsLike = v.InferInput; export type ObjectTags = v.InferOutput; export declare const UserMetadataSchema: import("valibot").UnknownSchema; export type UserMetadataLike = v.InferInput; export type UserMetadata = v.InferOutput; /** * オブジェクトキーの接頭辞を検証するスキーマです。 * * @example * ``` * import { ObjectKeyPrefixSchema } from "@z-rack/core"; * * v.parse(ObjectKeyPrefixSchema, "foo/bar/"); * // => "foo/bar/" * ``` */ export declare const ObjectKeyPrefixSchema: import("valibot").SchemaWithPipe, import("valibot").MinLengthAction, import("valibot").MaxLengthAction, import("@tai-kun/valibot-extra-lab").Utf8Action, import("@tai-kun/valibot-extra-lab").MaxBytesAction]>, import("valibot").BrandAction]>; export type ObjectKeyPrefixLike = v.InferInput; export type ObjectKeyPrefix = v.InferOutput; /** * データベースのオープンモードを検証するスキーマです。 * * - `"w"`: 既存のデータがあれば上書きします。 * - `"wx"`: 既存のデータがあればエラーにします。 * * @example * ``` * import { OpenModeSchema } from "@z-rack/core"; * * v.parse(OpenModeSchema, "w"); // => "w" * v.parse(OpenModeSchema, "wx"); // => "wx" * ``` */ export declare const OpenModeSchema: import("valibot").SchemaWithPipe, import("valibot").BrandAction<"w" | "wx", "OpenMode">]>; export type OpenModeLike = v.InferInput; export type OpenMode = v.InferOutput; /** * 並び順の方向を検証するスキーマです。 * * @example * ``` * import { OrderDirectionSchema } from "@z-rack/core"; * * v.parse(OrderDirectionSchema, "ASC"); // => "ASC" * v.parse(OrderDirectionSchema, "DESC"); // => "DESC" * ``` */ export declare const OrderDirectionSchema: import("valibot").SchemaWithPipe, import("valibot").BrandAction<"ASC" | "DESC", "OrderDirection">]>; export type OrderDirectionLike = v.InferInput; export type OrderDirection = v.InferOutput; //# sourceMappingURL=schemas.d.ts.map