@synnaxlabs/client 0.57.2 → 0.58.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/dist/{client-BsVW3qAW.js → client-0I0a7Hkw.js} +10121 -9064
- package/dist/client-0I0a7Hkw.js.map +1 -0
- package/dist/client.js +2061 -978
- package/dist/client.js.map +1 -1
- package/dist/src/access/policy/client.d.ts +1 -2
- package/dist/src/access/policy/client.d.ts.map +1 -1
- package/dist/src/arc/client.d.ts.map +1 -1
- package/dist/src/channel/client.d.ts +2 -1
- package/dist/src/channel/client.d.ts.map +1 -1
- package/dist/src/device/client.d.ts +0 -2
- package/dist/src/device/client.d.ts.map +1 -1
- package/dist/src/framer/cache/cache.d.ts.map +1 -1
- package/dist/src/framer/cache/reader.d.ts.map +1 -1
- package/dist/src/framer/cache/static.d.ts +14 -0
- package/dist/src/framer/cache/static.d.ts.map +1 -1
- package/dist/src/framer/cache/unary.d.ts +3 -0
- package/dist/src/framer/cache/unary.d.ts.map +1 -1
- package/dist/src/framer/feed.d.ts.map +1 -1
- package/dist/src/framer/streamer.d.ts +34 -18
- package/dist/src/framer/streamer.d.ts.map +1 -1
- package/dist/src/framer/writer.d.ts.map +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/lineplot/actions.d.ts +48 -0
- package/dist/src/lineplot/actions.d.ts.map +1 -1
- package/dist/src/lineplot/actions.gen.d.ts +237 -0
- package/dist/src/lineplot/actions.gen.d.ts.map +1 -1
- package/dist/src/lineplot/types.gen.d.ts +87 -7
- package/dist/src/lineplot/types.gen.d.ts.map +1 -1
- package/dist/src/panel/client.d.ts +1 -2
- package/dist/src/panel/client.d.ts.map +1 -1
- package/dist/src/project/client.d.ts +1 -2
- package/dist/src/project/client.d.ts.map +1 -1
- package/dist/src/query/indexes.d.ts +11 -6
- package/dist/src/query/indexes.d.ts.map +1 -1
- package/dist/src/query/table.d.ts +12 -6
- package/dist/src/query/table.d.ts.map +1 -1
- package/dist/src/rack/client.d.ts.map +1 -1
- package/dist/src/ranger/client.d.ts +10 -4
- package/dist/src/ranger/client.d.ts.map +1 -1
- package/dist/src/schematic/actions.d.ts.map +1 -1
- package/dist/src/status/client.d.ts.map +1 -1
- package/dist/src/status/status.d.ts +2 -0
- package/dist/src/status/status.d.ts.map +1 -1
- package/dist/src/task/client.d.ts +19 -1
- package/dist/src/task/client.d.ts.map +1 -1
- package/dist/src/testutil/client.d.ts +2 -0
- package/dist/src/testutil/client.d.ts.map +1 -1
- package/dist/src/testutil/proxy.d.ts +8 -0
- package/dist/src/testutil/proxy.d.ts.map +1 -1
- package/dist/src/user/client.d.ts +1 -2
- package/dist/src/user/client.d.ts.map +1 -1
- package/dist/testutil.js +80 -60
- package/dist/testutil.js.map +1 -1
- package/package.json +12 -12
- package/src/access/policy/client.ts +0 -2
- package/src/arc/client.ts +2 -20
- package/src/channel/client.ts +12 -8
- package/src/device/client.ts +4 -7
- package/src/framer/cache/cache.ts +9 -1
- package/src/framer/cache/reader.ts +5 -3
- package/src/framer/cache/static.ts +86 -3
- package/src/framer/cache/unary.ts +7 -0
- package/src/framer/feed.ts +2 -0
- package/src/framer/streamer.ts +71 -6
- package/src/framer/writer.ts +4 -5
- package/src/index.ts +2 -0
- package/src/lineplot/actions.gen.ts +30 -0
- package/src/lineplot/actions.ts +14 -0
- package/src/lineplot/types.gen.ts +59 -21
- package/src/panel/client.ts +0 -2
- package/src/project/client.ts +0 -2
- package/src/query/indexes.ts +18 -7
- package/src/query/table.ts +52 -11
- package/src/rack/client.ts +5 -4
- package/src/ranger/client.ts +43 -12
- package/src/schematic/actions.ts +21 -10
- package/src/status/client.ts +1 -3
- package/src/status/status.ts +105 -1
- package/src/task/client.ts +57 -25
- package/src/testutil/client.ts +5 -1
- package/src/testutil/proxy.ts +59 -6
- package/src/user/client.ts +0 -2
- package/dist/client-BsVW3qAW.js.map +0 -1
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","names":[],"sources":["../src/ethercat/types.gen.ts","../src/ethercat/external.ts","../src/http/types.gen.ts","../src/http/external.ts","../src/labjack/types.gen.ts","../src/labjack/external.ts","../src/modbus/types.gen.ts","../src/modbus/external.ts","../src/ni/types.gen.ts","../src/ni/external.ts","../src/opcua/types.gen.ts","../src/opcua/external.ts","../src/pagerduty/types.gen.ts","../src/pagerduty/external.ts"],"sourcesContent":["// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id, zod } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** PDOAddress addresses a PDO entry explicitly in the CoE object dictionary. */\nexport const pdoAddressZ = z.object({\n /** index is the CoE object dictionary index of the PDO entry. */\n index: zod.uint16.default(0),\n /** subIndex is the CoE object dictionary sub-index of the PDO entry. */\n subIndex: zod.uint8.default(0),\n /** bitLength is the size of the PDO entry, in bits. */\n bitLength: zod.uint8.default(16),\n /** dataType is the data type of the PDO entry. */\n dataType: z.string().default(\"uint16\"),\n});\nexport interface PDOAddress extends z.infer<typeof pdoAddressZ> {}\n\n/** BaseReadChannel carries the fields every EtherCAT read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** device is the key of the slave device the channel reads from. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every EtherCAT write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** device is the key of the slave device the channel writes to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** AutomaticReadChannel resolves its PDO address from the slave's discovered PDOs. */\nexport const automaticReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"automatic\"),\n /** pdo is the name of the PDO entry to resolve on the slave. */\n pdo: z.string().default(\"\"),\n});\nexport interface AutomaticReadChannel extends z.infer<typeof automaticReadChannelZ> {}\n\n/** ManualReadChannel specifies its PDO address inline. */\nexport const manualReadChannelZ = baseReadChannelZ.extend(pdoAddressZ.shape).extend({\n type: z.literal(\"manual\"),\n});\nexport interface ManualReadChannel extends z.infer<typeof manualReadChannelZ> {}\n\nexport const READ_CHANNEL_TYPES = [\"automatic\", \"manual\"] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single EtherCAT read channel (TxPDO, slave to master). The type\n * field selects how the PDO entry is addressed.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n automaticReadChannelZ,\n manualReadChannelZ,\n]);\nexport type ReadChannel = AutomaticReadChannel | ManualReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n automatic: automaticReadChannelZ,\n manual: manualReadChannelZ,\n};\n\n/** AutomaticWriteChannel resolves its PDO address from the slave's discovered PDOs. */\nexport const automaticWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"automatic\"),\n /** pdo is the name of the PDO entry to resolve on the slave. */\n pdo: z.string().default(\"\"),\n});\nexport interface AutomaticWriteChannel extends z.infer<typeof automaticWriteChannelZ> {}\n\n/** ManualWriteChannel specifies its PDO address inline. */\nexport const manualWriteChannelZ = baseWriteChannelZ.extend(pdoAddressZ.shape).extend({\n type: z.literal(\"manual\"),\n});\nexport interface ManualWriteChannel extends z.infer<typeof manualWriteChannelZ> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"automatic\", \"manual\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single EtherCAT write channel (RxPDO, master to slave). The type\n * field selects how the PDO entry is addressed.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n automaticWriteChannelZ,\n manualWriteChannelZ,\n]);\nexport type WriteChannel = AutomaticWriteChannel | ManualWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n automatic: automaticWriteChannelZ,\n manual: manualWriteChannelZ,\n};\n\nexport const readConfigZ = task.readConfigZ.extend({\n channels: readChannelZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.persistConfigZ.extend({\n stateRate: z.number().default(25),\n executionRate: z.number().default(1000),\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/ethercat/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TIME_FORMATS = [\n \"iso8601\",\n \"unix_sec\",\n \"unix_ms\",\n \"unix_us\",\n \"unix_ns\",\n] as const;\nexport const timeFormatZ = z.enum(TIME_FORMATS);\nexport type TimeFormat = z.infer<typeof timeFormatZ>;\n\nexport const METHODS = [\n \"GET\",\n \"HEAD\",\n \"POST\",\n \"PUT\",\n \"DELETE\",\n \"PATCH\",\n \"OPTIONS\",\n \"TRACE\",\n \"CONNECT\",\n] as const;\nexport const methodZ = z.enum(METHODS);\nexport type Method = z.infer<typeof methodZ>;\n\nexport const JSON_TYPES = [\"number\", \"string\", \"boolean\"] as const;\nexport const jsonTypeZ = z.enum(JSON_TYPES);\nexport type JSONType = z.infer<typeof jsonTypeZ>;\n\nexport const GENERATOR_TYPES = [\"uuid\", \"timestamp\"] as const;\nexport const generatorTypeZ = z.enum(GENERATOR_TYPES);\nexport type GeneratorType = z.infer<typeof generatorTypeZ>;\n\n/** Header is a single HTTP header sent with a request. */\nexport const headerZ = z.object({\n /** name is the header name, unique within a request. */\n name: z.string().default(\"\"),\n /** value is the header value. */\n value: z.string().default(\"\"),\n});\nexport interface Header extends z.infer<typeof headerZ> {}\n\n/** QueryParam is a single URL query parameter sent with a request. */\nexport const queryParamZ = z.object({\n /** parameter is the parameter name, unique within a request. */\n parameter: z.string().default(\"\"),\n /** value is the parameter value. */\n value: z.string().default(\"\"),\n});\nexport interface QueryParam extends z.infer<typeof queryParamZ> {}\n\n/**\n * EnumEntry maps a string label in a JSON body to a numeric channel value for\n * enum-style parsing (e.g. \"ON\" -> 1, \"OFF\" -> 0).\n */\nexport const enumEntryZ = z.object({\n /** label is the string label in the JSON body. */\n label: z.string().default(\"\"),\n /** value is the numeric channel value the label maps to. */\n value: z.number().default(0),\n});\nexport interface EnumEntry extends z.infer<typeof enumEntryZ> {}\n\n/** BaseWriteField carries the fields every write body field shares. */\nexport const baseWriteFieldZ = z.object({\n /** key uniquely identifies the field within the endpoint. */\n key: z.string().default(id.create),\n /** pointer is the JSON Pointer where the value is placed in the body. */\n pointer: z.string().default(\"\"),\n});\nexport interface BaseWriteField extends z.infer<typeof baseWriteFieldZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** ReadField is a single value extracted from an endpoint's JSON response. */\nexport const readFieldZ = z.object({\n /** key uniquely identifies the field within the endpoint. */\n key: z.string().default(id.create),\n /** name is the human-readable field name. */\n name: z.string().default(\"\"),\n /** disabled is true when the field is excluded from polling. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel the extracted value is written to. */\n channel: channel.keyZ.default(0),\n /** pointer is the JSON Pointer to the value within the response body. */\n pointer: z.string().default(\"\"),\n /** dataType is the data type of the extracted value. */\n dataType: z.string().default(\"float64\"),\n /**\n * timeFormat is the encoding of the JSON value when the target channel holds\n * timestamps. Required for timestamp channels.\n */\n timeFormat: timeFormatZ.optional(),\n /** enumValues maps string labels in the response to numeric channel values. */\n enumValues: enumEntryZ.array().default(() => []),\n});\nexport interface ReadField extends z.infer<typeof readFieldZ> {}\n\n/** ChannelField is the command channel value placed into a write endpoint's body. */\nexport const channelFieldZ = z.object({\n /**\n * pointer is the JSON Pointer where the channel value is placed in the body. An empty\n * pointer sends the bare value as the entire body, in which case the endpoint may not\n * declare any additional fields.\n */\n pointer: z.string().default(\"\"),\n /** jsonType is the JSON type the channel value is serialized as. */\n jsonType: jsonTypeZ.default(\"number\"),\n /** channel is the Synnax command channel that triggers the request. */\n channel: channel.keyZ.default(0),\n /** name is the human-readable name of the command channel. */\n name: z.string().default(\"\"),\n /** dataType is the data type of the command channel. */\n dataType: z.string().default(\"float64\"),\n /**\n * timeFormat is the output encoding when the command channel holds timestamps.\n * Required for timestamp channels.\n */\n timeFormat: timeFormatZ.optional(),\n /**\n * enumValues maps numeric channel values to string labels. Only valid when json_type\n * is 'string'.\n */\n enumValues: enumEntryZ.array().default(() => []),\n});\nexport interface ChannelField extends z.infer<typeof channelFieldZ> {}\n\n/** StaticWriteField places a fixed value in the request body. */\nexport const staticWriteFieldZ = baseWriteFieldZ.extend({\n type: z.literal(\"static\"),\n /** jsonType is the JSON type the value is serialized as. */\n jsonType: jsonTypeZ.default(\"number\"),\n /** value is the fixed JSON value placed at the pointer. */\n value: z.unknown(),\n});\nexport interface StaticWriteField extends z.infer<typeof staticWriteFieldZ> {}\n\n/** GeneratedWriteField places a freshly generated UUID or timestamp in the body. */\nexport const generatedWriteFieldZ = baseWriteFieldZ.extend({\n type: z.literal(\"generated\"),\n /** generator is the generator that produces a fresh value per request. */\n generator: generatorTypeZ.default(\"uuid\"),\n /**\n * timeFormat is the output encoding for timestamp generators. Defaults to iso8601.\n */\n timeFormat: timeFormatZ.optional(),\n});\nexport interface GeneratedWriteField extends z.infer<typeof generatedWriteFieldZ> {}\n\nexport const WRITE_FIELD_TYPES = [\"static\", \"generated\"] as const;\nexport const writeFieldTypeZ = z.enum(WRITE_FIELD_TYPES);\nexport type WriteFieldType = z.infer<typeof writeFieldTypeZ>;\n\n/**\n * WriteField is an additional body field on a write endpoint. The type field selects\n * whether the value is fixed or generated per request.\n */\nexport const writeFieldZ = z.discriminatedUnion(\"type\", [\n staticWriteFieldZ,\n generatedWriteFieldZ,\n]);\nexport type WriteField = StaticWriteField | GeneratedWriteField;\n\nexport const WRITE_FIELD_SCHEMAS: {\n [K in WriteFieldType]: z.ZodType<Extract<WriteField, { type: K }>>;\n} = {\n static: staticWriteFieldZ,\n generated: generatedWriteFieldZ,\n};\n\n/** ReadEndpoint is a single HTTP endpoint polled by a read task. */\nexport const readEndpointZ = z.object({\n /** key uniquely identifies the endpoint within the task. */\n key: z.string().default(id.create),\n /** method is the HTTP method used to poll the endpoint. */\n method: methodZ.default(\"GET\"),\n /** path is the URL path appended to the device's base URL. */\n path: z.string().default(\"\"),\n /** headers contains additional headers merged into the request. */\n headers: headerZ.array().default(() => []),\n /** queryParams contains query parameters appended to the request URL. */\n queryParams: queryParamZ.array().default(() => []),\n /** body is a static body sent with each request. Empty sends no body. */\n body: z.string().default(\"\"),\n /** fields contains the values to extract from the response. */\n fields: readFieldZ.array().default(() => []),\n /**\n * index is the key of the field whose channel indexes the others. Empty when the task\n * stamps samples on arrival.\n */\n index: z.string().default(\"\"),\n});\nexport interface ReadEndpoint extends z.infer<typeof readEndpointZ> {}\n\n/** WriteEndpoint is a single HTTP endpoint written to by a write task. */\nexport const writeEndpointZ = z.object({\n /** key uniquely identifies the endpoint within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the endpoint is excluded from the task. */\n disabled: z.boolean().default(false),\n /** method is the HTTP method used to send the request. */\n method: methodZ.default(\"POST\"),\n /** path is the URL path appended to the device's base URL. */\n path: z.string().default(\"\"),\n /** headers contains additional headers merged into the request. */\n headers: headerZ.array().default(() => []),\n /** queryParams contains query parameters appended to the request URL. */\n queryParams: queryParamZ.array().default(() => []),\n /** channel is the command channel whose writes trigger this endpoint. */\n channel: channelFieldZ.prefault({}),\n /** fields contains additional static or generated body fields. */\n fields: writeFieldZ.array().default(() => []),\n});\nexport interface WriteEndpoint extends z.infer<typeof writeEndpointZ> {}\n\nexport const readConfigZ = task.persistConfigZ.extend({\n device: device.keyZ.default(\"\"),\n rate: z.number().default(1),\n endpoints: readEndpointZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.startConfigZ.extend({\n device: device.keyZ.default(\"\"),\n endpoints: writeEndpointZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/http/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TEMPERATURE_UNITS = [\"C\", \"F\", \"K\"] as const;\nexport const temperatureUnitsZ = z.enum(TEMPERATURE_UNITS);\nexport type TemperatureUnits = z.infer<typeof temperatureUnitsZ>;\n\nexport const THERMOCOUPLE_TYPES = [\n \"J\",\n \"K\",\n \"N\",\n \"R\",\n \"S\",\n \"T\",\n \"B\",\n \"E\",\n \"C\",\n] as const;\nexport const thermocoupleTypeZ = z.enum(THERMOCOUPLE_TYPES);\nexport type ThermocoupleType = z.infer<typeof thermocoupleTypeZ>;\n\n/** BaseReadChannel carries the fields every LabJack read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from (e.g. 'AIN0', 'DIO4'). */\n port: z.string().default(\"\"),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every LabJack write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to (e.g. 'DAC0', 'DIO4'). */\n port: z.string().default(\"\"),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ.extend({\n tcpScanMultiplier: z.int32().default(10),\n});\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** LinearScale maps raw values to engineering units with a slope and offset. */\nexport const linearScaleZ = z.object({\n type: z.literal(\"linear\"),\n /** slope is the multiplier applied to the raw value. */\n slope: z.number().default(1),\n /** offset is the offset added after scaling. */\n offset: z.number().default(0),\n});\nexport interface LinearScale extends z.infer<typeof linearScaleZ> {}\n\n/** MapScale maps a raw range linearly onto a scaled range. */\nexport const mapScaleZ = z.object({\n type: z.literal(\"map\"),\n /** preScaledMin is the lower bound of the raw input range. */\n preScaledMin: z.number().default(0),\n /** preScaledMax is the upper bound of the raw input range. */\n preScaledMax: z.number().default(1),\n /** scaledMin is the lower bound of the scaled output range. */\n scaledMin: z.number().default(0),\n /** scaledMax is the upper bound of the scaled output range. */\n scaledMax: z.number().default(1),\n});\nexport interface MapScale extends z.infer<typeof mapScaleZ> {}\n\n/** NoneScale applies no scaling; the raw value is used directly. */\nexport const noneScaleZ = z.object({\n type: z.literal(\"none\"),\n});\nexport interface NoneScale extends z.infer<typeof noneScaleZ> {}\n\nexport const SCALE_TYPES = [\"linear\", \"map\", \"none\"] as const;\nexport const scaleTypeZ = z.enum(SCALE_TYPES);\nexport type ScaleType = z.infer<typeof scaleTypeZ>;\n\n/** Scale determines how raw sensor values are transformed to engineering units. */\nexport const scaleZ = z.discriminatedUnion(\"type\", [\n linearScaleZ,\n mapScaleZ,\n noneScaleZ,\n]);\nexport type Scale = LinearScale | MapScale | NoneScale;\n\nexport const SCALE_SCHEMAS: {\n [K in ScaleType]: z.ZodType<Extract<Scale, { type: K }>>;\n} = {\n linear: linearScaleZ,\n map: mapScaleZ,\n none: noneScaleZ,\n};\n\n/** AnalogWriteChannel drives an analog output on a DAC port. */\nexport const analogWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"analog\"),\n port: z.string().default(\"DAC0\"),\n});\nexport interface AnalogWriteChannel extends z.infer<typeof analogWriteChannelZ> {}\n\n/** DigitalWriteChannel drives a digital output line on a DIO port. */\nexport const digitalWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"digital\"),\n port: z.string().default(\"DIO4\"),\n});\nexport interface DigitalWriteChannel extends z.infer<typeof digitalWriteChannelZ> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"analog\", \"digital\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single LabJack write channel. The type field selects the output\n * mode.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n analogWriteChannelZ,\n digitalWriteChannelZ,\n]);\nexport type WriteChannel = AnalogWriteChannel | DigitalWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n analog: analogWriteChannelZ,\n digital: digitalWriteChannelZ,\n};\n\n/** AnalogReadChannel reads a voltage from an analog input port. */\nexport const analogReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"analog\"),\n port: z.string().default(\"AIN0\"),\n /** range is the upper bound of the voltage input range, in Volts. */\n range: z.number().default(10),\n /**\n * negChan is the negative channel for differential readings on T7 devices. 199\n * selects single-ended.\n */\n negChan: z.int32().default(199),\n /** scale is the scale applied to raw samples after acquisition. */\n scale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface AnalogReadChannel extends z.infer<typeof analogReadChannelZ> {}\n\n/** DigitalReadChannel reads a digital input line. */\nexport const digitalReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"digital\"),\n port: z.string().default(\"DIO4\"),\n});\nexport interface DigitalReadChannel extends z.infer<typeof digitalReadChannelZ> {}\n\n/** ThermocoupleReadChannel reads temperature from a thermocouple. */\nexport const thermocoupleReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"thermocouple\"),\n /** port is the AIN port the thermocouple's positive lead is wired to. */\n port: z.string().default(\"AIN0\"),\n /** thermocoupleType selects the thermocouple alloy type. */\n thermocoupleType: thermocoupleTypeZ.default(\"K\"),\n /**\n * negChan is the AIN port of the thermocouple's negative lead on T7 devices. 199\n * selects single-ended.\n */\n negChan: z.int32().default(199),\n /**\n * cjcSource selects the cold-junction-compensation source: the device sensor\n * ('TEMPERATURE_DEVICE_K'), ambient air ('TEMPERATURE_AIR_K'), or an AIN port (e.g.\n * 'AIN2').\n */\n cjcSource: z.string().default(\"TEMPERATURE_DEVICE_K\"),\n /** cjcSlope is the CJC voltage-to-temperature slope, in Kelvin per Volt. */\n cjcSlope: z.number().default(1),\n /** cjcOffset is the CJC temperature offset, in Kelvins. */\n cjcOffset: z.number().default(0),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"K\"),\n /** scale is the scale applied to raw samples after acquisition. */\n scale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface ThermocoupleReadChannel extends z.infer<\n typeof thermocoupleReadChannelZ\n> {}\n\nexport const READ_CHANNEL_TYPES = [\"analog\", \"digital\", \"thermocouple\"] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single LabJack read channel. The type field selects the input mode\n * and the fields that accompany it.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n analogReadChannelZ,\n digitalReadChannelZ,\n thermocoupleReadChannelZ,\n]);\nexport type ReadChannel =\n AnalogReadChannel | DigitalReadChannel | ThermocoupleReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n analog: analogReadChannelZ,\n digital: digitalReadChannelZ,\n thermocouple: thermocoupleReadChannelZ,\n};\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n stateRate: z.number().default(10),\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n\nexport const readConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: readChannelZ.array().default(() => []),\n deviceScanBacklogWarnOnCount: z.uint32().default(0),\n ljmScanBacklogWarnOnCount: z.uint32().default(0),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/labjack/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id, zod } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** RegisterValue interprets one or more 16-bit registers as a single typed value. */\nexport const registerValueZ = z.object({\n /** dataType is the data type the register contents are interpreted as. */\n dataType: z.string().default(\"uint8\"),\n /** bytesSwapped is true when the byte order within each 16-bit word is swapped. */\n bytesSwapped: z.boolean().default(false),\n /** wordsSwapped is true when the word order of multi-register values is swapped. */\n wordsSwapped: z.boolean().default(false),\n});\nexport interface RegisterValue extends z.infer<typeof registerValueZ> {}\n\n/** BaseReadChannel carries the fields every Modbus read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that samples are written to. */\n channel: channel.keyZ.default(0),\n /** address is the Modbus address the channel reads from. */\n address: zod.uint16.default(0),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every Modbus write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel commands are read from. */\n channel: channel.keyZ.default(0),\n /** address is the Modbus address the channel writes to. */\n address: zod.uint16.default(0),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** CoilReadChannel reads a single bit from a coil. */\nexport const coilReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"coil\"),\n});\nexport interface CoilReadChannel extends z.infer<typeof coilReadChannelZ> {}\n\n/** DiscreteInputReadChannel reads a single bit from a discrete input. */\nexport const discreteInputReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"discrete_input\"),\n});\nexport interface DiscreteInputReadChannel extends z.infer<\n typeof discreteInputReadChannelZ\n> {}\n\n/**\n * HoldingRegisterReadChannel reads a typed value from one or more holding registers.\n */\nexport const holdingRegisterReadChannelZ = baseReadChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"holding_register\"),\n /** stringLength is the length, in characters, when data_type is a string. */\n stringLength: z.int32().default(0),\n });\nexport interface HoldingRegisterReadChannel extends z.infer<\n typeof holdingRegisterReadChannelZ\n> {}\n\n/** InputRegisterReadChannel reads a typed value from one or more input registers. */\nexport const inputRegisterReadChannelZ = baseReadChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"input_register\"),\n /** stringLength is the length, in characters, when data_type is a string. */\n stringLength: z.int32().default(0),\n });\nexport interface InputRegisterReadChannel extends z.infer<\n typeof inputRegisterReadChannelZ\n> {}\n\nexport const READ_CHANNEL_TYPES = [\n \"coil\",\n \"discrete_input\",\n \"holding_register\",\n \"input_register\",\n] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single Modbus read channel. The type field selects the register\n * space the channel reads from and the fields that accompany it.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n coilReadChannelZ,\n discreteInputReadChannelZ,\n holdingRegisterReadChannelZ,\n inputRegisterReadChannelZ,\n]);\nexport type ReadChannel =\n | CoilReadChannel\n | DiscreteInputReadChannel\n | HoldingRegisterReadChannel\n | InputRegisterReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n coil: coilReadChannelZ,\n discrete_input: discreteInputReadChannelZ,\n holding_register: holdingRegisterReadChannelZ,\n input_register: inputRegisterReadChannelZ,\n};\n\n/** CoilWriteChannel writes a single bit to a coil. */\nexport const coilWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"coil\"),\n});\nexport interface CoilWriteChannel extends z.infer<typeof coilWriteChannelZ> {}\n\n/**\n * HoldingRegisterWriteChannel writes a typed value to one or more holding registers.\n */\nexport const holdingRegisterWriteChannelZ = baseWriteChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"holding_register\"),\n });\nexport interface HoldingRegisterWriteChannel extends z.infer<\n typeof holdingRegisterWriteChannelZ\n> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"coil\", \"holding_register\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single Modbus write channel. The type field selects the register\n * space the channel writes to and the fields that accompany it.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n coilWriteChannelZ,\n holdingRegisterWriteChannelZ,\n]);\nexport type WriteChannel = CoilWriteChannel | HoldingRegisterWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n coil: coilWriteChannelZ,\n holding_register: holdingRegisterWriteChannelZ,\n};\n\nexport const readConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: readChannelZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/modbus/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TERMINAL_CONFIGS = [\n \"Cfg_Default\",\n \"RSE\",\n \"NRSE\",\n \"Diff\",\n \"PseudoDiff\",\n] as const;\nexport const terminalConfigZ = z.enum(TERMINAL_CONFIGS);\nexport type TerminalConfig = z.infer<typeof terminalConfigZ>;\n\nexport const EXCITATION_SOURCES = [\"Internal\", \"External\", \"None\"] as const;\nexport const excitationSourceZ = z.enum(EXCITATION_SOURCES);\nexport type ExcitationSource = z.infer<typeof excitationSourceZ>;\n\nexport const BRIDGE_CONFIGS = [\"FullBridge\", \"HalfBridge\", \"QuarterBridge\"] as const;\nexport const bridgeConfigZ = z.enum(BRIDGE_CONFIGS);\nexport type BridgeConfig = z.infer<typeof bridgeConfigZ>;\n\nexport const ELECTRICAL_UNITS = [\"mVoltsPerVolt\", \"VoltsPerVolt\"] as const;\nexport const electricalUnitsZ = z.enum(ELECTRICAL_UNITS);\nexport type ElectricalUnits = z.infer<typeof electricalUnitsZ>;\n\nexport const RESISTANCE_CONFIGS = [\"2Wire\", \"3Wire\", \"4Wire\"] as const;\nexport const resistanceConfigZ = z.enum(RESISTANCE_CONFIGS);\nexport type ResistanceConfig = z.infer<typeof resistanceConfigZ>;\n\nexport const Z_INDEX_PHASES = [\n \"AHighBHigh\",\n \"AHighBLow\",\n \"ALowBHigh\",\n \"ALowBLow\",\n] as const;\nexport const zIndexPhaseZ = z.enum(Z_INDEX_PHASES);\nexport type ZIndexPhase = z.infer<typeof zIndexPhaseZ>;\n\nexport const UNITS = [\n \"Volts\",\n \"Amps\",\n \"DegF\",\n \"DegC\",\n \"DegR\",\n \"Kelvins\",\n \"Strain\",\n \"Ohms\",\n \"Hz\",\n \"Seconds\",\n \"Meters\",\n \"Inches\",\n \"Degrees\",\n \"Radians\",\n \"g\",\n \"MetersPerSecondSquared\",\n \"Newtons\",\n \"Pounds\",\n \"KilogramForce\",\n \"PoundsPerSquareInch\",\n \"Bar\",\n \"Pascals\",\n \"VoltsPerVolt\",\n \"mVoltsPerVolt\",\n \"NewtonMeters\",\n \"InchPounds\",\n \"InchOunces\",\n \"FootPounds\",\n] as const;\nexport const unitsZ = z.enum(UNITS);\nexport type Units = z.infer<typeof unitsZ>;\n\nexport const ACCEL_SENSITIVITY_UNITS = [\"mVoltsPerG\", \"VoltsPerG\"] as const;\nexport const accelSensitivityUnitsZ = z.enum(ACCEL_SENSITIVITY_UNITS);\nexport type AccelSensitivityUnits = z.infer<typeof accelSensitivityUnitsZ>;\n\nexport const ACCEL_UNITS = [\n \"g\",\n \"MetersPerSecondSquared\",\n \"InchesPerSecondSquared\",\n] as const;\nexport const accelUnitsZ = z.enum(ACCEL_UNITS);\nexport type AccelUnits = z.infer<typeof accelUnitsZ>;\n\nexport const FORCE_UNITS = [\"Newtons\", \"Pounds\", \"KilogramForce\"] as const;\nexport const forceUnitsZ = z.enum(FORCE_UNITS);\nexport type ForceUnits = z.infer<typeof forceUnitsZ>;\n\nexport const SHUNT_RESISTOR_LOCATIONS = [\"Default\", \"Internal\", \"External\"] as const;\nexport const shuntResistorLocationZ = z.enum(SHUNT_RESISTOR_LOCATIONS);\nexport type ShuntResistorLocation = z.infer<typeof shuntResistorLocationZ>;\n\nexport const FORCE_SENSITIVITY_UNITS = [\"mVoltsPerNewton\", \"mVoltsPerPound\"] as const;\nexport const forceSensitivityUnitsZ = z.enum(FORCE_SENSITIVITY_UNITS);\nexport type ForceSensitivityUnits = z.infer<typeof forceSensitivityUnitsZ>;\n\nexport const PRESSURE_UNITS = [\"PoundsPerSquareInch\", \"Pascals\", \"Bar\"] as const;\nexport const pressureUnitsZ = z.enum(PRESSURE_UNITS);\nexport type PressureUnits = z.infer<typeof pressureUnitsZ>;\n\nexport const TORQUE_UNITS = [\n \"NewtonMeters\",\n \"InchOunces\",\n \"InchPounds\",\n \"FootPounds\",\n] as const;\nexport const torqueUnitsZ = z.enum(TORQUE_UNITS);\nexport type TorqueUnits = z.infer<typeof torqueUnitsZ>;\n\nexport const TEMPERATURE_UNITS = [\"DegC\", \"DegF\", \"Kelvins\", \"DegR\"] as const;\nexport const temperatureUnitsZ = z.enum(TEMPERATURE_UNITS);\nexport type TemperatureUnits = z.infer<typeof temperatureUnitsZ>;\n\nexport const RTD_TYPES = [\n \"Pt3750\",\n \"Pt3851\",\n \"Pt3911\",\n \"Pt3916\",\n \"Pt3920\",\n \"Pt3928\",\n] as const;\nexport const rtdTypeZ = z.enum(RTD_TYPES);\nexport type RTDType = z.infer<typeof rtdTypeZ>;\n\nexport const STRAIN_CONFIGS = [\n \"FullBridgeI\",\n \"FullBridgeII\",\n \"FullBridgeIII\",\n \"HalfBridgeI\",\n \"HalfBridgeII\",\n \"QuarterBridgeI\",\n \"QuarterBridgeII\",\n] as const;\nexport const strainConfigZ = z.enum(STRAIN_CONFIGS);\nexport type StrainConfig = z.infer<typeof strainConfigZ>;\n\nexport const THERMOCOUPLE_TYPES = [\"J\", \"K\", \"N\", \"R\", \"S\", \"T\", \"B\", \"E\"] as const;\nexport const thermocoupleTypeZ = z.enum(THERMOCOUPLE_TYPES);\nexport type ThermocoupleType = z.infer<typeof thermocoupleTypeZ>;\n\nexport const VELOCITY_UNITS = [\"MetersPerSecond\", \"InchesPerSecond\"] as const;\nexport const velocityUnitsZ = z.enum(VELOCITY_UNITS);\nexport type VelocityUnits = z.infer<typeof velocityUnitsZ>;\n\nexport const VELOCITY_SENSITIVITY_UNITS = [\n \"MillivoltsPerMillimeterPerSecond\",\n \"MilliVoltsPerInchPerSecond\",\n] as const;\nexport const velocitySensitivityUnitsZ = z.enum(VELOCITY_SENSITIVITY_UNITS);\nexport type VelocitySensitivityUnits = z.infer<typeof velocitySensitivityUnitsZ>;\n\nexport const CHARGE_UNITS = [\"Coulombs\", \"PicoCoulombs\"] as const;\nexport const chargeUnitsZ = z.enum(CHARGE_UNITS);\nexport type ChargeUnits = z.infer<typeof chargeUnitsZ>;\n\nexport const CI_EDGES = [\"Rising\", \"Falling\"] as const;\nexport const ciEdgeZ = z.enum(CI_EDGES);\nexport type CIEdge = z.infer<typeof ciEdgeZ>;\n\nexport const CI_MEAS_METHODS = [\n \"LowFreq1Ctr\",\n \"HighFreq2Ctr\",\n \"LargeRng2Ctr\",\n \"DynamicAvg\",\n] as const;\nexport const ciMeasMethodZ = z.enum(CI_MEAS_METHODS);\nexport type CIMeasMethod = z.infer<typeof ciMeasMethodZ>;\n\nexport const CI_FREQ_UNITS = [\"Hz\", \"Ticks\"] as const;\nexport const ciFreqUnitsZ = z.enum(CI_FREQ_UNITS);\nexport type CIFreqUnits = z.infer<typeof ciFreqUnitsZ>;\n\nexport const CI_TIME_UNITS = [\"Seconds\", \"Ticks\"] as const;\nexport const ciTimeUnitsZ = z.enum(CI_TIME_UNITS);\nexport type CITimeUnits = z.infer<typeof ciTimeUnitsZ>;\n\nexport const CI_COUNT_DIRECTIONS = [\n \"CountUp\",\n \"CountDown\",\n \"ExternallyControlled\",\n] as const;\nexport const ciCountDirectionZ = z.enum(CI_COUNT_DIRECTIONS);\nexport type CICountDirection = z.infer<typeof ciCountDirectionZ>;\n\nexport const CI_DECODING_TYPES = [\"X1\", \"X2\", \"X4\", \"TwoPulse\"] as const;\nexport const ciDecodingTypeZ = z.enum(CI_DECODING_TYPES);\nexport type CIDecodingType = z.infer<typeof ciDecodingTypeZ>;\n\nexport const CI_LINEAR_VELOCITY_UNITS = [\"m/s\", \"in/s\"] as const;\nexport const ciLinearVelocityUnitsZ = z.enum(CI_LINEAR_VELOCITY_UNITS);\nexport type CILinearVelocityUnits = z.infer<typeof ciLinearVelocityUnitsZ>;\n\nexport const CI_ANGULAR_VELOCITY_UNITS = [\"RPM\", \"Radians/s\", \"Degrees/s\"] as const;\nexport const ciAngularVelocityUnitsZ = z.enum(CI_ANGULAR_VELOCITY_UNITS);\nexport type CIAngularVelocityUnits = z.infer<typeof ciAngularVelocityUnitsZ>;\n\nexport const CI_LINEAR_POSITION_UNITS = [\"Meters\", \"Inches\", \"Ticks\"] as const;\nexport const ciLinearPositionUnitsZ = z.enum(CI_LINEAR_POSITION_UNITS);\nexport type CILinearPositionUnits = z.infer<typeof ciLinearPositionUnitsZ>;\n\nexport const CI_ANGULAR_POSITION_UNITS = [\"Degrees\", \"Radians\", \"Ticks\"] as const;\nexport const ciAngularPositionUnitsZ = z.enum(CI_ANGULAR_POSITION_UNITS);\nexport type CIAngularPositionUnits = z.infer<typeof ciAngularPositionUnitsZ>;\n\nexport const WAVE_TYPES = [\"Sine\", \"Triangle\", \"Square\", \"Sawtooth\"] as const;\nexport const waveTypeZ = z.enum(WAVE_TYPES);\nexport type WaveType = z.infer<typeof waveTypeZ>;\n\nexport const ACCEL_CHARGE_SENSITIVITY_UNITS = [\n \"PicoCoulombsPerG\",\n \"PicoCoulombsPerMetersPerSecondSquared\",\n \"PicoCoulombsPerInchesPerSecondSquared\",\n] as const;\nexport const accelChargeSensitivityUnitsZ = z.enum(ACCEL_CHARGE_SENSITIVITY_UNITS);\nexport type AccelChargeSensitivityUnits = z.infer<typeof accelChargeSensitivityUnitsZ>;\n\n/** MinMaxVal bounds the expected signal range in scaled units. */\nexport const minMaxValZ = z.object({\n /** minVal is the minimum expected value, in scaled units. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected value, in scaled units. */\n maxVal: z.number().default(1),\n});\nexport interface MinMaxVal extends z.infer<typeof minMaxValZ> {}\n\n/** Terminal configures the terminal wiring of an analog input channel. */\nexport const terminalZ = z.object({\n /** terminalConfig selects the terminal configuration (RSE, NRSE, Diff, ...). */\n terminalConfig: terminalConfigZ.default(\"Cfg_Default\"),\n});\nexport interface Terminal extends z.infer<typeof terminalZ> {}\n\n/** Sensitivity specifies a sensor's sensitivity rating. */\nexport const sensitivityZ = z.object({\n /** sensitivity is the sensor's sensitivity rating. */\n sensitivity: z.number().default(0),\n});\nexport interface Sensitivity extends z.infer<typeof sensitivityZ> {}\n\n/** CurrentExcitation configures the current excitation supplied to a sensor. */\nexport const currentExcitationZ = z.object({\n /** currentExcitSource selects the source of the current excitation signal. */\n currentExcitSource: excitationSourceZ.default(\"Internal\"),\n /** currentExcitVal is the current excitation level, in Amps. */\n currentExcitVal: z.number().default(0),\n});\nexport interface CurrentExcitation extends z.infer<typeof currentExcitationZ> {}\n\n/** VoltageExcitation configures the voltage excitation supplied to a sensor. */\nexport const voltageExcitationZ = z.object({\n /** voltageExcitSource selects the source of the voltage excitation signal. */\n voltageExcitSource: excitationSourceZ.default(\"Internal\"),\n /** voltageExcitVal is the voltage excitation level, in Volts. */\n voltageExcitVal: z.number().default(0),\n});\nexport interface VoltageExcitation extends z.infer<typeof voltageExcitationZ> {}\n\n/** Bridge configures the wiring and nominal resistance of a bridge-based sensor. */\nexport const bridgeZ = z.object({\n /** bridgeConfig selects the physical bridge wiring. */\n bridgeConfig: bridgeConfigZ.default(\"FullBridge\"),\n /** nominalBridgeResistance is the nominal resistance of the bridge, in Ohms. */\n nominalBridgeResistance: z.number().default(1),\n});\nexport interface Bridge extends z.infer<typeof bridgeZ> {}\n\n/**\n * BridgePolynomial scales bridge electrical output to physical units with a polynomial.\n */\nexport const bridgePolynomialZ = z.object({\n /** forwardCoeffs are the coefficients mapping electrical to physical values. */\n forwardCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** reverseCoeffs are the coefficients mapping physical to electrical values. */\n reverseCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** electricalUnits are the electrical output units of the bridge. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n});\nexport interface BridgePolynomial extends z.infer<typeof bridgePolynomialZ> {}\n\n/** Resistance configures the wiring of a resistance measurement. */\nexport const resistanceZ = z.object({\n /**\n * resistanceConfig selects the number of wires used for the resistance measurement.\n */\n resistanceConfig: resistanceConfigZ.default(\"2Wire\"),\n});\nexport interface Resistance extends z.infer<typeof resistanceZ> {}\n\n/** Table scales bridge electrical output to physical units with a lookup table. */\nexport const tableZ = z.object({\n /** electricalVals are the electrical breakpoints of the calibration table. */\n electricalVals: z\n .number()\n .array()\n .default(() => []),\n /** electricalUnits are the units of the electrical breakpoints. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n /**\n * physicalVals are the physical values corresponding to each electrical breakpoint.\n */\n physicalVals: z\n .number()\n .array()\n .default(() => []),\n});\nexport interface Table extends z.infer<typeof tableZ> {}\n\n/**\n * TwoPointLin scales bridge electrical output to physical units between two calibration\n * points.\n */\nexport const twoPointLinZ = z.object({\n /** firstElectricalVal is the first electrical calibration point. */\n firstElectricalVal: z.number().default(0),\n /** secondElectricalVal is the second electrical calibration point. */\n secondElectricalVal: z.number().default(1),\n /** electricalUnits are the units of the electrical calibration points. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n /** firstPhysicalVal is the physical value at the first electrical point. */\n firstPhysicalVal: z.number().default(0),\n /** secondPhysicalVal is the physical value at the second electrical point. */\n secondPhysicalVal: z.number().default(1),\n});\nexport interface TwoPointLin extends z.infer<typeof twoPointLinZ> {}\n\n/** BaseAIChannel carries the fields every NI analog input channel shares. */\nexport const baseAIChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from. */\n port: z.int32().default(0),\n /** device is the key of the device the channel belongs to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseAIChannel extends z.infer<typeof baseAIChannelZ> {}\n\n/** ZIndex configures the Z-index reset behavior of an encoder. */\nexport const zIndexZ = z.object({\n /** zIndexEnabled is true when the encoder's Z index resets the count. */\n zIndexEnabled: z.boolean().default(false),\n /** zIndexVal is the value the measurement resets to when the Z index is active. */\n zIndexVal: z.number().default(0),\n /** zIndexPhase selects the A/B states at which the Z index is active. */\n zIndexPhase: zIndexPhaseZ.default(\"AHighBHigh\"),\n /** terminalZ is the terminal the Z index signal is wired to. */\n terminalZ: z.string().default(\"\"),\n});\nexport interface ZIndex extends z.infer<typeof zIndexZ> {}\n\n/** BaseCIChannel carries the fields every NI counter input channel shares. */\nexport const baseCIChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical counter the channel uses. */\n port: z.int32().default(0),\n /** device is the key of the device the counter belongs to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseCIChannel extends z.infer<typeof baseCIChannelZ> {}\n\n/** BaseAOChannel carries the fields every NI analog output channel shares. */\nexport const baseAOChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to. */\n port: z.int32().default(0),\n});\nexport interface BaseAOChannel extends z.infer<typeof baseAOChannelZ> {}\n\n/** DIChannel is a digital input channel the task acquires from. */\nexport const diChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from. */\n port: z.int32().default(0),\n /** line is the digital line within the port the channel reads from. */\n line: z.int32().default(0),\n});\nexport interface DIChannel extends z.infer<typeof diChannelZ> {}\n\n/** DOChannel is a digital output channel the task drives. */\nexport const doChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to. */\n port: z.int32().default(0),\n /** line is the digital line within the port the channel writes to. */\n line: z.int32().default(0),\n});\nexport interface DOChannel extends z.infer<typeof doChannelZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n stateRate: z.number().default(10),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n\nexport const scanConfigZ = task.scanConfigZ.extend({\n ignoredModels: z.string().array().default([\"^cRIO.*\", \"^nown.*\"]),\n});\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** BuiltInCJC reads the reference temperature from the device's own sensor. */\nexport const builtInCJCZ = z.object({\n source: z.literal(\"built_in\"),\n});\nexport interface BuiltInCJC extends z.infer<typeof builtInCJCZ> {}\n\n/** ConstValCJC uses a fixed reference temperature. */\nexport const constValCJCZ = z.object({\n source: z.literal(\"const_val\"),\n /** val is the reference temperature, in the channel's units. */\n val: z.number().default(0),\n});\nexport interface ConstValCJC extends z.infer<typeof constValCJCZ> {}\n\n/** ChanCJC reads the reference temperature from another channel. */\nexport const chanCJCZ = z.object({\n source: z.literal(\"chan\"),\n /** port is the port of the channel that measures the reference. */\n port: z.int32().default(0),\n});\nexport interface ChanCJC extends z.infer<typeof chanCJCZ> {}\n\nexport const CJC_TYPES = [\"built_in\", \"const_val\", \"chan\"] as const;\nexport const cjcTypeZ = z.enum(CJC_TYPES);\nexport type CJCType = z.infer<typeof cjcTypeZ>;\n\n/**\n * CJC is the cold-junction compensation for a thermocouple. The source selects where\n * the reference temperature comes from.\n */\nexport const cjcZ = z.discriminatedUnion(\"source\", [\n builtInCJCZ,\n constValCJCZ,\n chanCJCZ,\n]);\nexport type CJC = BuiltInCJC | ConstValCJC | ChanCJC;\n\nexport const CJC_SCHEMAS: {\n [K in CJCType]: z.ZodType<Extract<CJC, { source: K }>>;\n} = {\n built_in: builtInCJCZ,\n const_val: constValCJCZ,\n chan: chanCJCZ,\n};\n\n/** LinearScale maps raw values to engineering units with a slope and intercept. */\nexport const linearScaleZ = z.object({\n type: z.literal(\"linear\"),\n /** slope is the multiplier applied to the raw value. */\n slope: z.number().default(1),\n /** yIntercept is the offset added after scaling. */\n yIntercept: z.number().default(0),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface LinearScale extends z.infer<typeof linearScaleZ> {}\n\n/** MapScale maps a raw range linearly onto a scaled range. */\nexport const mapScaleZ = z.object({\n type: z.literal(\"map\"),\n /** preScaledMin is the lower bound of the raw input range. */\n preScaledMin: z.number().default(0),\n /** preScaledMax is the upper bound of the raw input range. */\n preScaledMax: z.number().default(1),\n /** scaledMin is the lower bound of the scaled output range. */\n scaledMin: z.number().default(0),\n /** scaledMax is the upper bound of the scaled output range. */\n scaledMax: z.number().default(1),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface MapScale extends z.infer<typeof mapScaleZ> {}\n\n/** TableScale maps raw values to engineering units via a lookup table. */\nexport const tableScaleZ = z.object({\n type: z.literal(\"table\"),\n /** preScaledVals are the raw breakpoints, monotonically increasing. */\n preScaledVals: z\n .number()\n .array()\n .default(() => []),\n /** scaledVals are the engineering-unit values at each breakpoint. */\n scaledVals: z\n .number()\n .array()\n .default(() => []),\n /** preScaledUnits are the units of the raw values before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the values after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface TableScale extends z.infer<typeof tableScaleZ> {}\n\n/** PolynomialScale maps raw values to engineering units with a polynomial. */\nexport const polynomialScaleZ = z.object({\n type: z.literal(\"polynomial\"),\n /** forwardCoeffs are the coefficients mapping pre-scaled to scaled values. */\n forwardCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** reverseCoeffs are the coefficients mapping scaled to pre-scaled values. */\n reverseCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface PolynomialScale extends z.infer<typeof polynomialScaleZ> {}\n\n/** NoneScale applies no scaling; the raw value is used directly. */\nexport const noneScaleZ = z.object({\n type: z.literal(\"none\"),\n});\nexport interface NoneScale extends z.infer<typeof noneScaleZ> {}\n\nexport const SCALE_TYPES = [\"linear\", \"map\", \"table\", \"polynomial\", \"none\"] as const;\nexport const scaleTypeZ = z.enum(SCALE_TYPES);\nexport type ScaleType = z.infer<typeof scaleTypeZ>;\n\n/** Scale determines how raw sensor values are transformed to engineering units. */\nexport const scaleZ = z.discriminatedUnion(\"type\", [\n linearScaleZ,\n mapScaleZ,\n tableScaleZ,\n polynomialScaleZ,\n noneScaleZ,\n]);\nexport type Scale = LinearScale | MapScale | TableScale | PolynomialScale | NoneScale;\n\nexport const SCALE_SCHEMAS: {\n [K in ScaleType]: z.ZodType<Extract<Scale, { type: K }>>;\n} = {\n linear: linearScaleZ,\n map: mapScaleZ,\n table: tableScaleZ,\n polynomial: polynomialScaleZ,\n none: noneScaleZ,\n};\n\nexport const digitalReadConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: diChannelZ.array().default(() => []),\n});\nexport interface DigitalReadConfig extends z.infer<typeof digitalReadConfigZ> {}\n\nexport const digitalWriteConfigZ = writeConfigZ.extend({\n channels: doChannelZ.array().default(() => []),\n});\nexport interface DigitalWriteConfig extends z.infer<typeof digitalWriteConfigZ> {}\n\n/** CustomScale applies a user-defined scale to the raw measurement. */\nexport const customScaleZ = z.object({\n /** customScale is the scale applied to the raw measurement. */\n customScale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface CustomScale extends z.infer<typeof customScaleZ> {}\n\n/** AIVoltageChannel reads a voltage. */\nexport const aiVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage\"),\n });\nexport interface AIVoltageChannel extends z.infer<typeof aiVoltageChannelZ> {}\n\n/** AIAccelChannel reads acceleration from an accelerometer. */\nexport const aiAccelChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelSensitivityUnitsZ.default(\"mVoltsPerG\"),\n });\nexport interface AIAccelChannel extends z.infer<typeof aiAccelChannelZ> {}\n\n/** AIBridgeChannel reads a generic bridge-based sensor. */\nexport const aiBridgeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_bridge\"),\n /** units are the electrical output units of the bridge. */\n units: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n });\nexport interface AIBridgeChannel extends z.infer<typeof aiBridgeChannelZ> {}\n\n/** AICurrentChannel reads a current. */\nexport const aiCurrentChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_current\"),\n /** shuntResistorLoc selects where the shunt resistor is located. */\n shuntResistorLoc: shuntResistorLocationZ.default(\"Default\"),\n /** extShuntResistorVal is the external shunt resistor value, in Ohms. */\n extShuntResistorVal: z.number().default(1),\n });\nexport interface AICurrentChannel extends z.infer<typeof aiCurrentChannelZ> {}\n\n/** AIForceBridgeTableChannel reads force from a bridge with a calibration table. */\nexport const aiForceBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_table\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgeTableChannel extends z.infer<\n typeof aiForceBridgeTableChannelZ\n> {}\n\n/**\n * AIForceBridgeTwoPointLinChannel reads force from a bridge with two-point linear\n * calibration.\n */\nexport const aiForceBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_two_point_lin\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgeTwoPointLinChannel extends z.infer<\n typeof aiForceBridgeTwoPointLinChannelZ\n> {}\n\n/** AIForceIEPEChannel reads force from an IEPE sensor. */\nexport const aiForceIEPEChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_iepe\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** sensitivityUnits are the units of the IEPE sensor sensitivity. */\n sensitivityUnits: forceSensitivityUnitsZ.default(\"mVoltsPerNewton\"),\n });\nexport interface AIForceIEPEChannel extends z.infer<typeof aiForceIEPEChannelZ> {}\n\n/** AIMicrophoneChannel reads sound pressure from a microphone. */\nexport const aiMicrophoneChannelZ = baseAIChannelZ\n .extend(terminalZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_microphone\"),\n /** micSensitivity is the microphone sensitivity, in mV/Pa. */\n micSensitivity: z.number().default(0),\n /** maxSndPressLevel is the maximum expected sound pressure level, in dB. */\n maxSndPressLevel: z.number().default(0),\n });\nexport interface AIMicrophoneChannel extends z.infer<typeof aiMicrophoneChannelZ> {}\n\n/**\n * AIPressureBridgeTableChannel reads pressure from a bridge with a calibration table.\n */\nexport const aiPressureBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_table\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgeTableChannel extends z.infer<\n typeof aiPressureBridgeTableChannelZ\n> {}\n\n/**\n * AIPressureBridgeTwoPointLinChannel reads pressure from a bridge with two-point linear\n * calibration.\n */\nexport const aiPressureBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_two_point_lin\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgeTwoPointLinChannel extends z.infer<\n typeof aiPressureBridgeTwoPointLinChannelZ\n> {}\n\n/** AIResistanceChannel reads a resistance. */\nexport const aiResistanceChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_resistance\"),\n });\nexport interface AIResistanceChannel extends z.infer<typeof aiResistanceChannelZ> {}\n\n/** AIRTDChannel reads temperature from an RTD. */\nexport const aiRTDChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_rtd\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** rtdType selects the RTD resistance-temperature curve. */\n rtdType: rtdTypeZ.default(\"Pt3750\"),\n /** r0 is the sensor resistance at 0 degrees Celsius, in Ohms. */\n r0: z.number().default(0),\n });\nexport interface AIRTDChannel extends z.infer<typeof aiRTDChannelZ> {}\n\n/** AIStrainGaugeChannel reads strain from a strain gauge. */\nexport const aiStrainGaugeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_strain_gauge\"),\n /** strainConfig selects the strain-gauge bridge configuration. */\n strainConfig: strainConfigZ.default(\"FullBridgeI\"),\n /** gageFactor is the gauge factor of the strain gauge. */\n gageFactor: z.number().default(0),\n /** initialBridgeVoltage is the bridge output voltage in the unloaded state. */\n initialBridgeVoltage: z.number().default(0),\n /** nominalGageResistance is the nominal gauge resistance, in Ohms. */\n nominalGageResistance: z.number().default(0),\n /** poissonRatio is the Poisson ratio of the measured material. */\n poissonRatio: z.number().default(0),\n /** leadWireResistance is the resistance of the lead wires, in Ohms. */\n leadWireResistance: z.number().default(0),\n });\nexport interface AIStrainGaugeChannel extends z.infer<typeof aiStrainGaugeChannelZ> {}\n\n/** AITempBuiltinChannel reads temperature from the device's built-in sensor. */\nexport const aiTempBuiltinChannelZ = baseAIChannelZ.omit({ port: true }).extend({\n type: z.literal(\"ai_temp_builtin\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n});\nexport interface AITempBuiltinChannel extends z.infer<typeof aiTempBuiltinChannelZ> {}\n\n/** AIThermocoupleChannel reads temperature from a thermocouple. */\nexport const aiThermocoupleChannelZ = baseAIChannelZ.extend(minMaxValZ.shape).extend({\n type: z.literal(\"ai_thermocouple\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** thermocoupleType selects the thermocouple alloy type. */\n thermocoupleType: thermocoupleTypeZ.default(\"J\"),\n /** cjc is the cold-junction compensation applied to the reading. */\n cjc: cjcZ.prefault({ source: \"built_in\" }),\n});\nexport interface AIThermocoupleChannel extends z.infer<typeof aiThermocoupleChannelZ> {}\n\n/** AITorqueBridgeTableChannel reads torque from a bridge with a calibration table. */\nexport const aiTorqueBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_table\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgeTableChannel extends z.infer<\n typeof aiTorqueBridgeTableChannelZ\n> {}\n\n/**\n * AITorqueBridgeTwoPointLinChannel reads torque from a bridge with two-point linear\n * calibration.\n */\nexport const aiTorqueBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_two_point_lin\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgeTwoPointLinChannel extends z.infer<\n typeof aiTorqueBridgeTwoPointLinChannelZ\n> {}\n\n/** AIVelocityIEPEChannel reads velocity from an IEPE sensor. */\nexport const aiVelocityIEPEChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_velocity_iepe\"),\n /** units are the units of the velocity measurement. */\n units: velocityUnitsZ.default(\"MetersPerSecond\"),\n /** sensitivityUnits are the units of the IEPE sensor sensitivity. */\n sensitivityUnits: velocitySensitivityUnitsZ.default(\n \"MillivoltsPerMillimeterPerSecond\",\n ),\n });\nexport interface AIVelocityIEPEChannel extends z.infer<typeof aiVelocityIEPEChannelZ> {}\n\n/**\n * AIAccel4WireDCVoltageChannel reads acceleration from a 4-wire DC-voltage\n * accelerometer.\n */\nexport const aiAccel4WireDCVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel_4_wire_dc_voltage\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelSensitivityUnitsZ.default(\"mVoltsPerG\"),\n /**\n * scaledByExcitation is true when the excitation voltage is used to scale the\n * reading.\n */\n scaledByExcitation: z.boolean().default(false),\n });\nexport interface AIAccel4WireDCVoltageChannel extends z.infer<\n typeof aiAccel4WireDCVoltageChannelZ\n> {}\n\n/** AIAccelChargeChannel reads acceleration from a charge-mode accelerometer. */\nexport const aiAccelChargeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel_charge\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelChargeSensitivityUnitsZ.default(\"PicoCoulombsPerG\"),\n });\nexport interface AIAccelChargeChannel extends z.infer<typeof aiAccelChargeChannelZ> {}\n\n/** AIChargeChannel reads a raw charge. */\nexport const aiChargeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_charge\"),\n /** units are the units of the charge measurement. */\n units: chargeUnitsZ.default(\"Coulombs\"),\n });\nexport interface AIChargeChannel extends z.infer<typeof aiChargeChannelZ> {}\n\n/** AICurrentRMSChannel reads RMS current. */\nexport const aiCurrentRMSChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_current_rms\"),\n /** shuntResistorLoc selects where the shunt resistor is located. */\n shuntResistorLoc: shuntResistorLocationZ.default(\"Default\"),\n /** extShuntResistorVal is the external shunt resistor value, in Ohms. */\n extShuntResistorVal: z.number().default(1),\n });\nexport interface AICurrentRMSChannel extends z.infer<typeof aiCurrentRMSChannelZ> {}\n\n/**\n * AIForceBridgePolynomialChannel reads force from a bridge with polynomial calibration.\n */\nexport const aiForceBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_polynomial\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgePolynomialChannel extends z.infer<\n typeof aiForceBridgePolynomialChannelZ\n> {}\n\n/** AIFreqVoltageChannel reads frequency from a voltage signal. */\nexport const aiFreqVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_freq_voltage\"),\n /** thresholdLevel is the voltage level at which a cycle is counted. */\n thresholdLevel: z.number().default(0),\n /** hysteresis is the hysteresis applied around the threshold level. */\n hysteresis: z.number().default(0),\n });\nexport interface AIFreqVoltageChannel extends z.infer<typeof aiFreqVoltageChannelZ> {}\n\n/**\n * AIPressureBridgePolynomialChannel reads pressure from a bridge with polynomial\n * calibration.\n */\nexport const aiPressureBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_polynomial\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgePolynomialChannel extends z.infer<\n typeof aiPressureBridgePolynomialChannelZ\n> {}\n\n/** AIThermistorIexChannel reads temperature from a current-excited thermistor. */\nexport const aiThermistorIexChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_thermistor_iex\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** a is the first Steinhart-Hart coefficient. */\n a: z.number().default(0),\n /** b is the second Steinhart-Hart coefficient. */\n b: z.number().default(0),\n /** c is the third Steinhart-Hart coefficient. */\n c: z.number().default(0),\n });\nexport interface AIThermistorIexChannel extends z.infer<\n typeof aiThermistorIexChannelZ\n> {}\n\n/** AIThermistorVexChannel reads temperature from a voltage-excited thermistor. */\nexport const aiThermistorVexChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_thermistor_vex\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** a is the first Steinhart-Hart coefficient. */\n a: z.number().default(0),\n /** b is the second Steinhart-Hart coefficient. */\n b: z.number().default(0),\n /** c is the third Steinhart-Hart coefficient. */\n c: z.number().default(0),\n /** r1 is the reference resistor value, in Ohms. */\n r1: z.number().default(0),\n });\nexport interface AIThermistorVexChannel extends z.infer<\n typeof aiThermistorVexChannelZ\n> {}\n\n/**\n * AITorqueBridgePolynomialChannel reads torque from a bridge with polynomial\n * calibration.\n */\nexport const aiTorqueBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_polynomial\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgePolynomialChannel extends z.infer<\n typeof aiTorqueBridgePolynomialChannelZ\n> {}\n\n/** AIVoltageRMSChannel reads RMS voltage. */\nexport const aiVoltageRMSChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage_rms\"),\n });\nexport interface AIVoltageRMSChannel extends z.infer<typeof aiVoltageRMSChannelZ> {}\n\n/** AIVoltageWithExcitChannel reads a voltage with excitation. */\nexport const aiVoltageWithExcitChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage_with_excit\"),\n /** bridgeConfig selects the physical bridge wiring. */\n bridgeConfig: bridgeConfigZ.default(\"FullBridge\"),\n /**\n * scaledByExcitation is true when the excitation voltage is used to scale the\n * reading.\n */\n scaledByExcitation: z.boolean().default(false),\n });\nexport interface AIVoltageWithExcitChannel extends z.infer<\n typeof aiVoltageWithExcitChannelZ\n> {}\n\nexport const AI_CHANNEL_TYPES = [\n \"ai_voltage\",\n \"ai_accel\",\n \"ai_bridge\",\n \"ai_current\",\n \"ai_force_bridge_table\",\n \"ai_force_bridge_two_point_lin\",\n \"ai_force_iepe\",\n \"ai_microphone\",\n \"ai_pressure_bridge_table\",\n \"ai_pressure_bridge_two_point_lin\",\n \"ai_resistance\",\n \"ai_rtd\",\n \"ai_strain_gauge\",\n \"ai_temp_builtin\",\n \"ai_thermocouple\",\n \"ai_torque_bridge_table\",\n \"ai_torque_bridge_two_point_lin\",\n \"ai_velocity_iepe\",\n \"ai_accel_4_wire_dc_voltage\",\n \"ai_accel_charge\",\n \"ai_charge\",\n \"ai_current_rms\",\n \"ai_force_bridge_polynomial\",\n \"ai_freq_voltage\",\n \"ai_pressure_bridge_polynomial\",\n \"ai_thermistor_iex\",\n \"ai_thermistor_vex\",\n \"ai_torque_bridge_polynomial\",\n \"ai_voltage_rms\",\n \"ai_voltage_with_excit\",\n] as const;\nexport const aiChannelTypeZ = z.enum(AI_CHANNEL_TYPES);\nexport type AIChannelType = z.infer<typeof aiChannelTypeZ>;\n\n/**\n * AIChannel is a single NI analog input channel. The type field selects the measurement\n * mode and the fields that accompany it.\n */\nexport const aiChannelZ = z.discriminatedUnion(\"type\", [\n aiVoltageChannelZ,\n aiAccelChannelZ,\n aiBridgeChannelZ,\n aiCurrentChannelZ,\n aiForceBridgeTableChannelZ,\n aiForceBridgeTwoPointLinChannelZ,\n aiForceIEPEChannelZ,\n aiMicrophoneChannelZ,\n aiPressureBridgeTableChannelZ,\n aiPressureBridgeTwoPointLinChannelZ,\n aiResistanceChannelZ,\n aiRTDChannelZ,\n aiStrainGaugeChannelZ,\n aiTempBuiltinChannelZ,\n aiThermocoupleChannelZ,\n aiTorqueBridgeTableChannelZ,\n aiTorqueBridgeTwoPointLinChannelZ,\n aiVelocityIEPEChannelZ,\n aiAccel4WireDCVoltageChannelZ,\n aiAccelChargeChannelZ,\n aiChargeChannelZ,\n aiCurrentRMSChannelZ,\n aiForceBridgePolynomialChannelZ,\n aiFreqVoltageChannelZ,\n aiPressureBridgePolynomialChannelZ,\n aiThermistorIexChannelZ,\n aiThermistorVexChannelZ,\n aiTorqueBridgePolynomialChannelZ,\n aiVoltageRMSChannelZ,\n aiVoltageWithExcitChannelZ,\n]);\nexport type AIChannel =\n | AIVoltageChannel\n | AIAccelChannel\n | AIBridgeChannel\n | AICurrentChannel\n | AIForceBridgeTableChannel\n | AIForceBridgeTwoPointLinChannel\n | AIForceIEPEChannel\n | AIMicrophoneChannel\n | AIPressureBridgeTableChannel\n | AIPressureBridgeTwoPointLinChannel\n | AIResistanceChannel\n | AIRTDChannel\n | AIStrainGaugeChannel\n | AITempBuiltinChannel\n | AIThermocoupleChannel\n | AITorqueBridgeTableChannel\n | AITorqueBridgeTwoPointLinChannel\n | AIVelocityIEPEChannel\n | AIAccel4WireDCVoltageChannel\n | AIAccelChargeChannel\n | AIChargeChannel\n | AICurrentRMSChannel\n | AIForceBridgePolynomialChannel\n | AIFreqVoltageChannel\n | AIPressureBridgePolynomialChannel\n | AIThermistorIexChannel\n | AIThermistorVexChannel\n | AITorqueBridgePolynomialChannel\n | AIVoltageRMSChannel\n | AIVoltageWithExcitChannel;\n\nexport const AI_CHANNEL_SCHEMAS: {\n [K in AIChannelType]: z.ZodType<Extract<AIChannel, { type: K }>>;\n} = {\n ai_voltage: aiVoltageChannelZ,\n ai_accel: aiAccelChannelZ,\n ai_bridge: aiBridgeChannelZ,\n ai_current: aiCurrentChannelZ,\n ai_force_bridge_table: aiForceBridgeTableChannelZ,\n ai_force_bridge_two_point_lin: aiForceBridgeTwoPointLinChannelZ,\n ai_force_iepe: aiForceIEPEChannelZ,\n ai_microphone: aiMicrophoneChannelZ,\n ai_pressure_bridge_table: aiPressureBridgeTableChannelZ,\n ai_pressure_bridge_two_point_lin: aiPressureBridgeTwoPointLinChannelZ,\n ai_resistance: aiResistanceChannelZ,\n ai_rtd: aiRTDChannelZ,\n ai_strain_gauge: aiStrainGaugeChannelZ,\n ai_temp_builtin: aiTempBuiltinChannelZ,\n ai_thermocouple: aiThermocoupleChannelZ,\n ai_torque_bridge_table: aiTorqueBridgeTableChannelZ,\n ai_torque_bridge_two_point_lin: aiTorqueBridgeTwoPointLinChannelZ,\n ai_velocity_iepe: aiVelocityIEPEChannelZ,\n ai_accel_4_wire_dc_voltage: aiAccel4WireDCVoltageChannelZ,\n ai_accel_charge: aiAccelChargeChannelZ,\n ai_charge: aiChargeChannelZ,\n ai_current_rms: aiCurrentRMSChannelZ,\n ai_force_bridge_polynomial: aiForceBridgePolynomialChannelZ,\n ai_freq_voltage: aiFreqVoltageChannelZ,\n ai_pressure_bridge_polynomial: aiPressureBridgePolynomialChannelZ,\n ai_thermistor_iex: aiThermistorIexChannelZ,\n ai_thermistor_vex: aiThermistorVexChannelZ,\n ai_torque_bridge_polynomial: aiTorqueBridgePolynomialChannelZ,\n ai_voltage_rms: aiVoltageRMSChannelZ,\n ai_voltage_with_excit: aiVoltageWithExcitChannelZ,\n};\n\n/** CIFrequencyChannel measures signal frequency. */\nexport const ciFrequencyChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_frequency\"),\n /** minVal is the minimum expected frequency. */\n minVal: z.number().default(2),\n /** maxVal is the maximum expected frequency. */\n maxVal: z.number().default(100),\n /** units are the units of the frequency measurement. */\n units: ciFreqUnitsZ.default(\"Hz\"),\n /** edge selects the edge the counter responds to. */\n edge: ciEdgeZ.default(\"Rising\"),\n /** measMethod selects the measurement method. */\n measMethod: ciMeasMethodZ.default(\"DynamicAvg\"),\n /** measTime is the averaging window for high-frequency measurement, in seconds. */\n measTime: z.number().default(0.000006),\n /** divisor is the counter divisor for large-range measurement. */\n divisor: z.int32().default(4),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIFrequencyChannel extends z.infer<typeof ciFrequencyChannelZ> {}\n\n/** CIEdgeCountChannel counts signal edges. */\nexport const ciEdgeCountChannelZ = baseCIChannelZ.extend({\n type: z.literal(\"ci_edge_count\"),\n /** activeEdge selects the edge that increments the count. */\n activeEdge: ciEdgeZ.default(\"Rising\"),\n /** countDirection selects the direction the counter counts. */\n countDirection: ciCountDirectionZ.default(\"CountUp\"),\n /** initialCount is the value the counter starts at. */\n initialCount: z.number().default(0),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n});\nexport interface CIEdgeCountChannel extends z.infer<typeof ciEdgeCountChannelZ> {}\n\n/** CIPeriodChannel measures signal period. */\nexport const ciPeriodChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_period\"),\n /** minVal is the minimum expected period, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected period, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the period measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** startingEdge selects the edge that starts a period measurement. */\n startingEdge: ciEdgeZ.default(\"Rising\"),\n /** measMethod selects the measurement method. */\n measMethod: ciMeasMethodZ.default(\"DynamicAvg\"),\n /** measTime is the averaging window for high-frequency measurement, in seconds. */\n measTime: z.number().default(0.001),\n /** divisor is the counter divisor for large-range measurement. */\n divisor: z.int32().default(4),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIPeriodChannel extends z.infer<typeof ciPeriodChannelZ> {}\n\n/** CIPulseWidthChannel measures pulse width. */\nexport const ciPulseWidthChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_pulse_width\"),\n /** minVal is the minimum expected pulse width, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected pulse width, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the pulse-width measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** startingEdge selects the edge that starts a pulse-width measurement. */\n startingEdge: ciEdgeZ.default(\"Rising\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIPulseWidthChannel extends z.infer<typeof ciPulseWidthChannelZ> {}\n\n/** CISemiPeriodChannel measures semi-period. */\nexport const ciSemiPeriodChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_semi_period\"),\n /** minVal is the minimum expected semi-period, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected semi-period, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the semi-period measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CISemiPeriodChannel extends z.infer<typeof ciSemiPeriodChannelZ> {}\n\n/** CITwoEdgeSepChannel measures the separation between two edges. */\nexport const ciTwoEdgeSepChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_two_edge_sep\"),\n /** minVal is the minimum expected separation, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected separation, in the selected units. */\n maxVal: z.number().default(1),\n /** units are the units of the two-edge-separation measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** firstEdge selects the edge that starts the measurement. */\n firstEdge: ciEdgeZ.default(\"Rising\"),\n /** secondEdge selects the edge that stops the measurement. */\n secondEdge: ciEdgeZ.default(\"Falling\"),\n /** firstTerminal is the terminal the first edge's signal is wired to. */\n firstTerminal: z.string().default(\"\"),\n /** secondTerminal is the terminal the second edge's signal is wired to. */\n secondTerminal: z.string().default(\"\"),\n });\nexport interface CITwoEdgeSepChannel extends z.infer<typeof ciTwoEdgeSepChannelZ> {}\n\n/** CIVelocityLinearChannel measures linear velocity from an encoder. */\nexport const ciVelocityLinearChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_velocity_linear\"),\n /** minVal is the minimum expected velocity. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected velocity. */\n maxVal: z.number().default(1),\n /** units are the units of the velocity measurement. */\n units: ciLinearVelocityUnitsZ.default(\"m/s\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** distPerPulse is the linear distance per encoder pulse. */\n distPerPulse: z.number().default(0.001),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIVelocityLinearChannel extends z.infer<\n typeof ciVelocityLinearChannelZ\n> {}\n\n/** CIVelocityAngularChannel measures angular velocity from an encoder. */\nexport const ciVelocityAngularChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_velocity_angular\"),\n /** minVal is the minimum expected velocity. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected velocity. */\n maxVal: z.number().default(1),\n /** units are the units of the velocity measurement. */\n units: ciAngularVelocityUnitsZ.default(\"RPM\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** pulsesPerRev is the number of encoder pulses per revolution. */\n pulsesPerRev: z.number().default(24),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIVelocityAngularChannel extends z.infer<\n typeof ciVelocityAngularChannelZ\n> {}\n\n/** CIPositionLinearChannel measures linear position from an encoder. */\nexport const ciPositionLinearChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(zIndexZ.shape)\n .extend({\n type: z.literal(\"ci_position_linear\"),\n /** units are the units of the position measurement. */\n units: ciLinearPositionUnitsZ.default(\"Meters\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** distPerPulse is the linear distance per encoder pulse. */\n distPerPulse: z.number().default(0.000001),\n /** initialPos is the position the encoder starts at. */\n initialPos: z.number().default(0),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIPositionLinearChannel extends z.infer<\n typeof ciPositionLinearChannelZ\n> {}\n\n/** CIPositionAngularChannel measures angular position from an encoder. */\nexport const ciPositionAngularChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(zIndexZ.shape)\n .extend({\n type: z.literal(\"ci_position_angular\"),\n /** units are the units of the position measurement. */\n units: ciAngularPositionUnitsZ.default(\"Degrees\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** pulsesPerRev is the number of encoder pulses per revolution. */\n pulsesPerRev: z.number().default(24),\n /** initialAngle is the angle the encoder starts at. */\n initialAngle: z.number().default(0),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIPositionAngularChannel extends z.infer<\n typeof ciPositionAngularChannelZ\n> {}\n\n/** CIDutyCycleChannel measures the duty cycle of a signal. */\nexport const ciDutyCycleChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_duty_cycle\"),\n /** minVal is the minimum expected duty-cycle frequency. */\n minVal: z.number().default(2),\n /** maxVal is the maximum expected duty-cycle frequency. */\n maxVal: z.number().default(10000),\n /** activeEdge selects the edge the counter responds to. */\n activeEdge: ciEdgeZ.default(\"Rising\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIDutyCycleChannel extends z.infer<typeof ciDutyCycleChannelZ> {}\n\nexport const CI_CHANNEL_TYPES = [\n \"ci_frequency\",\n \"ci_edge_count\",\n \"ci_period\",\n \"ci_pulse_width\",\n \"ci_semi_period\",\n \"ci_two_edge_sep\",\n \"ci_velocity_linear\",\n \"ci_velocity_angular\",\n \"ci_position_linear\",\n \"ci_position_angular\",\n \"ci_duty_cycle\",\n] as const;\nexport const ciChannelTypeZ = z.enum(CI_CHANNEL_TYPES);\nexport type CIChannelType = z.infer<typeof ciChannelTypeZ>;\n\n/**\n * CIChannel is a single NI counter input channel. The type field selects the\n * measurement mode and the fields that accompany it.\n */\nexport const ciChannelZ = z.discriminatedUnion(\"type\", [\n ciFrequencyChannelZ,\n ciEdgeCountChannelZ,\n ciPeriodChannelZ,\n ciPulseWidthChannelZ,\n ciSemiPeriodChannelZ,\n ciTwoEdgeSepChannelZ,\n ciVelocityLinearChannelZ,\n ciVelocityAngularChannelZ,\n ciPositionLinearChannelZ,\n ciPositionAngularChannelZ,\n ciDutyCycleChannelZ,\n]);\nexport type CIChannel =\n | CIFrequencyChannel\n | CIEdgeCountChannel\n | CIPeriodChannel\n | CIPulseWidthChannel\n | CISemiPeriodChannel\n | CITwoEdgeSepChannel\n | CIVelocityLinearChannel\n | CIVelocityAngularChannel\n | CIPositionLinearChannel\n | CIPositionAngularChannel\n | CIDutyCycleChannel;\n\nexport const CI_CHANNEL_SCHEMAS: {\n [K in CIChannelType]: z.ZodType<Extract<CIChannel, { type: K }>>;\n} = {\n ci_frequency: ciFrequencyChannelZ,\n ci_edge_count: ciEdgeCountChannelZ,\n ci_period: ciPeriodChannelZ,\n ci_pulse_width: ciPulseWidthChannelZ,\n ci_semi_period: ciSemiPeriodChannelZ,\n ci_two_edge_sep: ciTwoEdgeSepChannelZ,\n ci_velocity_linear: ciVelocityLinearChannelZ,\n ci_velocity_angular: ciVelocityAngularChannelZ,\n ci_position_linear: ciPositionLinearChannelZ,\n ci_position_angular: ciPositionAngularChannelZ,\n ci_duty_cycle: ciDutyCycleChannelZ,\n};\n\n/** AOCurrentChannel drives a current output. */\nexport const aoCurrentChannelZ = baseAOChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ao_current\"),\n });\nexport interface AOCurrentChannel extends z.infer<typeof aoCurrentChannelZ> {}\n\n/** AOFuncGenChannel drives a function-generator output. */\nexport const aoFuncGenChannelZ = baseAOChannelZ.extend({\n type: z.literal(\"ao_func_gen\"),\n /** waveType selects the waveform to generate. */\n waveType: waveTypeZ.default(\"Sine\"),\n /** frequency is the waveform frequency, in Hertz. */\n frequency: z.number().default(0),\n /** amplitude is the waveform amplitude. */\n amplitude: z.number().default(0),\n /** offset is the waveform DC offset. */\n offset: z.number().default(0),\n});\nexport interface AOFuncGenChannel extends z.infer<typeof aoFuncGenChannelZ> {}\n\n/** AOVoltageChannel drives a voltage output. */\nexport const aoVoltageChannelZ = baseAOChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ao_voltage\"),\n });\nexport interface AOVoltageChannel extends z.infer<typeof aoVoltageChannelZ> {}\n\nexport const AO_CHANNEL_TYPES = [\"ao_current\", \"ao_func_gen\", \"ao_voltage\"] as const;\nexport const aoChannelTypeZ = z.enum(AO_CHANNEL_TYPES);\nexport type AOChannelType = z.infer<typeof aoChannelTypeZ>;\n\n/**\n * AOChannel is a single NI analog output channel. The type field selects the output\n * mode and the fields that accompany it.\n */\nexport const aoChannelZ = z.discriminatedUnion(\"type\", [\n aoCurrentChannelZ,\n aoFuncGenChannelZ,\n aoVoltageChannelZ,\n]);\nexport type AOChannel = AOCurrentChannel | AOFuncGenChannel | AOVoltageChannel;\n\nexport const AO_CHANNEL_SCHEMAS: {\n [K in AOChannelType]: z.ZodType<Extract<AOChannel, { type: K }>>;\n} = {\n ao_current: aoCurrentChannelZ,\n ao_func_gen: aoFuncGenChannelZ,\n ao_voltage: aoVoltageChannelZ,\n};\n\nexport const analogReadConfigZ = task.readConfigZ.extend({\n channels: aiChannelZ.array().default(() => []),\n});\nexport interface AnalogReadConfig extends z.infer<typeof analogReadConfigZ> {}\n\nexport const counterReadConfigZ = task.readConfigZ.extend({\n channels: ciChannelZ.array().default(() => []),\n});\nexport interface CounterReadConfig extends z.infer<typeof counterReadConfigZ> {}\n\nexport const analogWriteConfigZ = writeConfigZ.extend({\n channels: aoChannelZ.array().default(() => []),\n});\nexport interface AnalogWriteConfig extends z.infer<typeof analogWriteConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/ni/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** BaseChannel carries the fields every OPC UA channel shares. */\nexport const baseChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** nodeId is the OPC UA node ID the channel is bound to. */\n nodeId: z.string().default(\"\"),\n /** nodeName is the browse name of the OPC UA node. */\n nodeName: z.string().default(\"\"),\n /** dataType is the data type of the Synnax channel. */\n dataType: z.string().default(\"float32\"),\n});\nexport interface BaseChannel extends z.infer<typeof baseChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\nexport const readChannelZ = baseChannelZ.extend({\n channel: channel.keyZ.default(0),\n isIndex: z.boolean().default(false),\n});\nexport interface ReadChannel extends z.infer<typeof readChannelZ> {}\n\nexport const writeChannelZ = baseChannelZ.extend({\n cmdChannel: channel.keyZ.default(0),\n});\nexport interface WriteChannel extends z.infer<typeof writeChannelZ> {}\n\nexport const readConfigZ = task.readConfigZ\n .omit({ sampleRate: true, streamRate: true })\n .extend({\n sampleRate: z.number().default(50),\n streamRate: z.number().default(25),\n device: device.keyZ.default(\"\"),\n arrayMode: z.boolean().default(false),\n arraySize: z.int32().default(1),\n channels: readChannelZ.array().default(() => []),\n });\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/opcua/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { status } from \"@/status\";\nimport { task } from \"@/task\";\n\n/** Alert maps a Synnax status to a PagerDuty event routing rule. */\nexport const alertZ = z.object({\n /** key uniquely identifies the alert within the task. */\n key: z.string().default(id.create),\n /** status is the key of the Synnax status the alert watches. */\n status: status.keyZ.default(\"\"),\n /** errorsCritical is true when the error variant maps to PagerDuty critical. */\n errorsCritical: z.boolean().default(false),\n /** component is the PagerDuty component attached to triggered events. */\n component: z.string().default(\"\"),\n /** group is the PagerDuty group attached to triggered events. */\n group: z.string().default(\"\"),\n /** class is the PagerDuty class attached to triggered events. */\n class: z.string().default(\"\"),\n /** disabled is true when the alert is excluded from the task. */\n disabled: z.boolean().default(false),\n});\nexport interface Alert extends z.infer<typeof alertZ> {}\n\nexport const taskConfigZ = task.startConfigZ.extend({\n routingKey: z.string().default(\"\"),\n alerts: alertZ.array().default(() => []),\n});\nexport interface TaskConfig extends z.infer<typeof taskConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/pagerduty/types.gen\";\n"],"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AGU,KAAA,EAAiC,OAAO,EACnD,UAAU,GAAc,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC,EAClD,CAAC;;;;;;;IE7CY,KAAS,EAAE,OAAO;CAE7B,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAG,MAAM;CAEjC,QAAA,GAAoB,QAAQ,EAAE;CAE9B,gBAAgB,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAK;CAEzC,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAEhC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAE5B,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAE5B,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAK;AACrC,CAAC,GAGY,KAAA,GAAgC,OAAO;CAClD,YAAY,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CACjC,QAAQ,GAAO,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;AACzC,CAAC"}
|
|
1
|
+
{"version":3,"file":"client.js","names":["clone","util.clone","util.codePointLength","util.floatSafeRemainder","util.esc","util.shallowClone","util.isPlainObject","regexes.number"],"sources":["../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/compile.js","../../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/compile.js","../src/ethercat/types.gen.ts","../src/ethercat/external.ts","../src/http/types.gen.ts","../src/http/external.ts","../src/labjack/types.gen.ts","../src/labjack/external.ts","../src/modbus/types.gen.ts","../src/modbus/external.ts","../src/ni/types.gen.ts","../src/ni/external.ts","../src/opcua/types.gen.ts","../src/opcua/external.ts","../src/pagerduty/types.gen.ts","../src/pagerduty/external.ts"],"sourcesContent":["import { $ZodAsyncError } from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { isBackEdge, isRecursiveSchema } from \"./memoizer.js\";\nimport * as regexes from \"./regexes.js\";\nimport { isValidBase64, isValidBase64URL, isValidCIDRv6, isValidCreditCard, isValidIPv6, isValidJWT, mergeValues, parseURLObject, stripTabAndNewline, urlHostnameOk, urlProtocolOk, } from \"./schemas.js\";\nimport * as util from \"./util.js\";\n/** Sentinel value returned by the compiled fast path when validation fails. Internal. */\nexport const INVALID = Symbol.for(\"zod.compile.invalid\");\n// Set on the parse ctx when a compiled wrapper falls back to the runtime, so nested compiled wrappers skip their fast paths for the rest of that parse.\nconst FALLBACK_FLAG = Symbol.for(\"zod.compile.fallback\");\n/** Raised when the schema contains async refinements or transforms. Surfaces only under `compile(schema, { strict: true })`. */\nexport class ZodCompileAsyncError extends Error {\n constructor(message = \"z.compile does not support async refinements, transforms, or checks\") {\n super(message);\n this.name = \"ZodCompileAsyncError\";\n }\n}\n/**\n * Raised when the schema contains a feature whose semantics the fast path\n * can't fully model. Both the shim in `zod/compile` and the default\n * `compile()` fall back to the runtime parser for that schema; only\n * `compile(schema, { strict: true })` lets it surface.\n */\nexport class ZodCompileUnsupportedError extends Error {\n constructor(feature, islandable = true) {\n super(`z.compile does not support ${feature}; this schema must use the runtime parser`);\n this.name = \"ZodCompileUnsupportedError\";\n this.islandable = islandable;\n }\n}\n/**\n * Build the validator `validate` calls: the same codegen as the parser with the output construction\n * dropped. A schema the flag cannot express reuses the parser, which still answers correctly — it\n * just builds a value nothing reads.\n */\nfunction compileValidator(schema, parser) {\n try {\n return compileFn(schema, { assertOnly: true });\n }\n catch {\n return parser;\n }\n}\n/**\n * AOT-compile a Zod schema. Returns a clone whose `_zod.run` calls a generated\n * fast path first and falls back to the original runtime parser on failure.\n *\n * - Forward direction only. Backward (encode), async, and `skipChecks` paths\n * bypass the fast path and use the runtime directly.\n * - Never throws. A schema the fast path can't model is returned unchanged and\n * keeps using the runtime parser. Pass `{ strict: true }` to get the refusal\n * as a thrown `ZodCompileUnsupportedError` / `ZodCompileAsyncError` instead.\n * - The original schema is unchanged. The clone shares children by reference.\n */\nexport function compile(schema, options) {\n try {\n const parser = compileFn(schema);\n const clone = util.clone(schema);\n // Capture the source-of-truth runtime eagerly. If schema._zod.run is itself a shim installed by global-mode (`__originalRun` set), unwrap past it. Otherwise capturing the live property lazily would let a later self- replacement of schema._zod.run feed our wrapper back into itself.\n const liveRun = schema._zod.run;\n const originalRun = liveRun.__originalRun ?? liveRun;\n // Delegate to the *original* schema's run on bypass/fallback (not the\n // clone's). The original closed over its own `inst` at construction time;\n // issue payloads use that reference to derive things like the class name\n // for `z.instanceof(Test)`. Calling the clone's freshly-initialized run\n // would push issues with `inst === clone`, producing diverging error\n // messages from the original schema.\n const wrapped = (payload, ctx) => {\n if (ctx?.async ||\n ctx?.direction === \"backward\" ||\n ctx?.skipChecks ||\n ctx?.[FALLBACK_FLAG]) {\n return originalRun(payload, ctx);\n }\n // A memoized back-edge: only the runtime can close a reference cycle, and a transform on one must raise $ZodCyclicError from its own parse.\n if (ctx && isBackEdge(ctx, payload.value)) {\n return originalRun(payload, ctx);\n }\n const out = parser(payload.value);\n if (out !== INVALID) {\n payload.value = out;\n return payload;\n }\n // Mark this parse as runtime-driven: under global mode every nested schema carries its own compiled wrapper, and without the flag the parent's runtime fallback re-enters each child's fast path, running user callbacks a third time on invalid input.\n if (ctx)\n ctx[FALLBACK_FLAG] = true;\n return originalRun(payload, ctx);\n };\n // Let later compiles of (or through) this run unwrap to the true runtime — both the global shim and repeated z.compile calls rely on this. The bag also carries the parser and the validator, so the standalone validate can skip the payload and wrapper on the happy path.\n wrapped.__originalRun = originalRun;\n clone._zod.bag.fallbackRun = originalRun;\n clone._zod.bag.validator = compileValidator(schema, parser);\n clone._zod.run = wrapped;\n // The fast parse/safeParse closures fall back through the source schema's methods. If the source is shim- or wrapper-managed, those methods route into a compiled run and would execute user callbacks a third time on invalid input — the plain method → wrapper path is exactly 2x, so skip.\n if (!liveRun.__originalRun)\n installCompiledUserMethods(clone, schema, parser);\n return clone;\n }\n catch (err) {\n if (options?.strict)\n throw err;\n // a schema we can't compile still has to work, so hand it back untouched on the runtime parser — the same silent fallback global mode already does\n return schema;\n }\n}\nfunction installCompiledUserMethods(target, source, parser) {\n const targetAny = target;\n const sourceAny = source;\n if (typeof sourceAny.safeParse === \"function\") {\n const originalSafeParse = sourceAny.safeParse;\n targetAny.safeParse = (data, params) => {\n const out = parser(data);\n if (out !== INVALID) {\n return { success: true, data: out };\n }\n return originalSafeParse(data, params);\n };\n }\n if (typeof sourceAny.parse === \"function\") {\n const originalParse = sourceAny.parse;\n targetAny.parse = (data, params) => {\n const out = parser(data);\n if (out !== INVALID) {\n return out;\n }\n return originalParse(data, params);\n };\n }\n}\n/**\n * Generate the standalone compiled function: a parser by default, a validator under\n * `assertOnly`. Returns either the parsed value, `true` where nothing reads the output,\n * or the `INVALID` sentinel. Internal — consumers should use `compile()`.\n */\nexport function compileFn(schema, options) {\n // Cycle-breaking is keyed on the parse context, which generated code never receives. `shape` can be a getter that throws (z.pick() with an unrecognized mask key), so treat \"can't tell\" as recursive.\n let recursive = true;\n try {\n recursive = isRecursiveSchema(schema);\n }\n catch { }\n if (recursive) {\n throw new ZodCompileUnsupportedError(\"a schema whose subtree contains a reference cycle\");\n }\n const ctx = {\n constants: new Map(),\n constantCounter: 0,\n varCounter: 0,\n };\n const doc = new Doc([\"input\"]);\n const outputAccessor = generateCheck(doc, ctx, schema, \"input\", !options?.assertOnly);\n // In assert mode a root that built nothing has already returned INVALID on every failure, so reaching the end means valid.\n doc.write(outputAccessor === null ? `return true;` : `return ${outputAccessor};`);\n // Build the function with hoisted constants Always include INVALID as the first constant\n const constantNames = [\"INVALID\", ...ctx.constants.keys()];\n const constantValues = [INVALID, ...ctx.constants.values()];\n const code = doc.content.join(\"\\n\");\n const fullCode = options?.debug\n ? constantNames.length > 0\n ? `// Constants: ${constantNames.join(\", \")}\\n${code}`\n : code\n : \"\";\n const F = Function;\n const factoryCode = `return (input) => {\\n${code}\\n}`;\n let fn;\n try {\n const factory = new F(...constantNames, factoryCode);\n fn = factory(...constantValues);\n }\n catch (err) {\n // Malformed generated code (or a CSP environment rejecting `new Function`) surfaces as a typed error so the global shim falls back to the runtime instead of crashing with a raw SyntaxError/EvalError.\n throw new ZodCompileUnsupportedError(`this schema (generated code failed to evaluate: ${err.message})`);\n }\n if (options?.debug) {\n fn.code = fullCode;\n }\n return fn;\n}\nfunction addConstant(ctx, value) {\n // Check if we already have this constant\n for (const [name, v] of ctx.constants) {\n if (v === value)\n return name;\n }\n const name = `c${ctx.constantCounter++}`;\n ctx.constants.set(name, value);\n return name;\n}\nfunction newVar(ctx) {\n return `v${ctx.varCounter++}`;\n}\n// Runs a child schema as a black box: its value, or INVALID for a failure or an async run.\nfunction runtimeRun(schema, value) {\n const result = schema._zod.run({ value, issues: [] }, {});\n if (result && typeof result.then === \"function\")\n return INVALID;\n const r = result;\n return r.issues.length === 0 ? r.value : INVALID;\n}\n// `null` means the node built no value because nothing reads it. The overloads keep that case out of the 20-odd callers that always want one, so only a caller passing needsValue has to handle it.\nfunction compileChild(doc, ctx, schema, accessor, needsValue = true) {\n const contentLen = doc.content.length;\n const constantCount = ctx.constants.size;\n const constantCounter = ctx.constantCounter;\n const varCounter = ctx.varCounter;\n try {\n return generateCheck(doc, ctx, schema, accessor, needsValue);\n }\n catch (err) {\n if (!(err instanceof ZodCompileUnsupportedError) || !err.islandable)\n throw err;\n doc.content.length = contentLen;\n if (ctx.constants.size > constantCount) {\n const trailing = Array.from(ctx.constants.keys()).slice(constantCount);\n for (const k of trailing)\n ctx.constants.delete(k);\n }\n ctx.constantCounter = constantCounter;\n ctx.varCounter = varCounter;\n return emitRuntimeIsland(doc, ctx, schema, accessor);\n }\n}\nfunction emitRuntimeIsland(doc, ctx, schema, accessor) {\n const schemaConst = addConstant(ctx, schema);\n const runConst = addConstant(ctx, runtimeRun);\n const outVar = newVar(ctx);\n doc.write(`const ${outVar} = ${runConst}(${schemaConst}, ${accessor});`);\n doc.write(`if (${outVar} === INVALID) return INVALID;`);\n return outVar;\n}\n// Check classes whose `when` is auto-defaulted at init (checks.ts `when ??=`).\nconst WHEN_DEFAULTED_CHECKS = new Set([\n \"max_size\",\n \"min_size\",\n \"size_equals\",\n \"max_length\",\n \"min_length\",\n \"length_equals\",\n]);\nfunction generateChecks(doc, ctx, schema, accessor) {\n const schemaChecks = schema._zod.def.checks;\n if (!schemaChecks || schemaChecks.length === 0)\n return accessor;\n // Track current accessor - may change if overwrite checks are encountered\n let currentAccessor = accessor;\n for (const check of schemaChecks) {\n const def = check._zod.def;\n // A custom `when` skips a check the fast path always runs; the one auto-defaulted on size/length classes matches its bail-on-first-failure.\n if (def.when && !WHEN_DEFAULTED_CHECKS.has(def.check)) {\n throw new ZodCompileUnsupportedError(`check with a custom \"when\" condition`);\n }\n switch (def.check) {\n case \"greater_than\":\n generateGreaterThanCheck(doc, ctx, def, currentAccessor);\n break;\n case \"less_than\":\n generateLessThanCheck(doc, ctx, def, currentAccessor);\n break;\n case \"multiple_of\":\n generateMultipleOfCheck(doc, ctx, def, currentAccessor);\n break;\n case \"number_format\":\n generateNumberFormatCheck(doc, def, currentAccessor);\n break;\n case \"min_length\": {\n const min = numericOperand(def.minimum, \"min_length\");\n const len = codePointLengthVar(doc, ctx, currentAccessor, `${currentAccessor}.length >= ${min} && ${currentAccessor}.length < ${def.minimum * 2}`);\n doc.write(`if (${len} < ${min}) return INVALID;`);\n break;\n }\n case \"max_length\": {\n const max = numericOperand(def.maximum, \"max_length\");\n const len = codePointLengthVar(doc, ctx, currentAccessor, `${currentAccessor}.length > ${max}`);\n doc.write(`if (${len} > ${max}) return INVALID;`);\n break;\n }\n case \"length_equals\": {\n const exact = numericOperand(def.length, \"length_equals\");\n const len = codePointLengthVar(doc, ctx, currentAccessor, `${currentAccessor}.length >= ${exact} && ${currentAccessor}.length <= ${def.length * 2}`);\n doc.write(`if (${len} !== ${exact}) return INVALID;`);\n break;\n }\n case \"min_size\":\n doc.write(`if (${currentAccessor}.size < ${numericOperand(def.minimum, \"min_size\")}) return INVALID;`);\n break;\n case \"max_size\":\n doc.write(`if (${currentAccessor}.size > ${numericOperand(def.maximum, \"max_size\")}) return INVALID;`);\n break;\n case \"size_equals\":\n doc.write(`if (${currentAccessor}.size !== ${numericOperand(def.size, \"size_equals\")}) return INVALID;`);\n break;\n case \"string_format\":\n currentAccessor = generateStringFormatCheck(doc, ctx, def, currentAccessor);\n break;\n case \"custom\":\n currentAccessor = generateCustomRefineCheck(doc, ctx, check, currentAccessor);\n break;\n case \"bigint_format\":\n generateBigIntFormatCheck(doc, def, currentAccessor);\n break;\n case \"mime_type\":\n generateMimeTypeCheck(doc, ctx, def, currentAccessor);\n break;\n case \"property\":\n generatePropertyCheck(doc, ctx, def, currentAccessor);\n break;\n case \"overwrite\": {\n // Overwrite transforms the value - create new variable for transformed result\n const newAccessor = newVar(ctx);\n generateOverwriteCheck(doc, ctx, check, currentAccessor, newAccessor);\n currentAccessor = newAccessor;\n break;\n }\n default: {\n void def;\n throw new ZodCompileUnsupportedError(`check type ${def.check}`);\n }\n }\n }\n return currentAccessor;\n}\n// Emit the length operand for a length check, mirroring `$ZodCheckMinLength` and friends: strings measure in code points, everything else in `.length`. `inDoubt` is the caller's cheap UTF-16 bound test — outside it the unit count already settles the comparison, so the scan is skipped.\nfunction codePointLengthVar(doc, ctx, accessor, inDoubt) {\n const cpLen = addConstant(ctx, util.codePointLength);\n const v = newVar(ctx);\n doc.write(`const ${v} = typeof ${accessor} === \"string\" && ${inDoubt} ? ${cpLen}(${accessor}) : ${accessor}.length;`);\n return v;\n}\n// Emit a source operand for a gt/lt bound. Numbers inline; Dates hoist as a constant (relational operators compare via valueOf). NaN and Invalid Date bounds can't compile to a comparison that matches runtime semantics.\n/**\n * A count bound reaches generated source verbatim, so a non-number would be\n * emitted as code rather than as a value — `min('0) {} evil(); if (0')` writes an\n * arbitrary statement into the function body. TypeScript types these as `number`\n * and fromJSONSchema guards them, so this is a backstop rather than a live hole,\n * but generated source is the one place a wrong type stops being a type error.\n */\nfunction numericOperand(value, label) {\n if (typeof value !== \"number\" || !Number.isFinite(value)) {\n throw new ZodCompileUnsupportedError(`${label} bound of type ${typeof value}`);\n }\n return `${value}`;\n}\nfunction comparisonOperand(ctx, value) {\n if (typeof value === \"bigint\")\n return `${value}n`;\n if (typeof value === \"number\") {\n if (Number.isNaN(value))\n throw new ZodCompileUnsupportedError(\"comparison check with NaN bound\");\n return `${value}`;\n }\n if (value instanceof Date) {\n if (Number.isNaN(value.getTime())) {\n throw new ZodCompileUnsupportedError(\"comparison check with Invalid Date bound\");\n }\n return addConstant(ctx, value);\n }\n throw new ZodCompileUnsupportedError(`comparison check bound of type ${typeof value}`);\n}\nfunction generateGreaterThanCheck(doc, ctx, def, accessor) {\n const op = def.inclusive ? \"<\" : \"<=\";\n doc.write(`if (${accessor} ${op} ${comparisonOperand(ctx, def.value)}) return INVALID;`);\n}\nfunction generateLessThanCheck(doc, ctx, def, accessor) {\n const op = def.inclusive ? \">\" : \">=\";\n doc.write(`if (${accessor} ${op} ${comparisonOperand(ctx, def.value)}) return INVALID;`);\n}\nfunction generateMultipleOfCheck(doc, ctx, def, accessor) {\n if (typeof def.value === \"bigint\") {\n // a zero divisor has no compiled form: `x % 0n` throws\n if (def.value === BigInt(0))\n throw new ZodCompileUnsupportedError(\"multiple_of check with a zero divisor\");\n doc.write(`if (${accessor} % ${def.value}n !== 0n) return INVALID;`);\n }\n else {\n // Float `%` has well-known precision issues for sub-integer steps\n // (`1.5 % 0.1`, `2.5e-7 % 1e-7`). Defer to util.floatSafeRemainder so the\n // exact tolerance logic stays in one place — single function call is fine\n // since `multipleOf` runs at most once per number.\n const remainder = addConstant(ctx, util.floatSafeRemainder);\n doc.write(`if (${remainder}(${accessor}, ${numericOperand(def.value, \"multiple_of\")}) !== 0) return INVALID;`);\n }\n}\nfunction generateNumberFormatCheck(doc, def, accessor) {\n const format = def.format;\n switch (format) {\n case \"safeint\":\n doc.write(`if (!Number.isSafeInteger(${accessor})) return INVALID;`);\n break;\n case \"int32\":\n doc.write(`if (!Number.isInteger(${accessor}) || ${accessor} < -2147483648 || ${accessor} > 2147483647) return INVALID;`);\n break;\n case \"uint32\":\n doc.write(`if (!Number.isInteger(${accessor}) || ${accessor} < 0 || ${accessor} > 4294967295) return INVALID;`);\n break;\n case \"float32\":\n // Float32 range per util.NUMBER_FORMAT_RANGES\n doc.write(`if (!Number.isFinite(${accessor}) || ${accessor} < -3.4028234663852886e38 || ${accessor} > 3.4028234663852886e38) return INVALID;`);\n break;\n case \"float64\":\n doc.write(`if (!Number.isFinite(${accessor})) return INVALID;`);\n break;\n default: {\n void format;\n throw new ZodCompileUnsupportedError(`number format ${format}`);\n }\n }\n}\nfunction generateBigIntFormatCheck(doc, def, accessor) {\n const format = def.format;\n if (!format)\n return; // undefined format means no range check\n switch (format) {\n case \"int64\":\n doc.write(`if (${accessor} < -9223372036854775808n || ${accessor} > 9223372036854775807n) return INVALID;`);\n break;\n case \"uint64\":\n doc.write(`if (${accessor} < 0n || ${accessor} > 18446744073709551615n) return INVALID;`);\n break;\n default: {\n void format;\n throw new ZodCompileUnsupportedError(`bigint format ${format}`);\n }\n }\n}\nfunction generateMimeTypeCheck(doc, ctx, def, accessor) {\n const mimeTypes = def.mime;\n if (mimeTypes && mimeTypes.length > 0) {\n const mimeSet = addConstant(ctx, new Set(mimeTypes));\n doc.write(`if (!${mimeSet}.has(${accessor}.type)) return INVALID;`);\n }\n}\nfunction generatePropertyCheck(doc, ctx, def, accessor) {\n const propAccessor = `${accessor}[${JSON.stringify(def.property)}]`;\n generateCheck(doc, ctx, def.schema, propAccessor);\n}\nfunction generateOverwriteCheck(doc, ctx, check, currentAccessor, newAccessor) {\n const tx = check._zod.def.tx;\n if (!tx) {\n throw new ZodCompileUnsupportedError(\"overwrite check without a transform function\");\n }\n // Check for async transform\n if (isAsyncFunction(tx)) {\n throw new ZodCompileAsyncError(\"z.compile: async overwrite transforms are not supported\");\n }\n // Hoist the transform function as a constant and apply it\n const txConst = addConstant(ctx, tx);\n doc.write(`const ${newAccessor} = ${txConst}(${currentAccessor});`);\n}\n/** A predicate that hands back a thenable is an async check reached synchronously, and the interpreter throws `$ZodAsyncError` for it. Returning INVALID instead would be a bail-out, and a union reads a bail-out as a rejected branch and answers with a later one — so the throw has to survive into generated code. */\nfunction throwAsync() {\n throw new $ZodAsyncError();\n}\n/** Shared `addIssue` for the spoofed payloads a refine, check or transform receives. Allocating one per call — a fresh closure plus a `this`-bound method on a fresh literal — pinned every payload-allocating schema at ~2.7M ops/sec against 135M for a plain object literal. It captures nothing per call; it only reaches `this.issues`. */\nfunction pushIssue(issue) {\n this.issues.push(issue);\n}\nfunction generateCustomRefineCheck(doc, ctx, check, accessor) {\n const def = check._zod.def;\n if (def.fn) {\n // Simple predicate function (from .refine())\n if (isAsyncFunction(def.fn)) {\n throw new ZodCompileAsyncError(\"z.compile: async .refine() predicates are not supported\");\n }\n const fnConst = addConstant(ctx, def.fn);\n const throwAsyncConst = addConstant(ctx, throwAsync);\n const resVar = newVar(ctx);\n doc.write(`const ${resVar} = ${fnConst}(${accessor});`);\n // A thenable is truthy, so it would otherwise read as a pass. It is not a rejection either: the interpreter throws, and INVALID inside a union would just hand the parse to the next branch.\n doc.write(`if (${resVar} instanceof Promise) ${throwAsyncConst}();`);\n doc.write(`if (!${resVar}) return INVALID;`);\n // A `.refine()` predicate only answers yes or no; it cannot rewrite the value.\n return accessor;\n }\n if (check._zod.check) {\n if (isAsyncFunction(check._zod.check)) {\n throw new ZodCompileAsyncError(\"z.compile: async .superRefine() / check functions are not supported\");\n }\n // SuperRefine or other check function - need to spoof context Create a helper that runs the check and returns true if no issues\n const checkFn = check._zod.check;\n // `$RefinementCtx` extends the parse payload, so a check may rewrite\n // `ctx.value` as well as push issues — `.superRefine((v, ctx) => { ctx.value =\n // v.trim() })` is a value transform. Returning only a boolean discarded that\n // write and emitted the untrimmed input. Hand the value back and thread it on.\n const helperFn = (value) => {\n const fakePayload = { value, issues: [], addIssue: pushIssue };\n const result = checkFn(fakePayload);\n // Throw rather than return INVALID: the interpreter throws here, and a union would read INVALID as a rejected branch.\n if (result instanceof Promise)\n throwAsync();\n return fakePayload.issues.length === 0 ? fakePayload.value : INVALID;\n };\n const helperConst = addConstant(ctx, helperFn);\n const outVar = newVar(ctx);\n doc.write(`const ${outVar} = ${helperConst}(${accessor});`);\n doc.write(`if (${outVar} === INVALID) return INVALID;`);\n return outVar;\n }\n throw new ZodCompileUnsupportedError(\"custom check without a predicate or check function\");\n}\n/**\n * Built-in formats that validate with nothing but `def.pattern`, so compiling\n * the regex reproduces the runtime exactly. Deliberately an allowlist: a format\n * missing from it loses its fast path, while a format wrongly added to it\n * silently accepts input the runtime rejects. Formats that layer extra\n * validation over a shape-only pattern (`credit_card`, `base64`, `ipv6`, …) are\n * handled above by hoisting the runtime validator itself.\n */\nconst PATTERN_IS_COMPLETE = new Set([\n \"cidrv4\",\n \"cuid\",\n \"cuid2\",\n \"date\",\n \"datetime\",\n \"duration\",\n \"e164\",\n \"email\",\n \"emoji\",\n \"ends_with\",\n \"guid\",\n \"includes\",\n \"ipv4\",\n \"ksuid\",\n \"lowercase\",\n \"mac\",\n \"nanoid\",\n \"regex\",\n \"starts_with\",\n \"time\",\n \"ulid\",\n \"uppercase\",\n \"uuid\",\n \"xid\",\n]);\n// Returns the accessor holding the (possibly normalized) value after the check — url/normalize formats produce a new value like overwrite does. Never assigns to the incoming accessor: it may be a `const` or a property expression on user input.\nfunction generateStringFormatCheck(doc, ctx, def, accessor) {\n // Some string formats do runtime validation beyond their advertised pattern. For cheap pure utility checks, hoist the runtime function and call it so the fast path stays correct without cloning the utility logic into codegen.\n const fmt = def.format;\n if (fmt === \"base64\") {\n const validator = addConstant(ctx, isValidBase64);\n doc.write(`if (!${validator}(${accessor})) return INVALID;`);\n return accessor;\n }\n if (fmt === \"base64url\") {\n const validator = addConstant(ctx, isValidBase64URL);\n doc.write(`if (!${validator}(${accessor})) return INVALID;`);\n return accessor;\n }\n if (fmt === \"jwt\") {\n const validator = addConstant(ctx, isValidJWT);\n const alg = addConstant(ctx, def.alg ?? null);\n doc.write(`if (!${validator}(${accessor}, ${alg})) return INVALID;`);\n return accessor;\n }\n if (fmt === \"ipv6\") {\n const validator = addConstant(ctx, isValidIPv6);\n doc.write(`if (!${validator}(${accessor})) return INVALID;`);\n return accessor;\n }\n if (fmt === \"cidrv6\") {\n const validator = addConstant(ctx, isValidCIDRv6);\n doc.write(`if (!${validator}(${accessor})) return INVALID;`);\n return accessor;\n }\n if (fmt === \"credit_card\") {\n const validator = addConstant(ctx, isValidCreditCard);\n doc.write(`if (!${validator}(${accessor})) return INVALID;`);\n return accessor;\n }\n const formatDef = def;\n if (fmt === \"url\" ||\n fmt === \"httpurl\" ||\n formatDef.normalize ||\n formatDef.hostname !== undefined ||\n formatDef.protocol !== undefined) {\n // Same three predicates the runtime calls, in the same order, so there is no second URL implementation to drift. Which options exist is known now, so the calls the runtime makes conditionally are emitted conditionally instead.\n const parseConst = addConstant(ctx, parseURLObject);\n const defConst = addConstant(ctx, def);\n const trimVar = newVar(ctx);\n const urlVar = newVar(ctx);\n doc.write(`const ${trimVar} = ${accessor}.trim();`);\n doc.write(`const ${urlVar} = ${parseConst}(${trimVar}, ${defConst});`);\n doc.write(`if (typeof ${urlVar} === \"number\") return INVALID;`);\n if (formatDef.hostname !== undefined) {\n const hostnameConst = addConstant(ctx, urlHostnameOk);\n doc.write(`if (!${hostnameConst}(${urlVar}, ${defConst}.hostname)) return INVALID;`);\n }\n if (formatDef.protocol !== undefined) {\n const protocolConst = addConstant(ctx, urlProtocolOk);\n doc.write(`if (!${protocolConst}(${urlVar}, ${defConst}.protocol)) return INVALID;`);\n }\n const outputVar = newVar(ctx);\n const outputExpr = formatDef.normalize ? `${urlVar}.href` : `${addConstant(ctx, stripTabAndNewline)}(${trimVar})`;\n doc.write(`const ${outputVar} = ${outputExpr};`);\n return outputVar;\n }\n // A custom string format carries the predicate the runtime actually calls. Hoist and call it instead of testing `def.pattern`: the two only coincide when the format was built from a RegExp, and relying on that coupling is how supplemental validation gets dropped.\n const customFn = def.fn;\n if (customFn) {\n if (isAsyncFunction(customFn))\n throw new ZodCompileUnsupportedError(`async string format ${fmt}`);\n const fnConst = addConstant(ctx, customFn);\n doc.write(`if (!${fnConst}(${accessor})) return INVALID;`);\n return accessor;\n }\n // Formats whose `pattern` IS the whole check. An allowlist rather than `if (def.pattern)`, because credit_card, base64 and ipv6 carry a shape-only pattern and validate the rest separately.\n if (PATTERN_IS_COMPLETE.has(fmt) && def.pattern) {\n const patternConst = addConstant(ctx, def.pattern);\n doc.write(`${patternConst}.lastIndex = 0;`);\n doc.write(`if (!${patternConst}.test(${accessor})) return INVALID;`);\n return accessor;\n }\n const format = def.format;\n switch (format) {\n case \"regex\":\n // A regex check with a pattern returned above. Reaching here means there is no pattern to test, and accepting unconditionally would pass every input, so hand the schema back to the runtime.\n throw new ZodCompileUnsupportedError(\"regex format without a pattern\");\n case \"lowercase\":\n doc.write(`if (${accessor} !== ${accessor}.toLowerCase()) return INVALID;`);\n break;\n case \"uppercase\":\n doc.write(`if (${accessor} !== ${accessor}.toUpperCase()) return INVALID;`);\n break;\n case \"includes\":\n doc.write(`if (!${accessor}.includes(${util.esc(def.includes)})) return INVALID;`);\n break;\n case \"starts_with\": {\n const prefix = def.prefix;\n doc.write(`if (${accessor}.slice(0, ${prefix.length}) !== ${util.esc(prefix)}) return INVALID;`);\n break;\n }\n case \"ends_with\": {\n const suffix = def.suffix;\n doc.write(`if (${accessor}.slice(-${suffix.length}) !== ${util.esc(suffix)}) return INVALID;`);\n break;\n }\n default: {\n void format;\n throw new ZodCompileUnsupportedError(`string format ${format}`);\n }\n }\n return accessor;\n}\nfunction generateCheck(doc, ctx, schema, accessor, needsValue = true) {\n const def = schema._zod.def;\n const type = def.type;\n // A coercing schema would compile to the bare type test and reject what it should convert; inside a union that reads as a rejected branch, so refuse at codegen.\n if (def.coerce) {\n throw new ZodCompileUnsupportedError(`coercion (z.coerce.${type}())`);\n }\n // A node builds its output when its caller reads one, or when it carries checks of its own, since a check reads what was built. One polarity for the whole walk: this is what the node does, and it is what its children are told they need.\n const buildsValue = needsValue || !!def.checks?.length;\n let typeAccessor;\n switch (type) {\n case \"string\":\n typeAccessor = generateStringCheck(doc, ctx, schema, accessor);\n break;\n case \"number\":\n typeAccessor = generateNumberCheck(doc, schema, accessor);\n break;\n case \"boolean\":\n typeAccessor = generateBooleanCheck(doc, accessor);\n break;\n case \"bigint\":\n typeAccessor = generateBigIntCheck(doc, schema, accessor);\n break;\n case \"symbol\":\n typeAccessor = generateSymbolCheck(doc, accessor);\n break;\n case \"undefined\":\n typeAccessor = generateUndefinedCheck(doc, accessor);\n break;\n case \"null\":\n typeAccessor = generateNullCheck(doc, accessor);\n break;\n case \"any\":\n case \"unknown\":\n // No check needed - pass through\n typeAccessor = accessor;\n break;\n case \"never\":\n doc.write(\"return INVALID;\");\n typeAccessor = accessor;\n break;\n case \"void\":\n typeAccessor = generateVoidCheck(doc, accessor);\n break;\n case \"nan\":\n typeAccessor = generateNaNCheck(doc, accessor);\n break;\n case \"date\":\n typeAccessor = generateDateCheck(doc, accessor);\n break;\n case \"object\":\n typeAccessor = generateObjectCheck(doc, ctx, schema, accessor, buildsValue);\n break;\n case \"optional\":\n typeAccessor = generateOptionalCheck(doc, ctx, schema, accessor, buildsValue);\n break;\n case \"nullable\":\n typeAccessor = generateNullableCheck(doc, ctx, schema, accessor, buildsValue);\n break;\n case \"array\":\n typeAccessor = generateArrayCheck(doc, ctx, schema, accessor, buildsValue);\n break;\n case \"literal\":\n typeAccessor = generateLiteralCheck(doc, ctx, schema, accessor);\n break;\n case \"enum\":\n typeAccessor = generateEnumCheck(doc, ctx, schema, accessor);\n break;\n case \"readonly\": {\n const innerOut = generateWrapperCheck(doc, ctx, schema, accessor);\n // Runtime freezes the parsed value (schemas.ts handleReadonlyResult).\n const frozenVar = newVar(ctx);\n doc.write(`const ${frozenVar} = Object.freeze(${innerOut});`);\n typeAccessor = frozenVar;\n break;\n }\n case \"success\":\n // Runtime output is `issues.length === 0`. The fast path only reaches\n // here when the inner check passed (failure returns INVALID and the\n // runtime fallback reproduces the inner issues), so the output is\n // always `true`.\n generateWrapperCheck(doc, ctx, schema, accessor);\n typeAccessor = \"true\";\n break;\n case \"default\":\n case \"prefault\":\n typeAccessor = generateDefaultCheck(doc, ctx, schema, accessor);\n break;\n case \"nonoptional\":\n typeAccessor = generateNonOptionalCheck(doc, ctx, schema, accessor);\n break;\n case \"tuple\":\n typeAccessor = generateTupleCheck(doc, ctx, schema, accessor);\n break;\n case \"union\":\n typeAccessor = generateUnionCheck(doc, ctx, schema, accessor);\n break;\n case \"intersection\":\n typeAccessor = generateIntersectionCheck(doc, ctx, schema, accessor);\n break;\n case \"record\":\n typeAccessor = generateRecordCheck(doc, ctx, schema, accessor);\n break;\n case \"map\":\n typeAccessor = generateMapCheck(doc, ctx, schema, accessor);\n break;\n case \"set\":\n typeAccessor = generateSetCheck(doc, ctx, schema, accessor);\n break;\n case \"file\":\n typeAccessor = generateFileCheck(doc, accessor);\n break;\n case \"template_literal\":\n typeAccessor = generateTemplateLiteralCheck(doc, ctx, schema, accessor);\n break;\n case \"lazy\":\n typeAccessor = generateLazyCheck(doc, ctx, schema, accessor);\n break;\n case \"pipe\":\n typeAccessor = generatePipeCheck(doc, ctx, schema, accessor);\n break;\n case \"custom\":\n typeAccessor = generateCustomCheck(doc, ctx, schema, accessor);\n break;\n case \"transform\":\n typeAccessor = generateTransformCheck(doc, ctx, schema, accessor);\n break;\n case \"catch\":\n typeAccessor = generateCatchCheck(doc, ctx, schema, accessor);\n break;\n default: {\n void type;\n throw new ZodCompileUnsupportedError(`schema type ${type}`);\n }\n }\n // a node that built nothing has no checks to run: not building requires an empty check list\n if (typeAccessor === null)\n return null;\n // Generate checks after the type-specific validation (may transform value)\n return generateChecks(doc, ctx, schema, typeAccessor);\n}\nfunction generateStringCheck(doc, ctx, schema, accessor) {\n doc.write(`if (typeof ${accessor} !== \"string\") return INVALID;`);\n // z.email() carries its format on the def, z.string().email() in def.checks; both route here so the format table has no second copy to drift from.\n const def = schema._zod.def;\n if (def.format === undefined)\n return accessor;\n return generateStringFormatCheck(doc, ctx, def, accessor);\n}\nfunction generateNumberCheck(doc, schema, accessor) {\n // Runtime z.number() rejects NaN and ±Infinity. Number.isFinite covers both.\n doc.write(`if (typeof ${accessor} !== \"number\" || !Number.isFinite(${accessor})) return INVALID;`);\n // Mini factories like z.int(), z.int32(), z.uint32(), z.float32() bake a number_format check into the schema def itself (not into def.checks). Apply the same constraint here.\n const def = schema._zod.def;\n if (def.check === \"number_format\" && def.format) {\n generateNumberFormatCheck(doc, { format: def.format }, accessor);\n }\n return accessor;\n}\nfunction generateBooleanCheck(doc, accessor) {\n doc.write(`if (typeof ${accessor} !== \"boolean\") return INVALID;`);\n return accessor;\n}\nfunction generateBigIntCheck(doc, schema, accessor) {\n doc.write(`if (typeof ${accessor} !== \"bigint\") return INVALID;`);\n // Handle bigint format (int64, uint64) directly on the schema def\n const def = schema._zod.def;\n if (def.format) {\n switch (def.format) {\n case \"int64\":\n doc.write(`if (${accessor} < -9223372036854775808n || ${accessor} > 9223372036854775807n) return INVALID;`);\n break;\n case \"uint64\":\n doc.write(`if (${accessor} < 0n || ${accessor} > 18446744073709551615n) return INVALID;`);\n break;\n }\n }\n return accessor;\n}\nfunction generateSymbolCheck(doc, accessor) {\n doc.write(`if (typeof ${accessor} !== \"symbol\") return INVALID;`);\n return accessor;\n}\nfunction generateUndefinedCheck(doc, accessor) {\n doc.write(`if (${accessor} !== undefined) return INVALID;`);\n return accessor;\n}\nfunction generateNullCheck(doc, accessor) {\n doc.write(`if (${accessor} !== null) return INVALID;`);\n return accessor;\n}\nfunction generateVoidCheck(doc, accessor) {\n doc.write(`if (${accessor} !== undefined) return INVALID;`);\n return accessor;\n}\nfunction generateNaNCheck(doc, accessor) {\n doc.write(`if (typeof ${accessor} !== \"number\" || !Number.isNaN(${accessor})) return INVALID;`);\n return accessor;\n}\nfunction generateDateCheck(doc, accessor) {\n doc.write(`if (!(${accessor} instanceof Date) || Number.isNaN(${accessor}.getTime())) return INVALID;`);\n return accessor;\n}\nfunction generateObjectCheck(doc, ctx, schema, accessor, buildsValue = true) {\n const def = schema._zod.def;\n // Check that input is a non-null, non-array object\n doc.write(`if (typeof ${accessor} !== \"object\" || ${accessor} === null || Array.isArray(${accessor})) return INVALID;`);\n const shape = def.shape;\n const keys = Object.keys(shape);\n const symbolKeys = Object.getOwnPropertySymbols(shape);\n // a symbol has no source literal, so it is hoisted as a constant; `keys` stays string-only where the emitted code uses `for...in`\n const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys;\n const keyExpr = (k) => (typeof k === \"symbol\" ? addConstant(ctx, k) : util.esc(k));\n const propKey = (k) => (typeof k === \"symbol\" ? `[${keyExpr(k)}]` : util.esc(k));\n const propShape = shape;\n // `__proto__` as an own shape key can't be expressed in an output object literal (the literal form sets the prototype instead of an own property).\n if (keys.includes(\"__proto__\")) {\n throw new ZodCompileUnsupportedError('object shape key \"__proto__\"');\n }\n // Map from key to output accessor for that property\n const propOutputs = new Map();\n // Validate each property and collect output accessors\n for (const key of allKeys) {\n const propSchema = propShape[key];\n const kx = keyExpr(key);\n // Always cache the property read: the runtime reads input[key] exactly once, so a getter must not be re-read by checks or output assembly.\n const inputVar = newVar(ctx);\n doc.write(`const ${inputVar} = ${accessor}[${kx}];`);\n if (propSchema._zod.optin !== undefined) {\n // Any optin rung means the key may be omitted. The runtime runs the property anyway and ignores issues only when the key is genuinely absent, which is what makes exactOptional compositional.\n const outputVar = newVar(ctx);\n doc.write(`let ${outputVar} = (() => {`);\n doc.indented((d) => {\n const outputAccessor = compileChild(d, ctx, propSchema, inputVar);\n d.write(`return ${outputAccessor};`);\n });\n doc.write(`})();`);\n if (propSchema._zod.optout === \"optional\") {\n doc.write(`if (${outputVar} === INVALID) {`);\n doc.indented((d) => {\n d.write(`if (${kx} in ${accessor}) return INVALID;`);\n d.write(`${outputVar} = undefined;`);\n });\n doc.write(`}`);\n }\n else {\n doc.write(`if (${outputVar} === INVALID) return INVALID;`);\n }\n propOutputs.set(key, outputVar);\n }\n else {\n if (requiresPresenceCheck(propSchema)) {\n doc.write(`if (!(${kx} in ${accessor})) return INVALID;`);\n }\n // Generate check and get output accessor\n const outputAccessor = compileChild(doc, ctx, propSchema, inputVar, buildsValue);\n if (outputAccessor !== null)\n propOutputs.set(key, outputAccessor);\n }\n }\n // Handle catchall\n const catchall = def.catchall;\n let unknownKeysMode = \"none\";\n if (catchall) {\n const catchallType = catchall._zod.def.type;\n if (catchallType === \"never\") {\n // Strict: one `for...in`, as the runtime does, so inherited enumerable keys count. An undeclared `__proto__` is reported here and excluded only from the output (#6221); an own-key count would wrongly reject a class instance.\n const condition = keys.map((k) => `k !== ${util.esc(k)}`).join(\" && \") || \"true\";\n doc.write(`for (const k in ${accessor}) {`);\n doc.indented((d) => {\n d.write(`if (${condition}) return INVALID;`);\n });\n doc.write(`}`);\n }\n else if ((catchallType === \"unknown\" || catchallType === \"any\") && !catchall._zod.def.checks?.length) {\n unknownKeysMode = \"passthrough\";\n }\n else {\n unknownKeysMode = \"schema\";\n }\n }\n // else: strip mode (no catchall) - unknown keys ignored, only include known keys\n // Shape keys in declared order, then unknown keys in for...in order. A middle-rung key is included iff present on the input, else iff its output is not undefined.\n const outputVar = newVar(ctx);\n const hasConditionalKeys = allKeys.some((k) => mayOutputUndefined(propShape[k]) || dropsWhenAbsent(propShape[k]));\n // Assert mode: every declared key is validated above, so the output literal and the unknown-key copy are pure waste. A `never` catchall already emitted its rejection loop; a schema catchall still has to validate the values it would otherwise have stored.\n if (!buildsValue) {\n if (unknownKeysMode === \"schema\") {\n const knownSet = keys.length > 0 ? addConstant(ctx, new Set(keys)) : null;\n doc.write(`for (const k in ${accessor}) {`);\n doc.indented((d) => {\n d.write(`if (k === \"__proto__\") continue;`);\n if (knownSet)\n d.write(`if (${knownSet}.has(k)) continue;`);\n const valVar = newVar(ctx);\n d.write(`const ${valVar} = ${accessor}[k];`);\n compileChild(d, ctx, catchall, valVar, false);\n });\n doc.write(`}`);\n }\n return null;\n }\n if (!hasConditionalKeys) {\n const propLiterals = allKeys.map((k) => `${propKey(k)}: ${propOutputs.get(k)}`).join(\", \");\n doc.write(`const ${outputVar} = { ${propLiterals} };`);\n }\n else {\n doc.write(`const ${outputVar} = {};`);\n for (const k of allKeys) {\n const kx = keyExpr(k);\n const out = propOutputs.get(k);\n if (dropsWhenAbsent(propShape[k])) {\n doc.write(`if (${kx} in ${accessor}) ${outputVar}[${kx}] = ${out};`);\n }\n else if (mayOutputUndefined(propShape[k])) {\n doc.write(`if (${out} !== undefined || ${kx} in ${accessor}) ${outputVar}[${kx}] = ${out};`);\n }\n else {\n doc.write(`${outputVar}[${kx}] = ${out};`);\n }\n }\n }\n if (unknownKeysMode !== \"none\") {\n // Unknown keys are written directly into the output after shape keys — for...in (like the runtime) so inherited enumerables participate.\n const knownSet = keys.length > 0 ? addConstant(ctx, new Set(keys)) : null;\n doc.write(`for (const k in ${accessor}) {`);\n doc.indented((d) => {\n // Skip __proto__: assigning obj[\"__proto__\"] on a plain {} replaces the prototype via the setter rather than adding an own property. Mirrors the runtime catchall fix (#5898).\n d.write(`if (k === \"__proto__\") continue;`);\n if (knownSet)\n d.write(`if (${knownSet}.has(k)) continue;`);\n if (unknownKeysMode === \"passthrough\") {\n d.write(`${outputVar}[k] = ${accessor}[k];`);\n }\n else {\n const valVar = newVar(ctx);\n d.write(`const ${valVar} = ${accessor}[k];`);\n const catchallOut = compileChild(d, ctx, catchall, valVar);\n d.write(`${outputVar}[k] = ${catchallOut};`);\n }\n });\n doc.write(`}`);\n }\n return outputVar;\n}\nfunction generateOptionalCheck(doc, ctx, schema, accessor, buildsValue = true) {\n const def = schema._zod.def;\n if (isExactOptional(schema)) {\n return generateCheck(doc, ctx, def.innerType, accessor, buildsValue);\n }\n // Same question $ZodOptional asks: only the top rung of the optin ladder substitutes a value for an absent input, so only it is worth running on `undefined`. Every other rung leaves the value intact, which is the skip branch below.\n if (def.innerType._zod.optin === \"defaulted\") {\n const outputVar = newVar(ctx);\n const branchVar = newVar(ctx);\n doc.write(`let ${outputVar};`);\n doc.write(`if (${accessor} === undefined) {`);\n doc.indented((d) => {\n d.write(`const ${branchVar} = (() => {`);\n d.indented((d2) => {\n const innerOutput = generateCheck(d2, ctx, def.innerType, accessor);\n d2.write(`return ${innerOutput};`);\n });\n d.write(`})();`);\n d.write(`if (${branchVar} !== INVALID) ${outputVar} = ${branchVar};`);\n });\n doc.write(`} else {`);\n doc.indented((d) => {\n const innerOutput = generateCheck(d, ctx, def.innerType, accessor);\n d.write(`${outputVar} = ${innerOutput};`);\n });\n doc.write(`}`);\n return outputVar;\n }\n const outputVar = buildsValue ? newVar(ctx) : null;\n if (outputVar)\n doc.write(`let ${outputVar};`);\n doc.write(`if (${accessor} !== undefined) {`);\n doc.indented((d) => {\n const innerOutput = generateCheck(d, ctx, def.innerType, accessor, buildsValue);\n if (outputVar && innerOutput !== null)\n d.write(`${outputVar} = ${innerOutput};`);\n });\n doc.write(`}`);\n return outputVar;\n}\nfunction isExactOptional(schema) {\n return schema._zod.traits?.has(\"$ZodExactOptional\") === true;\n}\n// A value-level fast path reads an absent key as `undefined`, so z.undefined(), z.any() and unions containing undefined would accept a missing property the runtime rejects.\nfunction requiresPresenceCheck(schema) {\n return schema._zod.optin === undefined && fastPathAcceptsAbsence(schema);\n}\nfunction fastPathAcceptsAbsence(schema) {\n // An island is handed `input[key]` and cannot tell absent from explicitly undefined, so report absence-accepting and let the object emit the presence guard (#6405).\n if (schema._zod.def.coerce)\n return true;\n const def = schema._zod.def;\n switch (def.type) {\n case \"any\":\n case \"unknown\":\n case \"undefined\":\n case \"void\":\n case \"default\":\n case \"prefault\":\n case \"transform\":\n case \"custom\":\n case \"lazy\":\n return true;\n case \"string\":\n case \"number\":\n case \"boolean\":\n case \"bigint\":\n case \"symbol\":\n case \"null\":\n case \"never\":\n case \"nan\":\n case \"date\":\n case \"object\":\n case \"array\":\n case \"tuple\":\n case \"record\":\n case \"map\":\n case \"set\":\n case \"file\":\n case \"template_literal\":\n return false;\n case \"nonoptional\":\n // Normally rejects an absent key, but not when something inside supplies a value for it: `.default(v).optional().nonoptional()` accepts absence and yields v. Defer to the inner — over-reporting here only costs a presence check, and a fast path that wrongly rejects still falls back to the runtime.\n return def.innerType ? fastPathAcceptsAbsence(def.innerType) : false;\n case \"literal\":\n return !!def.values?.includes(undefined);\n case \"enum\":\n return !!schema._zod.values?.has(undefined);\n case \"optional\":\n case \"nullable\":\n case \"readonly\":\n case \"success\":\n return def.innerType ? fastPathAcceptsAbsence(def.innerType) : true;\n case \"catch\":\n // catch always produces a value (inner may fail → catchValue substitutes), so it accepts an absent key regardless of inner.\n return true;\n case \"union\":\n return def.options ? def.options.some(fastPathAcceptsAbsence) : true;\n case \"intersection\":\n if (!def.left || !def.right)\n return true;\n return fastPathAcceptsAbsence(def.left) && fastPathAcceptsAbsence(def.right);\n case \"pipe\":\n return def.in ? fastPathAcceptsAbsence(def.in) : true;\n default:\n return true;\n }\n}\n/** The middle rung permits absence without supplying anything in its place, so an absent key contributes nothing — mirrors the leading gate in `handlePropertyResult`. */\nfunction dropsWhenAbsent(schema) {\n return schema._zod.optin === \"optional\" && schema._zod.optout === \"optional\";\n}\n// Whether a schema's success-path output can be `undefined`. Object output\n// assembly gives such props the runtime's value-or-presence inclusion rule;\n// everything else keeps the unconditional object-literal slot.\nfunction mayOutputUndefined(schema) {\n const def = schema._zod.def;\n switch (def.type) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n case \"bigint\":\n case \"symbol\":\n case \"null\":\n case \"nan\":\n case \"date\":\n case \"object\":\n case \"array\":\n case \"tuple\":\n case \"record\":\n case \"map\":\n case \"set\":\n case \"file\":\n case \"template_literal\":\n case \"never\":\n case \"success\":\n return false;\n case \"literal\":\n return !!def.values?.includes(undefined);\n case \"enum\":\n return !!schema._zod.values?.has(undefined);\n case \"optional\":\n return true;\n case \"nullable\":\n case \"readonly\":\n case \"nonoptional\":\n return def.innerType ? mayOutputUndefined(def.innerType) : true;\n case \"union\":\n return def.options ? def.options.some(mayOutputUndefined) : true;\n case \"intersection\":\n return !def.left || !def.right || mayOutputUndefined(def.left) || mayOutputUndefined(def.right);\n case \"pipe\":\n return def.out ? mayOutputUndefined(def.out) : true;\n default:\n // any/unknown/undefined/void/default/prefault/transform/custom/lazy/catch\n return true;\n }\n}\nfunction generateNullableCheck(doc, ctx, schema, accessor, buildsValue = true) {\n const def = schema._zod.def;\n const outputVar = buildsValue ? newVar(ctx) : null;\n if (outputVar)\n doc.write(`let ${outputVar} = null;`);\n doc.write(`if (${accessor} !== null) {`);\n doc.indented((d) => {\n const innerOutput = generateCheck(d, ctx, def.innerType, accessor, buildsValue);\n if (outputVar && innerOutput !== null)\n d.write(`${outputVar} = ${innerOutput};`);\n });\n doc.write(`}`);\n return outputVar;\n}\nfunction generateArrayCheck(doc, ctx, schema, accessor, buildsValue = true) {\n const def = schema._zod.def;\n doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);\n // Build a new array with validated/transformed elements.\n const outputVar = buildsValue ? newVar(ctx) : null;\n const iVar = newVar(ctx);\n const elemVar = newVar(ctx);\n if (outputVar)\n doc.write(`const ${outputVar} = new Array(${accessor}.length);`);\n doc.write(`for (let ${iVar} = 0; ${iVar} < ${accessor}.length; ${iVar}++) {`);\n doc.indented((d) => {\n d.write(`const ${elemVar} = ${accessor}[${iVar}];`);\n const elemOutput = compileChild(d, ctx, def.element, elemVar, buildsValue);\n if (outputVar && elemOutput !== null)\n d.write(`${outputVar}[${iVar}] = ${elemOutput};`);\n });\n doc.write(`}`);\n return outputVar;\n}\nfunction generateLiteralCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n const values = def.values;\n // Anything but a single value goes through Set.has: multi-value so every value participates, empty so nothing does — values[0] would be undefined and compile to an `!== undefined` check that accepts it. Single-value stays inlined for speed.\n if (values.length !== 1) {\n const literalSet = addConstant(ctx, new Set(values));\n doc.write(`if (!${literalSet}.has(${accessor})) return INVALID;`);\n return accessor;\n }\n const value = values[0];\n // `$ZodLiteral` matches with `values.has`, i.e. SameValueZero, so NaN matches itself. `x !== NaN` is true for every input, which would reject everything — hand it to the same Set form the multi-value path uses.\n if (typeof value === \"number\" && Number.isNaN(value)) {\n const literalSet = addConstant(ctx, new Set(values));\n doc.write(`if (!${literalSet}.has(${accessor})) return INVALID;`);\n return accessor;\n }\n if (typeof value === \"string\") {\n doc.write(`if (${accessor} !== ${util.esc(value)}) return INVALID;`);\n }\n else if (typeof value === \"number\" || typeof value === \"boolean\") {\n doc.write(`if (${accessor} !== ${value}) return INVALID;`);\n }\n else if (value === null) {\n doc.write(`if (${accessor} !== null) return INVALID;`);\n }\n else if (value === undefined) {\n doc.write(`if (${accessor} !== undefined) return INVALID;`);\n }\n else if (typeof value === \"bigint\") {\n doc.write(`if (${accessor} !== ${value}n) return INVALID;`);\n }\n else {\n throw new ZodCompileUnsupportedError(`literal type ${typeof value}`);\n }\n return accessor;\n}\nfunction generateEnumCheck(doc, ctx, schema, accessor) {\n const values = schema._zod.values;\n // z.partialRecord and friends clear `_zod.values`, leaving no set to test membership against. Throw rather than emit INVALID so a union falls back whole instead of counting a false rejection.\n if (!values) {\n throw new ZodCompileUnsupportedError(\"enum schema without enumerated values\");\n }\n const enumSet = addConstant(ctx, values);\n doc.write(`if (!${enumSet}.has(${accessor})) return INVALID;`);\n return accessor;\n}\nfunction generateWrapperCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n return generateCheck(doc, ctx, def.innerType, accessor);\n}\nfunction generateDefaultCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n // `defaultValue` is an accessor on schemas built through the classic/mini\n // factories and a plain data property on ones rebuilt programmatically\n // (deepPartial and friends). Read it off the def either way — taking only\n // `descriptor.get` silently dropped the default for the second kind, so\n // `.default(v)` compiled to `undefined` instead of `v`.\n const descriptor = Object.getOwnPropertyDescriptor(schema._zod.def, \"defaultValue\");\n const defaultGetter = descriptor\n ? () => schema._zod.def.defaultValue\n : undefined;\n // prefault differs from default: undefined-input is first replaced with the prefault value, then run through the inner schema.\n if (schema._zod.def.type === \"prefault\") {\n if (!defaultGetter) {\n return generateCheck(doc, ctx, def.innerType, accessor);\n }\n const defaultFn = addConstant(ctx, defaultGetter);\n const inputVar = newVar(ctx);\n doc.write(`let ${inputVar} = ${accessor};`);\n doc.write(`if (${accessor} === undefined) ${inputVar} = ${defaultFn}();`);\n return generateCheck(doc, ctx, def.innerType, inputVar);\n }\n const outputVar = newVar(ctx);\n // Default allows undefined (replaces with default value), otherwise validates inner type\n if (defaultGetter) {\n const defaultFn = addConstant(ctx, defaultGetter);\n const cloneFn = addConstant(ctx, util.shallowClone);\n doc.write(`let ${outputVar};`);\n doc.write(`if (${accessor} === undefined) {`);\n doc.indented((d) => {\n // Shallow-clone the default so callers can mutate the result without affecting subsequent parses (#5855 — also covers Map/Set).\n d.write(`${outputVar} = ${cloneFn}(${defaultFn}());`);\n });\n doc.write(`} else {`);\n doc.indented((d) => {\n const innerOutput = generateCheck(d, ctx, def.innerType, accessor);\n d.write(`${outputVar} = ${innerOutput} === undefined ? ${cloneFn}(${defaultFn}()) : ${innerOutput};`);\n });\n doc.write(`}`);\n }\n else {\n doc.write(`let ${outputVar};`);\n doc.write(`if (${accessor} !== undefined) {`);\n doc.indented((d) => {\n const innerOutput = generateCheck(d, ctx, def.innerType, accessor);\n d.write(`${outputVar} = ${innerOutput};`);\n });\n doc.write(`}`);\n }\n return outputVar;\n}\nfunction generateNonOptionalCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n // The runtime inspects what the inner produced, not what it was given: a catch can turn a defined input into undefined, a default an absent one into a value.\n const innerOutput = generateCheck(doc, ctx, def.innerType, accessor);\n const outputVar = newVar(ctx);\n doc.write(`const ${outputVar} = ${innerOutput};`);\n doc.write(`if (${outputVar} === undefined) return INVALID;`);\n return outputVar;\n}\nfunction generateTupleCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n const items = def.items;\n const rest = def.rest;\n doc.write(`if (!Array.isArray(${accessor})) return INVALID;`);\n // Mirror the runtime's getTupleOptStart: find the first index where every subsequent slot accepts `undefined` (i.e. is optional on input). Anything shorter than this is too_small; trailing absent slots are legal.\n const optinStart = getTupleOptStart(items, \"optin\");\n const optoutStart = getTupleOptStart(items, \"optout\");\n // Length bounds\n if (rest) {\n // With rest: minimum length is the last required input slot\n doc.write(`if (${accessor}.length < ${optinStart}) return INVALID;`);\n }\n else {\n // No rest: input must be in [optinStart, items.length]\n doc.write(`if (${accessor}.length < ${optinStart} || ${accessor}.length > ${items.length}) return INVALID;`);\n }\n // Build the output in assignment order so absent optional-output tail slots can truncate while default/prefault slots still fill missing positions.\n const outputVar = newVar(ctx);\n doc.write(`const ${outputVar} = [];`);\n // Validate and collect each fixed item\n for (let i = 0; i < items.length; i++) {\n const itemSchema = items[i];\n if (i >= optoutStart) {\n doc.write(`if (${outputVar}.length === ${i}) {`);\n doc.indented((d) => {\n d.write(`if (${i} < ${accessor}.length) {`);\n d.indented((d2) => {\n const elemVar = newVar(ctx);\n d2.write(`const ${elemVar} = ${accessor}[${i}];`);\n const elemOutput = compileChild(d2, ctx, itemSchema, elemVar);\n d2.write(`${outputVar}[${i}] = ${elemOutput};`);\n });\n d.write(`} else {`);\n d.indented((d2) => {\n // Middle rung: absence supplies nothing in its place, so truncate rather than running the item on `undefined` and keeping what it invents. Mirrors the leading gate in `handleTupleResults`.\n if (dropsWhenAbsent(itemSchema)) {\n d2.write(`${outputVar}.length = ${i};`);\n return;\n }\n const elemVar = newVar(ctx);\n const branchVar = newVar(ctx);\n d2.write(`const ${elemVar} = undefined;`);\n d2.write(`const ${branchVar} = (() => {`);\n d2.indented((d3) => {\n const elemOutput = compileChild(d3, ctx, itemSchema, elemVar);\n d3.write(`return ${elemOutput};`);\n });\n d2.write(`})();`);\n d2.write(`if (${branchVar} === INVALID || ${branchVar} === undefined) ${outputVar}.length = ${i};`);\n d2.write(`else ${outputVar}[${i}] = ${branchVar};`);\n });\n d.write(`}`);\n });\n doc.write(`}`);\n }\n else {\n const elemVar = newVar(ctx);\n doc.write(`const ${elemVar} = ${accessor}[${i}];`);\n const elemOutput = compileChild(doc, ctx, itemSchema, elemVar);\n doc.write(`${outputVar}[${i}] = ${elemOutput};`);\n }\n }\n // Validate and collect rest elements if present\n if (rest) {\n const iVar = newVar(ctx);\n const elemVar = newVar(ctx);\n doc.write(`for (let ${iVar} = ${items.length}; ${iVar} < ${accessor}.length; ${iVar}++) {`);\n doc.indented((d) => {\n d.write(`const ${elemVar} = ${accessor}[${iVar}];`);\n const elemOutput = compileChild(d, ctx, rest, elemVar);\n d.write(`${outputVar}[${iVar}] = ${elemOutput};`);\n });\n doc.write(`}`);\n }\n return outputVar;\n}\nfunction getTupleOptStart(items, key) {\n for (let i = items.length - 1; i >= 0; i--) {\n // Mirrors the runtime: optin is a three-rung ladder so any rung above `undefined` permits an absent slot; optout stays two-valued.\n const omittable = key === \"optin\" ? items[i]._zod.optin !== undefined : items[i]._zod.optout === \"optional\";\n if (!omittable)\n return i + 1;\n }\n return 0;\n}\nfunction generateUnionCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n const options = def.options;\n if (def.discriminator) {\n return generateDiscriminatedUnionCheck(doc, ctx, def, accessor);\n }\n // z.xor requires *exactly one* option to match. Match-counting in the fast path is only sound if every branch is exactly as strict as the runtime — any falsely-rejecting branch silently turns a multi-match rejection into an accept. Force the runtime for this rare combinator.\n if (def.inclusive === false) {\n throw new ZodCompileUnsupportedError(\"exclusive unions (z.xor)\");\n }\n if (options.length === 0) {\n doc.write(\"return INVALID;\");\n return accessor;\n }\n if (options.length === 1) {\n return generateCheck(doc, ctx, options[0], accessor);\n }\n // Check if all options are bare literals - use Set optimization. A literal option carrying checks (e.g. .refine) must take the general path or the Set would accept values its checks reject.\n const allLiterals = options.every((opt) => opt._zod.def.type === \"literal\" && !opt._zod.def.checks?.length);\n if (allLiterals) {\n const values = new Set(options.flatMap((opt) => opt._zod.def.values));\n const valuesConst = addConstant(ctx, values);\n doc.write(`if (!${valuesConst}.has(${accessor})) return INVALID;`);\n return accessor;\n }\n // General case: try each option until one succeeds Use IIFEs that return the output or INVALID\n const outputVar = newVar(ctx);\n doc.write(`let ${outputVar};`);\n for (let i = 0; i < options.length; i++) {\n const opt = options[i];\n if (i === 0) {\n doc.write(`${outputVar} = (() => {`);\n }\n else {\n doc.write(`if (${outputVar} === INVALID) ${outputVar} = (() => {`);\n }\n doc.indented((d) => {\n // Generate check inside IIFE - returns INVALID on failure\n const branchOutput = generateCheck(d, ctx, opt, accessor);\n d.write(`return ${branchOutput};`);\n });\n doc.write(`})();`);\n }\n doc.write(`if (${outputVar} === INVALID) return INVALID;`);\n return outputVar;\n}\nfunction generateDiscriminatedUnionCheck(doc, ctx, def, accessor) {\n if (def.unionFallback) {\n throw new ZodCompileUnsupportedError(\"discriminated union with unionFallback\");\n }\n if (def.options.length === 0) {\n doc.write(\"return INVALID;\");\n return accessor;\n }\n const discVar = newVar(ctx);\n const outputVar = newVar(ctx);\n doc.write(`const ${discVar} = ${accessor}?.[${util.esc(def.discriminator)}];`);\n doc.write(`let ${outputVar};`);\n let firstBranch = true;\n const claimed = new Set();\n for (const option of def.options) {\n const values = option._zod.propValues?.[def.discriminator];\n if (!values || values.size === 0) {\n throw new ZodCompileUnsupportedError(\"discriminated union option without static discriminator values\");\n }\n // Two options claiming one value are not discriminable, and the branch chain below would silently give it to the first. Declining to compile hands that back to the interpreter, whose own map build reports it.\n for (const value of values) {\n if (claimed.has(value)) {\n throw new ZodCompileUnsupportedError(`duplicate discriminator value ${String(value)}`);\n }\n claimed.add(value);\n }\n const conditions = Array.from(values, (value) => literalEquality(ctx, discVar, value));\n const prefix = firstBranch ? \"if\" : \"else if\";\n doc.write(`${prefix} (${conditions.join(\" || \")}) {`);\n doc.indented((d) => {\n const branchOutput = generateCheck(d, ctx, option, accessor);\n d.write(`${outputVar} = ${branchOutput};`);\n });\n doc.write(`}`);\n firstBranch = false;\n }\n doc.write(`else { return INVALID; }`);\n return outputVar;\n}\nfunction literalEquality(ctx, accessor, value) {\n if (typeof value === \"string\")\n return `${accessor} === ${util.esc(value)}`;\n if (typeof value === \"number\") {\n if (Number.isNaN(value))\n return `Number.isNaN(${accessor})`;\n return `${accessor} === ${value}`;\n }\n if (typeof value === \"boolean\")\n return `${accessor} === ${value}`;\n if (value === null)\n return `${accessor} === null`;\n if (value === undefined)\n return `${accessor} === undefined`;\n if (typeof value === \"bigint\")\n return `${accessor} === ${value}n`;\n if (typeof value === \"symbol\") {\n const symbolConst = addConstant(ctx, value);\n return `${accessor} === ${symbolConst}`;\n }\n throw new ZodCompileUnsupportedError(`literal discriminator value ${String(value)}`);\n}\nfunction generateIntersectionCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n const leftOutput = compileChild(doc, ctx, def.left, accessor);\n const rightOutput = compileChild(doc, ctx, def.right, accessor);\n // Hoist the runtime merge helper so recursive object/array merge semantics stay in one place. If the merge is invalid, return INVALID and let the runtime fallback construct canonical errors.\n const mergeConst = addConstant(ctx, mergeValues);\n const mergedVar = newVar(ctx);\n doc.write(`const ${mergedVar} = ${mergeConst}(${leftOutput}, ${rightOutput});`);\n doc.write(`if (!${mergedVar}.valid) return INVALID;`);\n return `${mergedVar}.data`;\n}\nfunction generateRecordCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n // Use util.isPlainObject (rejects Date, Map, Set, class instances, etc.) to match runtime behavior. Hoisted call instead of inline so this stays a single source of truth with the runtime parser.\n const isPlainObjectConst = addConstant(ctx, util.isPlainObject);\n doc.write(`if (!${isPlainObjectConst}(${accessor})) return INVALID;`);\n const outputVar = newVar(ctx);\n const kVar = newVar(ctx);\n const valVar = newVar(ctx);\n doc.write(`const ${outputVar} = {};`);\n // Exhaustive record. The runtime gates this on `values && !def.partial`, since z.partialRecord keeps its value set but makes every key optional; a loose record passes unrecognized keys through, which the per-key scan cannot express.\n const recordDef = def;\n const keyValues = recordDef.partial ? undefined : def.keyType._zod.values;\n if (keyValues) {\n const inputKeys = [];\n for (const key of keyValues) {\n if (!(typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\")) {\n throw new ZodCompileUnsupportedError(`record key value ${String(key)}`);\n }\n const inputKey = typeof key === \"number\" ? key.toString() : key;\n if (inputKey === \"__proto__\") {\n // `out[\"__proto__\"] = v` would hit the prototype setter on the output.\n throw new ZodCompileUnsupportedError('record key \"__proto__\"');\n }\n inputKeys.push(inputKey);\n const keyConst = addConstant(ctx, key);\n const outKey = generateCheck(doc, ctx, def.keyType, keyConst);\n // Read the property once. Passing the raw expression let compileChild validate one read while the output write performed a second, so a getter could hand back a value nothing had checked.\n const valueVar = newVar(ctx);\n doc.write(`const ${valueVar} = ${accessor}[${literalPropertyKey(ctx, inputKey)}];`);\n const valOutput = compileChild(doc, ctx, def.valueType, valueVar);\n doc.write(`${outputVar}[${outKey}] = ${valOutput};`);\n }\n // `mode: \"loose\"` changes only what happens to unrecognized keys, so it belongs here rather than the per-present-key scan. Passing them through matches the runtime, which skips `__proto__`.\n const knownKeysConst = addConstant(ctx, new Set(inputKeys));\n doc.write(`for (const ${kVar} in ${accessor}) {`);\n doc.indented((d) => {\n d.write(`if (${knownKeysConst}.has(${kVar})) continue;`);\n if (recordDef.mode === \"loose\") {\n d.write(`if (${kVar} !== \"__proto__\") ${outputVar}[${kVar}] = ${accessor}[${kVar}];`);\n }\n else {\n d.write(`return INVALID;`);\n }\n });\n doc.write(`}`);\n return outputVar;\n }\n // The bare-string shortcut below only tests `typeof key === \"string\"`, so it\n // is correct exclusively for a `z.string()` carrying nothing else. A string\n // *format* lives on the def rather than in `checks` — `z.record(z.email(), …)`\n // reads as a plain string here — and coercion rewrites the key, so both have\n // to take the general path or the shortcut accepts keys the runtime rejects.\n const keyDef = def.keyType._zod.def;\n const keyIsBareString = keyDef.type === \"string\" && keyDef.format === undefined && !keyDef.coerce && (keyDef.checks?.length ?? 0) === 0;\n if (!keyIsBareString) {\n // A key schema with no value set is a constraint every key must satisfy\n // (`z.email()`, `z.string().min(3)`, `z.number()`, a template literal).\n // The runtime runs it against each own enumerable key and writes the value\n // under the key it produced, so compile it once and call it per key.\n const isLoose = def.mode === \"loose\";\n const keyFast = addConstant(ctx, compileFn(def.keyType));\n const numericConst = addConstant(ctx, regexes.number);\n const propIsEnumerableConst = addConstant(ctx, Object.prototype.propertyIsEnumerable);\n const outKeyVar = newVar(ctx);\n doc.write(`for (const ${kVar} of Reflect.ownKeys(${accessor})) {`);\n doc.indented((d) => {\n d.write(`if (${kVar} === \"__proto__\") continue;`);\n d.write(`if (!${propIsEnumerableConst}.call(${accessor}, ${kVar})) continue;`);\n d.write(`let ${outKeyVar} = ${keyFast}(${kVar});`);\n // Numeric-string retry, mirroring the runtime: a key the schema rejects as a string is tried again as a number, so z.record(z.number(), …) matches the numeric keys JavaScript stringified on the way in.\n d.write(`if (${outKeyVar} === INVALID && typeof ${kVar} === \"string\" && ${numericConst}.test(${kVar})) ${outKeyVar} = ${keyFast}(Number(${kVar}));`);\n if (isLoose) {\n // A loose record keeps a key its schema rejects, copying the value across unvalidated rather than failing the parse.\n d.write(`if (${outKeyVar} === INVALID) { ${outputVar}[${kVar}] = ${accessor}[${kVar}]; continue; }`);\n }\n else {\n d.write(`if (${outKeyVar} === INVALID) return INVALID;`);\n }\n // The guard above tested the input key, but the schema can normalize an ordinary key into __proto__; re-check the one actually written under.\n d.write(`if (${outKeyVar} === \"__proto__\") continue;`);\n // Read once: the raw expression would be evaluated again by the output write below, so an accessor could return an unvalidated second value.\n const valueVar = newVar(ctx);\n d.write(`const ${valueVar} = ${accessor}[${kVar}];`);\n const valOutput = compileChild(d, ctx, def.valueType, valueVar);\n d.write(`${outputVar}[${outKeyVar}] = ${valOutput};`);\n });\n doc.write(`}`);\n return outputVar;\n }\n // Plain z.string() keys: iterate enumerable own keys and validate each value. Runtime uses Reflect.ownKeys so symbol keys participate in validation; matching that here prevents silently accepting objects with enumerable Symbol keys under z.record(z.string(), ...).\n const propIsEnumerable = addConstant(ctx, Object.prototype.propertyIsEnumerable);\n doc.write(`for (const ${kVar} of Reflect.ownKeys(${accessor})) {`);\n doc.indented((d) => {\n d.write(`if (${kVar} === \"__proto__\") continue;`);\n d.write(`if (!${propIsEnumerable}.call(${accessor}, ${kVar})) continue;`);\n d.write(`if (typeof ${kVar} !== \"string\") return INVALID;`);\n d.write(`const ${valVar} = ${accessor}[${kVar}];`);\n const valOutput = compileChild(d, ctx, def.valueType, valVar);\n d.write(`${outputVar}[${kVar}] = ${valOutput};`);\n });\n doc.write(`}`);\n return outputVar;\n}\nfunction literalPropertyKey(ctx, key) {\n if (typeof key === \"string\")\n return util.esc(key);\n return addConstant(ctx, key);\n}\nfunction generateMapCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n doc.write(`if (!(${accessor} instanceof Map)) return INVALID;`);\n const outputVar = newVar(ctx);\n const kVar = newVar(ctx);\n const valVar = newVar(ctx);\n doc.write(`const ${outputVar} = new Map();`);\n doc.write(`for (const [${kVar}, ${valVar}] of ${accessor}) {`);\n doc.indented((d) => {\n const keyOutput = generateCheck(d, ctx, def.keyType, kVar);\n const valOutput = generateCheck(d, ctx, def.valueType, valVar);\n d.write(`${outputVar}.set(${keyOutput}, ${valOutput});`);\n });\n doc.write(`}`);\n return outputVar;\n}\nfunction generateSetCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n doc.write(`if (!(${accessor} instanceof Set)) return INVALID;`);\n const outputVar = newVar(ctx);\n const valVar = newVar(ctx);\n doc.write(`const ${outputVar} = new Set();`);\n doc.write(`for (const ${valVar} of ${accessor}) {`);\n doc.indented((d) => {\n const valOutput = generateCheck(d, ctx, def.valueType, valVar);\n d.write(`${outputVar}.add(${valOutput});`);\n });\n doc.write(`}`);\n return outputVar;\n}\nfunction generateFileCheck(doc, accessor) {\n // Runtime $ZodFile is a bare `instanceof File`, including the implicit global lookup. The previous duck-typed fallback accepted arbitrary {name, size} objects in File-less environments — behavior the runtime never had.\n doc.write(`if (!(${accessor} instanceof File)) return INVALID;`);\n return accessor;\n}\nfunction generateTemplateLiteralCheck(doc, ctx, schema, accessor) {\n doc.write(`if (typeof ${accessor} !== \"string\") return INVALID;`);\n // Template literal schemas have a pre-computed pattern in _zod.pattern\n const pattern = schema._zod.pattern;\n if (pattern) {\n const patternConst = addConstant(ctx, pattern);\n doc.write(`${patternConst}.lastIndex = 0;`);\n doc.write(`if (!${patternConst}.test(${accessor})) return INVALID;`);\n }\n return accessor;\n}\nfunction generateLazyCheck(doc, ctx, schema, accessor) {\n // For lazy schemas, we use a cached parser that falls back to runtime Zod parsing This handles recursive schemas correctly by avoiding infinite compilation loops\n const def = schema._zod.def;\n const getterConst = addConstant(ctx, def.getter);\n const cacheConst = addConstant(ctx, { parser: null });\n doc.write(`if (!${cacheConst}.parser) {`);\n doc.indented((d) => {\n d.write(`const inner = ${getterConst}();`);\n d.write(`${cacheConst}.parser = function(input) {`);\n d.indented((d2) => {\n // Use runtime Zod parsing - this correctly handles recursive schemas Pass an empty ctx like runtimeRun does — runtime parsers read ctx.skipChecks/ctx.direction unconditionally and crash on undefined.\n d2.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`);\n d2.write(`return result.issues.length === 0 ? result.value : INVALID;`);\n });\n d.write(`};`);\n });\n doc.write(`}`);\n const outputVar = newVar(ctx);\n doc.write(`const ${outputVar} = ${cacheConst}.parser(${accessor});`);\n doc.write(`if (${outputVar} === INVALID) return INVALID;`);\n return outputVar;\n}\nfunction generatePipeCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n // Validate input type first\n const inputOutput = generateCheck(doc, ctx, def.in, accessor);\n if (def.transform) {\n // Apply transform and validate output. The transform may read its second `payload` argument (codec transforms like z.stringbool() push issues there) so wrap the call in a helper that spoofs a payload. Pushed issues signal INVALID and the wrapper falls back to the runtime.\n if (isAsyncFunction(def.transform)) {\n throw new ZodCompileAsyncError(\"z.compile: async transforms in pipes are not supported\");\n }\n const transformFn = def.transform;\n const helperFn = (value) => {\n // `addIssue` has to be here: a transform reporting through it is reporting, not failing. Without it the call threw a TypeError that the old catch swallowed into a fallback, so every ctx.addIssue transform quietly lost its fast path and the real error was never visible.\n const fakePayload = { value, issues: [], addIssue: pushIssue };\n // A throw is deliberately not caught. The interpreter lets one propagate out of the whole parse; swallowing it into INVALID turned a thrown error into a merely-rejected union branch, so a later branch answered instead.\n const result = transformFn(value, fakePayload);\n if (result instanceof Promise)\n return INVALID;\n return fakePayload.issues.length === 0 ? result : INVALID;\n };\n const helperConst = addConstant(ctx, helperFn);\n const transformedVar = newVar(ctx);\n doc.write(`const ${transformedVar} = ${helperConst}(${inputOutput});`);\n doc.write(`if (${transformedVar} === INVALID) return INVALID;`);\n return generateCheck(doc, ctx, def.out, transformedVar);\n }\n else {\n // No transform - validate output type on same value\n return generateCheck(doc, ctx, def.out, inputOutput);\n }\n}\nfunction isAsyncFunction(fn) {\n return (typeof fn === \"function\" &&\n (fn.constructor.name === \"AsyncFunction\" ||\n fn[Symbol.toStringTag] === \"AsyncFunction\"));\n}\nfunction generateCustomCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n if (def.fn) {\n // Check for async function\n if (isAsyncFunction(def.fn)) {\n throw new ZodCompileAsyncError(\"z.compile: async custom predicates are not supported\");\n }\n // Custom schema with a predicate function (e.g. z.instanceof). `isAsyncFunction` above is syntactic, so a plain function returning a promise reaches here, and a promise is truthy — it would read as a pass where the interpreter throws.\n const fnConst = addConstant(ctx, def.fn);\n const throwAsyncConst = addConstant(ctx, throwAsync);\n const resVar = newVar(ctx);\n doc.write(`const ${resVar} = ${fnConst}(${accessor});`);\n doc.write(`if (${resVar} instanceof Promise) ${throwAsyncConst}();`);\n doc.write(`if (!${resVar}) return INVALID;`);\n }\n else {\n throw new ZodCompileUnsupportedError(\"custom schema without a predicate function\");\n }\n return accessor;\n}\n// Runtime helper for a compiled `catch`: runs the inner schema once and returns its value when it succeeded. Anything else — a failure the catch would handle, or an async inner — returns INVALID so the interpreter takes over.\nfunction runtimeCatch(innerSchema, catchValue, value) {\n const result = innerSchema._zod.run({ value, issues: [] }, {});\n if (result && typeof result.then === \"function\")\n return INVALID;\n const r = result;\n if (r.issues.length === 0)\n return r.value;\n // Only reached for a catch value that ignores the parse context — codegen refuses the rest — so there are no issues to finalize and nothing here needs the caller's error map.\n return catchValue();\n}\nfunction generateCatchCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n // An untagged catchValue is a user callback, and one reading `ctx.error` needs the caller's per-parse error map. Catch *succeeds*, so a wrong message there is unobservable — refuse at codegen, and not islandable either, since `runtimeRun` has no context to hand it.\n if (!def.catchValue[util.CONSTANT_CATCH]) {\n throw new ZodCompileUnsupportedError(\"catch with a callback (only a constant catch value compiles)\", false);\n }\n const outputVar = newVar(ctx);\n doc.write(`let ${outputVar} = (() => {`);\n doc.indented((d) => {\n const innerOut = compileChild(d, ctx, def.innerType, accessor);\n d.write(`return ${innerOut};`);\n });\n doc.write(`})();`);\n const innerConst = addConstant(ctx, def.innerType);\n const catchConst = addConstant(ctx, def.catchValue);\n const catchHelperConst = addConstant(ctx, runtimeCatch);\n doc.write(`if (${outputVar} === INVALID) {`);\n doc.indented((d) => {\n d.write(`${outputVar} = ${catchHelperConst}(${innerConst}, ${catchConst}, ${accessor});`);\n d.write(`if (${outputVar} === INVALID) return INVALID;`);\n });\n doc.write(`}`);\n return outputVar;\n}\nfunction generateTransformCheck(doc, ctx, schema, accessor) {\n const def = schema._zod.def;\n if (def.transform) {\n // Check for async transform\n if (isAsyncFunction(def.transform)) {\n throw new ZodCompileAsyncError(\"z.compile: async transforms are not supported\");\n }\n // Create a helper that runs the transform and returns the result or INVALID on error\n const transformFn = def.transform;\n const helperFn = (value) => {\n const fakePayload = { value, issues: [], addIssue: pushIssue };\n // As in the pipe helper: a throw propagates, because the interpreter lets it out of the whole parse rather than treating it as a failed branch.\n const result = transformFn(value, fakePayload);\n if (result instanceof Promise)\n return INVALID;\n return fakePayload.issues.length === 0 ? result : INVALID;\n };\n const helperConst = addConstant(ctx, helperFn);\n const outputVar = newVar(ctx);\n doc.write(`const ${outputVar} = ${helperConst}(${accessor});`);\n doc.write(`if (${outputVar} === INVALID) return INVALID;`);\n return outputVar;\n }\n return accessor;\n}\n","// Side-effect-only: installs the post-processor on `globalConfig`. Listed in `package.json`'s `sideEffects`, and nothing else references it, so apps that never import it drop the compiler.\n//\n// Usage:\n//\n// import \"zod/compile\";\n// import * as z from \"zod\";\n// // every schema constructed below this is compiled on first parse\n//\n// Module evaluation order matters: schemas constructed in modules that evaluate before this import will not be compiled. Place this import in the app entry point, before any module that constructs schemas at top level.\n//\n// Failure handling: if the compiler refuses a schema (async refinement, unsupported feature, etc.) the shim permanently restores the runtime `_zod.run` for that schema. The schema continues to work via the regular runtime parser — no observable difference to the caller.\nimport { compile } from \"./v4/core/compile.js\";\nimport * as core from \"./v4/core/index.js\";\nlet compiling = false;\ncore.globalConfig.postProcessor = (inst) => {\n if (compiling)\n return;\n const originalRun = inst._zod?.run;\n if (typeof originalRun !== \"function\")\n return;\n const shim = (payload, ctx) => {\n // Bypass the fast path for any non-forward / non-sync / check-skipping call. The runtime owns those contracts.\n if (ctx?.async || ctx?.direction === \"backward\" || ctx?.skipChecks) {\n return originalRun(payload, ctx);\n }\n compiling = true;\n try {\n // Respect the jitless config: it exists precisely so CSP/no-eval environments never reach `new Function`. Global mode must not bypass it (explicit z.compile calls remain an explicit opt-in).\n if (core.globalConfig.jitless) {\n inst._zod.run = originalRun;\n return originalRun(payload, ctx);\n }\n // Strict: the shim owns its own fallback below, and a non-strict compile would hand back `inst` — whose run is this shim — and reinstall it on itself.\n const compiled = compile(inst, { strict: true });\n // Only the run wrapper. Copying the compiled parse/safeParse closures would make their fallback re-enter this instance and run user callbacks a third time.\n inst._zod.run = compiled._zod.run;\n inst._zod.bag.fallbackRun = compiled._zod.bag.fallbackRun;\n inst._zod.bag.validator = compiled._zod.bag.validator;\n }\n catch {\n // Permanent fallback for unsupported schemas.\n inst._zod.run = originalRun;\n }\n finally {\n compiling = false;\n }\n return inst._zod.run(payload, ctx);\n };\n // Expose the pre-shim runtime so `compile()` invoked elsewhere can unwrap past the shim and capture the source-of-truth runtime. Without this, a user calling `z.compile(s)` after global mode is enabled would capture the shim itself, which would feed the wrapper into itself on fallback.\n shim.__originalRun = originalRun;\n inst._zod.run = shim;\n};\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id, zod } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** PDOAddress addresses a PDO entry explicitly in the CoE object dictionary. */\nexport const pdoAddressZ = z.object({\n /** index is the CoE object dictionary index of the PDO entry. */\n index: zod.uint16.default(0),\n /** subIndex is the CoE object dictionary sub-index of the PDO entry. */\n subIndex: zod.uint8.default(0),\n /** bitLength is the size of the PDO entry, in bits. */\n bitLength: zod.uint8.default(16),\n /** dataType is the data type of the PDO entry. */\n dataType: z.string().default(\"uint16\"),\n});\nexport interface PDOAddress extends z.infer<typeof pdoAddressZ> {}\n\n/** BaseReadChannel carries the fields every EtherCAT read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** device is the key of the slave device the channel reads from. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every EtherCAT write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** device is the key of the slave device the channel writes to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** AutomaticReadChannel resolves its PDO address from the slave's discovered PDOs. */\nexport const automaticReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"automatic\"),\n /** pdo is the name of the PDO entry to resolve on the slave. */\n pdo: z.string().default(\"\"),\n});\nexport interface AutomaticReadChannel extends z.infer<typeof automaticReadChannelZ> {}\n\n/** ManualReadChannel specifies its PDO address inline. */\nexport const manualReadChannelZ = baseReadChannelZ.extend(pdoAddressZ.shape).extend({\n type: z.literal(\"manual\"),\n});\nexport interface ManualReadChannel extends z.infer<typeof manualReadChannelZ> {}\n\nexport const READ_CHANNEL_TYPES = [\"automatic\", \"manual\"] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single EtherCAT read channel (TxPDO, slave to master). The type\n * field selects how the PDO entry is addressed.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n automaticReadChannelZ,\n manualReadChannelZ,\n]);\nexport type ReadChannel = AutomaticReadChannel | ManualReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n automatic: automaticReadChannelZ,\n manual: manualReadChannelZ,\n};\n\n/** AutomaticWriteChannel resolves its PDO address from the slave's discovered PDOs. */\nexport const automaticWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"automatic\"),\n /** pdo is the name of the PDO entry to resolve on the slave. */\n pdo: z.string().default(\"\"),\n});\nexport interface AutomaticWriteChannel extends z.infer<typeof automaticWriteChannelZ> {}\n\n/** ManualWriteChannel specifies its PDO address inline. */\nexport const manualWriteChannelZ = baseWriteChannelZ.extend(pdoAddressZ.shape).extend({\n type: z.literal(\"manual\"),\n});\nexport interface ManualWriteChannel extends z.infer<typeof manualWriteChannelZ> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"automatic\", \"manual\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single EtherCAT write channel (RxPDO, master to slave). The type\n * field selects how the PDO entry is addressed.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n automaticWriteChannelZ,\n manualWriteChannelZ,\n]);\nexport type WriteChannel = AutomaticWriteChannel | ManualWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n automatic: automaticWriteChannelZ,\n manual: manualWriteChannelZ,\n};\n\nexport const readConfigZ = task.readConfigZ.extend({\n channels: readChannelZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.persistConfigZ.extend({\n stateRate: z.number().default(25),\n executionRate: z.number().default(1000),\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/ethercat/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TIME_FORMATS = [\n \"iso8601\",\n \"unix_sec\",\n \"unix_ms\",\n \"unix_us\",\n \"unix_ns\",\n] as const;\nexport const timeFormatZ = z.enum(TIME_FORMATS);\nexport type TimeFormat = z.infer<typeof timeFormatZ>;\n\nexport const METHODS = [\n \"GET\",\n \"HEAD\",\n \"POST\",\n \"PUT\",\n \"DELETE\",\n \"PATCH\",\n \"OPTIONS\",\n \"TRACE\",\n \"CONNECT\",\n] as const;\nexport const methodZ = z.enum(METHODS);\nexport type Method = z.infer<typeof methodZ>;\n\nexport const JSON_TYPES = [\"number\", \"string\", \"boolean\"] as const;\nexport const jsonTypeZ = z.enum(JSON_TYPES);\nexport type JSONType = z.infer<typeof jsonTypeZ>;\n\nexport const GENERATOR_TYPES = [\"uuid\", \"timestamp\"] as const;\nexport const generatorTypeZ = z.enum(GENERATOR_TYPES);\nexport type GeneratorType = z.infer<typeof generatorTypeZ>;\n\n/** Header is a single HTTP header sent with a request. */\nexport const headerZ = z.object({\n /** name is the header name, unique within a request. */\n name: z.string().default(\"\"),\n /** value is the header value. */\n value: z.string().default(\"\"),\n});\nexport interface Header extends z.infer<typeof headerZ> {}\n\n/** QueryParam is a single URL query parameter sent with a request. */\nexport const queryParamZ = z.object({\n /** parameter is the parameter name, unique within a request. */\n parameter: z.string().default(\"\"),\n /** value is the parameter value. */\n value: z.string().default(\"\"),\n});\nexport interface QueryParam extends z.infer<typeof queryParamZ> {}\n\n/**\n * EnumEntry maps a string label in a JSON body to a numeric channel value for\n * enum-style parsing (e.g. \"ON\" -> 1, \"OFF\" -> 0).\n */\nexport const enumEntryZ = z.object({\n /** label is the string label in the JSON body. */\n label: z.string().default(\"\"),\n /** value is the numeric channel value the label maps to. */\n value: z.number().default(0),\n});\nexport interface EnumEntry extends z.infer<typeof enumEntryZ> {}\n\n/** BaseWriteField carries the fields every write body field shares. */\nexport const baseWriteFieldZ = z.object({\n /** key uniquely identifies the field within the endpoint. */\n key: z.string().default(id.create),\n /** pointer is the JSON Pointer where the value is placed in the body. */\n pointer: z.string().default(\"\"),\n});\nexport interface BaseWriteField extends z.infer<typeof baseWriteFieldZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** ReadField is a single value extracted from an endpoint's JSON response. */\nexport const readFieldZ = z.object({\n /** key uniquely identifies the field within the endpoint. */\n key: z.string().default(id.create),\n /** name is the human-readable field name. */\n name: z.string().default(\"\"),\n /** disabled is true when the field is excluded from polling. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel the extracted value is written to. */\n channel: channel.keyZ.default(0),\n /** pointer is the JSON Pointer to the value within the response body. */\n pointer: z.string().default(\"\"),\n /** dataType is the data type of the extracted value. */\n dataType: z.string().default(\"float64\"),\n /**\n * timeFormat is the encoding of the JSON value when the target channel holds\n * timestamps. Required for timestamp channels.\n */\n timeFormat: timeFormatZ.optional(),\n /** enumValues maps string labels in the response to numeric channel values. */\n enumValues: enumEntryZ.array().default(() => []),\n});\nexport interface ReadField extends z.infer<typeof readFieldZ> {}\n\n/** ChannelField is the command channel value placed into a write endpoint's body. */\nexport const channelFieldZ = z.object({\n /**\n * pointer is the JSON Pointer where the channel value is placed in the body. An empty\n * pointer sends the bare value as the entire body, in which case the endpoint may not\n * declare any additional fields.\n */\n pointer: z.string().default(\"\"),\n /** jsonType is the JSON type the channel value is serialized as. */\n jsonType: jsonTypeZ.default(\"number\"),\n /** channel is the Synnax command channel that triggers the request. */\n channel: channel.keyZ.default(0),\n /** name is the human-readable name of the command channel. */\n name: z.string().default(\"\"),\n /** dataType is the data type of the command channel. */\n dataType: z.string().default(\"float64\"),\n /**\n * timeFormat is the output encoding when the command channel holds timestamps.\n * Required for timestamp channels.\n */\n timeFormat: timeFormatZ.optional(),\n /**\n * enumValues maps numeric channel values to string labels. Only valid when json_type\n * is 'string'.\n */\n enumValues: enumEntryZ.array().default(() => []),\n});\nexport interface ChannelField extends z.infer<typeof channelFieldZ> {}\n\n/** StaticWriteField places a fixed value in the request body. */\nexport const staticWriteFieldZ = baseWriteFieldZ.extend({\n type: z.literal(\"static\"),\n /** jsonType is the JSON type the value is serialized as. */\n jsonType: jsonTypeZ.default(\"number\"),\n /** value is the fixed JSON value placed at the pointer. */\n value: z.unknown(),\n});\nexport interface StaticWriteField extends z.infer<typeof staticWriteFieldZ> {}\n\n/** GeneratedWriteField places a freshly generated UUID or timestamp in the body. */\nexport const generatedWriteFieldZ = baseWriteFieldZ.extend({\n type: z.literal(\"generated\"),\n /** generator is the generator that produces a fresh value per request. */\n generator: generatorTypeZ.default(\"uuid\"),\n /**\n * timeFormat is the output encoding for timestamp generators. Defaults to iso8601.\n */\n timeFormat: timeFormatZ.optional(),\n});\nexport interface GeneratedWriteField extends z.infer<typeof generatedWriteFieldZ> {}\n\nexport const WRITE_FIELD_TYPES = [\"static\", \"generated\"] as const;\nexport const writeFieldTypeZ = z.enum(WRITE_FIELD_TYPES);\nexport type WriteFieldType = z.infer<typeof writeFieldTypeZ>;\n\n/**\n * WriteField is an additional body field on a write endpoint. The type field selects\n * whether the value is fixed or generated per request.\n */\nexport const writeFieldZ = z.discriminatedUnion(\"type\", [\n staticWriteFieldZ,\n generatedWriteFieldZ,\n]);\nexport type WriteField = StaticWriteField | GeneratedWriteField;\n\nexport const WRITE_FIELD_SCHEMAS: {\n [K in WriteFieldType]: z.ZodType<Extract<WriteField, { type: K }>>;\n} = {\n static: staticWriteFieldZ,\n generated: generatedWriteFieldZ,\n};\n\n/** ReadEndpoint is a single HTTP endpoint polled by a read task. */\nexport const readEndpointZ = z.object({\n /** key uniquely identifies the endpoint within the task. */\n key: z.string().default(id.create),\n /** method is the HTTP method used to poll the endpoint. */\n method: methodZ.default(\"GET\"),\n /** path is the URL path appended to the device's base URL. */\n path: z.string().default(\"\"),\n /** headers contains additional headers merged into the request. */\n headers: headerZ.array().default(() => []),\n /** queryParams contains query parameters appended to the request URL. */\n queryParams: queryParamZ.array().default(() => []),\n /** body is a static body sent with each request. Empty sends no body. */\n body: z.string().default(\"\"),\n /** fields contains the values to extract from the response. */\n fields: readFieldZ.array().default(() => []),\n /**\n * index is the key of the field whose channel indexes the others. Empty when the task\n * stamps samples on arrival.\n */\n index: z.string().default(\"\"),\n});\nexport interface ReadEndpoint extends z.infer<typeof readEndpointZ> {}\n\n/** WriteEndpoint is a single HTTP endpoint written to by a write task. */\nexport const writeEndpointZ = z.object({\n /** key uniquely identifies the endpoint within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the endpoint is excluded from the task. */\n disabled: z.boolean().default(false),\n /** method is the HTTP method used to send the request. */\n method: methodZ.default(\"POST\"),\n /** path is the URL path appended to the device's base URL. */\n path: z.string().default(\"\"),\n /** headers contains additional headers merged into the request. */\n headers: headerZ.array().default(() => []),\n /** queryParams contains query parameters appended to the request URL. */\n queryParams: queryParamZ.array().default(() => []),\n /** channel is the command channel whose writes trigger this endpoint. */\n channel: channelFieldZ.prefault({}),\n /** fields contains additional static or generated body fields. */\n fields: writeFieldZ.array().default(() => []),\n});\nexport interface WriteEndpoint extends z.infer<typeof writeEndpointZ> {}\n\nexport const readConfigZ = task.persistConfigZ.extend({\n device: device.keyZ.default(\"\"),\n rate: z.number().default(1),\n endpoints: readEndpointZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.startConfigZ.extend({\n device: device.keyZ.default(\"\"),\n endpoints: writeEndpointZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/http/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TEMPERATURE_UNITS = [\"C\", \"F\", \"K\"] as const;\nexport const temperatureUnitsZ = z.enum(TEMPERATURE_UNITS);\nexport type TemperatureUnits = z.infer<typeof temperatureUnitsZ>;\n\nexport const THERMOCOUPLE_TYPES = [\n \"J\",\n \"K\",\n \"N\",\n \"R\",\n \"S\",\n \"T\",\n \"B\",\n \"E\",\n \"C\",\n] as const;\nexport const thermocoupleTypeZ = z.enum(THERMOCOUPLE_TYPES);\nexport type ThermocoupleType = z.infer<typeof thermocoupleTypeZ>;\n\n/** BaseReadChannel carries the fields every LabJack read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from (e.g. 'AIN0', 'DIO4'). */\n port: z.string().default(\"\"),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every LabJack write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to (e.g. 'DAC0', 'DIO4'). */\n port: z.string().default(\"\"),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ.extend({\n tcpScanMultiplier: z.int32().default(10),\n});\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** LinearScale maps raw values to engineering units with a slope and offset. */\nexport const linearScaleZ = z.object({\n type: z.literal(\"linear\"),\n /** slope is the multiplier applied to the raw value. */\n slope: z.number().default(1),\n /** offset is the offset added after scaling. */\n offset: z.number().default(0),\n});\nexport interface LinearScale extends z.infer<typeof linearScaleZ> {}\n\n/** MapScale maps a raw range linearly onto a scaled range. */\nexport const mapScaleZ = z.object({\n type: z.literal(\"map\"),\n /** preScaledMin is the lower bound of the raw input range. */\n preScaledMin: z.number().default(0),\n /** preScaledMax is the upper bound of the raw input range. */\n preScaledMax: z.number().default(1),\n /** scaledMin is the lower bound of the scaled output range. */\n scaledMin: z.number().default(0),\n /** scaledMax is the upper bound of the scaled output range. */\n scaledMax: z.number().default(1),\n});\nexport interface MapScale extends z.infer<typeof mapScaleZ> {}\n\n/** NoneScale applies no scaling; the raw value is used directly. */\nexport const noneScaleZ = z.object({\n type: z.literal(\"none\"),\n});\nexport interface NoneScale extends z.infer<typeof noneScaleZ> {}\n\nexport const SCALE_TYPES = [\"linear\", \"map\", \"none\"] as const;\nexport const scaleTypeZ = z.enum(SCALE_TYPES);\nexport type ScaleType = z.infer<typeof scaleTypeZ>;\n\n/** Scale determines how raw sensor values are transformed to engineering units. */\nexport const scaleZ = z.discriminatedUnion(\"type\", [\n linearScaleZ,\n mapScaleZ,\n noneScaleZ,\n]);\nexport type Scale = LinearScale | MapScale | NoneScale;\n\nexport const SCALE_SCHEMAS: {\n [K in ScaleType]: z.ZodType<Extract<Scale, { type: K }>>;\n} = {\n linear: linearScaleZ,\n map: mapScaleZ,\n none: noneScaleZ,\n};\n\n/** AnalogWriteChannel drives an analog output on a DAC port. */\nexport const analogWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"analog\"),\n port: z.string().default(\"DAC0\"),\n});\nexport interface AnalogWriteChannel extends z.infer<typeof analogWriteChannelZ> {}\n\n/** DigitalWriteChannel drives a digital output line on a DIO port. */\nexport const digitalWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"digital\"),\n port: z.string().default(\"DIO4\"),\n});\nexport interface DigitalWriteChannel extends z.infer<typeof digitalWriteChannelZ> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"analog\", \"digital\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single LabJack write channel. The type field selects the output\n * mode.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n analogWriteChannelZ,\n digitalWriteChannelZ,\n]);\nexport type WriteChannel = AnalogWriteChannel | DigitalWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n analog: analogWriteChannelZ,\n digital: digitalWriteChannelZ,\n};\n\n/** AnalogReadChannel reads a voltage from an analog input port. */\nexport const analogReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"analog\"),\n port: z.string().default(\"AIN0\"),\n /** range is the upper bound of the voltage input range, in Volts. */\n range: z.number().default(10),\n /**\n * negChan is the negative channel for differential readings on T7 devices. 199\n * selects single-ended.\n */\n negChan: z.int32().default(199),\n /** scale is the scale applied to raw samples after acquisition. */\n scale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface AnalogReadChannel extends z.infer<typeof analogReadChannelZ> {}\n\n/** DigitalReadChannel reads a digital input line. */\nexport const digitalReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"digital\"),\n port: z.string().default(\"DIO4\"),\n});\nexport interface DigitalReadChannel extends z.infer<typeof digitalReadChannelZ> {}\n\n/** ThermocoupleReadChannel reads temperature from a thermocouple. */\nexport const thermocoupleReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"thermocouple\"),\n /** port is the AIN port the thermocouple's positive lead is wired to. */\n port: z.string().default(\"AIN0\"),\n /** thermocoupleType selects the thermocouple alloy type. */\n thermocoupleType: thermocoupleTypeZ.default(\"K\"),\n /**\n * negChan is the AIN port of the thermocouple's negative lead on T7 devices. 199\n * selects single-ended.\n */\n negChan: z.int32().default(199),\n /**\n * cjcSource selects the cold-junction-compensation source: the device sensor\n * ('TEMPERATURE_DEVICE_K'), ambient air ('TEMPERATURE_AIR_K'), or an AIN port (e.g.\n * 'AIN2').\n */\n cjcSource: z.string().default(\"TEMPERATURE_DEVICE_K\"),\n /** cjcSlope is the CJC voltage-to-temperature slope, in Kelvin per Volt. */\n cjcSlope: z.number().default(1),\n /** cjcOffset is the CJC temperature offset, in Kelvins. */\n cjcOffset: z.number().default(0),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"K\"),\n /** scale is the scale applied to raw samples after acquisition. */\n scale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface ThermocoupleReadChannel extends z.infer<\n typeof thermocoupleReadChannelZ\n> {}\n\nexport const READ_CHANNEL_TYPES = [\"analog\", \"digital\", \"thermocouple\"] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single LabJack read channel. The type field selects the input mode\n * and the fields that accompany it.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n analogReadChannelZ,\n digitalReadChannelZ,\n thermocoupleReadChannelZ,\n]);\nexport type ReadChannel =\n AnalogReadChannel | DigitalReadChannel | ThermocoupleReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n analog: analogReadChannelZ,\n digital: digitalReadChannelZ,\n thermocouple: thermocoupleReadChannelZ,\n};\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n stateRate: z.number().default(10),\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n\nexport const readConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: readChannelZ.array().default(() => []),\n deviceScanBacklogWarnOnCount: z.uint32().default(0),\n ljmScanBacklogWarnOnCount: z.uint32().default(0),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/labjack/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id, zod } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** RegisterValue interprets one or more 16-bit registers as a single typed value. */\nexport const registerValueZ = z.object({\n /** dataType is the data type the register contents are interpreted as. */\n dataType: z.string().default(\"uint8\"),\n /** bytesSwapped is true when the byte order within each 16-bit word is swapped. */\n bytesSwapped: z.boolean().default(false),\n /** wordsSwapped is true when the word order of multi-register values is swapped. */\n wordsSwapped: z.boolean().default(false),\n});\nexport interface RegisterValue extends z.infer<typeof registerValueZ> {}\n\n/** BaseReadChannel carries the fields every Modbus read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that samples are written to. */\n channel: channel.keyZ.default(0),\n /** address is the Modbus address the channel reads from. */\n address: zod.uint16.default(0),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every Modbus write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel commands are read from. */\n channel: channel.keyZ.default(0),\n /** address is the Modbus address the channel writes to. */\n address: zod.uint16.default(0),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** CoilReadChannel reads a single bit from a coil. */\nexport const coilReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"coil\"),\n});\nexport interface CoilReadChannel extends z.infer<typeof coilReadChannelZ> {}\n\n/** DiscreteInputReadChannel reads a single bit from a discrete input. */\nexport const discreteInputReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"discrete_input\"),\n});\nexport interface DiscreteInputReadChannel extends z.infer<\n typeof discreteInputReadChannelZ\n> {}\n\n/**\n * HoldingRegisterReadChannel reads a typed value from one or more holding registers.\n */\nexport const holdingRegisterReadChannelZ = baseReadChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"holding_register\"),\n /** stringLength is the length, in characters, when data_type is a string. */\n stringLength: z.int32().default(0),\n });\nexport interface HoldingRegisterReadChannel extends z.infer<\n typeof holdingRegisterReadChannelZ\n> {}\n\n/** InputRegisterReadChannel reads a typed value from one or more input registers. */\nexport const inputRegisterReadChannelZ = baseReadChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"input_register\"),\n /** stringLength is the length, in characters, when data_type is a string. */\n stringLength: z.int32().default(0),\n });\nexport interface InputRegisterReadChannel extends z.infer<\n typeof inputRegisterReadChannelZ\n> {}\n\nexport const READ_CHANNEL_TYPES = [\n \"coil\",\n \"discrete_input\",\n \"holding_register\",\n \"input_register\",\n] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single Modbus read channel. The type field selects the register\n * space the channel reads from and the fields that accompany it.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n coilReadChannelZ,\n discreteInputReadChannelZ,\n holdingRegisterReadChannelZ,\n inputRegisterReadChannelZ,\n]);\nexport type ReadChannel =\n | CoilReadChannel\n | DiscreteInputReadChannel\n | HoldingRegisterReadChannel\n | InputRegisterReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n coil: coilReadChannelZ,\n discrete_input: discreteInputReadChannelZ,\n holding_register: holdingRegisterReadChannelZ,\n input_register: inputRegisterReadChannelZ,\n};\n\n/** CoilWriteChannel writes a single bit to a coil. */\nexport const coilWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"coil\"),\n});\nexport interface CoilWriteChannel extends z.infer<typeof coilWriteChannelZ> {}\n\n/**\n * HoldingRegisterWriteChannel writes a typed value to one or more holding registers.\n */\nexport const holdingRegisterWriteChannelZ = baseWriteChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"holding_register\"),\n });\nexport interface HoldingRegisterWriteChannel extends z.infer<\n typeof holdingRegisterWriteChannelZ\n> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"coil\", \"holding_register\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single Modbus write channel. The type field selects the register\n * space the channel writes to and the fields that accompany it.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n coilWriteChannelZ,\n holdingRegisterWriteChannelZ,\n]);\nexport type WriteChannel = CoilWriteChannel | HoldingRegisterWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n coil: coilWriteChannelZ,\n holding_register: holdingRegisterWriteChannelZ,\n};\n\nexport const readConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: readChannelZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/modbus/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TERMINAL_CONFIGS = [\n \"Cfg_Default\",\n \"RSE\",\n \"NRSE\",\n \"Diff\",\n \"PseudoDiff\",\n] as const;\nexport const terminalConfigZ = z.enum(TERMINAL_CONFIGS);\nexport type TerminalConfig = z.infer<typeof terminalConfigZ>;\n\nexport const EXCITATION_SOURCES = [\"Internal\", \"External\", \"None\"] as const;\nexport const excitationSourceZ = z.enum(EXCITATION_SOURCES);\nexport type ExcitationSource = z.infer<typeof excitationSourceZ>;\n\nexport const BRIDGE_CONFIGS = [\"FullBridge\", \"HalfBridge\", \"QuarterBridge\"] as const;\nexport const bridgeConfigZ = z.enum(BRIDGE_CONFIGS);\nexport type BridgeConfig = z.infer<typeof bridgeConfigZ>;\n\nexport const ELECTRICAL_UNITS = [\"mVoltsPerVolt\", \"VoltsPerVolt\"] as const;\nexport const electricalUnitsZ = z.enum(ELECTRICAL_UNITS);\nexport type ElectricalUnits = z.infer<typeof electricalUnitsZ>;\n\nexport const RESISTANCE_CONFIGS = [\"2Wire\", \"3Wire\", \"4Wire\"] as const;\nexport const resistanceConfigZ = z.enum(RESISTANCE_CONFIGS);\nexport type ResistanceConfig = z.infer<typeof resistanceConfigZ>;\n\nexport const Z_INDEX_PHASES = [\n \"AHighBHigh\",\n \"AHighBLow\",\n \"ALowBHigh\",\n \"ALowBLow\",\n] as const;\nexport const zIndexPhaseZ = z.enum(Z_INDEX_PHASES);\nexport type ZIndexPhase = z.infer<typeof zIndexPhaseZ>;\n\nexport const UNITS = [\n \"Volts\",\n \"Amps\",\n \"DegF\",\n \"DegC\",\n \"DegR\",\n \"Kelvins\",\n \"Strain\",\n \"Ohms\",\n \"Hz\",\n \"Seconds\",\n \"Meters\",\n \"Inches\",\n \"Degrees\",\n \"Radians\",\n \"g\",\n \"MetersPerSecondSquared\",\n \"Newtons\",\n \"Pounds\",\n \"KilogramForce\",\n \"PoundsPerSquareInch\",\n \"Bar\",\n \"Pascals\",\n \"VoltsPerVolt\",\n \"mVoltsPerVolt\",\n \"NewtonMeters\",\n \"InchPounds\",\n \"InchOunces\",\n \"FootPounds\",\n] as const;\nexport const unitsZ = z.enum(UNITS);\nexport type Units = z.infer<typeof unitsZ>;\n\nexport const ACCEL_SENSITIVITY_UNITS = [\"mVoltsPerG\", \"VoltsPerG\"] as const;\nexport const accelSensitivityUnitsZ = z.enum(ACCEL_SENSITIVITY_UNITS);\nexport type AccelSensitivityUnits = z.infer<typeof accelSensitivityUnitsZ>;\n\nexport const ACCEL_UNITS = [\n \"g\",\n \"MetersPerSecondSquared\",\n \"InchesPerSecondSquared\",\n] as const;\nexport const accelUnitsZ = z.enum(ACCEL_UNITS);\nexport type AccelUnits = z.infer<typeof accelUnitsZ>;\n\nexport const FORCE_UNITS = [\"Newtons\", \"Pounds\", \"KilogramForce\"] as const;\nexport const forceUnitsZ = z.enum(FORCE_UNITS);\nexport type ForceUnits = z.infer<typeof forceUnitsZ>;\n\nexport const SHUNT_RESISTOR_LOCATIONS = [\"Default\", \"Internal\", \"External\"] as const;\nexport const shuntResistorLocationZ = z.enum(SHUNT_RESISTOR_LOCATIONS);\nexport type ShuntResistorLocation = z.infer<typeof shuntResistorLocationZ>;\n\nexport const FORCE_SENSITIVITY_UNITS = [\"mVoltsPerNewton\", \"mVoltsPerPound\"] as const;\nexport const forceSensitivityUnitsZ = z.enum(FORCE_SENSITIVITY_UNITS);\nexport type ForceSensitivityUnits = z.infer<typeof forceSensitivityUnitsZ>;\n\nexport const PRESSURE_UNITS = [\"PoundsPerSquareInch\", \"Pascals\", \"Bar\"] as const;\nexport const pressureUnitsZ = z.enum(PRESSURE_UNITS);\nexport type PressureUnits = z.infer<typeof pressureUnitsZ>;\n\nexport const TORQUE_UNITS = [\n \"NewtonMeters\",\n \"InchOunces\",\n \"InchPounds\",\n \"FootPounds\",\n] as const;\nexport const torqueUnitsZ = z.enum(TORQUE_UNITS);\nexport type TorqueUnits = z.infer<typeof torqueUnitsZ>;\n\nexport const TEMPERATURE_UNITS = [\"DegC\", \"DegF\", \"Kelvins\", \"DegR\"] as const;\nexport const temperatureUnitsZ = z.enum(TEMPERATURE_UNITS);\nexport type TemperatureUnits = z.infer<typeof temperatureUnitsZ>;\n\nexport const RTD_TYPES = [\n \"Pt3750\",\n \"Pt3851\",\n \"Pt3911\",\n \"Pt3916\",\n \"Pt3920\",\n \"Pt3928\",\n] as const;\nexport const rtdTypeZ = z.enum(RTD_TYPES);\nexport type RTDType = z.infer<typeof rtdTypeZ>;\n\nexport const STRAIN_CONFIGS = [\n \"FullBridgeI\",\n \"FullBridgeII\",\n \"FullBridgeIII\",\n \"HalfBridgeI\",\n \"HalfBridgeII\",\n \"QuarterBridgeI\",\n \"QuarterBridgeII\",\n] as const;\nexport const strainConfigZ = z.enum(STRAIN_CONFIGS);\nexport type StrainConfig = z.infer<typeof strainConfigZ>;\n\nexport const THERMOCOUPLE_TYPES = [\"J\", \"K\", \"N\", \"R\", \"S\", \"T\", \"B\", \"E\"] as const;\nexport const thermocoupleTypeZ = z.enum(THERMOCOUPLE_TYPES);\nexport type ThermocoupleType = z.infer<typeof thermocoupleTypeZ>;\n\nexport const VELOCITY_UNITS = [\"MetersPerSecond\", \"InchesPerSecond\"] as const;\nexport const velocityUnitsZ = z.enum(VELOCITY_UNITS);\nexport type VelocityUnits = z.infer<typeof velocityUnitsZ>;\n\nexport const VELOCITY_SENSITIVITY_UNITS = [\n \"MillivoltsPerMillimeterPerSecond\",\n \"MilliVoltsPerInchPerSecond\",\n] as const;\nexport const velocitySensitivityUnitsZ = z.enum(VELOCITY_SENSITIVITY_UNITS);\nexport type VelocitySensitivityUnits = z.infer<typeof velocitySensitivityUnitsZ>;\n\nexport const CHARGE_UNITS = [\"Coulombs\", \"PicoCoulombs\"] as const;\nexport const chargeUnitsZ = z.enum(CHARGE_UNITS);\nexport type ChargeUnits = z.infer<typeof chargeUnitsZ>;\n\nexport const CI_EDGES = [\"Rising\", \"Falling\"] as const;\nexport const ciEdgeZ = z.enum(CI_EDGES);\nexport type CIEdge = z.infer<typeof ciEdgeZ>;\n\nexport const CI_MEAS_METHODS = [\n \"LowFreq1Ctr\",\n \"HighFreq2Ctr\",\n \"LargeRng2Ctr\",\n \"DynamicAvg\",\n] as const;\nexport const ciMeasMethodZ = z.enum(CI_MEAS_METHODS);\nexport type CIMeasMethod = z.infer<typeof ciMeasMethodZ>;\n\nexport const CI_FREQ_UNITS = [\"Hz\", \"Ticks\"] as const;\nexport const ciFreqUnitsZ = z.enum(CI_FREQ_UNITS);\nexport type CIFreqUnits = z.infer<typeof ciFreqUnitsZ>;\n\nexport const CI_TIME_UNITS = [\"Seconds\", \"Ticks\"] as const;\nexport const ciTimeUnitsZ = z.enum(CI_TIME_UNITS);\nexport type CITimeUnits = z.infer<typeof ciTimeUnitsZ>;\n\nexport const CI_COUNT_DIRECTIONS = [\n \"CountUp\",\n \"CountDown\",\n \"ExternallyControlled\",\n] as const;\nexport const ciCountDirectionZ = z.enum(CI_COUNT_DIRECTIONS);\nexport type CICountDirection = z.infer<typeof ciCountDirectionZ>;\n\nexport const CI_DECODING_TYPES = [\"X1\", \"X2\", \"X4\", \"TwoPulse\"] as const;\nexport const ciDecodingTypeZ = z.enum(CI_DECODING_TYPES);\nexport type CIDecodingType = z.infer<typeof ciDecodingTypeZ>;\n\nexport const CI_LINEAR_VELOCITY_UNITS = [\"m/s\", \"in/s\"] as const;\nexport const ciLinearVelocityUnitsZ = z.enum(CI_LINEAR_VELOCITY_UNITS);\nexport type CILinearVelocityUnits = z.infer<typeof ciLinearVelocityUnitsZ>;\n\nexport const CI_ANGULAR_VELOCITY_UNITS = [\"RPM\", \"Radians/s\", \"Degrees/s\"] as const;\nexport const ciAngularVelocityUnitsZ = z.enum(CI_ANGULAR_VELOCITY_UNITS);\nexport type CIAngularVelocityUnits = z.infer<typeof ciAngularVelocityUnitsZ>;\n\nexport const CI_LINEAR_POSITION_UNITS = [\"Meters\", \"Inches\", \"Ticks\"] as const;\nexport const ciLinearPositionUnitsZ = z.enum(CI_LINEAR_POSITION_UNITS);\nexport type CILinearPositionUnits = z.infer<typeof ciLinearPositionUnitsZ>;\n\nexport const CI_ANGULAR_POSITION_UNITS = [\"Degrees\", \"Radians\", \"Ticks\"] as const;\nexport const ciAngularPositionUnitsZ = z.enum(CI_ANGULAR_POSITION_UNITS);\nexport type CIAngularPositionUnits = z.infer<typeof ciAngularPositionUnitsZ>;\n\nexport const WAVE_TYPES = [\"Sine\", \"Triangle\", \"Square\", \"Sawtooth\"] as const;\nexport const waveTypeZ = z.enum(WAVE_TYPES);\nexport type WaveType = z.infer<typeof waveTypeZ>;\n\nexport const ACCEL_CHARGE_SENSITIVITY_UNITS = [\n \"PicoCoulombsPerG\",\n \"PicoCoulombsPerMetersPerSecondSquared\",\n \"PicoCoulombsPerInchesPerSecondSquared\",\n] as const;\nexport const accelChargeSensitivityUnitsZ = z.enum(ACCEL_CHARGE_SENSITIVITY_UNITS);\nexport type AccelChargeSensitivityUnits = z.infer<typeof accelChargeSensitivityUnitsZ>;\n\n/** MinMaxVal bounds the expected signal range in scaled units. */\nexport const minMaxValZ = z.object({\n /** minVal is the minimum expected value, in scaled units. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected value, in scaled units. */\n maxVal: z.number().default(1),\n});\nexport interface MinMaxVal extends z.infer<typeof minMaxValZ> {}\n\n/** Terminal configures the terminal wiring of an analog input channel. */\nexport const terminalZ = z.object({\n /** terminalConfig selects the terminal configuration (RSE, NRSE, Diff, ...). */\n terminalConfig: terminalConfigZ.default(\"Cfg_Default\"),\n});\nexport interface Terminal extends z.infer<typeof terminalZ> {}\n\n/** Sensitivity specifies a sensor's sensitivity rating. */\nexport const sensitivityZ = z.object({\n /** sensitivity is the sensor's sensitivity rating. */\n sensitivity: z.number().default(0),\n});\nexport interface Sensitivity extends z.infer<typeof sensitivityZ> {}\n\n/** CurrentExcitation configures the current excitation supplied to a sensor. */\nexport const currentExcitationZ = z.object({\n /** currentExcitSource selects the source of the current excitation signal. */\n currentExcitSource: excitationSourceZ.default(\"Internal\"),\n /** currentExcitVal is the current excitation level, in Amps. */\n currentExcitVal: z.number().default(0),\n});\nexport interface CurrentExcitation extends z.infer<typeof currentExcitationZ> {}\n\n/** VoltageExcitation configures the voltage excitation supplied to a sensor. */\nexport const voltageExcitationZ = z.object({\n /** voltageExcitSource selects the source of the voltage excitation signal. */\n voltageExcitSource: excitationSourceZ.default(\"Internal\"),\n /** voltageExcitVal is the voltage excitation level, in Volts. */\n voltageExcitVal: z.number().default(0),\n});\nexport interface VoltageExcitation extends z.infer<typeof voltageExcitationZ> {}\n\n/** Bridge configures the wiring and nominal resistance of a bridge-based sensor. */\nexport const bridgeZ = z.object({\n /** bridgeConfig selects the physical bridge wiring. */\n bridgeConfig: bridgeConfigZ.default(\"FullBridge\"),\n /** nominalBridgeResistance is the nominal resistance of the bridge, in Ohms. */\n nominalBridgeResistance: z.number().default(1),\n});\nexport interface Bridge extends z.infer<typeof bridgeZ> {}\n\n/**\n * BridgePolynomial scales bridge electrical output to physical units with a polynomial.\n */\nexport const bridgePolynomialZ = z.object({\n /** forwardCoeffs are the coefficients mapping electrical to physical values. */\n forwardCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** reverseCoeffs are the coefficients mapping physical to electrical values. */\n reverseCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** electricalUnits are the electrical output units of the bridge. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n});\nexport interface BridgePolynomial extends z.infer<typeof bridgePolynomialZ> {}\n\n/** Resistance configures the wiring of a resistance measurement. */\nexport const resistanceZ = z.object({\n /**\n * resistanceConfig selects the number of wires used for the resistance measurement.\n */\n resistanceConfig: resistanceConfigZ.default(\"2Wire\"),\n});\nexport interface Resistance extends z.infer<typeof resistanceZ> {}\n\n/** Table scales bridge electrical output to physical units with a lookup table. */\nexport const tableZ = z.object({\n /** electricalVals are the electrical breakpoints of the calibration table. */\n electricalVals: z\n .number()\n .array()\n .default(() => []),\n /** electricalUnits are the units of the electrical breakpoints. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n /**\n * physicalVals are the physical values corresponding to each electrical breakpoint.\n */\n physicalVals: z\n .number()\n .array()\n .default(() => []),\n});\nexport interface Table extends z.infer<typeof tableZ> {}\n\n/**\n * TwoPointLin scales bridge electrical output to physical units between two calibration\n * points.\n */\nexport const twoPointLinZ = z.object({\n /** firstElectricalVal is the first electrical calibration point. */\n firstElectricalVal: z.number().default(0),\n /** secondElectricalVal is the second electrical calibration point. */\n secondElectricalVal: z.number().default(1),\n /** electricalUnits are the units of the electrical calibration points. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n /** firstPhysicalVal is the physical value at the first electrical point. */\n firstPhysicalVal: z.number().default(0),\n /** secondPhysicalVal is the physical value at the second electrical point. */\n secondPhysicalVal: z.number().default(1),\n});\nexport interface TwoPointLin extends z.infer<typeof twoPointLinZ> {}\n\n/** BaseAIChannel carries the fields every NI analog input channel shares. */\nexport const baseAIChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from. */\n port: z.int32().default(0),\n /** device is the key of the device the channel belongs to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseAIChannel extends z.infer<typeof baseAIChannelZ> {}\n\n/** ZIndex configures the Z-index reset behavior of an encoder. */\nexport const zIndexZ = z.object({\n /** zIndexEnabled is true when the encoder's Z index resets the count. */\n zIndexEnabled: z.boolean().default(false),\n /** zIndexVal is the value the measurement resets to when the Z index is active. */\n zIndexVal: z.number().default(0),\n /** zIndexPhase selects the A/B states at which the Z index is active. */\n zIndexPhase: zIndexPhaseZ.default(\"AHighBHigh\"),\n /** terminalZ is the terminal the Z index signal is wired to. */\n terminalZ: z.string().default(\"\"),\n});\nexport interface ZIndex extends z.infer<typeof zIndexZ> {}\n\n/** BaseCIChannel carries the fields every NI counter input channel shares. */\nexport const baseCIChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical counter the channel uses. */\n port: z.int32().default(0),\n /** device is the key of the device the counter belongs to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseCIChannel extends z.infer<typeof baseCIChannelZ> {}\n\n/** BaseAOChannel carries the fields every NI analog output channel shares. */\nexport const baseAOChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to. */\n port: z.int32().default(0),\n});\nexport interface BaseAOChannel extends z.infer<typeof baseAOChannelZ> {}\n\n/** DIChannel is a digital input channel the task acquires from. */\nexport const diChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from. */\n port: z.int32().default(0),\n /** line is the digital line within the port the channel reads from. */\n line: z.int32().default(0),\n});\nexport interface DIChannel extends z.infer<typeof diChannelZ> {}\n\n/** DOChannel is a digital output channel the task drives. */\nexport const doChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to. */\n port: z.int32().default(0),\n /** line is the digital line within the port the channel writes to. */\n line: z.int32().default(0),\n});\nexport interface DOChannel extends z.infer<typeof doChannelZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n stateRate: z.number().default(10),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n\nexport const scanConfigZ = task.scanConfigZ.extend({\n ignoredModels: z.string().array().default([\"^cRIO.*\", \"^nown.*\"]),\n});\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** BuiltInCJC reads the reference temperature from the device's own sensor. */\nexport const builtInCJCZ = z.object({\n source: z.literal(\"built_in\"),\n});\nexport interface BuiltInCJC extends z.infer<typeof builtInCJCZ> {}\n\n/** ConstValCJC uses a fixed reference temperature. */\nexport const constValCJCZ = z.object({\n source: z.literal(\"const_val\"),\n /** val is the reference temperature, in the channel's units. */\n val: z.number().default(0),\n});\nexport interface ConstValCJC extends z.infer<typeof constValCJCZ> {}\n\n/** ChanCJC reads the reference temperature from another channel. */\nexport const chanCJCZ = z.object({\n source: z.literal(\"chan\"),\n /** port is the port of the channel that measures the reference. */\n port: z.int32().default(0),\n});\nexport interface ChanCJC extends z.infer<typeof chanCJCZ> {}\n\nexport const CJC_TYPES = [\"built_in\", \"const_val\", \"chan\"] as const;\nexport const cjcTypeZ = z.enum(CJC_TYPES);\nexport type CJCType = z.infer<typeof cjcTypeZ>;\n\n/**\n * CJC is the cold-junction compensation for a thermocouple. The source selects where\n * the reference temperature comes from.\n */\nexport const cjcZ = z.discriminatedUnion(\"source\", [\n builtInCJCZ,\n constValCJCZ,\n chanCJCZ,\n]);\nexport type CJC = BuiltInCJC | ConstValCJC | ChanCJC;\n\nexport const CJC_SCHEMAS: {\n [K in CJCType]: z.ZodType<Extract<CJC, { source: K }>>;\n} = {\n built_in: builtInCJCZ,\n const_val: constValCJCZ,\n chan: chanCJCZ,\n};\n\n/** LinearScale maps raw values to engineering units with a slope and intercept. */\nexport const linearScaleZ = z.object({\n type: z.literal(\"linear\"),\n /** slope is the multiplier applied to the raw value. */\n slope: z.number().default(1),\n /** yIntercept is the offset added after scaling. */\n yIntercept: z.number().default(0),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface LinearScale extends z.infer<typeof linearScaleZ> {}\n\n/** MapScale maps a raw range linearly onto a scaled range. */\nexport const mapScaleZ = z.object({\n type: z.literal(\"map\"),\n /** preScaledMin is the lower bound of the raw input range. */\n preScaledMin: z.number().default(0),\n /** preScaledMax is the upper bound of the raw input range. */\n preScaledMax: z.number().default(1),\n /** scaledMin is the lower bound of the scaled output range. */\n scaledMin: z.number().default(0),\n /** scaledMax is the upper bound of the scaled output range. */\n scaledMax: z.number().default(1),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface MapScale extends z.infer<typeof mapScaleZ> {}\n\n/** TableScale maps raw values to engineering units via a lookup table. */\nexport const tableScaleZ = z.object({\n type: z.literal(\"table\"),\n /** preScaledVals are the raw breakpoints, monotonically increasing. */\n preScaledVals: z\n .number()\n .array()\n .default(() => []),\n /** scaledVals are the engineering-unit values at each breakpoint. */\n scaledVals: z\n .number()\n .array()\n .default(() => []),\n /** preScaledUnits are the units of the raw values before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the values after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface TableScale extends z.infer<typeof tableScaleZ> {}\n\n/** PolynomialScale maps raw values to engineering units with a polynomial. */\nexport const polynomialScaleZ = z.object({\n type: z.literal(\"polynomial\"),\n /** forwardCoeffs are the coefficients mapping pre-scaled to scaled values. */\n forwardCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** reverseCoeffs are the coefficients mapping scaled to pre-scaled values. */\n reverseCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface PolynomialScale extends z.infer<typeof polynomialScaleZ> {}\n\n/** NoneScale applies no scaling; the raw value is used directly. */\nexport const noneScaleZ = z.object({\n type: z.literal(\"none\"),\n});\nexport interface NoneScale extends z.infer<typeof noneScaleZ> {}\n\nexport const SCALE_TYPES = [\"linear\", \"map\", \"table\", \"polynomial\", \"none\"] as const;\nexport const scaleTypeZ = z.enum(SCALE_TYPES);\nexport type ScaleType = z.infer<typeof scaleTypeZ>;\n\n/** Scale determines how raw sensor values are transformed to engineering units. */\nexport const scaleZ = z.discriminatedUnion(\"type\", [\n linearScaleZ,\n mapScaleZ,\n tableScaleZ,\n polynomialScaleZ,\n noneScaleZ,\n]);\nexport type Scale = LinearScale | MapScale | TableScale | PolynomialScale | NoneScale;\n\nexport const SCALE_SCHEMAS: {\n [K in ScaleType]: z.ZodType<Extract<Scale, { type: K }>>;\n} = {\n linear: linearScaleZ,\n map: mapScaleZ,\n table: tableScaleZ,\n polynomial: polynomialScaleZ,\n none: noneScaleZ,\n};\n\nexport const digitalReadConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: diChannelZ.array().default(() => []),\n});\nexport interface DigitalReadConfig extends z.infer<typeof digitalReadConfigZ> {}\n\nexport const digitalWriteConfigZ = writeConfigZ.extend({\n channels: doChannelZ.array().default(() => []),\n});\nexport interface DigitalWriteConfig extends z.infer<typeof digitalWriteConfigZ> {}\n\n/** CustomScale applies a user-defined scale to the raw measurement. */\nexport const customScaleZ = z.object({\n /** customScale is the scale applied to the raw measurement. */\n customScale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface CustomScale extends z.infer<typeof customScaleZ> {}\n\n/** AIVoltageChannel reads a voltage. */\nexport const aiVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage\"),\n });\nexport interface AIVoltageChannel extends z.infer<typeof aiVoltageChannelZ> {}\n\n/** AIAccelChannel reads acceleration from an accelerometer. */\nexport const aiAccelChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelSensitivityUnitsZ.default(\"mVoltsPerG\"),\n });\nexport interface AIAccelChannel extends z.infer<typeof aiAccelChannelZ> {}\n\n/** AIBridgeChannel reads a generic bridge-based sensor. */\nexport const aiBridgeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_bridge\"),\n /** units are the electrical output units of the bridge. */\n units: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n });\nexport interface AIBridgeChannel extends z.infer<typeof aiBridgeChannelZ> {}\n\n/** AICurrentChannel reads a current. */\nexport const aiCurrentChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_current\"),\n /** shuntResistorLoc selects where the shunt resistor is located. */\n shuntResistorLoc: shuntResistorLocationZ.default(\"Default\"),\n /** extShuntResistorVal is the external shunt resistor value, in Ohms. */\n extShuntResistorVal: z.number().default(1),\n });\nexport interface AICurrentChannel extends z.infer<typeof aiCurrentChannelZ> {}\n\n/** AIForceBridgeTableChannel reads force from a bridge with a calibration table. */\nexport const aiForceBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_table\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgeTableChannel extends z.infer<\n typeof aiForceBridgeTableChannelZ\n> {}\n\n/**\n * AIForceBridgeTwoPointLinChannel reads force from a bridge with two-point linear\n * calibration.\n */\nexport const aiForceBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_two_point_lin\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgeTwoPointLinChannel extends z.infer<\n typeof aiForceBridgeTwoPointLinChannelZ\n> {}\n\n/** AIForceIEPEChannel reads force from an IEPE sensor. */\nexport const aiForceIEPEChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_iepe\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** sensitivityUnits are the units of the IEPE sensor sensitivity. */\n sensitivityUnits: forceSensitivityUnitsZ.default(\"mVoltsPerNewton\"),\n });\nexport interface AIForceIEPEChannel extends z.infer<typeof aiForceIEPEChannelZ> {}\n\n/** AIMicrophoneChannel reads sound pressure from a microphone. */\nexport const aiMicrophoneChannelZ = baseAIChannelZ\n .extend(terminalZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_microphone\"),\n /** micSensitivity is the microphone sensitivity, in mV/Pa. */\n micSensitivity: z.number().default(0),\n /** maxSndPressLevel is the maximum expected sound pressure level, in dB. */\n maxSndPressLevel: z.number().default(0),\n });\nexport interface AIMicrophoneChannel extends z.infer<typeof aiMicrophoneChannelZ> {}\n\n/**\n * AIPressureBridgeTableChannel reads pressure from a bridge with a calibration table.\n */\nexport const aiPressureBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_table\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgeTableChannel extends z.infer<\n typeof aiPressureBridgeTableChannelZ\n> {}\n\n/**\n * AIPressureBridgeTwoPointLinChannel reads pressure from a bridge with two-point linear\n * calibration.\n */\nexport const aiPressureBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_two_point_lin\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgeTwoPointLinChannel extends z.infer<\n typeof aiPressureBridgeTwoPointLinChannelZ\n> {}\n\n/** AIResistanceChannel reads a resistance. */\nexport const aiResistanceChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_resistance\"),\n });\nexport interface AIResistanceChannel extends z.infer<typeof aiResistanceChannelZ> {}\n\n/** AIRTDChannel reads temperature from an RTD. */\nexport const aiRTDChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_rtd\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** rtdType selects the RTD resistance-temperature curve. */\n rtdType: rtdTypeZ.default(\"Pt3750\"),\n /** r0 is the sensor resistance at 0 degrees Celsius, in Ohms. */\n r0: z.number().default(0),\n });\nexport interface AIRTDChannel extends z.infer<typeof aiRTDChannelZ> {}\n\n/** AIStrainGaugeChannel reads strain from a strain gauge. */\nexport const aiStrainGaugeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_strain_gauge\"),\n /** strainConfig selects the strain-gauge bridge configuration. */\n strainConfig: strainConfigZ.default(\"FullBridgeI\"),\n /** gageFactor is the gauge factor of the strain gauge. */\n gageFactor: z.number().default(0),\n /** initialBridgeVoltage is the bridge output voltage in the unloaded state. */\n initialBridgeVoltage: z.number().default(0),\n /** nominalGageResistance is the nominal gauge resistance, in Ohms. */\n nominalGageResistance: z.number().default(0),\n /** poissonRatio is the Poisson ratio of the measured material. */\n poissonRatio: z.number().default(0),\n /** leadWireResistance is the resistance of the lead wires, in Ohms. */\n leadWireResistance: z.number().default(0),\n });\nexport interface AIStrainGaugeChannel extends z.infer<typeof aiStrainGaugeChannelZ> {}\n\n/** AITempBuiltinChannel reads temperature from the device's built-in sensor. */\nexport const aiTempBuiltinChannelZ = baseAIChannelZ.omit({ port: true }).extend({\n type: z.literal(\"ai_temp_builtin\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n});\nexport interface AITempBuiltinChannel extends z.infer<typeof aiTempBuiltinChannelZ> {}\n\n/** AIThermocoupleChannel reads temperature from a thermocouple. */\nexport const aiThermocoupleChannelZ = baseAIChannelZ.extend(minMaxValZ.shape).extend({\n type: z.literal(\"ai_thermocouple\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** thermocoupleType selects the thermocouple alloy type. */\n thermocoupleType: thermocoupleTypeZ.default(\"J\"),\n /** cjc is the cold-junction compensation applied to the reading. */\n cjc: cjcZ.prefault({ source: \"built_in\" }),\n});\nexport interface AIThermocoupleChannel extends z.infer<typeof aiThermocoupleChannelZ> {}\n\n/** AITorqueBridgeTableChannel reads torque from a bridge with a calibration table. */\nexport const aiTorqueBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_table\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgeTableChannel extends z.infer<\n typeof aiTorqueBridgeTableChannelZ\n> {}\n\n/**\n * AITorqueBridgeTwoPointLinChannel reads torque from a bridge with two-point linear\n * calibration.\n */\nexport const aiTorqueBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_two_point_lin\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgeTwoPointLinChannel extends z.infer<\n typeof aiTorqueBridgeTwoPointLinChannelZ\n> {}\n\n/** AIVelocityIEPEChannel reads velocity from an IEPE sensor. */\nexport const aiVelocityIEPEChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_velocity_iepe\"),\n /** units are the units of the velocity measurement. */\n units: velocityUnitsZ.default(\"MetersPerSecond\"),\n /** sensitivityUnits are the units of the IEPE sensor sensitivity. */\n sensitivityUnits: velocitySensitivityUnitsZ.default(\n \"MillivoltsPerMillimeterPerSecond\",\n ),\n });\nexport interface AIVelocityIEPEChannel extends z.infer<typeof aiVelocityIEPEChannelZ> {}\n\n/**\n * AIAccel4WireDCVoltageChannel reads acceleration from a 4-wire DC-voltage\n * accelerometer.\n */\nexport const aiAccel4WireDCVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel_4_wire_dc_voltage\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelSensitivityUnitsZ.default(\"mVoltsPerG\"),\n /**\n * scaledByExcitation is true when the excitation voltage is used to scale the\n * reading.\n */\n scaledByExcitation: z.boolean().default(false),\n });\nexport interface AIAccel4WireDCVoltageChannel extends z.infer<\n typeof aiAccel4WireDCVoltageChannelZ\n> {}\n\n/** AIAccelChargeChannel reads acceleration from a charge-mode accelerometer. */\nexport const aiAccelChargeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel_charge\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelChargeSensitivityUnitsZ.default(\"PicoCoulombsPerG\"),\n });\nexport interface AIAccelChargeChannel extends z.infer<typeof aiAccelChargeChannelZ> {}\n\n/** AIChargeChannel reads a raw charge. */\nexport const aiChargeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_charge\"),\n /** units are the units of the charge measurement. */\n units: chargeUnitsZ.default(\"Coulombs\"),\n });\nexport interface AIChargeChannel extends z.infer<typeof aiChargeChannelZ> {}\n\n/** AICurrentRMSChannel reads RMS current. */\nexport const aiCurrentRMSChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_current_rms\"),\n /** shuntResistorLoc selects where the shunt resistor is located. */\n shuntResistorLoc: shuntResistorLocationZ.default(\"Default\"),\n /** extShuntResistorVal is the external shunt resistor value, in Ohms. */\n extShuntResistorVal: z.number().default(1),\n });\nexport interface AICurrentRMSChannel extends z.infer<typeof aiCurrentRMSChannelZ> {}\n\n/**\n * AIForceBridgePolynomialChannel reads force from a bridge with polynomial calibration.\n */\nexport const aiForceBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_polynomial\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgePolynomialChannel extends z.infer<\n typeof aiForceBridgePolynomialChannelZ\n> {}\n\n/** AIFreqVoltageChannel reads frequency from a voltage signal. */\nexport const aiFreqVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_freq_voltage\"),\n /** thresholdLevel is the voltage level at which a cycle is counted. */\n thresholdLevel: z.number().default(0),\n /** hysteresis is the hysteresis applied around the threshold level. */\n hysteresis: z.number().default(0),\n });\nexport interface AIFreqVoltageChannel extends z.infer<typeof aiFreqVoltageChannelZ> {}\n\n/**\n * AIPressureBridgePolynomialChannel reads pressure from a bridge with polynomial\n * calibration.\n */\nexport const aiPressureBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_polynomial\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgePolynomialChannel extends z.infer<\n typeof aiPressureBridgePolynomialChannelZ\n> {}\n\n/** AIThermistorIexChannel reads temperature from a current-excited thermistor. */\nexport const aiThermistorIexChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_thermistor_iex\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** a is the first Steinhart-Hart coefficient. */\n a: z.number().default(0),\n /** b is the second Steinhart-Hart coefficient. */\n b: z.number().default(0),\n /** c is the third Steinhart-Hart coefficient. */\n c: z.number().default(0),\n });\nexport interface AIThermistorIexChannel extends z.infer<\n typeof aiThermistorIexChannelZ\n> {}\n\n/** AIThermistorVexChannel reads temperature from a voltage-excited thermistor. */\nexport const aiThermistorVexChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_thermistor_vex\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** a is the first Steinhart-Hart coefficient. */\n a: z.number().default(0),\n /** b is the second Steinhart-Hart coefficient. */\n b: z.number().default(0),\n /** c is the third Steinhart-Hart coefficient. */\n c: z.number().default(0),\n /** r1 is the reference resistor value, in Ohms. */\n r1: z.number().default(0),\n });\nexport interface AIThermistorVexChannel extends z.infer<\n typeof aiThermistorVexChannelZ\n> {}\n\n/**\n * AITorqueBridgePolynomialChannel reads torque from a bridge with polynomial\n * calibration.\n */\nexport const aiTorqueBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_polynomial\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgePolynomialChannel extends z.infer<\n typeof aiTorqueBridgePolynomialChannelZ\n> {}\n\n/** AIVoltageRMSChannel reads RMS voltage. */\nexport const aiVoltageRMSChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage_rms\"),\n });\nexport interface AIVoltageRMSChannel extends z.infer<typeof aiVoltageRMSChannelZ> {}\n\n/** AIVoltageWithExcitChannel reads a voltage with excitation. */\nexport const aiVoltageWithExcitChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage_with_excit\"),\n /** bridgeConfig selects the physical bridge wiring. */\n bridgeConfig: bridgeConfigZ.default(\"FullBridge\"),\n /**\n * scaledByExcitation is true when the excitation voltage is used to scale the\n * reading.\n */\n scaledByExcitation: z.boolean().default(false),\n });\nexport interface AIVoltageWithExcitChannel extends z.infer<\n typeof aiVoltageWithExcitChannelZ\n> {}\n\nexport const AI_CHANNEL_TYPES = [\n \"ai_voltage\",\n \"ai_accel\",\n \"ai_bridge\",\n \"ai_current\",\n \"ai_force_bridge_table\",\n \"ai_force_bridge_two_point_lin\",\n \"ai_force_iepe\",\n \"ai_microphone\",\n \"ai_pressure_bridge_table\",\n \"ai_pressure_bridge_two_point_lin\",\n \"ai_resistance\",\n \"ai_rtd\",\n \"ai_strain_gauge\",\n \"ai_temp_builtin\",\n \"ai_thermocouple\",\n \"ai_torque_bridge_table\",\n \"ai_torque_bridge_two_point_lin\",\n \"ai_velocity_iepe\",\n \"ai_accel_4_wire_dc_voltage\",\n \"ai_accel_charge\",\n \"ai_charge\",\n \"ai_current_rms\",\n \"ai_force_bridge_polynomial\",\n \"ai_freq_voltage\",\n \"ai_pressure_bridge_polynomial\",\n \"ai_thermistor_iex\",\n \"ai_thermistor_vex\",\n \"ai_torque_bridge_polynomial\",\n \"ai_voltage_rms\",\n \"ai_voltage_with_excit\",\n] as const;\nexport const aiChannelTypeZ = z.enum(AI_CHANNEL_TYPES);\nexport type AIChannelType = z.infer<typeof aiChannelTypeZ>;\n\n/**\n * AIChannel is a single NI analog input channel. The type field selects the measurement\n * mode and the fields that accompany it.\n */\nexport const aiChannelZ = z.discriminatedUnion(\"type\", [\n aiVoltageChannelZ,\n aiAccelChannelZ,\n aiBridgeChannelZ,\n aiCurrentChannelZ,\n aiForceBridgeTableChannelZ,\n aiForceBridgeTwoPointLinChannelZ,\n aiForceIEPEChannelZ,\n aiMicrophoneChannelZ,\n aiPressureBridgeTableChannelZ,\n aiPressureBridgeTwoPointLinChannelZ,\n aiResistanceChannelZ,\n aiRTDChannelZ,\n aiStrainGaugeChannelZ,\n aiTempBuiltinChannelZ,\n aiThermocoupleChannelZ,\n aiTorqueBridgeTableChannelZ,\n aiTorqueBridgeTwoPointLinChannelZ,\n aiVelocityIEPEChannelZ,\n aiAccel4WireDCVoltageChannelZ,\n aiAccelChargeChannelZ,\n aiChargeChannelZ,\n aiCurrentRMSChannelZ,\n aiForceBridgePolynomialChannelZ,\n aiFreqVoltageChannelZ,\n aiPressureBridgePolynomialChannelZ,\n aiThermistorIexChannelZ,\n aiThermistorVexChannelZ,\n aiTorqueBridgePolynomialChannelZ,\n aiVoltageRMSChannelZ,\n aiVoltageWithExcitChannelZ,\n]);\nexport type AIChannel =\n | AIVoltageChannel\n | AIAccelChannel\n | AIBridgeChannel\n | AICurrentChannel\n | AIForceBridgeTableChannel\n | AIForceBridgeTwoPointLinChannel\n | AIForceIEPEChannel\n | AIMicrophoneChannel\n | AIPressureBridgeTableChannel\n | AIPressureBridgeTwoPointLinChannel\n | AIResistanceChannel\n | AIRTDChannel\n | AIStrainGaugeChannel\n | AITempBuiltinChannel\n | AIThermocoupleChannel\n | AITorqueBridgeTableChannel\n | AITorqueBridgeTwoPointLinChannel\n | AIVelocityIEPEChannel\n | AIAccel4WireDCVoltageChannel\n | AIAccelChargeChannel\n | AIChargeChannel\n | AICurrentRMSChannel\n | AIForceBridgePolynomialChannel\n | AIFreqVoltageChannel\n | AIPressureBridgePolynomialChannel\n | AIThermistorIexChannel\n | AIThermistorVexChannel\n | AITorqueBridgePolynomialChannel\n | AIVoltageRMSChannel\n | AIVoltageWithExcitChannel;\n\nexport const AI_CHANNEL_SCHEMAS: {\n [K in AIChannelType]: z.ZodType<Extract<AIChannel, { type: K }>>;\n} = {\n ai_voltage: aiVoltageChannelZ,\n ai_accel: aiAccelChannelZ,\n ai_bridge: aiBridgeChannelZ,\n ai_current: aiCurrentChannelZ,\n ai_force_bridge_table: aiForceBridgeTableChannelZ,\n ai_force_bridge_two_point_lin: aiForceBridgeTwoPointLinChannelZ,\n ai_force_iepe: aiForceIEPEChannelZ,\n ai_microphone: aiMicrophoneChannelZ,\n ai_pressure_bridge_table: aiPressureBridgeTableChannelZ,\n ai_pressure_bridge_two_point_lin: aiPressureBridgeTwoPointLinChannelZ,\n ai_resistance: aiResistanceChannelZ,\n ai_rtd: aiRTDChannelZ,\n ai_strain_gauge: aiStrainGaugeChannelZ,\n ai_temp_builtin: aiTempBuiltinChannelZ,\n ai_thermocouple: aiThermocoupleChannelZ,\n ai_torque_bridge_table: aiTorqueBridgeTableChannelZ,\n ai_torque_bridge_two_point_lin: aiTorqueBridgeTwoPointLinChannelZ,\n ai_velocity_iepe: aiVelocityIEPEChannelZ,\n ai_accel_4_wire_dc_voltage: aiAccel4WireDCVoltageChannelZ,\n ai_accel_charge: aiAccelChargeChannelZ,\n ai_charge: aiChargeChannelZ,\n ai_current_rms: aiCurrentRMSChannelZ,\n ai_force_bridge_polynomial: aiForceBridgePolynomialChannelZ,\n ai_freq_voltage: aiFreqVoltageChannelZ,\n ai_pressure_bridge_polynomial: aiPressureBridgePolynomialChannelZ,\n ai_thermistor_iex: aiThermistorIexChannelZ,\n ai_thermistor_vex: aiThermistorVexChannelZ,\n ai_torque_bridge_polynomial: aiTorqueBridgePolynomialChannelZ,\n ai_voltage_rms: aiVoltageRMSChannelZ,\n ai_voltage_with_excit: aiVoltageWithExcitChannelZ,\n};\n\n/** CIFrequencyChannel measures signal frequency. */\nexport const ciFrequencyChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_frequency\"),\n /** minVal is the minimum expected frequency. */\n minVal: z.number().default(2),\n /** maxVal is the maximum expected frequency. */\n maxVal: z.number().default(100),\n /** units are the units of the frequency measurement. */\n units: ciFreqUnitsZ.default(\"Hz\"),\n /** edge selects the edge the counter responds to. */\n edge: ciEdgeZ.default(\"Rising\"),\n /** measMethod selects the measurement method. */\n measMethod: ciMeasMethodZ.default(\"DynamicAvg\"),\n /** measTime is the averaging window for high-frequency measurement, in seconds. */\n measTime: z.number().default(0.000006),\n /** divisor is the counter divisor for large-range measurement. */\n divisor: z.int32().default(4),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIFrequencyChannel extends z.infer<typeof ciFrequencyChannelZ> {}\n\n/** CIEdgeCountChannel counts signal edges. */\nexport const ciEdgeCountChannelZ = baseCIChannelZ.extend({\n type: z.literal(\"ci_edge_count\"),\n /** activeEdge selects the edge that increments the count. */\n activeEdge: ciEdgeZ.default(\"Rising\"),\n /** countDirection selects the direction the counter counts. */\n countDirection: ciCountDirectionZ.default(\"CountUp\"),\n /** initialCount is the value the counter starts at. */\n initialCount: z.number().default(0),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n});\nexport interface CIEdgeCountChannel extends z.infer<typeof ciEdgeCountChannelZ> {}\n\n/** CIPeriodChannel measures signal period. */\nexport const ciPeriodChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_period\"),\n /** minVal is the minimum expected period, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected period, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the period measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** startingEdge selects the edge that starts a period measurement. */\n startingEdge: ciEdgeZ.default(\"Rising\"),\n /** measMethod selects the measurement method. */\n measMethod: ciMeasMethodZ.default(\"DynamicAvg\"),\n /** measTime is the averaging window for high-frequency measurement, in seconds. */\n measTime: z.number().default(0.001),\n /** divisor is the counter divisor for large-range measurement. */\n divisor: z.int32().default(4),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIPeriodChannel extends z.infer<typeof ciPeriodChannelZ> {}\n\n/** CIPulseWidthChannel measures pulse width. */\nexport const ciPulseWidthChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_pulse_width\"),\n /** minVal is the minimum expected pulse width, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected pulse width, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the pulse-width measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** startingEdge selects the edge that starts a pulse-width measurement. */\n startingEdge: ciEdgeZ.default(\"Rising\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIPulseWidthChannel extends z.infer<typeof ciPulseWidthChannelZ> {}\n\n/** CISemiPeriodChannel measures semi-period. */\nexport const ciSemiPeriodChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_semi_period\"),\n /** minVal is the minimum expected semi-period, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected semi-period, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the semi-period measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CISemiPeriodChannel extends z.infer<typeof ciSemiPeriodChannelZ> {}\n\n/** CITwoEdgeSepChannel measures the separation between two edges. */\nexport const ciTwoEdgeSepChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_two_edge_sep\"),\n /** minVal is the minimum expected separation, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected separation, in the selected units. */\n maxVal: z.number().default(1),\n /** units are the units of the two-edge-separation measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** firstEdge selects the edge that starts the measurement. */\n firstEdge: ciEdgeZ.default(\"Rising\"),\n /** secondEdge selects the edge that stops the measurement. */\n secondEdge: ciEdgeZ.default(\"Falling\"),\n /** firstTerminal is the terminal the first edge's signal is wired to. */\n firstTerminal: z.string().default(\"\"),\n /** secondTerminal is the terminal the second edge's signal is wired to. */\n secondTerminal: z.string().default(\"\"),\n });\nexport interface CITwoEdgeSepChannel extends z.infer<typeof ciTwoEdgeSepChannelZ> {}\n\n/** CIVelocityLinearChannel measures linear velocity from an encoder. */\nexport const ciVelocityLinearChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_velocity_linear\"),\n /** minVal is the minimum expected velocity. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected velocity. */\n maxVal: z.number().default(1),\n /** units are the units of the velocity measurement. */\n units: ciLinearVelocityUnitsZ.default(\"m/s\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** distPerPulse is the linear distance per encoder pulse. */\n distPerPulse: z.number().default(0.001),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIVelocityLinearChannel extends z.infer<\n typeof ciVelocityLinearChannelZ\n> {}\n\n/** CIVelocityAngularChannel measures angular velocity from an encoder. */\nexport const ciVelocityAngularChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_velocity_angular\"),\n /** minVal is the minimum expected velocity. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected velocity. */\n maxVal: z.number().default(1),\n /** units are the units of the velocity measurement. */\n units: ciAngularVelocityUnitsZ.default(\"RPM\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** pulsesPerRev is the number of encoder pulses per revolution. */\n pulsesPerRev: z.number().default(24),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIVelocityAngularChannel extends z.infer<\n typeof ciVelocityAngularChannelZ\n> {}\n\n/** CIPositionLinearChannel measures linear position from an encoder. */\nexport const ciPositionLinearChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(zIndexZ.shape)\n .extend({\n type: z.literal(\"ci_position_linear\"),\n /** units are the units of the position measurement. */\n units: ciLinearPositionUnitsZ.default(\"Meters\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** distPerPulse is the linear distance per encoder pulse. */\n distPerPulse: z.number().default(0.000001),\n /** initialPos is the position the encoder starts at. */\n initialPos: z.number().default(0),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIPositionLinearChannel extends z.infer<\n typeof ciPositionLinearChannelZ\n> {}\n\n/** CIPositionAngularChannel measures angular position from an encoder. */\nexport const ciPositionAngularChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(zIndexZ.shape)\n .extend({\n type: z.literal(\"ci_position_angular\"),\n /** units are the units of the position measurement. */\n units: ciAngularPositionUnitsZ.default(\"Degrees\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** pulsesPerRev is the number of encoder pulses per revolution. */\n pulsesPerRev: z.number().default(24),\n /** initialAngle is the angle the encoder starts at. */\n initialAngle: z.number().default(0),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIPositionAngularChannel extends z.infer<\n typeof ciPositionAngularChannelZ\n> {}\n\n/** CIDutyCycleChannel measures the duty cycle of a signal. */\nexport const ciDutyCycleChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_duty_cycle\"),\n /** minVal is the minimum expected duty-cycle frequency. */\n minVal: z.number().default(2),\n /** maxVal is the maximum expected duty-cycle frequency. */\n maxVal: z.number().default(10000),\n /** activeEdge selects the edge the counter responds to. */\n activeEdge: ciEdgeZ.default(\"Rising\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIDutyCycleChannel extends z.infer<typeof ciDutyCycleChannelZ> {}\n\nexport const CI_CHANNEL_TYPES = [\n \"ci_frequency\",\n \"ci_edge_count\",\n \"ci_period\",\n \"ci_pulse_width\",\n \"ci_semi_period\",\n \"ci_two_edge_sep\",\n \"ci_velocity_linear\",\n \"ci_velocity_angular\",\n \"ci_position_linear\",\n \"ci_position_angular\",\n \"ci_duty_cycle\",\n] as const;\nexport const ciChannelTypeZ = z.enum(CI_CHANNEL_TYPES);\nexport type CIChannelType = z.infer<typeof ciChannelTypeZ>;\n\n/**\n * CIChannel is a single NI counter input channel. The type field selects the\n * measurement mode and the fields that accompany it.\n */\nexport const ciChannelZ = z.discriminatedUnion(\"type\", [\n ciFrequencyChannelZ,\n ciEdgeCountChannelZ,\n ciPeriodChannelZ,\n ciPulseWidthChannelZ,\n ciSemiPeriodChannelZ,\n ciTwoEdgeSepChannelZ,\n ciVelocityLinearChannelZ,\n ciVelocityAngularChannelZ,\n ciPositionLinearChannelZ,\n ciPositionAngularChannelZ,\n ciDutyCycleChannelZ,\n]);\nexport type CIChannel =\n | CIFrequencyChannel\n | CIEdgeCountChannel\n | CIPeriodChannel\n | CIPulseWidthChannel\n | CISemiPeriodChannel\n | CITwoEdgeSepChannel\n | CIVelocityLinearChannel\n | CIVelocityAngularChannel\n | CIPositionLinearChannel\n | CIPositionAngularChannel\n | CIDutyCycleChannel;\n\nexport const CI_CHANNEL_SCHEMAS: {\n [K in CIChannelType]: z.ZodType<Extract<CIChannel, { type: K }>>;\n} = {\n ci_frequency: ciFrequencyChannelZ,\n ci_edge_count: ciEdgeCountChannelZ,\n ci_period: ciPeriodChannelZ,\n ci_pulse_width: ciPulseWidthChannelZ,\n ci_semi_period: ciSemiPeriodChannelZ,\n ci_two_edge_sep: ciTwoEdgeSepChannelZ,\n ci_velocity_linear: ciVelocityLinearChannelZ,\n ci_velocity_angular: ciVelocityAngularChannelZ,\n ci_position_linear: ciPositionLinearChannelZ,\n ci_position_angular: ciPositionAngularChannelZ,\n ci_duty_cycle: ciDutyCycleChannelZ,\n};\n\n/** AOCurrentChannel drives a current output. */\nexport const aoCurrentChannelZ = baseAOChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ao_current\"),\n });\nexport interface AOCurrentChannel extends z.infer<typeof aoCurrentChannelZ> {}\n\n/** AOFuncGenChannel drives a function-generator output. */\nexport const aoFuncGenChannelZ = baseAOChannelZ.extend({\n type: z.literal(\"ao_func_gen\"),\n /** waveType selects the waveform to generate. */\n waveType: waveTypeZ.default(\"Sine\"),\n /** frequency is the waveform frequency, in Hertz. */\n frequency: z.number().default(0),\n /** amplitude is the waveform amplitude. */\n amplitude: z.number().default(0),\n /** offset is the waveform DC offset. */\n offset: z.number().default(0),\n});\nexport interface AOFuncGenChannel extends z.infer<typeof aoFuncGenChannelZ> {}\n\n/** AOVoltageChannel drives a voltage output. */\nexport const aoVoltageChannelZ = baseAOChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ao_voltage\"),\n });\nexport interface AOVoltageChannel extends z.infer<typeof aoVoltageChannelZ> {}\n\nexport const AO_CHANNEL_TYPES = [\"ao_current\", \"ao_func_gen\", \"ao_voltage\"] as const;\nexport const aoChannelTypeZ = z.enum(AO_CHANNEL_TYPES);\nexport type AOChannelType = z.infer<typeof aoChannelTypeZ>;\n\n/**\n * AOChannel is a single NI analog output channel. The type field selects the output\n * mode and the fields that accompany it.\n */\nexport const aoChannelZ = z.discriminatedUnion(\"type\", [\n aoCurrentChannelZ,\n aoFuncGenChannelZ,\n aoVoltageChannelZ,\n]);\nexport type AOChannel = AOCurrentChannel | AOFuncGenChannel | AOVoltageChannel;\n\nexport const AO_CHANNEL_SCHEMAS: {\n [K in AOChannelType]: z.ZodType<Extract<AOChannel, { type: K }>>;\n} = {\n ao_current: aoCurrentChannelZ,\n ao_func_gen: aoFuncGenChannelZ,\n ao_voltage: aoVoltageChannelZ,\n};\n\nexport const analogReadConfigZ = task.readConfigZ.extend({\n channels: aiChannelZ.array().default(() => []),\n});\nexport interface AnalogReadConfig extends z.infer<typeof analogReadConfigZ> {}\n\nexport const counterReadConfigZ = task.readConfigZ.extend({\n channels: ciChannelZ.array().default(() => []),\n});\nexport interface CounterReadConfig extends z.infer<typeof counterReadConfigZ> {}\n\nexport const analogWriteConfigZ = writeConfigZ.extend({\n channels: aoChannelZ.array().default(() => []),\n});\nexport interface AnalogWriteConfig extends z.infer<typeof analogWriteConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/ni/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** BaseChannel carries the fields every OPC UA channel shares. */\nexport const baseChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** nodeId is the OPC UA node ID the channel is bound to. */\n nodeId: z.string().default(\"\"),\n /** nodeName is the browse name of the OPC UA node. */\n nodeName: z.string().default(\"\"),\n /** dataType is the data type of the Synnax channel. */\n dataType: z.string().default(\"float32\"),\n});\nexport interface BaseChannel extends z.infer<typeof baseChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\nexport const readChannelZ = baseChannelZ.extend({\n channel: channel.keyZ.default(0),\n isIndex: z.boolean().default(false),\n});\nexport interface ReadChannel extends z.infer<typeof readChannelZ> {}\n\nexport const writeChannelZ = baseChannelZ.extend({\n cmdChannel: channel.keyZ.default(0),\n});\nexport interface WriteChannel extends z.infer<typeof writeChannelZ> {}\n\nexport const readConfigZ = task.readConfigZ\n .omit({ sampleRate: true, streamRate: true })\n .extend({\n sampleRate: z.number().default(50),\n streamRate: z.number().default(25),\n device: device.keyZ.default(\"\"),\n arrayMode: z.boolean().default(false),\n arraySize: z.int32().default(1),\n channels: readChannelZ.array().default(() => []),\n });\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/opcua/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { status } from \"@/status\";\nimport { task } from \"@/task\";\n\n/** Alert maps a Synnax status to a PagerDuty event routing rule. */\nexport const alertZ = z.object({\n /** key uniquely identifies the alert within the task. */\n key: z.string().default(id.create),\n /** status is the key of the Synnax status the alert watches. */\n status: status.keyZ.default(\"\"),\n /** errorsCritical is true when the error variant maps to PagerDuty critical. */\n errorsCritical: z.boolean().default(false),\n /** component is the PagerDuty component attached to triggered events. */\n component: z.string().default(\"\"),\n /** group is the PagerDuty group attached to triggered events. */\n group: z.string().default(\"\"),\n /** class is the PagerDuty class attached to triggered events. */\n class: z.string().default(\"\"),\n /** disabled is true when the alert is excluded from the task. */\n disabled: z.boolean().default(false),\n});\nexport interface Alert extends z.infer<typeof alertZ> {}\n\nexport const taskConfigZ = task.startConfigZ.extend({\n routingKey: z.string().default(\"\"),\n alerts: alertZ.array().default(() => []),\n});\nexport interface TaskConfig extends z.infer<typeof taskConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/pagerduty/types.gen\";\n"],"x_google_ignoreList":[0,1],"mappings":";;;;AAOA,IAAa,IAAU,OAAO,IAAI,qBAAqB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