@graphite-sports/sdk 0.3.0 → 0.5.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 +237 -49
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { ColumnDef } from '@tanstack/react-table';
|
|
|
3
3
|
import { ColumnHelper } from '@tanstack/table-core';
|
|
4
4
|
import { ColumnVisibilityState } from '@tanstack/react-table';
|
|
5
5
|
import { ComponentProps } from 'react';
|
|
6
|
+
import { ComponentType } from 'react';
|
|
6
7
|
import { CSSProperties } from 'react';
|
|
7
8
|
import type { DataTag } from '@tanstack/react-query';
|
|
8
9
|
import { FC } from 'react';
|
|
@@ -13,12 +14,14 @@ import { KeyboardEventHandler } from 'react';
|
|
|
13
14
|
import { OnChangeFn } from '@tanstack/react-table';
|
|
14
15
|
import { default as React_2 } from 'react';
|
|
15
16
|
import * as React_3 from 'react';
|
|
17
|
+
import type { ReactElement } from 'react';
|
|
16
18
|
import { ReactNode } from 'react';
|
|
17
19
|
import type { Ref } from 'react';
|
|
18
20
|
import { RefObject } from 'react';
|
|
19
21
|
import { RowData } from '@tanstack/react-table';
|
|
20
22
|
import { RowModel } from '@tanstack/table-core';
|
|
21
23
|
import { SortingState } from '@tanstack/react-table';
|
|
24
|
+
import { SVGProps } from 'react';
|
|
22
25
|
import { Tab } from '@headlessui/react';
|
|
23
26
|
import { TabGroup } from '@headlessui/react';
|
|
24
27
|
import { Table as Table_2 } from '@tanstack/table-core';
|
|
@@ -414,15 +417,6 @@ declare interface components {
|
|
|
414
417
|
classId: components["schemas"]["ClassId"];
|
|
415
418
|
eventId: components["schemas"]["EventId"];
|
|
416
419
|
};
|
|
417
|
-
AddClassesMutation: {
|
|
418
|
-
classDtos: components["schemas"]["ClassDTO"][];
|
|
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"];
|
|
425
|
-
};
|
|
426
420
|
/** @description <C extends {}, P extends Primitive, S extends Sorted|Unsorted>(Table<C, S>, P) -> (Table<C & {<self.key>: P}, S>) */
|
|
427
421
|
AddColumnsNode: {
|
|
428
422
|
columns: string[];
|
|
@@ -532,10 +526,23 @@ declare interface components {
|
|
|
532
526
|
* Later dependencies expect earlier ones to exist.
|
|
533
527
|
*/
|
|
534
528
|
dependencies: components["schemas"]["Archive"][];
|
|
535
|
-
/**
|
|
529
|
+
/**
|
|
530
|
+
* Format: uint32
|
|
531
|
+
* @description Always [ENGINE_VERSION]: deserializing migrates older archives.
|
|
532
|
+
*/
|
|
533
|
+
engineVersion: number;
|
|
534
|
+
/**
|
|
535
|
+
* Format: uuid
|
|
536
|
+
* @description The template the entry belongs to: installing it links the entity to it and reuses the entity of the event
|
|
537
|
+
* installed from it before, see [template_origin](crate::graphite_engine::template_origin). Without one, the entity
|
|
538
|
+
* is installed as a plain editable entity. Ignored for [ArchiveData::Group].
|
|
539
|
+
*/
|
|
540
|
+
templateOrigin?: string | null;
|
|
541
|
+
/**
|
|
542
|
+
* Format: uuid
|
|
543
|
+
* @description Identifies the entry within the archive, see [Wiring]. Importing derives the ids of the entities from it.
|
|
544
|
+
*/
|
|
536
545
|
uuid: string;
|
|
537
|
-
/** @description The version of the archive system at time of creation of this archive. */
|
|
538
|
-
writtenWithVersion: components["schemas"]["SemVer"];
|
|
539
546
|
};
|
|
540
547
|
ArchiveData: {
|
|
541
548
|
/** @constant */
|
|
@@ -711,8 +718,7 @@ declare interface components {
|
|
|
711
718
|
ClassGender: "female-only" | "male-only" | "all-genders";
|
|
712
719
|
/**
|
|
713
720
|
* Format: uuid
|
|
714
|
-
* @description Identifies a class. Random ([Self::new_random]) from the endpoint,
|
|
715
|
-
* or derived by `ImportArchiveMutation`.
|
|
721
|
+
* @description Identifies a class. Random ([Self::new_random]) from the endpoint, or derived by `ImportArchiveMutation`.
|
|
716
722
|
* Deserializing one only yields a reference to an existing class; it does not check that it exists.
|
|
717
723
|
*/
|
|
718
724
|
ClassId: ClassId;
|
|
@@ -1240,11 +1246,6 @@ declare interface components {
|
|
|
1240
1246
|
*/
|
|
1241
1247
|
nodeUuidSeed: components["schemas"]["Seed"];
|
|
1242
1248
|
};
|
|
1243
|
-
DuplicateGameFormatMutation: {
|
|
1244
|
-
/** @description The id of the new copy, see [GameFormatId::new_random]. It must not exist yet. */
|
|
1245
|
-
copyId: components["schemas"]["GameFormatId"];
|
|
1246
|
-
gameFormatId: components["schemas"]["GameFormatId"];
|
|
1247
|
-
};
|
|
1248
1249
|
/** @description A single encoding definition applied to a single schema property. */
|
|
1249
1250
|
Encoding: {
|
|
1250
1251
|
/**
|
|
@@ -1607,6 +1608,8 @@ declare interface components {
|
|
|
1607
1608
|
/** Format: date-time */
|
|
1608
1609
|
updatedAt?: string | null;
|
|
1609
1610
|
};
|
|
1611
|
+
/** @description A value of the local store or the extension store, at most 64 KiB. */
|
|
1612
|
+
ExtensionValue: string;
|
|
1610
1613
|
/** @description Allows referencing an external resource for extended documentation. */
|
|
1611
1614
|
ExternalDocumentation: {
|
|
1612
1615
|
/**
|
|
@@ -2571,13 +2574,6 @@ declare interface components {
|
|
|
2571
2574
|
/** @enum {string} */
|
|
2572
2575
|
HeaderStyle: "simple";
|
|
2573
2576
|
ImportArchiveError: {
|
|
2574
|
-
/** @constant */
|
|
2575
|
-
type: "incompatible-version";
|
|
2576
|
-
data: {
|
|
2577
|
-
got: components["schemas"]["SemVer"];
|
|
2578
|
-
required: string;
|
|
2579
|
-
};
|
|
2580
|
-
} | {
|
|
2581
2577
|
/** @constant */
|
|
2582
2578
|
type: "invalid-archive";
|
|
2583
2579
|
data: components["schemas"]["InvalidArchiveError"];
|
|
@@ -2596,12 +2592,6 @@ declare interface components {
|
|
|
2596
2592
|
ImportArchiveMutation: {
|
|
2597
2593
|
archive: components["schemas"]["Archive"];
|
|
2598
2594
|
eventId: components["schemas"]["EventId"];
|
|
2599
|
-
/**
|
|
2600
|
-
* @description Links the installed entities to their archive entries and reuses entries installed before, see
|
|
2601
|
-
* [template_origin](crate::graphite_engine::template_origin). False for log entries written before linking existed.
|
|
2602
|
-
* @default false
|
|
2603
|
-
*/
|
|
2604
|
-
linkTemplate: boolean;
|
|
2605
2595
|
/**
|
|
2606
2596
|
* @description When `Some`, regenerates format node ids from this seed (deterministic log replay).
|
|
2607
2597
|
* When `None`, preserves archive node ids — for one-shot imports such as format tests.
|
|
@@ -2791,10 +2781,6 @@ declare interface components {
|
|
|
2791
2781
|
/** @constant */
|
|
2792
2782
|
type: "rename-game-format";
|
|
2793
2783
|
data: components["schemas"]["RenameGameFormatMutation"];
|
|
2794
|
-
} | {
|
|
2795
|
-
/** @constant */
|
|
2796
|
-
type: "duplicate-game-format";
|
|
2797
|
-
data: components["schemas"]["DuplicateGameFormatMutation"];
|
|
2798
2784
|
} | {
|
|
2799
2785
|
/** @constant */
|
|
2800
2786
|
type: "delete-game-format";
|
|
@@ -2807,10 +2793,6 @@ declare interface components {
|
|
|
2807
2793
|
/** @constant */
|
|
2808
2794
|
type: "add-class";
|
|
2809
2795
|
data: components["schemas"]["AddClassMutation"];
|
|
2810
|
-
} | {
|
|
2811
|
-
/** @constant */
|
|
2812
|
-
type: "add-classes";
|
|
2813
|
-
data: components["schemas"]["AddClassesMutation"];
|
|
2814
2796
|
} | {
|
|
2815
2797
|
/** @constant */
|
|
2816
2798
|
type: "rename-class";
|
|
@@ -2819,6 +2801,10 @@ declare interface components {
|
|
|
2819
2801
|
/** @constant */
|
|
2820
2802
|
type: "update-class";
|
|
2821
2803
|
data: components["schemas"]["UpdateClassMutation"];
|
|
2804
|
+
} | {
|
|
2805
|
+
/** @constant */
|
|
2806
|
+
type: "update-class-state";
|
|
2807
|
+
data: components["schemas"]["UpdateClassStateMutation"];
|
|
2822
2808
|
} | {
|
|
2823
2809
|
/** @constant */
|
|
2824
2810
|
type: "delete-class";
|
|
@@ -2991,7 +2977,7 @@ declare interface components {
|
|
|
2991
2977
|
LogId: LogId;
|
|
2992
2978
|
LogsQuery: {
|
|
2993
2979
|
after: components["schemas"]["LogId"];
|
|
2994
|
-
/** Format:
|
|
2980
|
+
/** Format: uint32 */
|
|
2995
2981
|
limit: number;
|
|
2996
2982
|
};
|
|
2997
2983
|
/**
|
|
@@ -4582,10 +4568,6 @@ declare interface components {
|
|
|
4582
4568
|
hash: number[];
|
|
4583
4569
|
id: components["schemas"]["LogId"];
|
|
4584
4570
|
};
|
|
4585
|
-
ReplicationProgressPath: {
|
|
4586
|
-
/** Format: uuid */
|
|
4587
|
-
taskId: string;
|
|
4588
|
-
};
|
|
4589
4571
|
ReplicationTargetMultipart: {
|
|
4590
4572
|
/** Format: binary */
|
|
4591
4573
|
file: Blob;
|
|
@@ -5325,6 +5307,10 @@ declare interface components {
|
|
|
5325
5307
|
/** @constant */
|
|
5326
5308
|
type: "detached";
|
|
5327
5309
|
};
|
|
5310
|
+
TaskPathVariables: {
|
|
5311
|
+
/** Format: uuid */
|
|
5312
|
+
taskId: string;
|
|
5313
|
+
};
|
|
5328
5314
|
TaskProgressDTO: {
|
|
5329
5315
|
/** @constant */
|
|
5330
5316
|
type: "in-progress";
|
|
@@ -5355,6 +5341,11 @@ declare interface components {
|
|
|
5355
5341
|
/** @constant */
|
|
5356
5342
|
type: "failed";
|
|
5357
5343
|
data: {
|
|
5344
|
+
/**
|
|
5345
|
+
* Format: uint
|
|
5346
|
+
* @description The index of the log entry that failed, for tasks that apply log entries.
|
|
5347
|
+
*/
|
|
5348
|
+
entry?: number | null;
|
|
5358
5349
|
error: string;
|
|
5359
5350
|
};
|
|
5360
5351
|
};
|
|
@@ -5659,6 +5650,9 @@ declare interface components {
|
|
|
5659
5650
|
TypeParameters_for_Type_and_ParamRef: {
|
|
5660
5651
|
[key: string]: components["schemas"]["TypeParameter_for_Type_and_ParamRef"];
|
|
5661
5652
|
};
|
|
5653
|
+
UninstalledExtensionPath: {
|
|
5654
|
+
extensionIdent: components["schemas"]["ExtensionIdentifier"];
|
|
5655
|
+
};
|
|
5662
5656
|
/** @enum {string} */
|
|
5663
5657
|
UniqueBibStrategy: "increment" | "lowest-free";
|
|
5664
5658
|
/** @description Makes a linked entity editable again. */
|
|
@@ -5673,6 +5667,11 @@ declare interface components {
|
|
|
5673
5667
|
classDto: components["schemas"]["ClassDTO"];
|
|
5674
5668
|
id: components["schemas"]["ClassId"];
|
|
5675
5669
|
};
|
|
5670
|
+
/** @description Changes only the state of a class, which is event data and so also changes on classes linked to a template. */
|
|
5671
|
+
UpdateClassStateMutation: {
|
|
5672
|
+
classId: components["schemas"]["ClassId"];
|
|
5673
|
+
state: components["schemas"]["TableState"];
|
|
5674
|
+
};
|
|
5676
5675
|
UpdateCompetitorMutation: {
|
|
5677
5676
|
competitorDto: components["schemas"]["CompetitorDTO"];
|
|
5678
5677
|
competitorId: components["schemas"]["CompetitorId"];
|
|
@@ -5769,6 +5768,13 @@ declare interface components {
|
|
|
5769
5768
|
ValidationErrorKind_for_Type: ValidationErrorKind<Type>;
|
|
5770
5769
|
/** @description A validation error with its location and kind. */
|
|
5771
5770
|
ValidationError_for_Type: ValidationError<Type>;
|
|
5771
|
+
ValueBody: {
|
|
5772
|
+
value: components["schemas"]["ExtensionValue"];
|
|
5773
|
+
};
|
|
5774
|
+
ValuePath: {
|
|
5775
|
+
extensionIdent: components["schemas"]["ExtensionIdentifier"];
|
|
5776
|
+
key: string;
|
|
5777
|
+
};
|
|
5772
5778
|
/**
|
|
5773
5779
|
* Important
|
|
5774
5780
|
* @description Changes in here are breaking changes for logs
|
|
@@ -5857,6 +5863,8 @@ export declare function confirmDeleteItem(modalControls: ModalControls, itemName
|
|
|
5857
5863
|
*/
|
|
5858
5864
|
export declare type ConstructorParams<T, R = ParamRef> = Record<string, TypeExpr<T, R>>;
|
|
5859
5865
|
|
|
5866
|
+
export declare type ContentInEventFolderDTO = components['schemas']['ContentInEventFolderDTO'];
|
|
5867
|
+
|
|
5860
5868
|
export declare interface ContextWasm {
|
|
5861
5869
|
values: Record<string, Value<Primitive>>;
|
|
5862
5870
|
}
|
|
@@ -5911,6 +5919,8 @@ export declare interface DialogButton<T> {
|
|
|
5911
5919
|
theme?: 'primary' | 'default' | 'danger';
|
|
5912
5920
|
}
|
|
5913
5921
|
|
|
5922
|
+
export declare type DraggableChildProps = React_2.HTMLAttributes<HTMLElement> & React_2.RefAttributes<HTMLElement>;
|
|
5923
|
+
|
|
5914
5924
|
/** Spelled out because the inferred `queryOptions` type references TanStack's unexported `dataTagSymbol`, which breaks the SDK's declaration rollup. */
|
|
5915
5925
|
export declare type EngineQueryOptions<T> = UnusedSkipTokenOptions<T, Error, T, readonly unknown[]> & {
|
|
5916
5926
|
queryKey: DataTag<readonly unknown[], T, Error>;
|
|
@@ -5921,6 +5931,8 @@ export declare type EngineQueryOptions<T> = UnusedSkipTokenOptions<T, Error, T,
|
|
|
5921
5931
|
*/
|
|
5922
5932
|
declare type ErasedScopedTypeRef<T> = { type: "Param"; data: ParamRef } | { type: "ScopedExpr"; data: { expr: TypeExpr<T, ErasedScopedTypeRef<T>> } };
|
|
5923
5933
|
|
|
5934
|
+
export declare const eventFoldersByEventQueryOptions: (workspaceId: CommonWorkspaceId, eventId: EventId) => EngineQueryOptions<ContentInEventFolderDTO[]>;
|
|
5935
|
+
|
|
5924
5936
|
export declare type EventId = Brand<string, 'eventId'>;
|
|
5925
5937
|
|
|
5926
5938
|
export declare interface EventPath {
|
|
@@ -5960,8 +5972,26 @@ export declare function extensionContribution<K extends keyof ExtensionContribut
|
|
|
5960
5972
|
export declare type ExtensionContributions = {
|
|
5961
5973
|
'game-format-page-bottom': GameFormatPageContribution;
|
|
5962
5974
|
'game-page': GamePageContribution;
|
|
5975
|
+
'table-drop': TableDropContribution;
|
|
5963
5976
|
};
|
|
5964
5977
|
|
|
5978
|
+
/**
|
|
5979
|
+
* Makes `children` draggable with `payload`. Dropping it onto a table hands `payload` to the `table-drop`
|
|
5980
|
+
* contributions of the calling extension, and to no other extension's.
|
|
5981
|
+
*/
|
|
5982
|
+
export declare function ExtensionDraggable({ payload, children }: {
|
|
5983
|
+
payload: string;
|
|
5984
|
+
children: ReactElement<DraggableChildProps>;
|
|
5985
|
+
}): JSX.Element;
|
|
5986
|
+
|
|
5987
|
+
/** What the host lends to extension callbacks that run outside of the extension's components. */
|
|
5988
|
+
export declare interface ExtensionHost {
|
|
5989
|
+
/** Same as {@link useExtensionBackend}. */
|
|
5990
|
+
backend: (path: string, init?: RequestInit) => Promise<Response>;
|
|
5991
|
+
/** Modals whose content can use the extension's hooks, like {@link useExtensionBackend}. */
|
|
5992
|
+
modal: ModalControls;
|
|
5993
|
+
}
|
|
5994
|
+
|
|
5965
5995
|
export declare type ExtensionInjectPlaceKey = keyof ExtensionContributions;
|
|
5966
5996
|
|
|
5967
5997
|
/**
|
|
@@ -6009,7 +6039,7 @@ export declare interface ExtensionSidebarContribution {
|
|
|
6009
6039
|
|
|
6010
6040
|
export declare type ExtensionSidebarProps = EventPath;
|
|
6011
6041
|
|
|
6012
|
-
declare interface FieldTypeWithDefault {
|
|
6042
|
+
export declare interface FieldTypeWithDefault {
|
|
6013
6043
|
fieldType: TypeExpr<Type>;
|
|
6014
6044
|
/**
|
|
6015
6045
|
* Validated to be a subtype of field_type
|
|
@@ -6146,6 +6176,17 @@ export declare const getCompetitorsQO: (workspaceId: CommonWorkspaceId, eventId:
|
|
|
6146
6176
|
|
|
6147
6177
|
export declare const getGameTableResolvedByGameQO: (workspaceId: CommonWorkspaceId, eventId: EventId, gameID: GameId, tableKind: "EntryList" | "ResultList") => EngineQueryOptions<ResolvedTableDTO>;
|
|
6148
6178
|
|
|
6179
|
+
/**
|
|
6180
|
+
* The table as nodes see it, with the rows they don't see in `hiddenRows`.
|
|
6181
|
+
*/
|
|
6182
|
+
export declare const getGameTableResolvedQueryOptions: (workspaceId: CommonWorkspaceId, eventId: EventId, tableId: TableId) => EngineQueryOptions<ResolvedTableDTO>;
|
|
6183
|
+
|
|
6184
|
+
export declare const getGameTablesByEventQueryOptions: (workspaceId: CommonWorkspaceId, eventId: EventId) => EngineQueryOptions<Map<TableId, TableDAO>>;
|
|
6185
|
+
|
|
6186
|
+
export declare const getStandaloneTablesByEventQueryOptions: (workspaceId: CommonWorkspaceId, eventId: EventId) => EngineQueryOptions<Map<TableId, TableDAO>>;
|
|
6187
|
+
|
|
6188
|
+
export declare const getTableByIdQueryOptions: (workspaceId: CommonWorkspaceId, eventId: EventId, tableId: TableId) => EngineQueryOptions<TableWithType>;
|
|
6189
|
+
|
|
6149
6190
|
/**
|
|
6150
6191
|
* Location of a validation error in the graph.
|
|
6151
6192
|
*/
|
|
@@ -6209,8 +6250,17 @@ export declare type Locales = 'de' | 'en';
|
|
|
6209
6250
|
*/
|
|
6210
6251
|
export declare type LocalParamID = number;
|
|
6211
6252
|
|
|
6253
|
+
export declare type LogEntry = components['schemas']['LogEntry'];
|
|
6254
|
+
|
|
6212
6255
|
declare type LogId = Brand<number, 'logId'>;
|
|
6213
6256
|
|
|
6257
|
+
/** One step of a log batch: its entries stay together and in order. */
|
|
6258
|
+
export declare interface LogOperation {
|
|
6259
|
+
/** Names the operation when one of its entries fails. */
|
|
6260
|
+
name: string;
|
|
6261
|
+
entries: LogEntry[];
|
|
6262
|
+
}
|
|
6263
|
+
|
|
6214
6264
|
export declare type MergePathParams<A, B> = {
|
|
6215
6265
|
[K in keyof A | keyof B]: K extends keyof B ? B[K] : K extends keyof A ? A[K] : never;
|
|
6216
6266
|
};
|
|
@@ -6320,6 +6370,21 @@ declare interface NoSupertypeLayer<T> {
|
|
|
6320
6370
|
|
|
6321
6371
|
declare type NoSupertypeLayerReason = "UnknownTypeParam" | "NodeSignatureInputsVarg" | "NodeSignatureInputs" | "NodeSignatureOutputs" | "NodeSignatureTags" | "NodeSignatureRequiredTags" | "PortTypesVarg" | "PortTypesArity" | "PortTypesPort" | "Index" | "ConstructorArity" | "ConstructorParam";
|
|
6322
6372
|
|
|
6373
|
+
/**
|
|
6374
|
+
* The handle sticking out of the west edge of a panel, vertically centered. It is also the only thing left of the
|
|
6375
|
+
* panel once it is hidden.
|
|
6376
|
+
*/
|
|
6377
|
+
export declare function NotchButton({ direction, label, onClick, className, children }: NotchButtonProps): JSX.Element;
|
|
6378
|
+
|
|
6379
|
+
export declare interface NotchButtonProps {
|
|
6380
|
+
/** Where the chevron points: out of the panel to hide it, back into it to bring it in. */
|
|
6381
|
+
direction: 'left' | 'right';
|
|
6382
|
+
label: string;
|
|
6383
|
+
onClick: () => void;
|
|
6384
|
+
className?: string;
|
|
6385
|
+
children?: ReactNode;
|
|
6386
|
+
}
|
|
6387
|
+
|
|
6323
6388
|
export declare function Note({ children, className }: NoteProps): JSX.Element;
|
|
6324
6389
|
|
|
6325
6390
|
export declare interface NoteProps {
|
|
@@ -6410,6 +6475,43 @@ export declare type Primitive = never;
|
|
|
6410
6475
|
|
|
6411
6476
|
declare function primValueToTypeExpr(value: Value<Primitive>): TypeExpr<Type, ParamRef>;
|
|
6412
6477
|
|
|
6478
|
+
/**
|
|
6479
|
+
* Replaces the rows a table holds on layer one.
|
|
6480
|
+
*
|
|
6481
|
+
* Only for tables whose layer one belongs to the user - a table filled by nodes has to be
|
|
6482
|
+
* changed through {@see postRowMutations} instead, so their rows stay intact.
|
|
6483
|
+
*/
|
|
6484
|
+
export declare function putTableRows(workspaceId: CommonWorkspaceId, eventId: EventId, tableId: TableId, rows: Row[]): Promise<{
|
|
6485
|
+
type: "unknown-error";
|
|
6486
|
+
} | {
|
|
6487
|
+
type: "success";
|
|
6488
|
+
data: undefined;
|
|
6489
|
+
} | {
|
|
6490
|
+
type: "error";
|
|
6491
|
+
error: {
|
|
6492
|
+
type: "table-is-referenced";
|
|
6493
|
+
data: components["schemas"]["TableId"];
|
|
6494
|
+
} | {
|
|
6495
|
+
type: "game-table-is-managed";
|
|
6496
|
+
data: components["schemas"]["TableId"];
|
|
6497
|
+
} | {
|
|
6498
|
+
type: "shape-is-incompatible";
|
|
6499
|
+
} | {
|
|
6500
|
+
type: "cannot-update-kind";
|
|
6501
|
+
} | {
|
|
6502
|
+
type: "game-has-table-of-kind";
|
|
6503
|
+
data: [components["schemas"]["GameId"], components["schemas"]["TableKind"]];
|
|
6504
|
+
} | {
|
|
6505
|
+
type: "column-validation-error";
|
|
6506
|
+
data: components["schemas"]["RecordValueTypeValidationError"];
|
|
6507
|
+
} | {
|
|
6508
|
+
type: "row-not-hidden";
|
|
6509
|
+
data: [components["schemas"]["TableId"], components["schemas"]["CompetitorId"]];
|
|
6510
|
+
};
|
|
6511
|
+
}>;
|
|
6512
|
+
|
|
6513
|
+
export declare type PutTableRowsResponse = Awaited<ReturnType<typeof putTableRows>>;
|
|
6514
|
+
|
|
6413
6515
|
export declare interface QueryCodec<T> {
|
|
6414
6516
|
parse(value: string): T | null;
|
|
6415
6517
|
serialize(value: T): string;
|
|
@@ -6445,7 +6547,7 @@ declare interface RecordTypeHelper<R = ParamRef> {
|
|
|
6445
6547
|
properties: Record<string, TypeExpr<Type, R>>;
|
|
6446
6548
|
}
|
|
6447
6549
|
|
|
6448
|
-
declare interface RecordTypeWithDefaults {
|
|
6550
|
+
export declare interface RecordTypeWithDefaults {
|
|
6449
6551
|
properties: Record<string, FieldTypeWithDefault>;
|
|
6450
6552
|
}
|
|
6451
6553
|
|
|
@@ -6519,7 +6621,7 @@ export declare interface RouterLocation {
|
|
|
6519
6621
|
/**
|
|
6520
6622
|
* Rows can only be created and moved by this crate, so that their [Origin] stays truthful.
|
|
6521
6623
|
*/
|
|
6522
|
-
declare interface Row {
|
|
6624
|
+
export declare interface Row {
|
|
6523
6625
|
/**
|
|
6524
6626
|
* Unique per table
|
|
6525
6627
|
*/
|
|
@@ -6585,6 +6687,65 @@ export declare type Shortcut = readonly string[];
|
|
|
6585
6687
|
*/
|
|
6586
6688
|
export declare function showDialog<T>(modal: ModalControls, buttons: DialogButton<T>[], content: ReactNode): Promise<T | null>;
|
|
6587
6689
|
|
|
6690
|
+
/**
|
|
6691
|
+
* A panel as a column of its own, next to the content. Keeping it out of the content gives toolbars the whole
|
|
6692
|
+
* width, and collapsing it hands the space back. Hidden on mobile, see {@link SidePanelDrawer}.
|
|
6693
|
+
*/
|
|
6694
|
+
export declare function SidePanelDock({ storageKey, icon: Icon, badge, expandLabel, children }: SidePanelDockProps): JSX.Element;
|
|
6695
|
+
|
|
6696
|
+
export declare interface SidePanelDockProps {
|
|
6697
|
+
/** Remembers whether the panel is open. */
|
|
6698
|
+
storageKey: string;
|
|
6699
|
+
icon: SidePanelIcon;
|
|
6700
|
+
/** Shown on the notch while the panel is hidden. */
|
|
6701
|
+
badge?: ReactNode;
|
|
6702
|
+
expandLabel: string;
|
|
6703
|
+
children: (onClose: () => void) => ReactNode;
|
|
6704
|
+
}
|
|
6705
|
+
|
|
6706
|
+
/** On mobile a panel has no room of its own, so it waits behind a button and slides in over the content. */
|
|
6707
|
+
export declare function SidePanelDrawer({ icon: Icon, label, title, badge, closeLabel, buttonClassName, children, }: SidePanelDrawerProps): JSX.Element;
|
|
6708
|
+
|
|
6709
|
+
export declare interface SidePanelDrawerProps {
|
|
6710
|
+
icon: SidePanelIcon;
|
|
6711
|
+
label: string;
|
|
6712
|
+
title: string;
|
|
6713
|
+
badge?: ReactNode;
|
|
6714
|
+
closeLabel: string;
|
|
6715
|
+
/** Where the button opening the drawer sits. */
|
|
6716
|
+
buttonClassName?: string;
|
|
6717
|
+
children: (onClose: () => void) => ReactNode;
|
|
6718
|
+
}
|
|
6719
|
+
|
|
6720
|
+
export declare function SidePanelFooterButton({ onClick, disabled, children }: SidePanelFooterButtonProps): JSX.Element;
|
|
6721
|
+
|
|
6722
|
+
export declare interface SidePanelFooterButtonProps {
|
|
6723
|
+
onClick: () => void;
|
|
6724
|
+
disabled: boolean;
|
|
6725
|
+
children: string;
|
|
6726
|
+
}
|
|
6727
|
+
|
|
6728
|
+
/** A panel with a title, a scrolling body and an optional footer. The notch on its west edge closes it. */
|
|
6729
|
+
export declare function SidePanelFrame({ variant, icon: Icon, title, meta, closeLabel, onClose, footer, className, children, }: SidePanelFrameProps): JSX.Element;
|
|
6730
|
+
|
|
6731
|
+
export declare interface SidePanelFrameProps {
|
|
6732
|
+
/** Docked next to the content, or floating above it as the mobile drawer. */
|
|
6733
|
+
variant: SidePanelVariant;
|
|
6734
|
+
icon: SidePanelIcon;
|
|
6735
|
+
title: string;
|
|
6736
|
+
/** Shown at the right of the title, like how many items are selected. */
|
|
6737
|
+
meta?: ReactNode;
|
|
6738
|
+
closeLabel: string;
|
|
6739
|
+
onClose: () => void;
|
|
6740
|
+
footer?: ReactNode;
|
|
6741
|
+
className?: string;
|
|
6742
|
+
children: ReactNode;
|
|
6743
|
+
}
|
|
6744
|
+
|
|
6745
|
+
export declare type SidePanelIcon = ComponentType<SVGProps<SVGSVGElement>>;
|
|
6746
|
+
|
|
6747
|
+
export declare type SidePanelVariant = 'dock' | 'drawer';
|
|
6748
|
+
|
|
6588
6749
|
declare type Sorted = Brand<'sorted', 'sorted'>;
|
|
6589
6750
|
|
|
6590
6751
|
/**
|
|
@@ -6613,6 +6774,25 @@ export declare enum StorageType {
|
|
|
6613
6774
|
*/
|
|
6614
6775
|
declare type Table<SortingState, M = NoMetadata> = { rows: Rows<SortingState> } & M;
|
|
6615
6776
|
|
|
6777
|
+
export declare type TableDAO = components['schemas']['TableDAO'];
|
|
6778
|
+
|
|
6779
|
+
/**
|
|
6780
|
+
* Accepts payloads dragged with {@link ExtensionDraggable} of the same extension onto tables: standalone tables,
|
|
6781
|
+
* and the entry and result tables of games. The first contribution whose `canDrop` accepts a payload takes it;
|
|
6782
|
+
* payloads that none accepts can't be dropped.
|
|
6783
|
+
*/
|
|
6784
|
+
export declare interface TableDropContribution {
|
|
6785
|
+
canDrop(payload: string, target: TableDropTarget): boolean;
|
|
6786
|
+
onDrop(payload: string, target: TableDropTarget, host: ExtensionHost): void | Promise<void>;
|
|
6787
|
+
/** Shown on the highlighted drop area. */
|
|
6788
|
+
label?: Record<Locales, string>;
|
|
6789
|
+
}
|
|
6790
|
+
|
|
6791
|
+
/** `table.variant` tells standalone and game tables apart, `table.tableKind` entry and result tables. */
|
|
6792
|
+
export declare type TableDropTarget = EventPath & {
|
|
6793
|
+
table: TableDAO;
|
|
6794
|
+
};
|
|
6795
|
+
|
|
6616
6796
|
export declare type TableId = Brand<string, 'tableId'>;
|
|
6617
6797
|
|
|
6618
6798
|
export declare interface TableProps<TData extends RowData> {
|
|
@@ -6657,6 +6837,8 @@ export declare type TableSorting = "unsorted" | "sorted";
|
|
|
6657
6837
|
|
|
6658
6838
|
declare type TableState = number;
|
|
6659
6839
|
|
|
6840
|
+
export declare type TableWithType = components['schemas']['TableWithType'];
|
|
6841
|
+
|
|
6660
6842
|
export declare type TimeDelta = components['schemas']['TimeDeltaSchema'];
|
|
6661
6843
|
|
|
6662
6844
|
export declare const TimeDeltaInput: FC<TimeDeltaInputProps>;
|
|
@@ -6737,7 +6919,7 @@ declare type Unsorted_2 = null;
|
|
|
6737
6919
|
export declare function useEngineLocale(): Locales;
|
|
6738
6920
|
|
|
6739
6921
|
/** 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():
|
|
6922
|
+
export declare function useExtensionBackend(): ExtensionHost['backend'];
|
|
6741
6923
|
|
|
6742
6924
|
/** The identifier the calling extension is installed under, e.g. the key of its `extensionData`. */
|
|
6743
6925
|
export declare function useExtensionIdentifier(): string;
|
|
@@ -6761,6 +6943,12 @@ export declare function usePersistedState<S>(storageKey: string, initialState: S
|
|
|
6761
6943
|
/** Hook to use the router context. Must be called within a <Router> provider. */
|
|
6762
6944
|
export declare function useRouter(): RouterContextType;
|
|
6763
6945
|
|
|
6946
|
+
/**
|
|
6947
|
+
* Returns a function that applies the entries of all operations in one all-or-nothing `POST /log` with a progress modal
|
|
6948
|
+
* and reports a failure, like `runLogBatch`, with the modals and translations of the calling component.
|
|
6949
|
+
*/
|
|
6950
|
+
export declare function useRunLogBatch(): (workspaceId: CommonWorkspaceId, operations: LogOperation[], label: ReactNode) => Promise<boolean | null>;
|
|
6951
|
+
|
|
6764
6952
|
/** The `:` params that are uuids, by name. All other `:` params are numbers. */
|
|
6765
6953
|
declare type UuidPathParams = {
|
|
6766
6954
|
classId: ClassId;
|