diff --git a/frontend/src/network/index.ts b/frontend/src/network/index.ts index 34ecad5..87fcad9 100644 --- a/frontend/src/network/index.ts +++ b/frontend/src/network/index.ts @@ -47,6 +47,14 @@ export const sendImage = async ( return parse(sendImageResponseValidator, res); }; +const locationValidator = object({ + ID: pipe(string(), uuid()), + Name: string(), + Address: nullable(string()), + Coordinates: nullable(string()), + Description: nullable(string()), +}); + const getUserImagesResponseValidator = array( object({ ID: pipe(string(), uuid()), @@ -88,6 +96,17 @@ const getUserImagesResponseValidator = array( }), ), ), + Locations: nullable(array(locationValidator)), + Events: nullable( + array( + object({ + ID: pipe(string(), uuid()), + Name: string(), + Description: nullable(string()), + Location: nullable(locationValidator), + }), + ), + ), }), );