@spotto/contract 1.0.70-alpha.4 → 1.0.70-alpha.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (368) hide show
  1. package/README.md +33 -33
  2. package/dist/actions/[id]/index.d.ts +1 -0
  3. package/dist/actions/[id]/index.js +18 -0
  4. package/dist/actions/[id]/index.js.map +1 -0
  5. package/dist/actions/[id]/patch/index.d.ts +2 -0
  6. package/dist/actions/[id]/patch/index.js +19 -0
  7. package/dist/actions/[id]/patch/index.js.map +1 -0
  8. package/dist/actions/[id]/patch/request.d.ts +12 -0
  9. package/dist/actions/[id]/patch/request.js +3 -0
  10. package/dist/actions/[id]/patch/request.js.map +1 -0
  11. package/dist/actions/[id]/patch/response.d.ts +1 -0
  12. package/dist/actions/[id]/patch/response.js +3 -0
  13. package/dist/actions/[id]/patch/response.js.map +1 -0
  14. package/dist/actions/get/index.d.ts +2 -0
  15. package/dist/actions/get/index.js +19 -0
  16. package/dist/actions/get/index.js.map +1 -0
  17. package/dist/actions/get/query.d.ts +14 -0
  18. package/dist/actions/get/query.js +3 -0
  19. package/dist/actions/get/query.js.map +1 -0
  20. package/dist/actions/get/response.d.ts +25 -0
  21. package/dist/actions/get/response.js +3 -0
  22. package/dist/actions/get/response.js.map +1 -0
  23. package/dist/actions/index.d.ts +4 -0
  24. package/dist/actions/index.js +21 -0
  25. package/dist/actions/index.js.map +1 -0
  26. package/dist/actions/post/index.d.ts +2 -0
  27. package/dist/actions/post/index.js +19 -0
  28. package/dist/actions/post/index.js.map +1 -0
  29. package/dist/actions/post/request.d.ts +15 -0
  30. package/dist/actions/post/request.js +3 -0
  31. package/dist/actions/post/request.js.map +1 -0
  32. package/dist/actions/post/response.d.ts +1 -0
  33. package/dist/actions/post/response.js +3 -0
  34. package/dist/actions/post/response.js.map +1 -0
  35. package/dist/actions/shared.d.ts +63 -0
  36. package/dist/actions/shared.js +17 -0
  37. package/dist/actions/shared.js.map +1 -0
  38. package/dist/ai/chat/index.d.ts +2 -0
  39. package/dist/ai/chat/index.js +19 -0
  40. package/dist/ai/chat/index.js.map +1 -0
  41. package/dist/ai/chat/request.d.ts +42 -0
  42. package/dist/ai/chat/request.js +3 -0
  43. package/dist/ai/chat/request.js.map +1 -0
  44. package/dist/ai/chat/response.d.ts +74 -0
  45. package/dist/ai/chat/response.js +11 -0
  46. package/dist/ai/chat/response.js.map +1 -0
  47. package/dist/ai/expression/index.d.ts +2 -0
  48. package/dist/ai/expression/index.js +19 -0
  49. package/dist/ai/expression/index.js.map +1 -0
  50. package/dist/ai/expression/request.d.ts +29 -0
  51. package/dist/ai/expression/request.js +3 -0
  52. package/dist/ai/expression/request.js.map +1 -0
  53. package/dist/ai/expression/response.d.ts +23 -0
  54. package/dist/ai/expression/response.js +3 -0
  55. package/dist/ai/expression/response.js.map +1 -0
  56. package/dist/ai/index.d.ts +4 -0
  57. package/dist/ai/index.js +21 -0
  58. package/dist/ai/index.js.map +1 -0
  59. package/dist/ai/semantic-query/index.d.ts +2 -0
  60. package/dist/ai/semantic-query/index.js +19 -0
  61. package/dist/ai/semantic-query/index.js.map +1 -0
  62. package/dist/ai/semantic-query/request.d.ts +43 -0
  63. package/dist/ai/semantic-query/request.js +3 -0
  64. package/dist/ai/semantic-query/request.js.map +1 -0
  65. package/dist/ai/semantic-query/response.d.ts +40 -0
  66. package/dist/ai/semantic-query/response.js +3 -0
  67. package/dist/ai/semantic-query/response.js.map +1 -0
  68. package/dist/ai/shared.d.ts +22 -0
  69. package/dist/ai/shared.js +11 -0
  70. package/dist/ai/shared.js.map +1 -0
  71. package/dist/assets/[id]/get.d.ts +16 -1
  72. package/dist/assets/[id]/patch/request.d.ts +5 -0
  73. package/dist/assets/count/query.d.ts +16 -1
  74. package/dist/assets/download/query.d.ts +7 -0
  75. package/dist/assets/get/query.d.ts +77 -4
  76. package/dist/assets/get/query.js +3 -0
  77. package/dist/assets/get/query.js.map +1 -1
  78. package/dist/assets/get/response.d.ts +6 -0
  79. package/dist/assets/index.d.ts +3 -0
  80. package/dist/assets/index.js +3 -0
  81. package/dist/assets/index.js.map +1 -1
  82. package/dist/assets/location/request.d.ts +10 -1
  83. package/dist/assets/partitions/index.d.ts +2 -0
  84. package/dist/assets/partitions/index.js +19 -0
  85. package/dist/assets/partitions/index.js.map +1 -0
  86. package/dist/assets/partitions/query.d.ts +16 -0
  87. package/dist/assets/partitions/query.js +3 -0
  88. package/dist/assets/partitions/query.js.map +1 -0
  89. package/dist/assets/partitions/response.d.ts +10 -0
  90. package/dist/assets/partitions/response.js +3 -0
  91. package/dist/assets/partitions/response.js.map +1 -0
  92. package/dist/assets/post/request.d.ts +2 -0
  93. package/dist/assets/post/request.js.map +1 -1
  94. package/dist/assets/readiness/index.d.ts +2 -0
  95. package/dist/assets/readiness/index.js +19 -0
  96. package/dist/assets/readiness/index.js.map +1 -0
  97. package/dist/assets/readiness/query.d.ts +7 -0
  98. package/dist/assets/readiness/query.js +3 -0
  99. package/dist/assets/readiness/query.js.map +1 -0
  100. package/dist/assets/readiness/response.d.ts +24 -0
  101. package/dist/assets/readiness/response.js +3 -0
  102. package/dist/assets/readiness/response.js.map +1 -0
  103. package/dist/assets/rollup/index.d.ts +2 -0
  104. package/dist/assets/rollup/index.js +19 -0
  105. package/dist/assets/rollup/index.js.map +1 -0
  106. package/dist/assets/rollup/query.d.ts +12 -0
  107. package/dist/assets/rollup/query.js +5 -0
  108. package/dist/assets/rollup/query.js.map +1 -0
  109. package/dist/assets/rollup/response.d.ts +58 -0
  110. package/dist/assets/rollup/response.js +3 -0
  111. package/dist/assets/rollup/response.js.map +1 -0
  112. package/dist/events/constants.d.ts +52 -1
  113. package/dist/events/constants.js +46 -1
  114. package/dist/events/constants.js.map +1 -1
  115. package/dist/events/get/query.d.ts +25 -0
  116. package/dist/events/get/response.d.ts +107 -3
  117. package/dist/fields/[id]/get.d.ts +7 -0
  118. package/dist/fields/[id]/patch/request.d.ts +14 -0
  119. package/dist/fields/constants.d.ts +68 -0
  120. package/dist/fields/constants.js +29 -1
  121. package/dist/fields/constants.js.map +1 -1
  122. package/dist/fields/post/request.d.ts +6 -0
  123. package/dist/fields/post/request.js.map +1 -1
  124. package/dist/forms/[id]/index.d.ts +1 -0
  125. package/dist/forms/[id]/index.js +18 -0
  126. package/dist/forms/[id]/index.js.map +1 -0
  127. package/dist/forms/[id]/patch/index.d.ts +2 -0
  128. package/dist/forms/[id]/patch/index.js +19 -0
  129. package/dist/forms/[id]/patch/index.js.map +1 -0
  130. package/dist/forms/[id]/patch/request.d.ts +14 -0
  131. package/dist/forms/[id]/patch/request.js +3 -0
  132. package/dist/forms/[id]/patch/request.js.map +1 -0
  133. package/dist/forms/[id]/patch/response.d.ts +1 -0
  134. package/dist/forms/[id]/patch/response.js +3 -0
  135. package/dist/forms/[id]/patch/response.js.map +1 -0
  136. package/dist/forms/constants.d.ts +19 -0
  137. package/dist/forms/constants.js +33 -0
  138. package/dist/forms/constants.js.map +1 -0
  139. package/dist/forms/get/index.d.ts +2 -0
  140. package/dist/forms/get/index.js +19 -0
  141. package/dist/forms/get/index.js.map +1 -0
  142. package/dist/forms/get/query.d.ts +18 -0
  143. package/dist/forms/get/query.js +3 -0
  144. package/dist/forms/get/query.js.map +1 -0
  145. package/dist/forms/get/response.d.ts +23 -0
  146. package/dist/forms/get/response.js +3 -0
  147. package/dist/forms/get/response.js.map +1 -0
  148. package/dist/forms/index.d.ts +6 -0
  149. package/dist/forms/index.js +23 -0
  150. package/dist/forms/index.js.map +1 -0
  151. package/dist/forms/post/index.d.ts +2 -0
  152. package/dist/forms/post/index.js +19 -0
  153. package/dist/forms/post/index.js.map +1 -0
  154. package/dist/forms/post/request.d.ts +9 -0
  155. package/dist/forms/post/request.js +3 -0
  156. package/dist/forms/post/request.js.map +1 -0
  157. package/dist/forms/post/response.d.ts +1 -0
  158. package/dist/forms/post/response.js +3 -0
  159. package/dist/forms/post/response.js.map +1 -0
  160. package/dist/forms/shared.d.ts +136 -0
  161. package/dist/forms/shared.js +3 -0
  162. package/dist/forms/shared.js.map +1 -0
  163. package/dist/forms/versions/index.d.ts +2 -0
  164. package/dist/forms/versions/index.js +19 -0
  165. package/dist/forms/versions/index.js.map +1 -0
  166. package/dist/forms/versions/path.d.ts +8 -0
  167. package/dist/forms/versions/path.js +3 -0
  168. package/dist/forms/versions/path.js.map +1 -0
  169. package/dist/forms/versions/response.d.ts +1 -0
  170. package/dist/forms/versions/response.js +3 -0
  171. package/dist/forms/versions/response.js.map +1 -0
  172. package/dist/index.d.ts +6 -0
  173. package/dist/index.js +6 -0
  174. package/dist/index.js.map +1 -1
  175. package/dist/locations/constants.d.ts +9 -0
  176. package/dist/locations/constants.js +10 -1
  177. package/dist/locations/constants.js.map +1 -1
  178. package/dist/locations/get/query.d.ts +22 -0
  179. package/dist/organisations/[id]/get.d.ts +7 -0
  180. package/dist/organisations/[id]/patch/request.d.ts +2 -0
  181. package/dist/organisations/constants.d.ts +20 -0
  182. package/dist/organisations/constants.js +10 -0
  183. package/dist/organisations/constants.js.map +1 -1
  184. package/dist/organisations/sso/constants.d.ts +15 -0
  185. package/dist/organisations/sso/constants.js +16 -1
  186. package/dist/organisations/sso/constants.js.map +1 -1
  187. package/dist/organisations/sso/types.d.ts +48 -0
  188. package/dist/readers/get/query.d.ts +12 -0
  189. package/dist/semantic-queries/[id]/index.d.ts +1 -0
  190. package/dist/semantic-queries/[id]/index.js +18 -0
  191. package/dist/semantic-queries/[id]/index.js.map +1 -0
  192. package/dist/semantic-queries/[id]/patch/index.d.ts +2 -0
  193. package/dist/semantic-queries/[id]/patch/index.js +19 -0
  194. package/dist/semantic-queries/[id]/patch/index.js.map +1 -0
  195. package/dist/semantic-queries/[id]/patch/request.d.ts +20 -0
  196. package/dist/semantic-queries/[id]/patch/request.js +3 -0
  197. package/dist/semantic-queries/[id]/patch/request.js.map +1 -0
  198. package/dist/semantic-queries/[id]/patch/response.d.ts +1 -0
  199. package/dist/semantic-queries/[id]/patch/response.js +3 -0
  200. package/dist/semantic-queries/[id]/patch/response.js.map +1 -0
  201. package/dist/semantic-queries/get/index.d.ts +2 -0
  202. package/dist/semantic-queries/get/index.js +19 -0
  203. package/dist/semantic-queries/get/index.js.map +1 -0
  204. package/dist/semantic-queries/get/query.d.ts +18 -0
  205. package/dist/semantic-queries/get/query.js +3 -0
  206. package/dist/semantic-queries/get/query.js.map +1 -0
  207. package/dist/semantic-queries/get/response.d.ts +40 -0
  208. package/dist/semantic-queries/get/response.js +3 -0
  209. package/dist/semantic-queries/get/response.js.map +1 -0
  210. package/dist/semantic-queries/index.d.ts +4 -0
  211. package/dist/semantic-queries/index.js +21 -0
  212. package/dist/semantic-queries/index.js.map +1 -0
  213. package/dist/semantic-queries/post/index.d.ts +2 -0
  214. package/dist/semantic-queries/post/index.js +19 -0
  215. package/dist/semantic-queries/post/index.js.map +1 -0
  216. package/dist/semantic-queries/post/request.d.ts +56 -0
  217. package/dist/semantic-queries/post/request.js +3 -0
  218. package/dist/semantic-queries/post/request.js.map +1 -0
  219. package/dist/semantic-queries/post/response.d.ts +1 -0
  220. package/dist/semantic-queries/post/response.js +3 -0
  221. package/dist/semantic-queries/post/response.js.map +1 -0
  222. package/dist/semantic-queries/shared.d.ts +876 -0
  223. package/dist/semantic-queries/shared.js +319 -0
  224. package/dist/semantic-queries/shared.js.map +1 -0
  225. package/dist/shared/attachments.d.ts +29 -0
  226. package/dist/shared/attachments.js +11 -0
  227. package/dist/shared/attachments.js.map +1 -0
  228. package/dist/shared/embed.d.ts +14 -0
  229. package/dist/shared/index.d.ts +2 -0
  230. package/dist/shared/index.js +2 -0
  231. package/dist/shared/index.js.map +1 -1
  232. package/dist/shared/readiness.d.ts +81 -0
  233. package/dist/shared/readiness.js +11 -0
  234. package/dist/shared/readiness.js.map +1 -0
  235. package/dist/snapshots/[id]/get.d.ts +142 -11
  236. package/dist/snapshots/[id]/get.js.map +1 -1
  237. package/dist/snapshots/get/query.d.ts +39 -0
  238. package/dist/snapshots/get/query.js +23 -1
  239. package/dist/snapshots/get/query.js.map +1 -1
  240. package/dist/snapshots/post/request.d.ts +21 -0
  241. package/dist/snapshots/post/request.js.map +1 -1
  242. package/dist/sso/onboard/request.d.ts +12 -1
  243. package/dist/sso/sso-mappings/request.d.ts +10 -5
  244. package/dist/submissions/[id]/index.d.ts +1 -0
  245. package/dist/submissions/[id]/index.js +18 -0
  246. package/dist/submissions/[id]/index.js.map +1 -0
  247. package/dist/submissions/[id]/void/post.d.ts +6 -0
  248. package/dist/submissions/[id]/void/post.js +3 -0
  249. package/dist/submissions/[id]/void/post.js.map +1 -0
  250. package/dist/submissions/constants.d.ts +14 -0
  251. package/dist/submissions/constants.js +21 -0
  252. package/dist/submissions/constants.js.map +1 -0
  253. package/dist/submissions/get/index.d.ts +2 -0
  254. package/dist/submissions/get/index.js +19 -0
  255. package/dist/submissions/get/index.js.map +1 -0
  256. package/dist/submissions/get/query.d.ts +14 -0
  257. package/dist/submissions/get/query.js +3 -0
  258. package/dist/submissions/get/query.js.map +1 -0
  259. package/dist/submissions/get/response.d.ts +6 -0
  260. package/dist/submissions/get/response.js +3 -0
  261. package/dist/submissions/get/response.js.map +1 -0
  262. package/dist/submissions/index.d.ts +6 -0
  263. package/dist/submissions/index.js +23 -0
  264. package/dist/submissions/index.js.map +1 -0
  265. package/dist/submissions/post/index.d.ts +2 -0
  266. package/dist/submissions/post/index.js +19 -0
  267. package/dist/submissions/post/index.js.map +1 -0
  268. package/dist/submissions/post/request.d.ts +17 -0
  269. package/dist/submissions/post/request.js +3 -0
  270. package/dist/submissions/post/request.js.map +1 -0
  271. package/dist/submissions/post/response.d.ts +22 -0
  272. package/dist/submissions/post/response.js +3 -0
  273. package/dist/submissions/post/response.js.map +1 -0
  274. package/dist/submissions/shared.d.ts +133 -0
  275. package/dist/submissions/shared.js +3 -0
  276. package/dist/submissions/shared.js.map +1 -0
  277. package/dist/submissions/uploads/[fileId]/get.d.ts +11 -0
  278. package/dist/submissions/uploads/[fileId]/get.js +3 -0
  279. package/dist/submissions/uploads/[fileId]/get.js.map +1 -0
  280. package/dist/submissions/uploads/[fileId]/index.d.ts +1 -0
  281. package/dist/submissions/uploads/[fileId]/index.js +18 -0
  282. package/dist/submissions/uploads/[fileId]/index.js.map +1 -0
  283. package/dist/submissions/uploads/index.d.ts +2 -0
  284. package/dist/submissions/uploads/index.js +19 -0
  285. package/dist/submissions/uploads/index.js.map +1 -0
  286. package/dist/submissions/uploads/post/index.d.ts +2 -0
  287. package/dist/submissions/uploads/post/index.js +19 -0
  288. package/dist/submissions/uploads/post/index.js.map +1 -0
  289. package/dist/submissions/uploads/post/request.d.ts +9 -0
  290. package/dist/submissions/uploads/post/request.js +3 -0
  291. package/dist/submissions/uploads/post/request.js.map +1 -0
  292. package/dist/submissions/uploads/post/response.d.ts +18 -0
  293. package/dist/submissions/uploads/post/response.js +3 -0
  294. package/dist/submissions/uploads/post/response.js.map +1 -0
  295. package/dist/types/[id]/get.d.ts +34 -4
  296. package/dist/types/[id]/patch/request.d.ts +24 -4
  297. package/dist/types/constants.d.ts +9 -0
  298. package/dist/types/constants.js +13 -0
  299. package/dist/types/constants.js.map +1 -0
  300. package/dist/types/index.d.ts +1 -0
  301. package/dist/types/index.js +1 -0
  302. package/dist/types/index.js.map +1 -1
  303. package/dist/types/post/request.d.ts +30 -4
  304. package/dist/types/post/request.js.map +1 -1
  305. package/dist/usergroups/[id]/index.d.ts +1 -0
  306. package/dist/usergroups/[id]/index.js +18 -0
  307. package/dist/usergroups/[id]/index.js.map +1 -0
  308. package/dist/usergroups/[id]/patch/index.d.ts +2 -0
  309. package/dist/usergroups/[id]/patch/index.js +19 -0
  310. package/dist/usergroups/[id]/patch/index.js.map +1 -0
  311. package/dist/usergroups/[id]/patch/request.d.ts +23 -0
  312. package/dist/usergroups/[id]/patch/request.js +3 -0
  313. package/dist/usergroups/[id]/patch/request.js.map +1 -0
  314. package/dist/usergroups/[id]/patch/response.d.ts +1 -0
  315. package/dist/usergroups/[id]/patch/response.js +3 -0
  316. package/dist/usergroups/[id]/patch/response.js.map +1 -0
  317. package/dist/usergroups/access.d.ts +100 -0
  318. package/dist/usergroups/access.js +24 -0
  319. package/dist/usergroups/access.js.map +1 -0
  320. package/dist/usergroups/get/index.d.ts +2 -0
  321. package/dist/usergroups/get/index.js +19 -0
  322. package/dist/usergroups/get/index.js.map +1 -0
  323. package/dist/usergroups/get/query.d.ts +12 -0
  324. package/dist/usergroups/get/query.js +3 -0
  325. package/dist/usergroups/get/query.js.map +1 -0
  326. package/dist/usergroups/get/response.d.ts +44 -0
  327. package/dist/usergroups/get/response.js +3 -0
  328. package/dist/usergroups/get/response.js.map +1 -0
  329. package/dist/usergroups/index.d.ts +5 -0
  330. package/dist/usergroups/index.js +22 -0
  331. package/dist/usergroups/index.js.map +1 -0
  332. package/dist/usergroups/post/index.d.ts +2 -0
  333. package/dist/usergroups/post/index.js +19 -0
  334. package/dist/usergroups/post/index.js.map +1 -0
  335. package/dist/usergroups/post/request.d.ts +17 -0
  336. package/dist/usergroups/post/request.js +3 -0
  337. package/dist/usergroups/post/request.js.map +1 -0
  338. package/dist/usergroups/post/response.d.ts +1 -0
  339. package/dist/usergroups/post/response.js +3 -0
  340. package/dist/usergroups/post/response.js.map +1 -0
  341. package/dist/usergroups/shared.d.ts +8 -0
  342. package/dist/usergroups/shared.js +11 -0
  343. package/dist/usergroups/shared.js.map +1 -0
  344. package/dist/users/[id]/get/response.d.ts +0 -2
  345. package/dist/users/[id]/patch/request.d.ts +5 -1
  346. package/dist/users/console.d.ts +15 -0
  347. package/dist/users/console.js +5 -0
  348. package/dist/users/console.js.map +1 -0
  349. package/dist/users/current.d.ts +70 -4
  350. package/dist/users/get/query.d.ts +0 -2
  351. package/dist/users/home-layout/index.d.ts +3 -0
  352. package/dist/users/home-layout/index.js +20 -0
  353. package/dist/users/home-layout/index.js.map +1 -0
  354. package/dist/users/home-layout/request.d.ts +5 -0
  355. package/dist/users/home-layout/request.js +3 -0
  356. package/dist/users/home-layout/request.js.map +1 -0
  357. package/dist/users/home-layout/response.d.ts +5 -0
  358. package/dist/users/home-layout/response.js +3 -0
  359. package/dist/users/home-layout/response.js.map +1 -0
  360. package/dist/users/home-layout/shared.d.ts +288 -0
  361. package/dist/users/home-layout/shared.js +30 -0
  362. package/dist/users/home-layout/shared.js.map +1 -0
  363. package/dist/users/index.d.ts +2 -0
  364. package/dist/users/index.js +2 -0
  365. package/dist/users/index.js.map +1 -1
  366. package/dist/users/password-reset.d.ts +8 -1
  367. package/dist/users/post/request.d.ts +12 -1
  368. package/package.json +2 -2
