Implement new cowbesite system on API
This commit is contained in:
parent
c29c4bfaa4
commit
b81b1ff68b
18 changed files with 1089 additions and 84 deletions
22
front/src/Api/Events/OpenCoWebsiteEvent.ts
Normal file
22
front/src/Api/Events/OpenCoWebsiteEvent.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import * as tg from "generic-type-guard";
|
||||
|
||||
export const isOpenCoWebsiteEvent = new tg.IsInterface()
|
||||
.withProperties({
|
||||
url: tg.isString,
|
||||
allowApi: tg.isOptional(tg.isBoolean),
|
||||
allowPolicy: tg.isOptional(tg.isString),
|
||||
position: tg.isOptional(tg.isNumber)
|
||||
})
|
||||
.get();
|
||||
|
||||
export const coWebsite = new tg.IsInterface()
|
||||
.withProperties({
|
||||
id: tg.isString,
|
||||
position: tg.isNumber,
|
||||
})
|
||||
.get();
|
||||
|
||||
/**
|
||||
* A message sent from the iFrame to the game to add a message in the chat.
|
||||
*/
|
||||
export type OpenCoWebsiteEvent = tg.GuardedType<typeof isOpenCoWebsiteEvent>;
|
Loading…
Add table
Add a link
Reference in a new issue