Перейти до вмісту

Available API procedures

Цей контент ще не доступний вашою мовою.

This reference lists the supported API procedures, whether each procedure reads, changes, or streams data, its weight, and its generated TypeScript input and output shapes. Named types in those shapes are defined under Shared types. See the API reference for transport, authentication, permissions, errors, and task-oriented examples.

A call counts its procedure’s weight in API requests: 1 is reading one workspace (workspace.get), 0 is free, and the weight covers the largest input the procedure accepts. See Charges.

ProcedureKindWeightPurpose
account.notifications.dismissMutation3Dismiss a notification that must be dismissed.
account.notifications.listQuery5List your in-app notifications, newest first, optionally by workspace and severity.
account.notifications.markAllReadMutation5Mark notifications up to the newest one shown read.
account.notifications.markReadMutation3Mark one notification read.
account.notifications.watchSubscription0Subscribe to your unread count, newest notification time and banners. The first event and any event after missed changes have type resync.
account.profileQuery3Get the current account profile and onboarding state.
account.providersQuery1List login methods connected to the current account.
account.saveProfileMutation3Save the current account profile and complete onboarding.
alarm.acknowledgeMutation3Acknowledge an alarm with an optional comment (operators and above). A pending notification about it is cancelled; a cleared alarm leaves the active alarms.
alarm.listQuery2List a workspace’s active alarms, and cleared latching ones still waiting for acknowledgement: source, key, severity, message, the parameters its rule or automation reads, and when and by whom they were raised, cleared, acknowledged or shelved.
alarm.logQuery2Page through a workspace’s alarm log, newest first: every raise, clear, acknowledgement, shelf and removal, with who did it and why. Filter by time, severity, event kind, source or one alarm. Recent changes appear after a short shipping delay.
alarm.shelveMutation3Shelve an alarm for a duration (1 minute to 7 days) with a reason (operators and above). It does not notify until the shelf ends; shelving again replaces the shelf.
alarm.unshelveMutation3End an alarm’s shelf before it is over (operators and above). An alarm still active and unacknowledged notifies at once.
alarm.watchSubscription0Subscribe to a workspace’s active alarms. Every event carries the whole list alarm.list returns, and whether the workspace raises alarms at all (an enabled alarm rule, an enabled automation with a raiseAlarm step, or an active alarm); the first is sent at once.
alarmRule.createMutation5Create an alarm rule from its JSON document (condition, hold times, severity, message, recipients). Rejected with automation_invalid and the diagnostics when it has errors. Editors, admins and owners.
alarmRule.deleteMutation5Delete an alarm rule. Refused with alarm_rule_in_use while an automation refers to it.
alarmRule.getQuery5Get an alarm rule: its JSON document and validator diagnostics.
alarmRule.listQuery5List the alarm rules of a workspace (or those one dashboard owns): name, severity, owning dashboard, disabledSince, and validator error/warning counts.
alarmRule.setDisabledMutation5Disable or enable an alarm rule. A disabled rule never raises alarms; enabling one with errors is refused.
alarmRule.updateMutation5Replace an alarm rule’s document or owning dashboard. Rejected with automation_invalid when the new document has errors.
alarmRule.validateMutation5Check an alarm rule document as alarmRule.create (or alarmRule.update with id) would, without saving it. Any JSON is accepted; a wrong shape is reported as invalid_shape. Returns ok, the diagnostics (errors, then warnings), and in others the errors the save would give automations that refer to it; maxSteps is null.
assistant.abortTurnMutation3Stop everything the assistant runs in a chat, with an id the caller chooses for the Stop. Always allowed.
assistant.addToQueueMutation3Send a message to an assistant chat: to the run that has the chat, or as a new run (in the running-chats quota).
assistant.cancelJobWaitMutation3Interrupt the background job the assistant waits for.
assistant.continueRunMutation3Continue the assistant’s run that stopped short in a chat.
assistant.createChatMutation3Create a new assistant chat with an id the caller chooses.
assistant.deleteChatMutation5Delete an assistant chat; whatever runs in it stops.
assistant.getPendingGuardQuery1Get the guard the assistant waits on in a chat: a repeated step or the spending cap.
assistant.getPendingJobWaitQuery1Get the background job the assistant waits for in a chat.
assistant.getPendingProposalQuery1Get the confirmation card the assistant waits on in a chat.
assistant.getPendingQuestionQuery1Get the question the assistant waits on in a chat.
assistant.listChatsQuery2List assistant chats for the current user.
assistant.listMessagesQuery5List one page of an assistant chat’s messages: the newest page first, each page’s messages oldest first.
assistant.removeQueuedMutation3Remove a queued message.
assistant.renameChatMutation3Rename an assistant chat. A renamed chat keeps its title: the assistant no longer names it.
assistant.rewindMutation3Rewind an assistant chat to before one of the user’s messages (messageId), with an id the caller chooses: that message and the later ones leave the chat (kept for audit), and the message comes back for editing. Refused while the assistant works in the chat. Workspace setup is untouched; revert it with workspace.checkpoint.revert to a checkpoint rewindCheckpoints lists.
assistant.rewindCheckpointsQuery3List the workspaces whose setup the assistant changed in a chat since one of the user’s messages, each with the checkpoint taken before its first change: reverting to it undoes those changes and everything after them. Only workspaces the caller may revert.
assistant.runtimeStateQuery2Your assistant chats’ runs, waits and queued messages as the server sees them now, with the running-chats quota.
assistant.setSpendingCapMutation2Set the user’s assistant spending cap: a run pauses each time it costs this much more.
assistant.spendingCapQuery1Get the user’s assistant spending cap.
assistant.watchChatSubscription0Follow an assistant chat live: a snapshot of what its running agents show, then their step events.
assistant.watchRuntimeSubscription0Subscribe to changes of your assistant runtime. The first event and any event after missed changes have type resync.
audit.archivedWorkspacesQuery5List deleted workspaces whose audit history the current owner may view.
audit.exportQuery10Export authorized audit history as JSON or CSV.
audit.listQuery5List authorized workspace or personal account audit history.
automation.createMutation5Create an automation from its JSON document (see the automations reference). Rejected with automation_invalid and the diagnostics when it has errors; warnings are returned. Editors, admins and owners.
automation.deleteMutation5Delete an automation. Refused with automation_in_use while another automation is triggered by it.
automation.dryRunMutation10Run one procedure of an automation document, saved or not, against the workspace’s current values and the saved automation’s state, with no side effects: nothing is written, notified, raised or stored. Returns the steps, values and the effects a real run would have. Rejected with automation_invalid when the document has errors. Editors, admins and owners.
automation.getQuery5Get an automation: its JSON document, validator diagnostics and the most steps one run can execute.
automation.latestRunsQuery5The latest run, or refusal to run, of each automation of a workspace that has one in run history.
automation.listQuery5List the server automations of a workspace (or those one dashboard owns): name, owning dashboard, disabledSince, and validator error/warning counts against the workspace as it is now.
automation.membersQuery1The workspace’s members by user id, name and role, to choose notification recipients from (members recipients take user ids). No emails. Editors, admins and owners.
automation.runsQuery3Run history of an automation, newest first: what started each run, its duration, steps, writes and notifications, and its error. Kept 90 days; pass next as before for older runs.
automation.runTraceQuery3The step trace of one run: the input values it started with and up to its first 1000 executed steps with branches taken, values set and written and writeLog output, plus write outcomes. Kept 7 days.
automation.setDisabledMutation5Disable or enable an automation. A disabled automation never runs; enabling one with errors is refused.
automation.updateMutation5Replace an automation’s document or owning dashboard. Rejected with automation_invalid when the new document has errors.
automation.validateMutation5Check an automation document as automation.create (or automation.update with id) would, without saving it. Any JSON is accepted; a wrong shape is reported as invalid_shape. Returns ok, the diagnostics (errors, then warnings), maxSteps, and in others the errors the save would give automations and alarm rules that refer to it.
automation.validationContextQuery5What validateAutomation and validateAlarmRule need to check a document of this workspace offline: its parameters (formula type, writable, disabled), endpoints, alarm rules, other automations, members, whether it has a location, and the workspace’s limits (set by admins and owners).
billing.accounts.getQuery1.5Read a billing account and its balance.
billing.accounts.listQuery2List the billing accounts you are a member of.
billing.accounts.renameMutation3Rename a billing account you own.
billing.accounts.setAlertsMutation3Set a billing account’s low-balance alerts: days of balance left at recent spending, and a balance in micro-euros; null turns one off. Owners and managers only.
billing.estimateQuery0Estimate a setup’s monthly cost, VAT included, at the current price list or a scheduled one (effectiveFrom). Devices go in groups; assistant use is tokens per level. Returns each month from an empty start with each item’s quantity, unit price and amount, the profile with defaults as assumptions, the month cost levels off, and unpriced cost types. Needs no sign-in.
billing.ledger.daysQuery10List a billing account’s ledger by day, newest first: hourly charges summed per workspace and cost type, other entries one by one.
billing.ledger.exportQuery20Export a billing account’s ledger entries of a period as CSV.
billing.ledger.listQuery5List a billing account’s ledger, newest first.
billing.members.addMutation3Add a person who shares a workspace with you to a billing account you own.
billing.members.listQuery2List the members of a billing account.
billing.members.removeMutation3Remove a member from a billing account you own, or leave one.
billing.members.setRoleMutation3Change a member’s role in a billing account you own.
billing.pricesQuery0Read the price list, VAT included: the prices in effect now and scheduled changes, with assistant prices per million tokens following the model provider’s current prices. A unit price is per priceUnit (quantity of unit), such as per endpoint per day; unit is only what usage is metered in. The What is charged reference says what each kind counts. Needs no sign-in.
billing.topUps.checkoutMutation3Open a Stripe payment page to top up a billing account you own or manage.
billing.topUps.settingsQuery0Read whether card top-ups are available and their limits.
billing.usage.breakdownQuery10Break down a billing account’s usage charges of a period by workspace, cost type and top subjects, with daily totals.
billing.usage.spendQuery3Read a billing account’s usage charges of the last day and week, and how many days its balance lasts at that rate.
billing.vouchers.redeemMutation3Redeem a prepaid voucher code into a billing account you own or manage.
billing.workspace.getQuery1.5Read which billing account pays for a workspace you are an admin or owner of.
billing.workspace.moveMutation3Bill a workspace you own to a billing account you own or manage, from the next hour.
billing.workspace.statusQuery1Read whether a workspace you are a member of is active, suspended soon because its billing account is below zero, or suspended.
dashboard.configuration.patchMutation3Change part of a dashboard’s configuration with JSON Patch (RFC 6902) operations, with its revision from dashboard.get as baseRevision. The result may add no problems against the template’s schema (dashboard_configuration_invalid); a document is checked like any change (dashboard_document_invalid, diagnostics with JSON pointers). Prefer it to dashboard.update for small edits.
dashboard.copyMutation5Duplicate a dashboard in its workspace, including configuration, sources and published build. The new name is plain text; other localized strings and entity references are preserved. Copies the latest saved state and inserts after the original.
dashboard.createMutation5Create a dashboard in a workspace.
dashboard.deleteMutation3Permanently delete a dashboard.
dashboard.disableMutation3Disable a dashboard.
dashboard.document.checkQuery2Check a configuration’s document as saving it would, without saving: to the dashboard id, or to a new one when id is left out. Returns every diagnostic and the errors the save would refuse with dashboard_document_invalid, with JSON pointers into the configuration.
dashboard.enableMutation3Re-enable a disabled dashboard.
dashboard.getQuery1Get a dashboard’s metadata and configuration. dashboard.listSourceFiles lists its source files.
dashboard.getSourceFileQuery1.5Read one source file of a dashboard, as dashboard.listSourceFiles names it.
dashboard.listQuery2List dashboards (id, name, description, icon, disabledSince).
dashboard.listSourceFilesQuery2List React/TS source paths for one dashboard (then getSourceFile).
dashboard.listSummariesQuery2List enabled dashboards (id, name).
dashboard.reorderMutation5Set workspace catalog order. ids must be the full dashboard list, including disabled.
dashboard.searchByNameQuery2Search dashboards by name (the query input). Returns at most 25 matches.
dashboard.updateMutation3Update dashboard name, description, icon, or configuration. Configuration replacement requires expectedConfiguration from the original dashboard.get response.
device.api.describeQuery0Describe one device API operation: its allowed calling surfaces, input JSON Schemas, per-key roles, timeout and rate limit.
device.api.invokeMutation3Call a device API operation on a PIN endpoint’s device. input has query and body as device.api.describe gives them. Returns the device’s JSON answer as response.
device.api.listQuery0List the device API operations of a PIN endpoint’s device that the caller’s role may call.
deviceLog.backfillMutation10Queue a job that copies the stored device-logged readings of a Modbus parameter’s unit, table, and first address into its history; call it after creating a parameter for an address from deviceLog.listAddresses. Readings already in its history are skipped, so it is safe to repeat. Returns the job id, or null when another user’s backfill of the parameter is running.
deviceLog.listAddressesQuery10MC252 endpoint addresses that programs logged (PARAMLOG) and no parameter reads, 500 most recent first: unit, table, address, record count, first/last time, latest PARAMLOG type code, and its device-converted value (F32/F64EPnR scaled by 10^n). Kept 90 days. To keep them, create a Modbus parameter with that unit, table, and first address, then call deviceLog.backfill.
deviceLog.statusQuery1.5How the import of an MC252 endpoint’s program-logged readings (PARAMLOG) stands: pull period in minutes, end of the last complete pull, the time through which all logged readings are in history, and, while the device clock is more than five minutes off, its offset and since when (nothing is imported until the clock is right).
edgeProgram.createMutation5Create an edge program on an MC252 endpoint. fileName is 8.3 with .TXT (upper-cased on save). Programs with errors save but are not deployed. With auto-sync on, a deploy to the device is queued; a deploy restarts every program on it.
edgeProgram.deleteMutation5Delete an edge program and its source. With auto-sync on, a deploy to the device is queued.
edgeProgram.deployStatusQuery1.5Get where an MC252’s programs stand: state (never, pending, deploying, synced, failed, blocked, offline, conflict, drift), the running deploy, the programs and tasks the device runs, a device compile error with program and line, and whether logging settings wait for a restart. waitMs (up to 30000) waits for a queued or running deploy to end; the deploy goes on either way.
edgeProgram.getQuery5Get an edge program with its source and validator diagnostics (checked with the device’s other enabled programs in file-name load order).
edgeProgram.getSettingsQuery1Get an MC252 endpoint’s edge settings: autoSync, deviceLogging (SYSLOG output on the device), readingsPullMinutes.
edgeProgram.listQuery5List MC252 edge programs (taskfiles) of a workspace or one endpoint: file name, enabled, source hash, and validation error/warning counts. Errors block deploys.
edgeProgram.readDeviceLogQuery3Read an MC252’s system log from the device, oldest first: program SYSLOG messages, unhandled errors with their line and likely programs, firmware messages, restarts. No after/before: the latest lines. Pass the returned cursor as after for only newer lines (reset: the log started over), or start as before for earlier ones. Needs the editor role, and deviceLogging on and applied.
edgeProgram.readLiveStateQuery3Read a program’s live state on its MC252 once, as one watchLiveState read returns it: status live (task run statistics in ms, variables as decimal strings and conditions by name, null while unknown, and unreadable counts), not_running, or unavailable with a reason. Needs editor access.
edgeProgram.readOwnUnitIdQuery3Read from an MC252 the Modbus unit ID it answers for its own registers: what programs reach as MBSELF, and the unit of HMI parameters that read the device’s own and program-mapped registers. null while its own Modbus device is off. Needs the editor role.
edgeProgram.syncNowMutation5Deploy an MC252’s programs now, also with auto-sync off. Returns the deploy job id. A deploy that changes programs restarts every program on the device.
edgeProgram.updateMutation5Update an edge program: file name, description, enabled, or source. Send baseSourceSha256 from get when editing the source. With auto-sync on, a deploy to the device is queued; a deploy restarts every program on it.
edgeProgram.updateSettingsMutation5Change an MC252 endpoint’s edge settings; omitted fields keep their value. Turning auto-sync on queues a deploy of pending program changes.
edgeProgram.watchDeployStatusSubscription0Subscribe to where an MC252’s programs stand: the deploy status (as deployStatus returns it) now, then again after each change.
edgeProgram.watchLiveStateSubscription0Subscribe to a program’s live state on its MC252, read about every intervalMs (at least 1000) while subscribed: the task’s period and duration statistics (ms), its variables (64-bit integers as decimal strings) and conditions grouped by the names the device compiled, with null for unknown values. Items past what the device exposes over Modbus are counted in unreadable. Needs editor access.
endpoint.beginPinPresenceMutation3Begin MC252 physical confirmation for a PIN. Other SKUs return presenceRequired false. The on-screen code is not returned: someone at the device presses its R button or, when codeDisplayed is true, enters the 8-digit code from its screen. Then endpoint.create with challengeId before expiresAt. Pass endpointId only before endpoint.disconnectOtherWorkspaces.
endpoint.cancelPinPresenceMutation3Cancel an MC252 presence challenge and clear a displayed code from the device. Call this when the confirmation is abandoned.
endpoint.createMutation3Create a Modbus TCP endpoint. An MC252 PIN requires challengeId from endpoint.beginPinPresence plus a press of the R button on the device or, when shown, the code from the device screen.
endpoint.deleteMutation3Permanently delete an endpoint.
endpoint.disableMutation3Disable an endpoint.
endpoint.disconnectOtherWorkspacesMutation5Delete PIN endpoints for this MC252 in other workspaces. First call endpoint.beginPinPresence with this endpoint’s pinCode and endpointId. Keeps this endpoint. Someone at the device presses its R button or, when codeDisplayed is true, enters the code from its screen.
endpoint.enableMutation5Re-enable a disabled endpoint.
endpoint.getQuery1Get endpoint setup (host/port/settings). For live connection status use endpoint.status.
endpoint.listQuery2List endpoints (id, name, kind, host/PIN/WireGuard, sku, manufacturer, disabledSince).
endpoint.listConnectedWorkspacesQuery1.5Workspaces with a PIN endpoint for this MC252, including this one. Empty unless sku is mc252.
endpoint.listSummariesQuery2List endpoints (id, name, disabledSince).
endpoint.mc252StatusQuery2Current MC252 HTTP reachability, firmware, scheduler, SD card, and last contact per endpoint.
endpoint.modbusClassFind.interruptMutation3Interrupt a running modbusClassFind job.
endpoint.modbusClassFind.monitorMutation1.5Stream progress for a running modbusClassFind job.
endpoint.modbusClassFind.startMutation10Identify devices on an MC252 RS-485 bus. Input: endpointId + devices[] from modbusFind or named UIDs (defaults 9600 / charFormat 5 / frameMode 0). Returns jobId; use jobs.wait. Requires microSD and PIN endpoint sku mc252.
endpoint.modbusFind.interruptMutation3Interrupt a running modbusFind job.
endpoint.modbusFind.monitorMutation1.5Stream progress for a running modbusFind job.
endpoint.modbusFind.startMutation5Start an MC252 RS-485 search. Returns jobId; use jobs.wait for foundDevices (uid + baud/format). Defaults: 9600 baud, charFormat 5 AUTO-STOP, RTU. PIN endpoints with sku mc252 only.
endpoint.modbusReadMutation5Read Modbus registers, coils or discrete inputs of an endpoint by address, for registers no parameter maps. Up to 32 reads per call (125 registers or 2000 bits each); each read fails on its own. Needs editor access.
endpoint.pollPinPresenceQuery1.5Check whether the R button on the MC252 was pressed after this presence challenge started. Does not consume the challenge. When pressed is true, call endpoint.create or endpoint.disconnectOtherWorkspaces without authorizationCode.
endpoint.searchByNameQuery2Search endpoints by name (the query input). Returns at most 25 matches.
endpoint.statusQuery2Current connection status of every endpoint in a workspace (state, active address, connectedAt, lastError; null until the first status arrives).
endpoint.trafficSubscription0Subscribe to live Modbus traffic of one endpoint (requests, sent and received ADUs as hex, connection events). No history.
endpoint.updateMutation5Update endpoint name, hostname, port, or TCP settings.
endpoint.watchMc252StatusSubscription0Subscribe to MC252 HTTP status: a snapshot, then changes, including stale observations becoming unknown.
endpoint.watchStatusSubscription0Subscribe to endpoint connection status in a workspace: a snapshot, then each change.
endpoint.wireGuardConfigQuery1WireGuard client configuration of a WireGuard endpoint, without the private key.
graphics.getQuery1Get an editable dashboard drawing and content revision.
graphics.listImagesQuery2List workspace graphics image assets.
graphics.saveMutation3Save a drawing using its expected revision. Preserves dashboard metadata and other drawings. Rejects symbol errors as graphics_invalid_document with details.issues; returns warnings on untouched objects.
graphics.symbols.getQuery0Built-in graphics symbol details: variants, properties with values and labels, essential bindings, ports, size, grid, and examples.
graphics.symbols.searchQuery0Search built-in graphics symbols by text, category, and industry. Returns a compact list; get details with graphics.symbols.get.
graphics.validateMutation1.5Check built-in symbol IDs, properties, line ports, rotation, and grid alignment without saving. Objects changed since the saved drawing give errors, untouched ones warnings.
helloQuery0Check that the API is reachable.
helpdesk.createMutation3File a Helpdesk ticket for this account.
helpdesk.listQuery2List Helpdesk tickets this account filed.
jobs.waitQuery1.5Wait for one job started by the current user. Call after an API returns a jobId. Completed, failed, or interrupted jobs return immediately. It also waits for an MC252 program deploy (deployJobIds) in a workspace the caller can read.
maps.browserConfigQuery1Get the Maps JavaScript API key and cloud map ID for the current theme, scoped to a dashboard or workspace settings.
maps.reverseGeocodeQuery1Reverse-geocode coordinates to a single address line.
notifications.confirmPhoneMutation3Confirm the number a verification code was sent to with that code; SMS notifications then go to it. Turn SMS on with saveChannel.
notifications.disconnectTelegramMutation3Disconnect your Telegram account: notifications stop going there and the bot no longer acts for you. A security notice is emailed to you.
notifications.removePhoneMutation3Remove your SMS number and any pending verification code, and turn SMS notifications off.
notifications.requestPhoneCodeMutation3Send a verification code by SMS to a mobile number in international format, to use it for SMS notifications. Replaces any code sent before; a confirmed number stays until the new one is confirmed. Numbers in the EU and EEA, Switzerland, the United Kingdom and Ukraine are supported.
notifications.saveChannelMutation3Turn a notification channel on or off and set the lowest severity it delivers (info < warning < urgent). Takes effect for notifications not yet delivered. SMS and Telegram can be turned on only once set up. System email (sign-in codes, invitations, security notices) is always sent.
notifications.saveLocalizationMutation3Set the language of your notifications and system email (sign-in codes, invitations, security notices), and the IANA time zone notification times are shown in. System email keeps showing times in UTC.
notifications.saveSmsCapMutation3Set or remove (null) a workspace’s monthly SMS spending cap in euros, rounded to cents (admins and owners). Once the month’s SMS reach it, no more SMS notifications are sent for the workspace until the next UTC calendar month; owners and admins are told once.
notifications.settingsQuery1.5Get your notification settings: language and time zone, each channel (email, sms, telegram) with whether it is on, its minimum severity (info < warning < urgent) and whether it is set up, the workspaces you muted, your confirmed SMS number, and a number waiting for its SMS code. Muted workspaces reach you only in the app.
notifications.setWorkspaceMuteMutation3Mute or unmute a workspace for yourself. A muted workspace’s notifications reach you only in the app, never by email, SMS or Telegram. Takes effect for notifications not yet delivered.
notifications.smsCapQuery1Get a workspace’s monthly SMS spending cap in euros (null when it has none) and its SMS spending this UTC calendar month (admins and owners).
parameter.createMutation3Create a parameter in a workspace branch.
parameter.createBranchMutation3Create a parameter branch. Root: { workspaceId, parentId: null, name }. Child: { parentId, name } only (no workspaceId).
parameter.deleteSelectionMutation10Permanently delete selected parameters and branches. A report that snapshots a deleted parameter does not block it; report.preset.listByParameterIds lists those reports beforehand.
parameter.getQuery1.5Get parameter setup (source, valueType). For live values use parameter.readValues.
parameter.getBranchQuery1Get one parameter branch.
parameter.listBranchesQuery2List branches (id, name, parentId). parentId: omit=all, null=roots, uuid=children.
parameter.listConstValuesQuery2List all constant values of a workspace: each key with its value in base64, including empty values. Any workspace member.
parameter.listInBranchQuery2List parameters directly in one branch (not subtree).
parameter.listInventoryQuery5Get a nested inventory of enabled parameters, with texts in the requested locale.
parameter.listTreeQuery10Get the full parameter tree with every branch and parameter. Large; parameter.listInventory and parameter.searchByName return less.
parameter.readValuesMutation5Read live parameter values.
parameter.readValuesStreamMutation5Stream live parameter values as they arrive. Same input as readValues.
parameter.searchBranchesByNameQuery2Search branches by name (the query input). parentId keeps only direct children of that branch, or root branches when null. Returns at most 25 matches.
parameter.searchByNameQuery2Search parameters by display name in any language (the query input); mnemonics are not searched. branchId keeps only parameters directly in that branch, not in its sub-branches; omit it to search the whole workspace. Returns at most 25 matches.
parameter.updateMutation3Update parameter setup fields.
parameter.updateBranchMutation3Rename a parameter branch.
parameter.upsertConstValuesMutation5Create or replace up to 500 constant values by key (base64, at most 1024 bytes decoded). Editors and above. When a key repeats, the last value wins. Keys not in the request are kept.
parameter.writeValuesMutation5Write parameter values and return per-item acknowledgements, not observed readings. Read feedback separately.
problemReport.submitMutation5Submit a problem report to Overvis support, optionally with a screenshot.
readings.aggregateQuery10One aggregate value per requested parameter and aggregation over [from, to) (exclusive to); each value echoes its aggregation, and pairs without readings are omitted. Numeric: first/latest/average/delta/sum/min/max. Int/str: first/latest. Any workspace member.
readings.cadenceQuery10One row per completed interval (1s/1m/5m/15m/30m/1h/4h/1d); the interval in progress is left out, and with 1d so is today. timezone is an IANA name. Any workspace member.
readings.changePointsQuery10Integer-only change-points for state duration: as-of at/before from, then in-window value changes through to. Consecutive equals collapsed. Over 50k returned points errors. No paging. Any workspace member.
readings.clearRangeMutation20Delete raw readings of one value-type family in the requested parameter time spans and wait until the deletion is visible. Admins and owners, like storage.deleteReadings. Affected historical aggregates are recalculated by default; set rebuildRollups to false to skip recalculation.
readings.daysQuery10One sparse row per local day intersecting [from, to); a day cut by from counts its delta from the last reading before from. Today is included up to its last completed hour, unlike readings.cadence with 1d. timezone is an IANA name. Any workspace member.
readings.exportExactQuery10Exact stored readings for one parameter (rawHex + typed value) in inclusive [from, to]. Max 10k rows; when hasMore, pass next.afterTime and next.afterTimeSkip back to resume, including rows that share a timestamp. afterTime alone is an older exclusive cursor that skips the rest of that timestamp. Any workspace member.
readings.insertExactMutation10Insert up to 10k exact raw readings for one value-type family. Editors and above. Parameters must exist and match the family. Empty rawHex allowed. Affected aggregates are recalculated; with rebuildParents false only 1-minute aggregates are, and readings.rebuildParentRollups recalculates the rest.
readings.minMaxQuery10Min/max points in [from, to] per parameter. Any workspace member.
readings.rangeOccupiedMutation10Which parameter ids already have at least one raw reading of the given value-type family in the requested time spans. Any workspace member.
readings.rawQuery10Raw points in inclusive [from, to]. Per-parameter maxPoints (default 10k) plus hasMore for paging. Any workspace member.
readings.realtimeSubscription0Subscribe to live readings as they are acquired. Readings imported with readings.insertExact or uploads are not sent.
readings.rebuildParentRollupsMutation10Recalculate 5-minute to 1-hour aggregates from closed 1-minute aggregates for the given family spans. Editors and above. Use after readings.insertExact with rebuildParents false.
readings.segmentsQuery10Sampled readings for a chart: the latest reading in each of segmentCount equal segments of the window, plus one segment of the same width just before it. Any workspace member.
readings.timeExtentQuery10Earliest and latest reading times across the given parameter ids; from/to are null when none has readings. Any workspace member.
registration.acceptInvitationMutation3Accept a workspace invitation for the current verified email.
registration.providersQuery0List configured social authentication providers.
registration.redeemMutation3Redeem an access code for the current verified account.
registration.resolveQuery0Validate a registration invitation or access code.
report.comment.createMutation3Create a report comment or signature on a preset (operators and above). The server sets the author and timestamps; digitalSignature is always null in the response.
report.comment.deleteMutation3Delete a report comment. Editors may delete any including signatures. Operators may delete only their own non-signature comments created after the latest signature on that preset.
report.comment.listQuery2List all comments on a report preset (createdAt then id). digitalSignature is always null. Also returns viewerAccountId and authors [{accountId, name}] for authors whose accounts still exist.
report.preset.createMutation5Create a history report preset from parameter snapshots (made with report.preset.freezeFromLive), representations, and layout. Omitted page options take the Setup defaults.
report.preset.createTemporaryMutation3Create a temporary report in the cloud app from up to 20 parameter ids (operators and above); missing or unsupported ids are skipped. It has a chart, hourly or daily time buckets for numeric parameters (averages; differences for counterParameterIds), and a table. cadence 1h (default) covers the last day, 1d the last 31 days. Report lists show it after report.preset.saveTemporary.
report.preset.deleteMutation5Permanently delete a report preset.
report.preset.freezeFromLiveQuery2Turn workspace parameters into report parameter snapshots (value type, label, units, default display settings) for report.preset.create. Missing parameters and unsupported value types are returned as skipped. At most 100 distinct ids. Any workspace member.
report.preset.getQuery1.5Get one report preset with parameter snapshots.
report.preset.listQuery2List report presets (id, title, description, updatedAt).
report.preset.listByParameterIdsQuery2List report presets that currently snapshot any of the given live parameter ids (to check before parameter.deleteSelection). Takes parameter ids, not branch ids. Returns each preset’s id and title once, oldest first; empty or unknown ids return []. Any workspace member.
report.preset.saveTemporaryMutation5Save a temporary report preset in the catalog, keeping the same id. Editor, admin or owner. Send the full recipe. Recipe and status changes are atomic. Without baseRevision, a retry after success returns the current permanent report unchanged; with it, a save after the preset changed fails with setup_conflict.
report.preset.updateMutation5Update a report preset (recipe + parameter snapshots replaced atomically).
report.render.uploadMutation10Upload a rendered report file.
security.overviewQuery2Inspect your sign-in methods, active sessions, and account deletion impact.
storage.alarmLogDeletePreviewQuery10Count the alarm log events before before (at least 30 days ago) a deletion would remove. Editors and above.
storage.deleteAlarmLogMutation20Start deleting alarm log events before before (at least 30 days ago), irreversibly. Active alarms are not affected. Returns a jobId; the deletion is audited. Admins and owners.
storage.deleteHistoryMutation20Start deleting activity history before before (at least 30 days ago), irreversibly. What rebuilds setup at retained checkpoints is kept. Returns a jobId; the deletion is audited. Admins and owners.
storage.deleteReadingsMutation20Start deleting readings, irreversibly: of every parameter (scope workspace, deleted parameters included) or listed ones, from from until to (exclusive, epoch ms, required, at least five minutes ago: pass the preview’s until). Aggregates stay consistent. Returns a jobId; audited; a checkpoint revert does not restore readings. Admins and owners.
storage.deleteRetentionOverrideMutation3Delete a readings retention override; its parameters and branches follow the retention they inherit again: an override of a branch above them, else the default. Older readings may then be deleted within the hour. Admins and owners.
storage.historyDeletePreviewQuery10Count the activity history records before before (at least 30 days ago) a deletion would remove. Editors and above.
storage.readingsDeletePreviewQuery10Count the readings a deletion would remove: of every parameter (scope workspace, deleted parameters included) or of listed ones, from from (inclusive) until to (exclusive, epoch ms; omit either for no bound); the last five minutes are always kept. Editors and above.
storage.retentionQuery2Retention of a workspace: days to keep readings by default (null keeps all), days to keep activity history and the alarm log, and overrides listing parameters and branches with their own readings retention. A parameter listed directly beats its branches; a nearer branch beats an ancestor; deleted parameters follow the default. Editors and above.
storage.retentionPreviewQuery10Records a proposed retention would delete on its next run (hourly, cutoffs at UTC midnight), before saving it. Editors and above.
storage.saveRetentionOverrideMutation5Create a readings retention override, or replace the one overrideId names: keepDays (null keeps everything) for the listed parameters and branches. Each parameter and branch may be in one override only. Older readings are deleted within the hour, irreversibly. Admins and owners.
storage.setRetentionDefaultsMutation3Set the default readings retention, the activity history retention and/or the alarm log retention (both at least 30 days) in days; null keeps everything. Older data is deleted within the hour, irreversibly. Admins and owners.
storage.usageQuery10Stored data of a workspace: totals as billed for the newest hour (billedAt), and a breakdown measured at most an hour ago: readings records per parameter with oldest and newest reading (deleted parameters marked live false, with their last recorded name), activity history records, alarm log events, and file bytes per area. Editors and above.
templates.automation.getQuery0One starter with its placeholders in form order: name, kind (parameter, endpoint, alarmRule, number, duration in ms, timeOfDay HH:MM, weekdays 1-7, severity, recipients, boolean, choice, text, or list of rows of those), bounds, default and whether it is optional.
templates.automation.instantiateQuery2Build a starter’s automation or alarm rule document from placeholder values (by name; a list takes an array of rows), checked against the workspace. Returns { ok: true, kind, document, diagnostics } to save with automation.create or alarmRule.create, or { ok: false, problems } with a JSON pointer into values for each. Saves nothing.
templates.automation.listQuery0List starter automations and alarm rules (id, kind automation or alarmRule, name, description, summary), with optional filters combined with AND: kind; query (case-insensitive substring of id, names and summary). Read one with templates.automation.get for its placeholders.
templates.dashboard.getQuery0One dashboard template: long description, supportedLocales, parameterTemplates, pages (subpages in tab order, or null) and configSchema (JSON Schema of dashboard.create’s configuration).
templates.dashboard.listQuery0List dashboard templates (id, name, summary, kind, icon, visibility), with optional filters combined with AND: kind; parameterTemplate (exact parameter template id a device preset is built for); query (case-insensitive substring of id, names and summary). Read one with templates.dashboard.get before using its id as dashboard.create’s template.
templates.edgeProgram.getQuery0One starter edge program with its placeholders in form order: name, kind (fileName, parameter of the MC252 endpoint, branch, number, duration in ms, timeOfDay HH:MM on the device clock, weekdays 1-7, boolean, choice, text, phone, or list of rows of those), bounds, default and whether it is optional.
templates.edgeProgram.instantiateQuery2Build a starter edge program for an MC252 endpoint from placeholder values (by name; a list takes an array of rows), checked against the device. Returns { ok: true, fileName, description, source, parameters, diagnostics }: save the program with edgeProgram.create, then each parameter with parameter.create. Or { ok: false, problems } with a JSON pointer into values for each. Saves nothing.
templates.edgeProgram.listQuery0List starter edge programs for MC252 controllers (id, name, description, summary), with an optional query (case-insensitive substring of id, names and summary). Read one with templates.edgeProgram.get for its placeholders.
templates.parameter.listQuery2List device parameter templates: id, title, default unit id, and origin. templates.parameter.stamp creates parameters from one.
templates.parameter.stampMutation5Create a template parameter/branch tree on an existing endpoint. Optional unitId, parentBranchId.
workspace.automationLimitsQuery1Get the workspace’s automation limits: maxStepsPerRun, minTriggerIntervalMs, maxWritesPerMinute.
workspace.branding.getQuery1.5Get workspace logo and favicon files and content revisions.
workspace.branding.setMutation3Upload or remove a workspace logo or favicon. Admins and owners only.
workspace.checkpoint.createMutation5Take a named checkpoint of the workspace’s current setup, with an optional reason. Editors, admins and owners only.
workspace.checkpoint.deleteMutation3Delete a named checkpoint. Automatic checkpoints are deleted when they age out. Editors, admins and owners only.
workspace.checkpoint.listQuery2List workspace setup checkpoints, newest first: the important kinds (named, before push, assistant changes, template, import, revert) by default, or every kind with scope ‘all’. Editors, admins and owners only.
workspace.checkpoint.renameMutation3Rename a named checkpoint. Automatic checkpoints have no name. Editors, admins and owners only.
workspace.checkpoint.revertMutation20Revert the workspace setup exactly to a checkpoint (checkpointId) or a moment (at) as a new revision, after a ‘before revert’ checkpoint. Restores entities with their ids, PIN endpoints included, files and const values. Pass a presence proof in devices for each MC252 revertPreview lists. Fails with checkpoint_revert_conflict unless still at expectedRevision. Editors, admins and owners only.
workspace.checkpoint.revertPreviewQuery20Preview reverting the workspace setup to a checkpoint (checkpointId) or a moment (at, ISO date-time): what it creates, updates and deletes, where const values come from, deleted MC252 devices to confirm on site (with their PINs), and entities that block an exact restore. Pass the returned revision to revert as expectedRevision. Editors, admins and owners only.
workspace.checkpoint.summaryQuery10List the setup entities created, updated and deleted after a checkpoint, up to the next checkpoint in the scope or the current setup. Editors, admins and owners only.
workspace.createMutation3Create a new owned workspace.
workspace.deleteMutation20Permanently delete a workspace.
workspace.deleteCliKeyMutation3Delete a workspace CLI API key by id: anyone’s for admins and owners, their own for editors.
workspace.getQuery1Get one workspace.
workspace.inviteMutation3Invite a user to a workspace (admins and owners).
workspace.leaveMutation3Leave a workspace as a non-owner member.
workspace.listQuery2List workspaces for the current user.
workspace.listCliKeysQuery2List the workspace API keys that hmi pull created for a workspace: everyone’s for admins and owners, their own for editors.
workspace.membersQuery2List workspace members and pending invitations (admins and owners).
workspace.mintPullTokenMutation0Mint a one-time token for CLI workspace pull.
workspace.missingBlobsQuery2List which file content hashes must be uploaded before a CLI push can reference them.
workspace.pullQuery20Pull a workspace snapshot for CLI sync.
workspace.pushMutation20Push a workspace snapshot from CLI sync. Renaming the workspace or changing its logo or favicon needs an admin or owner (push_admin_required).
workspace.pushCommitMutation20Apply the parts of a staged CLI push as one push.
workspace.pushStageMutation5Stage one part of a CLI push too large for one request; workspace.pushCommit applies the parts.
workspace.redeemPullTokenMutation0Redeem a single-use pull token and create a CLI API key.
workspace.removeMemberMutation3Remove a workspace member (admins and owners).
workspace.renameMutation3Rename a workspace (admins and owners).
workspace.resendInvitationMutation3Resend a pending workspace invitation (admins and owners).
workspace.revokeInvitationMutation3Revoke a pending workspace invitation (admins and owners).
workspace.setAutomationLimitsMutation5Set the automation limits every automation is checked against (admins and owners). Automations over the new limits are listed in overLimit; they stay as they are and must be brought within the limits when saved.
workspace.updateMemberMutation3Change a workspace member role (admins and owners).
workspace.updateSettingsMutation3Update the workspace timezone and optional location (editors, admins and owners).
workspace.uploads.deleteMutation5Delete a top-level file or directory under uploads/ (editors and above).
workspace.uploads.ingestMutation10Start processing a PDF or Excel file into uploads/-ingested/. Returns once the job is accepted. Editors and above.
workspace.uploads.listQuery5List top-level files and directories under uploads/ (editors and above).
workspace.watchChangesSubscription0Subscribe to one workspace’s setup revision, name, disabled state and your access. The first event and any event after missed changes have type resync.

