@synnaxlabs/client 0.55.0 → 0.56.1

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 (197) hide show
  1. package/.turbo/turbo-build.log +10 -13
  2. package/dist/client.cjs +60 -36
  3. package/dist/client.js +6435 -4786
  4. package/dist/src/access/policy/client.d.ts +70 -80
  5. package/dist/src/access/policy/client.d.ts.map +1 -1
  6. package/dist/src/access/policy/types.gen.d.ts +18 -20
  7. package/dist/src/access/policy/types.gen.d.ts.map +1 -1
  8. package/dist/src/access/role/client.d.ts.map +1 -1
  9. package/dist/src/access/role/types.gen.d.ts +2 -2
  10. package/dist/src/actions/actions.d.ts +68 -0
  11. package/dist/src/actions/actions.d.ts.map +1 -0
  12. package/dist/src/actions/actions.spec.d.ts +2 -0
  13. package/dist/src/actions/actions.spec.d.ts.map +1 -0
  14. package/dist/src/actions/external.d.ts +2 -0
  15. package/dist/src/actions/external.d.ts.map +1 -0
  16. package/dist/src/actions/index.d.ts +2 -0
  17. package/dist/src/actions/index.d.ts.map +1 -0
  18. package/dist/src/arc/client.d.ts.map +1 -1
  19. package/dist/src/arc/compiler/types.gen.d.ts +1 -1
  20. package/dist/src/arc/compiler/types.gen.d.ts.map +1 -1
  21. package/dist/src/arc/graph/types.gen.d.ts +29 -29
  22. package/dist/src/arc/graph/types.gen.d.ts.map +1 -1
  23. package/dist/src/arc/ir/types.gen.d.ts +123 -123
  24. package/dist/src/arc/ir/types.gen.d.ts.map +1 -1
  25. package/dist/src/arc/module/types.gen.d.ts +45 -45
  26. package/dist/src/arc/program/types.gen.d.ts +45 -45
  27. package/dist/src/arc/types/types.gen.d.ts +11 -11
  28. package/dist/src/arc/types/types.gen.d.ts.map +1 -1
  29. package/dist/src/arc/types.gen.d.ts +99 -99
  30. package/dist/src/auth/auth.d.ts +3 -3
  31. package/dist/src/auth/auth.d.ts.map +1 -1
  32. package/dist/src/channel/client.d.ts +2 -2
  33. package/dist/src/channel/client.d.ts.map +1 -1
  34. package/dist/src/channel/retriever.d.ts +5 -8
  35. package/dist/src/channel/retriever.d.ts.map +1 -1
  36. package/dist/src/channel/types.gen.d.ts +3 -3
  37. package/dist/src/channel/writer.d.ts.map +1 -1
  38. package/dist/src/connection/checker.d.ts +1 -1
  39. package/dist/src/connection/checker.d.ts.map +1 -1
  40. package/dist/src/device/client.d.ts.map +1 -1
  41. package/dist/src/device/types.gen.d.ts +6 -8
  42. package/dist/src/device/types.gen.d.ts.map +1 -1
  43. package/dist/src/errors.d.ts +2 -0
  44. package/dist/src/errors.d.ts.map +1 -1
  45. package/dist/src/framer/adapter.d.ts.map +1 -1
  46. package/dist/src/framer/client.d.ts +2 -2
  47. package/dist/src/framer/codec.d.ts +9 -1
  48. package/dist/src/framer/codec.d.ts.map +1 -1
  49. package/dist/src/framer/deleter.d.ts.map +1 -1
  50. package/dist/src/framer/frame.d.ts +1 -1
  51. package/dist/src/framer/iterator.d.ts +84 -3
  52. package/dist/src/framer/iterator.d.ts.map +1 -1
  53. package/dist/src/framer/streamProxy.d.ts.map +1 -1
  54. package/dist/src/framer/streamer.d.ts +1 -3
  55. package/dist/src/framer/streamer.d.ts.map +1 -1
  56. package/dist/src/framer/types.gen.d.ts +18 -0
  57. package/dist/src/framer/types.gen.d.ts.map +1 -1
  58. package/dist/src/framer/writer.d.ts +8 -8
  59. package/dist/src/framer/writer.d.ts.map +1 -1
  60. package/dist/src/group/client.d.ts +1 -2
  61. package/dist/src/group/client.d.ts.map +1 -1
  62. package/dist/src/group/types.gen.d.ts +2 -2
  63. package/dist/src/index.d.ts +2 -1
  64. package/dist/src/index.d.ts.map +1 -1
  65. package/dist/src/label/client.d.ts +5 -8
  66. package/dist/src/label/client.d.ts.map +1 -1
  67. package/dist/src/lineplot/client.d.ts.map +1 -1
  68. package/dist/src/lineplot/types.gen.d.ts +2 -2
  69. package/dist/src/log/client.d.ts.map +1 -1
  70. package/dist/src/log/types.gen.d.ts +2 -2
  71. package/dist/src/ontology/client.d.ts +1 -3
  72. package/dist/src/ontology/client.d.ts.map +1 -1
  73. package/dist/src/ontology/payload.d.ts +12 -16
  74. package/dist/src/ontology/payload.d.ts.map +1 -1
  75. package/dist/src/ontology/types.gen.d.ts +1 -2
  76. package/dist/src/ontology/types.gen.d.ts.map +1 -1
  77. package/dist/src/ontology/writer.d.ts +5 -10
  78. package/dist/src/ontology/writer.d.ts.map +1 -1
  79. package/dist/src/rack/client.d.ts.map +1 -1
  80. package/dist/src/rack/types.gen.d.ts +3 -3
  81. package/dist/src/ranger/alias/client.d.ts.map +1 -1
  82. package/dist/src/ranger/client.d.ts.map +1 -1
  83. package/dist/src/ranger/kv/client.d.ts.map +1 -1
  84. package/dist/src/ranger/types.gen.d.ts +6 -6
  85. package/dist/src/ranger/types.gen.d.ts.map +1 -1
  86. package/dist/src/ranger/writer.d.ts +2 -3
  87. package/dist/src/ranger/writer.d.ts.map +1 -1
  88. package/dist/src/schematic/actions.d.ts +147 -0
  89. package/dist/src/schematic/actions.d.ts.map +1 -0
  90. package/dist/src/schematic/actions.gen.d.ts +484 -0
  91. package/dist/src/schematic/actions.gen.d.ts.map +1 -0
  92. package/dist/src/schematic/actions.spec.d.ts +2 -0
  93. package/dist/src/schematic/actions.spec.d.ts.map +1 -0
  94. package/dist/src/schematic/client.d.ts +53 -2
  95. package/dist/src/schematic/client.d.ts.map +1 -1
  96. package/dist/src/schematic/external.d.ts +2 -0
  97. package/dist/src/schematic/external.d.ts.map +1 -1
  98. package/dist/src/schematic/symbol/client.d.ts.map +1 -1
  99. package/dist/src/schematic/symbol/types.gen.d.ts +48 -58
  100. package/dist/src/schematic/symbol/types.gen.d.ts.map +1 -1
  101. package/dist/src/schematic/types.gen.d.ts +131 -5
  102. package/dist/src/schematic/types.gen.d.ts.map +1 -1
  103. package/dist/src/status/client.d.ts.map +1 -1
  104. package/dist/src/status/payload.d.ts +3 -3
  105. package/dist/src/table/actions.d.ts +156 -0
  106. package/dist/src/table/actions.d.ts.map +1 -0
  107. package/dist/src/table/actions.gen.d.ts +587 -0
  108. package/dist/src/table/actions.gen.d.ts.map +1 -0
  109. package/dist/src/table/client.d.ts +28 -2
  110. package/dist/src/table/client.d.ts.map +1 -1
  111. package/dist/src/table/external.d.ts +2 -0
  112. package/dist/src/table/external.d.ts.map +1 -1
  113. package/dist/src/table/types.gen.d.ts +71 -4
  114. package/dist/src/table/types.gen.d.ts.map +1 -1
  115. package/dist/src/task/client.d.ts.map +1 -1
  116. package/dist/src/task/types.gen.d.ts +7 -7
  117. package/dist/src/task/types.gen.d.ts.map +1 -1
  118. package/dist/src/user/client.d.ts +2 -2
  119. package/dist/src/user/client.d.ts.map +1 -1
  120. package/dist/src/user/types.gen.d.ts +2 -2
  121. package/dist/src/view/client.d.ts.map +1 -1
  122. package/dist/src/view/types.gen.d.ts +2 -2
  123. package/dist/src/workspace/client.d.ts.map +1 -1
  124. package/dist/src/workspace/types.gen.d.ts +3 -3
  125. package/dist/src/workspace/types.gen.d.ts.map +1 -1
  126. package/package.json +12 -11
  127. package/src/access/policy/client.ts +4 -7
  128. package/src/access/role/client.ts +6 -26
  129. package/src/actions/actions.spec.ts +229 -0
  130. package/src/actions/actions.ts +104 -0
  131. package/src/actions/external.ts +10 -0
  132. package/src/actions/index.ts +10 -0
  133. package/src/arc/client.ts +3 -7
  134. package/src/arc/compiler/types.gen.ts +2 -1
  135. package/src/arc/ir/types.gen.ts +2 -2
  136. package/src/arc/lsp.spec.ts +3 -7
  137. package/src/arc/types/types.gen.ts +3 -3
  138. package/src/auth/auth.spec.ts +12 -13
  139. package/src/auth/auth.ts +36 -34
  140. package/src/channel/batchRetriever.spec.ts +13 -4
  141. package/src/channel/client.ts +8 -6
  142. package/src/channel/retriever.ts +7 -16
  143. package/src/channel/writer.ts +4 -20
  144. package/src/connection/checker.ts +6 -6
  145. package/src/connection/connection.spec.ts +5 -8
  146. package/src/device/client.ts +5 -8
  147. package/src/device/types.gen.ts +4 -4
  148. package/src/errors.ts +9 -9
  149. package/src/framer/adapter.ts +2 -4
  150. package/src/framer/client.ts +1 -1
  151. package/src/framer/codec.spec.ts +53 -3
  152. package/src/framer/codec.ts +58 -25
  153. package/src/framer/deleter.ts +2 -8
  154. package/src/framer/iterator.ts +43 -40
  155. package/src/framer/streamProxy.ts +13 -13
  156. package/src/framer/streamer.spec.ts +12 -3
  157. package/src/framer/streamer.ts +7 -12
  158. package/src/framer/types.gen.ts +20 -0
  159. package/src/framer/writer.spec.ts +77 -0
  160. package/src/framer/writer.ts +51 -28
  161. package/src/group/client.ts +4 -7
  162. package/src/index.ts +3 -2
  163. package/src/label/client.ts +6 -16
  164. package/src/lineplot/client.ts +6 -21
  165. package/src/log/client.ts +6 -21
  166. package/src/ontology/client.ts +3 -4
  167. package/src/ontology/types.gen.ts +0 -1
  168. package/src/ontology/writer.ts +4 -7
  169. package/src/rack/client.ts +4 -7
  170. package/src/ranger/alias/client.ts +6 -11
  171. package/src/ranger/client.ts +3 -4
  172. package/src/ranger/kv/client.ts +5 -8
  173. package/src/ranger/writer.ts +4 -17
  174. package/src/schematic/access.spec.ts +6 -6
  175. package/src/schematic/actions.gen.ts +200 -0
  176. package/src/schematic/actions.spec.ts +699 -0
  177. package/src/schematic/actions.ts +168 -0
  178. package/src/schematic/client.ts +34 -30
  179. package/src/schematic/external.ts +2 -0
  180. package/src/schematic/schematic.spec.ts +233 -69
  181. package/src/schematic/symbol/client.ts +6 -11
  182. package/src/schematic/symbol/types.gen.ts +1 -10
  183. package/src/schematic/types.gen.ts +55 -6
  184. package/src/status/client.ts +4 -10
  185. package/src/table/access.spec.ts +0 -6
  186. package/src/table/actions.gen.ts +243 -0
  187. package/src/table/actions.ts +255 -0
  188. package/src/table/client.ts +21 -25
  189. package/src/table/external.ts +2 -0
  190. package/src/table/table.spec.ts +588 -43
  191. package/src/table/types.gen.ts +58 -5
  192. package/src/task/client.ts +7 -11
  193. package/src/task/types.gen.ts +8 -6
  194. package/src/user/client.ts +6 -11
  195. package/src/view/client.ts +4 -7
  196. package/src/workspace/client.ts +6 -16
  197. package/src/workspace/types.gen.ts +2 -1