@@ -0,0 +1,29 @@
1
+ import { FieldDataType, FieldInputType, FieldSource } from '../../fields';
2
+ import { AiProvider } from '../shared';
3
+ export declare type AiExpressionMode = 'readinessRule' | 'computedField';
4
+ /** Kept under its original name; the general union now lives in ai/shared.ts. */
5
+ export declare type AiExpressionProvider = AiProvider;
6
+ /**
7
+ * A field the AI may reference, supplied inline by the client (which already
8
+ * holds the type's resolved fields). A trimmed view of `GetFieldResponse` — the
9
+ * server builds the preamble + validates against this, so the client never has
10
+ * to round-trip the schema.
11
+ */
12
+ export interface AiExpressionField {
13
+ name: string;
14
+ dataType: FieldDataType;
15
+ inputType?: FieldInputType;
16
+ options?: string[];
17
+ label?: string;
18
+ source?: FieldSource;
19
+ }
20
+ export interface PostAiExpressionRequest {
21
+ /** Plain-language description of the rule / calculation. */
22
+ prompt: string;
23
+ /** Which kind of expression to produce. */
24
+ mode: AiExpressionMode;
25
+ /** The fields the expression may reference (the type's resolved fields). */
26
+ fields: AiExpressionField[];
27
+ /** Required for `computedField`: the field being computed (excluded from refs). */
28
+ fieldName?: string;
29
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/ai/expression/request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ export interface PostAiExpressionResponse {
2
+ /** true when a usable expression was produced (and validated, for readiness). */
3
+ ok: boolean;
4
+ /** The generated excelexp expression, or null when declined / unbuildable. */
5
+ expression: string | null;
6
+ /**
7
+ * readinessRule: the display text shown when the rule fires — house-style, with
8
+ * `{FieldName}` placeholders. null for computedField, and null on a decline.
9
+ */
10
+ message: string | null;
11
+ /**
12
+ * readinessRule severity, set ONLY from explicit severity words in the prompt:
13
+ * 1 = amber, 2 = red. null when the prompt stated no severity (the author picks)
14
+ * or for computedField.
15
+ */
16
+ level: 1 | 2 | null;
17
+ /** Author-facing explanation/caveat: why it declined, or a one-line caveat. */
18
+ note: string | null;
19
+ /** Server-side compiler findings (empty when the expression compiles cleanly). */
20
+ warnings: string[];
21
+ /** The model that answered. */
22
+ model: string;
23
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/ai/expression/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from './shared';
2
+ export * from './expression';
3
+ export * from './semantic-query';
4
+ export * from './chat';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./shared"), exports);
18
+ __exportStar(require("./expression"), exports);
19
+ __exportStar(require("./semantic-query"), exports);
20
+ __exportStar(require("./chat"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,+CAA4B;AAC5B,mDAAgC;AAChC,yCAAsB"}
@@ -0,0 +1,2 @@
1
+ export * from './request';
2
+ export * from './response';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./request"), exports);
18
+ __exportStar(require("./response"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ai/semantic-query/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Natural language → semantic query (POST /ai/semantic-query).
3
+ *
4
+ * The compiler is the gate: nothing is returned or stored unless it compiles
5
+ * against the org's real vocabulary. Refinement is IR-as-state — `baseQueryId`
6
+ * points at the stored record being refined; there is no transcript, so
7
+ * refining a query made seconds ago, one saved last month, or one built by
8
+ * clicking filter pills are all the identical call.
9
+ */
10
+ import { SemanticQueryEntityType } from '../../semantic-queries/shared';
11
+ export interface PostAiSemanticQueryRequest {
12
+ /**
13
+ * What the user asked for, in natural language — a fresh query ("blood
14
+ * analysers that aren't ready") or a refinement instruction ("just the
15
+ * Brisbane ones") when `baseQueryId` is set.
16
+ */
17
+ prompt: string;
18
+ /**
19
+ * Id of the stored semantic query being refined. The stored record IS the
20
+ * conversation state: generation returns a NEW draft whose `derivedFrom`
21
+ * points here, and undo walks that chain with no AI call. Only same-entity
22
+ * `query`-kind records refine; anything else starts fresh.
23
+ */
24
+ baseQueryId?: string;
25
+ /**
26
+ * WHICH list to build a query for — which vocabulary the model is shown and
27
+ * the compiler gates against. Defaults to `asset`, what this endpoint has
28
+ * always meant.
29
+ *
30
+ * Only entities the language actually speaks are accepted, and the refusal
31
+ * is loud. Falling back to assets for an entity with no preamble would
32
+ * generate a valid ASSET query from a location question: it compiles, it
33
+ * runs, and it returns a plausible list of the wrong kind of record — the
34
+ * silent-wrong-rows failure this whole surface is built to prevent.
35
+ */
36
+ entityType?: SemanticQueryEntityType;
37
+ /**
38
+ * IANA timezone for "today" in the prompt and for the draft's relative-date
39
+ * resolution — recorded on the registered record exactly as a hand-built
40
+ * registration would.
41
+ */
42
+ timezone?: string;
43
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/ai/semantic-query/request.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ import { GetSemanticQueryResponse } from '../../semantic-queries';
2
+ import { AiTokenUsage } from '../shared';
3
+ /**
4
+ * One thing the generation could not do, written to be shown to a user.
5
+ * Two sources, one shape: the MODEL declining honestly ("no such field —
6
+ * did you mean X?") and the COMPILER rejecting what the model produced after
7
+ * its one repair attempt. An honest issue always beats a plausible query —
8
+ * every failure class this feature guards against runs successfully and
9
+ * returns the wrong rows.
10
+ */
11
+ export interface AiSemanticQueryIssue {
12
+ /** Machine code (`MODEL_DECLINED`, or a compiler code like `UNKNOWN_FIELD`). */
13
+ code: string;
14
+ /** Human-readable explanation, shown to the user unchanged. */
15
+ message: string;
16
+ /** Where in the generated query the problem sits, when known (compiler issues). */
17
+ path?: string;
18
+ /** Nearest real vocabulary ("Did you mean 'SerialNumber'?"), when one exists. */
19
+ suggestion?: string;
20
+ }
21
+ /**
22
+ * `ok: true` → the query compiled and was registered as a draft; `record` is
23
+ * the stored record, identical in shape to `GET /semantic-queries/{id}` (the
24
+ * caller reads/refines/promotes it by `record.id` from here on).
25
+ * `ok: false` → nothing was stored; `issues` say why.
26
+ */
27
+ export interface PostAiSemanticQueryResponse {
28
+ /** Whether a validated draft was registered. */
29
+ ok: boolean;
30
+ /** The registered draft (null when `ok` is false). */
31
+ record: GetSemanticQueryResponse | null;
32
+ /** Why generation declined or failed (empty when `ok` is true). */
33
+ issues: AiSemanticQueryIssue[];
34
+ /** True when the first attempt failed validation and the model's repair passed. */
35
+ repaired: boolean;
36
+ /** The generation model that answered (server-side config). */
37
+ model: string;
38
+ /** Token usage across all generation calls this turn (repair included). */
39
+ tokens: AiTokenUsage;
40
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/ai/semantic-query/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared shapes for the AI endpoints (expression helper, semantic-query
3
+ * generation, chat). Provider and model are always SERVER-SIDE config — no
4
+ * request shape may carry them, because the caller must never choose which
5
+ * vendor or model spends Spotto's key.
6
+ */
7
+ export declare const aiProviders: readonly ["openai", "anthropic"];
8
+ /** An LLM vendor Spotto can call. */
9
+ export declare type AiProvider = (typeof aiProviders)[number];
10
+ /**
11
+ * Token usage for one AI turn, for observability and offline costing. No
12
+ * dollar figure on the wire — unit prices drift, so cost is derived from
13
+ * model + tokens where the prices are maintained, not baked into responses.
14
+ */
15
+ export interface AiTokenUsage {
16
+ /** Prompt-side tokens, cached included. */
17
+ in: number;
18
+ /** Completion-side tokens. */
19
+ out: number;
20
+ /** The part of `in` served from the provider's prompt cache. */
21
+ cached: number;
22
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * Shared shapes for the AI endpoints (expression helper, semantic-query
4
+ * generation, chat). Provider and model are always SERVER-SIDE config — no
5
+ * request shape may carry them, because the caller must never choose which
6
+ * vendor or model spends Spotto's key.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.aiProviders = void 0;
10
+ exports.aiProviders = ['openai', 'anthropic'];
11
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/ai/shared.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,WAAW,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAU,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { type Point } from 'geojson';
2
2
  import { IEmbeddedLabel } from '../../labels';
3
3
  import { LocationStatus, LocationType } from '../../locations/constants';
4
- import { IEntityMeta, IEmbeddedEntity } from '../../shared';
4
+ import { IEntityMeta, IEmbeddedEntity, IReadiness } from '../../shared';
5
5
  import { IAssetTelemetry } from '../../telemetry';
6
6
  import { IFieldValue } from '../../types';
7
7
  export interface ILastLocation {
@@ -74,4 +74,19 @@ export interface GetAssetResponse {
74
74
  homeLocationPath?: string;
75
75
  readers?: IEmbeddedEntity[];
76
76
  manifestIds?: string[];
77
+ hasManifest?: boolean;
78
+ typeKit?: boolean;
79
+ groupParentId?: string;
80
+ groupAncestors?: string[];
81
+ groupMember?: boolean;
82
+ groupChildCount?: number;
83
+ /**
84
+ * Set by a `treeLevel` read (GetAssetsQuery.treeLevel) on a hidden kit it
85
+ * returns as context: outside the caller's groups, but holding a visible
86
+ * asset somewhere beneath it. True or absent, never stored.
87
+ */
88
+ context?: boolean;
89
+ groupSatisfiesManifest?: 0 | 1 | 2;
90
+ readiness?: IReadiness;
91
+ timeSensitive?: boolean;
77
92
  }
@@ -8,4 +8,9 @@ export interface UpdateAssetRequest {
8
8
  fieldValues?: IFieldValueWithConstraints[];
9
9
  homeLocationId?: string;
10
10
  manifestIds?: string[];
11
+ /**
12
+ * Kit membership (G2G M2): a kit id joins/moves the asset under that kit,
13
+ * `null` leaves its current kit, omitted leaves membership unchanged.
14
+ */
15
+ groupParentId?: string | null;
11
16
  }
@@ -1 +1,16 @@
1
- export { AssetFilters as CountAssetsQuery } from '../get/query';
1
+ import { AssetFilters } from '../get/query';
2
+ export interface CountAssetsQuery extends AssetFilters {
3
+ /**
4
+ * Count a stored semantic query by reference instead of the flat filters.
5
+ * Must NOT be combined with any filter member — the combination is
6
+ * rejected, never merged. An expired or unknown id returns a distinct
7
+ * "gone" error, never a zero count.
8
+ */
9
+ semanticQueryId?: string;
10
+ /**
11
+ * IANA timezone for resolving relative date conditions. The list endpoint
12
+ * has always accepted this; count needs it too, or the same query counted
13
+ * and listed can resolve "today" in two different zones and disagree.
14
+ */
15
+ timezone?: string;
16
+ }
@@ -7,4 +7,11 @@ export interface DownloadAssetsQuery extends AssetFilters {
7
7
  timestampFormat?: TimestampFormat;
8
8
  timezone?: string;
9
9
  withEntityLinks?: boolean;
10
+ /**
11
+ * Export column curation: keep only the custom-field columns for these
12
+ * field ids. Omitted ⇒ every field column (existing API callers
13
+ * unchanged). Ids that resolve to no field are dropped silently — this
14
+ * is UI curation, not access control.
15
+ */
16
+ fieldIds?: string[];
10
17
  }
@@ -1,9 +1,21 @@
1
- import { DateCondition, SearchableSortFields, SortOrders } from '../../shared';
1
+ import { DateCondition, ReadinessState, SearchableSortFields, SortOrders } from '../../shared';
2
2
  import { LocationStatus } from '../../locations/constants';
3
+ import { ListScope } from '../../usergroups/access';
3
4
  export declare type AssetSearchField = 'name' | 'tagIds';
4
- export declare type AssetEmbedField = 'meta' | 'tagIds' | 'candidateLocations' | 'telemetry' | 'readers';
5
- export declare type AssetSortField = SearchableSortFields | 'battery';
5
+ /**
6
+ * How the space-separated pieces of a search term combine: `any`, the
7
+ * default, matches an asset holding any one of them; `every` matches only an
8
+ * asset holding all of them, each piece found as it would be if searched for
9
+ * alone. One addition under `every` with `searchFuzzy: false`: a piece with
10
+ * punctuation in it must also be found as typed, which a search of that
11
+ * piece alone does not ask.
12
+ */
13
+ export declare type AssetSearchMatch = 'any' | 'every';
14
+ export declare type AssetEmbedField = 'meta' | 'tagIds' | 'candidateLocations' | 'telemetry' | 'readers' | 'readiness';
15
+ export declare type AssetSortField = SearchableSortFields | 'battery' | 'ready';
6
16
  export declare type AssetBatteryStatus = 'critical' | 'low' | 'ok';
17
+ /** The `treeLevel` value for the top of the kit tree; any other value is a kit's id. */
18
+ export declare const TREE_LEVEL_ROOT = "root";
7
19
  declare type _CustomFieldsAssetFilterBase = {
8
20
  id: string;
9
21
  };
@@ -17,13 +29,17 @@ export declare type CustomFieldsAssetFilterNumberRange = _CustomFieldsAssetFilte
17
29
  from: number;
18
30
  to: number;
19
31
  };
20
- export declare type CustomFieldsAssetFilter = CustomFieldsAssetFilterValue | CustomFieldsAssetFilterDateCondition | CustomFieldsAssetFilterNumberRange;
32
+ export declare type CustomFieldsAssetFilterBoolean = _CustomFieldsAssetFilterBase & {
33
+ value: boolean;
34
+ };
35
+ export declare type CustomFieldsAssetFilter = CustomFieldsAssetFilterValue | CustomFieldsAssetFilterDateCondition | CustomFieldsAssetFilterNumberRange | CustomFieldsAssetFilterBoolean;
21
36
  export declare type CustomFieldValues = {
22
37
  values?: Array<CustomFieldsAssetFilterValue>;
23
38
  integerRanges?: Array<CustomFieldsAssetFilterNumberRange>;
24
39
  decimalRanges?: Array<CustomFieldsAssetFilterNumberRange>;
25
40
  dateConditions?: Array<CustomFieldsAssetFilterDateCondition>;
26
41
  dateTimeConditions?: Array<CustomFieldsAssetFilterDateCondition>;
42
+ booleanValues?: Array<CustomFieldsAssetFilterBoolean>;
27
43
  };
28
44
  export interface AssetFilters {
29
45
  labels?: string[];
@@ -32,11 +48,22 @@ export interface AssetFilters {
32
48
  hasTags?: boolean;
33
49
  hasReported?: boolean;
34
50
  hasGeolocationState?: boolean;
51
+ /** At a named location (true) or not at any (false) — tested on the stored location path. */
52
+ hasLocation?: boolean;
53
+ /** Seen (a status other than never-seen) and not at any named location — the location view's "Seen, without a location" row. */
54
+ seenWithoutLocation?: boolean;
35
55
  locationStatus?: Array<LocationStatus>;
36
56
  visiting?: boolean;
37
57
  battery?: AssetBatteryStatus;
38
58
  search?: string;
39
59
  searchFuzzy?: boolean;
60
+ /**
61
+ * `every` asks that every space-separated piece of `search` be found on
62
+ * the asset, in any order and in any of the places the search looks;
63
+ * absent or `any`, one piece is enough, as it always was. A term of one
64
+ * piece is the same search either way.
65
+ */
66
+ searchMatch?: AssetSearchMatch;
40
67
  searchFields?: Array<AssetSearchField>;
41
68
  typeIds?: string[];
42
69
  typePathBeginsWith?: string[];
@@ -50,16 +77,62 @@ export interface AssetFilters {
50
77
  supportsWith?: boolean;
51
78
  withAsset?: boolean;
52
79
  dispatched?: boolean;
80
+ timeSensitive?: boolean;
81
+ ready?: ReadinessState[];
82
+ hasReadyIssues?: boolean;
53
83
  createdAt?: DateCondition[];
54
84
  updatedAt?: DateCondition[];
55
85
  lastSeen?: DateCondition[];
86
+ /** Offline-sync delta read: matches records whose `lastChanged` >= this ms-epoch. */
87
+ updatedAfter?: number;
56
88
  }
57
89
  export interface GetAssetsQuery extends AssetFilters {
58
90
  page?: number;
59
91
  limit?: number;
92
+ /**
93
+ * Keyed reads (a first download, resumable and partitionable): return the
94
+ * records with an id after this one, ascending by id. Replaces `page`;
95
+ * the response carries `next` to continue from, null once the window is
96
+ * exhausted. `sort` is ignored in this mode — the order IS the position.
97
+ */
98
+ after?: string;
99
+ /**
100
+ * Keyed reads: the upper bound of a window, inclusive — a slice's last id
101
+ * from `GET /assets/partitions`. Several windows can be walked at once.
102
+ */
103
+ before?: string;
60
104
  sort?: AssetSortField;
61
105
  sortOrder?: SortOrders;
62
106
  embed?: Array<AssetEmbedField>;
63
107
  timezone?: string;
108
+ /**
109
+ * Execute a stored semantic query by reference — the new-client read path.
110
+ * Must NOT be combined with any of the `AssetFilters` members above: the
111
+ * stored query is the whole filter, and the controller rejects the
112
+ * combination rather than silently merging two filter systems. Pagination,
113
+ * sort, embed and timezone still apply. An expired or unknown id returns a
114
+ * distinct "gone" error, never an empty page.
115
+ */
116
+ semanticQueryId?: string;
117
+ /**
118
+ * `caller`, the default, applies the caller's user groups. `organisation`
119
+ * ignores them and lists the whole organisation, for a client that filters
120
+ * locally. Any signed-in user may pass it. Not a filter: it combines with a
121
+ * stored query.
122
+ */
123
+ scope?: ListScope;
124
+ /**
125
+ * One level of the kit tree under the caller's groups: `root` for the top
126
+ * level, or a kit's id for its direct members. The level's visible rows,
127
+ * plus the level's hidden kits that hold a visible asset somewhere beneath
128
+ * them, flagged `context: true` (`GetAssetResponse.context`): the tree a
129
+ * device with a copy draws (specification consequence 20). Combines with
130
+ * sort, page, limit, embed and scope; under the `organisation` scope every
131
+ * row is visible and none is flagged. Refused with a 400 beside a stored
132
+ * query, free text, the flat filters or a keyed read. Honoured by
133
+ * `GET /assets` and `GET /assets/count-filtered`, whose count includes the
134
+ * context rows, for the pager beside the list.
135
+ */
136
+ treeLevel?: string;
64
137
  }
65
138
  export {};
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TREE_LEVEL_ROOT = void 0;
4
+ /** The `treeLevel` value for the top of the kit tree; any other value is a kit's id. */
5
+ exports.TREE_LEVEL_ROOT = 'root';
3
6
  //# sourceMappingURL=query.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/assets/get/query.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/assets/get/query.ts"],"names":[],"mappings":";;;AA6BA,wFAAwF;AAC3E,QAAA,eAAe,GAAG,MAAM,CAAA"}
@@ -3,4 +3,10 @@ import { GetAssetResponse } from '../[id]/get';
3
3
  export interface GetAssetsResponse {
4
4
  query: GetAssetsQuery | null;
5
5
  items: GetAssetResponse[];
6
+ /**
7
+ * Keyed reads only (`after`/`before` given): the id to continue from —
8
+ * the last item's — or null once the window is exhausted. Absent on a
9
+ * paged read.
10
+ */
11
+ next?: string | null;
6
12
  }
@@ -1,5 +1,6 @@
1
1
  export * from './[id]';
2
2
  export * from './count';
3
+ export * from './partitions';
3
4
  export * from './count-filtered';
4
5
  export * from './download';
5
6
  export * from './get';
@@ -9,3 +10,5 @@ export * from './suggestions';
9
10
  export * from './upload';
10
11
  export * from './errors';
11
12
  export * from './summary';
13
+ export * from './readiness';
14
+ export * from './rollup';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./[id]"), exports);
18
18
  __exportStar(require("./count"), exports);
19
+ __exportStar(require("./partitions"), exports);
19
20
  __exportStar(require("./count-filtered"), exports);
20
21
  __exportStar(require("./download"), exports);
21
22
  __exportStar(require("./get"), exports);
@@ -25,4 +26,6 @@ __exportStar(require("./suggestions"), exports);
25
26
  __exportStar(require("./upload"), exports);
26
27
  __exportStar(require("./errors"), exports);
27
28
  __exportStar(require("./summary"), exports);
29
+ __exportStar(require("./readiness"), exports);
30
+ __exportStar(require("./rollup"), exports);
28
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,0CAAuB;AACvB,mDAAgC;AAChC,6CAA0B;AAC1B,wCAAqB;AACrB,6CAA0B;AAC1B,yCAAsB;AACtB,gDAA6B;AAC7B,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/assets/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,0CAAuB;AACvB,+CAA4B;AAC5B,mDAAgC;AAChC,6CAA0B;AAC1B,wCAAqB;AACrB,6CAA0B;AAC1B,yCAAsB;AACtB,gDAA6B;AAC7B,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB;AACzB,8CAA2B;AAC3B,2CAAwB"}
@@ -6,7 +6,16 @@ export interface UpdateAssetsLocationRequest {
6
6
  lon?: number;
7
7
  readerId?: string;
8
8
  timestamp?: number;
9
- withAssetId?: string;
9
+ /** The asset these assets are now "with" (the durable carrier pointer).
10
+ * An explicit `null` clears an existing with-link — sent when an asset
11
+ * leaves its group (regrouping plan §5 layer 1); advisory until Slate
12
+ * honours the clear. */
13
+ withAssetId?: string | null;
14
+ /** Subset of `ids` that were located by inference (kit-subtree expansion)
15
+ * rather than physically read — these should be located WITHOUT bumping
16
+ * `lastSeen` (regrouping plan §5 layer 2). Advisory until Slate honours
17
+ * the distinction. */
18
+ inferredAssetIds?: string[];
10
19
  dispatchLocationId?: string;
11
20
  dispatchWithAssetId?: string;
12
21
  dispatchData?: Record<string, unknown>;
@@ -0,0 +1,2 @@
1
+ export * from './query';
2
+ export * from './response';
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./query"), exports);
18
+ __exportStar(require("./response"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/assets/partitions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
@@ -0,0 +1,16 @@
1
+ import { ListScope } from '../../usergroups/access';
2
+ export interface GetAssetPartitionsQuery {
3
+ /**
4
+ * How many near-equal slices to split the caller's assets into, in id
5
+ * order. The response carries `parts − 1` boundary ids; a client walks
6
+ * each slice with `GET /assets?after=…&before=…` and can run them side by
7
+ * side. Default 4, at most 16.
8
+ */
9
+ parts?: number;
10
+ /**
11
+ * `caller`, the default, slices the assets the caller's groups grant.
12
+ * `organisation` slices the whole organisation, which a client that
13
+ * downloads everything and filters locally passes on its first download.
14
+ */
15
+ scope?: ListScope;
16
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/assets/partitions/query.ts"],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ export interface GetAssetPartitionsResponse {
2
+ /**
3
+ * The last id of each slice but the last, ascending: `parts − 1` ids,
4
+ * fewer when there are not enough assets to fill every slice. Slice k
5
+ * runs from the previous boundary (exclusive; open for the first slice)
6
+ * up to and including boundary k (open for the last slice): walk it with
7
+ * `after` = the previous boundary and `before` = boundary k.
8
+ */
9
+ boundaries: string[];
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/assets/partitions/response.ts"],"names":[],"mappings":""}
@@ -8,6 +8,8 @@ export interface PostAssetRequest {
8
8
  fieldValues?: IFieldValueWithConstraints[];
9
9
  homeLocationId?: string;
10
10
  manifestIds?: string[];
11
+ /** Join a kit at creation — the direct parent kit's id (G2G M2). */
12
+ groupParentId?: string;
11
13
  }
12
14
  export declare type PostAssetsRequest = PostAssetRequest[];
13
15
  export declare const testPostAssetRequest: PostAssetRequest;