Kind: Mutation

Weight: 3

Dismiss a notification that must be dismissed.

Access

Signed-in browser session; API keys are not accepted. Applies to the authenticated account’s own notifications.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
notificationId: string;
};

Output

type Output = {
success: true;
};

Kind: Query

Weight: 5

List your in-app notifications, newest first, optionally by workspace and severity.

Access

Signed-in browser session; API keys are not accepted. Applies to the authenticated account’s own notifications.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceIds?: string[];
severities?: ("info" | "urgent" | "warning")[];
cursor?: {
createdAt: string;
id: string;
};
limit?: number;
};

Output

type Output = {
entries: {
workspaceId: string | null;
workspaceName: string | null;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<
string,
| {
type: "text";
value: string;
}
| {
type: "number";
value: number;
fractionDigits?: number;
unit?: string;
}
| {
type: "time";
value: string;
}
| {
type: "localized";
value: string | Record<string, string>;
}
>;
};
link: string | null;
id: string;
notificationId: string;
createdAt: string;
mustDismiss: boolean;
expiresAt: string | null;
read: boolean;
dismissState: "dismissed" | "expired" | "pending" | "withdrawn" | null;
dismissedAt: string | null;
}[];
nextCursor: {
createdAt: string;
id: string;
} | null;
};

Kind: Mutation

Weight: 5

Mark notifications up to the newest one shown read.

Access

Signed-in browser session; API keys are not accepted. Applies to the authenticated account’s own notifications.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
through: string;
};

Output

type Output = {
success: true;
};

Kind: Mutation

Weight: 3

Mark one notification read.

Access

Signed-in browser session; API keys are not accepted. Applies to the authenticated account’s own notifications.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
notificationId: string;
};

Output

type Output = {
success: true;
};

Kind: Subscription

Weight: 0

Subscribe to your unread count, newest notification time and banners. The first event and any event after missed changes have type resync.

Access

Signed-in browser session; API keys are not accepted. Applies to the authenticated account’s own notifications.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = AsyncIterable<
{
type: "changed" | "resync";
unreadCount: number;
newestAt: string | null;
banners: {
workspaceId: string | null;
workspaceName: string | null;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<
string,
| {
type: "text";
value: string;
}
| {
type: "number";
value: number;
fractionDigits?: number;
unit?: string;
}
| {
type: "time";
value: string;
}
| {
type: "localized";
value: string | Record<string, string>;
}
>;
};
link: string | null;
notificationId: string;
createdAt: string;
expiresAt: string | null;
}[];
bannerCount: number;
},
void,
any
>;

Kind: Query

Weight: 3

Get the current account profile and onboarding state.

Access

Signed-in browser session; API keys are not accepted. Applies to the authenticated account.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
name: string;
companyName: string | null;
position: "engineering" | "management" | "operations" | "other" | "system_integration" | null;
applicationArea:
| "agriculture"
| "building_automation"
| "data_centers_telecom"
| "energy_power"
| "environmental_monitoring"
| "equipment_machinery"
| "food_beverage"
| "hvac"
| "manufacturing"
| "mining_metals"
| "oil_gas_chemicals"
| "other"
| "refrigeration_cold_chain"
| "system_integration"
| "transport_logistics"
| "water_wastewater"
| null;
onboardingComplete: boolean;
admitted: boolean;
inviteOnly: boolean;
betaAcknowledged: boolean;
};

Kind: Query

Weight: 1

List login methods connected to the current account.

Access

Signed-in browser session; API keys are not accepted. Applies to the authenticated account.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
google: boolean;
github: boolean;
};

Kind: Mutation

Weight: 3

Save the current account profile and complete onboarding.

Access

Signed-in browser session; API keys are not accepted. Applies to the authenticated account.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
timezone?: string;
locale?: "de" | "en" | "pl" | "ru" | "uk";
name: string;
companyName: string;
betaAcknowledged?: boolean;
position?: "engineering" | "management" | "operations" | "other" | "system_integration";
applicationArea?:
| "agriculture"
| "building_automation"
| "data_centers_telecom"
| "energy_power"
| "environmental_monitoring"
| "equipment_machinery"
| "food_beverage"
| "hvac"
| "manufacturing"
| "mining_metals"
| "oil_gas_chemicals"
| "other"
| "refrigeration_cold_chain"
| "system_integration"
| "transport_logistics"
| "water_wastewater";
};

Output

type Output = {
name: string;
companyName: string | null;
position: "engineering" | "management" | "operations" | "other" | "system_integration" | null;
applicationArea:
| "agriculture"
| "building_automation"
| "data_centers_telecom"
| "energy_power"
| "environmental_monitoring"
| "equipment_machinery"
| "food_beverage"
| "hvac"
| "manufacturing"
| "mining_metals"
| "oil_gas_chemicals"
| "other"
| "refrigeration_cold_chain"
| "system_integration"
| "transport_logistics"
| "water_wastewater"
| null;
onboardingComplete: boolean;
admitted: boolean;
inviteOnly: boolean;
betaAcknowledged: boolean;
};

Kind: Mutation

Weight: 3

Acknowledge an alarm with an optional comment (operators and above). A pending notification about it is cancelled; a cleared alarm leaves the active alarms.

Access

Workspace operator, editor, admin, or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AlarmAcknowledgeInput;

Output

type Output = Alarm;

Shared types: Alarm, AlarmAcknowledgeInput

Kind: Query

Weight: 2

List a workspace’s active alarms, and cleared latching ones still waiting for acknowledgement: source, key, severity, message, the parameters its rule or automation reads, and when and by whom they were raised, cleared, acknowledged or shelved.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = Alarm[];

Shared types: Alarm

Kind: Query

Weight: 2

Page through a workspace’s alarm log, newest first: every raise, clear, acknowledgement, shelf and removal, with who did it and why. Filter by time, severity, event kind, source or one alarm. Recent changes appear after a short shipping delay.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AlarmLogInput;

Output

type Output = AlarmLogOutput;

Shared types: AlarmLogInput, AlarmLogOutput

Kind: Mutation

Weight: 3

Shelve an alarm for a duration (1 minute to 7 days) with a reason (operators and above). It does not notify until the shelf ends; shelving again replaces the shelf.

Access

Workspace operator, editor, admin, or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AlarmShelveInput;

Output

type Output = Alarm;

Shared types: Alarm, AlarmShelveInput

Kind: Mutation

Weight: 3

End an alarm’s shelf before it is over (operators and above). An alarm still active and unacknowledged notifies at once.

Access

Workspace operator, editor, admin, or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AlarmUnshelveInput;

Output

type Output = Alarm;

Shared types: Alarm, AlarmUnshelveInput

Kind: Subscription

Weight: 0

Subscribe to a workspace’s active alarms. Every event carries the whole list alarm.list returns, and whether the workspace raises alarms at all (an enabled alarm rule, an enabled automation with a raiseAlarm step, or an active alarm); the first is sent at once.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = AsyncIterable<
{
alarms: {
id: string;
workspaceId: string;
source:
| {
kind: "alarm_rule";
alarmRuleId: string;
}
| {
kind: "automation";
automationId: string;
};
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params: Record<
string,
{
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
value: string | number | boolean | null;
}
>;
};
latching: boolean;
raisedAt: string;
clearedAt: string | null;
acknowledgedAt: string | null;
acknowledgedBy: string | null;
acknowledgedByName: string | null;
acknowledgeComment: string | null;
shelvedUntil: string | null;
shelvedBy: string | null;
shelvedByName: string | null;
shelveReason: string | null;
parameterIds: string[];
}[];
configured: boolean;
},
void,
any
>;

Kind: Mutation

Weight: 5

Create an alarm rule from its JSON document (condition, hold times, severity, message, recipients). Rejected with automation_invalid and the diagnostics when it has errors. Editors, admins and owners.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AlarmRuleCreateInput;

Output

type Output = AlarmRuleWriteOutput;

Shared types: AlarmRuleCreateInput, AlarmRuleWriteOutput

Kind: Mutation

Weight: 5

Delete an alarm rule. Refused with alarm_rule_in_use while an automation refers to it.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
deletedId: string;
};

Kind: Query

Weight: 5

Get an alarm rule: its JSON document and validator diagnostics.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = AlarmRuleDetail;

Shared types: AlarmRuleDetail

Kind: Query

Weight: 5

List the alarm rules of a workspace (or those one dashboard owns): name, severity, owning dashboard, disabledSince, and validator error/warning counts.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
dashboardId?: string;
};

Output

type Output = {
items: {
id: string;
workspaceId: string;
revision: number;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
dashboardId: string | null;
disabledSince: string | null;
errorCount: number;
warningCount: number;
createdAt: string;
updatedAt: string;
severity: "info" | "urgent" | "warning";
}[];
};

Kind: Mutation

Weight: 5

Disable or enable an alarm rule. A disabled rule never raises alarms; enabling one with errors is refused.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
disabled: boolean;
baseRevision?: number;
};

Output

type Output = AlarmRuleWriteOutput;

Shared types: AlarmRuleWriteOutput

Kind: Mutation

Weight: 5

Replace an alarm rule’s document or owning dashboard. Rejected with automation_invalid when the new document has errors.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AlarmRuleUpdateInput;

Output

type Output = AlarmRuleWriteOutput;

Shared types: AlarmRuleUpdateInput, AlarmRuleWriteOutput

Kind: Mutation

Weight: 5

Check an alarm rule document as alarmRule.create (or alarmRule.update with id) would, without saving it. Any JSON is accepted; a wrong shape is reported as invalid_shape. Returns ok, the diagnostics (errors, then warnings), and in others the errors the save would give automations that refer to it; maxSteps is null.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
id?: string;
document: unknown;
};

Output

type Output = {
ok: boolean;
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
maxSteps: number | null;
others: {
entityType: "alarm_rule" | "automation";
id: string;
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
}[];
};

Kind: Mutation

Weight: 3

Stop everything the assistant runs in a chat, with an id the caller chooses for the Stop. Always allowed.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
chatId: string;
id: string;
};

Output

type Output = {
stopGeneration: number;
};

Kind: Mutation

Weight: 3

Send a message to an assistant chat: to the run that has the chat, or as a new run (in the running-chats quota).

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
id: string;
chatId: string;
message: {
level: "free" | "pro" | "standard";
chatLevel?: "free" | "pro" | "standard";
content: string;
context: {
origin?: string;
pathname: string;
locale: string;
workspaceId: string | null;
workspaceName: string | null;
dashboardId: string | null;
dashboardName: string | null;
endpointId: string | null;
endpointName: string | null;
parameterId: string | null;
parameterName: string | null;
timeZone?: string;
now?: string;
};
pickedElements?: {
id: number;
label: string;
tag: string;
role: string | null;
ariaLabel: string | null;
text: string;
box: {
top: number;
left: number;
width: number;
height: number;
};
html: string;
contextAttrs: Record<string, string>;
dashboardComponents: string[];
}[];
images?: {
id: string;
mediaType: "image/jpeg" | "image/png" | "image/webp";
data: string;
caption?: string;
}[];
files?: {
kind: "dir" | "file";
name: string;
}[];
imageUploads?: {
imageId: string;
name: string;
}[];
};
stopGeneration: number;
replaces?: string[];
};

Output

type Output = {
result: "held" | "queued" | "refused" | "removed" | "stored" | "waiting";
};

Kind: Mutation

Weight: 3

Interrupt the background job the assistant waits for.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
id: string;
jobWaitId: string;
};

Output

type Output = {
ok: true;
};

Kind: Mutation

Weight: 3

Continue the assistant’s run that stopped short in a chat.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
id: string;
chatId: string;
runId: string;
stopGeneration: number;
level: "free" | "pro" | "standard";
chatLevel?: "free" | "pro" | "standard";
};

Output

type Output = {
ok: true;
};

Kind: Mutation

Weight: 3

Create a new assistant chat with an id the caller chooses.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
id: string;
level: "free" | "pro" | "standard";
};

Output

type Output = {
id: string;
title: string;
autoAllowCategories: (
| "device_writes"
| "historical_data_changes"
| "internet_access"
| "setup_changes"
| "working_copies"
)[];
level: "free" | "pro" | "standard";
run: {
id: string;
status: "ended" | "running" | "starting" | "waiting";
reason:
"authority_lost" | "interrupted" | "provider_error" | "request_error" | "user_stop" | null;
error: string | null;
level: "free" | "pro" | "standard";
} | null;
stopGeneration: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 5

Delete an assistant chat; whatever runs in it stops.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
id: string;
};

Output

type Output = {
ok: true;
};

Kind: Query

Weight: 1

Get the guard the assistant waits on in a chat: a repeated step or the spending cap.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
chatId: string;
};

Output

type Output = {
guard: {
id: string;
chatId: string;
trip:
| {
reason: "repeated_steps";
repeats: number;
tools: string[];
costEur: number;
}
| {
reason: "spending_cap";
capEur: number;
costEur: number;
};
} | null;
};

Kind: Query

Weight: 1

Get the background job the assistant waits for in a chat.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
chatId: string;
};

Output

type Output = {
jobWait: {
id: string;
chatId: string;
jobId: string;
path: string;
toolCallId: string;
status: "pending" | "resuming";
} | null;
};

Kind: Query

Weight: 1

Get the confirmation card the assistant waits on in a chat.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
chatId: string;
};

Output

type Output = {
proposal: {
id: string;
chatId: string;
kind: "api_call" | "report_issue" | "web_fetch" | "workspace_commit" | "workspace_open";
review: {
action:
| "alarmRule.create"
| "alarmRule.delete"
| "alarmRule.setDisabled"
| "alarmRule.update"
| "automation.create"
| "automation.delete"
| "automation.setDisabled"
| "automation.update"
| "billing.accounts.rename"
| "billing.accounts.setAlerts"
| "billing.members.add"
| "billing.members.remove"
| "billing.members.setRole"
| "billing.topUps.checkout"
| "billing.vouchers.redeem"
| "billing.workspace.move"
| "dashboard.configuration.patch"
| "dashboard.copy"
| "dashboard.create"
| "dashboard.delete"
| "dashboard.disable"
| "dashboard.enable"
| "dashboard.reorder"
| "dashboard.update"
| "device.api.invoke"
| "edgeProgram.create"
| "edgeProgram.delete"
| "edgeProgram.syncNow"
| "edgeProgram.update"
| "edgeProgram.updateSettings"
| "endpoint.create"
| "endpoint.delete"
| "endpoint.disable"
| "endpoint.disconnectOtherWorkspaces"
| "endpoint.enable"
| "endpoint.update"
| "graphics.save"
| "helpdesk.reportIssue"
| "notifications.confirmPhone"
| "notifications.disconnectTelegram"
| "notifications.removePhone"
| "notifications.requestPhoneCode"
| "notifications.saveChannel"
| "notifications.saveLocalization"
| "notifications.saveSmsCap"
| "notifications.setWorkspaceMute"
| "parameter.create"
| "parameter.createBranch"
| "parameter.deleteSelection"
| "parameter.update"
| "parameter.updateBranch"
| "parameter.upsertConstValues"
| "parameter.writeValues"
| "problemReport.submit"
| "readings.clearRange"
| "readings.insertExact"
| "readings.rebuildParentRollups"
| "report.comment.create"
| "report.comment.delete"
| "report.preset.create"
| "report.preset.delete"
| "report.preset.saveTemporary"
| "report.preset.update"
| "storage.deleteAlarmLog"
| "storage.deleteHistory"
| "storage.deleteReadings"
| "storage.deleteRetentionOverride"
| "storage.saveRetentionOverride"
| "storage.setRetentionDefaults"
| "templates.parameter.stamp"
| "web.fetch"
| "workspace.branding.set"
| "workspace.checkpoint.delete"
| "workspace.checkpoint.revert"
| "workspace.commitSandbox"
| "workspace.create"
| "workspace.delete"
| "workspace.deleteCliKey"
| "workspace.openSandbox"
| "workspace.rename"
| "workspace.setAutomationLimits"
| "workspace.updateSettings"
| "workspace.uploads.delete"
| "workspace.uploads.ingest";
json: {
action:
| "alarmRule.create"
| "alarmRule.delete"
| "alarmRule.setDisabled"
| "alarmRule.update"
| "automation.create"
| "automation.delete"
| "automation.setDisabled"
| "automation.update"
| "billing.accounts.rename"
| "billing.accounts.setAlerts"
| "billing.members.add"
| "billing.members.remove"
| "billing.members.setRole"
| "billing.topUps.checkout"
| "billing.vouchers.redeem"
| "billing.workspace.move"
| "dashboard.configuration.patch"
| "dashboard.copy"
| "dashboard.create"
| "dashboard.delete"
| "dashboard.disable"
| "dashboard.enable"
| "dashboard.reorder"
| "dashboard.update"
| "device.api.invoke"
| "edgeProgram.create"
| "edgeProgram.delete"
| "edgeProgram.syncNow"
| "edgeProgram.update"
| "edgeProgram.updateSettings"
| "endpoint.create"
| "endpoint.delete"
| "endpoint.disable"
| "endpoint.disconnectOtherWorkspaces"
| "endpoint.enable"
| "endpoint.update"
| "graphics.save"
| "helpdesk.reportIssue"
| "notifications.confirmPhone"
| "notifications.disconnectTelegram"
| "notifications.removePhone"
| "notifications.requestPhoneCode"
| "notifications.saveChannel"
| "notifications.saveLocalization"
| "notifications.saveSmsCap"
| "notifications.setWorkspaceMute"
| "parameter.create"
| "parameter.createBranch"
| "parameter.deleteSelection"
| "parameter.update"
| "parameter.updateBranch"
| "parameter.upsertConstValues"
| "parameter.writeValues"
| "problemReport.submit"
| "readings.clearRange"
| "readings.insertExact"
| "readings.rebuildParentRollups"
| "report.comment.create"
| "report.comment.delete"
| "report.preset.create"
| "report.preset.delete"
| "report.preset.saveTemporary"
| "report.preset.update"
| "storage.deleteAlarmLog"
| "storage.deleteHistory"
| "storage.deleteReadings"
| "storage.deleteRetentionOverride"
| "storage.saveRetentionOverride"
| "storage.setRetentionDefaults"
| "templates.parameter.stamp"
| "web.fetch"
| "workspace.branding.set"
| "workspace.checkpoint.delete"
| "workspace.checkpoint.revert"
| "workspace.commitSandbox"
| "workspace.create"
| "workspace.delete"
| "workspace.deleteCliKey"
| "workspace.openSandbox"
| "workspace.rename"
| "workspace.setAutomationLimits"
| "workspace.updateSettings"
| "workspace.uploads.delete"
| "workspace.uploads.ingest";
input: unknown;
};
severity: "destructive" | "warning";
subject: {
kind:
| "alarm_rule"
| "automation"
| "billing_account"
| "branch"
| "checkpoint"
| "cli_key"
| "comment"
| "dashboard"
| "endpoint"
| "file"
| "parameter"
| "reading"
| "report"
| "template"
| "ticket"
| "upload"
| "url"
| "workspace";
id: string | null;
name: string | Record<string, string>;
path: (string | Record<string, string>)[];
units: string | Record<string, string> | null;
unnamedPersonal?: boolean;
} | null;
facts: {
key:
| "alarmLogKeepDays"
| "alertBelowEur"
| "alertDaysLeft"
| "allowAddComments"
| "allowRender"
| "allowSigning"
| "amountEur"
| "auditKeepDays"
| "author"
| "autoSync"
| "backgroundReadingPeriodMs"
| "baseRevision"
| "before"
| "body"
| "branch"
| "branches"
| "bytes"
| "calculatedVariables"
| "category"
| "channel"
| "clearCondition"
| "clearHoldMs"
| "code"
| "condition"
| "configuration"
| "content"
| "createdAt"
| "currentRevision"
| "dashboard"
| "dashboards"
| "defaultTimeRange"
| "description"
| "deviceLogging"
| "disabledSince"
| "displayCommentsSummary"
| "distributionFiles"
| "email"
| "enabled"
| "endpoint"
| "endpoints"
| "exportToCsv"
| "family"
| "fileCount"
| "fileDeletes"
| "fileName"
| "fileUpserts"
| "from"
| "holdMs"
| "hostname"
| "icon"
| "immutableTimeRange"
| "ingest"
| "input"
| "isSignature"
| "isTemporary"
| "keepDays"
| "kind"
| "lastRequest"
| "lat"
| "latching"
| "layout"
| "locale"
| "lon"
| "maxStepsPerRun"
| "maxWritesPerMinute"
| "message"
| "minRunIntervalMs"
| "minSeverity"
| "minTriggerIntervalMs"
| "mnemonic"
| "monthlyCapEur"
| "muted"
| "name"
| "notifyDelayMs"
| "onInit"
| "op"
| "operation"
| "parameters"
| "parent"
| "path"
| "phone"
| "pollIntervalMs"
| "port"
| "position"
| "previewVerified"
| "procedures"
| "rawHex"
| "readingsKeepDays"
| "readingsPullMinutes"
| "recipients"
| "replacedWorkspace"
| "report"
| "reports"
| "repr"
| "representation"
| "representations"
| "role"
| "rootBranch"
| "settings"
| "severity"
| "showEditButton"
| "size"
| "source"
| "sourceBytes"
| "sourceFiles"
| "sourceValueType"
| "storedValue"
| "tags"
| "time"
| "timezone"
| "title"
| "to"
| "triggers"
| "type"
| "unavailableAfterMs"
| "unitId"
| "units"
| "updatedAt"
| "uploads"
| "url"
| "user"
| "value"
| "valueType"
| "variables"
| "workspace"
| "writeLimit";
value:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
}[];
changes: {
field:
| "alarmLogKeepDays"
| "alertBelowEur"
| "alertDaysLeft"
| "allowAddComments"
| "allowRender"
| "allowSigning"
| "amountEur"
| "auditKeepDays"
| "author"
| "autoSync"
| "backgroundReadingPeriodMs"
| "baseRevision"
| "before"
| "body"
| "branch"
| "branches"
| "bytes"
| "calculatedVariables"
| "category"
| "channel"
| "clearCondition"
| "clearHoldMs"
| "code"
| "condition"
| "configuration"
| "content"
| "createdAt"
| "currentRevision"
| "dashboard"
| "dashboards"
| "defaultTimeRange"
| "description"
| "deviceLogging"
| "disabledSince"
| "displayCommentsSummary"
| "distributionFiles"
| "email"
| "enabled"
| "endpoint"
| "endpoints"
| "exportToCsv"
| "family"
| "fileCount"
| "fileDeletes"
| "fileName"
| "fileUpserts"
| "from"
| "holdMs"
| "hostname"
| "icon"
| "immutableTimeRange"
| "ingest"
| "input"
| "isSignature"
| "isTemporary"
| "keepDays"
| "kind"
| "lastRequest"
| "lat"
| "latching"
| "layout"
| "locale"
| "lon"
| "maxStepsPerRun"
| "maxWritesPerMinute"
| "message"
| "minRunIntervalMs"
| "minSeverity"
| "minTriggerIntervalMs"
| "mnemonic"
| "monthlyCapEur"
| "muted"
| "name"
| "notifyDelayMs"
| "onInit"
| "op"
| "operation"
| "parameters"
| "parent"
| "path"
| "phone"
| "pollIntervalMs"
| "port"
| "position"
| "previewVerified"
| "procedures"
| "rawHex"
| "readingsKeepDays"
| "readingsPullMinutes"
| "recipients"
| "replacedWorkspace"
| "report"
| "reports"
| "repr"
| "representation"
| "representations"
| "role"
| "rootBranch"
| "settings"
| "severity"
| "showEditButton"
| "size"
| "source"
| "sourceBytes"
| "sourceFiles"
| "sourceValueType"
| "storedValue"
| "tags"
| "time"
| "timezone"
| "title"
| "to"
| "triggers"
| "type"
| "unavailableAfterMs"
| "unitId"
| "units"
| "updatedAt"
| "uploads"
| "url"
| "user"
| "value"
| "valueType"
| "variables"
| "workspace"
| "writeLimit";
before:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
after:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
}[];
items: {
target: {
kind:
| "alarm_rule"
| "automation"
| "billing_account"
| "branch"
| "checkpoint"
| "cli_key"
| "comment"
| "dashboard"
| "endpoint"
| "file"
| "parameter"
| "reading"
| "report"
| "template"
| "ticket"
| "upload"
| "url"
| "workspace";
id: string | null;
name: string | Record<string, string>;
path: (string | Record<string, string>)[];
units: string | Record<string, string> | null;
unnamedPersonal?: boolean;
};
facts: {
key:
| "alarmLogKeepDays"
| "alertBelowEur"
| "alertDaysLeft"
| "allowAddComments"
| "allowRender"
| "allowSigning"
| "amountEur"
| "auditKeepDays"
| "author"
| "autoSync"
| "backgroundReadingPeriodMs"
| "baseRevision"
| "before"
| "body"
| "branch"
| "branches"
| "bytes"
| "calculatedVariables"
| "category"
| "channel"
| "clearCondition"
| "clearHoldMs"
| "code"
| "condition"
| "configuration"
| "content"
| "createdAt"
| "currentRevision"
| "dashboard"
| "dashboards"
| "defaultTimeRange"
| "description"
| "deviceLogging"
| "disabledSince"
| "displayCommentsSummary"
| "distributionFiles"
| "email"
| "enabled"
| "endpoint"
| "endpoints"
| "exportToCsv"
| "family"
| "fileCount"
| "fileDeletes"
| "fileName"
| "fileUpserts"
| "from"
| "holdMs"
| "hostname"
| "icon"
| "immutableTimeRange"
| "ingest"
| "input"
| "isSignature"
| "isTemporary"
| "keepDays"
| "kind"
| "lastRequest"
| "lat"
| "latching"
| "layout"
| "locale"
| "lon"
| "maxStepsPerRun"
| "maxWritesPerMinute"
| "message"
| "minRunIntervalMs"
| "minSeverity"
| "minTriggerIntervalMs"
| "mnemonic"
| "monthlyCapEur"
| "muted"
| "name"
| "notifyDelayMs"
| "onInit"
| "op"
| "operation"
| "parameters"
| "parent"
| "path"
| "phone"
| "pollIntervalMs"
| "port"
| "position"
| "previewVerified"
| "procedures"
| "rawHex"
| "readingsKeepDays"
| "readingsPullMinutes"
| "recipients"
| "replacedWorkspace"
| "report"
| "reports"
| "repr"
| "representation"
| "representations"
| "role"
| "rootBranch"
| "settings"
| "severity"
| "showEditButton"
| "size"
| "source"
| "sourceBytes"
| "sourceFiles"
| "sourceValueType"
| "storedValue"
| "tags"
| "time"
| "timezone"
| "title"
| "to"
| "triggers"
| "type"
| "unavailableAfterMs"
| "unitId"
| "units"
| "updatedAt"
| "uploads"
| "url"
| "user"
| "value"
| "valueType"
| "variables"
| "workspace"
| "writeLimit";
value:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
}[];
changes: {
field:
| "alarmLogKeepDays"
| "alertBelowEur"
| "alertDaysLeft"
| "allowAddComments"
| "allowRender"
| "allowSigning"
| "amountEur"
| "auditKeepDays"
| "author"
| "autoSync"
| "backgroundReadingPeriodMs"
| "baseRevision"
| "before"
| "body"
| "branch"
| "branches"
| "bytes"
| "calculatedVariables"
| "category"
| "channel"
| "clearCondition"
| "clearHoldMs"
| "code"
| "condition"
| "configuration"
| "content"
| "createdAt"
| "currentRevision"
| "dashboard"
| "dashboards"
| "defaultTimeRange"
| "description"
| "deviceLogging"
| "disabledSince"
| "displayCommentsSummary"
| "distributionFiles"
| "email"
| "enabled"
| "endpoint"
| "endpoints"
| "exportToCsv"
| "family"
| "fileCount"
| "fileDeletes"
| "fileName"
| "fileUpserts"
| "from"
| "holdMs"
| "hostname"
| "icon"
| "immutableTimeRange"
| "ingest"
| "input"
| "isSignature"
| "isTemporary"
| "keepDays"
| "kind"
| "lastRequest"
| "lat"
| "latching"
| "layout"
| "locale"
| "lon"
| "maxStepsPerRun"
| "maxWritesPerMinute"
| "message"
| "minRunIntervalMs"
| "minSeverity"
| "minTriggerIntervalMs"
| "mnemonic"
| "monthlyCapEur"
| "muted"
| "name"
| "notifyDelayMs"
| "onInit"
| "op"
| "operation"
| "parameters"
| "parent"
| "path"
| "phone"
| "pollIntervalMs"
| "port"
| "position"
| "previewVerified"
| "procedures"
| "rawHex"
| "readingsKeepDays"
| "readingsPullMinutes"
| "recipients"
| "replacedWorkspace"
| "report"
| "reports"
| "repr"
| "representation"
| "representations"
| "role"
| "rootBranch"
| "settings"
| "severity"
| "showEditButton"
| "size"
| "source"
| "sourceBytes"
| "sourceFiles"
| "sourceValueType"
| "storedValue"
| "tags"
| "time"
| "timezone"
| "title"
| "to"
| "triggers"
| "type"
| "unavailableAfterMs"
| "unitId"
| "units"
| "updatedAt"
| "uploads"
| "url"
| "user"
| "value"
| "valueType"
| "variables"
| "workspace"
| "writeLimit";
before:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
after:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
}[];
}[];
consequences: {
code:
| "call_device_api"
| "clear_reading_ranges"
| "commit_workspace_files"
| "confirm_devices_on_site"
| "create_parameter_tree"
| "create_upload_ingest_job"
| "delete_activity_history"
| "delete_alarm_log"
| "delete_branches"
| "delete_checkpoint"
| "delete_dashboard_source"
| "delete_dashboards"
| "delete_endpoints"
| "delete_parameter_selection"
| "delete_parameters"
| "delete_report"
| "delete_report_comment"
| "delete_reports"
| "delete_stored_readings"
| "delete_upload"
| "delete_uploads"
| "disclose_url_to_web_fetch"
| "disconnect_endpoint"
| "insert_readings"
| "recalculate_interval_summaries"
| "replace_working_copy"
| "restart_device_programs"
| "restore_const_values"
| "retain_report_parameter_snapshots"
| "revert_setup_changes"
| "revoke_cli_access"
| "write_live_device_values";
count: number | null;
targets: {
kind:
| "alarm_rule"
| "automation"
| "billing_account"
| "branch"
| "checkpoint"
| "cli_key"
| "comment"
| "dashboard"
| "endpoint"
| "file"
| "parameter"
| "reading"
| "report"
| "template"
| "ticket"
| "upload"
| "url"
| "workspace";
id: string | null;
name: string | Record<string, string>;
path: (string | Record<string, string>)[];
units: string | Record<string, string> | null;
unnamedPersonal?: boolean;
}[];
}[];
};
status: "executing" | "pending";
} | null;
};