@@ -0,0 +1,587 @@
1
+ import { Draft } from 'immer';
2
+ import { z } from 'zod';
3
+ import { actions } from '../actions';
4
+ import { Table } from './types.gen';
5
+ /** Rename renames the table. */
6
+ export declare const renamePayloadZ: z.ZodObject<{
7
+ name: z.ZodString;
8
+ }, z.core.$strip>;
9
+ export type RenamePayload = z.infer<typeof renamePayloadZ>;
10
+ /**
11
+ * AddRow inserts a row at the given index. Three flows:
12
+ *
13
+ * 1. User gesture with cell_template against a non-empty table:
14
+ * replicate the template once per existing column.
15
+ * 2. User gesture with cell_template against a fully-empty table:
16
+ * seed a 1x1 grid (one template replica plus one default-sized
17
+ * column).
18
+ * 3. Undo replay of RemoveRow (cell_template is null, cells is
19
+ * non-empty): use cells as-is. If the original RemoveRow had
20
+ * stripped the table down to no columns, the explicit cells
21
+ * trigger the same column-bootstrap as flow 2.
22
+ *
23
+ * Derived replica keys come from the template's key with the last
24
+ * four hex digits replaced by the column index. Out-of-range
25
+ * indices clamp to the end.
26
+ */
27
+ export declare const addRowPayloadZ: z.ZodObject<{
28
+ index: z.ZodUInt32;
29
+ size: z.ZodNumber;
30
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
31
+ key: string;
32
+ variant: string;
33
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
34
+ }[], null>>, z.ZodArray<z.ZodObject<{
35
+ key: z.ZodString;
36
+ variant: z.ZodString;
37
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
38
+ }, z.core.$strip>>]>>;
39
+ cellTemplate: z.ZodOptional<z.ZodObject<{
40
+ key: z.ZodString;
41
+ variant: z.ZodString;
42
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>;
45
+ export type AddRowPayload = z.infer<typeof addRowPayloadZ>;
46
+ /**
47
+ * RemoveRow removes the row at the given index. All cells referenced by the
48
+ * removed row are also dropped from the cells map. No-op if the
49
+ * index is out of range.
50
+ */
51
+ export declare const removeRowPayloadZ: z.ZodObject<{
52
+ index: z.ZodUInt32;
53
+ }, z.core.$strip>;
54
+ export type RemoveRowPayload = z.infer<typeof removeRowPayloadZ>;
55
+ /**
56
+ * AddCol inserts a column at the given index. Three flows:
57
+ *
58
+ * 1. User gesture with cell_template against a non-empty table:
59
+ * replicate the template once per existing row.
60
+ * 2. User gesture with cell_template against a fully-empty table:
61
+ * seed a 1x1 grid (one template replica plus one default-sized
62
+ * row).
63
+ * 3. Undo replay of RemoveCol (cell_template is null, cells is
64
+ * non-empty): use cells as-is. If the original RemoveCol had
65
+ * stripped the table down to no rows, the explicit cells
66
+ * trigger the same row-bootstrap as flow 2.
67
+ *
68
+ * Derived replica keys come from the template's key with the last
69
+ * four hex digits replaced by the row index. Cells whose row
70
+ * index exceeds the row count are added to the cells map but not
71
+ * referenced by any row. Out-of-range indices clamp to the end of
72
+ * every row's cells list.
73
+ */
74
+ export declare const addColPayloadZ: z.ZodObject<{
75
+ index: z.ZodUInt32;
76
+ size: z.ZodNumber;
77
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
78
+ key: string;
79
+ variant: string;
80
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
81
+ }[], null>>, z.ZodArray<z.ZodObject<{
82
+ key: z.ZodString;
83
+ variant: z.ZodString;
84
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
85
+ }, z.core.$strip>>]>>;
86
+ cellTemplate: z.ZodOptional<z.ZodObject<{
87
+ key: z.ZodString;
88
+ variant: z.ZodString;
89
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
90
+ }, z.core.$strip>>;
91
+ }, z.core.$strip>;
92
+ export type AddColPayload = z.infer<typeof addColPayloadZ>;
93
+ /**
94
+ * RemoveCol removes the column at the given index. All cells in that column
95
+ * (across every row) are dropped from the cells map. No-op if the
96
+ * index is out of range.
97
+ */
98
+ export declare const removeColPayloadZ: z.ZodObject<{
99
+ index: z.ZodUInt32;
100
+ }, z.core.$strip>;
101
+ export type RemoveColPayload = z.infer<typeof removeColPayloadZ>;
102
+ /** ResizeRow resizes the row at the given index. No-op if the index is out of range. */
103
+ export declare const resizeRowPayloadZ: z.ZodObject<{
104
+ index: z.ZodUInt32;
105
+ size: z.ZodNumber;
106
+ }, z.core.$strip>;
107
+ export type ResizeRowPayload = z.infer<typeof resizeRowPayloadZ>;
108
+ /** ResizeCol resizes the column at the given index. No-op if the index is out of range. */
109
+ export declare const resizeColPayloadZ: z.ZodObject<{
110
+ index: z.ZodUInt32;
111
+ size: z.ZodNumber;
112
+ }, z.core.$strip>;
113
+ export type ResizeColPayload = z.infer<typeof resizeColPayloadZ>;
114
+ /**
115
+ * SetCell replaces the cell at cell.key with the provided value. No-op if
116
+ * no cell with that key exists in the table.
117
+ */
118
+ export declare const setCellPayloadZ: z.ZodObject<{
119
+ cell: z.ZodObject<{
120
+ key: z.ZodString;
121
+ variant: z.ZodString;
122
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
123
+ }, z.core.$strip>;
124
+ }, z.core.$strip>;
125
+ export type SetCellPayload = z.infer<typeof setCellPayloadZ>;
126
+ /**
127
+ * EraseCells erases the cells whose keys are in cells. Any row whose every
128
+ * cell is in the selection is removed entirely; same for columns.
129
+ * Cells that survive that row/column removal have their variant
130
+ * and props replaced with the template's, keeping their original
131
+ * keys. Cells in the selection whose keys are not in the table's
132
+ * cells map are silently skipped.
133
+ */
134
+ export declare const eraseCellsPayloadZ: z.ZodObject<{
135
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<string[], null>>, z.ZodArray<z.ZodString>]>>;
136
+ template: z.ZodObject<{
137
+ variant: z.ZodString;
138
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
139
+ }, z.core.$strip>;
140
+ }, z.core.$strip>;
141
+ export type EraseCellsPayload = z.infer<typeof eraseCellsPayloadZ>;
142
+ export declare const actionZ: z.ZodDiscriminatedUnion<[z.ZodObject<{
143
+ type: z.ZodLiteral<"rename">;
144
+ rename: z.ZodObject<{
145
+ name: z.ZodString;
146
+ }, z.core.$strip>;
147
+ }, z.core.$strip>, z.ZodObject<{
148
+ type: z.ZodLiteral<"add_row">;
149
+ addRow: z.ZodObject<{
150
+ index: z.ZodUInt32;
151
+ size: z.ZodNumber;
152
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
153
+ key: string;
154
+ variant: string;
155
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
156
+ }[], null>>, z.ZodArray<z.ZodObject<{
157
+ key: z.ZodString;
158
+ variant: z.ZodString;
159
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
160
+ }, z.core.$strip>>]>>;
161
+ cellTemplate: z.ZodOptional<z.ZodObject<{
162
+ key: z.ZodString;
163
+ variant: z.ZodString;
164
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
165
+ }, z.core.$strip>>;
166
+ }, z.core.$strip>;
167
+ }, z.core.$strip>, z.ZodObject<{
168
+ type: z.ZodLiteral<"remove_row">;
169
+ removeRow: z.ZodObject<{
170
+ index: z.ZodUInt32;
171
+ }, z.core.$strip>;
172
+ }, z.core.$strip>, z.ZodObject<{
173
+ type: z.ZodLiteral<"add_col">;
174
+ addCol: z.ZodObject<{
175
+ index: z.ZodUInt32;
176
+ size: z.ZodNumber;
177
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
178
+ key: string;
179
+ variant: string;
180
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
181
+ }[], null>>, z.ZodArray<z.ZodObject<{
182
+ key: z.ZodString;
183
+ variant: z.ZodString;
184
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
185
+ }, z.core.$strip>>]>>;
186
+ cellTemplate: z.ZodOptional<z.ZodObject<{
187
+ key: z.ZodString;
188
+ variant: z.ZodString;
189
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
190
+ }, z.core.$strip>>;
191
+ }, z.core.$strip>;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ type: z.ZodLiteral<"remove_col">;
194
+ removeCol: z.ZodObject<{
195
+ index: z.ZodUInt32;
196
+ }, z.core.$strip>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ type: z.ZodLiteral<"resize_row">;
199
+ resizeRow: z.ZodObject<{
200
+ index: z.ZodUInt32;
201
+ size: z.ZodNumber;
202
+ }, z.core.$strip>;
203
+ }, z.core.$strip>, z.ZodObject<{
204
+ type: z.ZodLiteral<"resize_col">;
205
+ resizeCol: z.ZodObject<{
206
+ index: z.ZodUInt32;
207
+ size: z.ZodNumber;
208
+ }, z.core.$strip>;
209
+ }, z.core.$strip>, z.ZodObject<{
210
+ type: z.ZodLiteral<"set_cell">;
211
+ setCell: z.ZodObject<{
212
+ cell: z.ZodObject<{
213
+ key: z.ZodString;
214
+ variant: z.ZodString;
215
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
216
+ }, z.core.$strip>;
217
+ }, z.core.$strip>;
218
+ }, z.core.$strip>, z.ZodObject<{
219
+ type: z.ZodLiteral<"erase_cells">;
220
+ eraseCells: z.ZodObject<{
221
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<string[], null>>, z.ZodArray<z.ZodString>]>>;
222
+ template: z.ZodObject<{
223
+ variant: z.ZodString;
224
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
225
+ }, z.core.$strip>;
226
+ }, z.core.$strip>;
227
+ }, z.core.$strip>], "type">;
228
+ export type Action = z.infer<typeof actionZ>;
229
+ export declare const rename: (payload: RenamePayload) => Action;
230
+ export declare const addRow: (payload: AddRowPayload) => Action;
231
+ export declare const removeRow: (payload: RemoveRowPayload) => Action;
232
+ export declare const addCol: (payload: AddColPayload) => Action;
233
+ export declare const removeCol: (payload: RemoveColPayload) => Action;
234
+ export declare const resizeRow: (payload: ResizeRowPayload) => Action;
235
+ export declare const resizeCol: (payload: ResizeColPayload) => Action;
236
+ export declare const setCell: (payload: SetCellPayload) => Action;
237
+ export declare const eraseCells: (payload: EraseCellsPayload) => Action;
238
+ export type HandlerResult = actions.HandlerResult<Action>;
239
+ export type ReduceAllResult = actions.ReduceAllResult<Table, Action>;
240
+ export interface Handlers {
241
+ rename: (state: Draft<Table>, payload: RenamePayload) => HandlerResult;
242
+ addRow: (state: Draft<Table>, payload: AddRowPayload) => HandlerResult;
243
+ removeRow: (state: Draft<Table>, payload: RemoveRowPayload) => HandlerResult;
244
+ addCol: (state: Draft<Table>, payload: AddColPayload) => HandlerResult;
245
+ removeCol: (state: Draft<Table>, payload: RemoveColPayload) => HandlerResult;
246
+ resizeRow: (state: Draft<Table>, payload: ResizeRowPayload) => HandlerResult;
247
+ resizeCol: (state: Draft<Table>, payload: ResizeColPayload) => HandlerResult;
248
+ setCell: (state: Draft<Table>, payload: SetCellPayload) => HandlerResult;
249
+ eraseCells: (state: Draft<Table>, payload: EraseCellsPayload) => HandlerResult;
250
+ }
251
+ export declare const createReduceAll: (handlers: Handlers) => (state: Table, actions: ({
252
+ type: "rename";
253
+ rename: {
254
+ name: string;
255
+ };
256
+ } | {
257
+ type: "add_row";
258
+ addRow: {
259
+ index: number;
260
+ size: number;
261
+ cells: {
262
+ key: string;
263
+ variant: string;
264
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
265
+ }[];
266
+ cellTemplate?: {
267
+ key: string;
268
+ variant: string;
269
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
270
+ } | undefined;
271
+ };
272
+ } | {
273
+ type: "remove_row";
274
+ removeRow: {
275
+ index: number;
276
+ };
277
+ } | {
278
+ type: "add_col";
279
+ addCol: {
280
+ index: number;
281
+ size: number;
282
+ cells: {
283
+ key: string;
284
+ variant: string;
285
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
286
+ }[];
287
+ cellTemplate?: {
288
+ key: string;
289
+ variant: string;
290
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
291
+ } | undefined;
292
+ };
293
+ } | {
294
+ type: "remove_col";
295
+ removeCol: {
296
+ index: number;
297
+ };
298
+ } | {
299
+ type: "resize_row";
300
+ resizeRow: {
301
+ index: number;
302
+ size: number;
303
+ };
304
+ } | {
305
+ type: "resize_col";
306
+ resizeCol: {
307
+ index: number;
308
+ size: number;
309
+ };
310
+ } | {
311
+ type: "set_cell";
312
+ setCell: {
313
+ cell: {
314
+ key: string;
315
+ variant: string;
316
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
317
+ };
318
+ };
319
+ } | {
320
+ type: "erase_cells";
321
+ eraseCells: {
322
+ cells: string[];
323
+ template: {
324
+ variant: string;
325
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
326
+ };
327
+ };
328
+ })[]) => actions.ReduceAllResult<Table, {
329
+ type: "rename";
330
+ rename: {
331
+ name: string;
332
+ };
333
+ } | {
334
+ type: "add_row";
335
+ addRow: {
336
+ index: number;
337
+ size: number;
338
+ cells: {
339
+ key: string;
340
+ variant: string;
341
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
342
+ }[];
343
+ cellTemplate?: {
344
+ key: string;
345
+ variant: string;
346
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
347
+ } | undefined;
348
+ };
349
+ } | {
350
+ type: "remove_row";
351
+ removeRow: {
352
+ index: number;
353
+ };
354
+ } | {
355
+ type: "add_col";
356
+ addCol: {
357
+ index: number;
358
+ size: number;
359
+ cells: {
360
+ key: string;
361
+ variant: string;
362
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
363
+ }[];
364
+ cellTemplate?: {
365
+ key: string;
366
+ variant: string;
367
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
368
+ } | undefined;
369
+ };
370
+ } | {
371
+ type: "remove_col";
372
+ removeCol: {
373
+ index: number;
374
+ };
375
+ } | {
376
+ type: "resize_row";
377
+ resizeRow: {
378
+ index: number;
379
+ size: number;
380
+ };
381
+ } | {
382
+ type: "resize_col";
383
+ resizeCol: {
384
+ index: number;
385
+ size: number;
386
+ };
387
+ } | {
388
+ type: "set_cell";
389
+ setCell: {
390
+ cell: {
391
+ key: string;
392
+ variant: string;
393
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
394
+ };
395
+ };
396
+ } | {
397
+ type: "erase_cells";
398
+ eraseCells: {
399
+ cells: string[];
400
+ template: {
401
+ variant: string;
402
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
403
+ };
404
+ };
405
+ }>;
406
+ export declare const scopedActionZ: z.ZodObject<{
407
+ key: z.ZodUUID;
408
+ dispatchKey: z.ZodString;
409
+ seq: z.ZodDefault<z.ZodNumber>;
410
+ actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
411
+ type: z.ZodLiteral<"rename">;
412
+ rename: z.ZodObject<{
413
+ name: z.ZodString;
414
+ }, z.core.$strip>;
415
+ }, z.core.$strip>, z.ZodObject<{
416
+ type: z.ZodLiteral<"add_row">;
417
+ addRow: z.ZodObject<{
418
+ index: z.ZodUInt32;
419
+ size: z.ZodNumber;
420
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
421
+ key: string;
422
+ variant: string;
423
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
424
+ }[], null>>, z.ZodArray<z.ZodObject<{
425
+ key: z.ZodString;
426
+ variant: z.ZodString;
427
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
428
+ }, z.core.$strip>>]>>;
429
+ cellTemplate: z.ZodOptional<z.ZodObject<{
430
+ key: z.ZodString;
431
+ variant: z.ZodString;
432
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
433
+ }, z.core.$strip>>;
434
+ }, z.core.$strip>;
435
+ }, z.core.$strip>, z.ZodObject<{
436
+ type: z.ZodLiteral<"remove_row">;
437
+ removeRow: z.ZodObject<{
438
+ index: z.ZodUInt32;
439
+ }, z.core.$strip>;
440
+ }, z.core.$strip>, z.ZodObject<{
441
+ type: z.ZodLiteral<"add_col">;
442
+ addCol: z.ZodObject<{
443
+ index: z.ZodUInt32;
444
+ size: z.ZodNumber;
445
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
446
+ key: string;
447
+ variant: string;
448
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
449
+ }[], null>>, z.ZodArray<z.ZodObject<{
450
+ key: z.ZodString;
451
+ variant: z.ZodString;
452
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
453
+ }, z.core.$strip>>]>>;
454
+ cellTemplate: z.ZodOptional<z.ZodObject<{
455
+ key: z.ZodString;
456
+ variant: z.ZodString;
457
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
458
+ }, z.core.$strip>>;
459
+ }, z.core.$strip>;
460
+ }, z.core.$strip>, z.ZodObject<{
461
+ type: z.ZodLiteral<"remove_col">;
462
+ removeCol: z.ZodObject<{
463
+ index: z.ZodUInt32;
464
+ }, z.core.$strip>;
465
+ }, z.core.$strip>, z.ZodObject<{
466
+ type: z.ZodLiteral<"resize_row">;
467
+ resizeRow: z.ZodObject<{
468
+ index: z.ZodUInt32;
469
+ size: z.ZodNumber;
470
+ }, z.core.$strip>;
471
+ }, z.core.$strip>, z.ZodObject<{
472
+ type: z.ZodLiteral<"resize_col">;
473
+ resizeCol: z.ZodObject<{
474
+ index: z.ZodUInt32;
475
+ size: z.ZodNumber;
476
+ }, z.core.$strip>;
477
+ }, z.core.$strip>, z.ZodObject<{
478
+ type: z.ZodLiteral<"set_cell">;
479
+ setCell: z.ZodObject<{
480
+ cell: z.ZodObject<{
481
+ key: z.ZodString;
482
+ variant: z.ZodString;
483
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
484
+ }, z.core.$strip>;
485
+ }, z.core.$strip>;
486
+ }, z.core.$strip>, z.ZodObject<{
487
+ type: z.ZodLiteral<"erase_cells">;
488
+ eraseCells: z.ZodObject<{
489
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<string[], null>>, z.ZodArray<z.ZodString>]>>;
490
+ template: z.ZodObject<{
491
+ variant: z.ZodString;
492
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
493
+ }, z.core.$strip>;
494
+ }, z.core.$strip>;
495
+ }, z.core.$strip>], "type">>;
496
+ }, z.core.$strip>;
497
+ export declare const dispatchReqZ: z.ZodObject<{
498
+ key: z.ZodUUID;
499
+ dispatchKey: z.ZodString;
500
+ actions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
501
+ type: z.ZodLiteral<"rename">;
502
+ rename: z.ZodObject<{
503
+ name: z.ZodString;
504
+ }, z.core.$strip>;
505
+ }, z.core.$strip>, z.ZodObject<{
506
+ type: z.ZodLiteral<"add_row">;
507
+ addRow: z.ZodObject<{
508
+ index: z.ZodUInt32;
509
+ size: z.ZodNumber;
510
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
511
+ key: string;
512
+ variant: string;
513
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
514
+ }[], null>>, z.ZodArray<z.ZodObject<{
515
+ key: z.ZodString;
516
+ variant: z.ZodString;
517
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
518
+ }, z.core.$strip>>]>>;
519
+ cellTemplate: z.ZodOptional<z.ZodObject<{
520
+ key: z.ZodString;
521
+ variant: z.ZodString;
522
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
523
+ }, z.core.$strip>>;
524
+ }, z.core.$strip>;
525
+ }, z.core.$strip>, z.ZodObject<{
526
+ type: z.ZodLiteral<"remove_row">;
527
+ removeRow: z.ZodObject<{
528
+ index: z.ZodUInt32;
529
+ }, z.core.$strip>;
530
+ }, z.core.$strip>, z.ZodObject<{
531
+ type: z.ZodLiteral<"add_col">;
532
+ addCol: z.ZodObject<{
533
+ index: z.ZodUInt32;
534
+ size: z.ZodNumber;
535
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
536
+ key: string;
537
+ variant: string;
538
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
539
+ }[], null>>, z.ZodArray<z.ZodObject<{
540
+ key: z.ZodString;
541
+ variant: z.ZodString;
542
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
543
+ }, z.core.$strip>>]>>;
544
+ cellTemplate: z.ZodOptional<z.ZodObject<{
545
+ key: z.ZodString;
546
+ variant: z.ZodString;
547
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
548
+ }, z.core.$strip>>;
549
+ }, z.core.$strip>;
550
+ }, z.core.$strip>, z.ZodObject<{
551
+ type: z.ZodLiteral<"remove_col">;
552
+ removeCol: z.ZodObject<{
553
+ index: z.ZodUInt32;
554
+ }, z.core.$strip>;
555
+ }, z.core.$strip>, z.ZodObject<{
556
+ type: z.ZodLiteral<"resize_row">;
557
+ resizeRow: z.ZodObject<{
558
+ index: z.ZodUInt32;
559
+ size: z.ZodNumber;
560
+ }, z.core.$strip>;
561
+ }, z.core.$strip>, z.ZodObject<{
562
+ type: z.ZodLiteral<"resize_col">;
563
+ resizeCol: z.ZodObject<{
564
+ index: z.ZodUInt32;
565
+ size: z.ZodNumber;
566
+ }, z.core.$strip>;
567
+ }, z.core.$strip>, z.ZodObject<{
568
+ type: z.ZodLiteral<"set_cell">;
569
+ setCell: z.ZodObject<{
570
+ cell: z.ZodObject<{
571
+ key: z.ZodString;
572
+ variant: z.ZodString;
573
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
574
+ }, z.core.$strip>;
575
+ }, z.core.$strip>;
576
+ }, z.core.$strip>, z.ZodObject<{
577
+ type: z.ZodLiteral<"erase_cells">;
578
+ eraseCells: z.ZodObject<{
579
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<string[], null>>, z.ZodArray<z.ZodString>]>>;
580
+ template: z.ZodObject<{
581
+ variant: z.ZodString;
582
+ props: z.ZodType<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown, z.core.$ZodTypeInternals<import('@synnaxlabs/x/dist/src/record/record').Unknown, unknown>>;
583
+ }, z.core.$strip>;
584
+ }, z.core.$strip>;
585
+ }, z.core.$strip>], "type">>;
586
+ }, z.core.$strip>;
587
+ //# sourceMappingURL=actions.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"actions.gen.d.ts","sourceRoot":"","sources":["../../../src/table/actions.gen.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAA8B,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE3E,gCAAgC;AAChC,eAAO,MAAM,cAAc;;iBAEzB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE3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@synnaxlabs/x';
3
2
  import { z } from 'zod';
