{"version":3,"file":"json_schema-CIEgzW1h.cjs","names":["MessageType","UnknownFieldHandler","key: keyof JsonSchema[\"properties\"] | undefined","val: JsonSchema[\"properties\"][any] | undefined","WireType"],"sources":["../generated/ts/core/json_schema.ts"],"sourcesContent":["// @generated by protobuf-ts 2.11.1 with parameter generate_dependencies\n// @generated from protobuf file \"core/json_schema.proto\" (package \"tusk.drift.core.v1\", syntax proto3)\n// tslint:disable\nimport type { BinaryWriteOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryWriter } from \"@protobuf-ts/runtime\";\nimport { WireType } from \"@protobuf-ts/runtime\";\nimport type { BinaryReadOptions } from \"@protobuf-ts/runtime\";\nimport type { IBinaryReader } from \"@protobuf-ts/runtime\";\nimport { UnknownFieldHandler } from \"@protobuf-ts/runtime\";\nimport type { PartialMessage } from \"@protobuf-ts/runtime\";\nimport { reflectionMergePartial } from \"@protobuf-ts/runtime\";\nimport { MessageType } from \"@protobuf-ts/runtime\";\n/**\n * Recursive JSON schema message\n * Describes the structure and metadata of JSON data\n *\n * @generated from protobuf message tusk.drift.core.v1.JsonSchema\n */\nexport interface JsonSchema {\n    /**\n     * The type of this schema node\n     *\n     * @generated from protobuf field: tusk.drift.core.v1.JsonSchemaType type = 1\n     */\n    type: JsonSchemaType;\n    /**\n     * For OBJECT types: map of property names to their schemas\n     *\n     * @generated from protobuf field: map<string, tusk.drift.core.v1.JsonSchema> properties = 2\n     */\n    properties: {\n        [key: string]: JsonSchema;\n    };\n    /**\n     * For ORDERED_LIST/UNORDERED_LIST types: schema of list items\n     *\n     * @generated from protobuf field: optional tusk.drift.core.v1.JsonSchema items = 3\n     */\n    items?: JsonSchema;\n    /**\n     * Optional encoding information (e.g., BASE64)\n     *\n     * @generated from protobuf field: optional tusk.drift.core.v1.EncodingType encoding = 4\n     */\n    encoding?: EncodingType;\n    /**\n     * Optional decoded content type (e.g., JSON, HTML)\n     *\n     * @generated from protobuf field: optional tusk.drift.core.v1.DecodedType decoded_type = 5\n     */\n    decodedType?: DecodedType;\n    /**\n     * Match importance for test matching (0.0 to 1.0)\n     * 0.0 = lowest importance, 1.0 = highest importance\n     *\n     * @generated from protobuf field: optional double match_importance = 6\n     */\n    matchImportance?: number;\n}\n/**\n * JSON schema type enumeration\n * Language-agnostic type classification for JSON values\n *\n * @generated from protobuf enum tusk.drift.core.v1.JsonSchemaType\n */\nexport enum JsonSchemaType {\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_UNSPECIFIED = 0;\n     */\n    UNSPECIFIED = 0,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_NUMBER = 1;\n     */\n    NUMBER = 1,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_STRING = 2;\n     */\n    STRING = 2,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_BOOLEAN = 3;\n     */\n    BOOLEAN = 3,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_NULL = 4;\n     */\n    NULL = 4,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_UNDEFINED = 5;\n     */\n    UNDEFINED = 5,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_OBJECT = 6;\n     */\n    OBJECT = 6,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_ORDERED_LIST = 7;\n     */\n    ORDERED_LIST = 7,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_UNORDERED_LIST = 8;\n     */\n    UNORDERED_LIST = 8,\n    /**\n     * @generated from protobuf enum value: JSON_SCHEMA_TYPE_FUNCTION = 9;\n     */\n    FUNCTION = 9\n}\n/**\n * Encoding type for data serialization\n *\n * @generated from protobuf enum tusk.drift.core.v1.EncodingType\n */\nexport enum EncodingType {\n    /**\n     * @generated from protobuf enum value: ENCODING_TYPE_UNSPECIFIED = 0;\n     */\n    UNSPECIFIED = 0,\n    /**\n     * @generated from protobuf enum value: ENCODING_TYPE_BASE64 = 1;\n     */\n    BASE64 = 1\n}\n/**\n * Decoded content type classification\n * Describes the semantic type of decoded content\n *\n * @generated from protobuf enum tusk.drift.core.v1.DecodedType\n */\nexport enum DecodedType {\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_UNSPECIFIED = 0;\n     */\n    UNSPECIFIED = 0,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_JSON = 1;\n     */\n    JSON = 1,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_HTML = 2;\n     */\n    HTML = 2,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_CSS = 3;\n     */\n    CSS = 3,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_JAVASCRIPT = 4;\n     */\n    JAVASCRIPT = 4,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_XML = 5;\n     */\n    XML = 5,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_YAML = 6;\n     */\n    YAML = 6,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_MARKDOWN = 7;\n     */\n    MARKDOWN = 7,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_CSV = 8;\n     */\n    CSV = 8,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_SQL = 9;\n     */\n    SQL = 9,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_GRAPHQL = 10;\n     */\n    GRAPHQL = 10,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_PLAIN_TEXT = 11;\n     */\n    PLAIN_TEXT = 11,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_FORM_DATA = 12;\n     */\n    FORM_DATA = 12,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_MULTIPART_FORM = 13;\n     */\n    MULTIPART_FORM = 13,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_PDF = 14;\n     */\n    PDF = 14,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_AUDIO = 15;\n     */\n    AUDIO = 15,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_VIDEO = 16;\n     */\n    VIDEO = 16,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_GZIP = 17;\n     */\n    GZIP = 17,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_BINARY = 18;\n     */\n    BINARY = 18,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_JPEG = 19;\n     */\n    JPEG = 19,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_PNG = 20;\n     */\n    PNG = 20,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_GIF = 21;\n     */\n    GIF = 21,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_WEBP = 22;\n     */\n    WEBP = 22,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_SVG = 23;\n     */\n    SVG = 23,\n    /**\n     * @generated from protobuf enum value: DECODED_TYPE_ZIP = 24;\n     */\n    ZIP = 24\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass JsonSchema$Type extends MessageType<JsonSchema> {\n    constructor() {\n        super(\"tusk.drift.core.v1.JsonSchema\", [\n            { no: 1, name: \"type\", kind: \"enum\", T: () => [\"tusk.drift.core.v1.JsonSchemaType\", JsonSchemaType, \"JSON_SCHEMA_TYPE_\"] },\n            { no: 2, name: \"properties\", kind: \"map\", K: 9 /*ScalarType.STRING*/, V: { kind: \"message\", T: () => JsonSchema } },\n            { no: 3, name: \"items\", kind: \"message\", T: () => JsonSchema },\n            { no: 4, name: \"encoding\", kind: \"enum\", opt: true, T: () => [\"tusk.drift.core.v1.EncodingType\", EncodingType, \"ENCODING_TYPE_\"] },\n            { no: 5, name: \"decoded_type\", kind: \"enum\", opt: true, T: () => [\"tusk.drift.core.v1.DecodedType\", DecodedType, \"DECODED_TYPE_\"] },\n            { no: 6, name: \"match_importance\", kind: \"scalar\", opt: true, T: 1 /*ScalarType.DOUBLE*/ }\n        ]);\n    }\n    create(value?: PartialMessage<JsonSchema>): JsonSchema {\n        const message = globalThis.Object.create((this.messagePrototype!));\n        message.type = 0;\n        message.properties = {};\n        if (value !== undefined)\n            reflectionMergePartial<JsonSchema>(this, message, value);\n        return message;\n    }\n    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JsonSchema): JsonSchema {\n        let message = target ?? this.create(), end = reader.pos + length;\n        while (reader.pos < end) {\n            let [fieldNo, wireType] = reader.tag();\n            switch (fieldNo) {\n                case /* tusk.drift.core.v1.JsonSchemaType type */ 1:\n                    message.type = reader.int32();\n                    break;\n                case /* map<string, tusk.drift.core.v1.JsonSchema> properties */ 2:\n                    this.binaryReadMap2(message.properties, reader, options);\n                    break;\n                case /* optional tusk.drift.core.v1.JsonSchema items */ 3:\n                    message.items = JsonSchema.internalBinaryRead(reader, reader.uint32(), options, message.items);\n                    break;\n                case /* optional tusk.drift.core.v1.EncodingType encoding */ 4:\n                    message.encoding = reader.int32();\n                    break;\n                case /* optional tusk.drift.core.v1.DecodedType decoded_type */ 5:\n                    message.decodedType = reader.int32();\n                    break;\n                case /* optional double match_importance */ 6:\n                    message.matchImportance = reader.double();\n                    break;\n                default:\n                    let u = options.readUnknownField;\n                    if (u === \"throw\")\n                        throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);\n                    let d = reader.skip(wireType);\n                    if (u !== false)\n                        (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);\n            }\n        }\n        return message;\n    }\n    private binaryReadMap2(map: JsonSchema[\"properties\"], reader: IBinaryReader, options: BinaryReadOptions): void {\n        let len = reader.uint32(), end = reader.pos + len, key: keyof JsonSchema[\"properties\"] | undefined, val: JsonSchema[\"properties\"][any] | undefined;\n        while (reader.pos < end) {\n            let [fieldNo, wireType] = reader.tag();\n            switch (fieldNo) {\n                case 1:\n                    key = reader.string();\n                    break;\n                case 2:\n                    val = JsonSchema.internalBinaryRead(reader, reader.uint32(), options);\n                    break;\n                default: throw new globalThis.Error(\"unknown map entry field for tusk.drift.core.v1.JsonSchema.properties\");\n            }\n        }\n        map[key ?? \"\"] = val ?? JsonSchema.create();\n    }\n    internalBinaryWrite(message: JsonSchema, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {\n        /* tusk.drift.core.v1.JsonSchemaType type = 1; */\n        if (message.type !== 0)\n            writer.tag(1, WireType.Varint).int32(message.type);\n        /* map<string, tusk.drift.core.v1.JsonSchema> properties = 2; */\n        for (let k of globalThis.Object.keys(message.properties)) {\n            writer.tag(2, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);\n            writer.tag(2, WireType.LengthDelimited).fork();\n            JsonSchema.internalBinaryWrite(message.properties[k], writer, options);\n            writer.join().join();\n        }\n        /* optional tusk.drift.core.v1.JsonSchema items = 3; */\n        if (message.items)\n            JsonSchema.internalBinaryWrite(message.items, writer.tag(3, WireType.LengthDelimited).fork(), options).join();\n        /* optional tusk.drift.core.v1.EncodingType encoding = 4; */\n        if (message.encoding !== undefined)\n            writer.tag(4, WireType.Varint).int32(message.encoding);\n        /* optional tusk.drift.core.v1.DecodedType decoded_type = 5; */\n        if (message.decodedType !== undefined)\n            writer.tag(5, WireType.Varint).int32(message.decodedType);\n        /* optional double match_importance = 6; */\n        if (message.matchImportance !== undefined)\n            writer.tag(6, WireType.Bit64).double(message.matchImportance);\n        let u = options.writeUnknownFields;\n        if (u !== false)\n            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);\n        return writer;\n    }\n}\n/**\n * @generated MessageType for protobuf message tusk.drift.core.v1.JsonSchema\n */\nexport const JsonSchema = new JsonSchema$Type();\n"],"mappings":";;;;;;;;;;;AAiEA,IAAY,4DAAL;;;;AAIH;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;;;;;AAOJ,IAAY,wDAAL;;;;AAIH;;;;AAIA;;;;;;;;;AAQJ,IAAY,sDAAL;;;;AAIH;;;;AAIA;;;;AAIA;;;;AAIA;;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