@elaraai/e3-ui 1.0.93 → 1.0.95

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 (303) hide show
  1. package/dist/src/allocation/adapters.d.ts +159 -0
  2. package/dist/src/allocation/adapters.d.ts.map +1 -0
  3. package/dist/src/allocation/adapters.js +241 -0
  4. package/dist/src/allocation/adapters.js.map +1 -0
  5. package/dist/src/allocation/functions.d.ts +664 -0
  6. package/dist/src/allocation/functions.d.ts.map +1 -0
  7. package/dist/src/allocation/functions.js +782 -0
  8. package/dist/src/allocation/functions.js.map +1 -0
  9. package/dist/src/allocation/index.d.ts +2985 -0
  10. package/dist/src/allocation/index.d.ts.map +1 -0
  11. package/dist/src/allocation/index.js +499 -0
  12. package/dist/src/allocation/index.js.map +1 -0
  13. package/dist/src/allocation/types.d.ts +832 -0
  14. package/dist/src/allocation/types.d.ts.map +1 -0
  15. package/dist/src/allocation/types.js +360 -0
  16. package/dist/src/allocation/types.js.map +1 -0
  17. package/dist/src/bind/func.d.ts +14 -0
  18. package/dist/src/bind/func.d.ts.map +1 -1
  19. package/dist/src/bind/func.js +22 -1
  20. package/dist/src/bind/func.js.map +1 -1
  21. package/dist/src/calendar/index.d.ts +510 -1639
  22. package/dist/src/calendar/index.d.ts.map +1 -1
  23. package/dist/src/calendar/index.js +56 -29
  24. package/dist/src/calendar/index.js.map +1 -1
  25. package/dist/src/flowchart/canvas.d.ts +9 -21
  26. package/dist/src/flowchart/canvas.d.ts.map +1 -1
  27. package/dist/src/flowchart/canvas.js +10 -22
  28. package/dist/src/flowchart/canvas.js.map +1 -1
  29. package/dist/src/flowchart/flowchart.d.ts +19 -13
  30. package/dist/src/flowchart/flowchart.d.ts.map +1 -1
  31. package/dist/src/flowchart/flowchart.js.map +1 -1
  32. package/dist/src/flowchart/index.d.ts +44 -21
  33. package/dist/src/flowchart/index.d.ts.map +1 -1
  34. package/dist/src/flowchart/index.js +43 -20
  35. package/dist/src/flowchart/index.js.map +1 -1
  36. package/dist/src/flowchart/library.d.ts +166 -81
  37. package/dist/src/flowchart/library.d.ts.map +1 -1
  38. package/dist/src/flowchart/library.js +232 -105
  39. package/dist/src/flowchart/library.js.map +1 -1
  40. package/dist/src/flowchart/over.d.ts +9 -16
  41. package/dist/src/flowchart/over.d.ts.map +1 -1
  42. package/dist/src/flowchart/over.js +9 -16
  43. package/dist/src/flowchart/over.js.map +1 -1
  44. package/dist/src/flowchart/payload.d.ts +710 -508
  45. package/dist/src/flowchart/payload.d.ts.map +1 -1
  46. package/dist/src/flowchart/payload.js +128 -74
  47. package/dist/src/flowchart/payload.js.map +1 -1
  48. package/dist/src/flowchart/window.d.ts +132 -347
  49. package/dist/src/flowchart/window.d.ts.map +1 -1
  50. package/dist/src/flowchart/window.js +48 -55
  51. package/dist/src/flowchart/window.js.map +1 -1
  52. package/dist/src/index.d.ts +11 -7
  53. package/dist/src/index.d.ts.map +1 -1
  54. package/dist/src/index.js +14 -6
  55. package/dist/src/index.js.map +1 -1
  56. package/dist/src/internal.d.ts +18 -7
  57. package/dist/src/internal.d.ts.map +1 -1
  58. package/dist/src/internal.js +28 -9
  59. package/dist/src/internal.js.map +1 -1
  60. package/dist/src/plan/event-rows.d.ts +26 -10
  61. package/dist/src/plan/event-rows.d.ts.map +1 -1
  62. package/dist/src/plan/event-rows.js +39 -13
  63. package/dist/src/plan/event-rows.js.map +1 -1
  64. package/dist/src/plan/ir.d.ts +244 -815
  65. package/dist/src/plan/ir.d.ts.map +1 -1
  66. package/dist/src/plan/ir.js +8 -6
  67. package/dist/src/plan/ir.js.map +1 -1
  68. package/dist/src/plan/library.d.ts +3 -0
  69. package/dist/src/plan/library.d.ts.map +1 -1
  70. package/dist/src/plan/library.js +1 -1
  71. package/dist/src/plan/library.js.map +1 -1
  72. package/dist/src/plan/ordered-source.d.ts +1 -0
  73. package/dist/src/plan/ordered-source.d.ts.map +1 -1
  74. package/dist/src/plan/plan.d.ts +559 -1667
  75. package/dist/src/plan/plan.d.ts.map +1 -1
  76. package/dist/src/plan/plan.js +123 -45
  77. package/dist/src/plan/plan.js.map +1 -1
  78. package/dist/src/plan/root.d.ts +16 -20
  79. package/dist/src/plan/root.d.ts.map +1 -1
  80. package/dist/src/plan/root.js +23 -33
  81. package/dist/src/plan/root.js.map +1 -1
  82. package/dist/src/roster/coverage.d.ts +17 -231
  83. package/dist/src/roster/coverage.d.ts.map +1 -1
  84. package/dist/src/roster/coverage.js +94 -90
  85. package/dist/src/roster/coverage.js.map +1 -1
  86. package/dist/src/roster/fit.d.ts +59 -0
  87. package/dist/src/roster/fit.d.ts.map +1 -0
  88. package/dist/src/roster/fit.js +155 -0
  89. package/dist/src/roster/fit.js.map +1 -0
  90. package/dist/src/roster/index.d.ts +2862 -3662
  91. package/dist/src/roster/index.d.ts.map +1 -1
  92. package/dist/src/roster/index.js +383 -81
  93. package/dist/src/roster/index.js.map +1 -1
  94. package/dist/src/roster/library.d.ts +37 -92
  95. package/dist/src/roster/library.d.ts.map +1 -1
  96. package/dist/src/roster/library.js +25 -64
  97. package/dist/src/roster/library.js.map +1 -1
  98. package/dist/src/roster/lists.d.ts +195 -0
  99. package/dist/src/roster/lists.d.ts.map +1 -0
  100. package/dist/src/roster/lists.js +233 -0
  101. package/dist/src/roster/lists.js.map +1 -0
  102. package/dist/src/roster/rules.d.ts +17 -260
  103. package/dist/src/roster/rules.d.ts.map +1 -1
  104. package/dist/src/roster/rules.js +135 -132
  105. package/dist/src/roster/rules.js.map +1 -1
  106. package/dist/src/roster/targets.d.ts +115 -0
  107. package/dist/src/roster/targets.d.ts.map +1 -0
  108. package/dist/src/roster/targets.js +213 -0
  109. package/dist/src/roster/targets.js.map +1 -0
  110. package/dist/src/roster/times.d.ts +251 -0
  111. package/dist/src/roster/times.d.ts.map +1 -0
  112. package/dist/src/roster/times.js +174 -0
  113. package/dist/src/roster/times.js.map +1 -0
  114. package/dist/src/roster/types.d.ts +828 -183
  115. package/dist/src/roster/types.d.ts.map +1 -1
  116. package/dist/src/roster/types.js +224 -97
  117. package/dist/src/roster/types.js.map +1 -1
  118. package/dist/src/schedule/accessor.d.ts +28 -0
  119. package/dist/src/schedule/accessor.d.ts.map +1 -0
  120. package/dist/src/schedule/accessor.js +39 -0
  121. package/dist/src/schedule/accessor.js.map +1 -0
  122. package/dist/src/schedule/events.d.ts +170 -42
  123. package/dist/src/schedule/events.d.ts.map +1 -1
  124. package/dist/src/schedule/events.js +431 -171
  125. package/dist/src/schedule/events.js.map +1 -1
  126. package/dist/src/schedule/index.d.ts +41 -4
  127. package/dist/src/schedule/index.d.ts.map +1 -1
  128. package/dist/src/schedule/index.js +35 -3
  129. package/dist/src/schedule/index.js.map +1 -1
  130. package/dist/src/schedule/library.d.ts +13 -3
  131. package/dist/src/schedule/library.d.ts.map +1 -1
  132. package/dist/src/schedule/library.js +11 -4
  133. package/dist/src/schedule/library.js.map +1 -1
  134. package/dist/src/schedule/periods.d.ts +115 -0
  135. package/dist/src/schedule/periods.d.ts.map +1 -0
  136. package/dist/src/schedule/periods.js +215 -0
  137. package/dist/src/schedule/periods.js.map +1 -0
  138. package/dist/src/schedule/record-window.d.ts +25 -3
  139. package/dist/src/schedule/record-window.d.ts.map +1 -1
  140. package/dist/src/schedule/record-window.js +31 -18
  141. package/dist/src/schedule/record-window.js.map +1 -1
  142. package/dist/src/schedule/resources.d.ts +82 -4
  143. package/dist/src/schedule/resources.d.ts.map +1 -1
  144. package/dist/src/schedule/resources.js +44 -14
  145. package/dist/src/schedule/resources.js.map +1 -1
  146. package/dist/src/schedule/session.d.ts +69 -0
  147. package/dist/src/schedule/session.d.ts.map +1 -0
  148. package/dist/src/schedule/session.js +121 -0
  149. package/dist/src/schedule/session.js.map +1 -0
  150. package/dist/src/schedule/templates.d.ts +14 -2
  151. package/dist/src/schedule/templates.d.ts.map +1 -1
  152. package/dist/src/schedule/templates.js +5 -3
  153. package/dist/src/schedule/templates.js.map +1 -1
  154. package/dist/src/schedule/types.d.ts +1671 -37
  155. package/dist/src/schedule/types.d.ts.map +1 -1
  156. package/dist/src/schedule/types.js +196 -5
  157. package/dist/src/schedule/types.js.map +1 -1
  158. package/dist/src/schedule/window.d.ts +14 -0
  159. package/dist/src/schedule/window.d.ts.map +1 -1
  160. package/dist/src/schedule/window.js +14 -4
  161. package/dist/src/schedule/window.js.map +1 -1
  162. package/dist/src/schedule/words.d.ts +22 -0
  163. package/dist/src/schedule/words.d.ts.map +1 -0
  164. package/dist/src/schedule/words.js +25 -0
  165. package/dist/src/schedule/words.js.map +1 -0
  166. package/dist/src/sheet/index.d.ts +61 -27
  167. package/dist/src/sheet/index.d.ts.map +1 -1
  168. package/dist/src/sheet/index.js +59 -25
  169. package/dist/src/sheet/index.js.map +1 -1
  170. package/dist/src/sheet/library.d.ts +21 -3
  171. package/dist/src/sheet/library.d.ts.map +1 -1
  172. package/dist/src/sheet/library.js +23 -6
  173. package/dist/src/sheet/library.js.map +1 -1
  174. package/dist/src/sheet/registers.d.ts +100 -85
  175. package/dist/src/sheet/registers.d.ts.map +1 -1
  176. package/dist/src/sheet/registers.js +100 -85
  177. package/dist/src/sheet/registers.js.map +1 -1
  178. package/dist/src/sheet/root.d.ts +8 -12
  179. package/dist/src/sheet/root.d.ts.map +1 -1
  180. package/dist/src/sheet/root.js +6 -40
  181. package/dist/src/sheet/root.js.map +1 -1
  182. package/dist/src/sheet/sheet.d.ts +598 -2349
  183. package/dist/src/sheet/sheet.d.ts.map +1 -1
  184. package/dist/src/sheet/sheet.js +124 -37
  185. package/dist/src/sheet/sheet.js.map +1 -1
  186. package/dist/src/sheet/sub-rows.d.ts +74 -28
  187. package/dist/src/sheet/sub-rows.d.ts.map +1 -1
  188. package/dist/src/sheet/sub-rows.js +74 -28
  189. package/dist/src/sheet/sub-rows.js.map +1 -1
  190. package/dist/src/sheet/templates.d.ts +98 -34
  191. package/dist/src/sheet/templates.d.ts.map +1 -1
  192. package/dist/src/sheet/templates.js +102 -58
  193. package/dist/src/sheet/templates.js.map +1 -1
  194. package/dist/src/sheet/types.d.ts +289 -1359
  195. package/dist/src/sheet/types.d.ts.map +1 -1
  196. package/dist/src/sheet/types.js +20 -26
  197. package/dist/src/sheet/types.js.map +1 -1
  198. package/dist/src/sheet/views.d.ts +10 -11
  199. package/dist/src/sheet/views.d.ts.map +1 -1
  200. package/dist/src/sheet/views.js +15 -20
  201. package/dist/src/sheet/views.js.map +1 -1
  202. package/dist/src/{roster/visibility.d.ts → utils/key-visibility.d.ts} +42 -7
  203. package/dist/src/utils/key-visibility.d.ts.map +1 -0
  204. package/dist/src/utils/key-visibility.js +36 -0
  205. package/dist/src/utils/key-visibility.js.map +1 -0
  206. package/dist/src/utils/ordered-source.d.ts +1 -0
  207. package/dist/src/utils/ordered-source.d.ts.map +1 -1
  208. package/dist/src/utils/ordered-source.js +8 -3
  209. package/dist/src/utils/ordered-source.js.map +1 -1
  210. package/dist/src/utils/record-sources.d.ts +107 -0
  211. package/dist/src/utils/record-sources.d.ts.map +1 -0
  212. package/dist/src/utils/record-sources.js +132 -0
  213. package/dist/src/utils/record-sources.js.map +1 -0
  214. package/dist/test/allocation/allocation.examples.d.ts +2902 -0
  215. package/dist/test/allocation/allocation.examples.d.ts.map +1 -0
  216. package/dist/test/allocation/allocation.examples.js +643 -0
  217. package/dist/test/allocation/allocation.examples.js.map +1 -0
  218. package/dist/test/allocation/fit.examples.d.ts +546 -0
  219. package/dist/test/allocation/fit.examples.d.ts.map +1 -0
  220. package/dist/test/allocation/fit.examples.js +171 -0
  221. package/dist/test/allocation/fit.examples.js.map +1 -0
  222. package/dist/test/allocation/kiln-yard.d.ts +181 -0
  223. package/dist/test/allocation/kiln-yard.d.ts.map +1 -0
  224. package/dist/test/allocation/kiln-yard.js +228 -0
  225. package/dist/test/allocation/kiln-yard.js.map +1 -0
  226. package/dist/test/bind/data/data.examples.d.ts +651 -1
  227. package/dist/test/bind/data/data.examples.d.ts.map +1 -1
  228. package/dist/test/bind/data/data.examples.js +140 -2
  229. package/dist/test/bind/data/data.examples.js.map +1 -1
  230. package/dist/test/bind/func/func.examples.d.ts +10 -1
  231. package/dist/test/bind/func/func.examples.d.ts.map +1 -1
  232. package/dist/test/bind/func/func.examples.js +8 -1
  233. package/dist/test/bind/func/func.examples.js.map +1 -1
  234. package/dist/test/bind/record/record.examples.d.ts +633 -1
  235. package/dist/test/bind/record/record.examples.d.ts.map +1 -1
  236. package/dist/test/bind/record/record.examples.js +26 -2
  237. package/dist/test/bind/record/record.examples.js.map +1 -1
  238. package/dist/test/calendar/calendar-records.examples.d.ts.map +1 -1
  239. package/dist/test/calendar/calendar-records.examples.js +18 -14
  240. package/dist/test/calendar/calendar-records.examples.js.map +1 -1
  241. package/dist/test/calendar/calendar.examples.d.ts +521 -16
  242. package/dist/test/calendar/calendar.examples.d.ts.map +1 -1
  243. package/dist/test/calendar/calendar.examples.js +182 -135
  244. package/dist/test/calendar/calendar.examples.js.map +1 -1
  245. package/dist/test/examples-package.d.ts +75 -0
  246. package/dist/test/examples-package.d.ts.map +1 -0
  247. package/dist/test/examples-package.js +263 -0
  248. package/dist/test/examples-package.js.map +1 -0
  249. package/dist/test/flowchart/flowchart.examples.d.ts +211 -19
  250. package/dist/test/flowchart/flowchart.examples.d.ts.map +1 -1
  251. package/dist/test/flowchart/flowchart.examples.js +102 -75
  252. package/dist/test/flowchart/flowchart.examples.js.map +1 -1
  253. package/dist/test/plan/plan-events.examples.d.ts +1439 -209
  254. package/dist/test/plan/plan-events.examples.d.ts.map +1 -1
  255. package/dist/test/plan/plan-events.examples.js +199 -59
  256. package/dist/test/plan/plan-events.examples.js.map +1 -1
  257. package/dist/test/plan/plan-records.examples.d.ts +420 -0
  258. package/dist/test/plan/plan-records.examples.d.ts.map +1 -1
  259. package/dist/test/plan/plan-records.examples.js +70 -19
  260. package/dist/test/plan/plan-records.examples.js.map +1 -1
  261. package/dist/test/plan/plan-windows.examples.d.ts +636 -55
  262. package/dist/test/plan/plan-windows.examples.d.ts.map +1 -1
  263. package/dist/test/plan/plan-windows.examples.js +69 -33
  264. package/dist/test/plan/plan-windows.examples.js.map +1 -1
  265. package/dist/test/plan/plan.examples.d.ts +153 -31
  266. package/dist/test/plan/plan.examples.d.ts.map +1 -1
  267. package/dist/test/plan/plan.examples.js +178 -101
  268. package/dist/test/plan/plan.examples.js.map +1 -1
  269. package/dist/test/roster/domain.examples.d.ts +467 -250
  270. package/dist/test/roster/domain.examples.d.ts.map +1 -1
  271. package/dist/test/roster/domain.examples.js +92 -29
  272. package/dist/test/roster/domain.examples.js.map +1 -1
  273. package/dist/test/roster/roster-records.examples.d.ts +430 -586
  274. package/dist/test/roster/roster-records.examples.d.ts.map +1 -1
  275. package/dist/test/roster/roster-records.examples.js +102 -43
  276. package/dist/test/roster/roster-records.examples.js.map +1 -1
  277. package/dist/test/roster/roster.examples.d.ts +2319 -606
  278. package/dist/test/roster/roster.examples.d.ts.map +1 -1
  279. package/dist/test/roster/roster.examples.js +456 -148
  280. package/dist/test/roster/roster.examples.js.map +1 -1
  281. package/dist/test/roster/warehouse.d.ts +172 -63
  282. package/dist/test/roster/warehouse.d.ts.map +1 -1
  283. package/dist/test/roster/warehouse.js +172 -39
  284. package/dist/test/roster/warehouse.js.map +1 -1
  285. package/dist/test/schedule/schedule.examples.d.ts +3499 -0
  286. package/dist/test/schedule/schedule.examples.d.ts.map +1 -0
  287. package/dist/test/schedule/schedule.examples.js +192 -0
  288. package/dist/test/schedule/schedule.examples.js.map +1 -0
  289. package/dist/test/sheet/sheet-records.examples.d.ts.map +1 -1
  290. package/dist/test/sheet/sheet-records.examples.js +22 -18
  291. package/dist/test/sheet/sheet-records.examples.js.map +1 -1
  292. package/dist/test/sheet/sheet.examples.d.ts +715 -26
  293. package/dist/test/sheet/sheet.examples.d.ts.map +1 -1
  294. package/dist/test/sheet/sheet.examples.js +204 -130
  295. package/dist/test/sheet/sheet.examples.js.map +1 -1
  296. package/package.json +17 -10
  297. package/dist/src/roster/people.d.ts +0 -50
  298. package/dist/src/roster/people.d.ts.map +0 -1
  299. package/dist/src/roster/people.js +0 -32
  300. package/dist/src/roster/people.js.map +0 -1
  301. package/dist/src/roster/visibility.d.ts.map +0 -1
  302. package/dist/src/roster/visibility.js +0 -25
  303. package/dist/src/roster/visibility.js.map +0 -1
