partey_workadventure/messages/JsonMessages/MapDetailsData.ts
grégoire parant 36e74691cf
Change map details params (#2192)
* HotFix showPoweredBy optional paramter

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>

* Add nullable option of showPoweredBy

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
2022-05-11 18:03:47 +02:00

64 lines
2.7 KiB
TypeScript

import { z } from "zod";
import { extendApi } from "@anatine/zod-openapi";
/*
* WARNING! The original file is in /messages/JsonMessages.
* All other files are automatically copied from this file on container startup / build
*/
export const isMapDetailsData = z.object({
// @ts-ignore
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",
}),
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",
}),
// The date (in ISO 8601 format) at which the room will expire
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",
}),
// Whether the "report" feature is enabled or not on this room
canReport: extendApi(z.optional(z.boolean()), {
description: 'Whether the "report" feature is enabled or not on this room',
example: true,
}),
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())),
// The URL of the logo image on the loading screen
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",
}),
// The URL of the logo image on "LoginScene"
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",
}),
showPoweredBy: extendApi(z.optional(z.nullable(z.boolean())), {
description: "The URL of the image to be used on the name scene",
example: "https://example.com/logo_login.png",
}),
});
export type MapDetailsData = z.infer<typeof isMapDetailsData>;