11public protocol API {
2-
32 /// Closes the current authentication session.
43 ///
54 /// https://project-haystack.org/doc/docHaystack/Ops#close
6- func close( ) async throws -> Void
7-
5+ func close( ) async throws
6+
87 /// Queries basic information about the server
98 ///
109 /// https://project-haystack.org/doc/docHaystack/Ops#about
1110 func about( ) async throws -> Grid
12-
11+
1312 /// Queries def dicts from the current namespace
1413 ///
1514 /// https://project-haystack.org/doc/docHaystack/Ops#defs
@@ -19,7 +18,7 @@ public protocol API {
1918 /// - limit: The maximum number of defs to return in response
2019 /// - Returns: A grid with the dict representation of each def
2120 func defs( filter: String ? , limit: Number ? ) async throws -> Grid
22-
21+
2322 /// Queries lib defs from current namspace
2423 ///
2524 /// https://project-haystack.org/doc/docHaystack/Ops#libs
@@ -29,7 +28,7 @@ public protocol API {
2928 /// - limit: The maximum number of defs to return in response
3029 /// - Returns: A grid with the dict representation of each def
3130 func libs( filter: String ? , limit: Number ? ) async throws -> Grid
32-
31+
3332 /// Queries op defs from current namspace
3433 ///
3534 /// https://project-haystack.org/doc/docHaystack/Ops#ops
@@ -39,7 +38,7 @@ public protocol API {
3938 /// - limit: The maximum number of defs to return in response
4039 /// - Returns: A grid with the dict representation of each def
4140 func ops( filter: String ? , limit: Number ? ) async throws -> Grid
42-
41+
4342 /// Queries filetype defs from current namspace
4443 ///
4544 /// https://project-haystack.org/doc/docHaystack/Ops#filetypes
@@ -49,15 +48,15 @@ public protocol API {
4948 /// - limit: The maximum number of defs to return in response
5049 /// - Returns: A grid with the dict representation of each def
5150 func filetypes( filter: String ? , limit: Number ? ) async throws -> Grid
52-
51+
5352 /// Read a set of entity records by their unique identifier
5453 ///
5554 /// https://project-haystack.org/doc/docHaystack/Ops#read
5655 ///
5756 /// - Parameter ids: Ref identifiers
5857 /// - Returns: A grid with a row for each entity read
5958 func read( ids: [ Ref ] ) async throws -> Grid
60-
59+
6160 /// Read a set of entity records using a filter
6261 ///
6362 /// https://project-haystack.org/doc/docHaystack/Ops#read
@@ -67,15 +66,15 @@ public protocol API {
6766 /// - limit: The maximum number of entities to return in response
6867 /// - Returns: A grid with a row for each entity read
6968 func read( filter: String , limit: Number ? ) async throws -> Grid
70-
69+
7170 /// Navigate a project for learning and discovery
7271 ///
7372 /// https://project-haystack.org/doc/docHaystack/Ops#nav
7473 ///
7574 /// - Parameter navId: The ID of the entity to navigate from. If null, the navigation root is used.
7675 /// - Returns: A grid of navigation children for the navId specified by the request
7776 func nav( navId: Ref ? ) async throws -> Grid
78-
77+
7978 /// Reads time-series data from historized point
8079 ///
8180 /// https://project-haystack.org/doc/docHaystack/Ops#hisRead
@@ -85,7 +84,7 @@ public protocol API {
8584 /// - range: A date-time range
8685 /// - Returns: A grid whose rows represent timetamp/value pairs with a DateTime ts column and a val column for each scalar value
8786 func hisRead( id: Ref , range: HisReadRange ) async throws -> Grid
88-
87+
8988 /// Posts new time-series data to a historized point
9089 ///
9190 /// https://project-haystack.org/doc/docHaystack/Ops#hisWrite
@@ -95,7 +94,7 @@ public protocol API {
9594 /// - items: New timestamp/value samples to write
9695 /// - Returns: An empty grid
9796 func hisWrite( id: Ref , items: [ HisItem ] ) async throws -> Grid
98-
97+
9998 /// Write to a given level of a writable point's priority array
10099 ///
101100 /// https://project-haystack.org/doc/docHaystack/Ops#pointWrite
@@ -108,15 +107,15 @@ public protocol API {
108107 /// - duration: Number with duration unit if setting level 8
109108 /// - Returns: An empty grid
110109 func pointWrite( id: Ref , level: Number , val: any Val , who: String ? , duration: Number ? ) async throws -> Grid
111-
110+
112111 /// Read the current status of a writable point's priority array
113112 ///
114113 /// https://project-haystack.org/doc/docHaystack/Ops#pointWrite
115114 ///
116115 /// - Parameter id: Identifier of writable point
117116 /// - Returns: A grid with current priority array state
118117 func pointWriteStatus( id: Ref ) async throws -> Grid
119-
118+
120119 /// Used to create new watches.
121120 ///
122121 /// https://project-haystack.org/doc/docHaystack/Ops#watchSub
@@ -128,7 +127,7 @@ public protocol API {
128127 /// - Returns: A grid where rows correspond to the current entity state of the requested identifiers. Grid metadata contains
129128 /// `watchId` and `lease`.
130129 func watchSubCreate( watchDis: String , lease: Number ? , ids: [ Ref ] ) async throws -> Grid
131-
130+
132131 /// Used to add entities to an existing watch.
133132 ///
134133 /// https://project-haystack.org/doc/docHaystack/Ops#watchSub
@@ -140,7 +139,7 @@ public protocol API {
140139 /// - Returns: A grid where rows correspond to the current entity state of the requested identifiers. Grid metadata contains
141140 /// `watchId` and `lease`.
142141 func watchSubAdd( watchId: String , lease: Number ? , ids: [ Ref ] ) async throws -> Grid
143-
142+
144143 /// Used remove entities from a watch
145144 ///
146145 /// https://project-haystack.org/doc/docHaystack/Ops#watchUnsub
@@ -150,7 +149,7 @@ public protocol API {
150149 /// - ids: Ref values for each entity to unsubscribe. If empty the entire watch is closed.
151150 /// - Returns: An empty grid
152151 func watchUnsubRemove( watchId: String , ids: [ Ref ] ) async throws -> Grid
153-
152+
154153 /// Used to close a watch entirely
155154 ///
156155 /// https://project-haystack.org/doc/docHaystack/Ops#watchUnsub
@@ -159,7 +158,7 @@ public protocol API {
159158 /// - watchId: Watch identifier
160159 /// - Returns: An empty grid
161160 func watchUnsubDelete( watchId: String ) async throws -> Grid
162-
161+
163162 /// Used to poll a watch for changes to the subscribed entity records
164163 ///
165164 /// https://project-haystack.org/doc/docHaystack/Ops#watchPoll
@@ -169,15 +168,15 @@ public protocol API {
169168 /// - refresh: Whether a full refresh should occur
170169 /// - Returns: A grid where each row correspondes to a watched entity
171170 func watchPoll( watchId: String , refresh: Bool ) async throws -> Grid
172-
171+
173172 /// https://project-haystack.org/doc/docHaystack/Ops#invokeAction
174173 /// - Parameters:
175174 /// - id: Identifier of target rec
176175 /// - action: The name of the action func
177176 /// - args: The arguments to the action
178177 /// - Returns: A grid of undefined shape
179178 func invokeAction( id: Ref , action: String , args: [ String : any Val ] ) async throws -> Grid
180-
179+
181180 /// Evaluate an Axon expression
182181 ///
183182 /// https://haxall.io/doc/lib-hx/op~eval
0 commit comments