@@ -0,0 +1,832 @@
1
+ /**
2
+ * Copyright (c) 2025 Elara AI Pty Ltd
3
+ * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details.
4
+ */
5
+ /**
6
+ * The Allocation's East types (#1371, `Builder Interfaces Spec.md` §6.3). A
7
+ * day is the board's reading of the app's own rows — each bin the app's row,
8
+ * with the roles the board reads from it — carried in the fit's and the
9
+ * check's requests and in the renderer, and stored nowhere: the bins and the
10
+ * days are the app's records. Beside them, the arrivals and resources an app
11
+ * gives the board, and the fit's question and answer.
12
+ *
13
+ * The types over a day take the app's bin row type, `R`: each is a
14
+ * constructor, and the same `R` gives the same East type (`isTypeEqual`), so a
15
+ * row type declared once matches the board's bin kind and the fit's request.
16
+ *
17
+ * @packageDocumentation
18
+ */
19
+ import { ArrayType, BooleanType, DateTimeType, DictType, FloatType, IntegerType, NullType, OptionType, StringType, StructType, VariantType, type EastType } from "@elaraai/east";
20
+ import { TimeStepType } from "@elaraai/east-ui";
21
+ /**
22
+ * A lane: it takes one bin each `every` (an hour by default), at its offset
23
+ * past it.
24
+ *
25
+ * @property key - Its key, what a bin's lane names: its row's key in the lanes' resource kind
26
+ * @property label - Its name (`B-1`)
27
+ * @property offset - How far past each slot's start its bins are booked (`minutes 15`)
28
+ */
29
+ export declare const AllocationLaneType: StructType<{
30
+ readonly key: StringType;
31
+ readonly label: StringType;
32
+ readonly offset: VariantType<{
33
+ readonly minutes: FloatType;
34
+ readonly hours: FloatType;
35
+ readonly days: FloatType;
36
+ readonly weeks: FloatType;
37
+ readonly months: FloatType;
38
+ }>;
39
+ }>;
40
+ /** Type representing {@link AllocationLaneType}. */
41
+ export type AllocationLaneType = typeof AllocationLaneType;
42
+ /**
43
+ * A day's status: Schedule's period status, read from the app's days record
44
+ * (`Schedule.periods`).
45
+ *
46
+ * @property draft - An editable day
47
+ * @property published - A read-only day, and when it was published when the app's published case holds the time
48
+ * @property other - Another case of the app's status, by its name: read-only
49
+ */
50
+ export declare const AllocationStatusType: VariantType<{
51
+ readonly draft: NullType;
52
+ readonly published: StructType<{
53
+ readonly at: OptionType<DateTimeType>;
54
+ }>;
55
+ readonly other: StringType;
56
+ }>;
57
+ /** Type representing {@link AllocationStatusType}. */
58
+ export type AllocationStatusType = typeof AllocationStatusType;
59
+ /** The fields of a {@link AllocationBinType}, over the app's bin row type `R`. */
60
+ export type AllocationBinFields<R extends EastType> = {
61
+ lane: StringType;
62
+ at: DateTimeType;
63
+ arrival: OptionType<StringType>;
64
+ quantity: FloatType;
65
+ kind: OptionType<StringType>;
66
+ hold: typeof TimeStepType;
67
+ parts: DictType<StringType, FloatType>;
68
+ row: R;
69
+ };
70
+ /** A bin over the app's bin row type `R` — what {@link AllocationBinTypeFor} constructs. */
71
+ export type AllocationBinType<R extends EastType> = StructType<AllocationBinFields<R>>;
72
+ /**
73
+ * One bin, as the board reads it from the app's row (`R`): its roles — one
74
+ * booking in a lane slot, and the quantity it puts on each resource — beside
75
+ * the row itself, every field of it.
76
+ *
77
+ * @remarks
78
+ * Composed from the bin kind's roles (its `rows` and `read`) and the row. A
79
+ * bin keeps what it was booked with — its kind and its hold come from its
80
+ * arrival when it is booked, as its row's other fields do, and stay with it
81
+ * when it moves — so a bin can differ from its arrival, as a delivery measured
82
+ * on arrival does. A reservation books no arrival, and holds no quantity, no
83
+ * kind and no hold.
84
+ *
85
+ * @typeParam R - The app's bin row type
86
+ * @param row - The app's bin row type
87
+ * @returns `StructType({ lane, at, arrival, quantity, kind, hold, parts, row })`
88
+ *
89
+ * @property lane - Its lane's key
90
+ * @property at - Its time; a batch's bins follow one minute apart
91
+ * @property arrival - The arrival it books, by key; `none` for a reservation
92
+ * @property quantity - Its quantity; 0 for a reservation
93
+ * @property kind - What it goes with on a resource (its arrival's kind when booked); `none` for a kind with no `kind` role
94
+ * @property hold - How long a resource holds it from the plan day (its arrival's hold when booked)
95
+ * @property parts - The quantity on each resource, by key; empty while it is not linked
96
+ * @property row - The app's row, every field of it
97
+ */
98
+ export declare function AllocationBinTypeFor<R extends EastType>(row: R): AllocationBinType<R>;
99
+ /** A day over the app's bin row type `R` — what {@link AllocationDayTypeFor} constructs. */
100
+ export type AllocationDayType<R extends EastType> = StructType<{
101
+ status: AllocationStatusType;
102
+ bins: DictType<StringType, AllocationBinType<R>>;
103
+ }>;
104
+ /**
105
+ * One day of the app's bins, as the board reads them: its period's status and
106
+ * its bins, the drafts in place.
107
+ *
108
+ * @typeParam R - The app's bin row type
109
+ * @param row - The app's bin row type
110
+ * @returns `StructType({ status, bins })`
111
+ *
112
+ * @property status - The day's status, from the app's days record; a draft with no `periods`, or no row for the day
113
+ * @property bins - The bins whose `at` falls in the day, by their keys
114
+ */
115
+ export declare function AllocationDayTypeFor<R extends EastType>(row: R): AllocationDayType<R>;
116
+ /**
117
+ * A span of time, `[from, to)`.
118
+ *
119
+ * @property from - Its start
120
+ * @property to - Its end
121
+ */
122
+ export declare const AllocationIntervalType: StructType<{
123
+ readonly from: DateTimeType;
124
+ readonly to: DateTimeType;
125
+ }>;
126
+ /** Type representing {@link AllocationIntervalType}. */
127
+ export type AllocationIntervalType = typeof AllocationIntervalType;
128
+ /**
129
+ * Other work on a resource: a job covering the plan day's start makes it busy
130
+ * until the job ends; one starting later is its next job.
131
+ *
132
+ * @property label - Its name (`C-3142`)
133
+ * @property start - When it starts
134
+ * @property end - When it ends, and the resource is released
135
+ */
136
+ export declare const AllocationJobType: StructType<{
137
+ readonly label: StringType;
138
+ readonly start: DateTimeType;
139
+ readonly end: DateTimeType;
140
+ }>;
141
+ /** Type representing {@link AllocationJobType}. */
142
+ export type AllocationJobType = typeof AllocationJobType;
143
+ /**
144
+ * One line of an arrival's details, shown read-only in a bin's inspector.
145
+ *
146
+ * @property label - Its label (`Settings`)
147
+ * @property value - Its text
148
+ */
149
+ export declare const AllocationDetailType: StructType<{
150
+ readonly label: StringType;
151
+ readonly value: StringType;
152
+ }>;
153
+ /** Type representing {@link AllocationDetailType}. */
154
+ export type AllocationDetailType = typeof AllocationDetailType;
155
+ /**
156
+ * What the board books from: an arrival, resolved from the app's rows
157
+ * (`Allocation.arrivals`).
158
+ *
159
+ * @property key - Its key in the app's rows, what a bin's `arrival` names
160
+ * @property label - Its code on cards, chips and lists (`LD-2231`)
161
+ * @property meta - Its second line (`BRK · R2 · spec MC12`)
162
+ * @property quantity - Its quantity, booked whole unless split
163
+ * @property hold - How long a resource holds a bin of it
164
+ * @property kind - What it goes with: a resource holding the same kind ranks higher in `Allocation.fit`
165
+ * @property due - When it is due; overdue before the plan day
166
+ * @property window - Its ready window
167
+ * @property details - Read-only lines in a bin's inspector
168
+ */
169
+ export declare const AllocationArrivalType: StructType<{
170
+ readonly key: StringType;
171
+ readonly label: StringType;
172
+ readonly meta: OptionType<StringType>;
173
+ readonly quantity: FloatType;
174
+ readonly hold: VariantType<{
175
+ readonly minutes: FloatType;
176
+ readonly hours: FloatType;
177
+ readonly days: FloatType;
178
+ readonly weeks: FloatType;
179
+ readonly months: FloatType;
180
+ }>;
181
+ readonly kind: OptionType<StringType>;
182
+ readonly due: OptionType<DateTimeType>;
183
+ readonly window: OptionType<StructType<{
184
+ readonly from: DateTimeType;
185
+ readonly to: DateTimeType;
186
+ }>>;
187
+ readonly details: ArrayType<StructType<{
188
+ readonly label: StringType;
189
+ readonly value: StringType;
190
+ }>>;
191
+ }>;
192
+ /** Type representing {@link AllocationArrivalType}. */
193
+ export type AllocationArrivalType = typeof AllocationArrivalType;
194
+ /**
195
+ * A resource bins are allocated to, resolved from the app's rows through its
196
+ * resource kind's accessors (`Schedule.resources`).
197
+ *
198
+ * @property key - Its key in the app's rows, what a bin's `parts` name
199
+ * @property label - Its name (`K-203`)
200
+ * @property group - Its group (`Hall B`)
201
+ * @property meta - Its free line (`Hall B · 40 m³`)
202
+ * @property note - A line about its next job, after the inspector's next fill
203
+ * @property min - Its minimum, in the quantity's unit
204
+ * @property max - Its maximum
205
+ * @property hold - How long a reservation on it is checked for, and how long it is held when it holds only reservations
206
+ * @property jobs - Other work on it
207
+ */
208
+ export declare const AllocationResourceType: StructType<{
209
+ readonly key: StringType;
210
+ readonly label: StringType;
211
+ readonly group: OptionType<StringType>;
212
+ readonly meta: OptionType<StringType>;
213
+ readonly note: OptionType<StringType>;
214
+ readonly min: FloatType;
215
+ readonly max: FloatType;
216
+ readonly hold: VariantType<{
217
+ readonly minutes: FloatType;
218
+ readonly hours: FloatType;
219
+ readonly days: FloatType;
220
+ readonly weeks: FloatType;
221
+ readonly months: FloatType;
222
+ }>;
223
+ readonly jobs: ArrayType<StructType<{
224
+ readonly label: StringType;
225
+ readonly start: DateTimeType;
226
+ readonly end: DateTimeType;
227
+ }>>;
228
+ }>;
229
+ /** Type representing {@link AllocationResourceType}. */
230
+ export type AllocationResourceType = typeof AllocationResourceType;
231
+ /**
232
+ * The built-in rules an app may turn off.
233
+ *
234
+ * @property under - Whether `Allocation.fit` and `Allocation.check` warn under a resource's minimum
235
+ */
236
+ export declare const AllocationRulesType: StructType<{
237
+ readonly under: BooleanType;
238
+ }>;
239
+ /** Type representing {@link AllocationRulesType}. */
240
+ export type AllocationRulesType = typeof AllocationRulesType;
241
+ /**
242
+ * Everything a fit and the checks read besides the day: the board's
243
+ * configuration, every arrival and every resource — whatever the narrowing
244
+ * hides.
245
+ *
246
+ * @property lanes - The lanes, in order
247
+ * @property every - The slot spacing
248
+ * @property arrivals - Every arrival, by key
249
+ * @property resources - Every resource, by key
250
+ * @property rules - The built-in rules
251
+ * @property unit - The quantity's unit (`m³`), or empty
252
+ */
253
+ export declare const AllocationContextType: StructType<{
254
+ readonly lanes: ArrayType<StructType<{
255
+ readonly key: StringType;
256
+ readonly label: StringType;
257
+ readonly offset: VariantType<{
258
+ readonly minutes: FloatType;
259
+ readonly hours: FloatType;
260
+ readonly days: FloatType;
261
+ readonly weeks: FloatType;
262
+ readonly months: FloatType;
263
+ }>;
264
+ }>>;
265
+ readonly every: VariantType<{
266
+ readonly minutes: FloatType;
267
+ readonly hours: FloatType;
268
+ readonly days: FloatType;
269
+ readonly weeks: FloatType;
270
+ readonly months: FloatType;
271
+ }>;
272
+ readonly arrivals: DictType<StringType, StructType<{
273
+ readonly key: StringType;
274
+ readonly label: StringType;
275
+ readonly meta: OptionType<StringType>;
276
+ readonly quantity: FloatType;
277
+ readonly hold: VariantType<{
278
+ readonly minutes: FloatType;
279
+ readonly hours: FloatType;
280
+ readonly days: FloatType;
281
+ readonly weeks: FloatType;
282
+ readonly months: FloatType;
283
+ }>;
284
+ readonly kind: OptionType<StringType>;
285
+ readonly due: OptionType<DateTimeType>;
286
+ readonly window: OptionType<StructType<{
287
+ readonly from: DateTimeType;
288
+ readonly to: DateTimeType;
289
+ }>>;
290
+ readonly details: ArrayType<StructType<{
291
+ readonly label: StringType;
292
+ readonly value: StringType;
293
+ }>>;
294
+ }>>;
295
+ readonly resources: DictType<StringType, StructType<{
296
+ readonly key: StringType;
297
+ readonly label: StringType;
298
+ readonly group: OptionType<StringType>;
299
+ readonly meta: OptionType<StringType>;
300
+ readonly note: OptionType<StringType>;
301
+ readonly min: FloatType;
302
+ readonly max: FloatType;
303
+ readonly hold: VariantType<{
304
+ readonly minutes: FloatType;
305
+ readonly hours: FloatType;
306
+ readonly days: FloatType;
307
+ readonly weeks: FloatType;
308
+ readonly months: FloatType;
309
+ }>;
310
+ readonly jobs: ArrayType<StructType<{
311
+ readonly label: StringType;
312
+ readonly start: DateTimeType;
313
+ readonly end: DateTimeType;
314
+ }>>;
315
+ }>>;
316
+ readonly rules: StructType<{
317
+ readonly under: BooleanType;
318
+ }>;
319
+ readonly unit: StringType;
320
+ }>;
321
+ /** Type representing {@link AllocationContextType}. */
322
+ export type AllocationContextType = typeof AllocationContextType;
323
+ /**
324
+ * A resource's state on the plan day.
325
+ *
326
+ * @property free - It holds nothing and is not busy
327
+ * @property loading - It holds bins today
328
+ * @property busy - A job covers the day's start
329
+ */
330
+ export declare const AllocationLoadStateType: VariantType<{
331
+ readonly free: NullType;
332
+ readonly loading: NullType;
333
+ readonly busy: NullType;
334
+ }>;
335
+ /** Type representing {@link AllocationLoadStateType}. */
336
+ export type AllocationLoadStateType = typeof AllocationLoadStateType;
337
+ /**
338
+ * A resource's load on the plan day.
339
+ *
340
+ * @property resource - The resource's key
341
+ * @property fill - What its bins put on it
342
+ * @property bins - How many bins are on it, reservations included
343
+ * @property hold - From the plan day for its longest bin's hold (its own hold when it holds only reservations); `none` with no bins
344
+ * @property state - Free, loading or busy
345
+ */
346
+ export declare const AllocationLoadType: StructType<{
347
+ readonly resource: StringType;
348
+ readonly fill: FloatType;
349
+ readonly bins: IntegerType;
350
+ readonly hold: OptionType<StructType<{
351
+ readonly from: DateTimeType;
352
+ readonly to: DateTimeType;
353
+ }>>;
354
+ readonly state: VariantType<{
355
+ readonly free: NullType;
356
+ readonly loading: NullType;
357
+ readonly busy: NullType;
358
+ }>;
359
+ }>;
360
+ /** Type representing {@link AllocationLoadType}. */
361
+ export type AllocationLoadType = typeof AllocationLoadType;
362
+ /**
363
+ * A resource's line on the plan day, as its row and its bins' cards show it
364
+ * (A16, A19).
365
+ *
366
+ * @property text - Its line: the load it holds (`11 m³ · max 9 · 2 over`, `reserved · takes 26–48`, with `· 1 d into next job`), `busy until Fri 14`, or what it is and takes when free (`Hall B · 40 m³ · takes 20–40 m³`)
367
+ * @property tone - `danger` over its maximum, `warning` overlapping its next job or under its minimum, else `neutral`
368
+ * @property over - Whether it holds more than its maximum
369
+ * @property under - Whether it holds something, but less than its minimum
370
+ * @property overlap - Whether its hold runs into its next job
371
+ * @property next - Its next job: where an overlap starts
372
+ */
373
+ export declare const AllocationResourceLineType: StructType<{
374
+ readonly text: StringType;
375
+ readonly tone: VariantType<{
376
+ readonly success: NullType;
377
+ readonly warning: NullType;
378
+ readonly danger: NullType;
379
+ readonly info: NullType;
380
+ readonly neutral: NullType;
381
+ }>;
382
+ readonly over: BooleanType;
383
+ readonly under: BooleanType;
384
+ readonly overlap: BooleanType;
385
+ readonly next: OptionType<StructType<{
386
+ readonly label: StringType;
387
+ readonly start: DateTimeType;
388
+ readonly end: DateTimeType;
389
+ }>>;
390
+ }>;
391
+ /** Type representing {@link AllocationResourceLineType}. */
392
+ export type AllocationResourceLineType = typeof AllocationResourceLineType;
393
+ /**
394
+ * One quantity on one resource, against the drafted day: what a fit is asked
395
+ * about, one candidate at a time.
396
+ *
397
+ * @property day - The plan day
398
+ * @property bin - The bin it is for; `none` for an arrival not yet booked and for a new reservation
399
+ * @property reserve - Whether it reserves a slot (a reservation, or a bin booking no arrival): checked with no quantity, and refused when the resource is full
400
+ * @property quantity - What the resource would hold of it
401
+ * @property arrival - Its arrival, if it has one
402
+ * @property kind - Its kind
403
+ * @property resource - The resource
404
+ * @property load - The resource's load as the day stands
405
+ * @property after - What the resource would hold with it: the other bins' parts, and its quantity
406
+ * @property hold - From the plan day for the longer of its hold and the resource's other bins' holds
407
+ * @property spare - The days between the hold's end and the resource's next job; `none` with no next job
408
+ * @property kindMates - Whether a bin of its kind is already on the resource
409
+ * @property otherMates - Whether the resource holds other bins, none of its kind
410
+ * @property rules - The built-in rules
411
+ * @property unit - The quantity's unit
412
+ */
413
+ export declare const AllocationCandidateType: StructType<{
414
+ readonly day: DateTimeType;
415
+ readonly bin: OptionType<StringType>;
416
+ readonly reserve: BooleanType;
417
+ readonly quantity: FloatType;
418
+ readonly arrival: OptionType<StructType<{
419
+ readonly key: StringType;
420
+ readonly label: StringType;
421
+ readonly meta: OptionType<StringType>;
422
+ readonly quantity: FloatType;
423
+ readonly hold: VariantType<{
424
+ readonly minutes: FloatType;
425
+ readonly hours: FloatType;
426
+ readonly days: FloatType;
427
+ readonly weeks: FloatType;
428
+ readonly months: FloatType;
429
+ }>;
430
+ readonly kind: OptionType<StringType>;
431
+ readonly due: OptionType<DateTimeType>;
432
+ readonly window: OptionType<StructType<{
433
+ readonly from: DateTimeType;
434
+ readonly to: DateTimeType;
435
+ }>>;
436
+ readonly details: ArrayType<StructType<{
437
+ readonly label: StringType;
438
+ readonly value: StringType;
439
+ }>>;
440
+ }>>;
441
+ readonly kind: OptionType<StringType>;
442
+ readonly resource: StructType<{
443
+ readonly key: StringType;
444
+ readonly label: StringType;
445
+ readonly group: OptionType<StringType>;
446
+ readonly meta: OptionType<StringType>;
447
+ readonly note: OptionType<StringType>;
448
+ readonly min: FloatType;
449
+ readonly max: FloatType;
450
+ readonly hold: VariantType<{
451
+ readonly minutes: FloatType;
452
+ readonly hours: FloatType;
453
+ readonly days: FloatType;
454
+ readonly weeks: FloatType;
455
+ readonly months: FloatType;
456
+ }>;
457
+ readonly jobs: ArrayType<StructType<{
458
+ readonly label: StringType;
459
+ readonly start: DateTimeType;
460
+ readonly end: DateTimeType;
461
+ }>>;
462
+ }>;
463
+ readonly load: StructType<{
464
+ readonly resource: StringType;
465
+ readonly fill: FloatType;
466
+ readonly bins: IntegerType;
467
+ readonly hold: OptionType<StructType<{
468
+ readonly from: DateTimeType;
469
+ readonly to: DateTimeType;
470
+ }>>;
471
+ readonly state: VariantType<{
472
+ readonly free: NullType;
473
+ readonly loading: NullType;
474
+ readonly busy: NullType;
475
+ }>;
476
+ }>;
477
+ readonly after: FloatType;
478
+ readonly hold: StructType<{
479
+ readonly from: DateTimeType;
480
+ readonly to: DateTimeType;
481
+ }>;
482
+ readonly spare: OptionType<FloatType>;
483
+ readonly kindMates: BooleanType;
484
+ readonly otherMates: BooleanType;
485
+ readonly rules: StructType<{
486
+ readonly under: BooleanType;
487
+ }>;
488
+ readonly unit: StringType;
489
+ }>;
490
+ /** Type representing {@link AllocationCandidateType}. */
491
+ export type AllocationCandidateType = typeof AllocationCandidateType;
492
+ /** Why something does not fit — Schedule's, shared with the Roster. */
493
+ export declare const AllocationRefusalType: StructType<{
494
+ readonly group: StringType;
495
+ readonly reason: StringType;
496
+ readonly measure: VariantType<{
497
+ readonly none: NullType;
498
+ readonly amount: StructType<{
499
+ readonly lead: StringType;
500
+ readonly value: FloatType;
501
+ }>;
502
+ readonly day: StructType<{
503
+ readonly lead: StringType;
504
+ readonly at: DateTimeType;
505
+ }>;
506
+ }>;
507
+ }>;
508
+ /** Type representing {@link AllocationRefusalType}. */
509
+ export type AllocationRefusalType = typeof AllocationRefusalType;
510
+ /** One verdict of a fit — Schedule's, shared with the Roster. */
511
+ export declare const AllocationFitType: VariantType<{
512
+ readonly fits: StructType<{
513
+ readonly score: FloatType;
514
+ readonly why: StringType;
515
+ readonly warn: OptionType<StringType>;
516
+ }>;
517
+ readonly refused: StructType<{
518
+ readonly group: StringType;
519
+ readonly reason: StringType;
520
+ readonly measure: VariantType<{
521
+ readonly none: NullType;
522
+ readonly amount: StructType<{
523
+ readonly lead: StringType;
524
+ readonly value: FloatType;
525
+ }>;
526
+ readonly day: StructType<{
527
+ readonly lead: StringType;
528
+ readonly at: DateTimeType;
529
+ }>;
530
+ }>;
531
+ }>;
532
+ }>;
533
+ /** Type representing {@link AllocationFitType}. */
534
+ export type AllocationFitType = typeof AllocationFitType;
535
+ /**
536
+ * The question a fit answers.
537
+ *
538
+ * @property place - Where can this subject — a bin, or an arrival — go with this quantity: a verdict per resource
539
+ * @property take - What can this resource take: a verdict per bin, one per arrival the day has not booked, and one for reserving an empty slot on it
540
+ */
541
+ export declare const AllocationFitAskType: VariantType<{
542
+ readonly place: StructType<{
543
+ readonly subject: VariantType<{
544
+ readonly bin: StringType;
545
+ readonly arrival: StringType;
546
+ }>;
547
+ readonly quantity: FloatType;
548
+ }>;
549
+ readonly take: StructType<{
550
+ readonly resource: StringType;
551
+ }>;
552
+ }>;
553
+ /** Type representing {@link AllocationFitAskType}. */
554
+ export type AllocationFitAskType = typeof AllocationFitAskType;
555
+ /** A fit's request over the app's bin row type `R` — what {@link AllocationFitRequestTypeFor} constructs. */
556
+ export type AllocationFitRequestType<R extends EastType> = StructType<{
557
+ day: DateTimeType;
558
+ plan: AllocationDayType<R>;
559
+ ask: AllocationFitAskType;
560
+ context: AllocationContextType;
561
+ }>;
562
+ /**
563
+ * One question to the app's fit, about the drafted day.
564
+ *
565
+ * @typeParam R - The app's bin row type
566
+ * @param row - The app's bin row type
567
+ * @returns `StructType({ day, plan, ask, context })`
568
+ *
569
+ * @property day - The plan day
570
+ * @property plan - The day as drafted: each bin its roles and its own row
571
+ * @property ask - The question
572
+ * @property context - Every arrival and resource, and the board's configuration
573
+ */
574
+ export declare function AllocationFitRequestTypeFor<R extends EastType>(row: R): AllocationFitRequestType<R>;
575
+ /**
576
+ * A fit's answer. It echoes its question, so the board matches each answer to
577
+ * the question it asked.
578
+ *
579
+ * @property ask - The question answered
580
+ * @property resources - A place's verdicts, by resource
581
+ * @property bins - A take's verdicts, by bin
582
+ * @property arrivals - A take's verdicts for booking each arrival the day has not booked onto the resource, by arrival (the Table's arrival Chooser, a reservation's Book list)
583
+ * @property reserve - A take's verdict for reserving an empty slot
584
+ * @property basis - How the fits are ranked, in words (`ranked by load, kind and spare days`)
585
+ */
586
+ export declare const AllocationFitResultType: StructType<{
587
+ readonly ask: VariantType<{
588
+ readonly place: StructType<{
589
+ readonly subject: VariantType<{
590
+ readonly bin: StringType;
591
+ readonly arrival: StringType;
592
+ }>;
593
+ readonly quantity: FloatType;
594
+ }>;
595
+ readonly take: StructType<{
596
+ readonly resource: StringType;
597
+ }>;
598
+ }>;
599
+ readonly resources: DictType<StringType, VariantType<{
600
+ readonly fits: StructType<{
601
+ readonly score: FloatType;
602
+ readonly why: StringType;
603
+ readonly warn: OptionType<StringType>;
604
+ }>;
605
+ readonly refused: StructType<{
606
+ readonly group: StringType;
607
+ readonly reason: StringType;
608
+ readonly measure: VariantType<{
609
+ readonly none: NullType;
610
+ readonly amount: StructType<{
611
+ readonly lead: StringType;
612
+ readonly value: FloatType;
613
+ }>;
614
+ readonly day: StructType<{
615
+ readonly lead: StringType;
616
+ readonly at: DateTimeType;
617
+ }>;
618
+ }>;
619
+ }>;
620
+ }>>;
621
+ readonly bins: DictType<StringType, VariantType<{
622
+ readonly fits: StructType<{
623
+ readonly score: FloatType;
624
+ readonly why: StringType;
625
+ readonly warn: OptionType<StringType>;
626
+ }>;
627
+ readonly refused: StructType<{
628
+ readonly group: StringType;
629
+ readonly reason: StringType;
630
+ readonly measure: VariantType<{
631
+ readonly none: NullType;
632
+ readonly amount: StructType<{
633
+ readonly lead: StringType;
634
+ readonly value: FloatType;
635
+ }>;
636
+ readonly day: StructType<{
637
+ readonly lead: StringType;
638
+ readonly at: DateTimeType;
639
+ }>;
640
+ }>;
641
+ }>;
642
+ }>>;
643
+ readonly arrivals: DictType<StringType, VariantType<{
644
+ readonly fits: StructType<{
645
+ readonly score: FloatType;
646
+ readonly why: StringType;
647
+ readonly warn: OptionType<StringType>;
648
+ }>;
649
+ readonly refused: StructType<{
650
+ readonly group: StringType;
651
+ readonly reason: StringType;
652
+ readonly measure: VariantType<{
653
+ readonly none: NullType;
654
+ readonly amount: StructType<{
655
+ readonly lead: StringType;
656
+ readonly value: FloatType;
657
+ }>;
658
+ readonly day: StructType<{
659
+ readonly lead: StringType;
660
+ readonly at: DateTimeType;
661
+ }>;
662
+ }>;
663
+ }>;
664
+ }>>;
665
+ readonly reserve: OptionType<VariantType<{
666
+ readonly fits: StructType<{
667
+ readonly score: FloatType;
668
+ readonly why: StringType;
669
+ readonly warn: OptionType<StringType>;
670
+ }>;
671
+ readonly refused: StructType<{
672
+ readonly group: StringType;
673
+ readonly reason: StringType;
674
+ readonly measure: VariantType<{
675
+ readonly none: NullType;
676
+ readonly amount: StructType<{
677
+ readonly lead: StringType;
678
+ readonly value: FloatType;
679
+ }>;
680
+ readonly day: StructType<{
681
+ readonly lead: StringType;
682
+ readonly at: DateTimeType;
683
+ }>;
684
+ }>;
685
+ }>;
686
+ }>>;
687
+ readonly basis: StringType;
688
+ }>;
689
+ /** Type representing {@link AllocationFitResultType}. */
690
+ export type AllocationFitResultType = typeof AllocationFitResultType;
691
+ /**
692
+ * An issue's fix.
693
+ *
694
+ * @property choose - Choose a resource for the bin
695
+ * @property move - Open this bin's resource choices (`Move LD-2205…`)
696
+ * @property find - Find a fit for the bin's unallocated quantity
697
+ */
698
+ export declare const AllocationFixType: VariantType<{
699
+ readonly choose: NullType;
700
+ readonly move: StringType;
701
+ readonly find: NullType;
702
+ }>;
703
+ /** Type representing {@link AllocationFixType}. */
704
+ export type AllocationFixType = typeof AllocationFixType;
705
+ /**
706
+ * What an issue is about.
707
+ *
708
+ * @property unlinked - A bin with no resource
709
+ * @property unallocated - A bin whose parts leave some of it unallocated
710
+ * @property over - A resource over its maximum
711
+ * @property under - A resource under its minimum
712
+ * @property overlap - A resource whose hold runs into its next job
713
+ * @property custom - One of the app's, by its group's name (`Spec mismatch`)
714
+ */
715
+ export declare const AllocationIssueKindType: VariantType<{
716
+ readonly unlinked: NullType;
717
+ readonly unallocated: NullType;
718
+ readonly over: NullType;
719
+ readonly under: NullType;
720
+ readonly overlap: NullType;
721
+ readonly custom: StringType;
722
+ }>;
723
+ /** Type representing {@link AllocationIssueKindType}. */
724
+ export type AllocationIssueKindType = typeof AllocationIssueKindType;
725
+ /**
726
+ * One warning about the drafted day. Issues never block Save or Publish.
727
+ *
728
+ * @property kind - What it is about
729
+ * @property tone - Its tone; warning and danger issues are counted, neutral and info ones listed only
730
+ * @property title - Its title (`K-207`)
731
+ * @property detail - Its detail (`44 m³ · max 40 · 4 over · over max`)
732
+ * @property bin - The bin it is about, if any
733
+ * @property resource - The resource it is about, if any
734
+ * @property flag - A bin card's short mark (`≠ spec`)
735
+ * @property fix - Its fix
736
+ */
737
+ export declare const AllocationIssueType: StructType<{
738
+ readonly kind: VariantType<{
739
+ readonly unlinked: NullType;
740
+ readonly unallocated: NullType;
741
+ readonly over: NullType;
742
+ readonly under: NullType;
743
+ readonly overlap: NullType;
744
+ readonly custom: StringType;
745
+ }>;
746
+ readonly tone: VariantType<{
747
+ readonly success: NullType;
748
+ readonly warning: NullType;
749
+ readonly danger: NullType;
750
+ readonly info: NullType;
751
+ readonly neutral: NullType;
752
+ }>;
753
+ readonly title: StringType;
754
+ readonly detail: StringType;
755
+ readonly bin: OptionType<StringType>;
756
+ readonly resource: OptionType<StringType>;
757
+ readonly flag: OptionType<StringType>;
758
+ readonly fix: OptionType<VariantType<{
759
+ readonly choose: NullType;
760
+ readonly move: StringType;
761
+ readonly find: NullType;
762
+ }>>;
763
+ }>;
764
+ /** Type representing {@link AllocationIssueType}. */
765
+ export type AllocationIssueType = typeof AllocationIssueType;
766
+ /** The app's check's input over the app's bin row type `R` — what {@link AllocationCheckContextTypeFor} constructs. */
767
+ export type AllocationCheckContextType<R extends EastType> = StructType<{
768
+ day: DateTimeType;
769
+ plan: AllocationDayType<R>;
770
+ context: AllocationContextType;
771
+ loads: DictType<StringType, AllocationLoadType>;
772
+ }>;
773
+ /**
774
+ * What the app's `check` is given: the drafted day and every load.
775
+ *
776
+ * @typeParam R - The app's bin row type
777
+ * @param row - The app's bin row type
778
+ * @returns `StructType({ day, plan, context, loads })`
779
+ *
780
+ * @property day - The plan day
781
+ * @property plan - The day as drafted: each bin its roles and its own row, which the app's check reads
782
+ * @property context - Every arrival and resource
783
+ * @property loads - Every resource's load, by key
784
+ */
785
+ export declare function AllocationCheckContextTypeFor<R extends EastType>(row: R): AllocationCheckContextType<R>;
786
+ /**
787
+ * A slot's state.
788
+ *
789
+ * @property free - No bin is in it
790
+ * @property booked - A bin booking an arrival is in it
791
+ * @property reserved - Only reservations are in it
792
+ */
793
+ export declare const AllocationSlotStatusType: VariantType<{
794
+ readonly free: NullType;
795
+ readonly booked: NullType;
796
+ readonly reserved: NullType;
797
+ }>;
798
+ /** Type representing {@link AllocationSlotStatusType}. */
799
+ export type AllocationSlotStatusType = typeof AllocationSlotStatusType;
800
+ /**
801
+ * One lane slot of the plan day: a Table's row, or one per bin of its batch.
802
+ *
803
+ * @property lane - Its lane's key
804
+ * @property at - Its time: the slot's start and its lane's offset
805
+ * @property status - Free, booked or reserved
806
+ * @property bins - Its bins, by time
807
+ */
808
+ export declare const AllocationSlotType: StructType<{
809
+ readonly lane: StringType;
810
+ readonly at: DateTimeType;
811
+ readonly status: VariantType<{
812
+ readonly free: NullType;
813
+ readonly booked: NullType;
814
+ readonly reserved: NullType;
815
+ }>;
816
+ readonly bins: ArrayType<StringType>;
817
+ }>;
818
+ /** Type representing {@link AllocationSlotType}. */
819
+ export type AllocationSlotType = typeof AllocationSlotType;
820
+ /**
821
+ * The board's layout.
822
+ *
823
+ * @property timeline - Lanes, links and resources
824
+ * @property table - One row per slot
825
+ */
826
+ export declare const AllocationLayoutType: VariantType<{
827
+ readonly timeline: NullType;
828
+ readonly table: NullType;
829
+ }>;
830
+ /** Type representing {@link AllocationLayoutType}. */
831
+ export type AllocationLayoutType = typeof AllocationLayoutType;
832
+ //# sourceMappingURL=types.d.ts.map