export type SouthADSItemSettings = {address: string}; export type HistoryQueryADSItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthADSItemSettings}; export type SouthBACnetItemSettingsObjectType = 'analog-input' | 'analog-output' | 'analog-value' | 'binary-input' | 'binary-output' | 'binary-value' | 'multi-state-input' | 'multi-state-output' | 'multi-state-value' | 'accumulator' | 'pulse-converter' | 'loop' | 'integer-value' | 'positive-integer-value' | 'large-analog-value' | 'characterstring-value' | 'trend-log'; export type SouthBACnetItemSettingsPropertyIdentifier = 'present-value' | 'status-flags' | 'reliability' | 'out-of-service' | 'units'; export type Timezone = string; export type SouthBACnetItemSettings = {deviceAddress: string, deviceInstance: number, objectType: SouthBACnetItemSettingsObjectType, objectInstance: number, propertyIdentifier?: SouthBACnetItemSettingsPropertyIdentifier | undefined, timezone?: Timezone | undefined, routed: boolean, networkNumber?: number | undefined, macAddress?: string | undefined}; export type HistoryQueryBACnetItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthBACnetItemSettings}; export type SouthFolderScannerItemSettings = {regex: string, minAge: number, preserveFiles: boolean, ignoreModifiedDate?: boolean | undefined, maxFiles: number, maxSize: number, recursive: boolean}; export type HistoryQueryFolderScannerItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthFolderScannerItemSettings}; export type SouthFTPItemSettings = {remoteFolder: string, regex: string, minAge: number, preserveFiles: boolean, ignoreModifiedDate?: boolean | undefined, maxFiles: number, maxSize: number, recursive: boolean}; export type HistoryQueryFTPItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthFTPItemSettings}; export type SouthInfluxDBItemSettings = {query: string, requestTimeout: number}; export type HistoryQueryInfluxDBItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthInfluxDBItemSettings}; export type SouthModbusItemSettingsModbusType = 'coil' | 'discrete-input' | 'input-register' | 'holding-register'; export type SouthModbusItemSettingsDataDataType = 'uint16' | 'int16' | 'uint32' | 'int32' | 'big-uint64' | 'big-int64' | 'float' | 'double' | 'bit'; export type SouthModbusItemSettingsData = {dataType: SouthModbusItemSettingsDataDataType, bitIndex?: number | undefined, multiplierCoefficient: number}; export type SouthModbusItemSettings = {address: string, modbusType: SouthModbusItemSettingsModbusType, data?: (SouthModbusItemSettingsData | null) | undefined}; export type HistoryQueryModbusItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthModbusItemSettings}; export type SouthMongoDBItemSettingsQueryType = 'find' | 'aggregation'; export type SouthMongoDBItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms' | 'timestamp'; export type SouthMongoDBItemSettingsTrackingInstantDateTimeInput = {type: SouthMongoDBItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthMongoDBItemSettingsTrackingInstant = {trackInstant: boolean, jsonPath?: string | undefined, dateTimeInput?: (SouthMongoDBItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthMongoDBItemSettings = {collection: string, queryType: SouthMongoDBItemSettingsQueryType, query: string, sort: string, trackingInstant: SouthMongoDBItemSettingsTrackingInstant | null}; export type HistoryQueryMongoDBItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthMongoDBItemSettings}; export type SouthMQTTItemSettings = {topic: string}; export type HistoryQueryMQTTItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthMQTTItemSettings}; export type SouthMSSQLItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms' | 'date' | 'small-date-time' | 'date-time' | 'date-time-2' | 'date-time-offset'; export type SouthMSSQLItemSettingsTrackingInstantDateTimeInput = {type: SouthMSSQLItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthMSSQLItemSettingsTrackingInstant = {trackInstant: boolean, fieldName?: string | undefined, dateTimeInput?: (SouthMSSQLItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthMSSQLItemSettings = {query: string, requestTimeout: number, trackingInstant: SouthMSSQLItemSettingsTrackingInstant | null}; export type HistoryQueryMSSQLItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthMSSQLItemSettings}; export type SouthMySQLItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms' | 'date-time'; export type SouthMySQLItemSettingsTrackingInstantDateTimeInput = {type: SouthMySQLItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthMySQLItemSettingsTrackingInstant = {trackInstant: boolean, fieldName?: string | undefined, dateTimeInput?: (SouthMySQLItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthMySQLItemSettings = {query: string, requestTimeout: number, trackingInstant: SouthMySQLItemSettingsTrackingInstant | null}; export type HistoryQueryMySQLItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthMySQLItemSettings}; export type SouthODBCItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms'; export type SouthODBCItemSettingsTrackingInstantDateTimeInput = {type: SouthODBCItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthODBCItemSettingsTrackingInstant = {trackInstant: boolean, fieldName?: string | undefined, dateTimeInput?: (SouthODBCItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthODBCItemSettings = {query: string, trackingInstant: SouthODBCItemSettingsTrackingInstant | null}; export type HistoryQueryODBCItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthODBCItemSettings}; export type SouthOIAnalyticsItemSettingsQueryParams = {key: string, value: string}; export type SouthOIAnalyticsItemSettings = {endpoint: string, queryParams: Array}; export type HistoryQueryOIAnalyticsItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthOIAnalyticsItemSettings}; export type SouthOLEDBItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms'; export type SouthOLEDBItemSettingsTrackingInstantDateTimeInput = {type: SouthOLEDBItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthOLEDBItemSettingsTrackingInstant = {trackInstant: boolean, fieldName?: string | undefined, dateTimeInput?: (SouthOLEDBItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthOLEDBItemSettings = {query: string, trackingInstant: SouthOLEDBItemSettingsTrackingInstant | null}; export type HistoryQueryOLEDBItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthOLEDBItemSettings}; export type SouthOPCItemSettingsAggregate = 'raw' | 'interpolative' | 'total' | 'average' | 'time-average' | 'count' | 'stdev' | 'minimum-actual-time' | 'minimum' | 'maximum-actual-time' | 'maximum' | 'start' | 'end' | 'delta' | 'reg-slope' | 'reg-const' | 'reg-dev' | 'variance' | 'range' | 'duration-good' | 'duration-bad' | 'percent-good' | 'percent-bad' | 'worst-quality' | 'annotations'; export type SouthOPCItemSettingsResampling = 'none' | '1s' | '10s' | '30s' | '1min' | '1h' | '1d'; export type SouthOPCItemSettings = {nodeId: string, aggregate: SouthOPCItemSettingsAggregate, resampling?: SouthOPCItemSettingsResampling | undefined}; export type HistoryQueryOPCItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthOPCItemSettings}; export type SouthOPCUAItemSettingsMode = 'da' | 'ha'; export type SouthOPCUAItemSettingsHaModeAggregate = 'raw' | 'average' | 'count' | 'minimum' | 'maximum'; export type SouthOPCUAItemSettingsHaModeResampling = 'none' | '1s' | '10s' | '30s' | '1min' | '1h' | '1d'; export type SouthOPCUAItemSettingsHaMode = {aggregate: SouthOPCUAItemSettingsHaModeAggregate, resampling?: SouthOPCUAItemSettingsHaModeResampling | undefined}; export type SouthOPCUAItemSettingsTimestampOrigin = 'oibus' | 'point' | 'server'; export type SouthOPCUAItemSettings = {nodeId: string, mode: SouthOPCUAItemSettingsMode, haMode?: SouthOPCUAItemSettingsHaMode | undefined, timestampOrigin?: SouthOPCUAItemSettingsTimestampOrigin | undefined}; export type HistoryQueryOPCUAItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthOPCUAItemSettings}; export type SouthOracleItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms' | 'date-time'; export type SouthOracleItemSettingsTrackingInstantDateTimeInput = {type: SouthOracleItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthOracleItemSettingsTrackingInstant = {trackInstant: boolean, fieldName?: string | undefined, dateTimeInput?: (SouthOracleItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthOracleItemSettings = {query: string, requestTimeout: number, trackingInstant: SouthOracleItemSettingsTrackingInstant | null}; export type HistoryQueryOracleItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthOracleItemSettings}; export type SouthPIItemSettingsType = 'point-id' | 'point-query'; export type SouthPIItemSettings = {type: SouthPIItemSettingsType, piPoint?: string | undefined, piQuery?: string | undefined, valueFilter: string | null}; export type HistoryQueryOsisoftPIItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthPIItemSettings}; export type SouthPostgreSQLItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms' | 'timestamp' | 'timestamptz'; export type SouthPostgreSQLItemSettingsTrackingInstantDateTimeInput = {type: SouthPostgreSQLItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthPostgreSQLItemSettingsTrackingInstant = {trackInstant: boolean, fieldName?: string | undefined, dateTimeInput?: (SouthPostgreSQLItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthPostgreSQLItemSettings = {query: string, requestTimeout: number, trackingInstant: SouthPostgreSQLItemSettingsTrackingInstant | null}; export type HistoryQueryPostgreSQLItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthPostgreSQLItemSettings}; export type SouthRestItemSettingsMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'; export type SouthRestItemSettingsReturnType = 'file' | 'body'; export type SouthRestItemSettingsQueryParamsDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms'; export type SouthRestItemSettingsQueryParamsDateTimeInput = {type: SouthRestItemSettingsQueryParamsDateTimeInputType | null, timezone?: (Timezone | null) | undefined, format?: (string | null) | undefined}; export type SouthRestItemSettingsQueryParams = {key: string, value: string, dateTimeInput?: (SouthRestItemSettingsQueryParamsDateTimeInput | null) | undefined}; export type SouthRestItemSettingsHeadersDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms'; export type SouthRestItemSettingsHeadersDateTimeInput = {type: SouthRestItemSettingsHeadersDateTimeInputType | null, timezone?: (Timezone | null) | undefined, format?: (string | null) | undefined}; export type SouthRestItemSettingsHeaders = {key: string, value: string, dateTimeInput?: (SouthRestItemSettingsHeadersDateTimeInput | null) | undefined}; export type SouthRestItemSettingsBodyDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms'; export type SouthRestItemSettingsBodyDateTimeInput = {type: SouthRestItemSettingsBodyDateTimeInputType | null, timezone?: (Timezone | null) | undefined, format?: (string | null) | undefined}; export type SouthRestItemSettingsBody = {content: string | null, dateTimeInput?: (SouthRestItemSettingsBodyDateTimeInput | null) | undefined}; export type SouthRestItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms'; export type SouthRestItemSettingsTrackingInstantDateTimeInput = {type: SouthRestItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthRestItemSettingsTrackingInstant = {trackInstant: boolean, jsonPath?: string | undefined, dateTimeInput?: (SouthRestItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthRestItemSettings = {method: SouthRestItemSettingsMethod, endpoint: string, returnType: SouthRestItemSettingsReturnType, queryParams: Array, headers: Array, body?: (SouthRestItemSettingsBody | null) | undefined, trackingInstant?: (SouthRestItemSettingsTrackingInstant | null) | undefined}; export type HistoryQueryRESTItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthRestItemSettings}; export type SouthS7ItemSettings = {address: string}; export type HistoryQueryS7ItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthS7ItemSettings}; export type SouthSFTPItemSettings = {remoteFolder: string, regex: string, minAge: number, preserveFiles: boolean, ignoreModifiedDate?: boolean | undefined, maxFiles: number, maxSize: number, recursive: boolean}; export type HistoryQuerySFTPItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthSFTPItemSettings}; export type SouthSQLiteItemSettingsTrackingInstantDateTimeInputType = 'string' | 'iso-string' | 'unix-epoch' | 'unix-epoch-ms'; export type SouthSQLiteItemSettingsTrackingInstantDateTimeInput = {type: SouthSQLiteItemSettingsTrackingInstantDateTimeInputType, timezone?: Timezone | undefined, format?: string | undefined, locale?: string | undefined}; export type SouthSQLiteItemSettingsTrackingInstant = {trackInstant: boolean, fieldName?: string | undefined, dateTimeInput?: (SouthSQLiteItemSettingsTrackingInstantDateTimeInput | null) | undefined}; export type SouthSQLiteItemSettings = {query: string, trackingInstant: SouthSQLiteItemSettingsTrackingInstant | null}; export type HistoryQuerySQLiteItemCommandDTO = {id: string | null, name: string, description: string | null, enabled: boolean, settings: SouthSQLiteItemSettings}; export type HistoryQueryItemCommandDTO = HistoryQueryADSItemCommandDTO | HistoryQueryBACnetItemCommandDTO | HistoryQueryFolderScannerItemCommandDTO | HistoryQueryFTPItemCommandDTO | HistoryQueryInfluxDBItemCommandDTO | HistoryQueryModbusItemCommandDTO | HistoryQueryMongoDBItemCommandDTO | HistoryQueryMQTTItemCommandDTO | HistoryQueryMSSQLItemCommandDTO | HistoryQueryMySQLItemCommandDTO | HistoryQueryODBCItemCommandDTO | HistoryQueryOIAnalyticsItemCommandDTO | HistoryQueryOLEDBItemCommandDTO | HistoryQueryOPCItemCommandDTO | HistoryQueryOPCUAItemCommandDTO | HistoryQueryOracleItemCommandDTO | HistoryQueryOsisoftPIItemCommandDTO | HistoryQueryPostgreSQLItemCommandDTO | HistoryQueryRESTItemCommandDTO | HistoryQueryS7ItemCommandDTO | HistoryQuerySFTPItemCommandDTO | HistoryQuerySQLiteItemCommandDTO; export type UpdateApiApiHistoryHistoryIdItemsItemIdArgs = {historyId: string, itemId: string, body: HistoryQueryItemCommandDTO}; export type UpdateApiApiHistoryHistoryIdItemsItemIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Update history query item * * PUT /api/history/{historyId}/items/{itemId} */ export const updateApiApiHistoryHistoryIdItemsItemId = async (args: UpdateApiApiHistoryHistoryIdItemsItemIdArgs, options?: UpdateApiApiHistoryHistoryIdItemsItemIdOptions) => { const {baseUrl = "http://localhost:2223", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") const url = `${baseUrl.replace(/\/+$/, '')}/api/history/${encodeURIComponent(String(args.historyId))}/items/${encodeURIComponent(String(args.itemId))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "PUT", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };