@caisual/kit 0.5.0 → 0.10.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/dist/kit.d.ts +2 -175
- package/dist/kit.js +1808 -76
- package/dist/node.d.ts +1 -88
- package/dist/node.js +354 -96
- package/dist/overlay.d.ts +1 -0
- package/dist/overlay.js +2074 -0
- package/dist/runtime.d.ts +1 -111
- package/dist/runtime.js +335 -67
- package/dist/server.d.ts +1 -71
- package/dist/server.js +3 -0
- package/dist/types/api.d.ts +25 -0
- package/dist/types/contracts/biglietto.d.ts +24 -0
- package/dist/types/contracts/device.d.ts +66 -0
- package/dist/types/contracts/firma.d.ts +21 -0
- package/dist/types/contracts/i18n.d.ts +12 -0
- package/dist/types/contracts/index.d.ts +13 -0
- package/dist/types/contracts/keys.d.ts +59 -0
- package/dist/types/contracts/manifest.d.ts +123 -0
- package/dist/types/contracts/overlay-boards.d.ts +3 -0
- package/dist/types/contracts/overlay.d.ts +223 -0
- package/dist/types/contracts/player.d.ts +1 -0
- package/dist/types/contracts/room-limits.d.ts +13 -0
- package/dist/types/contracts/runtime.d.ts +70 -0
- package/dist/types/contracts/server-js.d.ts +11 -0
- package/dist/types/contracts/slug.d.ts +5 -0
- package/dist/types/contracts/token-crew.d.ts +21 -0
- package/dist/types/daily.d.ts +3 -0
- package/dist/types/errors.d.ts +6 -0
- package/dist/types/handshake.d.ts +30 -0
- package/dist/types/http.d.ts +3 -0
- package/dist/types/index.d.ts +231 -0
- package/dist/types/kit.d.ts +28 -0
- package/dist/types/node/index.d.ts +97 -0
- package/dist/types/node/websocket.d.ts +29 -0
- package/dist/types/overlay/boards.d.ts +48 -0
- package/dist/types/overlay/bridge.d.ts +3 -0
- package/dist/types/overlay/host-bridge.d.ts +74 -0
- package/dist/types/overlay/i18n.d.ts +128 -0
- package/dist/types/overlay/index.d.ts +10 -0
- package/dist/types/overlay/shortcut.d.ts +4 -0
- package/dist/types/overlay/styles.d.ts +1 -0
- package/dist/types/overlay/ui-model.d.ts +45 -0
- package/dist/types/overlay/ui.d.ts +80 -0
- package/dist/types/overlay/voice-panel.d.ts +13 -0
- package/dist/types/protocollo.d.ts +262 -0
- package/dist/types/runtime/index.d.ts +128 -0
- package/dist/types/server/index.d.ts +76 -0
- package/dist/types/session/index.d.ts +49 -0
- package/dist/types/session/resume.d.ts +13 -0
- package/dist/types/standalone.d.ts +14 -0
- package/dist/types/stanza/index.d.ts +3 -0
- package/dist/types/stanza/json.d.ts +18 -0
- package/dist/types/stanza/nucleo.d.ts +100 -0
- package/dist/types/stanza/tipi.d.ts +136 -0
- package/dist/types/stanza-client/index.d.ts +24 -0
- package/dist/types/text.d.ts +2 -0
- package/dist/types/voce/index.d.ts +124 -0
- package/package.json +10 -2
package/dist/runtime.d.ts
CHANGED
|
@@ -1,111 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type { GameDefinition, JsonValue, RoomStatus } from './server.js';
|
|
3
|
-
export interface RoomManifest {
|
|
4
|
-
id: string;
|
|
5
|
-
players: {
|
|
6
|
-
min: number;
|
|
7
|
-
max: number;
|
|
8
|
-
};
|
|
9
|
-
lobby: boolean;
|
|
10
|
-
persistent?: boolean;
|
|
11
|
-
roles: Array<{
|
|
12
|
-
id: string;
|
|
13
|
-
min: number;
|
|
14
|
-
max?: number;
|
|
15
|
-
}>;
|
|
16
|
-
teams: {
|
|
17
|
-
min: number;
|
|
18
|
-
max: number;
|
|
19
|
-
} | null;
|
|
20
|
-
modes: Array<{
|
|
21
|
-
id: string;
|
|
22
|
-
}>;
|
|
23
|
-
voice?: 'none' | 'room' | 'team' | 'proximity';
|
|
24
|
-
}
|
|
25
|
-
export interface IdentitaGiocatore {
|
|
26
|
-
id: string;
|
|
27
|
-
name: string;
|
|
28
|
-
guest: boolean;
|
|
29
|
-
}
|
|
30
|
-
export interface Esito {
|
|
31
|
-
frames: Array<{
|
|
32
|
-
connessione: string;
|
|
33
|
-
testo: string;
|
|
34
|
-
}>;
|
|
35
|
-
pubblici: string[];
|
|
36
|
-
chiusure: Array<{
|
|
37
|
-
connessione: string;
|
|
38
|
-
codice: number;
|
|
39
|
-
motivo: string;
|
|
40
|
-
}>;
|
|
41
|
-
sveglia: number | null;
|
|
42
|
-
tick: boolean;
|
|
43
|
-
tickRate: number;
|
|
44
|
-
status: RoomStatus | null;
|
|
45
|
-
}
|
|
46
|
-
export interface InfoStanza {
|
|
47
|
-
roomId: string;
|
|
48
|
-
status: RoomStatus;
|
|
49
|
-
players: number;
|
|
50
|
-
max: number;
|
|
51
|
-
mode: string | null;
|
|
52
|
-
member: boolean;
|
|
53
|
-
}
|
|
54
|
-
export type EsitoIngresso = {
|
|
55
|
-
ok: true;
|
|
56
|
-
} | {
|
|
57
|
-
ok: false;
|
|
58
|
-
code: 'room_not_found' | 'room_full' | 'room_ended' | 'room_playing';
|
|
59
|
-
};
|
|
60
|
-
export interface EsitoFlush {
|
|
61
|
-
scores: Array<{
|
|
62
|
-
playerId: string;
|
|
63
|
-
board: string;
|
|
64
|
-
score: number;
|
|
65
|
-
daily: boolean;
|
|
66
|
-
}>;
|
|
67
|
-
ended: {
|
|
68
|
-
result: JsonValue;
|
|
69
|
-
at: number;
|
|
70
|
-
} | null;
|
|
71
|
-
}
|
|
72
|
-
export interface FacetStanza {
|
|
73
|
-
crea(input: {
|
|
74
|
-
mode: string | null;
|
|
75
|
-
creator: IdentitaGiocatore;
|
|
76
|
-
}): Promise<Esito & {
|
|
77
|
-
ok: boolean;
|
|
78
|
-
}>;
|
|
79
|
-
info(playerId?: string): Promise<InfoStanza | null>;
|
|
80
|
-
fotografia(): Promise<FotografiaStanza | null>;
|
|
81
|
-
puoEntrare(identita: IdentitaGiocatore): Promise<EsitoIngresso>;
|
|
82
|
-
entra(identita: IdentitaGiocatore, connessione: string): Promise<Esito>;
|
|
83
|
-
ricevi(connessione: string, testo: string): Promise<Esito>;
|
|
84
|
-
disconnetti(connessione: string): Promise<Esito>;
|
|
85
|
-
tick(): Promise<Esito>;
|
|
86
|
-
sveglia(): Promise<Esito>;
|
|
87
|
-
flush(): Promise<EsitoFlush>;
|
|
88
|
-
}
|
|
89
|
-
export interface StorageFacet {
|
|
90
|
-
get<T>(chiave: string): Promise<T | undefined>;
|
|
91
|
-
put(chiave: string, valore: unknown): Promise<void>;
|
|
92
|
-
delete(chiave: string): Promise<boolean>;
|
|
93
|
-
list<T>(opzioni?: {
|
|
94
|
-
prefix?: string;
|
|
95
|
-
}): Promise<Map<string, T>>;
|
|
96
|
-
}
|
|
97
|
-
export interface StatoFacet {
|
|
98
|
-
readonly id: string | {
|
|
99
|
-
readonly name?: string;
|
|
100
|
-
toString(): string;
|
|
101
|
-
};
|
|
102
|
-
readonly storage: StorageFacet;
|
|
103
|
-
blockConcurrencyWhile<T>(callback: () => Promise<T>): Promise<T>;
|
|
104
|
-
}
|
|
105
|
-
export interface ClasseBaseFacet {
|
|
106
|
-
new (stato: StatoFacet, ambiente: unknown): object;
|
|
107
|
-
}
|
|
108
|
-
export interface ClasseFacetStanza {
|
|
109
|
-
new (stato: StatoFacet, ambiente: unknown): FacetStanza;
|
|
110
|
-
}
|
|
111
|
-
export declare function creaFacetStanza(DurableObject: ClasseBaseFacet, definizione: GameDefinition, manifest: RoomManifest): ClasseFacetStanza;
|
|
1
|
+
export * from './types/runtime/index.js';
|