@graphite-sports/sdk 0.1.1 → 0.3.0
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.
- package/index.d.ts +911 -215
- package/package.json +4 -1
package/index.d.ts
CHANGED
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
import { ChangeEventHandler } from 'react';
|
|
2
|
+
import { ColumnDef } from '@tanstack/react-table';
|
|
3
|
+
import { ColumnHelper } from '@tanstack/table-core';
|
|
4
|
+
import { ColumnVisibilityState } from '@tanstack/react-table';
|
|
5
|
+
import { ComponentProps } from 'react';
|
|
6
|
+
import { CSSProperties } from 'react';
|
|
2
7
|
import type { DataTag } from '@tanstack/react-query';
|
|
3
|
-
import
|
|
8
|
+
import { FC } from 'react';
|
|
4
9
|
import { FocusEventHandler } from 'react';
|
|
5
10
|
import { HTMLInputTypeAttribute } from 'react';
|
|
6
11
|
import { JSX } from 'react/jsx-runtime';
|
|
7
12
|
import { KeyboardEventHandler } from 'react';
|
|
13
|
+
import { OnChangeFn } from '@tanstack/react-table';
|
|
14
|
+
import { default as React_2 } from 'react';
|
|
15
|
+
import * as React_3 from 'react';
|
|
8
16
|
import { ReactNode } from 'react';
|
|
9
17
|
import type { Ref } from 'react';
|
|
10
18
|
import { RefObject } from 'react';
|
|
19
|
+
import { RowData } from '@tanstack/react-table';
|
|
20
|
+
import { RowModel } from '@tanstack/table-core';
|
|
21
|
+
import { SortingState } from '@tanstack/react-table';
|
|
22
|
+
import { Tab } from '@headlessui/react';
|
|
23
|
+
import { TabGroup } from '@headlessui/react';
|
|
24
|
+
import { Table as Table_2 } from '@tanstack/table-core';
|
|
25
|
+
import { TableFeature } from '@tanstack/table-core';
|
|
26
|
+
import { TabList } from '@headlessui/react';
|
|
27
|
+
import { TabPanel } from '@headlessui/react';
|
|
28
|
+
import { TabPanels } from '@headlessui/react';
|
|
11
29
|
import { toast } from 'react-hot-toast';
|
|
12
30
|
import type { UnusedSkipTokenOptions } from '@tanstack/react-query';
|
|
13
31
|
|
|
14
32
|
export declare type AnyQuerySchema = QuerySchema<QueryFields>;
|
|
15
33
|
|
|
16
|
-
export declare function AppButton({ type, onClick, disabled: disabledProp, mutates, children, submit, className, loading, value, ref, href, }: AppButtonProps): JSX.Element;
|
|
34
|
+
export declare function AppButton({ type, onClick, disabled: disabledProp, mutates, children, submit, className, loading, value, ref, href, autoFocus, }: AppButtonProps): JSX.Element;
|
|
17
35
|
|
|
18
36
|
export declare type AppButtonProps = {
|
|
19
37
|
type?: AppButtonType;
|
|
@@ -27,12 +45,39 @@ export declare type AppButtonProps = {
|
|
|
27
45
|
loading?: boolean;
|
|
28
46
|
value?: string;
|
|
29
47
|
ref?: RefObject<HTMLButtonElement | null>;
|
|
48
|
+
/** Focuses the button on mount, and with `href` also when this turns true later. */
|
|
49
|
+
autoFocus?: boolean;
|
|
30
50
|
/** Makes the button a link to this route, so it can also be opened in a new tab. `onClick` runs before routing. */
|
|
31
51
|
href?: string;
|
|
32
52
|
};
|
|
33
53
|
|
|
34
54
|
export declare type AppButtonType = 'primary' | 'secondary' | 'danger';
|
|
35
55
|
|
|
56
|
+
export declare function AppCheckbox(props: AppCheckboxProps): JSX.Element;
|
|
57
|
+
|
|
58
|
+
export declare type AppCheckboxProps = {
|
|
59
|
+
checked: boolean;
|
|
60
|
+
onChange?(checked: boolean): void;
|
|
61
|
+
name?: string;
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
tabIndex?: number;
|
|
64
|
+
label?: string | React_2.ReactNode;
|
|
65
|
+
description?: string | React_2.ReactNode;
|
|
66
|
+
stopPropagation?: boolean;
|
|
67
|
+
readonly?: boolean;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export declare function AppDisclosure({ header, children, className, defaultOpen, transition, chevron, }: AppDisclosureProps): JSX.Element;
|
|
71
|
+
|
|
72
|
+
export declare type AppDisclosureProps = {
|
|
73
|
+
header: ReactNode;
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
className?: string;
|
|
76
|
+
defaultOpen?: boolean;
|
|
77
|
+
transition?: boolean;
|
|
78
|
+
chevron?: boolean;
|
|
79
|
+
};
|
|
80
|
+
|
|
36
81
|
export declare const AppInput: {
|
|
37
82
|
({ ref, inputRef, ...props }: AppInputProps & {
|
|
38
83
|
ref?: React.RefObject<HTMLInputElement | null>;
|
|
@@ -63,11 +108,118 @@ export declare type AppInputProps = {
|
|
|
63
108
|
autoFocus?: boolean;
|
|
64
109
|
};
|
|
65
110
|
|
|
66
|
-
declare
|
|
111
|
+
export declare function AppListbox<TVal>({ options, value, onChange, label, description, disabled, placeholder, className, direction, readonly: readonlyProp, required, }: AppListboxProps<TVal>): JSX.Element;
|
|
112
|
+
|
|
113
|
+
export declare type AppListboxProps<TVal> = {
|
|
114
|
+
options: Option_2<TVal>[];
|
|
115
|
+
value?: TVal;
|
|
116
|
+
onChange?: (value: TVal) => void;
|
|
117
|
+
label?: React_2.ReactNode;
|
|
118
|
+
description?: React_2.ReactNode;
|
|
119
|
+
placeholder?: React_2.ReactNode;
|
|
120
|
+
disabled?: boolean;
|
|
121
|
+
className?: string;
|
|
122
|
+
direction?: 'up' | 'down';
|
|
123
|
+
readonly?: boolean;
|
|
124
|
+
required?: boolean;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export declare function AppNumberInput<IsRequired extends boolean = false>({ label, description, value, onChange, min, max, integer, placeholder, required, disabled, readonly: readonlyProp, className, layout, onKeyDown, onFocus, onBlur, tabIndex, autoFocus, inputRef, }: AppNumberInputProps<IsRequired>): JSX.Element;
|
|
128
|
+
|
|
129
|
+
export declare type AppNumberInputProps<IsRequired extends boolean = false> = {
|
|
130
|
+
label?: string;
|
|
131
|
+
description?: string;
|
|
132
|
+
min?: number | null;
|
|
133
|
+
max?: number | null;
|
|
134
|
+
integer?: boolean;
|
|
135
|
+
placeholder?: string;
|
|
136
|
+
required?: IsRequired;
|
|
137
|
+
disabled?: boolean;
|
|
138
|
+
readonly?: boolean;
|
|
139
|
+
className?: string;
|
|
140
|
+
layout?: InputLayout;
|
|
141
|
+
value?: NullableUnlessRequired<number, IsRequired>;
|
|
142
|
+
onChange?: (value: NullableUnlessRequired<number, IsRequired>) => void;
|
|
143
|
+
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
144
|
+
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
145
|
+
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
146
|
+
tabIndex?: number;
|
|
147
|
+
autoFocus?: boolean;
|
|
148
|
+
inputRef?: React.RefObject<HTMLInputElement | null>;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export declare function AppSwitch(props: AppSwitchProps): JSX.Element;
|
|
152
|
+
|
|
153
|
+
export declare type AppSwitchProps = {
|
|
154
|
+
checked?: boolean;
|
|
155
|
+
onChange?(checked: boolean): void;
|
|
156
|
+
name?: string;
|
|
157
|
+
disabled?: boolean;
|
|
158
|
+
tabIndex?: number;
|
|
159
|
+
label?: string | React_2.ReactNode;
|
|
160
|
+
description?: string | React_2.ReactNode;
|
|
161
|
+
className?: string;
|
|
162
|
+
readonly?: boolean;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export declare function AppTab({ className, ...props }: ComponentProps<typeof Tab>): JSX.Element;
|
|
166
|
+
|
|
167
|
+
export declare function AppTabGroup(props: ComponentProps<typeof TabGroup>): JSX.Element;
|
|
168
|
+
|
|
169
|
+
export declare function AppTable<TData extends RowData>({ data, columns, actions, allowSelect, getRowId, getRowState, rowClicked, rowHref, initialPageSize, initialSorting, pageSizes, enableSorting, autoResetPageIndex, emptyTableText, columnVisibility: columnVisibilityState, }: TableProps<TData>): JSX.Element;
|
|
170
|
+
|
|
171
|
+
export declare type AppTableFeatures = typeof appTableFeatures;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The single feature registry every `AppTable` instance uses. Shared so callers can build their
|
|
175
|
+
* `ColumnDef`s against the same `TFeatures` via {@link createAppTableColumnHelper}.
|
|
176
|
+
*/
|
|
177
|
+
export declare const appTableFeatures: {
|
|
178
|
+
columnSizingFeature: TableFeature;
|
|
179
|
+
rowSelectionFeature: TableFeature;
|
|
180
|
+
rowSortingFeature: TableFeature;
|
|
181
|
+
sortedRowModel: (table: Table_2<any, any>) => () => RowModel<any, any>;
|
|
182
|
+
rowPaginationFeature: TableFeature;
|
|
183
|
+
paginatedRowModel: (table: Table_2<any, any>) => () => RowModel<any, any>;
|
|
184
|
+
columnVisibilityFeature: TableFeature;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export declare function AppTabList({ className, ...props }: ComponentProps<typeof TabList>): JSX.Element;
|
|
188
|
+
|
|
189
|
+
export declare function AppTabPanel({ className, ...props }: ComponentProps<typeof TabPanel>): JSX.Element;
|
|
190
|
+
|
|
191
|
+
export declare function AppTabPanels(props: ComponentProps<typeof TabPanels>): JSX.Element;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* A tooltip that costs nothing until it is pointed at.
|
|
195
|
+
*
|
|
196
|
+
* `TooltipPrimitive.Root` pulls in around nine components - the tooltip and portal providers,
|
|
197
|
+
* the popper, its anchor, the trigger and a presence wrapper - and mounts all of them whether or
|
|
198
|
+
* not the tooltip will ever be shown. A node graph puts hundreds of tooltips on screen at once,
|
|
199
|
+
* where that machinery dominated every render of the editor. So until the pointer or the
|
|
200
|
+
* keyboard reaches the trigger, only `children` is mounted; the first hover or focus arms the
|
|
201
|
+
* real tooltip and gets replayed onto it.
|
|
202
|
+
*/
|
|
203
|
+
export declare function AppTooltip({ children, content, side, open, defaultOpen, onOpenChange, className, shortcut, ...props }: AppTooltipProps): JSX.Element;
|
|
204
|
+
|
|
205
|
+
export declare interface AppTooltipProps {
|
|
206
|
+
children: React_3.ReactNode;
|
|
207
|
+
content: React_3.ReactNode;
|
|
208
|
+
/** The keys that do what the trigger does, shown after `content`. */
|
|
209
|
+
shortcut?: Shortcut;
|
|
210
|
+
/** Preferred side of the trigger to render against. Defaults to "top". */
|
|
211
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
212
|
+
open?: boolean;
|
|
213
|
+
defaultOpen?: boolean;
|
|
214
|
+
onOpenChange?: (open: boolean) => void;
|
|
215
|
+
className?: string;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export declare type ArithmeticOperator = "add" | "subtract";
|
|
67
219
|
|
|
68
|
-
declare type ArrayValue<T = Primitive> = Value<T>[];
|
|
220
|
+
export declare type ArrayValue<T = Primitive> = Value<T>[];
|
|
69
221
|
|
|
70
|
-
declare type BIB = Brand<number, 'bib'>;
|
|
222
|
+
export declare type BIB = Brand<number, 'bib'>;
|
|
71
223
|
|
|
72
224
|
/**
|
|
73
225
|
* Mirrors the backend's `domain_id!` newtype IDs (graphite-engine/src/domain_id.rs) so distinct ID
|
|
@@ -79,10 +231,15 @@ export declare type Brand<T, B> = T & {
|
|
|
79
231
|
readonly __brand: B;
|
|
80
232
|
};
|
|
81
233
|
|
|
234
|
+
/** Stable reference — a new inline `select` on every `queryOptions()` call makes React Query re-select each render. */
|
|
235
|
+
export declare function buildCompetitorsMapped(competitors: CompetitorDAO[]): CompetitorsMapped;
|
|
236
|
+
|
|
82
237
|
export declare const buildRoute: <Path extends "*" | "/" | "/workspace/:workspaceId" | "/workspace/:workspaceId/event/:eventId" | "/download" | "/login" | "/register" | "/preferences" | "/crate-workspace" | "/workspace/:workspaceId/create-event" | "/workspace/:workspaceId/event/:eventId/dashboard" | "/workspace/:workspaceId/event/:eventId/create-class" | "/workspace/:workspaceId/event/:eventId/class/:classId" | "/workspace/:workspaceId/event/:eventId/create-competitor" | "/workspace/:workspaceId/event/:eventId/create-team" | "/workspace/:workspaceId/event/:eventId/competitor/:competitorId" | "/workspace/:workspaceId/event/:eventId/create-format" | "/workspace/:workspaceId/event/:eventId/format/:formatId" | "/workspace/:workspaceId/event/:eventId/format/:formatId/tests" | "/workspace/:workspaceId/event/:eventId/format/:formatId/tests/:formatTestId" | "/workspace/:workspaceId/event/:eventId/graph" | "/workspace/:workspaceId/event/:eventId/lineage" | "/workspace/:workspaceId/event/:eventId/create-game" | "/workspace/:workspaceId/event/:eventId/game/:gameId" | "/workspace/:workspaceId/event/:eventId/table/:tableId" | "/workspace/:workspaceId/event/:eventId/create-game-format" | "/workspace/:workspaceId/event/:eventId/game-format/:gameFormatId" | "/workspace/:workspaceId/event/:eventId/create-template" | "/workspace/:workspaceId/event/:eventId/template/:templateId" | "/workspace/:workspaceId/event/:eventId/extension/$extensionIdentifier">(path: Path, params: PathParams<Path>, ...query: {
|
|
83
238
|
'/': undefined;
|
|
84
239
|
'/download': undefined;
|
|
85
|
-
'/login':
|
|
240
|
+
'/login': QuerySchema< {
|
|
241
|
+
readonly returnTo: OptionalQueryField<ReturnPath>;
|
|
242
|
+
}>;
|
|
86
243
|
'/register': undefined;
|
|
87
244
|
'/preferences': undefined;
|
|
88
245
|
'/crate-workspace': undefined;
|
|
@@ -97,11 +254,11 @@ export declare const buildRoute: <Path extends "*" | "/" | "/workspace/:workspac
|
|
|
97
254
|
'/workspace/:workspaceId/event/:eventId/competitor/:competitorId': undefined;
|
|
98
255
|
'/workspace/:workspaceId/event/:eventId/create-format': QuerySchema< {
|
|
99
256
|
readonly focusNode: RepeatedQueryField<FormatNodeId>;
|
|
100
|
-
readonly formatInstance: OptionalQueryField<
|
|
257
|
+
readonly formatInstance: OptionalQueryField<FormatInstanceHash>;
|
|
101
258
|
}>;
|
|
102
259
|
'/workspace/:workspaceId/event/:eventId/format/:formatId': QuerySchema< {
|
|
103
260
|
readonly focusNode: RepeatedQueryField<FormatNodeId>;
|
|
104
|
-
readonly formatInstance: OptionalQueryField<
|
|
261
|
+
readonly formatInstance: OptionalQueryField<FormatInstanceHash>;
|
|
105
262
|
}>;
|
|
106
263
|
'/workspace/:workspaceId/event/:eventId/format/:formatId/tests': undefined;
|
|
107
264
|
'/workspace/:workspaceId/event/:eventId/format/:formatId/tests/:formatTestId': undefined;
|
|
@@ -116,7 +273,7 @@ export declare const buildRoute: <Path extends "*" | "/" | "/workspace/:workspac
|
|
|
116
273
|
/** Picks what these nodes own, or the steps they did. */
|
|
117
274
|
readonly node: RepeatedQueryField<FormatNodeId>;
|
|
118
275
|
/** Narrows `node` down to its instances in these format instances. */
|
|
119
|
-
readonly formatInstance: RepeatedQueryField<
|
|
276
|
+
readonly formatInstance: RepeatedQueryField<FormatInstanceHash>;
|
|
120
277
|
}>;
|
|
121
278
|
'/workspace/:workspaceId/event/:eventId/create-game': undefined;
|
|
122
279
|
'/workspace/:workspaceId/event/:eventId/game/:gameId': undefined;
|
|
@@ -130,7 +287,9 @@ export declare const buildRoute: <Path extends "*" | "/" | "/workspace/:workspac
|
|
|
130
287
|
}[Path] extends infer T ? T extends {
|
|
131
288
|
'/': undefined;
|
|
132
289
|
'/download': undefined;
|
|
133
|
-
'/login':
|
|
290
|
+
'/login': QuerySchema< {
|
|
291
|
+
readonly returnTo: OptionalQueryField<ReturnPath>;
|
|
292
|
+
}>;
|
|
134
293
|
'/register': undefined;
|
|
135
294
|
'/preferences': undefined;
|
|
136
295
|
'/crate-workspace': undefined;
|
|
@@ -145,11 +304,11 @@ export declare const buildRoute: <Path extends "*" | "/" | "/workspace/:workspac
|
|
|
145
304
|
'/workspace/:workspaceId/event/:eventId/competitor/:competitorId': undefined;
|
|
146
305
|
'/workspace/:workspaceId/event/:eventId/create-format': QuerySchema< {
|
|
147
306
|
readonly focusNode: RepeatedQueryField<FormatNodeId>;
|
|
148
|
-
readonly formatInstance: OptionalQueryField<
|
|
307
|
+
readonly formatInstance: OptionalQueryField<FormatInstanceHash>;
|
|
149
308
|
}>;
|
|
150
309
|
'/workspace/:workspaceId/event/:eventId/format/:formatId': QuerySchema< {
|
|
151
310
|
readonly focusNode: RepeatedQueryField<FormatNodeId>;
|
|
152
|
-
readonly formatInstance: OptionalQueryField<
|
|
311
|
+
readonly formatInstance: OptionalQueryField<FormatInstanceHash>;
|
|
153
312
|
}>;
|
|
154
313
|
'/workspace/:workspaceId/event/:eventId/format/:formatId/tests': undefined;
|
|
155
314
|
'/workspace/:workspaceId/event/:eventId/format/:formatId/tests/:formatTestId': undefined;
|
|
@@ -164,7 +323,7 @@ export declare const buildRoute: <Path extends "*" | "/" | "/workspace/:workspac
|
|
|
164
323
|
/** Picks what these nodes own, or the steps they did. */
|
|
165
324
|
readonly node: RepeatedQueryField<FormatNodeId>;
|
|
166
325
|
/** Narrows `node` down to its instances in these format instances. */
|
|
167
|
-
readonly formatInstance: RepeatedQueryField<
|
|
326
|
+
readonly formatInstance: RepeatedQueryField<FormatInstanceHash>;
|
|
168
327
|
}>;
|
|
169
328
|
'/workspace/:workspaceId/event/:eventId/create-game': undefined;
|
|
170
329
|
'/workspace/:workspaceId/event/:eventId/game/:gameId': undefined;
|
|
@@ -179,7 +338,7 @@ export declare const buildRoute: <Path extends "*" | "/" | "/workspace/:workspac
|
|
|
179
338
|
|
|
180
339
|
export declare type ClassDAO = components['schemas']['ClassDAO'];
|
|
181
340
|
|
|
182
|
-
export declare type ClassId = Brand<
|
|
341
|
+
export declare type ClassId = Brand<string, 'classId'>;
|
|
183
342
|
|
|
184
343
|
export declare type ClassResponse = components['schemas']['ClassResponse'];
|
|
185
344
|
|
|
@@ -191,6 +350,41 @@ export declare type CompetitorDAO = components['schemas']['CompetitorDAO'];
|
|
|
191
350
|
|
|
192
351
|
export declare type CompetitorId = Brand<number, 'competitorId'>;
|
|
193
352
|
|
|
353
|
+
export declare type CompetitorInTeamDAO = components['schemas']['CompetitorInTeamDAO'];
|
|
354
|
+
|
|
355
|
+
export declare function competitorLabel(competitorsById: ReadonlyMap<CompetitorId, CompetitorDAO>, competitorId: CompetitorId | null): string;
|
|
356
|
+
|
|
357
|
+
export declare const CompetitorNameLineSpacer: FC<{
|
|
358
|
+
className?: string;
|
|
359
|
+
}>;
|
|
360
|
+
|
|
361
|
+
/**
|
|
362
|
+
* Shows which competitor is picked and lets the user pick another one.
|
|
363
|
+
*/
|
|
364
|
+
export declare function CompetitorSelector<IsRequired extends boolean = false>({ value, onChange, onBlurChange, required, competitorsMapped, disabled, placeholder, className, inputClassName, forbiddenCompetitorsRef, }: CompetitorSelectorProps<IsRequired>): JSX.Element;
|
|
365
|
+
|
|
366
|
+
export declare type CompetitorSelectorProps<IsRequired extends boolean = false> = {
|
|
367
|
+
value: NullableUnlessRequired<CompetitorId, IsRequired>;
|
|
368
|
+
onChange?: (value: NullableUnlessRequired<CompetitorId, IsRequired>) => void;
|
|
369
|
+
/**
|
|
370
|
+
* Called when a competitor is picked from the menu.
|
|
371
|
+
*/
|
|
372
|
+
onBlurChange?: (value: NullableUnlessRequired<CompetitorId, IsRequired>) => void;
|
|
373
|
+
required?: IsRequired;
|
|
374
|
+
competitorsMapped: CompetitorsMapped;
|
|
375
|
+
disabled?: boolean;
|
|
376
|
+
placeholder?: string;
|
|
377
|
+
className?: string;
|
|
378
|
+
inputClassName?: string;
|
|
379
|
+
onEnterKey?: () => void;
|
|
380
|
+
forbiddenCompetitorsRef?: RefObject<Set<CompetitorId>>;
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
export declare interface CompetitorsMapped {
|
|
384
|
+
byId: Map<CompetitorId, CompetitorDAO>;
|
|
385
|
+
byBib: Map<BIB, CompetitorDAO>;
|
|
386
|
+
}
|
|
387
|
+
|
|
194
388
|
export declare type CompetitorType = components['schemas']['CompetitorType'];
|
|
195
389
|
|
|
196
390
|
declare interface components {
|
|
@@ -210,15 +404,24 @@ declare interface components {
|
|
|
210
404
|
APIVersion: {
|
|
211
405
|
/** Format: uint32 */
|
|
212
406
|
engineVersion: number;
|
|
407
|
+
/** @description Base URL of the web app that uses this server, configured with `GRAPHITE_UI_URL`. */
|
|
408
|
+
uiUrl: string;
|
|
213
409
|
version: components["schemas"]["SemVer"];
|
|
214
410
|
};
|
|
215
411
|
AddClassMutation: {
|
|
216
412
|
classDto: components["schemas"]["ClassDTO"];
|
|
413
|
+
/** @description The id of the new class, see [ClassId::new_random]. It must not exist yet. */
|
|
414
|
+
classId: components["schemas"]["ClassId"];
|
|
217
415
|
eventId: components["schemas"]["EventId"];
|
|
218
416
|
};
|
|
219
417
|
AddClassesMutation: {
|
|
220
418
|
classDtos: components["schemas"]["ClassDTO"][];
|
|
221
419
|
eventId: components["schemas"]["EventId"];
|
|
420
|
+
/**
|
|
421
|
+
* @description The classes get ids derived from it, see [ClassId::nth_of_seed]. Random, picked by the endpoint; reusing a seed
|
|
422
|
+
* reproduces the same ids.
|
|
423
|
+
*/
|
|
424
|
+
idSeed: components["schemas"]["Seed"];
|
|
222
425
|
};
|
|
223
426
|
/** @description <C extends {}, P extends Primitive, S extends Sorted|Unsorted>(Table<C, S>, P) -> (Table<C & {<self.key>: P}, S>) */
|
|
224
427
|
AddColumnsNode: {
|
|
@@ -228,37 +431,53 @@ declare interface components {
|
|
|
228
431
|
competitorDtos: components["schemas"]["CompetitorDTO"][];
|
|
229
432
|
competitorType: components["schemas"]["CompetitorType"];
|
|
230
433
|
eventId: components["schemas"]["EventId"];
|
|
434
|
+
/** @description The competitors get consecutive ids starting here. The endpoint picks [CompetitorDAO::next_id] inside [GraphiteEngine::mutate_with](crate::graphite_engine::GraphiteEngine::mutate_with). */
|
|
435
|
+
firstCompetitorId: components["schemas"]["CompetitorId"];
|
|
231
436
|
};
|
|
232
437
|
AddEventMutation: {
|
|
233
438
|
eventDto: components["schemas"]["EventDTO"];
|
|
439
|
+
/** @description The id of the new event, see [EventId::new_random]. It must not exist yet. */
|
|
440
|
+
eventId: components["schemas"]["EventId"];
|
|
234
441
|
};
|
|
235
442
|
AddFormatGroupMutation: {
|
|
236
443
|
eventId: components["schemas"]["EventId"];
|
|
237
444
|
formatGroup: components["schemas"]["FormatGroupDTO"];
|
|
445
|
+
/** @description The id of the new format group, see [FormatGroupId::new_random]. It must not exist yet. */
|
|
446
|
+
formatGroupId: components["schemas"]["FormatGroupId"];
|
|
238
447
|
};
|
|
239
448
|
AddFormatMutation: {
|
|
240
449
|
format: components["schemas"]["FormatDTO"];
|
|
241
450
|
eventId: components["schemas"]["EventId"];
|
|
242
451
|
force: boolean;
|
|
452
|
+
/** @description The id of the new format, see [FormatId::new_random]. It must not exist yet. */
|
|
453
|
+
formatId: components["schemas"]["FormatId"];
|
|
243
454
|
};
|
|
244
455
|
AddFormatTestMutation: {
|
|
245
456
|
/** @default */
|
|
246
457
|
description: string;
|
|
247
458
|
formatId: components["schemas"]["FormatId"];
|
|
459
|
+
/** @description The id of the new format test, see [FormatTestId::new_random]. It must not exist yet. */
|
|
460
|
+
formatTestId: components["schemas"]["FormatTestId"];
|
|
248
461
|
name: string;
|
|
249
462
|
test: components["schemas"]["FormatTestDefinition"];
|
|
250
463
|
};
|
|
251
464
|
AddGameFormatMutation: {
|
|
252
465
|
eventId: components["schemas"]["EventId"];
|
|
253
466
|
gameFormat: components["schemas"]["GameFormatDTO"];
|
|
467
|
+
/** @description The id of the new game format, see [GameFormatId::new_random]. It must not exist yet. */
|
|
468
|
+
gameFormatId: components["schemas"]["GameFormatId"];
|
|
254
469
|
};
|
|
255
470
|
AddGameMutation: {
|
|
256
471
|
eventId: components["schemas"]["EventId"];
|
|
257
472
|
game: components["schemas"]["GameDTO"];
|
|
473
|
+
/** @description The id of the new game, see [GameId::new_random]. It must not exist yet. */
|
|
474
|
+
gameId: components["schemas"]["GameId"];
|
|
258
475
|
};
|
|
259
476
|
AddGameTableMutation: {
|
|
260
477
|
eventId: components["schemas"]["EventId"];
|
|
261
478
|
gameTable: components["schemas"]["TableDTO"];
|
|
479
|
+
/** @description The id of the new table, see [TableId::new_random]. It must not exist yet. */
|
|
480
|
+
tableId: components["schemas"]["TableId"];
|
|
262
481
|
variant: components["schemas"]["TableVariant"];
|
|
263
482
|
};
|
|
264
483
|
/** @description <#0 extends {}, #1>(#0, #1) -> (#0 & {<self.key>: #1}) */
|
|
@@ -287,6 +506,15 @@ declare interface components {
|
|
|
287
506
|
type: "at-date";
|
|
288
507
|
date: string;
|
|
289
508
|
};
|
|
509
|
+
/** @description Query of every endpoint with write access to a workspace. */
|
|
510
|
+
AllowNewGraphErrorsQuery: {
|
|
511
|
+
/**
|
|
512
|
+
* @description Applies mutations even if they cause node errors that did not exist before.
|
|
513
|
+
* Without it such mutations are rolled back with HTTP 409 and the new node errors.
|
|
514
|
+
* @default false
|
|
515
|
+
*/
|
|
516
|
+
allowNewGraphErrors: boolean;
|
|
517
|
+
};
|
|
290
518
|
AlterTeamCompetitorsMutation: {
|
|
291
519
|
additions: components["schemas"]["CompetitorId"][];
|
|
292
520
|
removals: components["schemas"]["CompetitorId"][];
|
|
@@ -481,7 +709,12 @@ declare interface components {
|
|
|
481
709
|
};
|
|
482
710
|
/** @enum {string} */
|
|
483
711
|
ClassGender: "female-only" | "male-only" | "all-genders";
|
|
484
|
-
/**
|
|
712
|
+
/**
|
|
713
|
+
* Format: uuid
|
|
714
|
+
* @description Identifies a class. Random ([Self::new_random]) from the endpoint, [Self::nth_of_seed] for `AddClassesMutation`,
|
|
715
|
+
* or derived by `ImportArchiveMutation`.
|
|
716
|
+
* Deserializing one only yields a reference to an existing class; it does not check that it exists.
|
|
717
|
+
*/
|
|
485
718
|
ClassId: ClassId;
|
|
486
719
|
ClassPathVariables_for_CommonWorkspaceId: {
|
|
487
720
|
classId: components["schemas"]["ClassId"];
|
|
@@ -536,7 +769,12 @@ declare interface components {
|
|
|
536
769
|
lastName?: string | null;
|
|
537
770
|
teamName?: string | null;
|
|
538
771
|
};
|
|
539
|
-
/**
|
|
772
|
+
/**
|
|
773
|
+
* Format: int64
|
|
774
|
+
* @description Identifies a competitor in the workspace, at least [Self::FIRST]. Not autoincrement: the endpoint picks
|
|
775
|
+
* [CompetitorDAO::next_id] inside `GraphiteEngine::mutate_with` and `AddCompetitorsMutation` carries it. The ids of deleted competitors can come back,
|
|
776
|
+
* so don't hold on to the id of a deleted competitor.
|
|
777
|
+
*/
|
|
540
778
|
CompetitorId: CompetitorId;
|
|
541
779
|
CompetitorInClassDTO: {
|
|
542
780
|
classId: components["schemas"]["ClassId"];
|
|
@@ -544,19 +782,14 @@ declare interface components {
|
|
|
544
782
|
/** Format: int64 */
|
|
545
783
|
place: number;
|
|
546
784
|
};
|
|
547
|
-
/** Format: int64 */
|
|
548
|
-
CompetitorInClassId: number;
|
|
549
785
|
CompetitorInTeamDAO: {
|
|
550
786
|
competitorId: components["schemas"]["CompetitorId"];
|
|
551
787
|
from: string;
|
|
552
|
-
id: components["schemas"]["CompetitorInTeamId"];
|
|
553
788
|
/** @description Id of competitor */
|
|
554
789
|
teamId: components["schemas"]["CompetitorId"];
|
|
555
790
|
to?: string | null;
|
|
556
791
|
};
|
|
557
792
|
/** Format: int64 */
|
|
558
|
-
CompetitorInTeamId: number;
|
|
559
|
-
/** Format: int64 */
|
|
560
793
|
CompetitorNotUniqueError: number;
|
|
561
794
|
CompetitorPathVariables_for_CommonWorkspaceId: {
|
|
562
795
|
competitorId: components["schemas"]["CompetitorId"];
|
|
@@ -700,12 +933,27 @@ declare interface components {
|
|
|
700
933
|
ContentInEventFolderDTO: {
|
|
701
934
|
classIds: components["schemas"]["ClassId"][];
|
|
702
935
|
eventId: components["schemas"]["EventId"];
|
|
936
|
+
/** @description Exactly one of `game_id` and `game_table_id` is set (SQL CHECK). */
|
|
703
937
|
gameId?: components["schemas"]["GameId"] | null;
|
|
938
|
+
/** @description Any table, not only tables of games. */
|
|
704
939
|
gameTableId?: components["schemas"]["TableId"] | null;
|
|
705
|
-
/** Format: int64 */
|
|
706
|
-
id: number;
|
|
707
940
|
path: components["schemas"]["FolderPath"];
|
|
708
941
|
};
|
|
942
|
+
/** @description Who created a game or a table. Encodes the columns `format_instance_id`, `format_node_id` and `node_key`. */
|
|
943
|
+
ContentOwner: {
|
|
944
|
+
/** @constant */
|
|
945
|
+
type: "user";
|
|
946
|
+
} | {
|
|
947
|
+
/** @constant */
|
|
948
|
+
type: "node";
|
|
949
|
+
data: {
|
|
950
|
+
nodeInstance: components["schemas"]["FormatNodeInstanceId"];
|
|
951
|
+
/** Format: int64 */
|
|
952
|
+
nodeKey: number;
|
|
953
|
+
};
|
|
954
|
+
};
|
|
955
|
+
/** @description Whether the content a node owns is the output of its last execution. */
|
|
956
|
+
ContentState: "ok" | "stale" | "node-error";
|
|
709
957
|
/** @enum {string} */
|
|
710
958
|
CookieStyle: "form";
|
|
711
959
|
CreateApiKeyBody: {
|
|
@@ -773,38 +1021,6 @@ declare interface components {
|
|
|
773
1021
|
/** @constant */
|
|
774
1022
|
type: "unknown";
|
|
775
1023
|
};
|
|
776
|
-
DefaultChangeEvent_for_CompetitorInClassId: {
|
|
777
|
-
/** @constant */
|
|
778
|
-
type: "created";
|
|
779
|
-
data: components["schemas"]["CompetitorInClassId"];
|
|
780
|
-
} | {
|
|
781
|
-
/** @constant */
|
|
782
|
-
type: "updated";
|
|
783
|
-
data: components["schemas"]["CompetitorInClassId"];
|
|
784
|
-
} | {
|
|
785
|
-
/** @constant */
|
|
786
|
-
type: "deleted";
|
|
787
|
-
data: components["schemas"]["CompetitorInClassId"];
|
|
788
|
-
} | {
|
|
789
|
-
/** @constant */
|
|
790
|
-
type: "unknown";
|
|
791
|
-
};
|
|
792
|
-
DefaultChangeEvent_for_CompetitorInTeamId: {
|
|
793
|
-
/** @constant */
|
|
794
|
-
type: "created";
|
|
795
|
-
data: components["schemas"]["CompetitorInTeamId"];
|
|
796
|
-
} | {
|
|
797
|
-
/** @constant */
|
|
798
|
-
type: "updated";
|
|
799
|
-
data: components["schemas"]["CompetitorInTeamId"];
|
|
800
|
-
} | {
|
|
801
|
-
/** @constant */
|
|
802
|
-
type: "deleted";
|
|
803
|
-
data: components["schemas"]["CompetitorInTeamId"];
|
|
804
|
-
} | {
|
|
805
|
-
/** @constant */
|
|
806
|
-
type: "unknown";
|
|
807
|
-
};
|
|
808
1024
|
DefaultChangeEvent_for_EventId: {
|
|
809
1025
|
/** @constant */
|
|
810
1026
|
type: "created";
|
|
@@ -982,7 +1198,7 @@ declare interface components {
|
|
|
982
1198
|
DeleteGameMutation: {
|
|
983
1199
|
id: components["schemas"]["GameId"];
|
|
984
1200
|
};
|
|
985
|
-
/** @
|
|
1201
|
+
/** @description What happens to the games and tables of node instances that get deleted. */
|
|
986
1202
|
DeleteInstanceSettings: "errorOnContent" | "keepContentAsCopy" | "deleteContent";
|
|
987
1203
|
DeleteTableMutation: {
|
|
988
1204
|
id: components["schemas"]["TableId"];
|
|
@@ -1019,12 +1235,14 @@ declare interface components {
|
|
|
1019
1235
|
DuplicateFormatShallowMutation: {
|
|
1020
1236
|
formatId: components["schemas"]["FormatId"];
|
|
1021
1237
|
/**
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1238
|
+
* @description Random, picked when the mutation is built. The node ids of the copy and its id ([FormatId::of_copy]) derive
|
|
1239
|
+
* from it, so reusing a seed reproduces the same ids.
|
|
1024
1240
|
*/
|
|
1025
|
-
nodeUuidSeed:
|
|
1241
|
+
nodeUuidSeed: components["schemas"]["Seed"];
|
|
1026
1242
|
};
|
|
1027
1243
|
DuplicateGameFormatMutation: {
|
|
1244
|
+
/** @description The id of the new copy, see [GameFormatId::new_random]. It must not exist yet. */
|
|
1245
|
+
copyId: components["schemas"]["GameFormatId"];
|
|
1028
1246
|
gameFormatId: components["schemas"]["GameFormatId"];
|
|
1029
1247
|
};
|
|
1030
1248
|
/** @description A single encoding definition applied to a single schema property. */
|
|
@@ -1138,11 +1356,11 @@ declare interface components {
|
|
|
1138
1356
|
} | {
|
|
1139
1357
|
/** @constant */
|
|
1140
1358
|
type: "competitor-in-team";
|
|
1141
|
-
data: components["schemas"]["
|
|
1359
|
+
data: components["schemas"]["DefaultChangeEvent_for_CompetitorId"];
|
|
1142
1360
|
} | {
|
|
1143
1361
|
/** @constant */
|
|
1144
1362
|
type: "competitor-in-class";
|
|
1145
|
-
data: components["schemas"]["
|
|
1363
|
+
data: components["schemas"]["DefaultChangeEvent_for_ClassId"];
|
|
1146
1364
|
} | {
|
|
1147
1365
|
/** @constant */
|
|
1148
1366
|
type: "format-test";
|
|
@@ -1155,11 +1373,8 @@ declare interface components {
|
|
|
1155
1373
|
/** @constant */
|
|
1156
1374
|
type: "content-in-event-folder";
|
|
1157
1375
|
};
|
|
1158
|
-
/**
|
|
1159
|
-
|
|
1160
|
-
* @enum {string}
|
|
1161
|
-
*/
|
|
1162
|
-
EntityChangeEventDiscriminants: "Event" | "Game" | "Table" | "GameFormat" | "FormatGroup" | "Row" | "RowMutation" | "FormatNode" | "Format" | "Class" | "Extension" | "Competitor" | "CompetitorInTeam" | "CompetitorInClass" | "FormatTest" | "Log" | "ContentInEventFolder";
|
|
1376
|
+
/** @description Auto-generated discriminant enum variants */
|
|
1377
|
+
EntityChangeEventDiscriminants: ("Event" | "Game" | "Table" | "GameFormat" | "FormatGroup" | "Row" | "RowMutation" | "FormatNode" | "Format" | "Class" | "Extension" | "Competitor" | "FormatTest" | "Log" | "ContentInEventFolder") | "CompetitorInTeam" | "CompetitorInClass";
|
|
1163
1378
|
/** @description A scope portal that used to be there but got removed in order to be serializable */
|
|
1164
1379
|
ErasedScopedTypeRef_for_Type: {
|
|
1165
1380
|
/** @constant */
|
|
@@ -1225,7 +1440,11 @@ declare interface components {
|
|
|
1225
1440
|
*/
|
|
1226
1441
|
testMode: boolean;
|
|
1227
1442
|
};
|
|
1228
|
-
/**
|
|
1443
|
+
/**
|
|
1444
|
+
* Format: uuid
|
|
1445
|
+
* @description Identifies an event. Random ([Self::new_random]): the endpoint picks it and `AddEventMutation` carries it.
|
|
1446
|
+
* Deserializing one only yields a reference to an existing event; it does not check that it exists.
|
|
1447
|
+
*/
|
|
1229
1448
|
EventId: EventId;
|
|
1230
1449
|
/**
|
|
1231
1450
|
* @description Everything needed to draw how the tables of an event come from each other, without their rows (see
|
|
@@ -1242,7 +1461,7 @@ declare interface components {
|
|
|
1242
1461
|
/** @description Without stale tables. */
|
|
1243
1462
|
tables: components["schemas"]["EventLineageTable"][];
|
|
1244
1463
|
};
|
|
1245
|
-
/** @description A way from `parent_table_id` into `table_id`. */
|
|
1464
|
+
/** @description A way from `parent_table_id` into `id.table_id`. */
|
|
1246
1465
|
EventLineageEdge: {
|
|
1247
1466
|
/** @description Referenced by [EventRowLineageEdge::id]. */
|
|
1248
1467
|
id: components["schemas"]["TableLineageId"];
|
|
@@ -1258,22 +1477,22 @@ declare interface components {
|
|
|
1258
1477
|
* @description How many rows took this way.
|
|
1259
1478
|
*/
|
|
1260
1479
|
rowCount: number;
|
|
1261
|
-
tableId: components["schemas"]["TableId"];
|
|
1262
1480
|
};
|
|
1263
1481
|
EventLineageGame: {
|
|
1264
1482
|
entryTableId?: components["schemas"]["TableId"] | null;
|
|
1265
1483
|
id: components["schemas"]["GameId"];
|
|
1266
1484
|
name: string;
|
|
1267
|
-
owningFormatNodeInstanceId?: components["schemas"]["
|
|
1485
|
+
owningFormatNodeInstanceId?: components["schemas"]["NodeInstanceHash"] | null;
|
|
1268
1486
|
resultTableId?: components["schemas"]["TableId"] | null;
|
|
1269
1487
|
};
|
|
1270
1488
|
EventLineageNode: {
|
|
1271
1489
|
/** @description Set for class nodes, the rows they create are the competitors of the class. */
|
|
1272
1490
|
classId?: components["schemas"]["ClassId"] | null;
|
|
1273
1491
|
formatId: components["schemas"]["FormatId"];
|
|
1274
|
-
formatInstanceId: components["schemas"]["
|
|
1492
|
+
formatInstanceId: components["schemas"]["FormatInstanceHash"];
|
|
1275
1493
|
formatNodeId: components["schemas"]["FormatNodeId"];
|
|
1276
|
-
|
|
1494
|
+
/** @description Referenced by [Step::node]. */
|
|
1495
|
+
id: components["schemas"]["NodeInstanceHash"];
|
|
1277
1496
|
nodeType: components["schemas"]["NodeTypeDiscriminants"];
|
|
1278
1497
|
};
|
|
1279
1498
|
EventLineageRow: {
|
|
@@ -1286,7 +1505,7 @@ declare interface components {
|
|
|
1286
1505
|
gameId?: components["schemas"]["GameId"] | null;
|
|
1287
1506
|
id: components["schemas"]["TableId"];
|
|
1288
1507
|
name: string;
|
|
1289
|
-
owningNodeInstanceId?: components["schemas"]["
|
|
1508
|
+
owningNodeInstanceId?: components["schemas"]["NodeInstanceHash"] | null;
|
|
1290
1509
|
/** Format: uint */
|
|
1291
1510
|
rowCount: number;
|
|
1292
1511
|
state: components["schemas"]["TableState"];
|
|
@@ -1362,7 +1581,7 @@ declare interface components {
|
|
|
1362
1581
|
kind: components["schemas"]["ExtensionKind"];
|
|
1363
1582
|
};
|
|
1364
1583
|
/** @enum {string} */
|
|
1365
|
-
ExtensionError: "local-extension-not-found" | "failed-to-resolve-extension" | "failed-to-start" | "invalid-identifier";
|
|
1584
|
+
ExtensionError: "local-extension-not-found" | "failed-to-resolve-extension" | "failed-to-start" | "invalid-identifier" | "crashed";
|
|
1366
1585
|
/** @description A single path segment on every platform without control characters, so it is a safe directory name. */
|
|
1367
1586
|
ExtensionIdentifier: string;
|
|
1368
1587
|
ExtensionKind: {
|
|
@@ -1537,14 +1756,27 @@ declare interface components {
|
|
|
1537
1756
|
category: components["schemas"]["NodeCategory"];
|
|
1538
1757
|
name: string;
|
|
1539
1758
|
};
|
|
1540
|
-
/**
|
|
1759
|
+
/**
|
|
1760
|
+
* Format: uuid
|
|
1761
|
+
* @description Identifies a format group. Random ([Self::new_random]) from the endpoint, or derived by `ImportArchiveMutation`.
|
|
1762
|
+
* Deserializing one only yields a reference to an existing format group; it does not check that it exists.
|
|
1763
|
+
*/
|
|
1541
1764
|
FormatGroupId: FormatGroupId;
|
|
1542
1765
|
FormatGroupPathVariables_for_CommonWorkspaceId: {
|
|
1543
1766
|
eventId: components["schemas"]["EventId"];
|
|
1544
1767
|
formatGroupId: components["schemas"]["FormatGroupId"];
|
|
1545
1768
|
workspaceId: components["schemas"]["CommonWorkspaceId"];
|
|
1546
1769
|
};
|
|
1547
|
-
/**
|
|
1770
|
+
/**
|
|
1771
|
+
* Format: uuid
|
|
1772
|
+
* @description Identifies a format. Comes from one of:
|
|
1773
|
+
* - [Self::new_random]: the endpoint picks it and `AddFormatMutation` carries it.
|
|
1774
|
+
* - [Self::root_of]: the root format of an event.
|
|
1775
|
+
* - [Self::of_copy]: the copy a mutation makes with a seed.
|
|
1776
|
+
* - `ImportArchiveMutation`: derived from the seed, the event and the archive entry.
|
|
1777
|
+
*
|
|
1778
|
+
* Deserializing one only yields a reference to an existing format; it does not check that it exists.
|
|
1779
|
+
*/
|
|
1548
1780
|
FormatId: FormatId;
|
|
1549
1781
|
FormatInstanceDAO: {
|
|
1550
1782
|
/** @description Temporary solution. Needed to know the event of an invalidated node instance. */
|
|
@@ -1558,14 +1790,19 @@ declare interface components {
|
|
|
1558
1790
|
* additionally need some sort of closure key.
|
|
1559
1791
|
*/
|
|
1560
1792
|
formatNodeId?: components["schemas"]["FormatNodeId"] | null;
|
|
1561
|
-
|
|
1793
|
+
/**
|
|
1794
|
+
* @description Always [Self::derived_id]. Private so that it can only come from [Self::root], [Self::new_child] or the DB, and
|
|
1795
|
+
* [Self::update_with_new_id] re-derives it when the parent changes.
|
|
1796
|
+
*/
|
|
1797
|
+
id: components["schemas"]["FormatInstanceHash"];
|
|
1562
1798
|
/**
|
|
1563
1799
|
* Format: int64
|
|
1564
1800
|
* @description Same concept as keys in react
|
|
1565
1801
|
*/
|
|
1566
1802
|
key: number;
|
|
1567
|
-
/** @description None if root format */
|
|
1568
|
-
|
|
1803
|
+
/** @description None if root format. See [Self::parent]. */
|
|
1804
|
+
parentId?: components["schemas"]["FormatInstanceHash"] | null;
|
|
1805
|
+
parentNodeId?: components["schemas"]["FormatNodeId"] | null;
|
|
1569
1806
|
/**
|
|
1570
1807
|
* @description True if this instance was not hit the last time it should
|
|
1571
1808
|
* have gotten executed. Example: Map node maps 10 times (creates
|
|
@@ -1577,12 +1814,23 @@ declare interface components {
|
|
|
1577
1814
|
*/
|
|
1578
1815
|
stale: boolean;
|
|
1579
1816
|
};
|
|
1580
|
-
/**
|
|
1581
|
-
|
|
1817
|
+
/**
|
|
1818
|
+
* Format: uuid
|
|
1819
|
+
* @description Identifies a format instance, the primary key of `format_instances`.
|
|
1820
|
+
*
|
|
1821
|
+
* Derived from where the instance sits in the tree of instances: the root instance of an event from its root format,
|
|
1822
|
+
* every other instance from the [NodeInstanceHash] of the node that instantiated it and the key the node gave it.
|
|
1823
|
+
* So executing a graph creates the same hashes every time.
|
|
1824
|
+
*
|
|
1825
|
+
* New hashes only come from these derivations. Deserializing one (client requests, the DB) only yields a reference to
|
|
1826
|
+
* an existing instance; it does not check that it exists or how it was made. Changing a derivation changes what
|
|
1827
|
+
* replaying a log produces and needs an `ENGINE_VERSION` increment.
|
|
1828
|
+
*/
|
|
1829
|
+
FormatInstanceHash: FormatInstanceHash;
|
|
1582
1830
|
FormatInstancePathVariables_for_CommonWorkspaceId: {
|
|
1583
1831
|
eventId: components["schemas"]["EventId"];
|
|
1584
1832
|
formatId: components["schemas"]["FormatId"];
|
|
1585
|
-
formatInstanceId: components["schemas"]["
|
|
1833
|
+
formatInstanceId: components["schemas"]["FormatInstanceHash"];
|
|
1586
1834
|
workspaceId: components["schemas"]["CommonWorkspaceId"];
|
|
1587
1835
|
};
|
|
1588
1836
|
FormatInstanceTestResult: {
|
|
@@ -1590,8 +1838,6 @@ declare interface components {
|
|
|
1590
1838
|
nodeStates: components["schemas"]["NodeInstanceStateDTO"][];
|
|
1591
1839
|
};
|
|
1592
1840
|
FormatNodeConnectionDAO: {
|
|
1593
|
-
/** Format: int64 */
|
|
1594
|
-
id: number;
|
|
1595
1841
|
pins: components["schemas"]["ConnectionPin"][];
|
|
1596
1842
|
sourceFormatNodeId: components["schemas"]["FormatNodeId"];
|
|
1597
1843
|
sourceOutput: components["schemas"]["OutputIdx"];
|
|
@@ -1656,8 +1902,11 @@ declare interface components {
|
|
|
1656
1902
|
outputVargsToArray: boolean;
|
|
1657
1903
|
parentNodeId?: components["schemas"]["FormatNodeId"] | null;
|
|
1658
1904
|
settings: components["schemas"]["RecordValue_for_Primitive"];
|
|
1659
|
-
/**
|
|
1660
|
-
|
|
1905
|
+
/**
|
|
1906
|
+
* @description Ignored for existing nodes, because a node's test id never changes. Defaults to the node id.
|
|
1907
|
+
* @default null
|
|
1908
|
+
*/
|
|
1909
|
+
testId: components["schemas"]["FormatNodeTestId"] | null;
|
|
1661
1910
|
typeHints: components["schemas"]["TypeHints_for_Type_and_ParamRef"];
|
|
1662
1911
|
/** Format: int64 */
|
|
1663
1912
|
xPos: number;
|
|
@@ -1666,14 +1915,11 @@ declare interface components {
|
|
|
1666
1915
|
};
|
|
1667
1916
|
/** Format: uuid */
|
|
1668
1917
|
FormatNodeId: FormatNodeId;
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1918
|
+
/** @description The node `format_node_id` in the format instance `format_instance_id`. */
|
|
1919
|
+
FormatNodeInstanceId: {
|
|
1920
|
+
formatInstanceId: components["schemas"]["FormatInstanceHash"];
|
|
1672
1921
|
formatNodeId: components["schemas"]["FormatNodeId"];
|
|
1673
|
-
id: components["schemas"]["FormatNodeInstanceId"];
|
|
1674
1922
|
};
|
|
1675
|
-
/** Format: int64 */
|
|
1676
|
-
FormatNodeInstanceId: FormatNodeInstanceId;
|
|
1677
1923
|
/** Format: uuid */
|
|
1678
1924
|
FormatNodeTestId: FormatNodeTestId;
|
|
1679
1925
|
FormatPathVariables_for_CommonWorkspaceId: {
|
|
@@ -1692,6 +1938,14 @@ declare interface components {
|
|
|
1692
1938
|
/** @constant */
|
|
1693
1939
|
type: "non-unique-node-id";
|
|
1694
1940
|
data: components["schemas"]["FormatNodeId"];
|
|
1941
|
+
} | {
|
|
1942
|
+
/** @constant */
|
|
1943
|
+
type: "non-unique-test-id";
|
|
1944
|
+
data: components["schemas"]["FormatNodeTestId"];
|
|
1945
|
+
} | {
|
|
1946
|
+
/** @constant */
|
|
1947
|
+
type: "non-unique-connection";
|
|
1948
|
+
data: components["schemas"]["FormatConnectionDTO"];
|
|
1695
1949
|
} | {
|
|
1696
1950
|
/** @constant */
|
|
1697
1951
|
type: "parent-does-not-exist";
|
|
@@ -1737,10 +1991,6 @@ declare interface components {
|
|
|
1737
1991
|
FormatRevalidationError: {
|
|
1738
1992
|
invalidatedFormats: components["schemas"]["FormatId"][];
|
|
1739
1993
|
};
|
|
1740
|
-
FormatRuntimeError: {
|
|
1741
|
-
location: components["schemas"]["FormatNodeInstanceDAO"];
|
|
1742
|
-
nodeError: components["schemas"]["NodeRuntimeError"];
|
|
1743
|
-
};
|
|
1744
1994
|
FormatTest: {
|
|
1745
1995
|
description: string;
|
|
1746
1996
|
formatId: components["schemas"]["FormatId"];
|
|
@@ -1825,8 +2075,8 @@ declare interface components {
|
|
|
1825
2075
|
data: components["schemas"]["ImportArchiveError"];
|
|
1826
2076
|
} | {
|
|
1827
2077
|
/** @constant */
|
|
1828
|
-
type: "
|
|
1829
|
-
data: components["schemas"]["
|
|
2078
|
+
type: "node-error";
|
|
2079
|
+
data: components["schemas"]["LocatedNodeError"];
|
|
1830
2080
|
} | {
|
|
1831
2081
|
/** @constant */
|
|
1832
2082
|
type: "outputs-do-not-match";
|
|
@@ -1904,7 +2154,12 @@ declare interface components {
|
|
|
1904
2154
|
name: string;
|
|
1905
2155
|
};
|
|
1906
2156
|
};
|
|
1907
|
-
/**
|
|
2157
|
+
/**
|
|
2158
|
+
* Format: uuid
|
|
2159
|
+
* @description Identifies a format test. Random ([Self::new_random]) from the endpoint, or [Self::nth_imported] for the tests
|
|
2160
|
+
* of an imported format.
|
|
2161
|
+
* Deserializing one only yields a reference to an existing format test; it does not check that it exists.
|
|
2162
|
+
*/
|
|
1908
2163
|
FormatTestId: FormatTestId;
|
|
1909
2164
|
FormatTestPathVariables_for_CommonWorkspaceId: {
|
|
1910
2165
|
eventId: components["schemas"]["EventId"];
|
|
@@ -1929,7 +2184,7 @@ declare interface components {
|
|
|
1929
2184
|
* @description The id of the root format instance that for the tests.
|
|
1930
2185
|
* The results of this format instance are in [Self::format_instance_states]
|
|
1931
2186
|
*/
|
|
1932
|
-
testFormatInstanceId: components["schemas"]["
|
|
2187
|
+
testFormatInstanceId: components["schemas"]["FormatInstanceHash"];
|
|
1933
2188
|
};
|
|
1934
2189
|
/** @description Represents a state in which the format is not valid for execution but can be stored in the db. */
|
|
1935
2190
|
FormatValidationError: {
|
|
@@ -2050,12 +2305,11 @@ declare interface components {
|
|
|
2050
2305
|
*/
|
|
2051
2306
|
parentFormatNodeFolderPath: string[];
|
|
2052
2307
|
};
|
|
2308
|
+
/** @description The node `format_node_id` in the format instance `format_instance_id`. */
|
|
2053
2309
|
FullNodeInstance: {
|
|
2054
2310
|
formatId: components["schemas"]["FormatId"];
|
|
2055
|
-
formatInstanceId: components["schemas"]["
|
|
2056
|
-
/** @description Set if the node instance is a child of at least one NodeFolderNode */
|
|
2311
|
+
formatInstanceId: components["schemas"]["FormatInstanceHash"];
|
|
2057
2312
|
formatNodeId: components["schemas"]["FormatNodeId"];
|
|
2058
|
-
id: components["schemas"]["FormatNodeInstanceId"];
|
|
2059
2313
|
};
|
|
2060
2314
|
GTFilterKind: {
|
|
2061
2315
|
/** @constant */
|
|
@@ -2085,15 +2339,8 @@ declare interface components {
|
|
|
2085
2339
|
gameFormatId: components["schemas"]["GameFormatId"];
|
|
2086
2340
|
id: components["schemas"]["GameId"];
|
|
2087
2341
|
name: string;
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
owningFormatNodeInstanceId?: components["schemas"]["FormatNodeInstanceId"] | null;
|
|
2091
|
-
/**
|
|
2092
|
-
* @description True if
|
|
2093
|
-
* - created by a node but the last execution of the node did not touch this game.
|
|
2094
|
-
* - Or the owning node was deleted.
|
|
2095
|
-
*/
|
|
2096
|
-
stale: boolean;
|
|
2342
|
+
owner: components["schemas"]["ContentOwner"];
|
|
2343
|
+
state: components["schemas"]["ContentState"];
|
|
2097
2344
|
};
|
|
2098
2345
|
GameDTO: {
|
|
2099
2346
|
attributes: components["schemas"]["RecordValue_for_Primitive"];
|
|
@@ -2144,7 +2391,11 @@ declare interface components {
|
|
|
2144
2391
|
postProcessingSteps: components["schemas"]["GameFormatPostProcessingStep"][];
|
|
2145
2392
|
resultListColumns: components["schemas"]["RecordTypeWithDefaults"];
|
|
2146
2393
|
};
|
|
2147
|
-
/**
|
|
2394
|
+
/**
|
|
2395
|
+
* Format: uuid
|
|
2396
|
+
* @description Identifies a game format. Random ([Self::new_random]) from the endpoint, or derived by `ImportArchiveMutation`.
|
|
2397
|
+
* Deserializing one only yields a reference to an existing game format; it does not check that it exists.
|
|
2398
|
+
*/
|
|
2148
2399
|
GameFormatId: GameFormatId;
|
|
2149
2400
|
GameFormatPathVariables_for_CommonWorkspaceId: {
|
|
2150
2401
|
eventId: components["schemas"]["EventId"];
|
|
@@ -2172,7 +2423,16 @@ declare interface components {
|
|
|
2172
2423
|
expression: string;
|
|
2173
2424
|
};
|
|
2174
2425
|
};
|
|
2175
|
-
/**
|
|
2426
|
+
/**
|
|
2427
|
+
* Format: uuid
|
|
2428
|
+
* @description Identifies a game, the primary key of `games`. Comes from one of:
|
|
2429
|
+
* - [Self::new_random]: a game of the user. The endpoint picks the id and the mutation carries it.
|
|
2430
|
+
* - [Self::of_node]: a game of a node, see [GameDAO::derived_id]. Executing a graph creates the same ids every time.
|
|
2431
|
+
* - [GameDAO::keep_as_user_copy]: a game of a node that the user kept when the node instance got deleted.
|
|
2432
|
+
*
|
|
2433
|
+
* Deserializing one only yields a reference to an existing game; it does not check that it exists or how it was made.
|
|
2434
|
+
* Changing a derivation changes what replaying a log produces and needs an `ENGINE_VERSION` increment.
|
|
2435
|
+
*/
|
|
2176
2436
|
GameId: GameId;
|
|
2177
2437
|
GameNodeDTO: {
|
|
2178
2438
|
/**
|
|
@@ -2234,7 +2494,7 @@ declare interface components {
|
|
|
2234
2494
|
/** @enum {string} */
|
|
2235
2495
|
GenderGuess: "male" | "female" | "may-be-male" | "may-be-female" | "both-male-female" | "not-sure" | "not-found";
|
|
2236
2496
|
GetFormatInstancesStateQuery: {
|
|
2237
|
-
formatInstanceIds: components["schemas"]["
|
|
2497
|
+
formatInstanceIds: components["schemas"]["FormatInstanceHash"][];
|
|
2238
2498
|
};
|
|
2239
2499
|
GetIsBibUniqueQuery: {
|
|
2240
2500
|
bib: components["schemas"]["BIB"];
|
|
@@ -2343,11 +2603,12 @@ declare interface components {
|
|
|
2343
2603
|
*/
|
|
2344
2604
|
linkTemplate: boolean;
|
|
2345
2605
|
/**
|
|
2346
|
-
* Format: uint64
|
|
2347
2606
|
* @description When `Some`, regenerates format node ids from this seed (deterministic log replay).
|
|
2348
2607
|
* When `None`, preserves archive node ids — for one-shot imports such as format tests.
|
|
2608
|
+
* Mixed with the event, the ids of the imported entities derive from it too. Random, picked when the mutation is
|
|
2609
|
+
* built; reusing a seed in the same event reproduces the same ids.
|
|
2349
2610
|
*/
|
|
2350
|
-
nodeUuidSeed?:
|
|
2611
|
+
nodeUuidSeed?: components["schemas"]["Seed"] | null;
|
|
2351
2612
|
/** @default as-format */
|
|
2352
2613
|
rootFormat: components["schemas"]["RootFormatImport"];
|
|
2353
2614
|
};
|
|
@@ -2512,6 +2773,14 @@ declare interface components {
|
|
|
2512
2773
|
* Can be created from a single character (e.g. `'T'`) or a string (hashed for multi-char names).
|
|
2513
2774
|
*/
|
|
2514
2775
|
LocalParamID: number;
|
|
2776
|
+
/** @description An error that originated in a node, identified independently of the unstable `NodeIndex`. */
|
|
2777
|
+
LocatedNodeError: {
|
|
2778
|
+
error: components["schemas"]["NodeRuntimeError"];
|
|
2779
|
+
eventId: components["schemas"]["EventId"];
|
|
2780
|
+
formatId: components["schemas"]["FormatId"];
|
|
2781
|
+
formatInstanceId: components["schemas"]["FormatInstanceHash"];
|
|
2782
|
+
formatNodeId: components["schemas"]["FormatNodeId"];
|
|
2783
|
+
};
|
|
2515
2784
|
/** Format: uuid */
|
|
2516
2785
|
LogBatchId: string;
|
|
2517
2786
|
LogEntry: {
|
|
@@ -2666,6 +2935,10 @@ declare interface components {
|
|
|
2666
2935
|
/** @constant */
|
|
2667
2936
|
type: "update-full-resolved-game-table-layer-one";
|
|
2668
2937
|
data: components["schemas"]["UpdateTableRowsLayerOneMutation"];
|
|
2938
|
+
} | {
|
|
2939
|
+
/** @constant */
|
|
2940
|
+
type: "remove-hidden-row";
|
|
2941
|
+
data: components["schemas"]["RemoveHiddenRowMutation"];
|
|
2669
2942
|
} | {
|
|
2670
2943
|
/** @constant */
|
|
2671
2944
|
type: "add-extension";
|
|
@@ -2730,10 +3003,10 @@ declare interface components {
|
|
|
2730
3003
|
name: string;
|
|
2731
3004
|
nodeId: components["schemas"]["FormatNodeId"];
|
|
2732
3005
|
/**
|
|
2733
|
-
*
|
|
2734
|
-
*
|
|
3006
|
+
* @description Persist the seed so later log entries can refer to the same copied node IDs on replay. Random, picked when the
|
|
3007
|
+
* mutation is built; the id of the copied format derives from it too ([FormatId::of_copy]).
|
|
2735
3008
|
*/
|
|
2736
|
-
nodeUuidSeed:
|
|
3009
|
+
nodeUuidSeed: components["schemas"]["Seed"];
|
|
2737
3010
|
};
|
|
2738
3011
|
MakeNodeSingleUserRequest: {
|
|
2739
3012
|
/** @description The exact name to give the copied format. */
|
|
@@ -2806,7 +3079,40 @@ declare interface components {
|
|
|
2806
3079
|
nodeType: components["schemas"]["NodeType"];
|
|
2807
3080
|
test: components["schemas"]["FormatTestDefinition"];
|
|
2808
3081
|
};
|
|
3082
|
+
NodeErrorState_for_NodeRuntimeError: {
|
|
3083
|
+
/** @constant */
|
|
3084
|
+
type: "ok";
|
|
3085
|
+
} | {
|
|
3086
|
+
/** @constant */
|
|
3087
|
+
type: "partial-errors";
|
|
3088
|
+
data: {
|
|
3089
|
+
errorPorts: {
|
|
3090
|
+
[key: string]: components["schemas"]["NodeRuntimeError"];
|
|
3091
|
+
};
|
|
3092
|
+
};
|
|
3093
|
+
} | {
|
|
3094
|
+
/** @constant */
|
|
3095
|
+
type: "full-error";
|
|
3096
|
+
data: components["schemas"]["NodeRuntimeError"];
|
|
3097
|
+
} | {
|
|
3098
|
+
/** @constant */
|
|
3099
|
+
type: "skipped";
|
|
3100
|
+
data: components["schemas"]["NodeRuntimeError"];
|
|
3101
|
+
};
|
|
2809
3102
|
NodeHasContentError: null;
|
|
3103
|
+
/**
|
|
3104
|
+
* Format: uuid
|
|
3105
|
+
* @description Identifies a node instance: a node of a format within one [FormatInstanceHash].
|
|
3106
|
+
*
|
|
3107
|
+
* Derived from the format instance and the node id, see [Self::of]. It is the parent of the format instances the node
|
|
3108
|
+
* creates ([FormatInstanceHash::new_child]) and the origin that table lineage attributes the steps of the node to. Like
|
|
3109
|
+
* [FormatInstanceHash], new hashes only come from the derivation, deserializing only yields a reference, and changing
|
|
3110
|
+
* the derivation needs an `ENGINE_VERSION` increment.
|
|
3111
|
+
*
|
|
3112
|
+
* A node that gets a new id, like the nodes copied by `MakeNodeSingleUserMutation`, gets new node instance hashes.
|
|
3113
|
+
* Everything derived from them has to move along.
|
|
3114
|
+
*/
|
|
3115
|
+
NodeInstanceHash: NodeInstanceHash;
|
|
2810
3116
|
NodeInstanceStateDTO: {
|
|
2811
3117
|
/** @description Effective execution folder of this node, used as the root of its owned-content tree. */
|
|
2812
3118
|
folderPath: components["schemas"]["FolderPath"];
|
|
@@ -2846,6 +3152,10 @@ declare interface components {
|
|
|
2846
3152
|
name: string;
|
|
2847
3153
|
};
|
|
2848
3154
|
};
|
|
3155
|
+
/**
|
|
3156
|
+
* @description Error that happened while executing a node. Caused by invalid input to
|
|
3157
|
+
* the node or other factors caused by invalid use of the node.
|
|
3158
|
+
*/
|
|
2849
3159
|
NodeRuntimeError: {
|
|
2850
3160
|
/** @constant */
|
|
2851
3161
|
type: "table-kind-mismatch";
|
|
@@ -2881,15 +3191,6 @@ declare interface components {
|
|
|
2881
3191
|
} | {
|
|
2882
3192
|
/** @constant */
|
|
2883
3193
|
type: "integer-overflow";
|
|
2884
|
-
} | {
|
|
2885
|
-
/** @constant */
|
|
2886
|
-
type: "mux-invalid-multiplexing-strategy";
|
|
2887
|
-
} | {
|
|
2888
|
-
/** @constant */
|
|
2889
|
-
type: "mux-competitor-not-unique";
|
|
2890
|
-
data: {
|
|
2891
|
-
competitorId: components["schemas"]["CompetitorId"];
|
|
2892
|
-
};
|
|
2893
3194
|
} | {
|
|
2894
3195
|
/** @constant */
|
|
2895
3196
|
type: "record-field-does-not-exist";
|
|
@@ -2914,10 +3215,6 @@ declare interface components {
|
|
|
2914
3215
|
/** Format: uint */
|
|
2915
3216
|
rowIndex: number;
|
|
2916
3217
|
};
|
|
2917
|
-
} | {
|
|
2918
|
-
/** @constant */
|
|
2919
|
-
type: "closure-failed";
|
|
2920
|
-
data: components["schemas"]["FormatRuntimeError"];
|
|
2921
3218
|
} | {
|
|
2922
3219
|
/** @constant */
|
|
2923
3220
|
type: "invalid-row-types";
|
|
@@ -3850,7 +4147,6 @@ declare interface components {
|
|
|
3850
4147
|
type: "unterminated-string";
|
|
3851
4148
|
};
|
|
3852
4149
|
PatchTableStateMutation: {
|
|
3853
|
-
asOwner: components["schemas"]["TableOwnerDTO"];
|
|
3854
4150
|
/** @description None resets the table state */
|
|
3855
4151
|
state?: components["schemas"]["TableState"] | null;
|
|
3856
4152
|
tableId: components["schemas"]["TableId"];
|
|
@@ -3990,12 +4286,7 @@ declare interface components {
|
|
|
3990
4286
|
QueryStyle: "form" | "spaceDelimited" | "pipeDelimited" | "deepObject";
|
|
3991
4287
|
RandomizeClassPlacesMutation: {
|
|
3992
4288
|
classId: components["schemas"]["ClassId"];
|
|
3993
|
-
|
|
3994
|
-
* Format: uint64
|
|
3995
|
-
* @description Defaults so log entries written before the seed existed still deserialize.
|
|
3996
|
-
* @default 0
|
|
3997
|
-
*/
|
|
3998
|
-
seed: number;
|
|
4289
|
+
seed: components["schemas"]["Seed"];
|
|
3999
4290
|
};
|
|
4000
4291
|
/** @enum {string} */
|
|
4001
4292
|
RecordFieldOp: "read-field" | "write-field";
|
|
@@ -4231,6 +4522,11 @@ declare interface components {
|
|
|
4231
4522
|
eventId: components["schemas"]["EventId"];
|
|
4232
4523
|
identifier: string;
|
|
4233
4524
|
};
|
|
4525
|
+
/** @description Removes a row nodes don't see, see [ResolvedTable::hidden_rows]. */
|
|
4526
|
+
RemoveHiddenRowMutation: {
|
|
4527
|
+
competitorId: components["schemas"]["CompetitorId"];
|
|
4528
|
+
tableId: components["schemas"]["TableId"];
|
|
4529
|
+
};
|
|
4234
4530
|
RemoveTargetQuery: {
|
|
4235
4531
|
/**
|
|
4236
4532
|
* @description Only forget the target, without pushing the remaining rows and resetting the remote.
|
|
@@ -4262,6 +4558,8 @@ declare interface components {
|
|
|
4262
4558
|
id: components["schemas"]["LogId"];
|
|
4263
4559
|
/** Format: date-time */
|
|
4264
4560
|
timestamp: string;
|
|
4561
|
+
/** Format: uint32 */
|
|
4562
|
+
version: number;
|
|
4265
4563
|
};
|
|
4266
4564
|
ReplicationConflict: {
|
|
4267
4565
|
/** @constant */
|
|
@@ -4271,6 +4569,12 @@ declare interface components {
|
|
|
4271
4569
|
/** @constant */
|
|
4272
4570
|
type: "hash-mismatch";
|
|
4273
4571
|
head: components["schemas"]["LogHead"];
|
|
4572
|
+
} | {
|
|
4573
|
+
/** @constant */
|
|
4574
|
+
type: "unsupported-version";
|
|
4575
|
+
id: components["schemas"]["LogId"];
|
|
4576
|
+
/** Format: uint32 */
|
|
4577
|
+
version: number;
|
|
4274
4578
|
};
|
|
4275
4579
|
ReplicationHead: {
|
|
4276
4580
|
/** Format: uuid */
|
|
@@ -4315,6 +4619,13 @@ declare interface components {
|
|
|
4315
4619
|
Resolve: {
|
|
4316
4620
|
keep: components["schemas"]["Side"];
|
|
4317
4621
|
};
|
|
4622
|
+
/** @description A table as nodes see it, without the results whose competitor is not in the entry of their game. */
|
|
4623
|
+
ResolvedTable: {
|
|
4624
|
+
/** @description The results whose competitor is not in the entry of their game. Nodes don't see them. */
|
|
4625
|
+
hiddenRows: components["schemas"]["Row"][];
|
|
4626
|
+
rows: components["schemas"]["Rows_for_Sorted"];
|
|
4627
|
+
state: components["schemas"]["TableState"];
|
|
4628
|
+
};
|
|
4318
4629
|
Response: {
|
|
4319
4630
|
/**
|
|
4320
4631
|
* @description REQUIRED. A description of the response.
|
|
@@ -4366,7 +4677,7 @@ declare interface components {
|
|
|
4366
4677
|
RootFormatResponse: {
|
|
4367
4678
|
rootFormat: components["schemas"]["FullFormatDAO"];
|
|
4368
4679
|
/** @description None if the format was never executed */
|
|
4369
|
-
rootFormatInstanceId?: components["schemas"]["
|
|
4680
|
+
rootFormatInstanceId?: components["schemas"]["FormatInstanceHash"] | null;
|
|
4370
4681
|
};
|
|
4371
4682
|
/** @description Rows can only be created and moved by this crate, so that their [Origin] stays truthful. */
|
|
4372
4683
|
Row: Row;
|
|
@@ -4388,10 +4699,6 @@ declare interface components {
|
|
|
4388
4699
|
steps: components["schemas"]["Step"][];
|
|
4389
4700
|
tableId: components["schemas"]["TableId"];
|
|
4390
4701
|
};
|
|
4391
|
-
RowLineageQuery: {
|
|
4392
|
-
/** @description The competitor of the row */
|
|
4393
|
-
competitorId: components["schemas"]["CompetitorId"];
|
|
4394
|
-
};
|
|
4395
4702
|
RowMutationChangeEvent: {
|
|
4396
4703
|
gameTableId: components["schemas"]["TableId"];
|
|
4397
4704
|
};
|
|
@@ -4404,11 +4711,12 @@ declare interface components {
|
|
|
4404
4711
|
batch: number;
|
|
4405
4712
|
competitorId: components["schemas"]["CompetitorId"];
|
|
4406
4713
|
gameTableId: components["schemas"]["TableId"];
|
|
4407
|
-
|
|
4714
|
+
/** @description Counts per table, so it is unique only together with `game_table_id`. */
|
|
4715
|
+
idx: components["schemas"]["RowMutationIdx"];
|
|
4408
4716
|
kind: components["schemas"]["RowMutationKind"];
|
|
4409
4717
|
};
|
|
4410
4718
|
/** Format: int64 */
|
|
4411
|
-
|
|
4719
|
+
RowMutationIdx: RowMutationIdx;
|
|
4412
4720
|
RowMutationKind: {
|
|
4413
4721
|
/** @constant */
|
|
4414
4722
|
type: "set-record-field";
|
|
@@ -4450,6 +4758,10 @@ declare interface components {
|
|
|
4450
4758
|
competitorId: number;
|
|
4451
4759
|
kind: components["schemas"]["RowMutationKind"];
|
|
4452
4760
|
};
|
|
4761
|
+
RowQuery: {
|
|
4762
|
+
/** @description The competitor of the row */
|
|
4763
|
+
competitorId: components["schemas"]["CompetitorId"];
|
|
4764
|
+
};
|
|
4453
4765
|
RowSummary: {
|
|
4454
4766
|
description: string;
|
|
4455
4767
|
hash: number[];
|
|
@@ -4573,8 +4885,18 @@ declare interface components {
|
|
|
4573
4885
|
} & {
|
|
4574
4886
|
[key: string]: unknown;
|
|
4575
4887
|
});
|
|
4888
|
+
/**
|
|
4889
|
+
* Format: uuid
|
|
4890
|
+
* @description The random seed a log entry stores so that replaying it derives the same ids, see [IdSeed].
|
|
4891
|
+
*
|
|
4892
|
+
* A uuid instead of a `u64` (as it used to be): JSON clients like the frontend read numbers as JavaScript doubles,
|
|
4893
|
+
* which round integers above 2^53, so a seed that went through them derived different ids on replay. A uuid is
|
|
4894
|
+
* serialized as a string and survives that unchanged.
|
|
4895
|
+
*/
|
|
4896
|
+
Seed: string;
|
|
4576
4897
|
SemVer: string;
|
|
4577
4898
|
SerializableNodeResult: {
|
|
4899
|
+
errorState: components["schemas"]["NodeErrorState_for_NodeRuntimeError"];
|
|
4578
4900
|
values: components["schemas"]["SerializablePortValues_for_OutputIdx"];
|
|
4579
4901
|
};
|
|
4580
4902
|
SerializableNonPrimitiveValue: {
|
|
@@ -4592,8 +4914,8 @@ declare interface components {
|
|
|
4592
4914
|
} | {
|
|
4593
4915
|
/** @constant */
|
|
4594
4916
|
type: "class";
|
|
4595
|
-
/** Format:
|
|
4596
|
-
data:
|
|
4917
|
+
/** Format: uuid */
|
|
4918
|
+
data: string;
|
|
4597
4919
|
} | {
|
|
4598
4920
|
/** @constant */
|
|
4599
4921
|
type: "closure";
|
|
@@ -4785,10 +5107,11 @@ declare interface components {
|
|
|
4785
5107
|
};
|
|
4786
5108
|
Step: {
|
|
4787
5109
|
/**
|
|
4788
|
-
* Format:
|
|
4789
|
-
* @description Whoever ran the operation, see [Origin::attributed]
|
|
5110
|
+
* Format: uuid
|
|
5111
|
+
* @description Whoever ran the operation, see [Origin::attributed]: the engine's `NodeInstanceHash`, a raw uuid because this
|
|
5112
|
+
* crate doesn't know engine types. None until it is attributed.
|
|
4790
5113
|
*/
|
|
4791
|
-
node?:
|
|
5114
|
+
node?: string | null;
|
|
4792
5115
|
op: components["schemas"]["StepOp"];
|
|
4793
5116
|
};
|
|
4794
5117
|
/** @description An operation that moved rows between or within tables. */
|
|
@@ -4824,19 +5147,8 @@ declare interface components {
|
|
|
4824
5147
|
/** @description The owner of the tables data (items, attributes and state) */
|
|
4825
5148
|
layerOneOwner: components["schemas"]["TableOwner"];
|
|
4826
5149
|
name: string;
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
* @description The key provided by the creating node. None if not created by a node.
|
|
4830
|
-
*/
|
|
4831
|
-
nodeKey?: number | null;
|
|
4832
|
-
/** @description Set only if the table is owned by a node and is not part of a game. */
|
|
4833
|
-
owningNodeInstanceId?: components["schemas"]["FormatNodeInstanceId"] | null;
|
|
4834
|
-
/**
|
|
4835
|
-
* @description True if
|
|
4836
|
-
* - created by a node but the last execution of the node did not touch this table.
|
|
4837
|
-
* - Or the owning node was deleted.
|
|
4838
|
-
*/
|
|
4839
|
-
stale: boolean;
|
|
5150
|
+
owner: components["schemas"]["ContentOwner"];
|
|
5151
|
+
state: components["schemas"]["ContentState"];
|
|
4840
5152
|
/** @description Set by nodes. */
|
|
4841
5153
|
stateLayerOne: components["schemas"]["TableState"];
|
|
4842
5154
|
/** @description Overwrites layer one if Some */
|
|
@@ -4850,7 +5162,18 @@ declare interface components {
|
|
|
4850
5162
|
state?: components["schemas"]["TableState"] | null;
|
|
4851
5163
|
tableKind: components["schemas"]["TableKind"];
|
|
4852
5164
|
};
|
|
4853
|
-
/**
|
|
5165
|
+
/**
|
|
5166
|
+
* Format: uuid
|
|
5167
|
+
* @description Identifies a table, the primary key of `tables`. Comes from one of:
|
|
5168
|
+
* - [Self::new_random]: a table the user adds. The endpoint picks the id and the mutation carries it.
|
|
5169
|
+
* - [Self::of_user_game]: the entry and result table of a game of the user.
|
|
5170
|
+
* - [Self::of_game] and [Self::of_node]: a table of a node, see [TableDAO::derived_id]. Executing a graph creates the
|
|
5171
|
+
* same ids every time.
|
|
5172
|
+
* - [TableDAO::keep_as_user_copy]: a table of a node that the user kept when the node instance got deleted.
|
|
5173
|
+
*
|
|
5174
|
+
* Deserializing one only yields a reference to an existing table; it does not check that it exists or how it was
|
|
5175
|
+
* made. Changing a derivation changes what replaying a log produces and needs an `ENGINE_VERSION` increment.
|
|
5176
|
+
*/
|
|
4854
5177
|
TableId: TableId;
|
|
4855
5178
|
TableItemsMutationDTO: {
|
|
4856
5179
|
challenge: components["schemas"]["TableMutationChallenge"];
|
|
@@ -4861,8 +5184,12 @@ declare interface components {
|
|
|
4861
5184
|
* @enum {string}
|
|
4862
5185
|
*/
|
|
4863
5186
|
TableKind: "entry-list" | "result-list" | "other";
|
|
4864
|
-
/**
|
|
4865
|
-
TableLineageId:
|
|
5187
|
+
/** @description The way number `idx` into `table_id`. */
|
|
5188
|
+
TableLineageId: {
|
|
5189
|
+
/** Format: int64 */
|
|
5190
|
+
idx: number;
|
|
5191
|
+
tableId: components["schemas"]["TableId"];
|
|
5192
|
+
};
|
|
4866
5193
|
TableMutationChallenge: {
|
|
4867
5194
|
/** @constant */
|
|
4868
5195
|
type: "force-push";
|
|
@@ -4871,9 +5198,9 @@ declare interface components {
|
|
|
4871
5198
|
type: "controlled-push";
|
|
4872
5199
|
/**
|
|
4873
5200
|
* @description If None, expect this mutation to be the first one.
|
|
4874
|
-
* Otherwise expect `head` to be the id of the currently most recent mutation.
|
|
5201
|
+
* Otherwise expect `head` to be the id of the currently most recent mutation of the table.
|
|
4875
5202
|
*/
|
|
4876
|
-
head?: components["schemas"]["
|
|
5203
|
+
head?: components["schemas"]["RowMutationIdx"] | null;
|
|
4877
5204
|
};
|
|
4878
5205
|
/**
|
|
4879
5206
|
* @description Overwrites a table. See [`TableOverwrite::for_game_result`]/[`TableOverwrite::for_game_entry`]
|
|
@@ -4896,15 +5223,7 @@ declare interface components {
|
|
|
4896
5223
|
nodeId: components["schemas"]["FormatNodeTestId"];
|
|
4897
5224
|
};
|
|
4898
5225
|
/** @enum {string} */
|
|
4899
|
-
TableOwner: "
|
|
4900
|
-
/**
|
|
4901
|
-
* @description Same as [TableOwner] but without [TableOwner::None] and [TableOwner::Nodes] as users can't set these.
|
|
4902
|
-
* @enum {string}
|
|
4903
|
-
*/
|
|
4904
|
-
TableOwnerDTO: "user" | "race-office";
|
|
4905
|
-
TableOwnerQuery: {
|
|
4906
|
-
asOwner: components["schemas"]["TableOwnerDTO"];
|
|
4907
|
-
};
|
|
5226
|
+
TableOwner: "nodes" | "user";
|
|
4908
5227
|
TablePathVariables_for_CommonWorkspaceId: {
|
|
4909
5228
|
eventId: components["schemas"]["EventId"];
|
|
4910
5229
|
tableId: components["schemas"]["TableId"];
|
|
@@ -4975,17 +5294,20 @@ declare interface components {
|
|
|
4975
5294
|
/** Format: uuid */
|
|
4976
5295
|
id: string;
|
|
4977
5296
|
remoteWorkspaceId: components["schemas"]["CommonWorkspaceId"];
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
5297
|
+
status: components["schemas"]["TargetStatusDTO"];
|
|
5298
|
+
/** @description Base URL of the web app of the target server, as it last reported it. */
|
|
5299
|
+
uiUrl?: string | null;
|
|
4981
5300
|
};
|
|
4982
5301
|
TargetPath: {
|
|
4983
5302
|
/** Format: uuid */
|
|
4984
5303
|
targetId: string;
|
|
4985
5304
|
};
|
|
4986
|
-
|
|
5305
|
+
/** @description The status of a target as clients see it, so up-to-date can not have rows behind. */
|
|
5306
|
+
TargetStatusDTO: {
|
|
4987
5307
|
/** @constant */
|
|
4988
5308
|
type: "pushing";
|
|
5309
|
+
/** Format: int64 */
|
|
5310
|
+
rowsBehind?: number | null;
|
|
4989
5311
|
} | {
|
|
4990
5312
|
/** @constant */
|
|
4991
5313
|
type: "up-to-date";
|
|
@@ -4993,6 +5315,8 @@ declare interface components {
|
|
|
4993
5315
|
/** @constant */
|
|
4994
5316
|
type: "retrying";
|
|
4995
5317
|
lastError: components["schemas"]["SourceError"];
|
|
5318
|
+
/** Format: int64 */
|
|
5319
|
+
rowsBehind?: number | null;
|
|
4996
5320
|
} | {
|
|
4997
5321
|
/** @constant */
|
|
4998
5322
|
type: "conflicted";
|
|
@@ -5433,7 +5757,6 @@ declare interface components {
|
|
|
5433
5757
|
variant: components["schemas"]["TableVariant"];
|
|
5434
5758
|
};
|
|
5435
5759
|
UpdateTableRowsLayerOneMutation: {
|
|
5436
|
-
asOwner: components["schemas"]["TableOwnerDTO"];
|
|
5437
5760
|
rows: components["schemas"]["Rows_for_Sorted"];
|
|
5438
5761
|
tableId: components["schemas"]["TableId"];
|
|
5439
5762
|
};
|
|
@@ -5446,8 +5769,20 @@ declare interface components {
|
|
|
5446
5769
|
ValidationErrorKind_for_Type: ValidationErrorKind<Type>;
|
|
5447
5770
|
/** @description A validation error with its location and kind. */
|
|
5448
5771
|
ValidationError_for_Type: ValidationError<Type>;
|
|
5772
|
+
/**
|
|
5773
|
+
* Important
|
|
5774
|
+
* @description Changes in here are breaking changes for logs
|
|
5775
|
+
*/
|
|
5449
5776
|
Value_for_Primitive: Value<Primitive>;
|
|
5777
|
+
/**
|
|
5778
|
+
* Important
|
|
5779
|
+
* @description Changes in here are breaking changes for logs
|
|
5780
|
+
*/
|
|
5450
5781
|
Value_for_SerializableNonPrimitiveValue: Value<SerializableNonPrimitiveValue>;
|
|
5782
|
+
/**
|
|
5783
|
+
* @description The ids inside an archive (in its format DTO and here) are archive-local join keys, not ids of a workspace: each
|
|
5784
|
+
* maps to the [Archive::uuid] of the dependency it refers to. Importing gives the entities new ids.
|
|
5785
|
+
*/
|
|
5451
5786
|
Wiring: {
|
|
5452
5787
|
classes: {
|
|
5453
5788
|
[key: string]: string;
|
|
@@ -5479,6 +5814,16 @@ declare interface components {
|
|
|
5479
5814
|
WorkspacePathVariables_for_CommonWorkspaceId: {
|
|
5480
5815
|
workspaceId: components["schemas"]["CommonWorkspaceId"];
|
|
5481
5816
|
};
|
|
5817
|
+
/** @enum {string} */
|
|
5818
|
+
WorkspaceState: "normal" | "checked-out" | "replication-target";
|
|
5819
|
+
/** @description The state of a workspace that clients display live. More workspace state goes here. */
|
|
5820
|
+
WorkspaceStateDTO: {
|
|
5821
|
+
/** @description All errors that originated in a node, sorted by their location. */
|
|
5822
|
+
nodeErrors: components["schemas"]["LocatedNodeError"][];
|
|
5823
|
+
replicationTargets: components["schemas"]["TargetDTO"][];
|
|
5824
|
+
/** @description Anything but normal makes the workspace read-only. */
|
|
5825
|
+
state: components["schemas"]["WorkspaceState"];
|
|
5826
|
+
};
|
|
5482
5827
|
};
|
|
5483
5828
|
responses: never;
|
|
5484
5829
|
parameters: never;
|
|
@@ -5492,7 +5837,7 @@ declare interface components {
|
|
|
5492
5837
|
* Besides the infer keyword, works almost exactly like conditional types in typescript.
|
|
5493
5838
|
* Checkout [this doc](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html) for a good guide on the ts conditionals.
|
|
5494
5839
|
*/
|
|
5495
|
-
declare interface Conditional<T, R> {
|
|
5840
|
+
export declare interface Conditional<T, R> {
|
|
5496
5841
|
tTest: TypeExpr<T, R>;
|
|
5497
5842
|
tTestBound: TypeExpr<T, R>;
|
|
5498
5843
|
tThen: TypeExpr<T, R>;
|
|
@@ -5503,21 +5848,69 @@ declare interface Conditional<T, R> {
|
|
|
5503
5848
|
infer: LocalParamID[];
|
|
5504
5849
|
}
|
|
5505
5850
|
|
|
5851
|
+
export declare function confirmDeleteItem(modalControls: ModalControls, itemName: string): Promise<boolean>;
|
|
5852
|
+
|
|
5506
5853
|
/**
|
|
5507
5854
|
* Named type arguments of a [`TypeExpr::Constructor`](crate::TypeExpr::Constructor).
|
|
5508
5855
|
*
|
|
5509
5856
|
* Duplicate keys last-win in place: the original insertion position is kept.
|
|
5510
5857
|
*/
|
|
5511
|
-
declare type ConstructorParams<T, R = ParamRef> = Record<string, TypeExpr<T, R>>;
|
|
5858
|
+
export declare type ConstructorParams<T, R = ParamRef> = Record<string, TypeExpr<T, R>>;
|
|
5859
|
+
|
|
5860
|
+
export declare interface ContextWasm {
|
|
5861
|
+
values: Record<string, Value<Primitive>>;
|
|
5862
|
+
}
|
|
5512
5863
|
|
|
5513
5864
|
export declare interface ContributionHandle<DTO> {
|
|
5514
5865
|
beforeSubmit: (dto: DTO) => Promise<DTO | null>;
|
|
5515
5866
|
}
|
|
5516
5867
|
|
|
5868
|
+
/** `createColumnHelper<AppTableFeatures, TData>()`, bound to `AppTable`'s feature registry. */
|
|
5869
|
+
export declare function createAppTableColumnHelper<TData extends RowData>(): ColumnHelper< {
|
|
5870
|
+
columnSizingFeature: TableFeature;
|
|
5871
|
+
rowSelectionFeature: TableFeature;
|
|
5872
|
+
rowSortingFeature: TableFeature;
|
|
5873
|
+
sortedRowModel: (table: Table_2<any, any>) => () => RowModel<any, any>;
|
|
5874
|
+
rowPaginationFeature: TableFeature;
|
|
5875
|
+
paginatedRowModel: (table: Table_2<any, any>) => () => RowModel<any, any>;
|
|
5876
|
+
columnVisibilityFeature: TableFeature;
|
|
5877
|
+
}, TData>;
|
|
5878
|
+
|
|
5879
|
+
export declare const DateTimeInput: FC<DateTimeInputProps>;
|
|
5880
|
+
|
|
5881
|
+
export declare interface DateTimeInputProps {
|
|
5882
|
+
value: Date | null;
|
|
5883
|
+
onChange?: (value: Date | null) => void;
|
|
5884
|
+
label?: string;
|
|
5885
|
+
disabled?: boolean;
|
|
5886
|
+
className?: string;
|
|
5887
|
+
/**
|
|
5888
|
+
* If true, empty input is accepted and mapped to null.
|
|
5889
|
+
* Default: false
|
|
5890
|
+
*/
|
|
5891
|
+
allowEmpty?: boolean;
|
|
5892
|
+
readonly?: boolean;
|
|
5893
|
+
}
|
|
5894
|
+
|
|
5895
|
+
export declare const DateTimeText: FC<DateTimeTextProps>;
|
|
5896
|
+
|
|
5897
|
+
export declare interface DateTimeTextProps {
|
|
5898
|
+
value: Date | number | string;
|
|
5899
|
+
className?: string;
|
|
5900
|
+
/** Shows the time passed since `value` ("5 minutes ago") instead of the timestamp. */
|
|
5901
|
+
relative?: boolean;
|
|
5902
|
+
}
|
|
5903
|
+
|
|
5517
5904
|
declare interface DetailedSupertypeDiagnostics<T> {
|
|
5518
5905
|
layers: NoSupertypeLayer<T>[];
|
|
5519
5906
|
}
|
|
5520
5907
|
|
|
5908
|
+
export declare interface DialogButton<T> {
|
|
5909
|
+
value: T;
|
|
5910
|
+
label: ReactNode;
|
|
5911
|
+
theme?: 'primary' | 'default' | 'danger';
|
|
5912
|
+
}
|
|
5913
|
+
|
|
5521
5914
|
/** Spelled out because the inferred `queryOptions` type references TanStack's unexported `dataTagSymbol`, which breaks the SDK's declaration rollup. */
|
|
5522
5915
|
export declare type EngineQueryOptions<T> = UnusedSkipTokenOptions<T, Error, T, readonly unknown[]> & {
|
|
5523
5916
|
queryKey: DataTag<readonly unknown[], T, Error>;
|
|
@@ -5528,13 +5921,27 @@ export declare type EngineQueryOptions<T> = UnusedSkipTokenOptions<T, Error, T,
|
|
|
5528
5921
|
*/
|
|
5529
5922
|
declare type ErasedScopedTypeRef<T> = { type: "Param"; data: ParamRef } | { type: "ScopedExpr"; data: { expr: TypeExpr<T, ErasedScopedTypeRef<T>> } };
|
|
5530
5923
|
|
|
5531
|
-
export declare type EventId = Brand<
|
|
5924
|
+
export declare type EventId = Brand<string, 'eventId'>;
|
|
5532
5925
|
|
|
5533
5926
|
export declare interface EventPath {
|
|
5534
5927
|
workspaceId: CommonWorkspaceId;
|
|
5535
5928
|
eventId: EventId;
|
|
5536
5929
|
}
|
|
5537
5930
|
|
|
5931
|
+
export declare type ExportableValue = string | number | boolean | null | undefined;
|
|
5932
|
+
|
|
5933
|
+
export declare class ExpressionInContextWasm {
|
|
5934
|
+
private constructor();
|
|
5935
|
+
free(): void;
|
|
5936
|
+
[Symbol.dispose](): void;
|
|
5937
|
+
/**
|
|
5938
|
+
* Runs the expression with the provided primitive values.
|
|
5939
|
+
* @throws {ExpressionInContextError} if the expression is not valid or
|
|
5940
|
+
* the returned value is non primitive and thus not serializable.
|
|
5941
|
+
*/
|
|
5942
|
+
run(context: ContextWasm): Value<Primitive>;
|
|
5943
|
+
}
|
|
5944
|
+
|
|
5538
5945
|
export declare type ExtensionContribution<K extends keyof ExtensionContributions> = {
|
|
5539
5946
|
/**
|
|
5540
5947
|
* must be unique per type
|
|
@@ -5610,19 +6017,23 @@ declare interface FieldTypeWithDefault {
|
|
|
5610
6017
|
default: Value | null;
|
|
5611
6018
|
}
|
|
5612
6019
|
|
|
5613
|
-
|
|
6020
|
+
/**
|
|
6021
|
+
* How a competitor is written out. Kept apart from the components that show competitors so both
|
|
6022
|
+
* the picker and the selector can reach it without importing each other.
|
|
6023
|
+
*/
|
|
6024
|
+
export declare function formatCompetitorName(competitor: CompetitorDAO): string;
|
|
5614
6025
|
|
|
5615
|
-
declare type
|
|
6026
|
+
declare type FormatGroupId = Brand<string, 'formatGroupId'>;
|
|
5616
6027
|
|
|
5617
|
-
|
|
6028
|
+
declare type FormatId = Brand<string, 'formatId'>;
|
|
5618
6029
|
|
|
5619
|
-
export declare type
|
|
6030
|
+
export declare type FormatInstanceHash = Brand<string, 'formatInstanceHash'>;
|
|
5620
6031
|
|
|
5621
|
-
declare type
|
|
6032
|
+
export declare type FormatNodeId = Brand<string, 'formatNodeId'>;
|
|
5622
6033
|
|
|
5623
6034
|
declare type FormatNodeTestId = Brand<string, 'formatNodeTestId'>;
|
|
5624
6035
|
|
|
5625
|
-
declare type FormatTestId = Brand<
|
|
6036
|
+
declare type FormatTestId = Brand<string, 'formatTestId'>;
|
|
5626
6037
|
|
|
5627
6038
|
export declare type FormContribution<Props, DTO> = FC<Props & {
|
|
5628
6039
|
formFieldRegistry: FormFieldRegistry;
|
|
@@ -5700,7 +6111,7 @@ export declare type GameDTO = components['schemas']['GameDTO'];
|
|
|
5700
6111
|
|
|
5701
6112
|
export declare type GameFormatDTO = components['schemas']['GameFormatDTO'];
|
|
5702
6113
|
|
|
5703
|
-
export declare type GameFormatId = Brand<
|
|
6114
|
+
export declare type GameFormatId = Brand<string, 'gameFormatId'>;
|
|
5704
6115
|
|
|
5705
6116
|
export declare type GameFormatPageContribution = FormContribution<GameFormatPageProps & {
|
|
5706
6117
|
gameFormat: GameFormatDTO;
|
|
@@ -5710,7 +6121,7 @@ export declare type GameFormatPageProps = EventPath & {
|
|
|
5710
6121
|
gameFormatId: GameFormatId | null;
|
|
5711
6122
|
};
|
|
5712
6123
|
|
|
5713
|
-
export declare type GameId = Brand<
|
|
6124
|
+
export declare type GameId = Brand<string, 'gameId'>;
|
|
5714
6125
|
|
|
5715
6126
|
export declare type GamePageContribution = FormContribution<GamePageProps & {
|
|
5716
6127
|
game: WorkingGameDTO;
|
|
@@ -5726,16 +6137,41 @@ export declare type GameWithTables = components['schemas']['GameWithTables'];
|
|
|
5726
6137
|
|
|
5727
6138
|
export declare const getClassesByEventQO: (workspaceId: CommonWorkspaceId, eventId: EventId) => EngineQueryOptions<ClassResponse[]>;
|
|
5728
6139
|
|
|
6140
|
+
export declare const getCompetitorInTeamMappingAtQueryOptions: (workspaceId: CommonWorkspaceId, eventId: EventId, at: string) => EngineQueryOptions<CompetitorInTeamDAO[]>;
|
|
6141
|
+
|
|
5729
6142
|
/**
|
|
5730
6143
|
* @deprecated useCompetitorsMapped instead
|
|
5731
6144
|
*/
|
|
5732
6145
|
export declare const getCompetitorsQO: (workspaceId: CommonWorkspaceId, eventId: EventId, competitorTypeFilter?: CompetitorType) => EngineQueryOptions<CompetitorDAO[]>;
|
|
5733
6146
|
|
|
6147
|
+
export declare const getGameTableResolvedByGameQO: (workspaceId: CommonWorkspaceId, eventId: EventId, gameID: GameId, tableKind: "EntryList" | "ResultList") => EngineQueryOptions<ResolvedTableDTO>;
|
|
6148
|
+
|
|
5734
6149
|
/**
|
|
5735
6150
|
* Location of a validation error in the graph.
|
|
5736
6151
|
*/
|
|
5737
6152
|
declare type GraphLocation = { type: "Edge"; data: number } | { type: "InputPort"; data: { nodeIdx: number; inputIdx: number } };
|
|
5738
6153
|
|
|
6154
|
+
export declare const H1: FC<H1Props>;
|
|
6155
|
+
|
|
6156
|
+
export declare interface H1Props {
|
|
6157
|
+
children?: ReactNode;
|
|
6158
|
+
className?: string;
|
|
6159
|
+
}
|
|
6160
|
+
|
|
6161
|
+
export declare const H2: FC<H2Props>;
|
|
6162
|
+
|
|
6163
|
+
export declare interface H2Props {
|
|
6164
|
+
children?: ReactNode;
|
|
6165
|
+
className?: string;
|
|
6166
|
+
noMargin?: boolean;
|
|
6167
|
+
}
|
|
6168
|
+
|
|
6169
|
+
export declare function HR({ className }: HRProps): JSX.Element;
|
|
6170
|
+
|
|
6171
|
+
export declare type HRProps = {
|
|
6172
|
+
className?: string;
|
|
6173
|
+
};
|
|
6174
|
+
|
|
5739
6175
|
declare type InputIdx = Brand<number, 'inputIdx'>;
|
|
5740
6176
|
|
|
5741
6177
|
export declare enum InputLayout {
|
|
@@ -5748,13 +6184,30 @@ export declare enum InputLayout {
|
|
|
5748
6184
|
Fill = 2
|
|
5749
6185
|
}
|
|
5750
6186
|
|
|
6187
|
+
/** Loads graphite-script from the host's wasm on demand, a static import would make this entry an async module. */
|
|
6188
|
+
export declare const loadGraphiteScript: () => Promise<{
|
|
6189
|
+
primValueToTypeExpr: typeof primValueToTypeExpr;
|
|
6190
|
+
validateExpression: typeof validateExpression;
|
|
6191
|
+
}>;
|
|
6192
|
+
|
|
6193
|
+
export declare const LoadingOverlay: FC<LoadingOverlayProps>;
|
|
6194
|
+
|
|
6195
|
+
export declare type LoadingOverlayProps = {
|
|
6196
|
+
/** When true, children are dimmed and a centered loading indicator is shown. */
|
|
6197
|
+
active: boolean;
|
|
6198
|
+
children: ReactNode;
|
|
6199
|
+
/** Optional text shown below the spinner. */
|
|
6200
|
+
loadingText?: ReactNode;
|
|
6201
|
+
className?: string;
|
|
6202
|
+
};
|
|
6203
|
+
|
|
5751
6204
|
export declare type Locales = 'de' | 'en';
|
|
5752
6205
|
|
|
5753
6206
|
/**
|
|
5754
6207
|
* Identifies a type parameter within a type expression or node signature.
|
|
5755
6208
|
* Can be created from a single character (e.g. `'T'`) or a string (hashed for multi-char names).
|
|
5756
6209
|
*/
|
|
5757
|
-
declare type LocalParamID = number;
|
|
6210
|
+
export declare type LocalParamID = number;
|
|
5758
6211
|
|
|
5759
6212
|
declare type LogId = Brand<number, 'logId'>;
|
|
5760
6213
|
|
|
@@ -5764,6 +6217,9 @@ export declare type MergePathParams<A, B> = {
|
|
|
5764
6217
|
|
|
5765
6218
|
export declare function Modal({ children, isOpen, onClose, closable, height, width, verticalPosition, horizontalPosition, lightbox, blockBackground, }: ModalProps): null;
|
|
5766
6219
|
|
|
6220
|
+
/** Modal inner body: explicit width; shell uses `width: 'fit'` and shrink-wraps to this. */
|
|
6221
|
+
export declare const modalBodyNarrow = "p-6 w-[min(500px,calc(100vw - 2rem))] min-w-0 md:min-w-[320px]";
|
|
6222
|
+
|
|
5767
6223
|
export declare interface ModalConfig {
|
|
5768
6224
|
id: string;
|
|
5769
6225
|
content: ReactNode;
|
|
@@ -5801,11 +6257,13 @@ export declare interface ModalProps {
|
|
|
5801
6257
|
blockBackground?: boolean;
|
|
5802
6258
|
}
|
|
5803
6259
|
|
|
6260
|
+
declare type NodeInstanceHash = Brand<string, 'nodeInstanceHash'>;
|
|
6261
|
+
|
|
5804
6262
|
/**
|
|
5805
6263
|
* Function-like type for a node: generic parameters, inputs, outputs, and defaults.
|
|
5806
6264
|
* Written in notation as `<T>(T) -> (T)` for the identity node.
|
|
5807
6265
|
*/
|
|
5808
|
-
declare interface NodeSignature<T, R = ParamRef> {
|
|
6266
|
+
export declare interface NodeSignature<T, R = ParamRef> {
|
|
5809
6267
|
/**
|
|
5810
6268
|
* Generic parameters with their bounds and defaults.
|
|
5811
6269
|
*/
|
|
@@ -5862,7 +6320,24 @@ declare interface NoSupertypeLayer<T> {
|
|
|
5862
6320
|
|
|
5863
6321
|
declare type NoSupertypeLayerReason = "UnknownTypeParam" | "NodeSignatureInputsVarg" | "NodeSignatureInputs" | "NodeSignatureOutputs" | "NodeSignatureTags" | "NodeSignatureRequiredTags" | "PortTypesVarg" | "PortTypesArity" | "PortTypesPort" | "Index" | "ConstructorArity" | "ConstructorParam";
|
|
5864
6322
|
|
|
5865
|
-
declare
|
|
6323
|
+
export declare function Note({ children, className }: NoteProps): JSX.Element;
|
|
6324
|
+
|
|
6325
|
+
export declare interface NoteProps {
|
|
6326
|
+
children: ReactNode;
|
|
6327
|
+
className?: string;
|
|
6328
|
+
}
|
|
6329
|
+
|
|
6330
|
+
/** `T` when `required` is true, otherwise `T | null`. */
|
|
6331
|
+
export declare type NullableUnlessRequired<T, Required extends boolean = false> = Required extends true ? T : T | null;
|
|
6332
|
+
|
|
6333
|
+
export declare type OperatorOf<T> = Extract<TypeOperators[keyof TypeOperators], [T, unknown]>[1];
|
|
6334
|
+
|
|
6335
|
+
declare interface Option_2<TVal> {
|
|
6336
|
+
label: React_2.ReactNode;
|
|
6337
|
+
value: TVal;
|
|
6338
|
+
disabled?: boolean;
|
|
6339
|
+
}
|
|
6340
|
+
export { Option_2 as Option }
|
|
5866
6341
|
|
|
5867
6342
|
export declare interface OptionalQueryField<T> {
|
|
5868
6343
|
kind: 'optional';
|
|
@@ -5871,10 +6346,20 @@ export declare interface OptionalQueryField<T> {
|
|
|
5871
6346
|
|
|
5872
6347
|
declare type OutputIdx = Brand<number, 'outputIdx'>;
|
|
5873
6348
|
|
|
6349
|
+
export declare const Page: FC<PageProps>;
|
|
6350
|
+
|
|
6351
|
+
export declare type PageProps = {
|
|
6352
|
+
children?: ReactNode;
|
|
6353
|
+
/** Standard content padding (less on mobile). Default true. It is exposed as `--page-px` / `--page-py`. */
|
|
6354
|
+
padding?: boolean;
|
|
6355
|
+
className?: string;
|
|
6356
|
+
style?: CSSProperties;
|
|
6357
|
+
};
|
|
6358
|
+
|
|
5874
6359
|
/**
|
|
5875
6360
|
* References a local type parameter. This is context sensitive because parameters are scoped.
|
|
5876
6361
|
*/
|
|
5877
|
-
declare interface ParamRef {
|
|
6362
|
+
export declare interface ParamRef {
|
|
5878
6363
|
paramId: LocalParamID;
|
|
5879
6364
|
/**
|
|
5880
6365
|
* If false, this reference will not be used to collect candidates for the parameter.
|
|
@@ -5893,15 +6378,27 @@ export declare interface ParsedQuery<Values> {
|
|
|
5893
6378
|
export declare type PathParams<Path extends string> = Path extends `${infer Base}/*` ? PathParams<Base> : Path extends `${infer _}/${infer Rest}` ? MergePathParams<PathSegmentParam<_>, PathParams<Rest>> : PathSegmentParam<Path>;
|
|
5894
6379
|
|
|
5895
6380
|
export declare type PathSegmentParam<S extends string> = S extends `:${infer P}` ? {
|
|
5896
|
-
[K in P]: number;
|
|
6381
|
+
[K in P]: K extends keyof UuidPathParams ? UuidPathParams[K] : number;
|
|
5897
6382
|
} : S extends `$${infer P}` ? {
|
|
5898
6383
|
[K in P]: string;
|
|
5899
6384
|
} : Record<never, never>;
|
|
5900
6385
|
|
|
6386
|
+
export declare type PersistedStateOptions = {
|
|
6387
|
+
/**
|
|
6388
|
+
* Where to persist the state.
|
|
6389
|
+
* Default: StorageType.Session
|
|
6390
|
+
*/
|
|
6391
|
+
storage: StorageType;
|
|
6392
|
+
/**
|
|
6393
|
+
* Useful if the version of the data ever changes
|
|
6394
|
+
*/
|
|
6395
|
+
version?: number;
|
|
6396
|
+
};
|
|
6397
|
+
|
|
5901
6398
|
/**
|
|
5902
6399
|
* A list of port types, optionally with a variadic type (`...T`).
|
|
5903
6400
|
*/
|
|
5904
|
-
declare interface PortTypes<T, R = ParamRef> {
|
|
6401
|
+
export declare interface PortTypes<T, R = ParamRef> {
|
|
5905
6402
|
ports: TypeExpr<T, R>[];
|
|
5906
6403
|
varg: TypeExpr<T, R> | null;
|
|
5907
6404
|
}
|
|
@@ -5909,7 +6406,9 @@ declare interface PortTypes<T, R = ParamRef> {
|
|
|
5909
6406
|
/**
|
|
5910
6407
|
* Crate local version of [std::convert::Infallible]
|
|
5911
6408
|
*/
|
|
5912
|
-
declare type Primitive = never;
|
|
6409
|
+
export declare type Primitive = never;
|
|
6410
|
+
|
|
6411
|
+
declare function primValueToTypeExpr(value: Value<Primitive>): TypeExpr<Type, ParamRef>;
|
|
5913
6412
|
|
|
5914
6413
|
export declare interface QueryCodec<T> {
|
|
5915
6414
|
parse(value: string): T | null;
|
|
@@ -5950,13 +6449,49 @@ declare interface RecordTypeWithDefaults {
|
|
|
5950
6449
|
properties: Record<string, FieldTypeWithDefault>;
|
|
5951
6450
|
}
|
|
5952
6451
|
|
|
5953
|
-
declare type RecordValue<T = Primitive> = Record<string, Value<T>>;
|
|
6452
|
+
export declare type RecordValue<T = Primitive> = Record<string, Value<T>>;
|
|
6453
|
+
|
|
6454
|
+
export declare function refocusWhenEnabled(input: HTMLInputElement | null | undefined, attempt?: number): void;
|
|
5954
6455
|
|
|
5955
6456
|
export declare interface RepeatedQueryField<T> {
|
|
5956
6457
|
kind: 'repeated';
|
|
5957
6458
|
codec: QueryCodec<T>;
|
|
5958
6459
|
}
|
|
5959
6460
|
|
|
6461
|
+
export declare function ResizablePanel({ value, onChange, edge, min, max, hideWhenBelowMin, onClose, children, className, contentClassName, }: ResizablePanelProps): JSX.Element;
|
|
6462
|
+
|
|
6463
|
+
export declare interface ResizablePanelProps {
|
|
6464
|
+
/** Current size value (width for left/right, height for top/bottom) */
|
|
6465
|
+
value: number;
|
|
6466
|
+
/** Called when size changes during drag */
|
|
6467
|
+
onChange: (value: number) => void;
|
|
6468
|
+
/** Which edge has the drag handle */
|
|
6469
|
+
edge: ResizeEdge;
|
|
6470
|
+
/** Minimum size (optional) */
|
|
6471
|
+
min?: number;
|
|
6472
|
+
/** Maximum size (optional) */
|
|
6473
|
+
max?: number;
|
|
6474
|
+
/** When true, collapses to 0 when dragged below min and fires onClose on mouse release */
|
|
6475
|
+
hideWhenBelowMin?: boolean;
|
|
6476
|
+
/** Called when hideWhenBelowMin is true and user releases mouse below minimum */
|
|
6477
|
+
onClose?: () => void;
|
|
6478
|
+
children: React_2.ReactNode;
|
|
6479
|
+
/** Additional class names for the container */
|
|
6480
|
+
className?: string;
|
|
6481
|
+
/** Additional class names for the content wrapper */
|
|
6482
|
+
contentClassName?: string;
|
|
6483
|
+
}
|
|
6484
|
+
|
|
6485
|
+
export declare type ResizeEdge = 'left' | 'right' | 'top' | 'bottom';
|
|
6486
|
+
|
|
6487
|
+
export declare type ResolvedTableDTO = components['schemas']['ResolvedTable'];
|
|
6488
|
+
|
|
6489
|
+
/** A path on this origin, so navigating to it can never leave the app. */
|
|
6490
|
+
export declare type ReturnPath = Brand<string, 'returnPath'>;
|
|
6491
|
+
|
|
6492
|
+
/** The only way to get a {@link ReturnPath}. Rejects URLs leaving the origin like `//evil.com` or `/\evil.com`. */
|
|
6493
|
+
export declare const returnPath: QueryCodec<ReturnPath>;
|
|
6494
|
+
|
|
5960
6495
|
export declare interface RouterContextType {
|
|
5961
6496
|
/** The pathname used for route matching and persistence keys. */
|
|
5962
6497
|
path: string;
|
|
@@ -5993,7 +6528,19 @@ declare interface Row {
|
|
|
5993
6528
|
columns: RecordValue;
|
|
5994
6529
|
}
|
|
5995
6530
|
|
|
5996
|
-
declare
|
|
6531
|
+
export declare interface RowAction<T> {
|
|
6532
|
+
id: string;
|
|
6533
|
+
type?: AppButtonType;
|
|
6534
|
+
label: ReactNode | string;
|
|
6535
|
+
icon?: ReactNode;
|
|
6536
|
+
triggerSingle: (row: T) => void | Promise<void>;
|
|
6537
|
+
triggerMultiple?: (rows: T[]) => void | Promise<void>;
|
|
6538
|
+
supportsRow?: (row: T) => boolean;
|
|
6539
|
+
/** Stays available in read-only workspaces. */
|
|
6540
|
+
readOnlySafe?: boolean;
|
|
6541
|
+
}
|
|
6542
|
+
|
|
6543
|
+
declare type RowMutationIdx = Brand<number, 'rowMutationIdx'>;
|
|
5997
6544
|
|
|
5998
6545
|
declare interface Rows<SortingState> {
|
|
5999
6546
|
/**
|
|
@@ -6003,7 +6550,40 @@ declare interface Rows<SortingState> {
|
|
|
6003
6550
|
rows: Row[];
|
|
6004
6551
|
}
|
|
6005
6552
|
|
|
6006
|
-
declare
|
|
6553
|
+
export declare enum RowState {
|
|
6554
|
+
/** The item is persisted in the backend as displayed and is managed by nodes. */
|
|
6555
|
+
Unchanged = 0,
|
|
6556
|
+
/** The item is persisted but updated in the ui. */
|
|
6557
|
+
Updated = 1,
|
|
6558
|
+
/** The item is persisted but deleted in the ui. */
|
|
6559
|
+
Deleted = 2,
|
|
6560
|
+
/** The item is not yet persisted. */
|
|
6561
|
+
Added = 3
|
|
6562
|
+
}
|
|
6563
|
+
|
|
6564
|
+
export declare function SearchInput({ value, onChange, placeholder, className }: SearchInputProps): JSX.Element;
|
|
6565
|
+
|
|
6566
|
+
export declare type SearchInputProps = {
|
|
6567
|
+
value: string;
|
|
6568
|
+
onChange: (value: string) => void;
|
|
6569
|
+
placeholder?: string;
|
|
6570
|
+
className?: string;
|
|
6571
|
+
};
|
|
6572
|
+
|
|
6573
|
+
declare type SerializableNonPrimitiveValue = { type: "game-table"; data: Table<Unsorted_2, StateMetadata> } | { type: "game-table-sorted"; data: Table<Sorted_2, StateMetadata> } | { type: "row"; data: Row } | { type: "class"; data: string } | { type: "closure" };
|
|
6574
|
+
|
|
6575
|
+
/**
|
|
6576
|
+
* A keyboard shortcut as the keys to press together, e.g. `['Mod', 'Shift', 'Z']`. `Mod` is Ctrl, or
|
|
6577
|
+
* Cmd on Apple platforms, matching handlers that read `ctrlKey || metaKey`. Pointer gestures
|
|
6578
|
+
* (`Click`, `Drag`, `Scroll`) are written like keys so they read the same way: "Shift+Click".
|
|
6579
|
+
*/
|
|
6580
|
+
export declare type Shortcut = readonly string[];
|
|
6581
|
+
|
|
6582
|
+
/**
|
|
6583
|
+
* Shows a dialog that can be dismissed (ESC, click outside, or X button)
|
|
6584
|
+
* Returns the selected value or null if dismissed
|
|
6585
|
+
*/
|
|
6586
|
+
export declare function showDialog<T>(modal: ModalControls, buttons: DialogButton<T>[], content: ReactNode): Promise<T | null>;
|
|
6007
6587
|
|
|
6008
6588
|
declare type Sorted = Brand<'sorted', 'sorted'>;
|
|
6009
6589
|
|
|
@@ -6023,22 +6603,89 @@ declare interface StateMetadata {
|
|
|
6023
6603
|
state: TableState;
|
|
6024
6604
|
}
|
|
6025
6605
|
|
|
6606
|
+
export declare enum StorageType {
|
|
6607
|
+
Session = 0,
|
|
6608
|
+
Local = 1
|
|
6609
|
+
}
|
|
6610
|
+
|
|
6026
6611
|
/**
|
|
6027
6612
|
* Combines rows with table attributes and state
|
|
6028
6613
|
*/
|
|
6029
6614
|
declare type Table<SortingState, M = NoMetadata> = { rows: Rows<SortingState> } & M;
|
|
6030
6615
|
|
|
6031
|
-
export declare type TableId = Brand<
|
|
6616
|
+
export declare type TableId = Brand<string, 'tableId'>;
|
|
6617
|
+
|
|
6618
|
+
export declare interface TableProps<TData extends RowData> {
|
|
6619
|
+
data: TData[];
|
|
6620
|
+
columns: ColumnDef<AppTableFeatures, TData, unknown>[];
|
|
6621
|
+
actions?: RowAction<TData>[];
|
|
6622
|
+
allowSelect?: boolean;
|
|
6623
|
+
getRowId?: (row: TData, index: number) => string;
|
|
6624
|
+
getRowState?: (row: TData) => RowState;
|
|
6625
|
+
rowClicked?: (row: TData) => void;
|
|
6626
|
+
/**
|
|
6627
|
+
* Route a row leads to. Clicking the row routes there (after `rowClicked`); a middle or Ctrl click
|
|
6628
|
+
* opens it in a new tab.
|
|
6629
|
+
*/
|
|
6630
|
+
rowHref?: (row: TData) => string;
|
|
6631
|
+
/**
|
|
6632
|
+
* Default: true
|
|
6633
|
+
*/
|
|
6634
|
+
enableSorting?: boolean;
|
|
6635
|
+
/** Should be one of pageSizes */
|
|
6636
|
+
initialPageSize?: number;
|
|
6637
|
+
initialSorting?: SortingState;
|
|
6638
|
+
pageSizes?: number[];
|
|
6639
|
+
/**
|
|
6640
|
+
* ~Composer:
|
|
6641
|
+
* When true (default), TanStack Table resets the page index when `data` changes.
|
|
6642
|
+
* Set to false if edits replace the `data` array often but you want to keep the current page.
|
|
6643
|
+
*/
|
|
6644
|
+
autoResetPageIndex?: boolean;
|
|
6645
|
+
/** Text to be displayed when there is no data */
|
|
6646
|
+
emptyTableText?: ReactNode;
|
|
6647
|
+
/**
|
|
6648
|
+
* When provided, shows a "Columns" toggle button above the table, e.g. with the state of `usePersistedState`.
|
|
6649
|
+
* Columns with `enableHiding: false` are excluded.
|
|
6650
|
+
*/
|
|
6651
|
+
columnVisibility?: [ColumnVisibilityState, OnChangeFn<ColumnVisibilityState>];
|
|
6652
|
+
}
|
|
6032
6653
|
|
|
6033
|
-
declare type
|
|
6654
|
+
export declare type TableSortedDTO = components['schemas']['Table_for_Sorted_and_StateMetadata'];
|
|
6034
6655
|
|
|
6035
|
-
declare type TableSorting = "unsorted" | "sorted";
|
|
6656
|
+
export declare type TableSorting = "unsorted" | "sorted";
|
|
6036
6657
|
|
|
6037
6658
|
declare type TableState = number;
|
|
6038
6659
|
|
|
6660
|
+
export declare type TimeDelta = components['schemas']['TimeDeltaSchema'];
|
|
6661
|
+
|
|
6662
|
+
export declare const TimeDeltaInput: FC<TimeDeltaInputProps>;
|
|
6663
|
+
|
|
6664
|
+
export declare interface TimeDeltaInputProps {
|
|
6665
|
+
value: TimeDelta;
|
|
6666
|
+
onChange?: (value: TimeDelta) => void;
|
|
6667
|
+
label?: string;
|
|
6668
|
+
className?: string;
|
|
6669
|
+
readonly?: boolean;
|
|
6670
|
+
}
|
|
6671
|
+
|
|
6039
6672
|
export { toast }
|
|
6040
6673
|
|
|
6041
|
-
declare type Type = { type: "integer"; data: { min: number | null; max: number | null } } | { type: "float" } | { type: "string"; data: string | null } | { type: "boolean" } | { type: "iterable" } | { type: "countable" } | { type: "comparable" } | { type: "sortable" } | { type: "unit" } | { type: "time-delta" } | { type: "date-time" } | { type: "date" } | { type: "primitive" } | { type: "competitor-id" } | { type: "array" } | { type: "record" } | { type: "table" } | { type: "row" } | { type: "table-sorting"; data: TableSorting } | { type: "class" };
|
|
6674
|
+
export declare type Type = { type: "integer"; data: { min: number | null; max: number | null } } | { type: "float" } | { type: "string"; data: string | null } | { type: "boolean" } | { type: "iterable" } | { type: "countable" } | { type: "comparable" } | { type: "sortable" } | { type: "unit" } | { type: "time-delta" } | { type: "date-time" } | { type: "date" } | { type: "primitive" } | { type: "competitor-id" } | { type: "array" } | { type: "record" } | { type: "table" } | { type: "row" } | { type: "table-sorting"; data: TableSorting } | { type: "class" };
|
|
6675
|
+
|
|
6676
|
+
/**
|
|
6677
|
+
* Can be parsed from string with the following syntax:
|
|
6678
|
+
*
|
|
6679
|
+
* `TypeContext ::= <Record> "->" <TypeExpr>`
|
|
6680
|
+
*
|
|
6681
|
+
* # Examples:
|
|
6682
|
+
* - `{a: Integer} -> Float`
|
|
6683
|
+
* - `{} -> Any`
|
|
6684
|
+
*/
|
|
6685
|
+
export declare interface TypeContext {
|
|
6686
|
+
variables: Record<string, TypeExpr<Type, ParamRef>>;
|
|
6687
|
+
returnType: TypeExpr<Type, ParamRef>;
|
|
6688
|
+
}
|
|
6042
6689
|
|
|
6043
6690
|
/**
|
|
6044
6691
|
* Type expression—the core type representation in nodety.
|
|
@@ -6049,18 +6696,18 @@ declare type Type = { type: "integer"; data: { min: number | null; max: number |
|
|
|
6049
6696
|
* [`PartialEq`], [`Eq`] and [`Hash`] are structural: `A | B` is not equal to `B | A`.
|
|
6050
6697
|
* [`Eq`] and [`Hash`] are available when `T: Eq + Hash`.
|
|
6051
6698
|
*/
|
|
6052
|
-
declare type TypeExpr<T, R = ParamRef> = { type: "Type"; data: T } | { type: "Constructor"; data: { inner: T; parameters: ConstructorParams<T, R> } } | { type: "Operation"; data: { a: TypeExpr<T, R>; operator: OperatorOf<T>; b: TypeExpr<T, R> } } | { type: "NodeSignature"; data: NodeSignature<T, R> } | { type: "PortTypes"; data: PortTypes<T, R> } | { type: "Union"; data: [TypeExpr<T, R>, TypeExpr<T, R>] } | { type: "KeyOf"; data: TypeExpr<T, R> } | { type: "Index"; data: { expr: TypeExpr<T, R>; index: TypeExpr<T, R> } } | { type: "Intersection"; data: [TypeExpr<T, R>, TypeExpr<T, R>] } | { type: "Conditional"; data: Conditional<T, R> } | { type: "Any" } | { type: "Never" } | { type: "Ref"; data: R };
|
|
6699
|
+
export declare type TypeExpr<T, R = ParamRef> = { type: "Type"; data: T } | { type: "Constructor"; data: { inner: T; parameters: ConstructorParams<T, R> } } | { type: "Operation"; data: { a: TypeExpr<T, R>; operator: OperatorOf<T>; b: TypeExpr<T, R> } } | { type: "NodeSignature"; data: NodeSignature<T, R> } | { type: "PortTypes"; data: PortTypes<T, R> } | { type: "Union"; data: [TypeExpr<T, R>, TypeExpr<T, R>] } | { type: "KeyOf"; data: TypeExpr<T, R> } | { type: "Index"; data: { expr: TypeExpr<T, R>; index: TypeExpr<T, R> } } | { type: "Intersection"; data: [TypeExpr<T, R>, TypeExpr<T, R>] } | { type: "Conditional"; data: Conditional<T, R> } | { type: "Any" } | { type: "Never" } | { type: "Ref"; data: R };
|
|
6053
6700
|
|
|
6054
6701
|
declare type TypeExprValidationError = { type: "UnknownVar"; var: LocalParamID } | { type: "CyclicReference" };
|
|
6055
6702
|
|
|
6056
|
-
declare interface TypeOperators { graphite: [Type, ArithmeticOperator] }
|
|
6703
|
+
export declare interface TypeOperators { graphite: [Type, ArithmeticOperator] }
|
|
6057
6704
|
|
|
6058
|
-
declare interface TypeOperators {}
|
|
6705
|
+
export declare interface TypeOperators {}
|
|
6059
6706
|
|
|
6060
6707
|
/**
|
|
6061
6708
|
* A generic type parameter with optional bound and default.
|
|
6062
6709
|
*/
|
|
6063
|
-
declare interface TypeParameter<T, R = ParamRef> {
|
|
6710
|
+
export declare interface TypeParameter<T, R = ParamRef> {
|
|
6064
6711
|
/**
|
|
6065
6712
|
* Upper bound (e.g. `T extends Comparable`).
|
|
6066
6713
|
*/
|
|
@@ -6076,7 +6723,7 @@ declare interface TypeParameter<T, R = ParamRef> {
|
|
|
6076
6723
|
*
|
|
6077
6724
|
* Exists so that it can implement traits like [std::str::FromStr]
|
|
6078
6725
|
*/
|
|
6079
|
-
declare type TypeParameters<T, R = ParamRef> = Record<LocalParamID, TypeParameter<T, R>>;
|
|
6726
|
+
export declare type TypeParameters<T, R = ParamRef> = Record<LocalParamID, TypeParameter<T, R>>;
|
|
6080
6727
|
|
|
6081
6728
|
declare type Unsorted = Brand<'unsorted', 'unsorted'>;
|
|
6082
6729
|
|
|
@@ -6089,11 +6736,48 @@ declare type Unsorted_2 = null;
|
|
|
6089
6736
|
/** The engine's active locale. Extensions ship their own dictionaries and select them by it. */
|
|
6090
6737
|
export declare function useEngineLocale(): Locales;
|
|
6091
6738
|
|
|
6739
|
+
/** Returns a `fetch` for `path` (relative, e.g. `"items"`) on the calling extension's own backend in the current event. */
|
|
6740
|
+
export declare function useExtensionBackend(): (path: string, init?: RequestInit) => Promise<Response>;
|
|
6741
|
+
|
|
6742
|
+
/** The identifier the calling extension is installed under, e.g. the key of its `extensionData`. */
|
|
6743
|
+
export declare function useExtensionIdentifier(): string;
|
|
6744
|
+
|
|
6745
|
+
export declare function useMediaQuery(query: string): boolean;
|
|
6746
|
+
|
|
6092
6747
|
export declare function useModal(): ModalControls;
|
|
6093
6748
|
|
|
6749
|
+
/**
|
|
6750
|
+
* @todo Add a parameter to save stuff in localstorage or even better, per user
|
|
6751
|
+
*
|
|
6752
|
+
* Wrapper for useState with persistence in sessionstorage.
|
|
6753
|
+
* Only serializes and writes to sessionstorage on window.beforeunload
|
|
6754
|
+
*
|
|
6755
|
+
* @param storageKey Key used for persisting the state. Only the key passed
|
|
6756
|
+
* in the to the first call of usePersistedState is used. Consequent keys are discarded.
|
|
6757
|
+
* @param initialState The initial state. Equal to useStates initial value
|
|
6758
|
+
*/
|
|
6759
|
+
export declare function usePersistedState<S>(storageKey: string, initialState: S | (() => S), { storage: storageType, version }?: PersistedStateOptions): [S, (newState: S | ((prev: S) => S)) => void];
|
|
6760
|
+
|
|
6094
6761
|
/** Hook to use the router context. Must be called within a <Router> provider. */
|
|
6095
6762
|
export declare function useRouter(): RouterContextType;
|
|
6096
6763
|
|
|
6764
|
+
/** The `:` params that are uuids, by name. All other `:` params are numbers. */
|
|
6765
|
+
declare type UuidPathParams = {
|
|
6766
|
+
classId: ClassId;
|
|
6767
|
+
eventId: EventId;
|
|
6768
|
+
formatId: FormatId;
|
|
6769
|
+
formatTestId: FormatTestId;
|
|
6770
|
+
gameFormatId: GameFormatId;
|
|
6771
|
+
gameId: GameId;
|
|
6772
|
+
tableId: TableId;
|
|
6773
|
+
};
|
|
6774
|
+
|
|
6775
|
+
/**
|
|
6776
|
+
* Validates the expression and returns a `ExpressionInContextWasm` if the expression is valid.
|
|
6777
|
+
* @throws {ValidateExpressionError} if the expression is not valid.
|
|
6778
|
+
*/
|
|
6779
|
+
declare function validateExpression(expression: string, context: TypeContext): ExpressionInContextWasm;
|
|
6780
|
+
|
|
6097
6781
|
/**
|
|
6098
6782
|
* A validation error with its location and kind.
|
|
6099
6783
|
*/
|
|
@@ -6104,7 +6788,19 @@ declare interface ValidationError<T> {
|
|
|
6104
6788
|
|
|
6105
6789
|
declare type ValidationErrorKind<T> = { type: "TypeParameterBoundsExceeded" } | { type: "TagMissing"; data: number[] } | { type: "MultipleEdgesOnOneInput" } | { type: "EdgeMissingOnInput" } | { type: "EdgeHasNoSourceOutput" } | { type: "InsufficientlyInferredTypes" } | { type: "NonPortTypesIO" } | { type: "TypeExprValidationError"; data: TypeExprValidationError } | { type: "TypeMismatch"; data: DetailedSupertypeDiagnostics<T> };
|
|
6106
6790
|
|
|
6107
|
-
declare type Value<T = Primitive> = { type: "unit" } | { type: "float"; data: number } | { type: "integer"; data: number } | { type: "string"; data: string } | { type: "boolean"; data: boolean } | { type: "array"; data: ArrayValue<T> } | { type: "record"; data: RecordValue<T> } | { type: "time-delta"; data: [number, number] } | { type: "date-time"; data: string } | { type: "date"; data: string } | { type: "non-primitive"; data: T };
|
|
6791
|
+
export declare type Value<T = Primitive> = { type: "unit" } | { type: "float"; data: number } | { type: "integer"; data: number } | { type: "string"; data: string } | { type: "boolean"; data: boolean } | { type: "array"; data: ArrayValue<T> } | { type: "record"; data: RecordValue<T> } | { type: "time-delta"; data: [number, number] } | { type: "date-time"; data: string } | { type: "date"; data: string } | { type: "non-primitive"; data: T };
|
|
6792
|
+
|
|
6793
|
+
/**
|
|
6794
|
+
* Turns a Value into an ExportableValue
|
|
6795
|
+
*/
|
|
6796
|
+
export declare function valueIntoExportable(value: Value): ExportableValue;
|
|
6797
|
+
|
|
6798
|
+
export declare function Warning({ children, className }: WarningProps): JSX.Element;
|
|
6799
|
+
|
|
6800
|
+
export declare interface WarningProps {
|
|
6801
|
+
children: ReactNode;
|
|
6802
|
+
className?: string;
|
|
6803
|
+
}
|
|
6108
6804
|
|
|
6109
6805
|
/**
|
|
6110
6806
|
* Same as GameDTO but with gameFormatId optional
|