2021-07-16 09:52:51 +02:00
|
|
|
import * as tg from "generic-type-guard";
|
|
|
|
import { isCharacterTexture } from "./CharacterTexture";
|
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),
|
|
|
|
textures: tg.isArray(isCharacterTexture),
|
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),
|
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>;
|