partey_workadventure/messages/JsonMessages/MapDetailsData.ts

27 lines
990 B
TypeScript
Raw Normal View History

import * as tg from "generic-type-guard";
import { isCharacterTexture } from "./CharacterTexture";
import { isNumber } from "generic-type-guard";
/*
* WARNING! The original file is in /messages/JsonMessages.
* All other files are automatically copied from this file on container startup / build
*/
export const isMapDetailsData = new tg.IsInterface()
.withProperties({
roomSlug: tg.isOptional(tg.isString), // deprecated
mapUrl: tg.isString,
policy_type: isNumber, //isNumericEnum(GameRoomPolicyTypes),
tags: tg.isArray(tg.isString),
textures: tg.isArray(isCharacterTexture),
contactPage: tg.isUnion(tg.isString, tg.isUndefined),
authenticationMandatory: tg.isUnion(tg.isBoolean, tg.isUndefined),
2021-12-14 19:03:02 +01:00
group: tg.isNullable(tg.isString),
})
.withOptionalProperties({
iframeAuthentication: tg.isNullable(tg.isString),
})
.get();
export type MapDetailsData = tg.GuardedType<typeof isMapDetailsData>;