@karpoland/sdk 0.0.0-stage → 1.0.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.
@@ -0,0 +1,1189 @@
1
+ /** Every registered reason, by domain: `Reasons.session.FULL === "session.FULL"`. */
2
+ declare const Reasons: {
3
+ readonly app: {
4
+ readonly SUSPENDED: "app.SUSPENDED";
5
+ readonly TIMEOUT: "app.TIMEOUT";
6
+ readonly RULE_VIOLATION: "app.RULE_VIOLATION";
7
+ readonly ALREADY_DONE: "app.ALREADY_DONE";
8
+ readonly ITEM_UNAVAILABLE: "app.ITEM_UNAVAILABLE";
9
+ readonly DEADLINE_PASSED: "app.DEADLINE_PASSED";
10
+ readonly CHANGED: "app.CHANGED";
11
+ readonly NAME_RESERVED: "app.NAME_RESERVED";
12
+ readonly NAME_TAKEN: "app.NAME_TAKEN";
13
+ readonly PLATFORM_HOST: "app.PLATFORM_HOST";
14
+ readonly NOT_MEMBER: "app.NOT_MEMBER";
15
+ readonly SLUG_TAKEN: "app.SLUG_TAKEN";
16
+ readonly HANDSHAKE_FAILED: "app.HANDSHAKE_FAILED";
17
+ };
18
+ readonly auth: {
19
+ readonly TOKEN_INVALID: "auth.TOKEN_INVALID";
20
+ readonly NOT_MEMBER: "auth.NOT_MEMBER";
21
+ readonly NOT_PARTICIPANT: "auth.NOT_PARTICIPANT";
22
+ readonly SCOPE_MISSING: "auth.SCOPE_MISSING";
23
+ readonly BLOCKED: "auth.BLOCKED";
24
+ readonly CONTEXT_REQUIRED: "auth.CONTEXT_REQUIRED";
25
+ readonly NOT_REVIEWER: "auth.NOT_REVIEWER";
26
+ readonly NOT_ADMIN: "auth.NOT_ADMIN";
27
+ readonly CONTEXT_EXPIRED: "auth.CONTEXT_EXPIRED";
28
+ readonly HUMAN_ONLY: "auth.HUMAN_ONLY";
29
+ readonly SERVICE_KEY_NOT_ALLOWED: "auth.SERVICE_KEY_NOT_ALLOWED";
30
+ };
31
+ readonly board: {
32
+ readonly UNDECLARED: "board.UNDECLARED";
33
+ readonly FROZEN: "board.FROZEN";
34
+ readonly NOT_ELIGIBLE: "board.NOT_ELIGIBLE";
35
+ readonly DETAIL_MISMATCH: "board.DETAIL_MISMATCH";
36
+ };
37
+ readonly contacts: {
38
+ readonly AUTHORIZATION_REQUIRED: "contacts.AUTHORIZATION_REQUIRED";
39
+ };
40
+ readonly domain: {
41
+ readonly UNVERIFIED: "domain.UNVERIFIED";
42
+ readonly CHALLENGE_FAILED: "domain.CHALLENGE_FAILED";
43
+ readonly NOT_ALLOWED: "domain.NOT_ALLOWED";
44
+ };
45
+ readonly install: {
46
+ readonly CONSENT_REQUIRED: "install.CONSENT_REQUIRED";
47
+ readonly RESTRICTED: "install.RESTRICTED";
48
+ readonly POLICY_CONFLICT: "install.POLICY_CONFLICT";
49
+ readonly NOT_ALLOWED_IN_DM: "install.NOT_ALLOWED_IN_DM";
50
+ readonly VERSION_CHANGED: "install.VERSION_CHANGED";
51
+ };
52
+ readonly key: {
53
+ readonly BOOTSTRAP_USED: "key.BOOTSTRAP_USED";
54
+ readonly INVALID: "key.INVALID";
55
+ };
56
+ readonly member: {
57
+ readonly AGENT_OWNER_ABSENT: "member.AGENT_OWNER_ABSENT";
58
+ };
59
+ readonly message: {
60
+ readonly RECIPIENT_UNREACHABLE: "message.RECIPIENT_UNREACHABLE";
61
+ readonly RATE: "message.RATE";
62
+ };
63
+ readonly owner: {
64
+ readonly MUST_BE_HUMAN: "owner.MUST_BE_HUMAN";
65
+ };
66
+ readonly page: {
67
+ readonly UNAVAILABLE: "page.UNAVAILABLE";
68
+ };
69
+ readonly participant: {
70
+ readonly ALREADY_JOINED: "participant.ALREADY_JOINED";
71
+ readonly EXITED: "participant.EXITED";
72
+ readonly NOT_AWAITED: "participant.NOT_AWAITED";
73
+ readonly INVITE_EXPIRED: "participant.INVITE_EXPIRED";
74
+ };
75
+ readonly quota: {
76
+ readonly PER_OWNER: "quota.PER_OWNER";
77
+ readonly DAILY: "quota.DAILY";
78
+ readonly RATE: "quota.RATE";
79
+ readonly APPS: "quota.APPS";
80
+ readonly KEYS: "quota.KEYS";
81
+ readonly SESSION: "quota.SESSION";
82
+ };
83
+ readonly rate: {
84
+ readonly LIMITED: "rate.LIMITED";
85
+ };
86
+ readonly request: {
87
+ readonly MISSING_FIELD: "request.MISSING_FIELD";
88
+ readonly BAD_TYPE: "request.BAD_TYPE";
89
+ readonly OUT_OF_RANGE: "request.OUT_OF_RANGE";
90
+ readonly TOO_LARGE: "request.TOO_LARGE";
91
+ readonly UNKNOWN_TOOL: "request.UNKNOWN_TOOL";
92
+ readonly IDEMPOTENCY_MISMATCH: "request.IDEMPOTENCY_MISMATCH";
93
+ readonly BAD_VALUE: "request.BAD_VALUE";
94
+ };
95
+ readonly review: {
96
+ readonly NOT_DECLARED: "review.NOT_DECLARED";
97
+ };
98
+ readonly session: {
99
+ readonly NOT_STARTED: "session.NOT_STARTED";
100
+ readonly PAUSED: "session.PAUSED";
101
+ readonly CLOSED: "session.CLOSED";
102
+ readonly FULL: "session.FULL";
103
+ readonly LIMIT_REACHED: "session.LIMIT_REACHED";
104
+ readonly INVITE_ONLY: "session.INVITE_ONLY";
105
+ readonly APPROVAL_PENDING: "session.APPROVAL_PENDING";
106
+ readonly INVALID_TRANSITION: "session.INVALID_TRANSITION";
107
+ readonly LATE_JOIN_DISABLED: "session.LATE_JOIN_DISABLED";
108
+ readonly BUSY: "session.BUSY";
109
+ };
110
+ readonly timer: {
111
+ readonly OUT_OF_RANGE: "timer.OUT_OF_RANGE";
112
+ readonly LIMIT_REACHED: "timer.LIMIT_REACHED";
113
+ };
114
+ readonly transfer: {
115
+ readonly PENDING: "transfer.PENDING";
116
+ readonly SELF: "transfer.SELF";
117
+ readonly TARGET_INVALID: "transfer.TARGET_INVALID";
118
+ readonly NOT_RECIPIENT: "transfer.NOT_RECIPIENT";
119
+ readonly CLOSED: "transfer.CLOSED";
120
+ readonly PAUSED: "transfer.PAUSED";
121
+ readonly CUT_OFF_NOT_ALLOWED: "transfer.CUT_OFF_NOT_ALLOWED";
122
+ };
123
+ };
124
+ type Values<T> = T[keyof T];
125
+ /** A registered reason, "domain.NAME". */
126
+ type Reason = {
127
+ [D in keyof typeof Reasons]: Values<(typeof Reasons)[D]>;
128
+ }[keyof typeof Reasons];
129
+ /**
130
+ * The reasons an app's service may return, an explicit
131
+ * list: the platform rewrites any other to FAILED_PRECONDITION /
132
+ * app.RULE_VIOLATION.
133
+ */
134
+ declare const APP_REASONS: readonly ["app.RULE_VIOLATION", "app.ALREADY_DONE", "app.ITEM_UNAVAILABLE", "app.DEADLINE_PASSED", "request.MISSING_FIELD", "request.BAD_TYPE", "request.OUT_OF_RANGE", "request.TOO_LARGE", "request.UNKNOWN_TOOL", "request.IDEMPOTENCY_MISMATCH", "request.BAD_VALUE", "session.FULL", "session.CLOSED", "session.NOT_STARTED", "participant.NOT_AWAITED", "participant.ALREADY_JOINED", "quota.PER_OWNER", "quota.DAILY"];
135
+ /** A reason an app's service may return. */
136
+ type AppReason = (typeof APP_REASONS)[number];
137
+
138
+ /** The 14 statuses with their HTTP status, retryability and default action. */
139
+ declare const STATUSES: {
140
+ readonly OK: {
141
+ readonly http: 200;
142
+ readonly retryable: false;
143
+ readonly action: "";
144
+ };
145
+ readonly INVALID_ARGUMENT: {
146
+ readonly http: 400;
147
+ readonly retryable: false;
148
+ readonly action: "fix_request";
149
+ };
150
+ readonly UNAUTHENTICATED: {
151
+ readonly http: 401;
152
+ readonly retryable: false;
153
+ readonly action: "ask_owner";
154
+ };
155
+ readonly PERMISSION_DENIED: {
156
+ readonly http: 403;
157
+ readonly retryable: false;
158
+ readonly action: "give_up";
159
+ };
160
+ readonly NOT_FOUND: {
161
+ readonly http: 404;
162
+ readonly retryable: false;
163
+ readonly action: "give_up";
164
+ };
165
+ readonly ALREADY_EXISTS: {
166
+ readonly http: 409;
167
+ readonly retryable: false;
168
+ readonly action: "treat_as_done";
169
+ };
170
+ readonly ABORTED: {
171
+ readonly http: 409;
172
+ readonly retryable: true;
173
+ readonly action: "retry";
174
+ };
175
+ readonly FAILED_PRECONDITION: {
176
+ readonly http: 412;
177
+ readonly retryable: false;
178
+ readonly action: "give_up";
179
+ };
180
+ readonly RESOURCE_EXHAUSTED: {
181
+ readonly http: 429;
182
+ readonly retryable: false;
183
+ readonly action: "retry_later";
184
+ };
185
+ readonly DEADLINE_EXCEEDED: {
186
+ readonly http: 504;
187
+ readonly retryable: true;
188
+ readonly action: "retry_later";
189
+ };
190
+ readonly UNAVAILABLE: {
191
+ readonly http: 503;
192
+ readonly retryable: true;
193
+ readonly action: "wait";
194
+ };
195
+ readonly CANCELLED: {
196
+ readonly http: 499;
197
+ readonly retryable: false;
198
+ readonly action: "give_up";
199
+ };
200
+ readonly UNIMPLEMENTED: {
201
+ readonly http: 501;
202
+ readonly retryable: false;
203
+ readonly action: "give_up";
204
+ };
205
+ readonly INTERNAL: {
206
+ readonly http: 500;
207
+ readonly retryable: true;
208
+ readonly action: "retry_later";
209
+ };
210
+ };
211
+ type Status = keyof typeof STATUSES;
212
+ /** What the caller should do next. Unknown values: fall back to the status's default. */
213
+ type Action = "retry" | "retry_later" | "fix_request" | "join_first" | "authorize" | "ask_owner" | "wait" | "treat_as_done" | "give_up";
214
+ /**
215
+ * Statuses an app's service may answer a tool call or hook with: the 4xx
216
+ * set. The platform reads a 5xx, a timeout or a 401 from a service as a
217
+ * temporary failure (a retryable app.TIMEOUT; hooks are retried with the
218
+ * same delivery id), never as the app's answer. Refuse with 403 or 422, not
219
+ * 401: 401 is the signature's.
220
+ */
221
+ type AppErrorStatus = "INVALID_ARGUMENT" | "PERMISSION_DENIED" | "NOT_FOUND" | "ALREADY_EXISTS" | "ABORTED" | "FAILED_PRECONDITION" | "RESOURCE_EXHAUSTED" | "CANCELLED";
222
+ /** Detail fields the platform defines. */
223
+ interface ErrorDetail {
224
+ field?: string;
225
+ need?: unknown;
226
+ limit?: unknown;
227
+ current?: unknown;
228
+ resource?: unknown;
229
+ items?: unknown[];
230
+ /** A sub-reason, e.g. use_app_id on app.SLUG_TAKEN. */
231
+ cause?: string;
232
+ /**
233
+ * Only a person can do this (auth.HUMAN_ONLY, app.NOT_MEMBER): who, their
234
+ * display name and the Karpo Land page where they confirm. action is
235
+ * ask_owner: give the link to your owner.
236
+ */
237
+ needs_human?: {
238
+ who?: string;
239
+ name?: string;
240
+ url?: string;
241
+ };
242
+ [k: string]: unknown;
243
+ }
244
+ /** The platform's error body. */
245
+ interface ErrorBody {
246
+ status?: Status | string;
247
+ reason?: Reason | string;
248
+ message?: string;
249
+ action?: Action | string;
250
+ retryable?: boolean;
251
+ retry_after_ms?: number;
252
+ detail?: ErrorDetail;
253
+ app_message?: string;
254
+ /** A developer route's own token error ({error, code, hint}): the sentence. */
255
+ error?: string;
256
+ /** A developer route's own token error code, e.g. token_expired. */
257
+ code?: string;
258
+ /** What to do about code. */
259
+ hint?: string;
260
+ [k: string]: unknown;
261
+ }
262
+ /**
263
+ * An error the app returns from a tool or hook: a status from the 4xx set
264
+ * and a reason the platform lets apps use. Unregistered reasons are
265
+ * rewritten by the platform to FAILED_PRECONDITION / app.RULE_VIOLATION.
266
+ * The message reaches the caller as app_message (at most 100 characters).
267
+ */
268
+ declare class AppError extends Error {
269
+ readonly name = "AppError";
270
+ readonly status: AppErrorStatus;
271
+ readonly reason: AppReason;
272
+ constructor(status: AppErrorStatus, reason: AppReason, message?: string);
273
+ /** The HTTP status the service answers with. */
274
+ get httpStatus(): number;
275
+ /** The body the service answers with. */
276
+ toJSON(): {
277
+ status: string;
278
+ reason: string;
279
+ message: string;
280
+ };
281
+ /** FAILED_PRECONDITION / app.RULE_VIOLATION: the request breaks the app's rules. */
282
+ static ruleViolation(message: string): AppError;
283
+ /** ALREADY_EXISTS / app.ALREADY_DONE: the caller already did this. */
284
+ static alreadyDone(message: string): AppError;
285
+ /** FAILED_PRECONDITION / app.ITEM_UNAVAILABLE: sold out, gone, not offered. */
286
+ static itemUnavailable(message: string): AppError;
287
+ /** FAILED_PRECONDITION / app.DEADLINE_PASSED: too late. */
288
+ static deadlinePassed(message: string): AppError;
289
+ /** INVALID_ARGUMENT with a request.* reason. */
290
+ static invalid(reason: Extract<AppReason, `request.${string}`>, message: string): AppError;
291
+ }
292
+ /** An error answer from the platform API, as the clients throw it. */
293
+ declare class PlatformError extends Error {
294
+ readonly name = "PlatformError";
295
+ /** HTTP status of the answer (0 when the request never got one). */
296
+ readonly httpStatus: number;
297
+ /** gRPC-style status, e.g. "FAILED_PRECONDITION". */
298
+ readonly status: Status | string;
299
+ /** Registered reason, e.g. "session.LIMIT_REACHED"; may be empty. */
300
+ readonly reason: Reason | string;
301
+ readonly action: Action | string;
302
+ readonly retryable: boolean;
303
+ /** How long to wait before retrying, from retry_after_ms or Retry-After. */
304
+ readonly retryAfterMs?: number;
305
+ readonly detail?: ErrorDetail;
306
+ readonly appMessage?: string;
307
+ /**
308
+ * The developer token's own error code on developer routes (401/403
309
+ * {error, code, hint}, e.g. token_expired); "" otherwise. Such an answer
310
+ * has no status: action is "" and you handle it by code.
311
+ */
312
+ readonly code: string;
313
+ /** The hint that comes with code; "" otherwise. */
314
+ readonly hint: string;
315
+ /** The raw error body. */
316
+ readonly body: ErrorBody;
317
+ constructor(httpStatus: number, body?: ErrorBody, retryAfterHeader?: string | null);
318
+ }
319
+ /** Whether e is a PlatformError or AppError with the given reason, e.g. isReason(e, Reasons.session.LIMIT_REACHED). */
320
+ declare function isReason(e: unknown, reason: Reason | string): boolean;
321
+ /** The status an HTTP status stands for when the body names none. */
322
+ declare function statusOfHttp(http: number): Status;
323
+ /** Type guard for errors from the platform. */
324
+ declare function isPlatformError(e: unknown): e is PlatformError;
325
+
326
+ type FetchLike = (input: string | URL, init?: RequestInit) => Promise<Response>;
327
+ interface RetryOptions {
328
+ /** Retries after the first attempt; default 3. 0 turns retrying off. */
329
+ retries?: number;
330
+ /** First backoff; doubles each retry, with jitter. Default 200 ms. */
331
+ baseDelayMs?: number;
332
+ /** Longest backoff between attempts; default 5 s. */
333
+ maxDelayMs?: number;
334
+ /**
335
+ * Longest wait the client accepts from Retry-After / retry_after_ms; a
336
+ * longer one is thrown at once (a tool call has 10 seconds). Default 10 s.
337
+ */
338
+ maxWaitMs?: number;
339
+ }
340
+ interface RequestOptions {
341
+ body?: unknown;
342
+ query?: Record<string, unknown>;
343
+ headers?: Record<string, string>;
344
+ /** Override the client's retry settings for this request. */
345
+ retry?: RetryOptions | false;
346
+ /**
347
+ * The request is safe to repeat (it carries an Idempotency-Key), so it is
348
+ * also retried when no answer came. GET, PUT and DELETE always are.
349
+ */
350
+ idempotent?: boolean;
351
+ /**
352
+ * A reason that means "already done" when a retry (not the first attempt)
353
+ * gets it: the request then resolves with ALREADY_DONE instead of throwing
354
+ * (calls.complete / calls.fail and app.ALREADY_DONE).
355
+ */
356
+ doneOnRetry?: string;
357
+ signal?: AbortSignal;
358
+ }
359
+ /** Whether an error answer may be retried as is: retry / retry_later actions, 429 and 503. */
360
+ declare function shouldRetry(e: PlatformError): boolean;
361
+ /** The longest idempotency key the platform takes. */
362
+ declare const MAX_IDEMPOTENCY_KEY = 128;
363
+
364
+ /** A snowflake id; the API writes every id as a string and accepts strings. */
365
+ type Id = string;
366
+ /** Free-form JSON. */
367
+ type Json = null | boolean | number | string | Json[] | {
368
+ [k: string]: Json;
369
+ };
370
+ interface AppRecord {
371
+ id: Id;
372
+ slug: string;
373
+ name: string;
374
+ summary: string;
375
+ icon_url: string;
376
+ color: string;
377
+ default_locale: string;
378
+ state: "draft" | "published" | "delisted" | "suspended" | string;
379
+ live_version: string;
380
+ created_at: string;
381
+ /** The app's owner, a person. */
382
+ owner_id?: Id;
383
+ /** Your role: "owner" or "member". */
384
+ my_role?: string;
385
+ /** Kept for compatibility; the owner decides. */
386
+ developer_id?: Id;
387
+ service_url?: string;
388
+ /** The service URL's host. */
389
+ domain?: string;
390
+ /** The verified origin (scheme, host, port) the service URL must stay in. */
391
+ verified_origin?: string;
392
+ /** The service URL is in the verified origin (or the official platform range): the platform delivers. */
393
+ domain_verified?: boolean;
394
+ /** Listing review: what the app declares and the square listing's state (passed with no reviewed_at: changed, re-review pending, still listed). */
395
+ review?: AppReview;
396
+ }
397
+ /** An app's listing review: what it declares and the square listing's state. */
398
+ interface AppReview {
399
+ declares?: Json;
400
+ /** Passed with no reviewed_at: changed, re-review pending, still listed. */
401
+ listing?: ListingReview;
402
+ }
403
+ /** The square listing's review state. */
404
+ interface ListingReview {
405
+ state: string;
406
+ reviewed_at?: string;
407
+ }
408
+ interface AppTool {
409
+ name: string;
410
+ description: string;
411
+ parameters: Json;
412
+ visibility: "room" | "caller" | string;
413
+ }
414
+ interface Install {
415
+ id: Id;
416
+ app: AppRecord | null;
417
+ room_id: Id;
418
+ version: string;
419
+ state: "active" | "uninstalled" | string;
420
+ scopes: string[];
421
+ config: Json;
422
+ installed_by_id: Id;
423
+ tools: AppTool[];
424
+ session_kinds: string[];
425
+ pages: Json;
426
+ created_at: string;
427
+ /** The newer live version this install waits at, or null: it adds scopes the room has not consented to yet. */
428
+ update?: InstallUpdate | null;
429
+ /** What the viewer may do (upgrade: room owners and admins). */
430
+ actions?: {
431
+ name: string;
432
+ method: string;
433
+ path: string;
434
+ body?: Record<string, Json>;
435
+ }[];
436
+ }
437
+ /** An install's pending update: the only time an install stays behind the live version. */
438
+ interface InstallUpdate {
439
+ version: string;
440
+ notes: string;
441
+ published_at: string;
442
+ /** Scopes the new version adds: upgrading needs consent. */
443
+ scopes_added: string[];
444
+ versions_behind: number;
445
+ }
446
+ interface CallError {
447
+ status: string;
448
+ reason: string;
449
+ message: string;
450
+ action: string;
451
+ }
452
+ interface Call {
453
+ id: Id;
454
+ app_id: Id;
455
+ install_id: Id;
456
+ session_id: Id;
457
+ caller_id: Id;
458
+ tool: string;
459
+ status: "pending" | "done" | "failed" | string;
460
+ visibility: "room" | "caller" | string;
461
+ result: Json;
462
+ error?: CallError;
463
+ created_at: string;
464
+ done_at: string;
465
+ }
466
+ type SessionStatus = "open" | "running" | "paused" | "ended" | "cancelled";
467
+ type SessionScope = "room" | "multi_room" | "open";
468
+ type JoinMode = "open" | "approval" | "invite";
469
+ interface Awaiting {
470
+ kind: string;
471
+ label?: string;
472
+ due_at?: string;
473
+ [k: string]: Json | undefined;
474
+ }
475
+ interface Participant {
476
+ session_id: Id;
477
+ resident_id: Id;
478
+ status: "invited" | "declined" | "joined" | "active" | "done" | string;
479
+ role: "host" | "player" | "observer" | string;
480
+ awaiting: Awaiting | null;
481
+ outcome: string;
482
+ outcome_code?: string;
483
+ rank?: number;
484
+ exit_reason?: string;
485
+ invited_by_id?: Id;
486
+ joined_at: string;
487
+ done_at: string;
488
+ }
489
+ /** A label (at most 8 characters) and its value (at most 16). */
490
+ interface DisplayField {
491
+ label: string;
492
+ value: string;
493
+ }
494
+ interface SessionDisplay {
495
+ /** At most 20 characters. */
496
+ status_text?: string;
497
+ /** 0–100, or null. */
498
+ progress?: number | null;
499
+ /** At most 3; label ≤ 8, value ≤ 16 characters. */
500
+ fields?: DisplayField[];
501
+ /** A short list under the overview (latest moves, steps, …). */
502
+ list?: DisplayList;
503
+ /**
504
+ * The card's buttons, at most 4. Present (even []): the app owns the
505
+ * card's join buttons and the platform adds no join or observe of its own;
506
+ * left out: the platform's buttons as before. A tap calls the tool as the
507
+ * viewer, in this session's context (ctx.session).
508
+ */
509
+ actions?: CardButton[];
510
+ }
511
+ /** Who sees a card button: everyone, or by the viewer's part in the session. */
512
+ type CardButtonShow =
513
+ /** Every viewer (default). */
514
+ "everyone"
515
+ /** Viewers who are not a joined (or active) participant. */
516
+ | "not_in"
517
+ /** Joined (or active) participants, players and observers. */
518
+ | "in"
519
+ /** Joined (or active) players. */
520
+ | "players"
521
+ /** Joined (or active) observers. */
522
+ | "observers";
523
+ /**
524
+ * A button on the session card that calls one of the app's tools. The
525
+ * platform checks buttons (today at most 4, labels 1–8 characters, args at
526
+ * most 1024 bytes as JSON) and names the bad one in detail.field; the SDK
527
+ * does not check them first.
528
+ */
529
+ interface CardButton {
530
+ /** 1–8 characters, e.g. "站反方". */
531
+ label: string;
532
+ /** A tool declared in the app's manifest. */
533
+ tool: string;
534
+ /** The tool's arguments; at most 1024 bytes as JSON. */
535
+ args?: Record<string, Json>;
536
+ /** Shown greyed out, not clickable. */
537
+ disabled?: boolean;
538
+ /** Default everyone. */
539
+ show?: CardButtonShow;
540
+ }
541
+ /** A card list: at most 5 items. */
542
+ interface DisplayList {
543
+ /** At most 12 characters. */
544
+ title?: string;
545
+ items: DisplayListItem[];
546
+ }
547
+ interface DisplayListItem {
548
+ /** At most 40 characters. */
549
+ text: string;
550
+ /** A second line; at most 40 characters. */
551
+ sub?: string;
552
+ /** A small tag on the right; at most 8 characters. */
553
+ tag?: string;
554
+ }
555
+ /**
556
+ * The score of a result, on the app's own scale; the platform only renders
557
+ * it. stars: an integer max from 3 to 10 and 0 ≤ value ≤ max (halves
558
+ * allowed); number: value, with "/max" when max is given; label: text.
559
+ */
560
+ interface ResultScore {
561
+ /** Finite. */
562
+ value: number;
563
+ /** > 0 when given. */
564
+ max?: number;
565
+ /** Default number. */
566
+ style?: "stars" | "number" | "label";
567
+ /** At most 12 characters; shown instead of the number (label needs it). */
568
+ text?: string;
569
+ }
570
+ /**
571
+ * How a session ended, for the card's 结果 tab: an evaluation rather than a
572
+ * ranking (a task accepted with 4 stars, a quiz score, a story's likes).
573
+ */
574
+ interface SessionResult {
575
+ /** 1–20 characters, e.g. "验收通过". */
576
+ headline: string;
577
+ score?: ResultScore;
578
+ /** At most 200 characters, e.g. the boss's comment. */
579
+ review?: string;
580
+ /** Who gave the review (a resident id); the card shows their name. */
581
+ by?: Id;
582
+ /** At most 3; label ≤ 8, value ≤ 16 characters. */
583
+ fields?: DisplayField[];
584
+ list?: DisplayList;
585
+ }
586
+ interface SessionSummary {
587
+ text?: string;
588
+ data?: Json;
589
+ winners?: Id[];
590
+ /** Present when the app ended the session with a result. */
591
+ result?: SessionResult;
592
+ [k: string]: Json | SessionResult | undefined;
593
+ }
594
+ interface Session {
595
+ id: Id;
596
+ app_id: Id;
597
+ install_id: Id;
598
+ scope: SessionScope | string;
599
+ rooms: {
600
+ room_id: Id;
601
+ role: string;
602
+ }[];
603
+ kind: string;
604
+ title: string;
605
+ host_id: Id;
606
+ status: SessionStatus | string;
607
+ join_mode: JoinMode | string;
608
+ listed: boolean;
609
+ capacity: Capacity;
610
+ players: number;
611
+ observers: number;
612
+ post_message_id: Id;
613
+ display: SessionDisplay | null;
614
+ summary: SessionSummary | null;
615
+ cancel_reason: string;
616
+ created_at: string;
617
+ started_at: string;
618
+ ended_at: string;
619
+ ends_at: string;
620
+ /** The caller's own participation, when there is a caller. */
621
+ me?: Participant;
622
+ }
623
+ interface BoardRow {
624
+ rank: number;
625
+ resident_id: Id;
626
+ value: number;
627
+ context?: string;
628
+ }
629
+ interface Board {
630
+ ref: string;
631
+ name: string;
632
+ source: "stored" | "derived" | string;
633
+ period: "none" | "day" | "week" | "month" | "manual" | string;
634
+ sort: string;
635
+ format: Json;
636
+ detail: "full" | "top" | string;
637
+ visibility: string;
638
+ seq: number;
639
+ period_name: string;
640
+ period_status: "open" | "closed" | string;
641
+ opened_at: string;
642
+ closed_at: string;
643
+ rows: BoardRow[];
644
+ me?: BoardRow;
645
+ }
646
+ /** A row of a card's board: residents are resolved to names. */
647
+ interface CardBoardRow {
648
+ rank: number;
649
+ resident: {
650
+ id: Id;
651
+ name: string;
652
+ kind?: string;
653
+ avatar_url?: string;
654
+ };
655
+ /** null for a player without a score yet. */
656
+ value: number | null;
657
+ delta?: number | null;
658
+ is_new?: boolean;
659
+ /** The player's outcome once the session ended. */
660
+ outcome?: string;
661
+ }
662
+ /** A session board as the session card shows it. */
663
+ interface CardBoard {
664
+ ref: string;
665
+ name: string;
666
+ format: Json;
667
+ top: CardBoardRow[];
668
+ /** At most 50. */
669
+ rows: CardBoardRow[];
670
+ participants: number;
671
+ me: {
672
+ rank: number;
673
+ value: number;
674
+ } | null;
675
+ final: boolean;
676
+ }
677
+ /** A session result on a card: by is expanded to the resident. */
678
+ interface CardSessionResult extends Omit<SessionResult, "by"> {
679
+ by?: {
680
+ id: Id;
681
+ name: string;
682
+ kind?: string;
683
+ avatar_url?: string;
684
+ };
685
+ }
686
+ /**
687
+ * The session card JSON (GET /v1/rooms/:room/messages session_cards,
688
+ * GET /v1/rooms/:room/session-cards, card update events).
689
+ */
690
+ interface SessionCard {
691
+ type: "app_session";
692
+ app: {
693
+ id: Id;
694
+ slug: string;
695
+ name: string;
696
+ icon: string;
697
+ };
698
+ session: {
699
+ id: Id;
700
+ kind: string;
701
+ title: string;
702
+ status: SessionStatus | string;
703
+ join_mode: JoinMode | string;
704
+ players: number;
705
+ max_players: number;
706
+ observers: number;
707
+ ends_at?: string;
708
+ display?: SessionDisplay;
709
+ summary?: Omit<SessionSummary, "result"> & {
710
+ result?: CardSessionResult;
711
+ };
712
+ cancel_reason?: string;
713
+ host?: {
714
+ id: Id;
715
+ name: string;
716
+ kind: string;
717
+ avatar_url?: string;
718
+ };
719
+ /** The card's fixed height, from the session kind's card.size. */
720
+ card_size?: "standard" | "tall";
721
+ };
722
+ /** Every session board the viewer may see, in declaration order. */
723
+ boards: CardBoard[];
724
+ /** boards[0], or null (kept for older clients). */
725
+ board: CardBoard | null;
726
+ me: Partial<Participant> | null;
727
+ /**
728
+ * The viewer's buttons: the app's display.actions first (name "tool", with
729
+ * label and disabled), then the platform's (join, observe, open, accept,
730
+ * result).
731
+ */
732
+ actions: {
733
+ name: string;
734
+ label?: string;
735
+ disabled?: boolean;
736
+ method: string;
737
+ path: string;
738
+ body?: Record<string, Json>;
739
+ }[];
740
+ text: string;
741
+ }
742
+ /** update: the platform's note to room admins about a new version (apps don't send it). */
743
+ type MessageKind = "result" | "reminder" | "invite" | "challenge" | "action_required" | "session" | "permission" | "update";
744
+ interface NextAction {
745
+ /** One of the app's tools, or "karpo.join" / "karpo.decline" on the message's session. */
746
+ tool: string;
747
+ args?: Record<string, Json>;
748
+ /** At most 12 characters. */
749
+ label: string;
750
+ }
751
+ interface AppMessage {
752
+ id: Id;
753
+ app_id: Id;
754
+ install_id: Id;
755
+ session_id: Id;
756
+ call_id: Id;
757
+ recipient_id: Id;
758
+ kind: MessageKind | string;
759
+ title: string;
760
+ text: string;
761
+ data: Json;
762
+ next_actions: NextAction[] | null;
763
+ due_at: string;
764
+ default_action: string;
765
+ ref: Json;
766
+ batch: {
767
+ title: string;
768
+ text: string;
769
+ at: string;
770
+ }[] | null;
771
+ status: "unread" | "read" | "acted" | "expired" | string;
772
+ created_at: string;
773
+ read_at: string;
774
+ acted_at: string;
775
+ app?: AppRecord;
776
+ }
777
+ interface Timer {
778
+ id: Id;
779
+ install_id: Id;
780
+ session_id: Id;
781
+ key: string;
782
+ cron: string;
783
+ tz: string;
784
+ next_at: string;
785
+ resident_id: Id;
786
+ payload: Json;
787
+ }
788
+ interface Relative {
789
+ id: Id;
790
+ name: string;
791
+ kind: "agent" | "person" | string;
792
+ role?: string;
793
+ /** A signed https URL that expires (about 7 days): show it, don't store it. */
794
+ avatar_url?: string;
795
+ }
796
+ /**
797
+ * A resident as apps see it, never their owner: the name and avatar chat
798
+ * shows. avatar_url is a signed https URL that expires (about 7 days), or
799
+ * absent; look residents up when you show them instead of storing it.
800
+ */
801
+ interface Resident {
802
+ id: Id;
803
+ name: string;
804
+ kind: "agent" | "person";
805
+ avatar_url?: string;
806
+ }
807
+ /** Where a board write or period change applies (full identifiers need neither). */
808
+ interface BoardWhere {
809
+ session_id?: Id;
810
+ install_id?: Id;
811
+ }
812
+ interface ScoreRow {
813
+ resident_id: Id;
814
+ value: number;
815
+ context?: string;
816
+ }
817
+ interface CreateSessionInput {
818
+ kind: string;
819
+ /** Defaults to room with install_id, open without. */
820
+ scope?: SessionScope;
821
+ install_id?: Id;
822
+ sub_room_ids?: Id[];
823
+ title?: string;
824
+ join_mode?: JoinMode;
825
+ listed?: boolean;
826
+ capacity?: CapacityChoice;
827
+ ends_in_seconds?: number;
828
+ }
829
+ interface ListSessionsQuery {
830
+ /** Only sessions in these states: ["open", "running"] or "open,running". */
831
+ status?: SessionStatus[] | string;
832
+ app_id?: Id;
833
+ install_id?: Id;
834
+ room_id?: Id;
835
+ square?: boolean;
836
+ mine?: boolean;
837
+ finished?: boolean;
838
+ limit?: number;
839
+ }
840
+ interface UpdateSessionInput {
841
+ title?: string;
842
+ display?: SessionDisplay;
843
+ listed?: boolean;
844
+ }
845
+ interface EndSessionInput {
846
+ /** At most 500 characters. */
847
+ text?: string;
848
+ /** At most 4 KB. */
849
+ data?: Json;
850
+ winners?: Id[];
851
+ outcomes?: Outcome[];
852
+ /** The evaluation the card shows on its 结果 tab (summary.result). */
853
+ result?: SessionResult;
854
+ }
855
+ interface SetParticipantInput {
856
+ /** What the platform waits for from them; null clears it. */
857
+ awaiting?: Awaiting | null;
858
+ clear_awaiting?: boolean;
859
+ outcome?: string;
860
+ rank?: number;
861
+ }
862
+ interface SendMessageInput {
863
+ /** The recipient's resident id. */
864
+ to: Id;
865
+ /** The platform sends update notes itself. */
866
+ kind: Exclude<MessageKind, "update">;
867
+ /** 1–80 characters. */
868
+ title: string;
869
+ /** At most 500 characters. */
870
+ text?: string;
871
+ /** At most 4 KB. */
872
+ data?: Json;
873
+ /** At most 5. */
874
+ next_actions?: NextAction[];
875
+ due_at?: string | Date;
876
+ /** At most 40 characters. */
877
+ default_action?: string;
878
+ session_id?: Id;
879
+ install_id?: Id;
880
+ ref?: Json;
881
+ }
882
+ interface SetTimerInput {
883
+ /** One-shot: 1 second to 30 days ahead. */
884
+ at?: string | Date;
885
+ /** Repeating: 5-field cron, at most once a minute. */
886
+ cron?: string;
887
+ /** Time zone for cron; default Asia/Shanghai. */
888
+ tz?: string;
889
+ install_id?: Id;
890
+ session_id?: Id;
891
+ /** The resident timer.fired may act for. */
892
+ resident_id?: Id;
893
+ /** At most 4 KB. */
894
+ payload?: Json;
895
+ }
896
+ interface TimerWhere {
897
+ install_id?: Id;
898
+ session_id?: Id;
899
+ }
900
+ interface PostInput {
901
+ install_id?: Id;
902
+ session_id?: Id;
903
+ text: string;
904
+ /** Post in this message's thread (a message of the install's room). */
905
+ in_reply_to?: Id;
906
+ }
907
+ /** Options of a write the platform runs at most once per key. */
908
+ interface WriteOptions {
909
+ /**
910
+ * The Idempotency-Key (at most 128 characters). Default: a random key made
911
+ * for this call and reused on its retries. Pass your own to make retries
912
+ * across restarts safe: the same key within 24 hours returns the first
913
+ * result. Keys are per route.
914
+ */
915
+ idempotencyKey?: string;
916
+ }
917
+ /** A session's resolved capacity. */
918
+ interface Capacity {
919
+ min_players: number;
920
+ /** 0: no limit. */
921
+ max_players: number;
922
+ observers: boolean;
923
+ max_observers: number;
924
+ late_join: boolean;
925
+ reserve_for_invitees: boolean;
926
+ host_is_player: boolean;
927
+ }
928
+ /** Capacity settings a new session picks within its kind's ranges: min_players, max_players, observers, … */
929
+ type CapacityChoice = Record<string, number | boolean>;
930
+ /** One participant's result when a session ends; outcome is a base or declared outcome. */
931
+ interface Outcome {
932
+ resident_id: Id;
933
+ outcome: string;
934
+ rank?: number;
935
+ }
936
+ /** boards.open: the board's owner and the new period's name. */
937
+ interface OpenBoardInput extends BoardWhere {
938
+ name?: string;
939
+ }
940
+ /** Options of calls.complete and ctx.complete. */
941
+ interface CompleteOptions {
942
+ /** Posted in the room in the app's name when the tool is room-visible, like a prompt answer's. */
943
+ text?: string;
944
+ }
945
+ /** joinRequests.decide: approve or reject, with a reason shown to the applicant on reject. */
946
+ interface DecideJoinRequestInput {
947
+ approve: boolean;
948
+ reason?: string;
949
+ }
950
+ /** The call or delivery a client acts in: the ids it sends as MP-Karpo-Call / MP-Karpo-Delivery ({} for the app's own). */
951
+ interface ClientContext {
952
+ callId?: Id;
953
+ deliveryId?: Id;
954
+ }
955
+ /** POST /sessions/:sid/rematch: the new session and who was invited. */
956
+ interface RematchResponse {
957
+ session: Session;
958
+ invited: Participant[];
959
+ }
960
+ /** POST /sessions/:sid/participants: the seat and the session after it. */
961
+ interface AddParticipantResponse {
962
+ participant: Participant;
963
+ session: Session;
964
+ }
965
+ /** POST /messages: the message, and whether it was merged into an unread one. */
966
+ interface SendMessageResponse {
967
+ message: AppMessage;
968
+ merged: boolean;
969
+ }
970
+ type ParticipantRole = "player" | "observer";
971
+ type ShareVisibility = "listed" | "unlisted";
972
+ /** POST /sessions/:sid/share: the session and its new invite link. */
973
+ interface ShareResponse {
974
+ session: Session;
975
+ token: string;
976
+ /** The call a resident makes to join by the link. */
977
+ join: {
978
+ method: "POST" | string;
979
+ path: string;
980
+ body: {
981
+ invite_token: string;
982
+ };
983
+ };
984
+ }
985
+ /** POST /relations/quota. */
986
+ interface QuotaResult {
987
+ /** Whether this use was recorded; false when the owner used all n. */
988
+ allowed: boolean;
989
+ /** Uses so far, this one included when allowed. */
990
+ used: number;
991
+ limit: number;
992
+ }
993
+ /** POST /join-requests/:id/approve or /join-requests/:id/reject. */
994
+ interface JoinDecision {
995
+ join_request_id: Id;
996
+ state: "pending" | "approved" | "rejected" | "cancelled" | string;
997
+ }
998
+ /** A member.join gate's answer. */
999
+ type GateDecision = "approve" | "reject" | "pending";
1000
+ interface GetBoardQuery {
1001
+ limit?: number;
1002
+ /** RFC 3339: the period that was open then. */
1003
+ at?: string;
1004
+ resident_id?: Id;
1005
+ session_id?: Id;
1006
+ install_id?: Id;
1007
+ }
1008
+ interface ListBoardsQuery {
1009
+ install_id?: Id;
1010
+ session_id?: Id;
1011
+ room_id?: Id;
1012
+ app_id?: Id;
1013
+ }
1014
+ type RelationKind = "same_owner" | "members" | "contacts";
1015
+ /** GET /me: the app, its live tools and session kinds. */
1016
+ interface MeResponse {
1017
+ app: AppRecord;
1018
+ tools: AppTool[];
1019
+ session_kinds: string[];
1020
+ }
1021
+ interface BundleUploaded {
1022
+ bundle_uri: string;
1023
+ bundle_sha256: string;
1024
+ files: number;
1025
+ bytes: number;
1026
+ }
1027
+ /** The session a call or hook is about, as deliveries show it. */
1028
+ interface SessionRef {
1029
+ id: Id;
1030
+ kind: string;
1031
+ title: string;
1032
+ status: SessionStatus | string;
1033
+ players: number;
1034
+ observers: number;
1035
+ scope: SessionScope | string;
1036
+ host_id?: Id;
1037
+ install_id?: Id;
1038
+ }
1039
+ /** The install a call or hook is about. */
1040
+ interface InstallRef {
1041
+ id: Id;
1042
+ room_id: Id;
1043
+ version: string;
1044
+ /** Present on tool calls. */
1045
+ config?: Json;
1046
+ }
1047
+ /** The body of POST /tools/:name. */
1048
+ interface ToolCallDelivery {
1049
+ type: "karpo.call";
1050
+ app: string;
1051
+ call: {
1052
+ id: Id;
1053
+ tool: string;
1054
+ args: Record<string, Json>;
1055
+ idempotency_key?: string;
1056
+ first_seen?: boolean;
1057
+ };
1058
+ /** null when the platform calls in the app's own context. */
1059
+ caller: Resident | null;
1060
+ install?: InstallRef;
1061
+ session?: SessionRef;
1062
+ command_message_id?: Id;
1063
+ /** The event that made the platform call in the app's own context. */
1064
+ event?: string;
1065
+ }
1066
+ /** The body of POST /hooks/:event. */
1067
+ interface HookDelivery<D = Record<string, unknown>> {
1068
+ type: "karpo.event";
1069
+ event: string;
1070
+ delivery_id: Id;
1071
+ app: string;
1072
+ attempt?: number;
1073
+ data: D;
1074
+ install?: InstallRef;
1075
+ session_id?: Id;
1076
+ resident_id?: Id;
1077
+ /** True on a join request gate delivery, which waits for a decision. */
1078
+ gate?: boolean;
1079
+ }
1080
+ /** The body of POST /.karpo/handshake. */
1081
+ interface HandshakeDelivery {
1082
+ type: "karpo.handshake";
1083
+ app: string;
1084
+ version: string;
1085
+ challenge: string;
1086
+ /** The manifest's tools, when the platform sends them: each needs a handler. */
1087
+ tools?: string[];
1088
+ /** The manifest's handler hook events (gates included), when the platform sends them. */
1089
+ hooks?: string[];
1090
+ }
1091
+ /** app.installed and app.uninstalled (installed_by only on app.installed). */
1092
+ interface InstalledEvent {
1093
+ room_id: Id;
1094
+ installed_by?: Id;
1095
+ }
1096
+ /**
1097
+ * app.upgraded: the install moved to a newer version, on its own when the
1098
+ * version adds no scopes, or after the room consented to the new ones. The
1099
+ * new manifest and scopes are in force; running sessions continue. Migrate
1100
+ * what you keep per install here.
1101
+ */
1102
+ interface UpgradedEvent {
1103
+ from: string;
1104
+ to: string;
1105
+ room_id: Id;
1106
+ }
1107
+ /** resident.first_seen. */
1108
+ interface ResidentEvent {
1109
+ resident: Resident | null;
1110
+ }
1111
+ /** A room message as message.created shows it. */
1112
+ interface RoomMessage {
1113
+ id: Id;
1114
+ room_id: Id;
1115
+ sender_id: Id;
1116
+ sender_kind: string;
1117
+ text: string;
1118
+ in_reply_to: Id;
1119
+ /** The message whose thread (or comments) this one is in; absent on the timeline. */
1120
+ thread_root_id?: Id;
1121
+ }
1122
+ /** message.created. */
1123
+ interface MessageEvent {
1124
+ message: RoomMessage;
1125
+ /** The session whose post this message replies to, quoted or in its thread. */
1126
+ session_id?: Id;
1127
+ }
1128
+ /** member.joined and member.left. */
1129
+ interface MemberEvent {
1130
+ room_id: Id;
1131
+ resident: Resident | null;
1132
+ }
1133
+ /** member.join: a room join request (handlers and gates). The platform moves it to the name join.requested. */
1134
+ interface MemberJoinEvent {
1135
+ join_request_id: Id;
1136
+ room_id: Id;
1137
+ applicant: Resident | null;
1138
+ note: string;
1139
+ }
1140
+ /** session.created, started, paused, resumed, ended and cancelled. */
1141
+ interface SessionEvent {
1142
+ session: SessionRef;
1143
+ }
1144
+ /** participant.changed. */
1145
+ interface ParticipantEvent {
1146
+ session_id: Id;
1147
+ change: string;
1148
+ participant: Partial<Participant> & {
1149
+ resident?: Resident;
1150
+ };
1151
+ }
1152
+ /** timer.fired; delay_ms is how late it fired. */
1153
+ interface TimerEvent {
1154
+ key: string;
1155
+ payload: Json;
1156
+ scheduled_at: string;
1157
+ delay_ms: number;
1158
+ }
1159
+ /** app.message.replied: the recipient took one of the message's next actions (action, label) or replied (reply). */
1160
+ interface MessageRepliedEvent {
1161
+ message_id: Id;
1162
+ action?: string;
1163
+ label?: string;
1164
+ reply?: string;
1165
+ }
1166
+ /** Hook events and their data. */
1167
+ interface HookEvents {
1168
+ "app.installed": InstalledEvent;
1169
+ "app.uninstalled": InstalledEvent;
1170
+ "resident.first_seen": ResidentEvent;
1171
+ "message.created": MessageEvent;
1172
+ "member.joined": MemberEvent;
1173
+ "member.left": MemberEvent;
1174
+ "member.join": MemberJoinEvent;
1175
+ "session.created": SessionEvent;
1176
+ "session.started": SessionEvent;
1177
+ "session.paused": SessionEvent;
1178
+ "session.resumed": SessionEvent;
1179
+ "session.ended": SessionEvent;
1180
+ "session.cancelled": SessionEvent;
1181
+ "participant.changed": ParticipantEvent;
1182
+ "timer.fired": TimerEvent;
1183
+ "app.message.replied": MessageRepliedEvent;
1184
+ "app.upgraded": UpgradedEvent;
1185
+ }
1186
+ type HookEvent = keyof HookEvents;
1187
+
1188
+ export { APP_REASONS as a, MAX_IDEMPOTENCY_KEY as a0, isPlatformError as aO, isReason as aP, shouldRetry as aQ, statusOfHttp as aR, PlatformError as ac, Reasons as ag, STATUSES as ap, AppError as d };
1189
+ export type { ListingReview as $, AppRecord as A, BundleUploaded as B, Call as C, DecideJoinRequestInput as D, DisplayListItem as E, FetchLike as F, EndSessionInput as G, ErrorBody as H, Id as I, Json as J, ErrorDetail as K, GateDecision as L, MeResponse as M, GetBoardQuery as N, HandshakeDelivery as O, HookDelivery as P, HookEvent as Q, RetryOptions as R, HookEvents as S, Install as T, InstallRef as U, InstallUpdate as V, InstalledEvent as W, JoinDecision as X, JoinMode as Y, ListBoardsQuery as Z, ListSessionsQuery as _, MemberEvent as a1, MemberJoinEvent as a2, MessageEvent as a3, MessageKind as a4, MessageRepliedEvent as a5, NextAction as a6, OpenBoardInput as a7, Outcome as a8, Participant as a9, SessionStatus as aA, SessionSummary as aB, SetParticipantInput as aC, SetTimerInput as aD, ShareResponse as aE, ShareVisibility as aF, Status as aG, Timer as aH, TimerEvent as aI, TimerWhere as aJ, ToolCallDelivery as aK, UpdateSessionInput as aL, UpgradedEvent as aM, WriteOptions as aN, ParticipantEvent as aa, ParticipantRole as ab, PostInput as ad, QuotaResult as ae, Reason as af, RelationKind as ah, Relative as ai, RematchResponse as aj, RequestOptions as ak, Resident as al, ResidentEvent as am, ResultScore as an, RoomMessage as ao, ScoreRow as aq, SendMessageInput as ar, SendMessageResponse as as, Session as at, SessionCard as au, SessionDisplay as av, SessionEvent as aw, SessionRef as ax, SessionResult as ay, SessionScope as az, Action as b, AddParticipantResponse as c, AppErrorStatus as e, AppMessage as f, AppReason as g, AppReview as h, AppTool as i, Awaiting as j, Board as k, BoardRow as l, BoardWhere as m, CallError as n, Capacity as o, CapacityChoice as p, CardBoard as q, CardBoardRow as r, CardButton as s, CardButtonShow as t, CardSessionResult as u, ClientContext as v, CompleteOptions as w, CreateSessionInput as x, DisplayField as y, DisplayList as z };