Kind: Query

Weight: 1

Get the question the assistant waits on in a chat.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
chatId: string;
};

Output

type Output = {
question: {
id: string;
chatId: string;
messageId: string;
toolCallId: string;
input: {
questions: {
id: string;
question: string;
multiple: boolean;
choices: {
id: string;
label: string;
description?: string;
}[];
recommendedChoiceId?: string;
}[];
};
status: "answered" | "cancelled" | "pending";
answers:
| {
questionId: string;
choiceIds: string[];
text: string;
}[]
| null;
} | null;
};

Kind: Query

Weight: 2

List assistant chats for the current user.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
chats: {
id: string;
title: string;
autoAllowCategories: (
| "device_writes"
| "historical_data_changes"
| "internet_access"
| "setup_changes"
| "working_copies"
)[];
level: "free" | "pro" | "standard";
run: {
id: string;
status: "ended" | "running" | "starting" | "waiting";
reason:
"authority_lost" | "interrupted" | "provider_error" | "request_error" | "user_stop" | null;
error: string | null;
level: "free" | "pro" | "standard";
} | null;
stopGeneration: number;
createdAt: string;
updatedAt: string;
}[];
};

Kind: Query

Weight: 5

List one page of an assistant chat’s messages: the newest page first, each page’s messages oldest first.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
chatId: string;
cursor?: {
createdAt: string;
id: string;
} | null;
};

Output

type Output = {
messages: {
questions?: {
id: string;
chatId: string;
messageId: string;
toolCallId: string;
input: {
questions: {
id: string;
question: string;
multiple: boolean;
choices: {
id: string;
label: string;
description?: string;
}[];
recommendedChoiceId?: string;
}[];
};
status: "answered" | "cancelled" | "pending";
answers:
| {
questionId: string;
choiceIds: string[];
text: string;
}[]
| null;
}[];
id: string;
chatId: string;
role: "assistant" | "user";
content: string;
interrupted?: boolean;
chargedEur: number | null;
contextTokens: number | null;
reasoningTokens: number | null;
toolActivity?:
| {
tool: string;
summaryCode: string;
params: Record<string, string>;
atLength?: number;
toolCallId?: string;
phase: "done" | "error" | "start";
}[]
| null;
images?: {
id: string;
mediaType: "image/jpeg" | "image/png" | "image/webp";
}[];
files?: {
kind: "dir" | "file";
name: string;
}[];
rewindable?: boolean;
createdAt: string;
}[];
payloadTokens: number | null;
nextCursor: {
createdAt: string;
id: string;
} | null;
olderMessagesUnavailable?: true;
};

Kind: Mutation

Weight: 3

Remove a queued message.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
id: string;
};

Output

type Output = {
ok: true;
};

Kind: Mutation

Weight: 3

Rename an assistant chat. A renamed chat keeps its title: the assistant no longer names it.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
id: string;
title: string;
};

Output

type Output = {
id: string;
title: string;
autoAllowCategories: (
| "device_writes"
| "historical_data_changes"
| "internet_access"
| "setup_changes"
| "working_copies"
)[];
level: "free" | "pro" | "standard";
run: {
id: string;
status: "ended" | "running" | "starting" | "waiting";
reason:
"authority_lost" | "interrupted" | "provider_error" | "request_error" | "user_stop" | null;
error: string | null;
level: "free" | "pro" | "standard";
} | null;
stopGeneration: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 3

Rewind an assistant chat to before one of the user’s messages (messageId), with an id the caller chooses: that message and the later ones leave the chat (kept for audit), and the message comes back for editing. Refused while the assistant works in the chat. Workspace setup is untouched; revert it with workspace.checkpoint.revert to a checkpoint rewindCheckpoints lists.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
id: string;
chatId: string;
messageId: string;
};

Output

type Output = {
message: {
content: string;
context: {
origin?: string;
pathname: string;
locale: string;
workspaceId: string | null;
workspaceName: string | null;
dashboardId: string | null;
dashboardName: string | null;
endpointId: string | null;
endpointName: string | null;
parameterId: string | null;
parameterName: string | null;
timeZone?: string;
now?: string;
};
pickedElements?: {
id: number;
label: string;
tag: string;
role: string | null;
ariaLabel: string | null;
text: string;
box: {
top: number;
left: number;
width: number;
height: number;
};
html: string;
contextAttrs: Record<string, string>;
dashboardComponents: string[];
}[];
images?: {
id: string;
mediaType: "image/jpeg" | "image/png" | "image/webp";
data: string;
caption?: string;
}[];
files?: {
kind: "dir" | "file";
name: string;
}[];
imageUploads?: {
imageId: string;
name: string;
}[];
};
stopGeneration: number;
};

Kind: Query

Weight: 3

List the workspaces whose setup the assistant changed in a chat since one of the user’s messages, each with the checkpoint taken before its first change: reverting to it undoes those changes and everything after them. Only workspaces the caller may revert.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
chatId: string;
messageId: string;
};

Output

type Output = {
checkpointsDeletedBefore: string | null;
workspaces: {
workspaceId: string;
workspaceName: string;
checkpointId: string;
createdAt: string;
}[];
};

Kind: Query

Weight: 2

Your assistant chats’ runs, waits and queued messages as the server sees them now, with the running-chats quota.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
};

Output

type Output = {
quota: {
limit: number;
used: number;
};
chats: {
id: string;
title: string;
stopGeneration: number;
agents: {
id: string;
kind: "child" | "root";
owner: "none" | "running" | "waiting";
ownerMine: boolean;
run: {
id: string;
status: "ended" | "running" | "starting" | "waiting";
reason:
| "authority_lost"
| "interrupted"
| "provider_error"
| "request_error"
| "user_stop"
| null;
error: string | null;
level: "free" | "pro" | "standard";
} | null;
pause: {
id: string;
kind: "ask_user" | "confirmation" | "guard" | "job_wait";
status: "executing" | "pending" | "resuming";
} | null;
runner: boolean;
}[];
}[];
messages: {
id: string;
chatId: string;
agentId: string;
content: string;
pickedElements: {
id: number;
label: string;
tag: string;
role: string | null;
ariaLabel: string | null;
text: string;
box: {
top: number;
left: number;
width: number;
height: number;
};
html: string;
contextAttrs: Record<string, string>;
dashboardComponents: string[];
}[];
images: {
id: string;
mediaType: "image/jpeg" | "image/png" | "image/webp";
caption?: string;
uploaded?: string;
}[];
files: {
kind: "dir" | "file";
name: string;
}[];
workspaceId: string | null;
status: "editing" | "held" | "pending" | "steering";
allowed: boolean;
mine: boolean;
createdAt: string;
}[];
};

Kind: Mutation

Weight: 2

Set the user’s assistant spending cap: a run pauses each time it costs this much more.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
capEur: number | null;
};

Output

type Output = {
capEur: number | null;
};

Kind: Query

Weight: 1

Get the user’s assistant spending cap.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
capEur: number | null;
};

Kind: Subscription

Weight: 0

Follow an assistant chat live: a snapshot of what its running agents show, then their step events.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
identity: {
userId: string;
sessionId: string | null;
};
chatId: string;
};

Output

type Output = AsyncIterable<
| {
type: "snapshot";
viewerId: string;
agents: {
agentId: string;
runId: string;
attemptId: string;
seq: number;
live: {
content: string;
toolActivity: {
tool: string;
summaryCode: string;
params: Record<string, string>;
atLength?: number;
toolCallId?: string;
phase: "done" | "error" | "start";
}[];
toolProgressByCallId: Record<string, number>;
thinkingTokens: number | null;
compacting: boolean;
contextTokens: number | null;
reasoningTokens: number | null;
};
}[];
}
| {
type: "event";
agentId: string;
runId: string;
attemptId: string;
seq: number;
event:
| {
type: "ask_user";
question: {
id: string;
chatId: string;
messageId: string;
toolCallId: string;
input: {
questions: {
id: string;
question: string;
multiple: boolean;
choices: {
id: string;
label: string;
description?: string;
}[];
recommendedChoiceId?: string;
}[];
};
status: "answered" | "cancelled" | "pending";
answers:
| {
questionId: string;
choiceIds: string[];
text: string;
}[]
| null;
};
}
| {
type: "user_message";
id: string;
chatId: string;
content: string;
images?: {
id: string;
mediaType: "image/jpeg" | "image/png" | "image/webp";
}[];
files?: {
kind: "dir" | "file";
name: string;
}[];
createdAt: string;
}
| {
type: "reasoning_progress";
tokens: number;
}
| {
type: "compacting";
}
| {
type: "context_usage";
tokens: number;
reasoningTokens: number | null;
}
| {
type: "reasoning_end";
}
| {
type: "text_delta";
text: string;
}
| {
type: "text_reset";
length: number;
}
| {
tool: string;
summaryCode: string;
params: Record<string, string>;
atLength?: number;
toolCallId?: string;
type: "tool_start";
}
| {
type: "tool_progress";
toolCallId: string;
bytes: number;
}
| {
tool: string;
summaryCode: string;
params: Record<string, string>;
atLength?: number;
toolCallId?: string;
type: "tool_done";
}
| {
tool: string;
summaryCode: string;
params: Record<string, string>;
atLength?: number;
toolCallId?: string;
type: "tool_error";
}
| {
type: "api_confirmation";
proposalId: string;
kind:
"api_call" | "report_issue" | "web_fetch" | "workspace_commit" | "workspace_open";
review: {
action:
| "alarmRule.create"
| "alarmRule.delete"
| "alarmRule.setDisabled"
| "alarmRule.update"
| "automation.create"
| "automation.delete"
| "automation.setDisabled"
| "automation.update"
| "billing.accounts.rename"
| "billing.accounts.setAlerts"
| "billing.members.add"
| "billing.members.remove"
| "billing.members.setRole"
| "billing.topUps.checkout"
| "billing.vouchers.redeem"
| "billing.workspace.move"
| "dashboard.configuration.patch"
| "dashboard.copy"
| "dashboard.create"
| "dashboard.delete"
| "dashboard.disable"
| "dashboard.enable"
| "dashboard.reorder"
| "dashboard.update"
| "device.api.invoke"
| "edgeProgram.create"
| "edgeProgram.delete"
| "edgeProgram.syncNow"
| "edgeProgram.update"
| "edgeProgram.updateSettings"
| "endpoint.create"
| "endpoint.delete"
| "endpoint.disable"
| "endpoint.disconnectOtherWorkspaces"
| "endpoint.enable"
| "endpoint.update"
| "graphics.save"
| "helpdesk.reportIssue"
| "notifications.confirmPhone"
| "notifications.disconnectTelegram"
| "notifications.removePhone"
| "notifications.requestPhoneCode"
| "notifications.saveChannel"
| "notifications.saveLocalization"
| "notifications.saveSmsCap"
| "notifications.setWorkspaceMute"
| "parameter.create"
| "parameter.createBranch"
| "parameter.deleteSelection"
| "parameter.update"
| "parameter.updateBranch"
| "parameter.upsertConstValues"
| "parameter.writeValues"
| "problemReport.submit"
| "readings.clearRange"
| "readings.insertExact"
| "readings.rebuildParentRollups"
| "report.comment.create"
| "report.comment.delete"
| "report.preset.create"
| "report.preset.delete"
| "report.preset.saveTemporary"
| "report.preset.update"
| "storage.deleteAlarmLog"
| "storage.deleteHistory"
| "storage.deleteReadings"
| "storage.deleteRetentionOverride"
| "storage.saveRetentionOverride"
| "storage.setRetentionDefaults"
| "templates.parameter.stamp"
| "web.fetch"
| "workspace.branding.set"
| "workspace.checkpoint.delete"
| "workspace.checkpoint.revert"
| "workspace.commitSandbox"
| "workspace.create"
| "workspace.delete"
| "workspace.deleteCliKey"
| "workspace.openSandbox"
| "workspace.rename"
| "workspace.setAutomationLimits"
| "workspace.updateSettings"
| "workspace.uploads.delete"
| "workspace.uploads.ingest";
json: {
action:
| "alarmRule.create"
| "alarmRule.delete"
| "alarmRule.setDisabled"
| "alarmRule.update"
| "automation.create"
| "automation.delete"
| "automation.setDisabled"
| "automation.update"
| "billing.accounts.rename"
| "billing.accounts.setAlerts"
| "billing.members.add"
| "billing.members.remove"
| "billing.members.setRole"
| "billing.topUps.checkout"
| "billing.vouchers.redeem"
| "billing.workspace.move"
| "dashboard.configuration.patch"
| "dashboard.copy"
| "dashboard.create"
| "dashboard.delete"
| "dashboard.disable"
| "dashboard.enable"
| "dashboard.reorder"
| "dashboard.update"
| "device.api.invoke"
| "edgeProgram.create"
| "edgeProgram.delete"
| "edgeProgram.syncNow"
| "edgeProgram.update"
| "edgeProgram.updateSettings"
| "endpoint.create"
| "endpoint.delete"
| "endpoint.disable"
| "endpoint.disconnectOtherWorkspaces"
| "endpoint.enable"
| "endpoint.update"
| "graphics.save"
| "helpdesk.reportIssue"
| "notifications.confirmPhone"
| "notifications.disconnectTelegram"
| "notifications.removePhone"
| "notifications.requestPhoneCode"
| "notifications.saveChannel"
| "notifications.saveLocalization"
| "notifications.saveSmsCap"
| "notifications.setWorkspaceMute"
| "parameter.create"
| "parameter.createBranch"
| "parameter.deleteSelection"
| "parameter.update"
| "parameter.updateBranch"
| "parameter.upsertConstValues"
| "parameter.writeValues"
| "problemReport.submit"
| "readings.clearRange"
| "readings.insertExact"
| "readings.rebuildParentRollups"
| "report.comment.create"
| "report.comment.delete"
| "report.preset.create"
| "report.preset.delete"
| "report.preset.saveTemporary"
| "report.preset.update"
| "storage.deleteAlarmLog"
| "storage.deleteHistory"
| "storage.deleteReadings"
| "storage.deleteRetentionOverride"
| "storage.saveRetentionOverride"
| "storage.setRetentionDefaults"
| "templates.parameter.stamp"
| "web.fetch"
| "workspace.branding.set"
| "workspace.checkpoint.delete"
| "workspace.checkpoint.revert"
| "workspace.commitSandbox"
| "workspace.create"
| "workspace.delete"
| "workspace.deleteCliKey"
| "workspace.openSandbox"
| "workspace.rename"
| "workspace.setAutomationLimits"
| "workspace.updateSettings"
| "workspace.uploads.delete"
| "workspace.uploads.ingest";
input: unknown;
};
severity: "destructive" | "warning";
subject: {
kind:
| "alarm_rule"
| "automation"
| "billing_account"
| "branch"
| "checkpoint"
| "cli_key"
| "comment"
| "dashboard"
| "endpoint"
| "file"
| "parameter"
| "reading"
| "report"
| "template"
| "ticket"
| "upload"
| "url"
| "workspace";
id: string | null;
name: string | Record<string, string>;
path: (string | Record<string, string>)[];
units: string | Record<string, string> | null;
unnamedPersonal?: boolean;
} | null;
facts: {
key:
| "alarmLogKeepDays"
| "alertBelowEur"
| "alertDaysLeft"
| "allowAddComments"
| "allowRender"
| "allowSigning"
| "amountEur"
| "auditKeepDays"
| "author"
| "autoSync"
| "backgroundReadingPeriodMs"
| "baseRevision"
| "before"
| "body"
| "branch"
| "branches"
| "bytes"
| "calculatedVariables"
| "category"
| "channel"
| "clearCondition"
| "clearHoldMs"
| "code"
| "condition"
| "configuration"
| "content"
| "createdAt"
| "currentRevision"
| "dashboard"
| "dashboards"
| "defaultTimeRange"
| "description"
| "deviceLogging"
| "disabledSince"
| "displayCommentsSummary"
| "distributionFiles"
| "email"
| "enabled"
| "endpoint"
| "endpoints"
| "exportToCsv"
| "family"
| "fileCount"
| "fileDeletes"
| "fileName"
| "fileUpserts"
| "from"
| "holdMs"
| "hostname"
| "icon"
| "immutableTimeRange"
| "ingest"
| "input"
| "isSignature"
| "isTemporary"
| "keepDays"
| "kind"
| "lastRequest"
| "lat"
| "latching"
| "layout"
| "locale"
| "lon"
| "maxStepsPerRun"
| "maxWritesPerMinute"
| "message"
| "minRunIntervalMs"
| "minSeverity"
| "minTriggerIntervalMs"
| "mnemonic"
| "monthlyCapEur"
| "muted"
| "name"
| "notifyDelayMs"
| "onInit"
| "op"
| "operation"
| "parameters"
| "parent"
| "path"
| "phone"
| "pollIntervalMs"
| "port"
| "position"
| "previewVerified"
| "procedures"
| "rawHex"
| "readingsKeepDays"
| "readingsPullMinutes"
| "recipients"
| "replacedWorkspace"
| "report"
| "reports"
| "repr"
| "representation"
| "representations"
| "role"
| "rootBranch"
| "settings"
| "severity"
| "showEditButton"
| "size"
| "source"
| "sourceBytes"
| "sourceFiles"
| "sourceValueType"
| "storedValue"
| "tags"
| "time"
| "timezone"
| "title"
| "to"
| "triggers"
| "type"
| "unavailableAfterMs"
| "unitId"
| "units"
| "updatedAt"
| "uploads"
| "url"
| "user"
| "value"
| "valueType"
| "variables"
| "workspace"
| "writeLimit";
value:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
}[];
changes: {
field:
| "alarmLogKeepDays"
| "alertBelowEur"
| "alertDaysLeft"
| "allowAddComments"
| "allowRender"
| "allowSigning"
| "amountEur"
| "auditKeepDays"
| "author"
| "autoSync"
| "backgroundReadingPeriodMs"
| "baseRevision"
| "before"
| "body"
| "branch"
| "branches"
| "bytes"
| "calculatedVariables"
| "category"
| "channel"
| "clearCondition"
| "clearHoldMs"
| "code"
| "condition"
| "configuration"
| "content"
| "createdAt"
| "currentRevision"
| "dashboard"
| "dashboards"
| "defaultTimeRange"
| "description"
| "deviceLogging"
| "disabledSince"
| "displayCommentsSummary"
| "distributionFiles"
| "email"
| "enabled"
| "endpoint"
| "endpoints"
| "exportToCsv"
| "family"
| "fileCount"
| "fileDeletes"
| "fileName"
| "fileUpserts"
| "from"
| "holdMs"
| "hostname"
| "icon"
| "immutableTimeRange"
| "ingest"
| "input"
| "isSignature"
| "isTemporary"
| "keepDays"
| "kind"
| "lastRequest"
| "lat"
| "latching"
| "layout"
| "locale"
| "lon"
| "maxStepsPerRun"
| "maxWritesPerMinute"
| "message"
| "minRunIntervalMs"
| "minSeverity"
| "minTriggerIntervalMs"
| "mnemonic"
| "monthlyCapEur"
| "muted"
| "name"
| "notifyDelayMs"
| "onInit"
| "op"
| "operation"
| "parameters"
| "parent"
| "path"
| "phone"
| "pollIntervalMs"
| "port"
| "position"
| "previewVerified"
| "procedures"
| "rawHex"
| "readingsKeepDays"
| "readingsPullMinutes"
| "recipients"
| "replacedWorkspace"
| "report"
| "reports"
| "repr"
| "representation"
| "representations"
| "role"
| "rootBranch"
| "settings"
| "severity"
| "showEditButton"
| "size"
| "source"
| "sourceBytes"
| "sourceFiles"
| "sourceValueType"
| "storedValue"
| "tags"
| "time"
| "timezone"
| "title"
| "to"
| "triggers"
| "type"
| "unavailableAfterMs"
| "unitId"
| "units"
| "updatedAt"
| "uploads"
| "url"
| "user"
| "value"
| "valueType"
| "variables"
| "workspace"
| "writeLimit";
before:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
after:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
}[];
items: {
target: {
kind:
| "alarm_rule"
| "automation"
| "billing_account"
| "branch"
| "checkpoint"
| "cli_key"
| "comment"
| "dashboard"
| "endpoint"
| "file"
| "parameter"
| "reading"
| "report"
| "template"
| "ticket"
| "upload"
| "url"
| "workspace";
id: string | null;
name: string | Record<string, string>;
path: (string | Record<string, string>)[];
units: string | Record<string, string> | null;
unnamedPersonal?: boolean;
};
facts: {
key:
| "alarmLogKeepDays"
| "alertBelowEur"
| "alertDaysLeft"
| "allowAddComments"
| "allowRender"
| "allowSigning"
| "amountEur"
| "auditKeepDays"
| "author"
| "autoSync"
| "backgroundReadingPeriodMs"
| "baseRevision"
| "before"
| "body"
| "branch"
| "branches"
| "bytes"
| "calculatedVariables"
| "category"
| "channel"
| "clearCondition"
| "clearHoldMs"
| "code"
| "condition"
| "configuration"
| "content"
| "createdAt"
| "currentRevision"
| "dashboard"
| "dashboards"
| "defaultTimeRange"
| "description"
| "deviceLogging"
| "disabledSince"
| "displayCommentsSummary"
| "distributionFiles"
| "email"
| "enabled"
| "endpoint"
| "endpoints"
| "exportToCsv"
| "family"
| "fileCount"
| "fileDeletes"
| "fileName"
| "fileUpserts"
| "from"
| "holdMs"
| "hostname"
| "icon"
| "immutableTimeRange"
| "ingest"
| "input"
| "isSignature"
| "isTemporary"
| "keepDays"
| "kind"
| "lastRequest"
| "lat"
| "latching"
| "layout"
| "locale"
| "lon"
| "maxStepsPerRun"
| "maxWritesPerMinute"
| "message"
| "minRunIntervalMs"
| "minSeverity"
| "minTriggerIntervalMs"
| "mnemonic"
| "monthlyCapEur"
| "muted"
| "name"
| "notifyDelayMs"
| "onInit"
| "op"
| "operation"
| "parameters"
| "parent"
| "path"
| "phone"
| "pollIntervalMs"
| "port"
| "position"
| "previewVerified"
| "procedures"
| "rawHex"
| "readingsKeepDays"
| "readingsPullMinutes"
| "recipients"
| "replacedWorkspace"
| "report"
| "reports"
| "repr"
| "representation"
| "representations"
| "role"
| "rootBranch"
| "settings"
| "severity"
| "showEditButton"
| "size"
| "source"
| "sourceBytes"
| "sourceFiles"
| "sourceValueType"
| "storedValue"
| "tags"
| "time"
| "timezone"
| "title"
| "to"
| "triggers"
| "type"
| "unavailableAfterMs"
| "unitId"
| "units"
| "updatedAt"
| "uploads"
| "url"
| "user"
| "value"
| "valueType"
| "variables"
| "workspace"
| "writeLimit";
value:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
}[];
changes: {
field:
| "alarmLogKeepDays"
| "alertBelowEur"
| "alertDaysLeft"
| "allowAddComments"
| "allowRender"
| "allowSigning"
| "amountEur"
| "auditKeepDays"
| "author"
| "autoSync"
| "backgroundReadingPeriodMs"
| "baseRevision"
| "before"
| "body"
| "branch"
| "branches"
| "bytes"
| "calculatedVariables"
| "category"
| "channel"
| "clearCondition"
| "clearHoldMs"
| "code"
| "condition"
| "configuration"
| "content"
| "createdAt"
| "currentRevision"
| "dashboard"
| "dashboards"
| "defaultTimeRange"
| "description"
| "deviceLogging"
| "disabledSince"
| "displayCommentsSummary"
| "distributionFiles"
| "email"
| "enabled"
| "endpoint"
| "endpoints"
| "exportToCsv"
| "family"
| "fileCount"
| "fileDeletes"
| "fileName"
| "fileUpserts"
| "from"
| "holdMs"
| "hostname"
| "icon"
| "immutableTimeRange"
| "ingest"
| "input"
| "isSignature"
| "isTemporary"
| "keepDays"
| "kind"
| "lastRequest"
| "lat"
| "latching"
| "layout"
| "locale"
| "lon"
| "maxStepsPerRun"
| "maxWritesPerMinute"
| "message"
| "minRunIntervalMs"
| "minSeverity"
| "minTriggerIntervalMs"
| "mnemonic"
| "monthlyCapEur"
| "muted"
| "name"
| "notifyDelayMs"
| "onInit"
| "op"
| "operation"
| "parameters"
| "parent"
| "path"
| "phone"
| "pollIntervalMs"
| "port"
| "position"
| "previewVerified"
| "procedures"
| "rawHex"
| "readingsKeepDays"
| "readingsPullMinutes"
| "recipients"
| "replacedWorkspace"
| "report"
| "reports"
| "repr"
| "representation"
| "representations"
| "role"
| "rootBranch"
| "settings"
| "severity"
| "showEditButton"
| "size"
| "source"
| "sourceBytes"
| "sourceFiles"
| "sourceValueType"
| "storedValue"
| "tags"
| "time"
| "timezone"
| "title"
| "to"
| "triggers"
| "type"
| "unavailableAfterMs"
| "unitId"
| "units"
| "updatedAt"
| "uploads"
| "url"
| "user"
| "value"
| "valueType"
| "variables"
| "workspace"
| "writeLimit";
before:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
after:
| {
kind: "text";
value: string;
}
| {
kind: "localized";
value: Record<string, string>;
}
| {
kind: "path";
value: (string | Record<string, string>)[];
}
| {
kind: "raw_hex";
value: string;
}
| {
kind: "number";
value: number;
}
| {
kind: "boolean";
value: boolean;
}
| {
kind: "date_time";
value: string;
}
| {
kind: "json";
value: string;
}
| {
kind: "none";
};
}[];
}[];
consequences: {
code:
| "call_device_api"
| "clear_reading_ranges"
| "commit_workspace_files"
| "confirm_devices_on_site"
| "create_parameter_tree"
| "create_upload_ingest_job"
| "delete_activity_history"
| "delete_alarm_log"
| "delete_branches"
| "delete_checkpoint"
| "delete_dashboard_source"
| "delete_dashboards"
| "delete_endpoints"
| "delete_parameter_selection"
| "delete_parameters"
| "delete_report"
| "delete_report_comment"
| "delete_reports"
| "delete_stored_readings"
| "delete_upload"
| "delete_uploads"
| "disclose_url_to_web_fetch"
| "disconnect_endpoint"
| "insert_readings"
| "recalculate_interval_summaries"
| "replace_working_copy"
| "restart_device_programs"
| "restore_const_values"
| "retain_report_parameter_snapshots"
| "revert_setup_changes"
| "revoke_cli_access"
| "write_live_device_values";
count: number | null;
targets: {
kind:
| "alarm_rule"
| "automation"
| "billing_account"
| "branch"
| "checkpoint"
| "cli_key"
| "comment"
| "dashboard"
| "endpoint"
| "file"
| "parameter"
| "reading"
| "report"
| "template"
| "ticket"
| "upload"
| "url"
| "workspace";
id: string | null;
name: string | Record<string, string>;
path: (string | Record<string, string>)[];
units: string | Record<string, string> | null;
unnamedPersonal?: boolean;
}[];
}[];
};
}
| {
type: "navigate_request";
requestId: string;
viewerId: string;
path: string;
}
| {
type: "page_context_request";
requestId: string;
viewerId: string;
}
| {
type: "job_wait";
jobWaitId: string;
jobId: string;
path: string;
toolCallId: string;
}
| {
type: "stored";
reply: {
questions?: {
id: string;
chatId: string;
messageId: string;
toolCallId: string;
input: {
questions: {
id: string;
question: string;
multiple: boolean;
choices: {
id: string;
label: string;
description?: string;
}[];
recommendedChoiceId?: string;
}[];
};
status: "answered" | "cancelled" | "pending";
answers:
| {
questionId: string;
choiceIds: string[];
text: string;
}[]
| null;
}[];
id: string;
chatId: string;
content: string;
interrupted: boolean;
chargedEur: number | null;
contextTokens: number | null;
reasoningTokens: number | null;
toolActivity?:
| {
tool: string;
summaryCode: string;
params: Record<string, string>;
atLength?: number;
toolCallId?: string;
phase: "done" | "error" | "start";
}[]
| null;
images?: {
id: string;
mediaType: "image/jpeg" | "image/png" | "image/webp";
}[];
createdAt: string;
};
}
| {
type: "ping";
};
}
| {
type: "job_progress";
agentId: string;
pauseId: string;
state:
| {
jobId: string;
jobType: "modbusFind";
status: "running";
progress?: {
triesPass: number;
triesTotal: number;
foundDevices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
uid: number | null;
baudRate: number | null;
charFormat: number | null;
frameMode: number | null;
deviceStatus: "BUSY" | "DONE";
};
}
| {
jobId: string;
jobType: "modbusClassFind";
status: "running";
progress?: {
phase: "classify" | "sync";
completed: number;
total: number;
uid: number | null;
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
jobId: string;
jobType: "pdfIngest";
status: "running";
progress?: {
pagesProcessed: number;
pagesTotal: number;
pagesFailed: number;
ocrRetryAt?: string;
};
}
| {
jobId: string;
jobType: "xlsxIngest";
status: "running";
progress?: {
sheetsProcessed: number;
sheetsTotal: number;
sheetsFailed: number;
};
}
| {
jobId: string;
jobType: string;
status: "running";
presentation: "generic";
}
| {
jobId: string;
jobType: "modbusClassFind";
status: "failed";
error: {
message: string;
code?: string;
detail?: unknown;
};
result?: {
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
jobId: string;
jobType: "modbusFind";
status: "completed" | "interrupted";
result: {
triesPass: number;
triesTotal: number;
foundDevices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
};
}
| {
jobId: string;
jobType: "modbusClassFind";
status: "completed" | "interrupted";
result: {
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
jobId: string;
jobType: "pdfIngest";
status: "completed" | "interrupted";
result: {
destName: string;
pagesTotal: number;
pagesFailed: number[];
};
}
| {
jobId: string;
jobType: "xlsxIngest";
status: "completed" | "interrupted";
result: {
destName: string;
sheetsTotal: number;
sheetsFailed: number[];
};
}
| {
jobId: string;
jobType: "modbusFind" | "pdfIngest" | "xlsxIngest";
status: "failed";
error: {
message: string;
code?: string;
detail?: unknown;
};
}
| {
jobId: string;
jobType: string;
status: "completed" | "interrupted";
presentation: "generic";
result?: unknown;
}
| {
jobId: string;
jobType: string;
status: "failed";
presentation: "generic";
error: {
message: string;
code?: string;
detail?: unknown;
};
};
}
| {
type: "ping";
},
any,
any
>;

Kind: Subscription

Weight: 0

Subscribe to changes of your assistant runtime. The first event and any event after missed changes have type resync.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only the authenticated account’s chats. Confirmation cards, the assistant’s questions, and its repeated-step and spending-cap prompts are answered only in the app; a run waiting on one stays paused until it is answered there or stopped with assistant.abortTurn.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = AsyncIterable<
{
type: "changed" | "resync";
},
void,
any
>;

Kind: Query

Weight: 5

List deleted workspaces whose audit history the current owner may view.

Access

Authenticated account; lists only workspaces it owned. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
workspaces: {
workspaceId: string;
workspaceName: string;
deletedAt: string;
}[];
};

Kind: Query

Weight: 10

Export authorized audit history as JSON or CSV.

Access

Workspace editor, admin or owner for a workspace’s history. Without workspaceId, the authenticated account’s own history, which workspace-scoped API keys cannot read. A deleted workspace’s history (archived) is only for its former owner, and workspace-scoped API keys cannot read it.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId?: string;
archived?: boolean;
from?: string;
to?: string;
actorKind?: "api_key" | "assistant" | "automation" | "system" | "user";
actor?: string;
origin?: string;
action?: string;
operation?: "call" | "create" | "delete" | "update" | "write";
target?: string;
cursor?: string;
limit?: number;
format: "csv" | "json";
};

Output

type Output = {
filename: string;
contentType: string;
content: string;
truncated: boolean;
};

Kind: Query

Weight: 5

List authorized workspace or personal account audit history.

Access

Workspace editor, admin or owner for a workspace’s history. Without workspaceId, the authenticated account’s own history, which workspace-scoped API keys cannot read. A deleted workspace’s history (archived) is only for its former owner, and workspace-scoped API keys cannot read it.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId?: string;
archived?: boolean;
from?: string;
to?: string;
actorKind?: "api_key" | "assistant" | "automation" | "system" | "user";
actor?: string;
origin?: string;
action?: string;
operation?: "call" | "create" | "delete" | "update" | "write";
target?: string;
cursor?: string;
limit?: number;
checkpoints?: "all" | "important";
direction?: "forward";
};

