2021-07-16 09:52:51 +02:00
|
|
|
import * as tg from "generic-type-guard";
|
2021-12-14 18:55:41 +01:00
|
|
|
import { isNumber } from "generic-type-guard";
|
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
|
|
|
|
|
|
|
export const isMapDetailsData = new tg.IsInterface()
|
|
|
|
.withProperties({
|
|
|
|
mapUrl: tg.isString,
|
|
|
|
policy_type: isNumber, //isNumericEnum(GameRoomPolicyTypes),
|
|
|
|
tags: tg.isArray(tg.isString),
|
2021-12-21 11:24:05 +01:00
|
|
|
authenticationMandatory: tg.isUnion(tg.isNullable(tg.isBoolean), tg.isUndefined),
|
|
|
|
roomSlug: tg.isNullable(tg.isString), // deprecated
|
|
|
|
contactPage: tg.isNullable(tg.isString),
|
2021-12-14 19:03:02 +01:00
|
|
|
group: tg.isNullable(tg.isString),
|
|
|
|
})
|
|
|
|
.withOptionalProperties({
|
|
|
|
iframeAuthentication: tg.isNullable(tg.isString),
|
2022-01-05 14:32:02 +01:00
|
|
|
// The date (in ISO 8601 format) at which the room will expire
|
|
|
|
expireOn: tg.isString,
|
|
|
|
// Whether the "report" feature is enabled or not on this room
|
|
|
|
canReport: tg.isBoolean,
|
2022-03-15 15:50:25 +01:00
|
|
|
// The URL of the logo image on the loading screen
|
|
|
|
loadingLogo: tg.isNullable(tg.isString),
|
|
|
|
// The URL of the logo image on "LoginScene"
|
|
|
|
loginSceneLogo: tg.isNullable(tg.isString),
|
2021-07-16 09:52:51 +02:00
|
|
|
})
|
|
|
|
.get();
|
2021-09-21 20:24:53 +02:00
|
|
|
|
2021-07-16 09:52:51 +02:00
|
|
|
export type MapDetailsData = tg.GuardedType<typeof isMapDetailsData>;
|