[events] add bulkInvite

This commit is contained in:
Devin Zuczek
2026-08-12 17:17:10 -04:00
parent 385e10bd55
commit 3aad586153
5 changed files with 333 additions and 9 deletions
+21
View File
@@ -469,6 +469,19 @@ export const PlayerEventDto = z.object({
CanRequestBroadcastPermissions: z.int(),
})
/**
* `GET /api/playerevents/v1/:eventId?includeDetails=True` — the record plus the one
* field the flag adds: the LOWERCASE `tags`, in an otherwise PascalCase record. Always
* empty, since no event tags are stored; the key is absent altogether when the flag
* isn't passed. The entry shape is the one the notification projection declares.
*/
export const PlayerEventDetailsDto = PlayerEventDto.extend({
tags: z
.array(z.object({ tag: z.string(), type: z.int() }))
.optional()
.describe('Present only with `includeDetails=True`, and always empty'),
})
/**
* `GET /api/playerevents/v1` — the browse feed's listing. The same record minus
* `State`, plus a `BroadcastingRoomInstanceId` (always null — nothing broadcasts an
@@ -529,6 +542,14 @@ export const PlayerEventRespondRequest = z.object({
Type: z.int().describe('0 Going, 1 Interested, 2 Cant go'),
})
/** `POST /api/playerevents/v1/bulkInvite` JSON body — who to invite to which event. */
export const PlayerEventBulkInviteRequest = z.object({
PlayerEventId: z.int(),
InvitedPlayerIds: z
.array(z.int())
.describe('Ids to invite; duplicates and the caller are ignored'),
})
/** `GET /api/playerevents/v1/all` — the caller's created events and RSVPs. */
export const PlayerEventsAll = z.object({
Created: z.array(PlayerEventDto).describe('Events the caller created, soonest first'),