Output

type Output = {
events: {
id: string;
operationId: string;
scope: "account" | "workspace";
workspaceId: string | null;
workspaceName: string | null;
accountUserId: string | null;
actorKind: "api_key" | "assistant" | "automation" | "system" | "user";
actorUserId: string | null;
actorCredentialId: string | null;
actorName: string | null;
origin: string;
action: string;
occurredAt: string;
recordedAt: string;
writeOutcome: "complete" | "partial" | null;
changes: {
id: string;
targetType: string;
targetId: string | null;
targetKey: string;
targetName: string | null;
operation: "call" | "create" | "delete" | "update" | "write";
before: unknown;
after: unknown;
}[];
}[];
checkpoints: {
id: string;
workspaceId: string;
setupRevision: number;
kind:
| "before_assistant_turn"
| "before_bulk_delete"
| "before_import"
| "before_push"
| "before_revert"
| "before_template"
| "daily"
| "named";
authorKind: "assistant" | "system" | "user";
authorUserId: string | null;
authorName: string | null;
assistantChatId: string | null;
name: string | null;
reason: string | null;
createdAt: string;
aboveOperationId: string | null;
}[];
nextCursor: string | null;
};

Kind: Mutation

Weight: 5

Create an automation from its JSON document (see the automations reference). Rejected with automation_invalid and the diagnostics when it has errors; warnings are returned. Editors, admins and owners.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AutomationCreateInput;

Output

type Output = AutomationWriteOutput;

Shared types: AutomationCreateInput, AutomationWriteOutput

Kind: Mutation

Weight: 5

Delete an automation. Refused with automation_in_use while another automation is triggered by it.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
deletedId: string;
};

Kind: Mutation

Weight: 10

Run one procedure of an automation document, saved or not, against the workspace’s current values and the saved automation’s state, with no side effects: nothing is written, notified, raised or stored. Returns the steps, values and the effects a real run would have. Rejected with automation_invalid when the document has errors. Editors, admins and owners.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AutomationDryRunInput;

Output

type Output = AutomationDryRunOutput;

Shared types: AutomationDryRunInput, AutomationDryRunOutput

Kind: Query

Weight: 5

Get an automation: its JSON document, validator diagnostics and the most steps one run can execute.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = AutomationDetail;

Shared types: AutomationDetail

Kind: Query

Weight: 5

The latest run, or refusal to run, of each automation of a workspace that has one in run history.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = AutomationLatestRunsOutput;

Shared types: AutomationLatestRunsOutput

Kind: Query

Weight: 5

List the server automations of a workspace (or those one dashboard owns): name, owning dashboard, disabledSince, and validator error/warning counts against the workspace as it is now.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
dashboardId?: string;
};

Output

type Output = {
items: {
readonly id: string;
readonly workspaceId: string;
readonly revision: number;
readonly name: string | Record<string, string>;
readonly description: string | Record<string, string> | null;
readonly dashboardId: string | null;
readonly disabledSince: string | null;
readonly errorCount: number;
readonly warningCount: number;
readonly createdAt: string;
readonly updatedAt: string;
}[];
};

Kind: Query

Weight: 1

The workspace’s members by user id, name and role, to choose notification recipients from (members recipients take user ids). No emails. Editors, admins and owners.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = AutomationMembersOutput;

Shared types: AutomationMembersOutput

Kind: Query

Weight: 3

Run history of an automation, newest first: what started each run, its duration, steps, writes and notifications, and its error. Kept 90 days; pass next as before for older runs.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AutomationRunsInput;

Output

type Output = AutomationRunsOutput;

Shared types: AutomationRunsInput, AutomationRunsOutput

Kind: Query

Weight: 3

The step trace of one run: the input values it started with and up to its first 1000 executed steps with branches taken, values set and written and writeLog output, plus write outcomes. Kept 7 days.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
runId: string;
};

Output

type Output = AutomationRunTraceOutput;

Shared types: AutomationRunTraceOutput

Kind: Mutation

Weight: 5

Disable or enable an automation. A disabled automation never runs; enabling one with errors is refused.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
disabled: boolean;
baseRevision?: number;
};

Output

type Output = AutomationWriteOutput;

Shared types: AutomationWriteOutput

Kind: Mutation

Weight: 5

Replace an automation’s document or owning dashboard. Rejected with automation_invalid when the new document has errors.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = AutomationUpdateInput;

Output

type Output = AutomationWriteOutput;

Shared types: AutomationUpdateInput, AutomationWriteOutput

Kind: Mutation

Weight: 5

Check an automation document as automation.create (or automation.update with id) would, without saving it. Any JSON is accepted; a wrong shape is reported as invalid_shape. Returns ok, the diagnostics (errors, then warnings), maxSteps, and in others the errors the save would give automations and alarm rules that refer to it.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
id?: string;
document: unknown;
};

Output

type Output = {
ok: boolean;
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
maxSteps: number | null;
others: {
entityType: "alarm_rule" | "automation";
id: string;
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
}[];
};

Kind: Query

Weight: 5

What validateAutomation and validateAlarmRule need to check a document of this workspace offline: its parameters (formula type, writable, disabled), endpoints, alarm rules, other automations, members, whether it has a location, and the workspace’s limits (set by admins and owners).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
parameters: {
id: string;
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
writable: boolean;
disabled: boolean;
}[];
endpoints: string[];
alarmRules: string[];
automations: {
id: string;
alarmKeys: string[];
triggeredBy: string[];
}[];
members: string[];
hasLocation: boolean;
limits: {
maxStepsPerRun: number;
minTriggerIntervalMs: number;
maxWritesPerMinute: number;
};
};

Kind: Query

Weight: 1.5

Read a billing account and its balance.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
};

Output

type Output = {
id: string;
name: string | null;
personal: boolean;
role: "manager" | "owner" | "viewer";
balanceMicroEur: number;
negativeLimitMicroEur: number;
vatTreatment: "business" | "regular";
alertDaysLeft: number | null;
alertBelowMicroEur: number | null;
};

Kind: Query

Weight: 2

List the billing accounts you are a member of.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
accounts: {
id: string;
name: string | null;
personal: boolean;
role: "manager" | "owner" | "viewer";
balanceMicroEur: number;
negativeLimitMicroEur: number;
vatTreatment: "business" | "regular";
alertDaysLeft: number | null;
alertBelowMicroEur: number | null;
}[];
};

Kind: Mutation

Weight: 3

Rename a billing account you own.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
name: string | null;
};

Output

type Output = {
id: string;
name: string | null;
personal: boolean;
role: "manager" | "owner" | "viewer";
balanceMicroEur: number;
negativeLimitMicroEur: number;
vatTreatment: "business" | "regular";
alertDaysLeft: number | null;
alertBelowMicroEur: number | null;
};

Kind: Mutation

Weight: 3

Set a billing account’s low-balance alerts: days of balance left at recent spending, and a balance in micro-euros; null turns one off. Owners and managers only.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
alertDaysLeft: number | null;
alertBelowMicroEur: number | null;
};

Output

type Output = {
id: string;
name: string | null;
personal: boolean;
role: "manager" | "owner" | "viewer";
balanceMicroEur: number;
negativeLimitMicroEur: number;
vatTreatment: "business" | "regular";
alertDaysLeft: number | null;
alertBelowMicroEur: number | null;
};

Kind: Query

Weight: 0

Estimate a setup’s monthly cost, VAT included, at the current price list or a scheduled one (effectiveFrom). Devices go in groups; assistant use is tokens per level. Returns each month from an empty start with each item’s quantity, unit price and amount, the profile with defaults as assumptions, the month cost levels off, and unpriced cost types. Needs no sign-in.

Access

Anyone: no session or API key is required.

Errors

NOT_FOUND with billing_price_list_unknown when no price list is in effect, or none takes effect at the effectiveFrom asked for.

Input

type Input = {
profile: {
deviceGroups: {
name?: string;
devices: number;
parametersPerDevice: number;
pollSeconds: number;
extraReadsPercent?: number;
retentionDays?: number | null;
endpoints: number;
connection?: "direct" | "pin" | "wireguard";
}[];
activityHistory?: {
perMonth: number;
retentionDays?: number | null;
};
alarmLog?: {
perMonth: number;
retentionDays?: number | null;
};
weightedApiRequestsPerMonth?: number;
automationStepsPerMonth?: number;
emailsPerMonth?: number;
smsSegmentsPerMonth?: number;
mapLoadsPerMonth?: number;
geocodesPerMonth?: number;
fileMegabytes?: number;
ocrPagesPerMonth?: number;
sandboxHoursPerMonth?: number;
assistant?: {
standard?: {
inputTokens?: number;
outputTokens?: number;
cacheReadTokens?: number;
cacheWriteTokens?: number;
};
pro?: {
inputTokens?: number;
outputTokens?: number;
cacheReadTokens?: number;
cacheWriteTokens?: number;
};
};
assistantWebSearch?: {
searches?: number;
inputTokens?: number;
outputTokens?: number;
};
documentIngestion?: {
inputTokens?: number;
};
};
months?: number;
effectiveFrom?: string;
};

Output

type Output = {
effectiveFrom: string;
includedVatRatePpm: number;
daysPerMonth: number;
profile: {
deviceGroups: {
name?: string;
devices: number;
parametersPerDevice: number;
pollSeconds: number;
extraReadsPercent?: number;
retentionDays?: number | null;
endpoints: number;
connection?: "direct" | "pin" | "wireguard";
}[];
activityHistory?: {
perMonth: number;
retentionDays?: number | null;
};
alarmLog?: {
perMonth: number;
retentionDays?: number | null;
};
weightedApiRequestsPerMonth?: number;
automationStepsPerMonth?: number;
emailsPerMonth?: number;
smsSegmentsPerMonth?: number;
mapLoadsPerMonth?: number;
geocodesPerMonth?: number;
fileMegabytes?: number;
ocrPagesPerMonth?: number;
sandboxHoursPerMonth?: number;
assistant?: {
standard?: {
inputTokens?: number;
outputTokens?: number;
cacheReadTokens?: number;
cacheWriteTokens?: number;
};
pro?: {
inputTokens?: number;
outputTokens?: number;
cacheReadTokens?: number;
cacheWriteTokens?: number;
};
};
assistantWebSearch?: {
searches?: number;
inputTokens?: number;
outputTokens?: number;
};
documentIngestion?: {
inputTokens?: number;
};
};
months: {
month: number;
items: {
costType:
| "alarm_log_storage"
| "announcement_translation"
| "api_requests"
| "assistant_tokens"
| "assistant_web_search"
| "audit_storage"
| "automation_steps"
| "document_ingestion"
| "document_ocr"
| "email"
| "endpoint_support"
| "file_storage"
| "manual_charge"
| "maps_geocode"
| "maps_load"
| "parameter_requests"
| "sandbox_time"
| "sms"
| "stored_readings"
| "vpn_address"
| "vpn_connection";
level: "pro" | "standard" | null;
rate:
| "cache_read_tokens"
| "cache_write_tokens"
| "input_tokens"
| "output_tokens"
| "search"
| null;
quantity: number;
priceUnit: string;
unitPriceMicroEur: number;
amountMicroEur: number;
}[];
totalMicroEur: number;
}[];
steadyFromMonth: number | null;
totalMicroEur: number;
unpriced: (
| "alarm_log_storage"
| "announcement_translation"
| "api_requests"
| "assistant_tokens"
| "assistant_web_search"
| "audit_storage"
| "automation_steps"
| "document_ingestion"
| "document_ocr"
| "email"
| "endpoint_support"
| "file_storage"
| "manual_charge"
| "maps_geocode"
| "maps_load"
| "parameter_requests"
| "sandbox_time"
| "sms"
| "stored_readings"
| "vpn_address"
| "vpn_connection"
)[];
};

Kind: Query

Weight: 10

List a billing account’s ledger by day, newest first: hourly charges summed per workspace and cost type, other entries one by one.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
timeZone: string;
before?: string;
limit?: number;
};

Output

type Output = {
days: {
day: string;
totalMicroEur: number;
groups: {
kind: "commission" | "usage_charge";
workspaceId: string | null;
costType: string | null;
amountMicroEur: number;
quantity: number;
entries: number;
}[];
entries: {
id: string;
kind:
| "commission"
| "commission_payout"
| "correction"
| "forfeit"
| "manual_charge"
| "refund"
| "top_up"
| "usage_charge";
amountMicroEur: number;
occurredAt: string;
workspaceId: string | null;
costType: string | null;
periodStart: string | null;
quantity: number | null;
unitPriceMicroEur: number | null;
discountPpm: number | null;
vatRatePpm: number | null;
method: "admin" | "bank_transfer" | "card" | "voucher" | null;
reference: string | null;
reason: string | null;
sourceEntryId: string | null;
originalCurrency: string | null;
originalAmountMinor: number | null;
}[];
truncated: boolean;
}[];
workspaces: {
id: string;
name: string;
}[];
next: string | null;
};

Kind: Query

Weight: 20

Export a billing account’s ledger entries of a period as CSV.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
from: string;
to: string;
};

Output

type Output = {
filename: string;
contentType: "text/csv";
content: string;
truncated: boolean;
};

Kind: Query

Weight: 5

List a billing account’s ledger, newest first.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
before?: {
occurredAt: string;
id: string;
};
limit?: number;
};

Output

type Output = {
entries: {
id: string;
kind:
| "commission"
| "commission_payout"
| "correction"
| "forfeit"
| "manual_charge"
| "refund"
| "top_up"
| "usage_charge";
amountMicroEur: number;
occurredAt: string;
workspaceId: string | null;
costType: string | null;
periodStart: string | null;
quantity: number | null;
unitPriceMicroEur: number | null;
discountPpm: number | null;
vatRatePpm: number | null;
method: "admin" | "bank_transfer" | "card" | "voucher" | null;
reference: string | null;
reason: string | null;
sourceEntryId: string | null;
originalCurrency: string | null;
originalAmountMinor: number | null;
}[];
next: {
occurredAt: string;
id: string;
} | null;
};

Kind: Mutation

Weight: 3

Add a person who shares a workspace with you to a billing account you own.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
email: string;
role: "manager" | "owner" | "viewer";
};

Output

type Output = {
members: {
userId: string;
name: string;
email: string;
role: "manager" | "owner" | "viewer";
}[];
};

Kind: Query

Weight: 2

List the members of a billing account.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
};

Output

type Output = {
members: {
userId: string;
name: string;
email: string;
role: "manager" | "owner" | "viewer";
}[];
};

Kind: Mutation

Weight: 3

Remove a member from a billing account you own, or leave one.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
userId: string;
};

Output

type Output = {
success: true;
};

Kind: Mutation

Weight: 3

Change a member’s role in a billing account you own.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
userId: string;
role: "manager" | "owner" | "viewer";
};

Output

type Output = {
members: {
userId: string;
name: string;
email: string;
role: "manager" | "owner" | "viewer";
}[];
};

Kind: Query

Weight: 0

Read the price list, VAT included: the prices in effect now and scheduled changes, with assistant prices per million tokens following the model provider’s current prices. A unit price is per priceUnit (quantity of unit), such as per endpoint per day; unit is only what usage is metered in. The What is charged reference says what each kind counts. Needs no sign-in.

Access

Anyone: no session or API key is required.

Errors

None specific to the procedure. Unexpected failures return INTERNAL_SERVER_ERROR.

Input

type Input = void;

Output

type Output = {
current: {
effectiveFrom: string;
includedVatRatePpm: number;
prices: {
costType:
| "alarm_log_storage"
| "announcement_translation"
| "api_requests"
| "assistant_tokens"
| "assistant_web_search"
| "audit_storage"
| "automation_steps"
| "document_ingestion"
| "document_ocr"
| "email"
| "endpoint_support"
| "file_storage"
| "manual_charge"
| "maps_geocode"
| "maps_load"
| "parameter_requests"
| "sandbox_time"
| "sms"
| "stored_readings"
| "vpn_address"
| "vpn_connection";
pricing: "pass_through" | "unit";
unit: string;
priceUnit: {
quantity: number;
name: string;
} | null;
unitPriceMicroEur: number | null;
rates:
| {
level: "pro" | "standard" | null;
rate:
| "cache_read_tokens"
| "cache_write_tokens"
| "input_tokens"
| "output_tokens"
| "search";
quantity: number;
priceMicroEur: number;
}[]
| null;
}[];
} | null;
scheduled: {
effectiveFrom: string;
includedVatRatePpm: number;
prices: {
costType:
| "alarm_log_storage"
| "announcement_translation"
| "api_requests"
| "assistant_tokens"
| "assistant_web_search"
| "audit_storage"
| "automation_steps"
| "document_ingestion"
| "document_ocr"
| "email"
| "endpoint_support"
| "file_storage"
| "manual_charge"
| "maps_geocode"
| "maps_load"
| "parameter_requests"
| "sandbox_time"
| "sms"
| "stored_readings"
| "vpn_address"
| "vpn_connection";
pricing: "pass_through" | "unit";
unit: string;
priceUnit: {
quantity: number;
name: string;
} | null;
unitPriceMicroEur: number | null;
rates:
| {
level: "pro" | "standard" | null;
rate:
| "cache_read_tokens"
| "cache_write_tokens"
| "input_tokens"
| "output_tokens"
| "search";
quantity: number;
priceMicroEur: number;
}[]
| null;
}[];
}[];
};

Kind: Mutation

Weight: 3

Open a Stripe payment page to top up a billing account you own or manage.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
amountEur: number;
itemName: string;
locale: "de" | "en" | "pl" | "ru" | "uk";
};

Output

type Output = {
url: string;
};

Kind: Query

Weight: 0

Read whether card top-ups are available and their limits.

Access

Authenticated caller.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
enabled: boolean;
minAmountEur: number;
maxAmountEur: number;
maxBalanceMicroEur: number;
};

Kind: Query

Weight: 10

Break down a billing account’s usage charges of a period by workspace, cost type and top subjects, with daily totals.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
from: string;
to: string;
timeZone: string;
};

Output

type Output = {
totalMicroEur: number;
days: {
day: string;
amountMicroEur: number;
}[];
workspaces: {
workspaceId: string | null;
name: string | null;
amountMicroEur: number;
costTypes: {
costType: string;
amountMicroEur: number;
quantity: number;
subjects: {
kind:
| "alarm_rule"
| "api_key"
| "automation"
| "chat"
| "dashboard"
| "endpoint"
| "none"
| "upload"
| "user";
id: string;
name: string | Record<string, string> | null;
quantity: number;
amountMicroEur: number;
}[];
otherSubjects: number;
}[];
}[];
};

Kind: Query

Weight: 3

Read a billing account’s usage charges of the last day and week, and how many days its balance lasts at that rate.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
};

Output

type Output = {
lastDayMicroEur: number;
lastWeekMicroEur: number;
previousDayMicroEur: number;
previousWeekMicroEur: number;
daysLeft: number | null;
};

Kind: Mutation

Weight: 3

Redeem a prepaid voucher code into a billing account you own or manage.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
billingAccountId: string;
code: string;
};

Output

type Output = {
amountMicroEur: number;
balanceMicroEur: number;
};

Kind: Query

Weight: 1.5

Read which billing account pays for a workspace you are an admin or owner of.

Access

Workspace admin or owner. A workspace-scoped API key works only for its own workspace, and only when its user is an admin or owner of it.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
current: {
billingAccountId: string;
name: string | null;
personal: boolean;
effectiveFrom: string;
};
pending: {
billingAccountId: string;
name: string | null;
personal: boolean;
effectiveFrom: string;
} | null;
};

Kind: Mutation

Weight: 3

Bill a workspace you own to a billing account you own or manage, from the next hour.

Access

Member of the billing account: viewers read; changes need the role the description names. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
billingAccountId: string;
};

Output

type Output = {
current: {
billingAccountId: string;
name: string | null;
personal: boolean;
effectiveFrom: string;
};
pending: {
billingAccountId: string;
name: string | null;
personal: boolean;
effectiveFrom: string;
} | null;
};

Kind: Query

Weight: 1

Read whether a workspace you are a member of is active, suspended soon because its billing account is below zero, or suspended.

Access

Workspace member. A workspace-scoped API key works only for its own workspace. The billing account is returned only to its members.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
state: "active" | "suspended" | "suspended_soon";
billingAccountId: string | null;
};

Kind: Mutation

Weight: 3

Change part of a dashboard’s configuration with JSON Patch (RFC 6902) operations, with its revision from dashboard.get as baseRevision. The result may add no problems against the template’s schema (dashboard_configuration_invalid); a document is checked like any change (dashboard_document_invalid, diagnostics with JSON pointers). Prefer it to dashboard.update for small edits.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision: number;
operations: (
| {
op: "add";
path: string;
value: unknown;
}
| {
op: "remove";
path: string;
}
| {
op: "replace";
path: string;
value: unknown;
}
| {
op: "move";
from: string;
path: string;
}
| {
op: "copy";
from: string;
path: string;
}
| {
op: "test";
path: string;
value: unknown;
}
)[];
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 5

Duplicate a dashboard in its workspace, including configuration, sources and published build. The new name is plain text; other localized strings and entity references are preserved. Copies the latest saved state and inserts after the original.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
name: string;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 5

Create a dashboard in a workspace.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
name: string | Record<string, string>;
description?: string | Record<string, string> | null;
disabledSince?: string | null;
template?: string;
configuration?: Record<string, unknown>;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 3

Permanently delete a dashboard.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
deletedId: string;
nextDashboardId: string | null;
};

Kind: Mutation

Weight: 3

Disable a dashboard.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Query

Weight: 2

Check a configuration’s document as saving it would, without saving: to the dashboard id, or to a new one when id is left out. Returns every diagnostic and the errors the save would refuse with dashboard_document_invalid, with JSON pointers into the configuration.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
id?: string;
configuration: Record<string, unknown>;
};

Output

type Output = {
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "cell_count"
| "chained_comparison"
| "columns_and_content"
| "division_by_zero"
| "duplicate_name"
| "duplicate_page"
| "empty_formula"
| "formula_cycle"
| "history_aggregate"
| "input_type"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_list"
| "not_an_input"
| "not_finite"
| "operand_types"
| "operation_not_readable"
| "option_type"
| "parameter_disabled"
| "parameter_not_numeric"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "range_empty"
| "reserved_name"
| "result_type"
| "source_input"
| "source_input_type"
| "source_value_path"
| "source_value_type"
| "source_value_type_required"
| "spans_over_width"
| "tile_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm_source"
| "unknown_endpoint"
| "unknown_file"
| "unknown_function"
| "unknown_name"
| "unknown_operation"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_series"
| "unknown_source"
| "unknown_variable"
| "unterminated_string"
| "unused_name";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
refused: {
code:
| "argument_count"
| "argument_types"
| "cell_count"
| "chained_comparison"
| "columns_and_content"
| "division_by_zero"
| "duplicate_name"
| "duplicate_page"
| "empty_formula"
| "formula_cycle"
| "history_aggregate"
| "input_type"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_list"
| "not_an_input"
| "not_finite"
| "operand_types"
| "operation_not_readable"
| "option_type"
| "parameter_disabled"
| "parameter_not_numeric"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "range_empty"
| "reserved_name"
| "result_type"
| "source_input"
| "source_input_type"
| "source_value_path"
| "source_value_type"
| "source_value_type_required"
| "spans_over_width"
| "tile_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm_source"
| "unknown_endpoint"
| "unknown_file"
| "unknown_function"
| "unknown_name"
| "unknown_operation"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_series"
| "unknown_source"
| "unknown_variable"
| "unterminated_string"
| "unused_name";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
};

Kind: Mutation

Weight: 3

Re-enable a disabled dashboard.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Query

Weight: 1

Get a dashboard’s metadata and configuration. dashboard.listSourceFiles lists its source files.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Query

Weight: 1.5

Read one source file of a dashboard, as dashboard.listSourceFiles names it.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
path: string;
};

Output

type Output = string;

Kind: Query

Weight: 2

List dashboards (id, name, description, icon, disabledSince).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
dashboards: {
id: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
disabledSince: string | null;
revision: number;
}[];
};

Kind: Query

Weight: 2

List React/TS source paths for one dashboard (then getSourceFile).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
files: {
path: string;
encoding: "base64" | "utf8";
byteLength: number;
}[];
};

Kind: Query

Weight: 2

List enabled dashboards (id, name).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
dashboards: DashboardSummary[];
};

Shared types: DashboardSummary

Kind: Mutation

Weight: 5

Set workspace catalog order. ids must be the full dashboard list, including disabled.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
ids: string[];
};

Output

type Output = {
dashboards: {
id: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
disabledSince: string | null;
revision: number;
}[];
};

Kind: Query

Weight: 2

Search dashboards by name (the query input). Returns at most 25 matches.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
match?: "exact" | "includes";
caseSensitive?: boolean;
workspaceId: string;
query: string;
};

Output

type Output = {
matches: DashboardSummary[];
hasMore: boolean;
};

Shared types: DashboardSummary

Kind: Mutation

Weight: 3

Update dashboard name, description, icon, or configuration. Configuration replacement requires expectedConfiguration from the original dashboard.get response.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
expectedConfiguration?: Record<string, unknown>;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Query

Weight: 0

Describe one device API operation: its allowed calling surfaces, input JSON Schemas, per-key roles, timeout and rate limit.

Access

Workspace member. describe and invoke cover only operations whose minimum role the caller meets; invoke also needs the stronger role of any keyRoles key it sends. View-only members see no operations.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
operation: string;
};

Output

type Output = DeviceApiDescribeOutput;

Shared types: DeviceApiDescribeOutput

Kind: Mutation

Weight: 3

Call a device API operation on a PIN endpoint’s device. input has query and body as device.api.describe gives them. Returns the device’s JSON answer as response.

Access

Workspace member. describe and invoke cover only operations whose minimum role the caller meets; invoke also needs the stronger role of any keyRoles key it sends. View-only members see no operations.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
operation: string;
input?: {
query?: Record<string, string | number | boolean>;
body?: Record<string, unknown>;
};
};

Output

type Output = {
response: unknown;
};

Kind: Query

Weight: 0

List the device API operations of a PIN endpoint’s device that the caller’s role may call.

Access

Workspace member. describe and invoke cover only operations whose minimum role the caller meets; invoke also needs the stronger role of any keyRoles key it sends. View-only members see no operations.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
};

Output

type Output = DeviceApiListOutput;

Shared types: DeviceApiListOutput

Kind: Mutation

Weight: 10

Queue a job that copies the stored device-logged readings of a Modbus parameter’s unit, table, and first address into its history; call it after creating a parameter for an address from deviceLog.listAddresses. Readings already in its history are skipped, so it is safe to repeat. Returns the job id, or null when another user’s backfill of the parameter is running.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
parameterId: string;
};

Output

type Output = {
jobId: string | null;
};

Kind: Query

Weight: 10

MC252 endpoint addresses that programs logged (PARAMLOG) and no parameter reads, 500 most recent first: unit, table, address, record count, first/last time, latest PARAMLOG type code, and its device-converted value (F32/F64EPnR scaled by 10^n). Kept 90 days. To keep them, create a Modbus parameter with that unit, table, and first address, then call deviceLog.backfill.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
};

Output

type Output = {
endpointId: string;
addresses: {
unitId: number;
table: "coil" | "discrete-input" | "holding-register" | "input-register";
address: number;
typeCode: number;
records: number;
firstAt: string;
lastAt: string;
lastValue: string;
}[];
};

Kind: Query

Weight: 1.5

How the import of an MC252 endpoint’s program-logged readings (PARAMLOG) stands: pull period in minutes, end of the last complete pull, the time through which all logged readings are in history, and, while the device clock is more than five minutes off, its offset and since when (nothing is imported until the clock is right).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
};

Output

type Output = {
endpointId: string;
pullMinutes: number;
lastImportAt: string | null;
completeThrough: string | null;
clock: {
offsetMs: number;
since: string;
} | null;
};

Kind: Mutation

Weight: 5

Create an edge program on an MC252 endpoint. fileName is 8.3 with .TXT (upper-cased on save). Programs with errors save but are not deployed. With auto-sync on, a deploy to the device is queued; a deploy restarts every program on it.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
endpointId: string;
fileName: string;
description?: string | Record<string, string> | null;
enabled?: boolean;
source: string;
};

Output

type Output = {
id: string;
workspaceId: string;
endpointId: string;
revision: number;
fileName: string;
description: string | Record<string, string> | null;
enabled: boolean;
sourceSha256: string;
sourceBytes: number;
errorCount: number;
warningCount: number;
createdAt: string;
updatedAt: string;
deployJobIds: string[];
};

Kind: Mutation

Weight: 5

Delete an edge program and its source. With auto-sync on, a deploy to the device is queued.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
deletedId: string;
deployJobIds: string[];
};

Kind: Query

Weight: 1.5

Get where an MC252’s programs stand: state (never, pending, deploying, synced, failed, blocked, offline, conflict, drift), the running deploy, the programs and tasks the device runs, a device compile error with program and line, and whether logging settings wait for a restart. waitMs (up to 30000) waits for a queued or running deploy to end; the deploy goes on either way.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
waitMs?: number;
};

Output

type Output = {
endpointId: string;
state:
| "blocked"
| "conflict"
| "deploying"
| "drift"
| "failed"
| "never"
| "offline"
| "pending"
| "synced";
jobId: string | null;
autoSync: boolean;
attemptedAt: string | null;
attempts: number;
deployedAt: string | null;
checkedAt: string | null;
loadedOn: string | null;
programs: {
fileName: string;
programId: string | null;
}[];
tasks: {
sourceFile: string;
periodMs: number;
state: string;
lastRunOn: string | null;
lastErrorCode: string | null;
}[];
deviceError: {
fileName: string;
programId: string | null;
line: number | null;
code: string;
} | null;
error: {
code: string;
message: string;
} | null;
settingsPending: boolean;
};

Kind: Query

Weight: 5

Get an edge program with its source and validator diagnostics (checked with the device’s other enabled programs in file-name load order).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
id: string;
workspaceId: string;
endpointId: string;
revision: number;
fileName: string;
description: string | Record<string, string> | null;
enabled: boolean;
sourceSha256: string;
sourceBytes: number;
errorCount: number;
warningCount: number;
createdAt: string;
updatedAt: string;
source: string;
diagnostics: {
code: string;
deviceCode?: number;
severity: "error" | "warning";
range: {
line: number;
column: number;
offset: number;
endOffset: number;
};
args: Record<string, string | number>;
}[];
};

Kind: Query

Weight: 1

Get an MC252 endpoint’s edge settings: autoSync, deviceLogging (SYSLOG output on the device), readingsPullMinutes.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
};

Output

type Output = {
endpointId: string;
revision: number;
settings: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};

Kind: Query

Weight: 5

List MC252 edge programs (taskfiles) of a workspace or one endpoint: file name, enabled, source hash, and validation error/warning counts. Errors block deploys.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
endpointId?: string;
};

Output

type Output = {
items: {
readonly id: string;
readonly workspaceId: string;
readonly endpointId: string;
readonly revision: number;
readonly fileName: string;
readonly description: string | Record<string, string> | null;
readonly enabled: boolean;
readonly sourceSha256: string;
readonly sourceBytes: number;
readonly errorCount: number;
readonly warningCount: number;
readonly createdAt: string;
readonly updatedAt: string;
}[];
};

Kind: Query

Weight: 3

Read an MC252’s system log from the device, oldest first: program SYSLOG messages, unhandled errors with their line and likely programs, firmware messages, restarts. No after/before: the latest lines. Pass the returned cursor as after for only newer lines (reset: the log started over), or start as before for earlier ones. Needs the editor role, and deviceLogging on and applied.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
after?: {
offset: number;
tail: string;
};
before?: number;
};

Output

type Output = {
endpointId: string;
size: number | null;
reset: boolean;
start: number;
cursor: {
offset: number;
tail: string;
};
entries: {
offset: number;
at: string | null;
kind: "error" | "message" | "restart" | "system";
text: string;
error?: {
number: number;
code: string;
line: number;
programs: {
fileName: string;
programId: string | null;
}[];
};
}[];
};

Kind: Query

Weight: 3

Read a program’s live state on its MC252 once, as one watchLiveState read returns it: status live (task run statistics in ms, variables as decimal strings and conditions by name, null while unknown, and unreadable counts), not_running, or unavailable with a reason. Needs editor access.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
programId: string;
};

Output

type Output =
| {
status: "live";
at: string;
taskIndex: number;
namesCurrent: boolean;
stats: {
period: {
min: number;
avg: number;
max: number;
};
duration: {
min: number;
avg: number;
max: number;
};
};
variables: {
name: string | null;
index: number;
values: (string | null)[];
}[];
conditions: {
name: string | null;
index: number;
values: (boolean | null)[];
}[];
unreadable: {
variables: number;
conditions: number;
};
}
| {
status: "not_running";
at: string;
}
| {
status: "unavailable";
at: string;
reason: "device_refused" | "offline" | "own_unit_off";
};

Kind: Query

Weight: 3

Read from an MC252 the Modbus unit ID it answers for its own registers: what programs reach as MBSELF, and the unit of HMI parameters that read the device’s own and program-mapped registers. null while its own Modbus device is off. Needs the editor role.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
};

Output

type Output = {
endpointId: string;
ownUnitId: number | null;
};

Kind: Mutation

Weight: 5

Deploy an MC252’s programs now, also with auto-sync off. Returns the deploy job id. A deploy that changes programs restarts every program on the device.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
};

Output

type Output = {
jobId: string | null;
};

Kind: Mutation

Weight: 5

Update an edge program: file name, description, enabled, or source. Send baseSourceSha256 from get when editing the source. With auto-sync on, a deploy to the device is queued; a deploy restarts every program on it.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
fileName?: string;
description?: string | Record<string, string> | null;
enabled?: boolean;
source?: string;
baseRevision?: number;
baseSourceSha256?: string;
};

