You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.1 KiB
96 lines
2.1 KiB
|
23 hours ago
|
// Generated from ../schema.json. Edit the schema and run npm run contracts:generate.
|
||
|
|
|
||
|
|
export type UUID = string;
|
||
|
|
|
||
|
|
export type Revision = number;
|
||
|
|
|
||
|
|
export type Instant = string;
|
||
|
|
|
||
|
|
export type Locale = string;
|
||
|
|
|
||
|
|
export type ErrorCode = string;
|
||
|
|
|
||
|
|
export type MessageArgument = string | number | boolean;
|
||
|
|
|
||
|
|
export type MessageArgs = Record<string, MessageArgument>;
|
||
|
|
|
||
|
|
export interface LocalizedMessage {
|
||
|
|
key: string;
|
||
|
|
args: MessageArgs;
|
||
|
|
}
|
||
|
|
|
||
|
|
export type ErrorOrigin = "server" | "client" | "transport";
|
||
|
|
|
||
|
|
export type ErrorCategory = "validation" | "authentication" | "authorization" | "not-found" | "conflict" | "rate-limit" | "availability" | "internal" | "protocol" | "transport";
|
||
|
|
|
||
|
|
export type OperationOutcome = "not-applicable" | "not-applied" | "rejected" | "unknown";
|
||
|
|
|
||
|
|
export type RecoveryAction = "none" | "correct-input" | "authenticate" | "complete-requirements" | "resync" | "resolve-pending" | "retry-same-request" | "change-selection" | "update-client" | "contact-support";
|
||
|
|
|
||
|
|
export interface Recovery {
|
||
|
|
action: RecoveryAction;
|
||
|
|
retryAfterMs?: number;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface Violation {
|
||
|
|
pointer: string;
|
||
|
|
code: ErrorCode;
|
||
|
|
message: LocalizedMessage;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ErrorData {
|
||
|
|
modelVersion: 1;
|
||
|
|
origin: ErrorOrigin;
|
||
|
|
code: ErrorCode;
|
||
|
|
category: ErrorCategory;
|
||
|
|
outcome: OperationOutcome;
|
||
|
|
message: LocalizedMessage;
|
||
|
|
recovery: Recovery;
|
||
|
|
violations: Array<Violation>;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface Correlation {
|
||
|
|
requestId?: UUID;
|
||
|
|
commandId?: UUID;
|
||
|
|
operationId?: UUID;
|
||
|
|
subscriptionId?: UUID;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface HttpProblem {
|
||
|
|
type: string;
|
||
|
|
title: string;
|
||
|
|
status: number;
|
||
|
|
correlation: Correlation;
|
||
|
|
error: ErrorData;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface ErrorMessagePayload {
|
||
|
|
correlation: Correlation;
|
||
|
|
error: ErrorData;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface CommandRejection {
|
||
|
|
status: "rejected";
|
||
|
|
error: ErrorData;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface GameCard {
|
||
|
|
id: string;
|
||
|
|
version: string;
|
||
|
|
title: string;
|
||
|
|
summary: string;
|
||
|
|
locale: Locale;
|
||
|
|
minPlayers: number;
|
||
|
|
maxPlayers: number;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface CatalogPage {
|
||
|
|
items: Array<GameCard>;
|
||
|
|
nextCursor: string | null;
|
||
|
|
}
|
||
|
|
|
||
|
|
export interface CatalogResponse {
|
||
|
|
requestId: UUID;
|
||
|
|
data: CatalogPage;
|
||
|
|
}
|