3
+ import { Action } from './actions.gen';
4
4
  import { Key, New, Table } from './types.gen';
5
5
  import { workspace } from '../workspace';
6
+ export declare const SET_CHANNEL_NAME = "sy_table_set";
7
+ declare const setDataBodyZ: z.ZodObject<{
8
+ columns: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
9
+ size: number;
10
+ }[], null>>, z.ZodArray<z.ZodObject<{
11
+ size: z.ZodNumber;
12
+ }, z.core.$strip>>]>>;
13
+ cells: z.ZodType<Record<string, {
14
+ key: string;
15
+ variant: string;
16
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
17
+ }>, unknown, z.core.$ZodTypeInternals<Record<string, {
18
+ key: string;
19
+ variant: string;
20
+ props: import('@synnaxlabs/x/dist/src/record/record').Unknown;
21
+ }>, unknown>>;
22
+ rows: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<{
23
+ size: number;
24
+ cells: string[];
25
+ }[], null>>, z.ZodArray<z.ZodObject<{
26
+ size: z.ZodNumber;
27
+ cells: z.ZodDefault<z.ZodUnion<readonly [z.ZodPipe<z.ZodNull, z.ZodTransform<string[], null>>, z.ZodArray<z.ZodString>]>>;
28
+ }, z.core.$strip>>]>>;
29
+ }, z.core.$strip>;
30
+ export type SetDataBody = z.input<typeof setDataBodyZ>;
6
31
  declare const retrieveReqZ: z.ZodObject<{
7
32
  keys: z.ZodArray<z.ZodUUID>;
8
33
  }, z.core.$strip>;