Output

type Output = {
id: string;
workspaceId: string;
endpointId: string;
revision: number;
fileName: string;
description: string | Record<string, string> | null;
enabled: boolean;
sourceSha256: string;
sourceBytes: number;
errorCount: number;
warningCount: number;
createdAt: string;
updatedAt: string;
deployJobIds: string[];
};

Kind: Mutation

Weight: 5

Change an MC252 endpoint’s edge settings; omitted fields keep their value. Turning auto-sync on queues a deploy of pending program changes.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
autoSync?: boolean;
deviceLogging?: boolean;
readingsPullMinutes?: number;
baseRevision?: number;
};

Output

type Output = {
endpointId: string;
revision: number;
settings: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
deployJobIds: string[];
};

Kind: Subscription

Weight: 0

Subscribe to where an MC252’s programs stand: the deploy status (as deployStatus returns it) now, then again after each change.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
waitMs?: number;
};

Output

type Output = AsyncIterable<
{
endpointId: string;
state:
| "blocked"
| "conflict"
| "deploying"
| "drift"
| "failed"
| "never"
| "offline"
| "pending"
| "synced";
jobId: string | null;
autoSync: boolean;
attemptedAt: string | null;
attempts: number;
deployedAt: string | null;
checkedAt: string | null;
loadedOn: string | null;
programs: {
fileName: string;
programId: string | null;
}[];
tasks: {
sourceFile: string;
periodMs: number;
state: string;
lastRunOn: string | null;
lastErrorCode: string | null;
}[];
deviceError: {
fileName: string;
programId: string | null;
line: number | null;
code: string;
} | null;
error: {
code: string;
message: string;
} | null;
settingsPending: boolean;
},
void,
any
>;

Kind: Subscription

Weight: 0

Subscribe to a program’s live state on its MC252, read about every intervalMs (at least 1000) while subscribed: the task’s period and duration statistics (ms), its variables (64-bit integers as decimal strings) and conditions grouped by the names the device compiled, with null for unknown values. Items past what the device exposes over Modbus are counted in unreadable. Needs editor access.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
programId: string;
intervalMs?: number;
};

Output

type Output = AsyncIterable<
| {
status: "live";
at: string;
taskIndex: number;
namesCurrent: boolean;
stats: {
period: {
min: number;
avg: number;
max: number;
};
duration: {
min: number;
avg: number;
max: number;
};
};
variables: {
name: string | null;
index: number;
values: (string | null)[];
}[];
conditions: {
name: string | null;
index: number;
values: (boolean | null)[];
}[];
unreadable: {
variables: number;
conditions: number;
};
}
| {
status: "not_running";
at: string;
}
| {
status: "unavailable";
at: string;
reason: "device_refused" | "offline" | "own_unit_off";
},
void,
any
>;

Kind: Mutation

Weight: 3

Begin MC252 physical confirmation for a PIN. Other SKUs return presenceRequired false. The on-screen code is not returned: someone at the device presses its R button or, when codeDisplayed is true, enters the 8-digit code from its screen. Then endpoint.create with challengeId before expiresAt. Pass endpointId only before endpoint.disconnectOtherWorkspaces.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
pinCode: string;
endpointId?: string;
};

Output

type Output =
| {
presenceRequired: false;
}
| {
presenceRequired: true;
challengeId: string;
expiresAt: string;
codeDisplayed: boolean;
};

Kind: Mutation

Weight: 3

Cancel an MC252 presence challenge and clear a displayed code from the device. Call this when the confirmation is abandoned.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
challengeId: string;
};

Output

type Output = {
cancelled: true;
};

Kind: Mutation

Weight: 3

Create a Modbus TCP endpoint. An MC252 PIN requires challengeId from endpoint.beginPinPresence plus a press of the R button on the device or, when shown, the code from the device screen.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input =
| {
workspaceId: string;
kind: "direct";
name: string | Record<string, string>;
description?: string | Record<string, string> | null;
hostname: string;
port?: number;
disabledSince?: string | null;
}
| {
workspaceId: string;
kind: "pin";
name: string | Record<string, string>;
description?: string | Record<string, string> | null;
pinCode: string;
challengeId?: string;
authorizationCode?: number;
disabledSince?: string | null;
}
| {
workspaceId: string;
kind: "wireguard";
name: string | Record<string, string>;
description?: string | Record<string, string> | null;
publicKey: string;
port?: number;
disabledSince?: string | null;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
kind: "direct" | "pin" | "wireguard";
protocol: "modbus-tcp";
hostname: string | null;
port: number;
pinCode: string | null;
publicKey: string | null;
sku: string | null;
deviceMeta: {
macAddress: string | null;
manufacturer: string | null;
} | null;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 3

Permanently delete an endpoint.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
deletedId: string;
};

Kind: Mutation

Weight: 3

Disable an endpoint.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
kind: "direct" | "pin" | "wireguard";
protocol: "modbus-tcp";
hostname: string | null;
port: number;
pinCode: string | null;
publicKey: string | null;
sku: string | null;
deviceMeta: {
macAddress: string | null;
manufacturer: string | null;
} | null;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 5

Delete PIN endpoints for this MC252 in other workspaces. First call endpoint.beginPinPresence with this endpoint’s pinCode and endpointId. Keeps this endpoint. Someone at the device presses its R button or, when codeDisplayed is true, enters the code from its screen.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
challengeId: string;
authorizationCode?: number;
};

Output

type Output = {
removedIds: string[];
};

Kind: Mutation

Weight: 5

Re-enable a disabled endpoint.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
kind: "direct" | "pin" | "wireguard";
protocol: "modbus-tcp";
hostname: string | null;
port: number;
pinCode: string | null;
publicKey: string | null;
sku: string | null;
deviceMeta: {
macAddress: string | null;
manufacturer: string | null;
} | null;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Query

Weight: 1

Get endpoint setup (host/port/settings). For live connection status use endpoint.status.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
kind: "direct" | "pin" | "wireguard";
protocol: "modbus-tcp";
hostname: string | null;
port: number;
pinCode: string | null;
publicKey: string | null;
sku: string | null;
deviceMeta: {
macAddress: string | null;
manufacturer: string | null;
} | null;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Query

Weight: 2

List endpoints (id, name, kind, host/PIN/WireGuard, sku, manufacturer, disabledSince).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
endpoints: {
id: string;
name: string | Record<string, string>;
kind: "direct" | "pin" | "wireguard";
hostname: string | null;
port: number;
pinCode: string | null;
sku: string | null;
deviceMeta: {
manufacturer: string;
} | null;
disabledSince: string | null;
revision: number;
}[];
};

Kind: Query

Weight: 1.5

Workspaces with a PIN endpoint for this MC252, including this one. Empty unless sku is mc252.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
};

Output

type Output = {
workspaces: {
id: string;
name: string;
current: boolean;
}[];
};

Kind: Query

Weight: 2

List endpoints (id, name, disabledSince).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
endpoints: EndpointSummary[];
};

Shared types: EndpointSummary

Kind: Query

Weight: 2

Current MC252 HTTP reachability, firmware, scheduler, SD card, and last contact per endpoint.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
endpoints: {
endpointId: string;
status: {
reachability: "offline" | "online" | "unknown";
checkedAt: string;
lastContactAt: string | null;
lastReachable: boolean | null;
firmwareCheckedAt: string | null;
firmware: {
manufacturerName: string;
labelName: string;
deviceId: number;
firmwareType: number;
firmwareVer: number;
releaseDate: string;
} | null;
scheduler: {
filesFound: number | null;
loadedOn: string | null;
heapUsedB: number | null;
errorFile: string | null;
errorLine: number | null;
errorCode: string | null;
tasks: {
sourceFile: string;
periodMs: number;
state: string;
lastRunOn: string | null;
lastErrorCode: string | null;
}[];
} | null;
card: {
capacityKb: number | null;
freeKb: number | null;
isMounted: boolean;
isInserted: boolean;
} | null;
} | null;
}[];
};

Kind: Mutation

Weight: 3

Interrupt a running modbusClassFind job.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
jobId: string;
};

Output

type Output = {
ok: true;
};

Kind: Mutation

Weight: 1.5

Stream progress for a running modbusClassFind job.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
jobId: string;
};

Output

type Output = AsyncGenerator<
| {
type: "progress";
jobId: string;
progress: {
phase: "classify" | "sync";
completed: number;
total: number;
uid: number | null;
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
type: "completed";
jobId: string;
result: {
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
type: "interrupted";
jobId: string;
result: {
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
type: "error";
jobId: string;
error: {
message: string;
code?: string;
detail?: unknown;
};
result?: {
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
type: "ping";
},
void,
any
>;

Kind: Mutation

Weight: 10

Identify devices on an MC252 RS-485 bus. Input: endpointId + devices[] from modbusFind or named UIDs (defaults 9600 / charFormat 5 / frameMode 0). Returns jobId; use jobs.wait. Requires microSD and PIN endpoint sku mc252.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
devices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
};

Output

type Output = {
jobId: string;
type: "modbusClassFind";
};

Kind: Mutation

Weight: 3

Interrupt a running modbusFind job.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
jobId: string;
};

Output

type Output = {
ok: true;
};

Kind: Mutation

Weight: 1.5

Stream progress for a running modbusFind job.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
jobId: string;
};

Output

type Output = AsyncGenerator<
| {
type: "progress";
jobId: string;
progress: {
triesPass: number;
triesTotal: number;
foundDevices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
uid: number | null;
baudRate: number | null;
charFormat: number | null;
frameMode: number | null;
deviceStatus: "BUSY" | "DONE";
};
}
| {
type: "completed";
jobId: string;
result: {
triesPass: number;
triesTotal: number;
foundDevices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
};
}
| {
type: "interrupted";
jobId: string;
result: {
triesPass: number;
triesTotal: number;
foundDevices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
};
}
| {
type: "error";
jobId: string;
error: {
message: string;
code?: string;
detail?: unknown;
};
result?: {
triesPass: number;
triesTotal: number;
foundDevices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
};
}
| {
type: "ping";
},
void,
any
>;

Kind: Mutation

Weight: 5

Start an MC252 RS-485 search. Returns jobId; use jobs.wait for foundDevices (uid + baud/format). Defaults: 9600 baud, charFormat 5 AUTO-STOP, RTU. PIN endpoints with sku mc252 only.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
baudRate?: number;
charFormat?: number;
frameMode?: number;
fastSearch?: boolean;
};

Output

type Output = {
jobId: string;
type: "modbusFind";
};

Kind: Mutation

Weight: 5

Read Modbus registers, coils or discrete inputs of an endpoint by address, for registers no parameter maps. Up to 32 reads per call (125 registers or 2000 bits each); each read fails on its own. Needs editor access.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
items: {
unitId: number;
table: "coil" | "discrete-input" | "holding-register" | "input-register";
address: number;
quantity: number;
}[];
};

Output

type Output = {
results: (
| {
status: "ok";
values: number[];
}
| {
status: "error";
error:
| {
message: string;
code:
| "atomic_unsatisfiable"
| "bad_request"
| "connector_rejected"
| "cycle_detected"
| "decode_error"
| "depth_exceeded"
| "encode_error"
| "endpoint_disconnected"
| "endpoint_not_found"
| "formula_error"
| "internal_error"
| "modbus_exception"
| "not_writable"
| "param_disabled"
| "param_not_found"
| "sparse_write_unsupported"
| "timeout"
| "unsupported_value_type"
| "workspace_disabled";
reason?: never;
params?: Record<string, string | number | null>;
}
| {
message: string;
code: "decode_error";
reason: "value_unavailable";
params: {
paramId?: string;
};
}
| {
message: string;
code: "decode_error";
reason: "timestamp_unavailable";
params: {
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_below_min";
params: {
value: string;
min: string | number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_exceeds_max";
params: {
value: string;
max: string | number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_number";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_integer";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_bigint";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_not_allowed";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_too_short";
params: {
length: number;
minLength: number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_too_long";
params: {
length: number;
maxLength: number;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_settings_invalid";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_disabled";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_status_unavailable";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_connect_failed";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_connection_lost";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "timeout";
reason: "device_response_timeout";
params: {
endpointId: string;
timeoutMs: number;
unitId?: number;
paramId?: string;
};
}
| {
message: string;
code: "timeout";
reason: "request_queue_timeout";
params: {
endpointId: string;
timeoutMs: number;
paramId?: string;
};
}
| {
message: string;
code: "connector_rejected";
reason: "request_queue_full";
params: {
endpointId: string;
maxQueuedAdus: number;
paramId?: string;
};
}
| {
message: string;
code: "connector_rejected";
reason: "request_too_large";
params: {
endpointId: string;
aduBytes: number;
maxTcpPacketSize: number;
paramId?: string;
};
}
| {
message: string;
code: "internal_error";
reason: "service_not_ready";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "internal_error";
reason: "parameter_source_invalid";
params: {
paramId: string;
};
}
| {
message: string;
code: "internal_error";
reason: "parameter_value_type_invalid";
params: {
paramId: string;
};
}
| {
message: string;
code: "timeout";
reason: "request_service_timeout";
params?: never;
}
| {
message: string;
code: "decode_error";
reason: "device_response_invalid";
params: {
endpointId: string;
unitId: number;
functionCode?: number;
table?: string;
address?: number;
quantity?: number;
paramId?: string;
};
};
}
)[];
};

Kind: Query

Weight: 1.5

Check whether the R button on the MC252 was pressed after this presence challenge started. Does not consume the challenge. When pressed is true, call endpoint.create or endpoint.disconnectOtherWorkspaces without authorizationCode.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
challengeId: string;
};

Output

type Output = {
pressed: boolean;
};

Kind: Query

Weight: 2

Search endpoints by name (the query input). Returns at most 25 matches.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
match?: "exact" | "includes";
caseSensitive?: boolean;
workspaceId: string;
query: string;
};

Output

type Output = {
matches: EndpointSummary[];
hasMore: boolean;
};

Shared types: EndpointSummary

Kind: Query

Weight: 2

Current connection status of every endpoint in a workspace (state, active address, connectedAt, lastError; null until the first status arrives).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
endpoints: {
endpointId: string;
status:
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "connected";
connectedAt: string;
lastError: null;
}
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "error";
connectedAt: null;
lastError: {
message: string;
reason?:
| "endpoint_connect_failed"
| "endpoint_connection_lost"
| "endpoint_settings_invalid"
| "endpoint_vpn_pending"
| "invalid_request"
| "protocol_error";
at: string;
};
}
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "connecting" | "disconnected";
connectedAt: null;
lastError: {
message: string;
reason?:
| "endpoint_connect_failed"
| "endpoint_connection_lost"
| "endpoint_settings_invalid"
| "endpoint_vpn_pending"
| "invalid_request"
| "protocol_error";
at: string;
} | null;
}
| null;
}[];
};

Kind: Subscription

Weight: 0

Subscribe to live Modbus traffic of one endpoint (requests, sent and received ADUs as hex, connection events). No history.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
endpointId: string;
channels?: ("events" | "rx" | "sent" | "tx")[];
};

Output

type Output = AsyncIterable<
| {
channel: "rx" | "sent" | "tx";
at: string;
data: string;
id: string | null;
write: string | null;
}
| {
channel: "events";
at: string;
event:
| {
kind: "connected" | "connecting" | "disconnected" | "retrying";
}
| {
kind: "error";
message: string;
id?: string;
reason:
| "endpoint_connect_failed"
| "endpoint_connection_lost"
| "endpoint_settings_invalid"
| "invalid_request"
| "protocol_error";
}
| {
kind: "error";
message: string;
id?: string;
reason: "device_response_timeout" | "request_queue_timeout";
timeoutMs: number;
}
| {
kind: "error";
message: string;
id?: string;
reason: "request_queue_full";
maxQueuedAdus: number;
}
| {
kind: "error";
message: string;
id?: string;
reason: "request_too_large";
aduBytes: number;
maxTcpPacketSize: number;
};
},
void,
any
>;

Kind: Mutation

Weight: 5

Update endpoint name, hostname, port, or TCP settings.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
name?: string | Record<string, string>;
description?: string | Record<string, string> | null;
hostname?: string;
port?: number;
settings?: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
kind: "direct" | "pin" | "wireguard";
protocol: "modbus-tcp";
hostname: string | null;
port: number;
pinCode: string | null;
publicKey: string | null;
sku: string | null;
deviceMeta: {
macAddress: string | null;
manufacturer: string | null;
} | null;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Subscription

Weight: 0

Subscribe to MC252 HTTP status: a snapshot, then changes, including stale observations becoming unknown.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = AsyncIterable<
| {
type: "snapshot";
endpoints: {
endpointId: string;
status: {
reachability: "offline" | "online" | "unknown";
checkedAt: string;
lastContactAt: string | null;
lastReachable: boolean | null;
firmwareCheckedAt: string | null;
firmware: {
manufacturerName: string;
labelName: string;
deviceId: number;
firmwareType: number;
firmwareVer: number;
releaseDate: string;
} | null;
scheduler: {
filesFound: number | null;
loadedOn: string | null;
heapUsedB: number | null;
errorFile: string | null;
errorLine: number | null;
errorCode: string | null;
tasks: {
sourceFile: string;
periodMs: number;
state: string;
lastRunOn: string | null;
lastErrorCode: string | null;
}[];
} | null;
card: {
capacityKb: number | null;
freeKb: number | null;
isMounted: boolean;
isInserted: boolean;
} | null;
} | null;
}[];
}
| {
type: "change";
endpointId: string;
status: {
reachability: "offline" | "online" | "unknown";
checkedAt: string;
lastContactAt: string | null;
lastReachable: boolean | null;
firmwareCheckedAt: string | null;
firmware: {
manufacturerName: string;
labelName: string;
deviceId: number;
firmwareType: number;
firmwareVer: number;
releaseDate: string;
} | null;
scheduler: {
filesFound: number | null;
loadedOn: string | null;
heapUsedB: number | null;
errorFile: string | null;
errorLine: number | null;
errorCode: string | null;
tasks: {
sourceFile: string;
periodMs: number;
state: string;
lastRunOn: string | null;
lastErrorCode: string | null;
}[];
} | null;
card: {
capacityKb: number | null;
freeKb: number | null;
isMounted: boolean;
isInserted: boolean;
} | null;
} | null;
},
void,
any
>;

Kind: Subscription

Weight: 0

Subscribe to endpoint connection status in a workspace: a snapshot, then each change.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = AsyncIterable<
| {
type: "snapshot";
endpoints: {
endpointId: string;
status:
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "connected";
connectedAt: string;
lastError: null;
}
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "error";
connectedAt: null;
lastError: {
message: string;
reason?:
| "endpoint_connect_failed"
| "endpoint_connection_lost"
| "endpoint_settings_invalid"
| "endpoint_vpn_pending"
| "invalid_request"
| "protocol_error";
at: string;
};
}
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "connecting" | "disconnected";
connectedAt: null;
lastError: {
message: string;
reason?:
| "endpoint_connect_failed"
| "endpoint_connection_lost"
| "endpoint_settings_invalid"
| "endpoint_vpn_pending"
| "invalid_request"
| "protocol_error";
at: string;
} | null;
}
| null;
}[];
}
| {
type: "change";
endpointId: string;
status:
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "connected";
connectedAt: string;
lastError: null;
}
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "error";
connectedAt: null;
lastError: {
message: string;
reason?:
| "endpoint_connect_failed"
| "endpoint_connection_lost"
| "endpoint_settings_invalid"
| "endpoint_vpn_pending"
| "invalid_request"
| "protocol_error";
at: string;
};
}
| {
endpointId: string;
updatedAt: string;
remote: {
hostname: string;
port: number;
} | null;
state: "connecting" | "disconnected";
connectedAt: null;
lastError: {
message: string;
reason?:
| "endpoint_connect_failed"
| "endpoint_connection_lost"
| "endpoint_settings_invalid"
| "endpoint_vpn_pending"
| "invalid_request"
| "protocol_error";
at: string;
} | null;
}
| null;
},
void,
any
>;

Kind: Query

Weight: 1

WireGuard client configuration of a WireGuard endpoint, without the private key.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
conf: string;
address: string;
endpoint: string;
serverPublicKey: string;
};

Kind: Query

Weight: 1

Get an editable dashboard drawing and content revision.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
dashboardId: string;
drawingId: string;
};

Output

type Output = {
document: {
version: 2;
title: string | Record<string, string>;
background: string;
grid: number;
viewBox?: {
x: number;
y: number;
width: number;
height: number;
};
elements: (
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "symbol";
symbolId: string;
mirrorX?: boolean;
mirrorY?: boolean;
properties: Record<string, string | number | boolean | Record<string, string>>;
propertyBindings: (
| {
property: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "value";
digits?: number;
}
| {
property: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "states";
states: {
value: number | boolean;
state: string;
}[];
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
property: string;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
property: string;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
property: string;
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
property: string;
}
)[];
actions?: Record<
string,
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
>;
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "ellipse" | "group" | "junction" | "rectangle" | "rounded-rectangle" | "text";
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "polygon";
points: {
x: number;
y: number;
}[];
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "image";
assetId: string;
}
)[];
connectors: {
id: string;
name: string;
layer?: number;
parentId?: string | null;
locked?: boolean;
from:
| {
elementId: string;
port: string;
}
| {
x: number;
y: number;
};
to:
| {
elementId: string;
port: string;
}
| {
x: number;
y: number;
};
route: "curve" | "orthogonal" | "straight";
bends: {
x: number;
y: number;
}[];
arrow: boolean;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
}[];
slots: {
id: string;
name: string;
parameterId: string | null;
}[];
} | null;
revision: string | null;
};

Kind: Query

Weight: 2

List workspace graphics image assets.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
images: {
id: string;
path: string;
revision: string;
mimeType: "image/jpeg" | "image/png";
}[];
};

Kind: Mutation

Weight: 3

Save a drawing using its expected revision. Preserves dashboard metadata and other drawings. Rejects symbol errors as graphics_invalid_document with details.issues; returns warnings on untouched objects.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
dashboardId: string;
drawingId: string;
document: {
version: 2;
title: string | Record<string, string>;
background: string;
grid: number;
viewBox?: {
x: number;
y: number;
width: number;
height: number;
};
elements: (
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "symbol";
symbolId: string;
mirrorX?: boolean;
mirrorY?: boolean;
properties: Record<string, string | number | boolean | Record<string, string>>;
propertyBindings: (
| {
property: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "value";
digits?: number;
}
| {
property: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "states";
states: {
value: number | boolean;
state: string;
}[];
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
property: string;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
property: string;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
property: string;
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
property: string;
}
)[];
actions?: Record<
string,
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
>;
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "ellipse" | "group" | "junction" | "rectangle" | "rounded-rectangle" | "text";
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "polygon";
points: {
x: number;
y: number;
}[];
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "image";
assetId: string;
}
)[];
connectors: {
id: string;
name: string;
layer?: number;
parentId?: string | null;
locked?: boolean;
from:
| {
elementId: string;
port: string;
}
| {
x: number;
y: number;
};
to:
| {
elementId: string;
port: string;
}
| {
x: number;
y: number;
};
route: "curve" | "orthogonal" | "straight";
bends: {
x: number;
y: number;
}[];
arrow: boolean;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
}[];
slots: {
id: string;
name: string;
parameterId: string | null;
}[];
};
expectedRevision: string | null;
};

Output

type Output = {
document: {
version: 2;
title: string | Record<string, string>;
background: string;
grid: number;
viewBox?: {
x: number;
y: number;
width: number;
height: number;
};
elements: (
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "symbol";
symbolId: string;
mirrorX?: boolean;
mirrorY?: boolean;
properties: Record<string, string | number | boolean | Record<string, string>>;
propertyBindings: (
| {
property: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "value";
digits?: number;
}
| {
property: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "states";
states: {
value: number | boolean;
state: string;
}[];
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
property: string;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
property: string;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
property: string;
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
property: string;
}
)[];
actions?: Record<
string,
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
>;
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "ellipse" | "group" | "junction" | "rectangle" | "rounded-rectangle" | "text";
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "polygon";
points: {
x: number;
y: number;
}[];
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "image";
assetId: string;
}
)[];
connectors: {
id: string;
name: string;
layer?: number;
parentId?: string | null;
locked?: boolean;
from:
| {
elementId: string;
port: string;
}
| {
x: number;
y: number;
};
to:
| {
elementId: string;
port: string;
}
| {
x: number;
y: number;
};
route: "curve" | "orthogonal" | "straight";
bends: {
x: number;
y: number;
}[];
arrow: boolean;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
}[];
slots: {
id: string;
name: string;
parameterId: string | null;
}[];
};
revision: string | null;
issues: {
severity: "error" | "warning";
code:
| "invalid_property_value"
| "invalid_rotation"
| "invalid_size"
| "off_grid_port"
| "off_grid_position"
| "unknown_port"
| "unknown_property"
| "unknown_symbol";
drawingId?: string;
elementId: string;
connectorId?: string;
symbolId: string;
property?: string;
port?: string;
allowed?: string[];
schema?: {
type: "boolean" | "integer" | "number" | "string";
enum?: string[];
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
minLength?: number;
maxLength?: number;
pattern?: string;
default?: string | number | boolean;
};
expected?:
| number
| {
x: number;
y: number;
}
| {
width: number;
height: number;
};
}[];
};

Kind: Query

Weight: 0

Built-in graphics symbol details: variants, properties with values and labels, essential bindings, ports, size, grid, and examples.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
ids: string[];
locale?: "de" | "en" | "pl" | "ru" | "uk";
};

Output

type Output = {
symbols: {
id: string;
name: string;
family?: string;
category:
| "air-handling"
| "buildings-storage"
| "controls-indicators"
| "electrical"
| "filters-separators"
| "heating-cooling"
| "instruments"
| "machines"
| "material-handling"
| "pumps-motors"
| "tanks-vessels"
| "uncategorized"
| "valves";
industries: (
| "agriculture"
| "compressed-air"
| "controls"
| "energy"
| "food-beverage"
| "fuel-gas"
| "heating"
| "hvac"
| "manufacturing"
| "power"
| "pumping"
| "quarries"
| "temperature"
| "warehouses"
| "waste-recycling"
| "wastewater"
| "water"
)[];
description: string;
keywords: string[];
variants: {
id: string;
name: string;
properties: Record<string, string | number | boolean>;
}[];
properties: {
name: string;
label: string;
schema: {
type: "boolean" | "integer" | "number" | "string";
enum?: string[];
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
minLength?: number;
maxLength?: number;
pattern?: string;
default?: string | number | boolean;
};
choices?: {
value: string;
label: string;
}[];
unit?: string;
localized?: true;
essential: boolean;
}[];
ports: {
id: string;
x: number;
y: number;
anchorX?: "center" | "end" | "scale" | "start";
anchorY?: "center" | "end" | "scale" | "start";
role?: "air" | "electrical" | "material" | "process" | "signal";
direction?: "both" | "in" | "out";
}[];
width: number;
height: number;
stretch: boolean;
grid?: {
base: 10;
minScale?: number;
maxScale?: number;
minWidth?: number;
minHeight?: number;
maxWidth?: number;
maxHeight?: number;
};
actions: {
id: string;
label: string;
}[];
examples: {
id: string;
name: string;
properties: Record<string, string | number | boolean>;
}[];
}[];
unknown: string[];
};

Kind: Query

Weight: 0

Search built-in graphics symbols by text, category, and industry. Returns a compact list; get details with graphics.symbols.get.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
text?: string;
category?:
| "air-handling"
| "buildings-storage"
| "controls-indicators"
| "electrical"
| "filters-separators"
| "heating-cooling"
| "instruments"
| "machines"
| "material-handling"
| "pumps-motors"
| "tanks-vessels"
| "valves";
industry?:
| "agriculture"
| "compressed-air"
| "controls"
| "energy"
| "food-beverage"
| "fuel-gas"
| "heating"
| "hvac"
| "manufacturing"
| "power"
| "pumping"
| "quarries"
| "temperature"
| "warehouses"
| "waste-recycling"
| "wastewater"
| "water";
locale?: "de" | "en" | "pl" | "ru" | "uk";
};

Output

type Output = {
symbols: {
id: string;
name: string;
family?: string;
category:
| "air-handling"
| "buildings-storage"
| "controls-indicators"
| "electrical"
| "filters-separators"
| "heating-cooling"
| "instruments"
| "machines"
| "material-handling"
| "pumps-motors"
| "tanks-vessels"
| "uncategorized"
| "valves";
industries: (
| "agriculture"
| "compressed-air"
| "controls"
| "energy"
| "food-beverage"
| "fuel-gas"
| "heating"
| "hvac"
| "manufacturing"
| "power"
| "pumping"
| "quarries"
| "temperature"
| "warehouses"
| "waste-recycling"
| "wastewater"
| "water"
)[];
description: string;
variants: {
id: string;
name: string;
}[];
}[];
};

Kind: Mutation

Weight: 1.5

Check built-in symbol IDs, properties, line ports, rotation, and grid alignment without saving. Objects changed since the saved drawing give errors, untouched ones warnings.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
dashboardId: string;
drawingId: string;
document: {
version: 2;
title: string | Record<string, string>;
background: string;
grid: number;
viewBox?: {
x: number;
y: number;
width: number;
height: number;
};
elements: (
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "symbol";
symbolId: string;
mirrorX?: boolean;
mirrorY?: boolean;
properties: Record<string, string | number | boolean | Record<string, string>>;
propertyBindings: (
| {
property: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "value";
digits?: number;
}
| {
property: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "states";
states: {
value: number | boolean;
state: string;
}[];
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
property: string;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
property: string;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
property: string;
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
property: string;
}
)[];
actions?: Record<
string,
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
>;
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "ellipse" | "group" | "junction" | "rectangle" | "rounded-rectangle" | "text";
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "polygon";
points: {
x: number;
y: number;
}[];
}
| {
id: string;
name: string;
x: number;
y: number;
width: number;
height: number;
rotation: number;
parentId: string | null;
locked: boolean;
layer?: number;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
kind: "image";
assetId: string;
}
)[];
connectors: {
id: string;
name: string;
layer?: number;
parentId?: string | null;
locked?: boolean;
from:
| {
elementId: string;
port: string;
}
| {
x: number;
y: number;
};
to:
| {
elementId: string;
port: string;
}
| {
x: number;
y: number;
};
route: "curve" | "orthogonal" | "straight";
bends: {
x: number;
y: number;
}[];
arrow: boolean;
appearance: {
fill: string;
stroke: string;
strokeWidth: number;
opacity: number;
text: string | Record<string, string>;
fontSize: number;
fillLevel: number;
visible: boolean;
animated: boolean;
};
bindings: (
| {
property: "text";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "format";
digits: number;
prefix: string | Record<string, string>;
suffix: string | Record<string, string>;
}
| {
property: "fillLevel" | "height" | "opacity" | "rotation" | "width";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "scale";
inputMin: number;
inputMax: number;
outputMin: number;
outputMax: number;
}
| {
property: "fill" | "stroke";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "thresholds";
fallback: string;
stops: {
atLeast: number;
color: string;
}[];
}
| {
operator: "eq" | "gt" | "gte" | "lt" | "lte" | "ne";
value: number;
property: "animated" | "visible";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
kind: "condition";
}
)[];
action:
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "command";
value: string;
label: string | Record<string, string>;
}
| {
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
confirm: boolean;
kind: "toggle";
status:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
onValue: string;
offValue: string;
onLabel: string | Record<string, string>;
offLabel: string | Record<string, string>;
}
| {
kind: "parameter";
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "slot";
slotId: string;
};
mode: "details" | "history" | "write";
}
| {
path?: string;
search?: string;
hash?: string;
kind: "dashboard";
dashboardId: string;
}
| null;
}[];
slots: {
id: string;
name: string;
parameterId: string | null;
}[];
};
};

Output

type Output = {
issues: {
severity: "error" | "warning";
code:
| "invalid_property_value"
| "invalid_rotation"
| "invalid_size"
| "off_grid_port"
| "off_grid_position"
| "unknown_port"
| "unknown_property"
| "unknown_symbol";
drawingId?: string;
elementId: string;
connectorId?: string;
symbolId: string;
property?: string;
port?: string;
allowed?: string[];
schema?: {
type: "boolean" | "integer" | "number" | "string";
enum?: string[];
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
minLength?: number;
maxLength?: number;
pattern?: string;
default?: string | number | boolean;
};
expected?:
| number
| {
x: number;
y: number;
}
| {
width: number;
height: number;
};
}[];
};

Kind: Query

Weight: 0

Check that the API is reachable.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
name?: string;
};

Output

type Output = {
name: string;
};

Kind: Mutation

Weight: 3

File a Helpdesk ticket for this account.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only tickets of the authenticated account. No workspace access is required.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
category: "billing_issue" | "device_support" | "feature_request" | "technical_issue";
title: string;
body: string;
};

Output

type Output = {
ticketUuid: string;
displaySerial: string;
publicUrl: string;
};

Kind: Query

Weight: 2

List Helpdesk tickets this account filed.

Access

Authenticated account; workspace-scoped API keys cannot call this procedure. Covers only tickets of the authenticated account. No workspace access is required.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for a workspace-scoped API key or an account without product admission. When ticket statuses cannot be retrieved, the tickets are still listed, with an unknown status. Unexpected failures return INTERNAL_SERVER_ERROR.

Input

type Input = void;

Output

type Output = {
tickets: {
id: string;
displaySerial: string;
title: string;
category: "billing_issue" | "device_support" | "feature_request" | "technical_issue";
createdAt: string;
publicUrl: string;
status: "closed" | "in_progress" | "new" | null;
}[];
};

Kind: Query

Weight: 1.5

Wait for one job started by the current user. Call after an API returns a jobId. Completed, failed, or interrupted jobs return immediately. It also waits for an MC252 program deploy (deployJobIds) in a workspace the caller can read.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
jobId: string;
};

Output

