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-07-16 09:52:51 +02:00
|
|
|
|
2021-12-14 19:05:14 +01:00
|
|
|
/*
|
|
|
|
* WARNING! The original file is in /messages/JsonMessages.
|
|
|
|
* All other files are automatically copied from this file on container startup / build
|
|
|
|
*/
|
2021-07-16 09:52:51 +02:00
|
|
|
|
2022-04-12 14:21:19 +02:00
|
|
|
export const isMapDetailsData = z.object({
|
2022-04-28 11:39:08 +02:00
|
|
|
// @ts-ignore
|
2022-04-28 11:51:55 +02:00
|
|
|
mapUrl: extendApi(z.string(), {
|
|
|
|
description: "The full URL to the JSON map file",
|
|
|
|
example: "https://myuser.github.io/myrepo/map.json",
|
|
|
|
}),
|
|
|
|
authenticationMandatory: extendApi(z.optional(z.nullable(z.boolean())), {
|
|
|
|
description: "Whether the authentication is mandatory or not for this map",
|
|
|
|
example: true,
|
|
|
|
}),
|
|
|
|
group: extendApi(z.nullable(z.string()), {
|
|
|
|
description: 'The group this room is part of (maps the notion of "world" in WorkAdventure SAAS)',
|
|
|
|
example: "myorg/myworld",
|
|
|
|
}),
|
2021-09-21 20:24:53 +02:00
|
|
|
|
2022-04-28 11:51:55 +02:00
|
|
|
contactPage: extendApi(z.optional(z.nullable(z.string())), {
|
|
|
|
description: "The URL to the contact page",
|
|
|
|
example: "https://mycompany.com/contact-us",
|
|
|
|
}),
|
|
|
|
iframeAuthentication: extendApi(z.optional(z.nullable(z.string())), {
|
|
|
|
description: "The URL of the authentication Iframe",
|
|
|
|
example: "https://mycompany.com/authc",
|
|
|
|
}),
|
2022-04-12 14:21:19 +02:00
|
|
|
// The date (in ISO 8601 format) at which the room will expire
|
2022-04-28 11:51:55 +02:00
|
|
|
expireOn: extendApi(z.optional(z.string()), {
|
|
|
|
description: "The date (in ISO 8601 format) at which the room will expire",
|
|
|
|
example: "2022-11-05T08:15:30-05:00",
|
|
|
|
}),
|
2022-04-12 14:21:19 +02:00
|
|
|
// Whether the "report" feature is enabled or not on this room
|
2022-04-28 11:51:55 +02:00
|
|
|
canReport: extendApi(z.optional(z.boolean()), {
|
|
|
|
description: 'Whether the "report" feature is enabled or not on this room',
|
|
|
|
example: true,
|
|
|
|
}),
|
2022-05-05 19:23:07 +02:00
|
|
|
loadingCowebsiteLogo: extendApi(z.optional(z.nullable(z.string())), {
|
|
|
|
description: "The URL of the image to be used on the cowebsite loading page",
|
|
|
|
example: "https://example.com/logo.gif",
|
|
|
|
}),
|
|
|
|
miniLogo: z.optional(z.nullable(z.string())),
|
2022-04-12 14:21:19 +02:00
|
|
|
// The URL of the logo image on the loading screen
|
2022-04-28 11:51:55 +02:00
|
|
|
loadingLogo: extendApi(z.optional(z.nullable(z.string())), {
|
|
|
|
description: "The URL of the image to be used on the loading page",
|
|
|
|
example: "https://example.com/logo.png",
|
|
|
|
}),
|
2022-04-12 14:21:19 +02:00
|
|
|
// The URL of the logo image on "LoginScene"
|
2022-04-28 11:51:55 +02:00
|
|
|
loginSceneLogo: extendApi(z.optional(z.nullable(z.string())), {
|
|
|
|
description: "The URL of the image to be used on the LoginScene",
|
|
|
|
example: "https://example.com/logo_login.png",
|
|
|
|
}),
|
2022-05-05 11:55:41 +02:00
|
|
|
showPoweredBy: extendApi(z.boolean(), {
|
|
|
|
description: "The URL of the image to be used on the name scene",
|
|
|
|
example: "https://example.com/logo_login.png",
|
|
|
|
}),
|
2022-04-12 14:21:19 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export type MapDetailsData = z.infer<typeof isMapDetailsData>;
|