@etazio/agent-sdk 0.1.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/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/README.md +145 -0
- package/index.js +1752 -0
- package/index.js.map +6 -0
- package/package.json +51 -0
- package/types/audio.d.ts +86 -0
- package/types/index.d.ts +168 -0
- package/types/shared/agents.d.ts +689 -0
- package/types/shared/avatar.d.ts +137 -0
- package/types/shared/board.d.ts +124 -0
- package/types/shared/calendar.d.ts +64 -0
- package/types/shared/chat.d.ts +161 -0
- package/types/shared/dto.d.ts +235 -0
- package/types/shared/errors.d.ts +15 -0
- package/types/shared/events.d.ts +391 -0
- package/types/shared/generator.d.ts +317 -0
- package/types/shared/images.d.ts +79 -0
- package/types/shared/index.d.ts +17 -0
- package/types/shared/markdown.d.ts +76 -0
- package/types/shared/roles.d.ts +29 -0
- package/types/shared/schemas.d.ts +251 -0
- package/types/shared/sso.d.ts +124 -0
- package/types/shared/tv.d.ts +121 -0
- package/types/shared/view.d.ts +103 -0
- package/types/shared/web.d.ts +297 -0
- package/types/speech.d.ts +39 -0
- package/types/version.d.ts +2 -0
- package/types/voice.d.ts +61 -0
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const emailSchema: z.ZodString;
|
|
3
|
+
export declare const passwordSchema: z.ZodString;
|
|
4
|
+
export declare const displayNameSchema: z.ZodString;
|
|
5
|
+
export declare const registerSchema: z.ZodObject<{
|
|
6
|
+
email: z.ZodString;
|
|
7
|
+
password: z.ZodString;
|
|
8
|
+
displayName: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type RegisterInput = z.infer<typeof registerSchema>;
|
|
11
|
+
export declare const loginSchema: z.ZodObject<{
|
|
12
|
+
email: z.ZodString;
|
|
13
|
+
password: z.ZodString;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type LoginInput = z.infer<typeof loginSchema>;
|
|
16
|
+
export declare const magicLinkRequestSchema: z.ZodObject<{
|
|
17
|
+
email: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export declare const magicLinkConsumeSchema: z.ZodObject<{
|
|
20
|
+
token: z.ZodString;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const slugSchema: z.ZodString;
|
|
23
|
+
export declare const createWorkspaceSchema: z.ZodObject<{
|
|
24
|
+
name: z.ZodString;
|
|
25
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
26
|
+
template: z.ZodOptional<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type CreateWorkspaceInput = z.infer<typeof createWorkspaceSchema>;
|
|
29
|
+
export declare const updateWorkspaceSchema: z.ZodObject<{
|
|
30
|
+
name: z.ZodOptional<z.ZodString>;
|
|
31
|
+
deskSelfClaim: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export declare const assignableRoleSchema: z.ZodEnum<{
|
|
34
|
+
admin: "admin";
|
|
35
|
+
guest: "guest";
|
|
36
|
+
member: "member";
|
|
37
|
+
}>;
|
|
38
|
+
export declare const createInvitationSchema: z.ZodObject<{
|
|
39
|
+
email: z.ZodString;
|
|
40
|
+
role: z.ZodDefault<z.ZodEnum<{
|
|
41
|
+
admin: "admin";
|
|
42
|
+
guest: "guest";
|
|
43
|
+
member: "member";
|
|
44
|
+
}>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
export type CreateInvitationInput = z.infer<typeof createInvitationSchema>;
|
|
47
|
+
export declare const acceptInvitationSchema: z.ZodObject<{
|
|
48
|
+
token: z.ZodString;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
export declare const updateMemberRoleSchema: z.ZodObject<{
|
|
51
|
+
role: z.ZodEnum<{
|
|
52
|
+
admin: "admin";
|
|
53
|
+
guest: "guest";
|
|
54
|
+
member: "member";
|
|
55
|
+
}>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
export declare const transferOwnershipSchema: z.ZodObject<{
|
|
58
|
+
userId: z.ZodString;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export declare const objectIdSchema: z.ZodString;
|
|
61
|
+
export declare const worldMoveSchema: z.ZodObject<{
|
|
62
|
+
seq: z.ZodNumber;
|
|
63
|
+
x: z.ZodNumber;
|
|
64
|
+
z: z.ZodNumber;
|
|
65
|
+
rotY: z.ZodNumber;
|
|
66
|
+
anim: z.ZodEnum<{
|
|
67
|
+
idle: "idle";
|
|
68
|
+
run: "run";
|
|
69
|
+
walk: "walk";
|
|
70
|
+
}>;
|
|
71
|
+
t: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
export declare const worldJoinSchema: z.ZodObject<{
|
|
74
|
+
workspaceId: z.ZodString;
|
|
75
|
+
participantId: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export declare const worldSitSchema: z.ZodObject<{
|
|
78
|
+
seatId: z.ZodString;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export declare const opIdSchema: z.ZodString;
|
|
81
|
+
/** Hülle einer Editor-Operation; die Operation selbst wird gegen editorOpSchema aus @huddle/scene-schema geprüft. */
|
|
82
|
+
export declare const applyOpEnvelopeSchema: z.ZodObject<{
|
|
83
|
+
baseVersion: z.ZodNumber;
|
|
84
|
+
opId: z.ZodString;
|
|
85
|
+
op: z.ZodUnknown;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
export declare const publishSchema: z.ZodObject<{
|
|
88
|
+
baseVersion: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
note: z.ZodOptional<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export declare const lockSchema: z.ZodObject<{
|
|
92
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
export declare const deskAssignmentSchema: z.ZodObject<{
|
|
95
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export declare const deskIdSchema: z.ZodString;
|
|
98
|
+
export declare const DESK_LIMITS: {
|
|
99
|
+
/** Gegenstände je Schreibtisch (Objektbudget, Roadmap §6) */
|
|
100
|
+
readonly maxItems: 12;
|
|
101
|
+
/** Versatz auf der Ankerebene in Metern (je Achse; `DESK_ANCHOR_MAX_OFFSET` in scene-schema) */
|
|
102
|
+
readonly maxOffset: 0.15;
|
|
103
|
+
/** Obergrenze für die lokale Position frei abgelegter Gegenstände (`anchor: 'surface'`, SPA-95) – die Tischplatte begrenzt enger */
|
|
104
|
+
readonly maxSurfaceOffset: 1.5;
|
|
105
|
+
readonly maxLabel: 40;
|
|
106
|
+
};
|
|
107
|
+
export declare const deskItemSchema: z.ZodObject<{
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
asset: z.ZodString;
|
|
110
|
+
anchor: z.ZodString;
|
|
111
|
+
offset: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
112
|
+
rotationY: z.ZodDefault<z.ZodNumber>;
|
|
113
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
114
|
+
color: z.ZodOptional<z.ZodString>;
|
|
115
|
+
roughness: z.ZodOptional<z.ZodNumber>;
|
|
116
|
+
metalness: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
}, z.core.$strip>>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
/** Eingabe für PUT /office/desks/:deskId/customization – Anker, Assets und Budget prüft der Server gegen Katalog und Layout. */
|
|
120
|
+
export declare const deskCustomizationInputSchema: z.ZodObject<{
|
|
121
|
+
label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
122
|
+
items: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
123
|
+
id: z.ZodString;
|
|
124
|
+
asset: z.ZodString;
|
|
125
|
+
anchor: z.ZodString;
|
|
126
|
+
offset: z.ZodDefault<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
|
|
127
|
+
rotationY: z.ZodDefault<z.ZodNumber>;
|
|
128
|
+
overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
129
|
+
color: z.ZodOptional<z.ZodString>;
|
|
130
|
+
roughness: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
metalness: z.ZodOptional<z.ZodNumber>;
|
|
132
|
+
}, z.core.$strip>>>;
|
|
133
|
+
}, z.core.$strip>>>;
|
|
134
|
+
overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
135
|
+
color: z.ZodOptional<z.ZodString>;
|
|
136
|
+
roughness: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
metalness: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
}, z.core.$strip>>>;
|
|
139
|
+
chair: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
140
|
+
color: z.ZodOptional<z.ZodString>;
|
|
141
|
+
roughness: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
metalness: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
}, z.core.$strip>>>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type DeskCustomizationInput = z.output<typeof deskCustomizationInputSchema>;
|
|
146
|
+
export declare const inventoryItemIdSchema: z.ZodString;
|
|
147
|
+
export declare const zoneIdSchema: z.ZodString;
|
|
148
|
+
export declare const meetingTokenSchema: z.ZodObject<{
|
|
149
|
+
target: z.ZodUnion<readonly [z.ZodLiteral<"office">, z.ZodString]>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export declare const zoneAccessInputSchema: z.ZodObject<{
|
|
152
|
+
userIds: z.ZodArray<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
export declare const mediaStateSchema: z.ZodObject<{
|
|
155
|
+
mic: z.ZodBoolean;
|
|
156
|
+
cam: z.ZodBoolean;
|
|
157
|
+
screen: z.ZodBoolean;
|
|
158
|
+
presence: z.ZodDefault<z.ZodEnum<{
|
|
159
|
+
fokus: "fokus";
|
|
160
|
+
frei: "frei";
|
|
161
|
+
weg: "weg";
|
|
162
|
+
}>>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
export declare const zoneKnockSchema: z.ZodObject<{
|
|
165
|
+
zoneId: z.ZodString;
|
|
166
|
+
}, z.core.$strip>;
|
|
167
|
+
export declare const zoneAdmitSchema: z.ZodObject<{
|
|
168
|
+
zoneId: z.ZodString;
|
|
169
|
+
userId: z.ZodString;
|
|
170
|
+
allow: z.ZodBoolean;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
/**
|
|
173
|
+
* Grenzen des Chats. Die Reaktions-Grenze steckt in `CHAT_GLYPH_LIMITS` (chat.ts) und zählt
|
|
174
|
+
* Graphem-Cluster – `length` hätte ZWJ-Sequenzen mit Skin-Tone fälschlich abgelehnt (SPA-117).
|
|
175
|
+
*/
|
|
176
|
+
export declare const CHAT_LIMITS: {
|
|
177
|
+
readonly maxText: 2000;
|
|
178
|
+
readonly pageSize: 50;
|
|
179
|
+
};
|
|
180
|
+
/** Konversations-Schlüssel: room:office, room:<zoneId>, dm:<userA>:<userB> (Nutzer-IDs aufsteigend sortiert) */
|
|
181
|
+
export declare const convSchema: z.ZodString;
|
|
182
|
+
export declare const sendMessageSchema: z.ZodObject<{
|
|
183
|
+
conv: z.ZodString;
|
|
184
|
+
text: z.ZodString;
|
|
185
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
186
|
+
alsoToChannel: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
+
blocks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
188
|
+
type: z.ZodLiteral<"confirm">;
|
|
189
|
+
id: z.ZodString;
|
|
190
|
+
title: z.ZodString;
|
|
191
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
192
|
+
fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
193
|
+
label: z.ZodString;
|
|
194
|
+
value: z.ZodString;
|
|
195
|
+
}, z.core.$strip>>>;
|
|
196
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
label: z.ZodString;
|
|
199
|
+
style: z.ZodDefault<z.ZodEnum<{
|
|
200
|
+
danger: "danger";
|
|
201
|
+
primary: "primary";
|
|
202
|
+
secondary: "secondary";
|
|
203
|
+
}>>;
|
|
204
|
+
}, z.core.$strip>>;
|
|
205
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
|
+
}, z.core.$strip>], "type">>>;
|
|
207
|
+
}, z.core.$strip>;
|
|
208
|
+
export declare const reactionSchema: z.ZodObject<{
|
|
209
|
+
glyph: z.ZodString;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
/** „Schreibt gerade“ (SPA-133) */
|
|
212
|
+
export declare const chatTypingSchema: z.ZodObject<{
|
|
213
|
+
conv: z.ZodString;
|
|
214
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
|
+
typing: z.ZodBoolean;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
export declare const readSchema: z.ZodObject<{
|
|
218
|
+
conv: z.ZodString;
|
|
219
|
+
}, z.core.$strip>;
|
|
220
|
+
export declare const messagesQuerySchema: z.ZodObject<{
|
|
221
|
+
conv: z.ZodString;
|
|
222
|
+
before: z.ZodOptional<z.ZodString>;
|
|
223
|
+
parentId: z.ZodOptional<z.ZodString>;
|
|
224
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
225
|
+
}, z.core.$strip>;
|
|
226
|
+
/** DM-Schlüssel für zwei Nutzer (Reihenfolge egal). */
|
|
227
|
+
export declare function dmConv(a: string, b: string): string;
|
|
228
|
+
export declare const OBJECT_LIMITS: {
|
|
229
|
+
/** Objektzustand als JSON, Bytes */
|
|
230
|
+
readonly maxStateBytes: 2048;
|
|
231
|
+
/** Zustandsänderungen je Teilnehmer und Sekunde */
|
|
232
|
+
readonly statePerSecond: 5;
|
|
233
|
+
/** Aktionen je Teilnehmer und Sekunde */
|
|
234
|
+
readonly actionsPerSecond: 3;
|
|
235
|
+
/** Reaktionen (Glyph über dem Kopf) je Sekunde */
|
|
236
|
+
readonly reactPerSecond: 1;
|
|
237
|
+
};
|
|
238
|
+
/** Objekt-ID: Layout-Platzierung oder persönlicher Gegenstand `<deskId>:<itemId>` (SPA-140) */
|
|
239
|
+
export declare const worldObjectIdSchema: z.ZodString;
|
|
240
|
+
export declare const objectStateSchema: z.ZodObject<{
|
|
241
|
+
placementId: z.ZodString;
|
|
242
|
+
state: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
export declare const objectActionSchema: z.ZodObject<{
|
|
245
|
+
placementId: z.ZodString;
|
|
246
|
+
action: z.ZodString;
|
|
247
|
+
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
export declare const reactSchema: z.ZodObject<{
|
|
250
|
+
glyph: z.ZodString;
|
|
251
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Anmeldung je Workspace (SPA-94): Google ohne Einrichtung, eigene OIDC-Verbindung, „nur SSO“.
|
|
4
|
+
* Die Tabelle hier ist die gemeinsame Sprache von API und Web.
|
|
5
|
+
*/
|
|
6
|
+
export declare const LOGIN_METHODS: readonly ['password', 'magic', 'google', 'oidc'];
|
|
7
|
+
export type LoginMethod = (typeof LOGIN_METHODS)[number];
|
|
8
|
+
export declare const LOGIN_METHOD_LABELS: Record<LoginMethod, string>;
|
|
9
|
+
/** Workspace-Adresse wie bei Gather: `<slug>-<id>`. Die ID allein bleibt gültig. */
|
|
10
|
+
export declare function workspaceRef(w: {
|
|
11
|
+
id: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
}): string;
|
|
14
|
+
/** `acme-gmbh-65f…` → `{ slug: 'acme-gmbh', id: '65f…' }`; reine ID → `slug: null`. */
|
|
15
|
+
export declare function parseWorkspaceRef(ref: string): {
|
|
16
|
+
slug: string | null;
|
|
17
|
+
id: string;
|
|
18
|
+
} | null;
|
|
19
|
+
export declare const domainSchema: z.ZodString;
|
|
20
|
+
/** Anbieter-Domains, die nie als Firmendomain nachgewiesen werden dürfen. */
|
|
21
|
+
export declare const PUBLIC_MAIL_DOMAINS: readonly ['gmail.com', 'googlemail.com', 'outlook.com', 'hotmail.com', 'live.com', 'yahoo.com', 'icloud.com', 'me.com', 'gmx.de', 'gmx.net', 'web.de', 't-online.de', 'posteo.de', 'mailbox.org', 'proton.me', 'protonmail.com', 'aol.com'];
|
|
22
|
+
export declare function emailDomain(email: string): string;
|
|
23
|
+
/** Name und Präfix des DNS-TXT-Nachweises. */
|
|
24
|
+
export declare const DOMAIN_TXT_PREFIX = "_etazio-verify";
|
|
25
|
+
export declare const DOMAIN_TXT_VALUE_PREFIX = "etazio-verify=";
|
|
26
|
+
export interface SsoDomainDto {
|
|
27
|
+
domain: string;
|
|
28
|
+
verified: boolean;
|
|
29
|
+
verifiedAt: string | null;
|
|
30
|
+
/** Eintrag, den der Admin anlegen muss */
|
|
31
|
+
txtName: string;
|
|
32
|
+
txtValue: string;
|
|
33
|
+
}
|
|
34
|
+
export interface WorkspaceAuthDto {
|
|
35
|
+
password: boolean;
|
|
36
|
+
magicLink: boolean;
|
|
37
|
+
google: {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
available: boolean;
|
|
40
|
+
allowedDomains: string[];
|
|
41
|
+
};
|
|
42
|
+
oidc: {
|
|
43
|
+
enabled: boolean;
|
|
44
|
+
configured: boolean;
|
|
45
|
+
issuer: string;
|
|
46
|
+
clientId: string;
|
|
47
|
+
/** Das Secret selbst verlässt den Server nie. */
|
|
48
|
+
hasClientSecret: boolean;
|
|
49
|
+
scopes: string[];
|
|
50
|
+
label: string;
|
|
51
|
+
lastTest: {
|
|
52
|
+
at: string;
|
|
53
|
+
ok: boolean;
|
|
54
|
+
message: string | null;
|
|
55
|
+
} | null;
|
|
56
|
+
};
|
|
57
|
+
/** Nachgewiesene Domains dürfen ohne Einladung beitreten */
|
|
58
|
+
autoJoin: boolean;
|
|
59
|
+
domains: SsoDomainDto[];
|
|
60
|
+
}
|
|
61
|
+
/** Öffentliche Sicht vor dem Login – nur, welche Wege es gibt. */
|
|
62
|
+
export interface WorkspaceLoginInfoDto {
|
|
63
|
+
workspace: {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
slug: string;
|
|
67
|
+
ref: string;
|
|
68
|
+
};
|
|
69
|
+
methods: {
|
|
70
|
+
password: boolean;
|
|
71
|
+
magicLink: boolean;
|
|
72
|
+
google: boolean;
|
|
73
|
+
oidc: {
|
|
74
|
+
label: string;
|
|
75
|
+
} | null;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export interface SsoDiscoverResultDto {
|
|
79
|
+
workspaces: WorkspaceLoginInfoDto[];
|
|
80
|
+
}
|
|
81
|
+
export declare const updateWorkspaceAuthSchema: z.ZodObject<{
|
|
82
|
+
password: z.ZodOptional<z.ZodBoolean>;
|
|
83
|
+
magicLink: z.ZodOptional<z.ZodBoolean>;
|
|
84
|
+
google: z.ZodOptional<z.ZodObject<{
|
|
85
|
+
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
86
|
+
allowedDomains: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
}, z.core.$strip>>;
|
|
88
|
+
oidcEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
autoJoin: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
export type UpdateWorkspaceAuthInput = z.infer<typeof updateWorkspaceAuthSchema>;
|
|
92
|
+
export declare const oidcConnectionSchema: z.ZodObject<{
|
|
93
|
+
issuer: z.ZodString;
|
|
94
|
+
clientId: z.ZodString;
|
|
95
|
+
clientSecret: z.ZodOptional<z.ZodString>;
|
|
96
|
+
scopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
97
|
+
label: z.ZodDefault<z.ZodString>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
export type OidcConnectionInput = z.infer<typeof oidcConnectionSchema>;
|
|
100
|
+
export declare const addDomainSchema: z.ZodObject<{
|
|
101
|
+
domain: z.ZodString;
|
|
102
|
+
}, z.core.$strip>;
|
|
103
|
+
export declare const ssoDiscoverSchema: z.ZodObject<{
|
|
104
|
+
email: z.ZodString;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
/** Fehlercodes, die der Callback als `?sso_error=` an die Web-App hängt. */
|
|
107
|
+
export declare const SSO_ERRORS: {
|
|
108
|
+
readonly cancelled: 'Die Anmeldung wurde abgebrochen.';
|
|
109
|
+
readonly state: 'Die Anmeldung ist abgelaufen oder wurde in einem anderen Browser gestartet. Bitte erneut versuchen.';
|
|
110
|
+
readonly provider: 'Der Anmeldedienst hat die Anmeldung nicht bestätigt.';
|
|
111
|
+
readonly email_unverified: 'Der Anmeldedienst bestätigt die E-Mail-Adresse nicht.';
|
|
112
|
+
readonly account_exists: 'Zu dieser Adresse gibt es schon ein Konto. Melde dich damit an; danach lässt sich SSO verknüpfen.';
|
|
113
|
+
readonly domain: 'Deine Adresse gehört nicht zu den für diesen Workspace freigegebenen Domains.';
|
|
114
|
+
readonly not_member: 'Du bist kein Mitglied dieses Workspaces. Wenn du eingeladen wurdest, öffne den Link aus der Einladungsmail.';
|
|
115
|
+
readonly disabled: 'Diese Anmeldung ist für den Workspace nicht freigeschaltet.';
|
|
116
|
+
readonly unavailable: 'Die Anmeldung mit Google ist auf diesem Server nicht eingerichtet.';
|
|
117
|
+
};
|
|
118
|
+
export type SsoErrorCode = keyof typeof SSO_ERRORS;
|
|
119
|
+
/** Antwortdetail, wenn ein Workspace die aktuelle Anmeldeart nicht zulässt. */
|
|
120
|
+
export interface LoginMethodRequiredDetails {
|
|
121
|
+
reason: 'login_method';
|
|
122
|
+
workspaceRef: string;
|
|
123
|
+
allowed: LoginMethod[];
|
|
124
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { ObjectStateValue } from './events.js';
|
|
3
|
+
/**
|
|
4
|
+
* Fernseher (Phase 7e): Kanalzustand eines TV-Objekts im vorhandenen `object:state` (flach, ≤ 2 KB, synchron,
|
|
5
|
+
* persistent). `auto` = Verhalten von Phase 5 (nächste Bildschirmfreigabe landet automatisch auf der Fläche).
|
|
6
|
+
* Wiedergabeposition zur Serverzeit t: `position + (playing ? (t − at) / 1000 : 0)`; `at`/`by` setzt der Server.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TV_SOURCES: readonly ['auto', 'off', 'share', 'video', 'embed', 'channel', 'web'];
|
|
9
|
+
export type TvSource = (typeof TV_SOURCES)[number];
|
|
10
|
+
export declare const TV_CHANNELS: readonly ['clock', 'dashboard', 'slideshow'];
|
|
11
|
+
export type TvChannel = (typeof TV_CHANNELS)[number];
|
|
12
|
+
export interface TvState {
|
|
13
|
+
source: TvSource;
|
|
14
|
+
/** share: Identität des Teilenden (Pin – schlägt die Automatik) */
|
|
15
|
+
sharer?: string;
|
|
16
|
+
/** video/embed: https-URL (Videodatei/HLS bzw. YouTube/Vimeo); slideshow: Bild-URLs, durch Zeilenumbruch oder Leerzeichen getrennt */
|
|
17
|
+
url?: string;
|
|
18
|
+
/** Vom Client ermittelt (oEmbed) oder Dateiname */
|
|
19
|
+
title?: string;
|
|
20
|
+
playing?: boolean;
|
|
21
|
+
/** Sekunden zur Serverzeit `at` */
|
|
22
|
+
position?: number;
|
|
23
|
+
/** Serverzeit (ms), zu der `position`/`playing` gesetzt wurden */
|
|
24
|
+
at?: number;
|
|
25
|
+
/** Teilnehmer, der die Wiedergabe zuletzt gesteuert hat */
|
|
26
|
+
by?: string;
|
|
27
|
+
/** 0–1, gemeinsam für alle (der TV hat eine Lautstärke) */
|
|
28
|
+
volume?: number;
|
|
29
|
+
channel?: TvChannel;
|
|
30
|
+
/** Video in Schleife (Standardkanal aus dem Editor) */
|
|
31
|
+
loop?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Phase 7f (`source: 'web'`): Id eines Web-Kanals; mehrere durch Komma rotieren mit `rotate`.
|
|
34
|
+
* Ohne `web` gilt `url` als Ad-hoc-Adresse (flüchtiges Profil, keine Anmeldung).
|
|
35
|
+
*/
|
|
36
|
+
web?: string;
|
|
37
|
+
/** Rotation mehrerer Kanäle in Sekunden (synchron über `at`) */
|
|
38
|
+
rotate?: number;
|
|
39
|
+
}
|
|
40
|
+
export declare const TV_LIMITS: {
|
|
41
|
+
/** URL-Länge in Zeichen */
|
|
42
|
+
readonly maxUrl: 1024;
|
|
43
|
+
readonly maxTitle: 120;
|
|
44
|
+
/** Hosts, die als `embed` erlaubt sind */
|
|
45
|
+
readonly embedHosts: readonly ['youtube.com', 'www.youtube.com', 'm.youtube.com', 'youtu.be', 'vimeo.com', 'www.vimeo.com', 'player.vimeo.com'];
|
|
46
|
+
readonly defaultVolume: 0.8;
|
|
47
|
+
/** Hörweite des Fernsehers in Metern (wie SCREEN_RANGE der Bindung) */
|
|
48
|
+
readonly earshot: 6;
|
|
49
|
+
/** Diashow: Wechsel in Sekunden */
|
|
50
|
+
readonly slideSeconds: 8;
|
|
51
|
+
/** `web`: Länge der Kanalliste (Rotation) in Zeichen */
|
|
52
|
+
readonly maxWeb: 520;
|
|
53
|
+
};
|
|
54
|
+
/** Kleiner URL-Zerleger ohne DOM-`URL` (shared läuft ohne DOM-Typen); relative Pfade (`/smoke/clip.webm`) sind erlaubt. */
|
|
55
|
+
export declare function parseUrl(u: string): {
|
|
56
|
+
protocol: string;
|
|
57
|
+
host: string;
|
|
58
|
+
path: string;
|
|
59
|
+
query: Record<string, string>;
|
|
60
|
+
} | null;
|
|
61
|
+
export declare const tvStateSchema: z.ZodObject<{
|
|
62
|
+
source: z.ZodEnum<{
|
|
63
|
+
auto: "auto";
|
|
64
|
+
channel: "channel";
|
|
65
|
+
embed: "embed";
|
|
66
|
+
off: "off";
|
|
67
|
+
share: "share";
|
|
68
|
+
video: "video";
|
|
69
|
+
web: "web";
|
|
70
|
+
}>;
|
|
71
|
+
sharer: z.ZodOptional<z.ZodString>;
|
|
72
|
+
url: z.ZodOptional<z.ZodString>;
|
|
73
|
+
title: z.ZodOptional<z.ZodString>;
|
|
74
|
+
playing: z.ZodOptional<z.ZodBoolean>;
|
|
75
|
+
position: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
at: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
by: z.ZodOptional<z.ZodString>;
|
|
78
|
+
volume: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
channel: z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
clock: "clock";
|
|
81
|
+
dashboard: "dashboard";
|
|
82
|
+
slideshow: "slideshow";
|
|
83
|
+
}>>;
|
|
84
|
+
loop: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
web: z.ZodOptional<z.ZodString>;
|
|
86
|
+
rotate: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
}, z.core.$strict>;
|
|
88
|
+
export type TvValidation = {
|
|
89
|
+
ok: true;
|
|
90
|
+
state: TvState;
|
|
91
|
+
} | {
|
|
92
|
+
ok: false;
|
|
93
|
+
error: string;
|
|
94
|
+
};
|
|
95
|
+
/** Zustand prüfen (Client-Vorprüfung und Server). Liefert den bereinigten Zustand. */
|
|
96
|
+
export declare function validateTvState(raw: unknown): TvValidation;
|
|
97
|
+
/** Laufzeitzustand vor Editor-Standard (`placement.state`) vor Katalog (`auto`) – wie `lightOn()`. */
|
|
98
|
+
export declare function tvStateOf(runtime: ObjectStateValue | undefined, editorDefault?: ObjectStateValue | null): TvState;
|
|
99
|
+
/** Sollposition in Sekunden zur (Server-)Zeit `now`; mit `duration` in Schleife bzw. am Ende geklemmt. */
|
|
100
|
+
export declare function tvPosition(s: TvState, now: number, duration?: number): number;
|
|
101
|
+
export interface EmbedInfo {
|
|
102
|
+
provider: 'youtube' | 'vimeo';
|
|
103
|
+
id: string;
|
|
104
|
+
/** Vorschaubild (YouTube direkt; Vimeo per oEmbed vom Client) */
|
|
105
|
+
poster: string | null;
|
|
106
|
+
/** Einbettungs-URL für das Overlay */
|
|
107
|
+
embedUrl: string;
|
|
108
|
+
}
|
|
109
|
+
/** YouTube-/Vimeo-Adresse erkennen (watch, youtu.be, shorts, embed, vimeo.com/<id>) */
|
|
110
|
+
export declare function embedInfo(url: string): EmbedInfo | null;
|
|
111
|
+
/** Direkt abspielbare Videoadresse (Dateiendung oder HLS)? */
|
|
112
|
+
export declare function isVideoUrl(url: string): boolean;
|
|
113
|
+
export declare function isHlsUrl(url: string): boolean;
|
|
114
|
+
/** Anzeigename eines Videos: Titel, sonst Dateiname ohne Endung */
|
|
115
|
+
export declare function tvTitle(s: TvState): string;
|
|
116
|
+
/** Bild-URLs einer Diashow (Zeilenumbruch, Leerzeichen oder Komma getrennt) */
|
|
117
|
+
export declare function slideshowUrls(s: TvState): string[];
|
|
118
|
+
/** Aktuelles Bild einer Diashow zur Serverzeit `now` (Wechsel alle `slideSeconds`, synchron über `at`) */
|
|
119
|
+
export declare function slideshowIndex(s: TvState, now: number, count: number): number;
|
|
120
|
+
/** Beschriftung für Tooltip/Hinweiszeile (Name des Teilenden setzt der Client ein) */
|
|
121
|
+
export declare function tvLabel(s: TvState, sharerName?: string | null): string;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Ansichts- und Steuerungseinstellungen je Nutzer (Navigation, 09/2026, `specs/navigation-analysis.md` §4).
|
|
4
|
+
* Gelten global in allen Workspaces (wie das Avatar-Profil). Die 3D-Szene ist die einzige Wahrheit;
|
|
5
|
+
* „2D“, „2.5D“ und „3D“ sind Kamera-Presets derselben Szene. `auto` koppelt die Neigung an den Zoom.
|
|
6
|
+
*/
|
|
7
|
+
export declare const VIEW_PRESETS: readonly ['auto', 'top', 'iso', 'third'];
|
|
8
|
+
export type ViewPreset = (typeof VIEW_PRESETS)[number];
|
|
9
|
+
/** Wirksame Kamerastufe (im Preset `auto` aus dem Abstand abgeleitet) */
|
|
10
|
+
export type ViewStage = Exclude<ViewPreset, 'auto'>;
|
|
11
|
+
export declare const CAMERA_FOLLOW: readonly ['follow', 'loose', 'free'];
|
|
12
|
+
export declare const CAMERA_ROTATE: readonly ['auto', 'fixed', 'snap90', 'free'];
|
|
13
|
+
export declare const WALL_MODES: readonly ['auto', 'cutaway', 'transparent', 'cap', 'never'];
|
|
14
|
+
export declare const CEILING_MODES: readonly ['auto', 'show', 'hide'];
|
|
15
|
+
export declare const CLICK_MOVE: readonly ['double', 'single', 'off'];
|
|
16
|
+
export declare const KEY_AXES: readonly ['auto', 'camera', 'world'];
|
|
17
|
+
export declare const RUN_MODES: readonly ['shift', 'toggle', 'always'];
|
|
18
|
+
export declare const DETAIL_LEVELS: readonly ['auto', 'low', 'high'];
|
|
19
|
+
export type CameraFollow = (typeof CAMERA_FOLLOW)[number];
|
|
20
|
+
export type CameraRotate = (typeof CAMERA_ROTATE)[number];
|
|
21
|
+
export type WallMode = (typeof WALL_MODES)[number];
|
|
22
|
+
export type CeilingMode = (typeof CEILING_MODES)[number];
|
|
23
|
+
export type ClickMove = (typeof CLICK_MOVE)[number];
|
|
24
|
+
export type KeyAxes = (typeof KEY_AXES)[number];
|
|
25
|
+
export type RunMode = (typeof RUN_MODES)[number];
|
|
26
|
+
export type DetailLevel = (typeof DETAIL_LEVELS)[number];
|
|
27
|
+
/** Zoombereiche (Kameraabstand in m) je Stufe; `auto` überspannt alles */
|
|
28
|
+
export declare const ZOOM_RANGE: Record<ViewPreset, [number, number]>;
|
|
29
|
+
/** Startabstand je Preset */
|
|
30
|
+
export declare const ZOOM_DEFAULT: Record<ViewPreset, number>;
|
|
31
|
+
export declare const viewSettingsSchema: z.ZodObject<{
|
|
32
|
+
preset: z.ZodDefault<z.ZodEnum<{
|
|
33
|
+
auto: "auto";
|
|
34
|
+
iso: "iso";
|
|
35
|
+
third: "third";
|
|
36
|
+
top: "top";
|
|
37
|
+
}>>;
|
|
38
|
+
zoom: z.ZodPrefault<z.ZodObject<{
|
|
39
|
+
auto: z.ZodDefault<z.ZodNumber>;
|
|
40
|
+
top: z.ZodDefault<z.ZodNumber>;
|
|
41
|
+
iso: z.ZodDefault<z.ZodNumber>;
|
|
42
|
+
third: z.ZodDefault<z.ZodNumber>;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
follow: z.ZodDefault<z.ZodEnum<{
|
|
45
|
+
follow: "follow";
|
|
46
|
+
free: "free";
|
|
47
|
+
loose: "loose";
|
|
48
|
+
}>>;
|
|
49
|
+
smoothing: z.ZodDefault<z.ZodNumber>;
|
|
50
|
+
rotate: z.ZodDefault<z.ZodEnum<{
|
|
51
|
+
auto: "auto";
|
|
52
|
+
fixed: "fixed";
|
|
53
|
+
free: "free";
|
|
54
|
+
snap90: "snap90";
|
|
55
|
+
}>>;
|
|
56
|
+
walls: z.ZodDefault<z.ZodEnum<{
|
|
57
|
+
auto: "auto";
|
|
58
|
+
cap: "cap";
|
|
59
|
+
cutaway: "cutaway";
|
|
60
|
+
never: "never";
|
|
61
|
+
transparent: "transparent";
|
|
62
|
+
}>>;
|
|
63
|
+
ceiling: z.ZodDefault<z.ZodEnum<{
|
|
64
|
+
auto: "auto";
|
|
65
|
+
hide: "hide";
|
|
66
|
+
show: "show";
|
|
67
|
+
}>>;
|
|
68
|
+
clickMove: z.ZodDefault<z.ZodEnum<{
|
|
69
|
+
double: "double";
|
|
70
|
+
off: "off";
|
|
71
|
+
single: "single";
|
|
72
|
+
}>>;
|
|
73
|
+
keyAxes: z.ZodDefault<z.ZodEnum<{
|
|
74
|
+
auto: "auto";
|
|
75
|
+
camera: "camera";
|
|
76
|
+
world: "world";
|
|
77
|
+
}>>;
|
|
78
|
+
run: z.ZodDefault<z.ZodEnum<{
|
|
79
|
+
always: "always";
|
|
80
|
+
shift: "shift";
|
|
81
|
+
toggle: "toggle";
|
|
82
|
+
}>>;
|
|
83
|
+
detail: z.ZodDefault<z.ZodEnum<{
|
|
84
|
+
auto: "auto";
|
|
85
|
+
high: "high";
|
|
86
|
+
low: "low";
|
|
87
|
+
}>>;
|
|
88
|
+
outlines: z.ZodDefault<z.ZodBoolean>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type ViewSettings = z.output<typeof viewSettingsSchema>;
|
|
91
|
+
export type ViewSettingsInput = z.input<typeof viewSettingsSchema>;
|
|
92
|
+
export declare function defaultViewSettings(): ViewSettings;
|
|
93
|
+
/** Stufe, die im Preset `auto` zu einem Kameraabstand gehört (Hysterese macht der Aufrufer) */
|
|
94
|
+
export declare function stageForDistance(dist: number): ViewStage;
|
|
95
|
+
/** Wirksame Stufe eines Presets bei gegebenem Abstand */
|
|
96
|
+
export declare function effectiveStage(preset: ViewPreset, dist: number): ViewStage;
|
|
97
|
+
/** Preset-abhängige Defaults für `auto`-Werte */
|
|
98
|
+
export declare function resolveRotate(v: CameraRotate, stage: ViewStage): Exclude<CameraRotate, 'auto'>;
|
|
99
|
+
export declare function resolveWalls(v: WallMode, stage: ViewStage): Exclude<WallMode, 'auto'>;
|
|
100
|
+
export declare function resolveCeiling(v: CeilingMode, stage: ViewStage): Exclude<CeilingMode, 'auto'>;
|
|
101
|
+
export declare function resolveKeyAxes(v: KeyAxes, stage: ViewStage): Exclude<KeyAxes, 'auto'>;
|
|
102
|
+
export declare const VIEW_PRESET_LABELS: Record<ViewPreset, string>;
|
|
103
|
+
export declare const VIEW_PRESET_HINTS: Record<ViewPreset, string>;
|