type Output =
| {
jobId: string;
jobType: "modbusFind";
status: "running";
progress?: {
triesPass: number;
triesTotal: number;
foundDevices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
uid: number | null;
baudRate: number | null;
charFormat: number | null;
frameMode: number | null;
deviceStatus: "BUSY" | "DONE";
};
}
| {
jobId: string;
jobType: "modbusClassFind";
status: "running";
progress?: {
phase: "classify" | "sync";
completed: number;
total: number;
uid: number | null;
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
jobId: string;
jobType: "pdfIngest";
status: "running";
progress?: {
pagesProcessed: number;
pagesTotal: number;
pagesFailed: number;
ocrRetryAt?: string;
};
}
| {
jobId: string;
jobType: "xlsxIngest";
status: "running";
progress?: {
sheetsProcessed: number;
sheetsTotal: number;
sheetsFailed: number;
};
}
| {
jobId: string;
jobType: string;
status: "running";
presentation: "generic";
}
| {
jobId: string;
jobType: "modbusClassFind";
status: "failed";
error: {
message: string;
code?: string;
detail?: unknown;
};
result?: {
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
jobId: string;
jobType: "modbusFind";
status: "completed" | "interrupted";
result: {
triesPass: number;
triesTotal: number;
foundDevices: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
}[];
};
}
| {
jobId: string;
jobType: "modbusClassFind";
status: "completed" | "interrupted";
result: {
results: {
uid: number;
baudRate: number;
charFormat: number;
frameMode: number;
classId: string | null;
errorCode?: string;
diagnostics?: {
mbReqPassed?: number;
checksPassed?: number;
linesPassed?: number;
scriptTime?: string | null;
scriptVersion?: string | null;
};
match: {
title: string | Record<string, string>;
templateId?: string;
candidates?: string[];
docsPath?: string;
} | null;
}[];
};
}
| {
jobId: string;
jobType: "pdfIngest";
status: "completed" | "interrupted";
result: {
destName: string;
pagesTotal: number;
pagesFailed: number[];
};
}
| {
jobId: string;
jobType: "xlsxIngest";
status: "completed" | "interrupted";
result: {
destName: string;
sheetsTotal: number;
sheetsFailed: number[];
};
}
| {
jobId: string;
jobType: "modbusFind" | "pdfIngest" | "xlsxIngest";
status: "failed";
error: {
message: string;
code?: string;
detail?: unknown;
};
}
| {
jobId: string;
jobType: string;
status: "completed" | "interrupted";
presentation: "generic";
result?: unknown;
}
| {
jobId: string;
jobType: string;
status: "failed";
presentation: "generic";
error: {
message: string;
code?: string;
detail?: unknown;
};
};

Kind: Query

Weight: 1

Get the Maps JavaScript API key and cloud map ID for the current theme, scoped to a dashboard or workspace settings.

Access

With a dashboardId, anyone who can open that dashboard in the workspace. With a null dashboardId (the workspace settings map), workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
dashboardId: string | null;
theme: "dark" | "light";
};

Output

type Output = {
apiKey: string;
mapId: string;
};

Kind: Query

Weight: 1

Reverse-geocode coordinates to a single address line.

Access

With a dashboardId, anyone who can open that dashboard in the workspace. With a null dashboardId (the workspace settings map), workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
dashboardId: string | null;
lat: number;
lng: number;
locale: "de" | "en" | "pl" | "ru" | "uk";
};

Output

type Output = {
address: string | null;
};

Kind: Mutation

Weight: 3

Confirm the number a verification code was sent to with that code; SMS notifications then go to it. Turn SMS on with saveChannel.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
code: string;
};

Output

type Output = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
localizationConfirmed: boolean;
channels: {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
connected: boolean;
}[];
mutedWorkspaceIds: string[];
phone: string | null;
phoneChallenge: {
phone: string;
expiresAt: string;
resendAt: string;
} | null;
telegramAvailable: boolean;
telegram: {
username: string | null;
name: string;
connectedAt: string;
} | null;
};

Kind: Mutation

Weight: 3

Disconnect your Telegram account: notifications stop going there and the bot no longer acts for you. A security notice is emailed to you.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
localizationConfirmed: boolean;
channels: {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
connected: boolean;
}[];
mutedWorkspaceIds: string[];
phone: string | null;
phoneChallenge: {
phone: string;
expiresAt: string;
resendAt: string;
} | null;
telegramAvailable: boolean;
telegram: {
username: string | null;
name: string;
connectedAt: string;
} | null;
};

Kind: Mutation

Weight: 3

Remove your SMS number and any pending verification code, and turn SMS notifications off.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
localizationConfirmed: boolean;
channels: {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
connected: boolean;
}[];
mutedWorkspaceIds: string[];
phone: string | null;
phoneChallenge: {
phone: string;
expiresAt: string;
resendAt: string;
} | null;
telegramAvailable: boolean;
telegram: {
username: string | null;
name: string;
connectedAt: string;
} | null;
};

Kind: Mutation

Weight: 3

Send a verification code by SMS to a mobile number in international format, to use it for SMS notifications. Replaces any code sent before; a confirmed number stays until the new one is confirmed. Numbers in the EU and EEA, Switzerland, the United Kingdom and Ukraine are supported.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
phone: string;
};

Output

type Output = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
localizationConfirmed: boolean;
channels: {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
connected: boolean;
}[];
mutedWorkspaceIds: string[];
phone: string | null;
phoneChallenge: {
phone: string;
expiresAt: string;
resendAt: string;
} | null;
telegramAvailable: boolean;
telegram: {
username: string | null;
name: string;
connectedAt: string;
} | null;
};

Kind: Mutation

Weight: 3

Turn a notification channel on or off and set the lowest severity it delivers (info < warning < urgent). Takes effect for notifications not yet delivered. SMS and Telegram can be turned on only once set up. System email (sign-in codes, invitations, security notices) is always sent.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
};

Output

type Output = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
localizationConfirmed: boolean;
channels: {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
connected: boolean;
}[];
mutedWorkspaceIds: string[];
phone: string | null;
phoneChallenge: {
phone: string;
expiresAt: string;
resendAt: string;
} | null;
telegramAvailable: boolean;
telegram: {
username: string | null;
name: string;
connectedAt: string;
} | null;
};

Kind: Mutation

Weight: 3

Set the language of your notifications and system email (sign-in codes, invitations, security notices), and the IANA time zone notification times are shown in. System email keeps showing times in UTC.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
};

Output

type Output = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
localizationConfirmed: boolean;
channels: {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
connected: boolean;
}[];
mutedWorkspaceIds: string[];
phone: string | null;
phoneChallenge: {
phone: string;
expiresAt: string;
resendAt: string;
} | null;
telegramAvailable: boolean;
telegram: {
username: string | null;
name: string;
connectedAt: string;
} | null;
};

Kind: Mutation

Weight: 3

Set or remove (null) a workspace’s monthly SMS spending cap in euros, rounded to cents (admins and owners). Once the month’s SMS reach it, no more SMS notifications are sent for the workspace until the next UTC calendar month; owners and admins are told once.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
monthlyCapEur: number | null;
};

Output

type Output = {
monthlyCapEur: number | null;
spentThisMonthEur: number;
};

Kind: Query

Weight: 1.5

Get your notification settings: language and time zone, each channel (email, sms, telegram) with whether it is on, its minimum severity (info < warning < urgent) and whether it is set up, the workspaces you muted, your confirmed SMS number, and a number waiting for its SMS code. Muted workspaces reach you only in the app.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
localizationConfirmed: boolean;
channels: {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
connected: boolean;
}[];
mutedWorkspaceIds: string[];
phone: string | null;
phoneChallenge: {
phone: string;
expiresAt: string;
resendAt: string;
} | null;
telegramAvailable: boolean;
telegram: {
username: string | null;
name: string;
connectedAt: string;
} | null;
};

Kind: Mutation

Weight: 3

Mute or unmute a workspace for yourself. A muted workspace’s notifications reach you only in the app, never by email, SMS or Telegram. Takes effect for notifications not yet delivered.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
muted: boolean;
};

Output

type Output = {
locale: "de" | "en" | "pl" | "ru" | "uk";
timeZone: string;
localizationConfirmed: boolean;
channels: {
channel: "email" | "sms" | "telegram";
enabled: boolean;
minSeverity: "info" | "urgent" | "warning";
connected: boolean;
}[];
mutedWorkspaceIds: string[];
phone: string | null;
phoneChallenge: {
phone: string;
expiresAt: string;
resendAt: string;
} | null;
telegramAvailable: boolean;
telegram: {
username: string | null;
name: string;
connectedAt: string;
} | null;
};

Kind: Query

Weight: 1

Get a workspace’s monthly SMS spending cap in euros (null when it has none) and its SMS spending this UTC calendar month (admins and owners).

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
monthlyCapEur: number | null;
spentThisMonthEur: number;
};

Kind: Mutation

Weight: 3

Create a parameter in a workspace branch.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction: "always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs?: number | null;
};

Output

type Output = {
id: string;
workspaceId: string;
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction: "always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs: number | null;
sortOrder: number;
revision: number;
createdAt: string;
updatedAt: string;
deviceLog: {
pullMinutes: number;
lastImportAt: string | null;
completeThrough: string | null;
} | null;
};

Kind: Mutation

Weight: 3

Create a parameter branch. Root: { workspaceId, parentId: null, name }. Child: { parentId, name } only (no workspaceId).

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input =
| {
workspaceId: string;
parentId: null;
name: string | Record<string, string>;
}
| {
parentId: string;
name: string | Record<string, string>;
};

Output

type Output = {
id: string;
workspaceId: string;
parentId: string | null;
name: string | Record<string, string>;
sortOrder: number;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 10

Permanently delete selected parameters and branches. A report that snapshots a deleted parameter does not block it; report.preset.listByParameterIds lists those reports beforehand.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
paramIds: string[];
branchIds: string[];
paramBases?: Record<string, number>;
branchBases?: Record<string, number>;
};

Output

type Output = {
deletedParamIds: string[];
deletedBranchIds: string[];
};

Kind: Query

Weight: 1.5

Get parameter setup (source, valueType). For live values use parameter.readValues.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
id: string;
workspaceId: string;
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction: "always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs: number | null;
sortOrder: number;
revision: number;
createdAt: string;
updatedAt: string;
deviceLog: {
pullMinutes: number;
lastImportAt: string | null;
completeThrough: string | null;
} | null;
};

Kind: Query

Weight: 1

Get one parameter branch.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
id: string;
name: string | Record<string, string>;
parentId: string | null;
};

Kind: Query

Weight: 2

List branches (id, name, parentId). parentId: omit=all, null=roots, uuid=children.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parentId?: string | null;
};

Output

type Output = {
branches: ParameterBranchSummary[];
};

Shared types: ParameterBranchSummary

Kind: Query

Weight: 2

List all constant values of a workspace: each key with its value in base64, including empty values. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
entries: {
key: string;
value: string;
}[];
};

Kind: Query

Weight: 2

List parameters directly in one branch (not subtree).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
branchId: string;
};

Output

type Output = {
parameters: ParameterSummary[];
};

Shared types: ParameterSummary

Kind: Query

Weight: 5

Get a nested inventory of enabled parameters, with texts in the requested locale.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
locale?: string;
};

Output

type Output = ParameterListInventoryOutput;

Shared types: ParameterListInventoryOutput

Kind: Query

Weight: 10

Get the full parameter tree with every branch and parameter. Large; parameter.listInventory and parameter.searchByName return less.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
branches: ParameterTreeBranch[];
parameters: ParameterWithReadings[];
};

Shared types: ParameterTreeBranch, ParameterWithReadings

Kind: Mutation

Weight: 5

Read live parameter values.

Access

Workspace member, including view-only members.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
paramIds: string[];
};

Output

type Output = {
results: Record<
string,
| {
status: "ok";
kind?: "observation";
acquiredAt?: string;
value: string | Record<string, string>;
rawHex: string;
numberValue?: number;
boolValue?: boolean;
}
| {
status: "error";
error:
| {
message: string;
code:
| "atomic_unsatisfiable"
| "bad_request"
| "connector_rejected"
| "cycle_detected"
| "decode_error"
| "depth_exceeded"
| "encode_error"
| "endpoint_disconnected"
| "endpoint_not_found"
| "formula_error"
| "internal_error"
| "modbus_exception"
| "not_writable"
| "param_disabled"
| "param_not_found"
| "sparse_write_unsupported"
| "timeout"
| "unsupported_value_type"
| "workspace_disabled";
reason?: never;
params?: Record<string, string | number | null>;
}
| {
message: string;
code: "decode_error";
reason: "value_unavailable";
params: {
paramId?: string;
};
}
| {
message: string;
code: "decode_error";
reason: "timestamp_unavailable";
params: {
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_below_min";
params: {
value: string;
min: string | number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_exceeds_max";
params: {
value: string;
max: string | number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_number";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_integer";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_bigint";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_not_allowed";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_too_short";
params: {
length: number;
minLength: number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_too_long";
params: {
length: number;
maxLength: number;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_settings_invalid";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_disabled";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_status_unavailable";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_connect_failed";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_connection_lost";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "timeout";
reason: "device_response_timeout";
params: {
endpointId: string;
timeoutMs: number;
unitId?: number;
paramId?: string;
};
}
| {
message: string;
code: "timeout";
reason: "request_queue_timeout";
params: {
endpointId: string;
timeoutMs: number;
paramId?: string;
};
}
| {
message: string;
code: "connector_rejected";
reason: "request_queue_full";
params: {
endpointId: string;
maxQueuedAdus: number;
paramId?: string;
};
}
| {
message: string;
code: "connector_rejected";
reason: "request_too_large";
params: {
endpointId: string;
aduBytes: number;
maxTcpPacketSize: number;
paramId?: string;
};
}
| {
message: string;
code: "internal_error";
reason: "service_not_ready";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "internal_error";
reason: "parameter_source_invalid";
params: {
paramId: string;
};
}
| {
message: string;
code: "internal_error";
reason: "parameter_value_type_invalid";
params: {
paramId: string;
};
}
| {
message: string;
code: "timeout";
reason: "request_service_timeout";
params?: never;
}
| {
message: string;
code: "decode_error";
reason: "device_response_invalid";
params: {
endpointId: string;
unitId: number;
functionCode?: number;
table?: string;
address?: number;
quantity?: number;
paramId?: string;
};
};
}
>;
};

Kind: Mutation

Weight: 5

Stream live parameter values as they arrive. Same input as readValues.

Access

Workspace member, including view-only members.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
paramIds: string[];
};

Output

type Output = AsyncGenerator<
| {
type: "result";
paramId: string;
result:
| {
status: "ok";
kind?: "observation";
acquiredAt?: string;
value: string | Record<string, string>;
rawHex: string;
numberValue?: number;
boolValue?: boolean;
}
| {
status: "error";
error:
| {
message: string;
code:
| "atomic_unsatisfiable"
| "bad_request"
| "connector_rejected"
| "cycle_detected"
| "decode_error"
| "depth_exceeded"
| "encode_error"
| "endpoint_disconnected"
| "endpoint_not_found"
| "formula_error"
| "internal_error"
| "modbus_exception"
| "not_writable"
| "param_disabled"
| "param_not_found"
| "sparse_write_unsupported"
| "timeout"
| "unsupported_value_type"
| "workspace_disabled";
reason?: never;
params?: Record<string, string | number | null>;
}
| {
message: string;
code: "decode_error";
reason: "value_unavailable";
params: {
paramId?: string;
};
}
| {
message: string;
code: "decode_error";
reason: "timestamp_unavailable";
params: {
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_below_min";
params: {
value: string;
min: string | number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_exceeds_max";
params: {
value: string;
max: string | number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_number";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_integer";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_bigint";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_not_allowed";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_too_short";
params: {
length: number;
minLength: number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_too_long";
params: {
length: number;
maxLength: number;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_settings_invalid";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_disabled";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_status_unavailable";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_connect_failed";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_connection_lost";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "timeout";
reason: "device_response_timeout";
params: {
endpointId: string;
timeoutMs: number;
unitId?: number;
paramId?: string;
};
}
| {
message: string;
code: "timeout";
reason: "request_queue_timeout";
params: {
endpointId: string;
timeoutMs: number;
paramId?: string;
};
}
| {
message: string;
code: "connector_rejected";
reason: "request_queue_full";
params: {
endpointId: string;
maxQueuedAdus: number;
paramId?: string;
};
}
| {
message: string;
code: "connector_rejected";
reason: "request_too_large";
params: {
endpointId: string;
aduBytes: number;
maxTcpPacketSize: number;
paramId?: string;
};
}
| {
message: string;
code: "internal_error";
reason: "service_not_ready";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "internal_error";
reason: "parameter_source_invalid";
params: {
paramId: string;
};
}
| {
message: string;
code: "internal_error";
reason: "parameter_value_type_invalid";
params: {
paramId: string;
};
}
| {
message: string;
code: "timeout";
reason: "request_service_timeout";
params?: never;
}
| {
message: string;
code: "decode_error";
reason: "device_response_invalid";
params: {
endpointId: string;
unitId: number;
functionCode?: number;
table?: string;
address?: number;
quantity?: number;
paramId?: string;
};
};
};
}
| {
type: "ping";
},
void,
any
>;

Kind: Query

Weight: 2

Search branches by name (the query input). parentId keeps only direct children of that branch, or root branches when null. Returns at most 25 matches.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
match?: "exact" | "includes";
caseSensitive?: boolean;
workspaceId: string;
query: string;
parentId?: string | null;
};

Output

type Output = {
matches: ParameterBranchSummary[];
hasMore: boolean;
};

Shared types: ParameterBranchSummary

Kind: Query

Weight: 2

Search parameters by display name in any language (the query input); mnemonics are not searched. branchId keeps only parameters directly in that branch, not in its sub-branches; omit it to search the whole workspace. Returns at most 25 matches.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
match?: "exact" | "includes";
caseSensitive?: boolean;
workspaceId: string;
query: string;
branchId?: string;
};

Output

type Output = {
matches: ParameterSummary[];
hasMore: boolean;
};

Shared types: ParameterSummary

Kind: Mutation

Weight: 3

Update parameter setup fields.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction: "always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs?: number | null;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction: "always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs: number | null;
sortOrder: number;
revision: number;
createdAt: string;
updatedAt: string;
deviceLog: {
pullMinutes: number;
lastImportAt: string | null;
completeThrough: string | null;
} | null;
};

Kind: Mutation

Weight: 3

Rename a parameter branch.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
name: string | Record<string, string>;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
parentId: string | null;
name: string | Record<string, string>;
sortOrder: number;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 5

Create or replace up to 500 constant values by key (base64, at most 1024 bytes decoded). Editors and above. When a key repeats, the last value wins. Keys not in the request are kept.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
entries: {
key: string;
value: string;
}[];
};

Output

type Output = {
upserted: number;
};

Kind: Mutation

Weight: 5

Write parameter values and return per-item acknowledgements, not observed readings. Read feedback separately.

Access

Workspace operator, editor, admin, or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
items: (
| {
paramId: string;
value: string;
}
| {
paramId: string;
rawHex: string;
}
)[];
};

Output

type Output = {
results: Record<
string,
| {
status: "error";
error:
| {
message: string;
code:
| "atomic_unsatisfiable"
| "bad_request"
| "connector_rejected"
| "cycle_detected"
| "decode_error"
| "depth_exceeded"
| "encode_error"
| "endpoint_disconnected"
| "endpoint_not_found"
| "formula_error"
| "internal_error"
| "modbus_exception"
| "not_writable"
| "param_disabled"
| "param_not_found"
| "sparse_write_unsupported"
| "timeout"
| "unsupported_value_type"
| "workspace_disabled";
reason?: never;
params?: Record<string, string | number | null>;
}
| {
message: string;
code: "decode_error";
reason: "value_unavailable";
params: {
paramId?: string;
};
}
| {
message: string;
code: "decode_error";
reason: "timestamp_unavailable";
params: {
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_below_min";
params: {
value: string;
min: string | number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_exceeds_max";
params: {
value: string;
max: string | number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_number";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_integer";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_invalid_bigint";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_not_allowed";
params: {
value: string;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_too_short";
params: {
length: number;
minLength: number;
paramId?: string;
};
}
| {
message: string;
code: "encode_error";
reason: "write_value_too_long";
params: {
length: number;
maxLength: number;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_settings_invalid";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_disabled";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_status_unavailable";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_connect_failed";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "endpoint_disconnected";
reason: "endpoint_connection_lost";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "timeout";
reason: "device_response_timeout";
params: {
endpointId: string;
timeoutMs: number;
unitId?: number;
paramId?: string;
};
}
| {
message: string;
code: "timeout";
reason: "request_queue_timeout";
params: {
endpointId: string;
timeoutMs: number;
paramId?: string;
};
}
| {
message: string;
code: "connector_rejected";
reason: "request_queue_full";
params: {
endpointId: string;
maxQueuedAdus: number;
paramId?: string;
};
}
| {
message: string;
code: "connector_rejected";
reason: "request_too_large";
params: {
endpointId: string;
aduBytes: number;
maxTcpPacketSize: number;
paramId?: string;
};
}
| {
message: string;
code: "internal_error";
reason: "service_not_ready";
params: {
endpointId: string;
paramId?: string;
};
}
| {
message: string;
code: "internal_error";
reason: "parameter_source_invalid";
params: {
paramId: string;
};
}
| {
message: string;
code: "internal_error";
reason: "parameter_value_type_invalid";
params: {
paramId: string;
};
}
| {
message: string;
code: "timeout";
reason: "request_service_timeout";
params?: never;
}
| {
message: string;
code: "decode_error";
reason: "device_response_invalid";
params: {
endpointId: string;
unitId: number;
functionCode?: number;
table?: string;
address?: number;
quantity?: number;
paramId?: string;
};
};
}
| {
status: "ok";
kind: "write-acknowledgement";
sourceKind: "const" | "modbus-tcp";
writtenAt: string;
value: string | Record<string, string>;
rawHex: string;
numberValue?: number;
boolValue?: boolean;
}
>;
};

Kind: Mutation

Weight: 5

Submit a problem report to Overvis support, optionally with a screenshot.

Access

Signed-in browser session; API keys are not accepted. No workspace access is required.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
submissionId: string;
message: string;
screenshot?: {
mediaType: "image/jpeg" | "image/png" | "image/webp";
dataBase64: string;
};
url?: string;
associatedEventId?: string;
replayId?: string;
traceId?: string;
diagnosticAuthorization?: {
expiresAt: number;
token: string;
};
};

Output

type Output = {
referenceId: string;
};

Kind: Query

Weight: 10

One aggregate value per requested parameter and aggregation over [from, to) (exclusive to); each value echoes its aggregation, and pairs without readings are omitted. Numeric: first/latest/average/delta/sum/min/max. Int/str: first/latest. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameters: {
parameterId: string;
sourceValueType: string;
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
}[];
from: number;
to: number;
};

Output

type Output = {
values: {
parameterId: string;
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
value: string | number;
repr?: string | null;
}[];
};

Kind: Query

Weight: 10

One row per completed interval (1s/1m/5m/15m/30m/1h/4h/1d); the interval in progress is left out, and with 1d so is today. timezone is an IANA name. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameters: {
parameterId: string;
sourceValueType: string;
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
}[];
from: number;
to: number;
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m";
timezone: string;
};

Output

type Output = {
rows: {
bucketStart: number;
values: {
parameterId: string;
value: string | number;
repr?: string | null;
}[];
}[];
};

Kind: Query

Weight: 10

Integer-only change-points for state duration: as-of at/before from, then in-window value changes through to. Consecutive equals collapsed. Over 50k returned points errors. No paging. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameters: {
parameterId: string;
sourceValueType: string;
}[];
from: number;
to: number;
};

Output

type Output = {
series: {
parameterId: string;
points: {
time: number;
value: string | number;
repr?: string | null;
}[];
}[];
};

Kind: Mutation

Weight: 20

Delete raw readings of one value-type family in the requested parameter time spans and wait until the deletion is visible. Admins and owners, like storage.deleteReadings. Affected historical aggregates are recalculated by default; set rebuildRollups to false to skip recalculation.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
sourceValueType: string;
ranges: {
parameterId: string;
from: number;
to: number;
}[];
rebuildRollups?: boolean;
};

Output

type Output = {
cleared: boolean;
};

Kind: Query

Weight: 10

One sparse row per local day intersecting [from, to); a day cut by from counts its delta from the last reading before from. Today is included up to its last completed hour, unlike readings.cadence with 1d. timezone is an IANA name. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameters: {
parameterId: string;
sourceValueType: string;
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
}[];
from: number;
to: number;
timezone: string;
};

Output

type Output = {
rows: {
bucketStart: number;
values: {
parameterId: string;
value: string | number;
repr?: string | null;
}[];
}[];
};

Kind: Query

Weight: 10

Exact stored readings for one parameter (rawHex + typed value) in inclusive [from, to]. Max 10k rows; when hasMore, pass next.afterTime and next.afterTimeSkip back to resume, including rows that share a timestamp. afterTime alone is an older exclusive cursor that skips the rest of that timestamp. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameterId: string;
sourceValueType: string;
from: number;
to: number;
afterTime?: number;
afterTimeSkip?: number;
limit?: number;
};

Output

type Output = {
hasMore: boolean;
points: (
| {
family: "num";
time: number;
rawHex: string;
value: number;
}
| {
family: "int";
time: number;
rawHex: string;
value: string | number;
repr?: string | null;
}
| {
family: "str";
time: number;
rawHex: string;
value: string;
}
| {
family: "bigint";
time: number;
rawHex: string;
value: string;
}
| {
family: "datetime";
time: number;
rawHex: string;
value: string;
}
| {
family: "geo";
time: number;
rawHex: string;
lat: number;
lon: number;
}
)[];
next?: {
afterTime: number;
afterTimeSkip: number;
};
};

Kind: Mutation

Weight: 10

Insert up to 10k exact raw readings for one value-type family. Editors and above. Parameters must exist and match the family. Empty rawHex allowed. Affected aggregates are recalculated; with rebuildParents false only 1-minute aggregates are, and readings.rebuildParentRollups recalculates the rest.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
sourceValueType: string;
points: (
| {
family: "num";
time: number;
rawHex: string;
value: number;
parameterId: string;
}
| {
family: "int";
time: number;
rawHex: string;
value: string | number;
repr?: string | null;
parameterId: string;
}
| {
family: "str";
time: number;
rawHex: string;
value: string;
parameterId: string;
}
| {
family: "bigint";
time: number;
rawHex: string;
value: string;
parameterId: string;
}
| {
family: "datetime";
time: number;
rawHex: string;
value: string;
parameterId: string;
}
| {
family: "geo";
time: number;
rawHex: string;
lat: number;
lon: number;
parameterId: string;
}
)[];
rebuildParents?: boolean;
};

Output

type Output = {
inserted: number;
};

Kind: Query

Weight: 10

Min/max points in [from, to] per parameter. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameters: {
parameterId: string;
sourceValueType: string;
}[];
from: number;
to: number;
};

Output

type Output = {
series: {
parameterId: string;
min: {
time: number;
value: string | number;
} | null;
max: {
time: number;
value: string | number;
} | null;
}[];
};

Kind: Mutation

Weight: 10

Which parameter ids already have at least one raw reading of the given value-type family in the requested time spans. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
sourceValueType: string;
ranges: {
parameterId: string;
from: number;
to: number;
}[];
};

Output

type Output = {
parameterIds: string[];
};

Kind: Query

Weight: 10

Raw points in inclusive [from, to]. Per-parameter maxPoints (default 10k) plus hasMore for paging. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameters: {
parameterId: string;
sourceValueType: string;
}[];
from: number;
to: number;
maxPoints?: number;
};

Output

type Output = {
series: {
parameterId: string;
hasMore: boolean;
points: {
time: number;
value: string | number;
repr?: string | null;
}[];
}[];
};

Kind: Subscription

Weight: 0

Subscribe to live readings as they are acquired. Readings imported with readings.insertExact or uploads are not sent.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameterIds: string[];
};

Output

type Output = AsyncIterable<
{
parameterId: string;
time: number;
value: string | number;
repr?: string | null;
},
void,
any
>;

Kind: Mutation

Weight: 10

Recalculate 5-minute to 1-hour aggregates from closed 1-minute aggregates for the given family spans. Editors and above. Use after readings.insertExact with rebuildParents false.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
sourceValueType: string;
ranges: {
parameterId: string;
from: number;
to: number;
}[];
};

Output

type Output = {
rebuilt: boolean;
};

Kind: Query

Weight: 10

Sampled readings for a chart: the latest reading in each of segmentCount equal segments of the window, plus one segment of the same width just before it. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameters: {
parameterId: string;
sourceValueType: string;
}[];
from: number;
to: number;
segmentCount: number;
};

Output

type Output = {
series: {
parameterId: string;
points: {
index: number;
time: number;
value: string | number;
repr?: string | null;
}[];
}[];
};

Kind: Query

Weight: 10

Earliest and latest reading times across the given parameter ids; from/to are null when none has readings. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameterIds: string[];
};

Output

type Output = {
from: number | null;
to: number | null;
};

Kind: Mutation

Weight: 3

Accept a workspace invitation for the current verified email.

Access

Signed-in browser session; API keys are not accepted. The invitation must be addressed to the account’s verified email.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
token: string;
};

Output

type Output = {
workspaceId: string;
};

Kind: Query

Weight: 0

List configured social authentication providers.

Access

Anyone: no session or API key is required.

Errors

None specific to the procedure. Unexpected failures return INTERNAL_SERVER_ERROR.

Input

type Input = void;

Output

type Output = {
google: boolean;
github: boolean;
};

Kind: Mutation

Weight: 3

Redeem an access code for the current verified account.

Access

Signed-in browser session; API keys are not accepted. The account’s email must be verified.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
token: string;
};

Output

type Output = {
success: true;
};

Kind: Query

Weight: 0

Validate a registration invitation or access code.

Access

Anyone: no session or API key is required.

Errors

BAD_REQUEST for an invalid, expired, or already used invitation or access code.

Input

type Input = {
token: string;
};

Output

type Output =
| {
kind: "access_code";
token: string;
}
| {
kind: "invitation";
token: string;
email: string;
workspaceName: string;
inviterName: string;
access: "admin" | "editor" | "operator" | "view_only";
expiresAt: string;
};

Kind: Mutation

Weight: 3

Create a report comment or signature on a preset (operators and above). The server sets the author and timestamps; digitalSignature is always null in the response.

Access

Workspace operator, editor, admin, or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
reportPresetId: string;
id?: string;
content: string;
dataRange: {
parameterId: string | null;
from: number;
to: number;
};
isSignature: boolean;
};

Output

type Output = {
id: string;
reportPresetId: string;
content: string;
author:
| {
kind: "user";
accountId: string;
}
| {
kind: "deleted-user";
}
| {
kind: "system";
}
| {
kind: "assistant";
};
createdAt: number;
updatedAt: number;
dataRange: {
parameterId: string | null;
from: number;
to: number;
};
isSignature: boolean;
digitalSignature: string | null;
};

Kind: Mutation

Weight: 3

Delete a report comment. Editors may delete any including signatures. Operators may delete only their own non-signature comments created after the latest signature on that preset.

Access

Workspace editor, admin or owner for any comment or signature. An operator may delete only their own non-signature comments created after the preset’s latest signature.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
id: string;
};

Kind: Query

Weight: 2

List all comments on a report preset (createdAt then id). digitalSignature is always null. Also returns viewerAccountId and authors [{accountId, name}] for authors whose accounts still exist.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
reportPresetId: string;
};

Output

type Output = {
reportComments: {
id: string;
reportPresetId: string;
content: string;
author:
| {
kind: "user";
accountId: string;
}
| {
kind: "deleted-user";
}
| {
kind: "system";
}
| {
kind: "assistant";
};
createdAt: number;
updatedAt: number;
dataRange: {
parameterId: string | null;
from: number;
to: number;
};
isSignature: boolean;
digitalSignature: string | null;
}[];
viewerAccountId: string;
authors: {
accountId: string;
name: string;
}[];
};

Kind: Mutation

Weight: 5

Create a history report preset from parameter snapshots (made with report.preset.freezeFromLive), representations, and layout. Omitted page options take the Setup defaults.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
id?: string;
title: string | Record<string, string>;
description?: string | Record<string, string> | null;
parameters?: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations?: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout?: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange?:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange?: boolean;
allowAddComments?: boolean;
displayCommentsSummary?: boolean;
allowSigning?: boolean;
allowRender?: boolean;
exportToCsv?: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton?: boolean;
timezone?: string;
};

Output

type Output = {
id: string;
workspaceId: string;
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
isTemporary: boolean;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 3

Create a temporary report in the cloud app from up to 20 parameter ids (operators and above); missing or unsupported ids are skipped. It has a chart, hourly or daily time buckets for numeric parameters (averages; differences for counterParameterIds), and a table. cadence 1h (default) covers the last day, 1d the last 31 days. Report lists show it after report.preset.saveTemporary.

Access

Workspace operator, editor, admin, or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameterIds: string[];
title: string | Record<string, string>;
counterParameterIds?: string[];
cadence?: "1d" | "1h";
};

Output

type Output = {
reportPreset: {
id: string;
workspaceId: string;
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
isTemporary: boolean;
revision: number;
createdAt: string;
updatedAt: string;
};
skipped: {
parameterId: string;
reason: "missing" | "unsupported_value_type";
}[];
};

Kind: Mutation

Weight: 5

Permanently delete a report preset.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
baseRevision?: number;
};

Output

type Output = {
id: string;
};

Kind: Query

Weight: 2

Turn workspace parameters into report parameter snapshots (value type, label, units, default display settings) for report.preset.create. Missing parameters and unsupported value types are returned as skipped. At most 100 distinct ids. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameterIds: string[];
};

Output

type Output = {
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
skipped: {
parameterId: string;
reason: "missing" | "unsupported_value_type";
}[];
};

Kind: Query

Weight: 1.5

Get one report preset with parameter snapshots.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
id: string;
workspaceId: string;
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
isTemporary: boolean;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Query

Weight: 2

List report presets (id, title, description, updatedAt).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
reportPresets: {
id: string;
title: string | Record<string, string>;
description: string | Record<string, string> | null;
revision: number;
updatedAt: string;
}[];
};

Kind: Query

Weight: 2

List report presets that currently snapshot any of the given live parameter ids (to check before parameter.deleteSelection). Takes parameter ids, not branch ids. Returns each preset’s id and title once, oldest first; empty or unknown ids return []. Any workspace member.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
parameterIds: string[];
};

Output

type Output = {
reportPresets: {
id: string;
title: string | Record<string, string>;
}[];
};

Kind: Mutation

Weight: 5