@@ -31,7 +56,8 @@ export declare class Client {
31
56
  create(workspace: workspace.Key, table: New): Promise<Table>;
32
57
  create(workspace: workspace.Key, tables: New[]): Promise<Table[]>;
33
58
  rename(key: Key, name: string): Promise<void>;
34
- setData(key: Key, data: record.Unknown): Promise<void>;
59
+ setData(key: Key, data: SetDataBody): Promise<void>;
60
+ dispatch(key: Key, dispatchKey: string, actions: Action[]): Promise<void>;
35
61
  retrieve(args: RetrieveSingleParams): Promise<Table>;
36
62
  retrieve(args: RetrieveMultipleParams): Promise<Table[]>;
37
63
  delete(keys: Key | Key[]): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/table/client.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAmB,MAAM,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,GAAG,EAAQ,KAAK,GAAG,EAAQ,KAAK,KAAK,EAAU,MAAM,mBAAmB,CAAC;AAEvF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAUxC,QAAA,MAAM,YAAY;;iBAAmC,CAAC;AACtD,QAAA,MAAM,mBAAmB;;;;;;GAEmB,CAAC;AAE7C,eAAO,MAAM,aAAa;;;;;;;;mBAA+C,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACzD,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACvE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AASlE,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5D,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAgBjE,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,C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M,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AASlE,qBAAa,MAAM;IACjB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,MAAM,EAAE,WAAW;IAIzB,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC;IAC5D,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAejE,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7C,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IASzE,QAAQ,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC;IACpD,QAAQ,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC;IAexD,MAAM,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ/C"}
@@ -1,3 +1,5 @@
1
+ export * from './actions';
2
+ export * from './actions.gen';
1
3
  export * from './client';
2
4
  export * from './types.gen';
3
5
  //# sourceMappingURL=external.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/table/external.ts"],"names":[],"mappings":"AASA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"external.d.ts","sourceRoot":"","sources":["../../../src/table/external.ts"],"names":[],"mappings":"AASA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}