2022-04-12 14:21:19 +02:00
|
|
|
import { z } from "zod";
|
2022-04-28 11:51:55 +02:00
|
|
|
import { extendApi } from "@anatine/zod-openapi";
|
2021-12-16 15:57:37 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* WARNING! The original file is in /messages/JsonMessages.
|
|
|
|
* All other files are automatically copied from this file on container startup / build
|
|
|
|
*/
|
|
|
|
|
2022-04-12 14:21:19 +02:00
|
|
|
export const isAdminApiData = z.object({
|
2022-04-28 11:39:08 +02:00
|
|
|
// @ts-ignore
|
2022-04-28 11:51:55 +02:00
|
|
|
userUuid: extendApi(z.string(), { example: "998ce839-3dea-4698-8b41-ebbdf7688ad9" }),
|
|
|
|
email: extendApi(z.nullable(z.string()), {
|
|
|
|
description: "The email of the current user.",
|
|
|
|
example: "example@workadventu.re",
|
|
|
|
}),
|
|
|
|
roomUrl: extendApi(z.string(), { example: "/@/teamSlug/worldSlug/roomSlug" }),
|
|
|
|
mapUrlStart: extendApi(z.string(), {
|
|
|
|
description: "The full URL to the JSON map file",
|
|
|
|
example: "https://myuser.github.io/myrepo/map.json",
|
|
|
|
}),
|
2022-04-12 14:21:19 +02:00
|
|
|
messages: z.optional(z.array(z.unknown())),
|
|
|
|
});
|
|
|
|
|
|
|
|
export type AdminApiData = z.infer<typeof isAdminApiData>;
|