Save a temporary report preset in the catalog, keeping the same id. Editor, admin or owner. Send the full recipe. Recipe and status changes are atomic. Without baseRevision, a retry after success returns the current permanent report unchanged; with it, a save after the preset changed fails with setup_conflict.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
id: string;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
isTemporary: boolean;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 5

Update a report preset (recipe + parameter snapshots replaced atomically).

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
title?: string | Record<string, string>;
description?: string | Record<string, string> | null;
parameters?: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations?: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout?: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange?:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange?: boolean;
allowAddComments?: boolean;
displayCommentsSummary?: boolean;
allowSigning?: boolean;
allowRender?: boolean;
exportToCsv?: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton?: boolean;
timezone?: string;
baseRevision?: number;
};

Output

type Output = {
id: string;
workspaceId: string;
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
isTemporary: boolean;
revision: number;
createdAt: string;
updatedAt: string;
};

Kind: Mutation

Weight: 10

Upload a rendered report file.

Access

Workspace operator, editor, admin, or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
presetId: string;
files: Record<
string,
{
encoding: "base64" | "utf8";
content: string;
}
>;
};

Output

type Output = {
url: string;
uuid: string;
date: string;
};

Kind: Query

Weight: 2

Inspect your sign-in methods, active sessions, and account deletion impact.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
twoFactorEnabled: boolean;
passkeys: {
id: string;
name: string | null;
createdAt: string;
}[];
sessions: {
id: string;
current: boolean;
remembered: boolean;
impersonation: boolean;
createdAt: string;
expiresAt: string | null;
ipAddress: string | null;
userAgent: string | null;
}[];
ownedWorkspaces: {
id: string;
name: string;
}[];
closingBillingAccounts: {
id: string;
name: string | null;
personal: boolean;
balanceMicroEur: number;
}[];
freshUntil: string | null;
};

Kind: Query

Weight: 10

Count the alarm log events before before (at least 30 days ago) a deletion would remove. Editors and above.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageAlarmLogSelection;

Output

type Output = StorageAlarmLogPreview;

Shared types: StorageAlarmLogPreview, StorageAlarmLogSelection

Kind: Mutation

Weight: 20

Start deleting alarm log events before before (at least 30 days ago), irreversibly. Active alarms are not affected. Returns a jobId; the deletion is audited. Admins and owners.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageAlarmLogSelection;

Output

type Output = StorageJobOutput;

Shared types: StorageAlarmLogSelection, StorageJobOutput

Kind: Mutation

Weight: 20

Start deleting activity history before before (at least 30 days ago), irreversibly. What rebuilds setup at retained checkpoints is kept. Returns a jobId; the deletion is audited. Admins and owners.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageHistorySelection;

Output

type Output = StorageJobOutput;

Shared types: StorageHistorySelection, StorageJobOutput

Kind: Mutation

Weight: 20

Start deleting readings, irreversibly: of every parameter (scope workspace, deleted parameters included) or listed ones, from from until to (exclusive, epoch ms, required, at least five minutes ago: pass the preview’s until). Aggregates stay consistent. Returns a jobId; audited; a checkpoint revert does not restore readings. Admins and owners.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageReadingsSelection;

Output

type Output = StorageJobOutput;

Shared types: StorageJobOutput, StorageReadingsSelection

Kind: Mutation

Weight: 3

Delete a readings retention override; its parameters and branches follow the retention they inherit again: an override of a branch above them, else the default. Older readings may then be deleted within the hour. Admins and owners.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageDeleteRetentionOverrideInput;

Output

type Output = {
deletedId: string;
};

Shared types: StorageDeleteRetentionOverrideInput

Kind: Query

Weight: 10

Count the activity history records before before (at least 30 days ago) a deletion would remove. Editors and above.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageHistorySelection;

Output

type Output = StorageHistoryPreview;

Shared types: StorageHistoryPreview, StorageHistorySelection

Kind: Query

Weight: 10

Count the readings a deletion would remove: of every parameter (scope workspace, deleted parameters included) or of listed ones, from from (inclusive) until to (exclusive, epoch ms; omit either for no bound); the last five minutes are always kept. Editors and above.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageReadingsSelection;

Output

type Output = StorageDeletePreview;

Shared types: StorageDeletePreview, StorageReadingsSelection

Kind: Query

Weight: 2

Retention of a workspace: days to keep readings by default (null keeps all), days to keep activity history and the alarm log, and overrides listing parameters and branches with their own readings retention. A parameter listed directly beats its branches; a nearer branch beats an ancestor; deleted parameters follow the default. Editors and above.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageWorkspaceInput;

Output

type Output = StorageRetentionSettings;

Shared types: StorageRetentionSettings, StorageWorkspaceInput

Kind: Query

Weight: 10

Records a proposed retention would delete on its next run (hourly, cutoffs at UTC midnight), before saving it. Editors and above.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageRetentionPreviewInput;

Output

type Output = StorageRetentionPreviewResult;

Shared types: StorageRetentionPreviewInput, StorageRetentionPreviewResult

Kind: Mutation

Weight: 5

Create a readings retention override, or replace the one overrideId names: keepDays (null keeps everything) for the listed parameters and branches. Each parameter and branch may be in one override only. Older readings are deleted within the hour, irreversibly. Admins and owners.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageSaveRetentionOverrideInput;

Output

type Output = StorageSaveRetentionOverrideOutput;

Shared types: StorageSaveRetentionOverrideInput, StorageSaveRetentionOverrideOutput

Kind: Mutation

Weight: 3

Set the default readings retention, the activity history retention and/or the alarm log retention (both at least 30 days) in days; null keeps everything. Older data is deleted within the hour, irreversibly. Admins and owners.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageSetRetentionDefaultsInput;

Output

type Output = StorageRetentionSettings;

Shared types: StorageRetentionSettings, StorageSetRetentionDefaultsInput

Kind: Query

Weight: 10

Stored data of a workspace: totals as billed for the newest hour (billedAt), and a breakdown measured at most an hour ago: readings records per parameter with oldest and newest reading (deleted parameters marked live false, with their last recorded name), activity history records, alarm log events, and file bytes per area. Editors and above.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = StorageWorkspaceInput;

Output

type Output = StorageUsageSummary;

Shared types: StorageUsageSummary, StorageWorkspaceInput

Kind: Query

Weight: 0

One starter with its placeholders in form order: name, kind (parameter, endpoint, alarmRule, number, duration in ms, timeOfDay HH:MM, weekdays 1-7, severity, recipients, boolean, choice, text, or list of rows of those), bounds, default and whether it is optional.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
starterId: string;
};

Output

type Output = AutomationStarter;

Shared types: AutomationStarter

Kind: Query

Weight: 2

Build a starter’s automation or alarm rule document from placeholder values (by name; a list takes an array of rows), checked against the workspace. Returns { ok: true, kind, document, diagnostics } to save with automation.create or alarmRule.create, or { ok: false, problems } with a JSON pointer into values for each. Saves nothing.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
starterId: string;
values: Record<
string,
| string
| number
| boolean
| number[]
| Record<
string,
| string
| number
| boolean
| number[]
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
}
>[]
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
}
>;
};

Output

type Output =
| {
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
ok: true;
kind: "automation";
document: Automation;
}
| {
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
ok: true;
kind: "alarmRule";
document: AlarmRule;
}
| {
ok: false;
problems: {
path: string;
code:
| "alarm_rule_not_found"
| "branch_not_found"
| "duplicate"
| "endpoint_not_found"
| "file_name_invalid"
| "file_name_taken"
| "invalid"
| "member_not_found"
| "out_of_range"
| "parameter_encoding"
| "parameter_not_found"
| "parameter_not_on_endpoint"
| "parameter_not_writable"
| "parameter_type"
| "required"
| "too_few"
| "too_many"
| "unknown_placeholder";
args: Record<string, string | number>;
}[];
};

Shared types: AlarmRule, Automation

Kind: Query

Weight: 0

List starter automations and alarm rules (id, kind automation or alarmRule, name, description, summary), with optional filters combined with AND: kind; query (case-insensitive substring of id, names and summary). Read one with templates.automation.get for its placeholders.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
kind?: "alarmRule" | "automation";
query?: string;
};

Output

type Output = {
starters: {
id: string;
name: string | Record<string, string>;
description: string | Record<string, string>;
summary: string;
kind: "alarmRule" | "automation";
}[];
};

Kind: Query

Weight: 0

One dashboard template: long description, supportedLocales, parameterTemplates, pages (subpages in tab order, or null) and configSchema (JSON Schema of dashboard.create’s configuration).

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
templateId: string;
};

Output

type Output = {
id: string;
name: string | Record<string, string>;
summary: string;
description: string | Record<string, string> | null;
kind: "application" | "device" | "example" | "starter";
icon: string | null;
visibility: "private" | "public";
supportedLocales: ("de" | "en" | "pl" | "ru" | "uk")[];
parameterTemplates: string[];
pages:
| {
path: string;
name: string | Record<string, string>;
}[]
| null;
configSchema: Record<string, unknown>;
};

Kind: Query

Weight: 0

List dashboard templates (id, name, summary, kind, icon, visibility), with optional filters combined with AND: kind; parameterTemplate (exact parameter template id a device preset is built for); query (case-insensitive substring of id, names and summary). Read one with templates.dashboard.get before using its id as dashboard.create’s template.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
kind?: "application" | "device" | "example" | "starter";
parameterTemplate?: string;
query?: string;
};

Output

type Output = {
templates: {
id: string;
name: string | Record<string, string>;
summary: string;
kind: "application" | "device" | "example" | "starter";
icon: string | null;
visibility: "private" | "public";
}[];
};

Kind: Query

Weight: 0

One starter edge program with its placeholders in form order: name, kind (fileName, parameter of the MC252 endpoint, branch, number, duration in ms, timeOfDay HH:MM on the device clock, weekdays 1-7, boolean, choice, text, phone, or list of rows of those), bounds, default and whether it is optional.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
starterId: string;
};

Output

type Output = EdgeProgramStarter;

Shared types: EdgeProgramStarter

Kind: Query

Weight: 2

Build a starter edge program for an MC252 endpoint from placeholder values (by name; a list takes an array of rows), checked against the device. Returns { ok: true, fileName, description, source, parameters, diagnostics }: save the program with edgeProgram.create, then each parameter with parameter.create. Or { ok: false, problems } with a JSON pointer into values for each. Saves nothing.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
endpointId: string;
starterId: string;
values: Record<
string,
| string
| number
| boolean
| number[]
| Record<
string,
| string
| number
| boolean
| number[]
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
}
>[]
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
}
>;
};

Output

type Output = EdgeProgramStarterInstantiateOutput;

Shared types: EdgeProgramStarterInstantiateOutput

Kind: Query

Weight: 0

List starter edge programs for MC252 controllers (id, name, description, summary), with an optional query (case-insensitive substring of id, names and summary). Read one with templates.edgeProgram.get for its placeholders.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
query?: string;
};

Output

type Output = {
starters: {
id: string;
name: string | Record<string, string>;
description: string | Record<string, string>;
summary: string;
}[];
};

Kind: Query

Weight: 2

List device parameter templates: id, title, default unit id, and origin. templates.parameter.stamp creates parameters from one.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
templates: {
id: string;
title: string | Record<string, string>;
defaultUnitId: number | null;
docsPath?: string | null;
origin: "overvis" | "workspace";
}[];
};

Kind: Mutation

Weight: 5

Create a template parameter/branch tree on an existing endpoint. Optional unitId, parentBranchId.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
templateId: string;
endpointId: string;
unitId?: number;
rootBranchName?: string;
parentBranchId?: string | null;
};

Output

type Output = {
rootBranchId: string;
branchCount: number;
parameterCount: number;
};

Kind: Query

Weight: 1

Get the workspace’s automation limits: maxStepsPerRun, minTriggerIntervalMs, maxWritesPerMinute.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
maxStepsPerRun: number;
minTriggerIntervalMs: number;
maxWritesPerMinute: number;
};

Kind: Query

Weight: 1.5

Get workspace logo and favicon files and content revisions.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
light: {
path: string;
revision: string;
valid: boolean;
} | null;
dark: {
path: string;
revision: string;
valid: boolean;
} | null;
favicon: {
path: string;
revision: string;
valid: boolean;
} | null;
};

Kind: Mutation

Weight: 3

Upload or remove a workspace logo or favicon. Admins and owners only.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input =
| {
workspaceId: string;
slot: "dark" | "light";
file: {
extension: "png" | "svg";
content: string;
} | null;
}
| {
workspaceId: string;
slot: "favicon";
file: {
extension: "png";
content: string;
} | null;
};

Output

type Output = {
light: {
path: string;
revision: string;
valid: boolean;
} | null;
dark: {
path: string;
revision: string;
valid: boolean;
} | null;
favicon: {
path: string;
revision: string;
valid: boolean;
} | null;
};

Kind: Mutation

Weight: 5

Take a named checkpoint of the workspace’s current setup, with an optional reason. Editors, admins and owners only.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
name: string;
reason?: string;
};

Output

type Output = SetupCheckpointInfo;

Shared types: SetupCheckpointInfo

Kind: Mutation

Weight: 3

Delete a named checkpoint. Automatic checkpoints are deleted when they age out. Editors, admins and owners only.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
checkpointId: string;
};

Output

type Output = {
deletedId: string;
};

Kind: Query

Weight: 2

List workspace setup checkpoints, newest first: the important kinds (named, before push, assistant changes, template, import, revert) by default, or every kind with scope ‘all’. Editors, admins and owners only.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
scope?: "all" | "important";
cursor?: string;
limit?: number;
direction?: "forward";
};

Output

type Output = SetupCheckpointListOutput;

Shared types: SetupCheckpointListOutput

Kind: Mutation

Weight: 3

Rename a named checkpoint. Automatic checkpoints have no name. Editors, admins and owners only.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
checkpointId: string;
name: string;
};

Output

type Output = SetupCheckpointInfo;

Shared types: SetupCheckpointInfo

Kind: Mutation

Weight: 20

Revert the workspace setup exactly to a checkpoint (checkpointId) or a moment (at) as a new revision, after a ‘before revert’ checkpoint. Restores entities with their ids, PIN endpoints included, files and const values. Pass a presence proof in devices for each MC252 revertPreview lists. Fails with checkpoint_revert_conflict unless still at expectedRevision. Editors, admins and owners only.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = SetupCheckpointRevertInput;

Output

type Output = SetupCheckpointRevertOutput;

Shared types: SetupCheckpointRevertInput, SetupCheckpointRevertOutput

Kind: Query

Weight: 20

Preview reverting the workspace setup to a checkpoint (checkpointId) or a moment (at, ISO date-time): what it creates, updates and deletes, where const values come from, deleted MC252 devices to confirm on site (with their PINs), and entities that block an exact restore. Pass the returned revision to revert as expectedRevision. Editors, admins and owners only.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = SetupCheckpointRevertTargetInput;

Output

type Output = SetupCheckpointRevertPreview;

Shared types: SetupCheckpointRevertPreview, SetupCheckpointRevertTargetInput

Kind: Query

Weight: 10

List the setup entities created, updated and deleted after a checkpoint, up to the next checkpoint in the scope or the current setup. Editors, admins and owners only.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
checkpointId: string;
scope?: "all" | "important";
};

Output

type Output = {
fromRevision: number;
toRevision: number;
untilCheckpointId: string | null;
changes: {
target:
| "alarm_rule"
| "automation"
| "dashboard"
| "edge_program"
| "endpoint"
| "parameter"
| "parameter_tree_branch"
| "report_comment"
| "report_preset"
| "workspace"
| "workspace_file";
key: string;
name: string | null;
change: "created" | "deleted" | "updated";
}[];
};

Kind: Mutation

Weight: 3

Create a new owned workspace.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
name: string;
timezone?: string;
billingAccountId?: string;
};

Output

type Output = {
timezone: string;
location: {
lat: number;
lng: number;
} | null;
id: string;
name: string;
access: "admin" | "editor" | "operator" | "owner" | "view_only";
setupRevision: number;
disabledSince: string | null;
suspensionReasons: ("admin" | "balance")[];
};

Kind: Mutation

Weight: 20

Permanently delete a workspace.

Access

Workspace owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
deletedId: string;
nextWorkspaceId: string | null;
};

Kind: Mutation

Weight: 3

Delete a workspace CLI API key by id: anyone’s for admins and owners, their own for editors.

Access

Signed-in browser session; API keys are not accepted. Workspace editor, admin or owner; editors revoke only their own keys.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
keyId: string;
};

Output

type Output = {
deletedId: string;
};

Kind: Query

Weight: 1

Get one workspace.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
};

Output

type Output = {
timezone: string;
location: {
lat: number;
lng: number;
} | null;
id: string;
name: string;
access: "admin" | "editor" | "operator" | "owner" | "view_only";
setupRevision: number;
disabledSince: string | null;
suspensionReasons: ("admin" | "balance")[];
};

Kind: Mutation

Weight: 3

Invite a user to a workspace (admins and owners).

Access

Signed-in browser session; API keys are not accepted. Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
email: string;
access: "admin" | "editor" | "operator" | "view_only";
};

Output

type Output = {
success: true;
};

Kind: Mutation

Weight: 3

Leave a workspace as a non-owner member.

Access

Signed-in browser session; API keys are not accepted. Workspace member other than the owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
success: true;
};

Kind: Query

Weight: 2

List workspaces for the current user.

Access

Authenticated account. Workspace-scoped API keys cannot call this procedure.

Errors

UNAUTHORIZED when authentication is missing or invalid. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = void;

Output

type Output = {
workspaces: {
id: string;
name: string;
access: "admin" | "editor" | "operator" | "owner" | "view_only";
disabledSince: string | null;
suspensionReasons: ("admin" | "balance")[];
}[];
};

Kind: Query

Weight: 2

List the workspace API keys that hmi pull created for a workspace: everyone’s for admins and owners, their own for editors.

Access

Signed-in browser session; API keys are not accepted. Workspace editor, admin or owner; editors see only their own keys.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
keys: {
id: string;
label: string;
createdAt: string;
lastRequest: string | null;
userEmail: string | null;
}[];
};

Kind: Query

Weight: 2

List workspace members and pending invitations (admins and owners).

Access

Signed-in browser session; API keys are not accepted. Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
members: {
userId: string;
name: string;
email: string;
access: "admin" | "editor" | "operator" | "owner" | "view_only";
}[];
invitations: {
id: string;
email: string;
access: "admin" | "editor" | "operator" | "view_only";
expiresAt: string;
}[];
};

Kind: Mutation

Weight: 0

Mint a one-time token for CLI workspace pull.

Access

Signed-in browser session; API keys are not accepted. Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
token: string;
expiresAt: string;
apiBaseUrl: string;
};

Kind: Query

Weight: 2

List which file content hashes must be uploaded before a CLI push can reference them.

Access

Workspace editor, admin or owner. A workspace-scoped API key may call it when its user has that access.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
hashes: string[];
};

Output

type Output = {
missing: string[];
};

Kind: Query

Weight: 20

Pull a workspace snapshot for CLI sync.

Access

Workspace editor, admin or owner. A workspace-scoped API key may pull when its user has that access.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
since: number;
};

Output

type Output = WorkspacePullOutput;

Shared types: WorkspacePullOutput

Kind: Mutation

Weight: 20

Push a workspace snapshot from CLI sync. Renaming the workspace or changing its logo or favicon needs an admin or owner (push_admin_required).

Access

Workspace editor, admin or owner. A workspace-scoped API key may push when its user has that access.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = WorkspacePushInput;

Output

type Output = {
revision: number;
previousRevision: number;
edgeDeployJobIds?: string[];
};

Shared types: WorkspacePushInput

Kind: Mutation

Weight: 20

Apply the parts of a staged CLI push as one push.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
pushId: string;
attempt: string;
parts: number;
};

Output

type Output = {
revision: number;
previousRevision: number;
edgeDeployJobIds?: string[];
};

Kind: Mutation

Weight: 5

Stage one part of a CLI push too large for one request; workspace.pushCommit applies the parts.

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = WorkspacePushStageInput;

Output

type Output = object;

Shared types: WorkspacePushStageInput

Kind: Mutation

Weight: 0

Redeem a single-use pull token and create a CLI API key.

Access

No session required; possession of a valid, unexpired, unused pull token is required.

Errors

BAD_REQUEST for an invalid, expired, or already redeemed token; each token redeems once. FORBIDDEN when the account that minted the token is no longer an editor of its workspace; that leaves the token unused.

Input

type Input = {
token: string;
apiBaseUrl?: string;
label?: string;
};

Output

type Output = {
apiKey: string;
workspaceId: string;
workspaceName: string;
apiBaseUrl: string;
};

Kind: Mutation

Weight: 3

Remove a workspace member (admins and owners).

Access

Signed-in browser session; API keys are not accepted. Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
userId: string;
};

Output

type Output = {
success: true;
};

Kind: Mutation

Weight: 3

Rename a workspace (admins and owners).

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
id: string;
name: string;
};

Output

type Output = {
timezone: string;
location: {
lat: number;
lng: number;
} | null;
id: string;
name: string;
access: "admin" | "editor" | "operator" | "owner" | "view_only";
setupRevision: number;
disabledSince: string | null;
suspensionReasons: ("admin" | "balance")[];
};

Kind: Mutation

Weight: 3

Resend a pending workspace invitation (admins and owners).

Access

Signed-in browser session; API keys are not accepted. Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
invitationId: string;
};

Output

type Output = {
success: true;
};

Kind: Mutation

Weight: 3

Revoke a pending workspace invitation (admins and owners).

Access

Signed-in browser session; API keys are not accepted. Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
invitationId: string;
};

Output

type Output = {
success: true;
};

Kind: Mutation

Weight: 5

Set the automation limits every automation is checked against (admins and owners). Automations over the new limits are listed in overLimit; they stay as they are and must be brought within the limits when saved.

Access

Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
maxStepsPerRun: number;
minTriggerIntervalMs: number;
maxWritesPerMinute: number;
id: string;
};

Output

type Output = {
limits: {
maxStepsPerRun: number;
minTriggerIntervalMs: number;
maxWritesPerMinute: number;
};
overLimit: {
entityType: "alarm_rule" | "automation";
id: string;
name: string | Record<string, string>;
}[];
};

Kind: Mutation

Weight: 3

Change a workspace member role (admins and owners).

Access

Signed-in browser session; API keys are not accepted. Workspace admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN for API-key authentication; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
userId: string;
access: "admin" | "editor" | "operator" | "view_only";
};

Output

type Output = {
success: true;
};

Kind: Mutation

Weight: 3

Update the workspace timezone and optional location (editors, admins and owners).

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
timezone: string;
location: {
lat: number;
lng: number;
} | null;
id: string;
};

Output

type Output = {
success: true;
};

Kind: Mutation

Weight: 5

Delete a top-level file or directory under uploads/ (editors and above).

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
kind: "dir" | "file";
name: string;
};

Output

type Output = object;

Kind: Mutation

Weight: 10

Start processing a PDF or Excel file into uploads/-ingested/. Returns once the job is accepted. Editors and above.

Access

Workspace editor, admin or owner unless the procedure description states a narrower rule.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource; BAD_REQUEST for validation or domain-state failures. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
name: string;
};

Output

type Output = {
jobId: string;
destName: string;
};

Kind: Query

Weight: 5

List top-level files and directories under uploads/ (editors and above).

Access

Workspace editor, admin or owner.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = {
entries: (
| {
kind: "file";
name: string;
size: number;
updatedAt: string;
ingest?: {
status: "failed" | "running";
processed: number;
total: number;
failed?: number;
errorCode?: string;
};
}
| {
kind: "dir";
name: string;
fileCount: number;
updatedAt: string;
}
)[];
};

Kind: Subscription

Weight: 0

Subscribe to one workspace’s setup revision, name, disabled state and your access. The first event and any event after missed changes have type resync.

Access

Authenticated caller with access to the referenced workspace or resource.

Errors

UNAUTHORIZED when authentication is missing or invalid; FORBIDDEN or NOT_FOUND when the caller cannot access the resource. Procedure-specific stable domain codes are returned in the tRPC message and optional details.

Input

type Input = {
workspaceId: string;
};

Output

type Output = AsyncIterable<
{
type: "changed" | "resync";
setupRevision: number;
name: string;
disabled: boolean;
suspensionReasons: ("admin" | "balance")[];
access: "admin" | "editor" | "operator" | "owner" | "view_only";
},
void,
any
>;

Types the procedure inputs and outputs refer to by name, with the structure each one resolves to.

type Alarm = {
id: string;
workspaceId: string;
source:
| {
kind: "alarm_rule";
alarmRuleId: string;
}
| {
kind: "automation";
automationId: string;
};
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params: Record<
string,
{
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
value: string | number | boolean | null;
}
>;
};
latching: boolean;
raisedAt: string;
clearedAt: string | null;
acknowledgedAt: string | null;
acknowledgedBy: string | null;
acknowledgedByName: string | null;
acknowledgeComment: string | null;
shelvedUntil: string | null;
shelvedBy: string | null;
shelvedByName: string | null;
shelveReason: string | null;
parameterIds: string[];
};
type AlarmAcknowledgeInput = {
id: string;
comment?: string;
};
type AlarmLogInput = {
workspaceId: string;
from?: string;
to?: string;
severities?: ("info" | "urgent" | "warning")[];
kinds?: ("acknowledged" | "cleared" | "raised" | "removed" | "shelved" | "unshelved")[];
sourceIds?: string[];
alarmId?: string;
cursor?: string;
limit?: number;
direction?: "forward";
};
type AlarmLogOutput = {
events: {
id: string;
alarmId: string;
source:
| {
kind: "alarm_rule";
alarmRuleId: string;
}
| {
kind: "automation";
automationId: string;
};
key: string;
kind: "acknowledged" | "cleared" | "raised" | "removed" | "shelved" | "unshelved";
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params: Record<
string,
{
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
value: string | number | boolean | null;
}
>;
};
latching: boolean;
actorUserId: string | null;
actorName: string | null;
note: string | null;
shelvedUntil: string | null;
occurredAt: string;
}[];
nextCursor: string | null;
};
type AlarmRule = {
name: string | Record<string, string>;
description?: string | Record<string, string> | null;
pollIntervalMs: number;
variables: (
| {
kind: "input";
name: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "endpoint";
endpointId: string;
}
| {
kind: "alarm";
alarm:
| {
alarmRuleId: string;
}
| {
automationId: string;
key: string;
};
state?: "active" | "unacknowledged";
};
}
| {
kind: "state";
name: string;
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
lifetime: "automation" | "run";
initial?: string;
}
| {
kind: "calc";
name: string;
formula: string;
}
)[];
condition: string;
holdMs: number;
clearCondition?: string;
clearHoldMs?: number;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs: number;
unavailableAfterMs?: number;
};
type AlarmRuleCreateInput = {
workspaceId: string;
document: AlarmRule;
dashboardId?: string | null;
disabled?: boolean;
};
type AlarmRuleDetail = {
id: string;
workspaceId: string;
revision: number;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
dashboardId: string | null;
disabledSince: string | null;
errorCount: number;
warningCount: number;
createdAt: string;
updatedAt: string;
severity: "info" | "urgent" | "warning";
document: AlarmRule;
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
};
type AlarmRuleSetupPayload = {
name: string | Record<string, string>;
description?: string | Record<string, string> | null;
pollIntervalMs: number;
variables: (
| {
kind: "input";
name: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "endpoint";
endpointId: string;
}
| {
kind: "alarm";
alarm:
| {
alarmRuleId: string;
}
| {
automationId: string;
key: string;
};
state?: "active" | "unacknowledged";
};
}
| {
kind: "state";
name: string;
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
lifetime: "automation" | "run";
initial?: string;
}
| {
kind: "calc";
name: string;
formula: string;
}
)[];
condition: string;
holdMs: number;
clearCondition?: string;
clearHoldMs?: number;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs: number;
unavailableAfterMs?: number;
dashboardId: string | null;
disabledSince: string | null;
};
type AlarmRuleUpdateInput = {
id: string;
document?: AlarmRule;
dashboardId?: string | null;
baseRevision?: number;
};
type AlarmRuleWriteOutput = {
id: string;
workspaceId: string;
revision: number;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
dashboardId: string | null;
disabledSince: string | null;
errorCount: number;
warningCount: number;
createdAt: string;
updatedAt: string;
severity: "info" | "urgent" | "warning";
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
};
type AlarmShelveInput = {
id: string;
durationMs: number;
reason: string;
};
type AlarmUnshelveInput = {
id: string;
};
type Automation = {
name: string | Record<string, string>;
description?: string | Record<string, string> | null;
pollIntervalMs: number;
minRunIntervalMs: number;
writeLimit: {
count: number;
periodMs: number;
};
triggers: (
| {
kind: "inputChange";
inputs: string[];
run: string;
}
| {
kind: "period";
everyMs: number;
run: string;
}
| {
kind: "timeOfDay";
times: string[];
weekdays?: number[];
run: string;
}
| {
kind: "sun";
event: "sunrise" | "sunset";
offsetMs: number;
weekdays?: number[];
run: string;
}
| {
kind: "alarm";
alarm:
| {
alarmRuleId: string;
}
| {
automationId: string;
key: string;
};
transitions: ("acknowledged" | "cleared" | "raised")[];
run: string;
}
| {
kind: "automation";
automationId: string;
run: string;
}
| {
kind: "telegram";
command: string;
minRole?: "admin" | "editor" | "operator" | "owner";
run: string;
}
)[];
variables: (
| {
kind: "input";
name: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "endpoint";
endpointId: string;
}
| {
kind: "alarm";
alarm:
| {
alarmRuleId: string;
}
| {
automationId: string;
key: string;
};
state?: "active" | "unacknowledged";
};
}
| {
kind: "state";
name: string;
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
lifetime: "automation" | "run";
initial?: string;
}
| {
kind: "calc";
name: string;
formula: string;
}
)[];
procedures: AutomationProcedure[];
onInit?: string;
};
type AutomationCreateInput = {
workspaceId: string;
document: Automation;
dashboardId?: string | null;
disabled?: boolean;
};
type AutomationDetail = {
id: string;
workspaceId: string;
revision: number;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
dashboardId: string | null;
disabledSince: string | null;
errorCount: number;
warningCount: number;
createdAt: string;
updatedAt: string;
document: Automation;
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
maxSteps: number | null;
};
type AutomationDryRunInput = {
workspaceId: string;
automationId?: string;
document: Automation;
procedure: string;
command?: boolean;
};
type AutomationDryRunOutput = {
startedAt: string;
status: "failed" | "ok";
errorCode: string | null;
error: Record<string, unknown> | null;
steps: number;
maxSteps: number;
inputs: Record<string, AutomationRunValue>;
trace: AutomationRunStep[];
effects: AutomationRunStep[];
stateBefore: Record<string, AutomationRunValue>;
stateAfter: Record<string, AutomationRunValue>;
};
type AutomationLatestRunsOutput = {
items: {
automationId: string;
run: AutomationRun;
}[];
};
type AutomationMembersOutput = {
members: {
userId: string;
name: string;
role: "admin" | "editor" | "operator" | "owner" | "view_only";
}[];
};
type AutomationProcedure = {
name: string;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}[];
else?: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}[];
else?: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}[];
else?: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}[];
else?: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: (
| {
kind: "if";
key?: string;
branches: {
when: string;
heldForMs?: number;
once?: boolean;
steps: any;
}[];
else?: any;
}
| {
kind: "call";
procedure: string;
}
| {
kind: "repeat";
times: string;
max: number;
counter?: string;
steps: any;
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
}
| {
kind: "set";
variable: string;
value: string;
}
| {
kind: "writeParameter";
parameterId: string;
value: string;
}
| {
kind: "raiseAlarm";
key: string;
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
latching?: boolean;
recipients?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
notifyDelayMs?: number;
}
| {
kind: "clearAlarm";
key: string;
}
| {
kind: "notify";
recipients:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
severity: "info" | "urgent" | "warning";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
excludeChannels?: ("email" | "sms" | "telegram")[];
delayMs?: number;
cancelKey?: string;
}
| {
kind: "cancelNotify";
cancelKey: string;
}
| {
kind: "writeLog";
level: "debug" | "error" | "info" | "warn";
message: string;
}
| {
kind: "fail";
message: string;
}
| {
kind: "reply";
message: {
title: string | Record<string, string>;
body?: string | Record<string, string>;
params?: Record<string, string>;
};
}
)[];
};
type AutomationRun = {
runId: string;
revision: number;
startedAt: string;
durationUs: number;
triggerKind: string;
trigger: Record<string, unknown>;
procedure: string;
status: "failed" | "ok";
errorCode: string | null;
error: Record<string, unknown> | null;
steps: number;
writes: number;
writesLimited: number;
notifications: number;
traceTruncated: boolean;
};
type AutomationRunsInput = {
id: string;
failedOnly?: boolean;
before?: {
startedAt: string;
runId: string;
};
limit?: number;
};
type AutomationRunsOutput = {
items: AutomationRun[];
next: {
startedAt: string;
runId: string;
} | null;
};
type AutomationRunStep = {
kind: string;
path: string;
detail: Record<string, unknown>;
};
type AutomationRunTraceOutput = {
inputs: Record<string, AutomationRunValue> | null;
steps: AutomationRunStep[];
};
type AutomationRunValue = {
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
value: string | number | boolean | null;
};
type AutomationSetupPayload = {
name: string | Record<string, string>;
description?: string | Record<string, string> | null;
pollIntervalMs: number;
minRunIntervalMs: number;
writeLimit: {
count: number;
periodMs: number;
};
triggers: (
| {
kind: "inputChange";
inputs: string[];
run: string;
}
| {
kind: "period";
everyMs: number;
run: string;
}
| {
kind: "timeOfDay";
times: string[];
weekdays?: number[];
run: string;
}
| {
kind: "sun";
event: "sunrise" | "sunset";
offsetMs: number;
weekdays?: number[];
run: string;
}
| {
kind: "alarm";
alarm:
| {
alarmRuleId: string;
}
| {
automationId: string;
key: string;
};
transitions: ("acknowledged" | "cleared" | "raised")[];
run: string;
}
| {
kind: "automation";
automationId: string;
run: string;
}
| {
kind: "telegram";
command: string;
minRole?: "admin" | "editor" | "operator" | "owner";
run: string;
}
)[];
variables: (
| {
kind: "input";
name: string;
source:
| {
kind: "parameter";
parameterId: string;
}
| {
kind: "endpoint";
endpointId: string;
}
| {
kind: "alarm";
alarm:
| {
alarmRuleId: string;
}
| {
automationId: string;
key: string;
};
state?: "active" | "unacknowledged";
};
}
| {
kind: "state";
name: string;
type: "boolean" | "duration" | "instant" | "number" | "string" | "timeOfDay";
lifetime: "automation" | "run";
initial?: string;
}
| {
kind: "calc";
name: string;
formula: string;
}
)[];
procedures: AutomationProcedure[];
onInit?: string;
dashboardId: string | null;
disabledSince: string | null;
};
type AutomationStarter = {
id: string;
name: string | Record<string, string>;
description: string | Record<string, string>;
summary: string;
kind: "alarmRule" | "automation";
placeholders: (
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "parameter";
valueTypes?: ("boolean" | "instant" | "number" | "string")[];
writable?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "endpoint";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "alarmRule";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "branch";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "fileName";
default: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "number";
min?: number;
max?: number;
integer?: boolean;
unit?: string | Record<string, string>;
default?: number;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "duration";
unit: "h" | "min" | "s";
min: number;
max: number;
default?: number;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "timeOfDay";
default?: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "weekdays";
default?: number[];
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "severity";
default?: "info" | "urgent" | "warning";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "recipients";
default?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "boolean";
default?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "choice";
options: {
value: string;
label: string | Record<string, string>;
}[];
default?: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "text";
maxLength: number;
ascii?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "phone";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "list";
itemLabel?: string | Record<string, string>;
fields: (
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "parameter";
valueTypes?: ("boolean" | "instant" | "number" | "string")[];
writable?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "endpoint";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "alarmRule";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "branch";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "fileName";
default: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "number";
min?: number;
max?: number;
integer?: boolean;
unit?: string | Record<string, string>;
default?: number;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "duration";
unit: "h" | "min" | "s";
min: number;
max: number;
default?: number;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "timeOfDay";
default?: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "weekdays";
default?: number[];
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "severity";
default?: "info" | "urgent" | "warning";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "recipients";
default?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "boolean";
default?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "choice";
options: {
value: string;
label: string | Record<string, string>;
}[];
default?: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "text";
maxLength: number;
ascii?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "phone";
}
)[];
minItems: number;
maxItems: number;
}
)[];
};
type AutomationUpdateInput = {
id: string;
document?: Automation;
dashboardId?: string | null;
baseRevision?: number;
};
type AutomationWriteOutput = {
id: string;
workspaceId: string;
revision: number;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
dashboardId: string | null;
disabledSince: string | null;
errorCount: number;
warningCount: number;
createdAt: string;
updatedAt: string;
diagnostics: {
code:
| "argument_count"
| "argument_types"
| "automation_trigger_cycle"
| "calc_cycle"
| "chained_comparison"
| "division_by_zero"
| "duplicate_key"
| "duplicate_name"
| "empty_formula"
| "interval_under_limit"
| "invalid_argument"
| "invalid_number"
| "invalid_shape"
| "invalid_time_of_day"
| "key_required"
| "location_missing"
| "location_required"
| "missing_closing_parenthesis"
| "not_a_function"
| "not_a_state_variable"
| "not_an_input"
| "not_finite"
| "operand_types"
| "parameter_disabled"
| "parameter_not_writable"
| "placeholder_out_of_range"
| "recursive_call"
| "reply_without_command"
| "reserved_command"
| "reserved_name"
| "result_type"
| "state_not_allowed"
| "steps_over_limit"
| "time_unavailable"
| "too_deep"
| "unexpected_character"
| "unexpected_end"
| "unexpected_token"
| "unknown_alarm"
| "unknown_automation"
| "unknown_cancel_key"
| "unknown_endpoint"
| "unknown_function"
| "unknown_member"
| "unknown_name"
| "unknown_parameter"
| "unknown_placeholder"
| "unknown_procedure"
| "unknown_variable"
| "unterminated_string"
| "unused_param"
| "unused_procedure"
| "variable_type"
| "write_rate_over_limit";
severity: "error" | "warning";
path: string;
range?: {
start: number;
end: number;
};
args: Record<string, string | number>;
}[];
maxSteps: number | null;
};
type DashboardSummary = {
id: string;
name: string | Record<string, string>;
disabledSince: string | null;
};
type DeviceApiDescribeOutput = {
id: string;
name: string;
description: string;
effect: "read" | "write";
minRole: "admin" | "editor" | "operator" | "owner";
keyRoles: {
query?: Record<string, "admin" | "editor" | "operator" | "owner">;
body?: Record<string, "admin" | "editor" | "operator" | "owner">;
};
method: "DELETE" | "GET" | "PATCH" | "POST" | "PUT";
surfaces: ("assistant" | "automations" | "dashboards")[];
input: {
query?: {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
"date" | "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "time" | "uri" | "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
"date" | "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "time" | "uri" | "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
};
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<
string,
{
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
| "date"
| "date-time"
| "email"
| "hostname"
| "ipv4"
| "ipv6"
| "time"
| "uri"
| "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
}
>;
required?: string[];
additionalProperties?:
| boolean
| {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
| "date"
| "date-time"
| "email"
| "hostname"
| "ipv4"
| "ipv6"
| "time"
| "uri"
| "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
};
minProperties?: number;
maxProperties?: number;
anyOf?: {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
"date" | "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "time" | "uri" | "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
}[];
oneOf?: {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
"date" | "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "time" | "uri" | "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
}[];
};
body?: {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
"date" | "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "time" | "uri" | "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
"date" | "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "time" | "uri" | "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
};
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<
string,
{
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
| "date"
| "date-time"
| "email"
| "hostname"
| "ipv4"
| "ipv6"
| "time"
| "uri"
| "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
}
>;
required?: string[];
additionalProperties?:
| boolean
| {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
| "date"
| "date-time"
| "email"
| "hostname"
| "ipv4"
| "ipv6"
| "time"
| "uri"
| "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
};
minProperties?: number;
maxProperties?: number;
anyOf?: {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
"date" | "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "time" | "uri" | "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
}[];
oneOf?: {
type?: "array" | "boolean" | "integer" | "null" | "number" | "object" | "string";
title?: string;
description?: string;
enum?: (string | number | boolean | null)[];
const?: string | number | boolean | null;
default?: unknown;
examples?: unknown[];
minLength?: number;
maxLength?: number;
pattern?: string;
format?:
"date" | "date-time" | "email" | "hostname" | "ipv4" | "ipv6" | "time" | "uri" | "uuid";
minimum?: number;
maximum?: number;
exclusiveMinimum?: number;
exclusiveMaximum?: number;
multipleOf?: number;
items?: any;
minItems?: number;
maxItems?: number;
uniqueItems?: boolean;
properties?: Record<string, any>;
required?: string[];
additionalProperties?: boolean | any;
minProperties?: number;
maxProperties?: number;
anyOf?: any[];
oneOf?: any[];
}[];
};
};
timeoutMs: number;
rateLimit: {
requests: number;
perSeconds: number;
};
};
type DeviceApiListOutput = {
manifestId: string;
model: string;
operations: {
id: string;
name: string;
description: string;
effect: "read" | "write";
minRole: "admin" | "editor" | "operator" | "owner";
keyRoles: {
query?: Record<string, "admin" | "editor" | "operator" | "owner">;
body?: Record<string, "admin" | "editor" | "operator" | "owner">;
};
}[];
};
type EdgeProgramStarter = {
id: string;
name: string | Record<string, string>;
description: string | Record<string, string>;
summary: string;
placeholders: (
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "parameter";
valueTypes?: ("boolean" | "instant" | "number" | "string")[];
writable?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "endpoint";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "alarmRule";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "branch";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "fileName";
default: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "number";
min?: number;
max?: number;
integer?: boolean;
unit?: string | Record<string, string>;
default?: number;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "duration";
unit: "h" | "min" | "s";
min: number;
max: number;
default?: number;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "timeOfDay";
default?: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "weekdays";
default?: number[];
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "severity";
default?: "info" | "urgent" | "warning";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "recipients";
default?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "boolean";
default?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "choice";
options: {
value: string;
label: string | Record<string, string>;
}[];
default?: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "text";
maxLength: number;
ascii?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "phone";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "list";
itemLabel?: string | Record<string, string>;
fields: (
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "parameter";
valueTypes?: ("boolean" | "instant" | "number" | "string")[];
writable?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "endpoint";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "alarmRule";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "branch";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "fileName";
default: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "number";
min?: number;
max?: number;
integer?: boolean;
unit?: string | Record<string, string>;
default?: number;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "duration";
unit: "h" | "min" | "s";
min: number;
max: number;
default?: number;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "timeOfDay";
default?: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "weekdays";
default?: number[];
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "severity";
default?: "info" | "urgent" | "warning";
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "recipients";
default?:
| {
kind: "members";
userIds: string[];
}
| {
kind: "roles";
roles: ("admin" | "editor" | "operator" | "owner" | "view_only")[];
};
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "boolean";
default?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
kind: "choice";
options: {
value: string;
label: string | Record<string, string>;
}[];
default?: string;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "text";
maxLength: number;
ascii?: boolean;
}
| {
name: string;
label: string | Record<string, string>;
help?: string | Record<string, string>;
shownWhen?: {
name: string;
values?: (string | boolean)[];
};
optional?: boolean;
kind: "phone";
}
)[];
minItems: number;
maxItems: number;
}
)[];
};
type EdgeProgramStarterInstantiateOutput =
| {
ok: false;
problems: {
path: string;
code:
| "alarm_rule_not_found"
| "branch_not_found"
| "duplicate"
| "endpoint_not_found"
| "file_name_invalid"
| "file_name_taken"
| "invalid"
| "member_not_found"
| "out_of_range"
| "parameter_encoding"
| "parameter_not_found"
| "parameter_not_on_endpoint"
| "parameter_not_writable"
| "parameter_type"
| "required"
| "too_few"
| "too_many"
| "unknown_placeholder";
args: Record<string, string | number>;
}[];
}
| ({
ok: true;
diagnostics: {
code: string;
deviceCode?: number;
severity: "error" | "warning";
range: {
line: number;
column: number;
offset: number;
endOffset: number;
};
args: Record<string, string | number>;
}[];
} & EdgeProgramStarterResult);
type EdgeProgramStarterResult = {
fileName: string;
description: string | Record<string, string>;
source: string;
parameters: {
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction: "always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs?: number | null;
}[];
};
type EndpointSummary = {
id: string;
name: string | Record<string, string>;
disabledSince: string | null;
};
type ParameterBranchSummary = {
id: string;
name: string | Record<string, string>;
parentId: string | null;
};
interface ParameterInventoryNode {
[key: string]: string | ParameterInventoryNode;
}
interface ParameterListInventoryOutput {
tree: ParameterInventoryNode;
}
type ParameterSummary = {
id: string;
name: string | Record<string, string>;
branchId: string;
mnemonic: string | Record<string, string> | null;
units: string | Record<string, string> | null;
tags: string[];
disabledSince: string | null;
sortOrder: number;
};
type ParameterTreeBranch = {
id: string;
workspaceId: string;
parentId: string | null;
name: string | Record<string, string>;
sortOrder: number;
revision: number;
createdAt: string;
updatedAt: string;
};
type ParameterWithReadings = {
id: string;
workspaceId: string;
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction: "always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs: number | null;
sortOrder: number;
revision: number;
createdAt: string;
updatedAt: string;
deviceLog: {
pullMinutes: number;
lastImportAt: string | null;
completeThrough: string | null;
} | null;
lastReading: {
receivedAt: string;
value: string | Record<string, string>;
rawHex: string;
numberValue?: number;
boolValue?: boolean;
} | null;
nextReading: {
nextDueAt: string;
} | null;
};
type SetupCheckpointInfo = {
id: string;
workspaceId: string;
setupRevision: number;
kind:
| "before_assistant_turn"
| "before_bulk_delete"
| "before_import"
| "before_push"
| "before_revert"
| "before_template"
| "daily"
| "named";
authorKind: "assistant" | "system" | "user";
authorUserId: string | null;
authorName: string | null;
assistantChatId: string | null;
name: string | null;
reason: string | null;
createdAt: string;
};
type SetupCheckpointListOutput = {
checkpoints: {
id: string;
workspaceId: string;
setupRevision: number;
kind:
| "before_assistant_turn"
| "before_bulk_delete"
| "before_import"
| "before_push"
| "before_revert"
| "before_template"
| "daily"
| "named";
authorKind: "assistant" | "system" | "user";
authorUserId: string | null;
authorName: string | null;
assistantChatId: string | null;
name: string | null;
reason: string | null;
createdAt: string;
}[];
nextCursor: string | null;
};
type SetupCheckpointRevertInput = {
workspaceId: string;
checkpointId?: string;
at?: string;
expectedRevision: number;
devices?: {
endpointId: string;
challengeId: string;
authorizationCode?: number;
}[];
};
type SetupCheckpointRevertOutput = {
checkpointId: string | null;
revision: number;
previousRevision: number;
changes: {
target:
| "alarm_rule"
| "automation"
| "dashboard"
| "edge_program"
| "endpoint"
| "parameter"
| "parameter_tree_branch"
| "report_comment"
| "report_preset"
| "workspace"
| "workspace_file";
key: string;
name: string | null;
change: "created" | "deleted" | "updated";
}[];
constValues: {
checkpointId: string | null;
checkpointCreatedAt: string | null;
changed: number;
};
edgeDeployJobIds: string[];
};
type SetupCheckpointRevertPreview = {
revision: number;
targetRevision: number;
targetTime: string;
changes: {
target:
| "alarm_rule"
| "automation"
| "dashboard"
| "edge_program"
| "endpoint"
| "parameter"
| "parameter_tree_branch"
| "report_comment"
| "report_preset"
| "workspace"
| "workspace_file";
key: string;
name: string | null;
change: "created" | "deleted" | "updated";
}[];
constValues: {
checkpointId: string | null;
checkpointCreatedAt: string | null;
changed: number;
};
devices: {
endpointId: string;
name: string | null;
pinCode: string;
}[];
unreadable: {
target:
| "alarm_rule"
| "automation"
| "dashboard"
| "edge_program"
| "endpoint"
| "parameter"
| "parameter_tree_branch"
| "report_comment"
| "report_preset"
| "workspace"
| "workspace_file";
key: string;
name: string | null;
}[];
};
type SetupCheckpointRevertTargetInput = {
workspaceId: string;
checkpointId?: string;
at?: string;
};
type StorageAlarmLogPreview = {
records: number;
};
type StorageAlarmLogSelection = {
workspaceId: string;
before: string;
};
type StorageDeletePreview = {
records: number;
parameters: number;
until: number;
};
type StorageDeleteRetentionOverrideInput = {
workspaceId: string;
overrideId: string;
};
type StorageHistoryPreview = {
records: number;
};
type StorageHistorySelection = {
workspaceId: string;
before: string;
};
type StorageJobOutput = {
jobId: string;
};
type StorageReadingsSelection = {
workspaceId: string;
scope:
| {
kind: "workspace";
}
| {
kind: "parameters";
parameterIds: string[];
};
from?: number;
to?: number;
};
type StorageRetentionPreviewInput = {
workspaceId: string;
retention: {
readingsKeepDays: number | null;
auditKeepDays: number | null;
alarmLogKeepDays: number | null;
overrides: {
keepDays: number | null;
parameterIds: string[];
branchIds: string[];
}[];
};
};
type StorageRetentionPreviewResult = {
readingsRecords: number;
auditRecords: number;
alarmLogRecords: number;
};
type StorageRetentionSettings = {
readingsKeepDays: number | null;
auditKeepDays: number | null;
alarmLogKeepDays: number | null;
overrides: {
id: string;
keepDays: number | null;
parameterIds: string[];
branchIds: string[];
}[];
};
type StorageSaveRetentionOverrideInput = {
workspaceId: string;
overrideId?: string;
keepDays: number | null;
parameterIds: string[];
branchIds: string[];
};
type StorageSaveRetentionOverrideOutput = {
overrideId: string;
};
type StorageSetRetentionDefaultsInput = {
workspaceId: string;
readingsKeepDays?: number | null;
auditKeepDays?: number | null;
alarmLogKeepDays?: number | null;
};
type StorageUsageSummary = {
billedAt: string | null;
measuredAt: string | null;
readings: {
records: number;
parameters: {
parameterId: string;
live: boolean;
name: string | null;
records: number;
firstAt: string | null;
lastAt: string | null;
}[];
};
audit: {
records: number;
firstAt: string | null;
};
alarmLog: {
records: number;
firstAt: string | null;
};
files: {
bytes: number;
areas: {
area: "builds" | "dashboards" | "history" | "other" | "templates" | "uploads";
files: number;
bytes: number;
}[];
};
};
type StorageWorkspaceInput = {
workspaceId: string;
};
type WorkspacePullOutput = {
workspace: {
timezone?: string;
location?: {
lat: number;
lng: number;
} | null;
name: string;
};
automationLimits?: {
maxStepsPerRun: number;
minTriggerIntervalMs: number;
maxWritesPerMinute: number;
};
revision: number;
dashboards: {
id: string;
revision: number;
settings: {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
sortOrder: number;
};
createdAt: string;
updatedAt: string;
}[];
endpoints: {
id: string;
revision: number;
settings:
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "direct";
hostname: string;
pinCode: null;
publicKey: null;
deviceMeta: null;
}
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "pin";
hostname: null;
pinCode: string;
publicKey: string;
sku: string | null;
deviceMeta: {
macAddress: string | null;
manufacturer: string | null;
} | null;
}
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "wireguard";
hostname: null;
pinCode: null;
publicKey: string;
deviceMeta: null;
};
createdAt: string;
updatedAt: string;
}[];
edgePrograms: {
id: string;
revision: number;
settings: {
endpointId: string;
fileName: string;
description: string | Record<string, string> | null;
enabled: boolean;
};
createdAt: string;
updatedAt: string;
}[];
parameterBranches: {
id: string;
revision: number;
settings: {
parentId: string | null;
name: string | Record<string, string>;
sortOrder: number;
};
createdAt: string;
updatedAt: string;
}[];
parameters: {
id: string;
revision: number;
settings: {
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction:
"always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs: number | null;
sortOrder: number;
};
createdAt: string;
updatedAt: string;
}[];
reportPresets: {
id: string;
revision: number;
settings: {
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
};
createdAt: string;
updatedAt: string;
}[];
reportComments: {
id: string;
revision: number;
settings: {
reportPresetId: string;
content: string;
author:
| {
kind: "user";
accountId: string;
}
| {
kind: "deleted-user";
}
| {
kind: "system";
}
| {
kind: "assistant";
};
createdAt: number;
updatedAt: number;
dataRange: {
parameterId: string | null;
from: number;
to: number;
};
isSignature: boolean;
digitalSignature: string | null;
};
createdAt: string;
updatedAt: string;
}[];
alarmRules: {
id: string;
revision: number;
settings: AlarmRuleSetupPayload;
createdAt: string;
updatedAt: string;
}[];
automations: {
id: string;
revision: number;
settings: AutomationSetupPayload;
createdAt: string;
updatedAt: string;
}[];
tombstones: [
(
| "alarm_rule"
| "automation"
| "dashboard"
| "edge_program"
| "endpoint"
| "parameter"
| "parameter_tree_branch"
| "report_comment"
| "report_preset"
),
string,
number,
][];
fileHashes: Record<string, string>;
fileCreatedAt?: Record<string, string>;
distPaths: Record<string, string[]>;
distHashes?: Record<string, Record<string, string>>;
};
type WorkspacePushInput = {
workspaceId: string;
pushId: string;
bases?: Record<string, number>;
workspace?: {
timezone?: string;
location?: {
lat: number;
lng: number;
} | null;
name: string;
};
upserts: {
parameters?: Record<
string,
{
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction:
"always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs: number | null;
sortOrder: number;
}
>;
parameterBranches?: Record<
string,
{
parentId: string | null;
name: string | Record<string, string>;
sortOrder: number;
}
>;
endpoints?: Record<
string,
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "direct";
hostname: string;
pinCode: null;
publicKey: null;
deviceMeta: null;
}
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "pin";
hostname: null;
pinCode: string;
publicKey: string;
sku: string | null;
deviceMeta: {
macAddress: string | null;
manufacturer: string | null;
} | null;
}
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "wireguard";
hostname: null;
pinCode: null;
publicKey: string;
deviceMeta: null;
}
>;
edgePrograms?: Record<
string,
{
endpointId: string;
fileName: string;
description: string | Record<string, string> | null;
enabled: boolean;
}
>;
dashboards?: Record<
string,
{
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
sortOrder: number;
}
>;
reportPresets?: Record<
string,
{
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
}
>;
reportComments?: Record<
string,
{
reportPresetId: string;
content: string;
author:
| {
kind: "user";
accountId: string;
}
| {
kind: "deleted-user";
}
| {
kind: "system";
}
| {
kind: "assistant";
};
createdAt: number;
updatedAt: number;
dataRange: {
parameterId: string | null;
from: number;
to: number;
};
isSignature: boolean;
digitalSignature: string | null;
}
>;
alarmRules?: Record<string, AlarmRuleSetupPayload>;
automations?: Record<string, AutomationSetupPayload>;
};
tombstones?: [
(
| "alarm_rule"
| "automation"
| "dashboard"
| "edge_program"
| "endpoint"
| "parameter"
| "parameter_tree_branch"
| "report_comment"
| "report_preset"
),
string,
][];
files?: {
upserts?: Record<
string,
{
sha256: string;
size: number;
}
>;
deletes?: string[];
bases?: Record<string, string | null>;
};
dist?: Record<
string,
Record<
string,
{
sha256: string;
size: number;
}
>
>;
trigger?: {
kind: "import" | "push" | "upload";
command?: string;
};
};
type WorkspacePushStageInput = {
workspaceId: string;
pushId: string;
bases?: Record<string, number>;
workspace?: {
timezone?: string;
location?: {
lat: number;
lng: number;
} | null;
name: string;
};
upserts: {
parameters?: Record<
string,
{
branchId: string;
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
units: string | Record<string, string> | null;
mnemonic: string | Record<string, string> | null;
tags: string[];
source:
| {
kind: "const";
key: string;
allowWrite: boolean;
}
| {
kind: "calc";
inputParamIds: string[];
formula: string;
returnFormat: "float" | "int";
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "coil" | "holding-register";
addresses: number[];
writeFunction:
"always-multi-write" | "multi-or-single-write" | "none" | "single-write";
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
}
| {
kind: "modbus-tcp";
endpointId: string;
unitId: number;
table: "discrete-input" | "input-register";
addresses: number[];
read?: {
allowMultiRead?: boolean;
maxQuantityPerRequest?: number;
atomic?: boolean;
maxMergeGap?: number;
};
};
valueType:
| {
name: "str";
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
encoding: "ascii" | "base64" | "hex" | "utf16le" | "utf8";
nulTerminated: boolean;
writeValidation: {
minLength: number | null;
maxLength: number | null;
allowedValues: string[] | null;
};
}
| {
name: "num";
readUnavailableValue?: number;
composition: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing:
| "bcd-int"
| "decimal16"
| "decimal32"
| "decimal64"
| "float16"
| "float32"
| "float64"
| "signed-int"
| "unsigned-int";
};
multiplier: number;
shift: number;
decimalPlaces: number | null;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
zones: {
min: number | null;
lowOrangeBegins: number | null;
greenBegins: number | null;
highOrangeBegins: number | null;
highRedBegins: number | null;
max: number | null;
} | null;
}
| {
name: "int";
readUnavailableValue?: number;
composition:
| {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
byteLength: number;
packing: "bcd" | "signed-int" | "unsigned-int";
}
| {
fromBits: number[];
signed: boolean;
};
multiplier: number;
shift: number;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: number | null;
max: number | null;
};
repr:
| {
value: number;
repr: string | Record<string, string>;
zone: "green" | "orange" | "red" | null;
}[]
| null;
}
| {
name: "bool";
bit: number | null;
repr: {
true: string | Record<string, string>;
false: string | Record<string, string>;
} | null;
}
| {
name: "bigint";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
signed: boolean;
multiplier: string;
shift: string;
transform: {
fromRead: string;
toWrite: string | null;
} | null;
writeValidation: {
min: string | null;
max: string | null;
allowedValues: string[] | null;
};
}
| {
name: "datetime";
composition:
| {
kind: "timestamp-sec-32";
zeroIsUnavailable?: boolean;
}
| {
kind: "timestamp-msec-32";
}
| {
kind: "timestamp-days-32";
}
| {
kind: "timestamp-days-16";
}
| {
kind: "iso-8601-string";
}
| {
kind: "datetime";
year:
| {
bytePosition: number;
}
| {
wordPosition: number;
}
| null;
month: {
bytePosition: number;
startsFromOne: boolean;
} | null;
day: {
bytePosition: number;
startsFromOne: boolean;
} | null;
hour: {
bytePosition: number;
amPmBitPosition: number | null;
} | null;
minute: {
bytePosition: number;
} | null;
second: {
bytePosition: number;
} | null;
millisecond: {
wordPosition: number;
} | null;
timezoneOffset: {
pos:
| {
bytePosition: number;
}
| {
wordPosition: number;
};
value: "hours" | "minutes" | "seconds";
} | null;
};
displayFormat: string;
shiftSeconds: number | null;
timezone: string | null;
}
| {
name: "ipaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
variant: "ipv4" | "ipv6";
}
| {
name: "macaddr";
byteRelation: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
}
| {
name: "geo";
decimalPlaces: number | null;
composition:
| {
encoding: "scalar";
longitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
latitude: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
multiplier: number;
shift: number;
};
}
| {
encoding: "dms";
longitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
latitude: {
degrees: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
minutes: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
seconds: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
quadrant: {
fromBytes: {
swap?: "bytes" | "words";
swapBytesInWords?: true;
filterBytes?: "leave-first-byte-in-word" | "leave-last-byte-in-word";
};
position: number;
byteLength: number;
packing: "float32" | "float64" | "signed-int" | "unsigned-int";
};
};
};
disabledSince: string | null;
backgroundReadingPeriodMs: number | null;
sortOrder: number;
}
>;
parameterBranches?: Record<
string,
{
parentId: string | null;
name: string | Record<string, string>;
sortOrder: number;
}
>;
endpoints?: Record<
string,
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "direct";
hostname: string;
pinCode: null;
publicKey: null;
deviceMeta: null;
}
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "pin";
hostname: null;
pinCode: string;
publicKey: string;
sku: string | null;
deviceMeta: {
macAddress: string | null;
manufacturer: string | null;
} | null;
}
| {
name: string | Record<string, string>;
description: string | Record<string, string> | null;
protocol: "modbus-tcp";
port: number;
settings: {
tcp: {
maxTcpPacketSize: number;
maxParallelInflightAdus: number;
maxQueuedAdus: number;
connectTimeoutMs: number;
connectRetryDelayMs: number;
totalRequestTimeoutMs: number;
responseAwaitTimeoutMs: number;
tcpKeepaliveEveryMs: number;
disconnectAfterProtocolErrorCount: number | null;
};
edge?: {
autoSync: boolean;
deviceLogging: boolean;
readingsPullMinutes: number;
};
};
disabledSince: string | null;
kind: "wireguard";
hostname: null;
pinCode: null;
publicKey: string;
deviceMeta: null;
}
>;
edgePrograms?: Record<
string,
{
endpointId: string;
fileName: string;
description: string | Record<string, string> | null;
enabled: boolean;
}
>;
dashboards?: Record<
string,
{
name: string | Record<string, string>;
description: string | Record<string, string> | null;
icon: string | null;
configuration: Record<string, unknown>;
disabledSince: string | null;
sortOrder: number;
}
>;
reportPresets?: Record<
string,
{
title: string | Record<string, string>;
description: string | Record<string, string> | null;
parameters: (
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "numeric";
zoneColors: {
color:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
minValue: number;
maxValue: number;
}[];
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "integer";
valueColors: Record<
string,
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow"
>;
}
| {
parameterId: string;
sourceValueType: string;
label: string | Record<string, string>;
units: string | Record<string, string> | null;
icon: string | null;
defaultColor:
| "amber"
| "blue"
| "cyan"
| "emerald"
| "fuchsia"
| "green"
| "indigo"
| "orange"
| "pink"
| "purple"
| "red"
| "sky"
| "slate"
| "teal"
| "violet"
| "yellow";
bold: boolean;
italic: boolean;
type: "string";
}
)[];
representations: Record<
string,
| {
type: "chart";
parameters: (
| {
parameterId: string;
type: "numeric";
opacity: number;
showAs: "bars" | "dots" | "fill" | "line" | "stacked-bars" | "stacked-fills";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
smallestGapSizeMs: number;
}
| {
parameterId: string;
type: "integer";
opacity: number;
showAs: "filled-areas" | "vertical-line-on-change";
}
| {
parameterId: string;
type: "string";
opacity: number;
showAs: "vertical-line-on-change";
}
)[];
minimumPrecisionMs: number;
maximumPointsOnScreenPerParameter: number;
fullRangePointsForNavigationPerParameter: number;
focusAxisOnSeries: boolean;
realtimeUpdate: boolean;
showMinMaxPerParameter: boolean;
height: number;
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
legend: "interactive" | "non-interactive" | "none";
showComments: boolean;
}
| {
type: "table";
parameters: (
| {
parameterId: string;
type: "numeric";
decimalPlaces: number;
perCadenceValue: "average" | "first" | "latest";
totals: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
bgZoneColorOpacity: number;
}
| {
parameterId: string;
type: "integer";
bgOpacity: Record<string, number>;
totals: "last" | "none";
}
| {
parameterId: string;
type: "string";
totals: "last" | "none";
}
)[];
rowCadenceMs: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
subtotals: "none" | "per-day" | "per-hour";
compact: boolean;
maxHeight: number | null;
stickyColHeader: boolean;
stickyRowHeader: boolean;
showComments: boolean;
}
| {
type: "time-buckets";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "15m" | "1d" | "1h" | "1m" | "30m" | "4h" | "5m";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
chartDisplay: "frozen" | "movable";
navStrip: "frozen" | "movable" | "none";
}
| {
type: "histogram";
parameters: {
parameterId: string;
type: "numeric";
perCadenceValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
scaleMultiplier: number;
scaleShift: number;
}[];
displayAs: "neighbour-bars" | "stacked-bars" | "stacked-fills";
cadence: "1d-of-month" | "1d-of-week" | "1h-of-day" | "1h-of-week" | "30m-of-day";
height: number;
legend: "interactive" | "non-interactive" | "none";
showTooltips: boolean;
}
| {
type: "calendar";
showAs: "month-days" | "week-days" | "week-hours" | "year-days";
dayValueParameter: {
parameterId: string;
type: "numeric";
perDayValue: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
dayTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
dayBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
compact: boolean;
showTitles: boolean;
interactive: boolean;
}
| {
type: "hourly-matrix";
cadence: "15m" | "1h" | "30m";
stackDays: "vertical";
compact: boolean;
showTitles: boolean;
interactive: boolean;
parameters: {
label: string | Record<string, string>;
dayHeaderParameters:
| (
| {
parameterId: string;
type: "numeric";
perDayAggregation:
"average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
zoneBgOpacity: number;
}
| {
parameterId: string;
type: "integer" | "string";
perDayAggregation: "first" | "latest";
}
)[]
| null;
cellValueParameter: {
parameterId: string;
type: "numeric";
aggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
decimalPlaces: number;
} | null;
cellTextColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBgColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
cellBorderColorParameter: {
parameterId: string;
type: "integer" | "numeric";
} | null;
valueTotalsPerDay: {
header: string | Record<string, string>;
aggregation: "average" | "delta" | "last" | "max" | "min" | "none" | "sum";
};
}[];
}
| {
type: "sankey";
nodes: {
id: string;
label: string | Record<string, string>;
}[];
links: {
fromNodeId: string;
toNodeId: string;
parameterId: string;
decimalPlaces: number;
}[];
valueAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
interactive: boolean;
}
| {
type: "state-duration";
parameters: {
parameterId: string;
type: "integer";
}[];
displayAs: "bars" | "pie" | "table";
compact: boolean;
height: number | null;
showTitles: boolean;
showTooltips: boolean;
}
>;
layout: {
type: "simple";
rows: {
representation: string;
column: "1/2" | "1/3" | "1/4" | "full";
}[][];
};
defaultTimeRange:
| {
type: "fixed";
from: number;
to: number;
}
| {
type: "current";
segment: "day" | "hour" | "month" | "week" | "year";
}
| {
type: "last-days";
days: number;
}
| {
type: "from-to-now";
from: number;
}
| {
type: "full-range-to-now";
};
immutableTimeRange: boolean;
allowAddComments: boolean;
displayCommentsSummary: boolean;
allowSigning: boolean;
allowRender: boolean;
exportToCsv: {
parameterIds: string[];
cadence: "15m" | "1d" | "1h" | "1m" | "1s" | "30m" | "4h" | "5m" | "precise";
numericAggregation: "average" | "delta" | "first" | "latest" | "max" | "min" | "sum";
integerAggregation: "first" | "latest";
stringAggregation: "first" | "latest";
} | null;
showEditButton: boolean;
timezone: string;
}
>;
reportComments?: Record<
string,
{
reportPresetId: string;
content: string;
author:
| {
kind: "user";
accountId: string;
}
| {
kind: "deleted-user";
}
| {
kind: "system";
}
| {
kind: "assistant";
};
createdAt: number;
updatedAt: number;
dataRange: {
parameterId: string | null;
from: number;
to: number;
};
isSignature: boolean;
digitalSignature: string | null;
}
>;
alarmRules?: Record<string, AlarmRuleSetupPayload>;
automations?: Record<string, AutomationSetupPayload>;
};
tombstones?: [
(
| "alarm_rule"
| "automation"
| "dashboard"
| "edge_program"
| "endpoint"
| "parameter"
| "parameter_tree_branch"
| "report_comment"
| "report_preset"
),
string,
][];
files?: {
upserts?: Record<
string,
{
sha256: string;
size: number;
}
>;
deletes?: string[];
bases?: Record<string, string | null>;
};
dist?: Record<
string,
Record<
string,
{
sha256: string;
size: number;
}
>
>;
trigger?: {
kind: "import" | "push" | "upload";
command?: string;
};
attempt: string;
part: number;
};