@hadoku/platform-wire 0.1.72 → 0.1.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/events.d.ts +8 -0
- package/dist/events.js +5 -0
- package/package.json +2 -2
package/dist/events.d.ts
CHANGED
|
@@ -46,9 +46,15 @@ export declare const EventSignupSchema: z.ZodObject<{
|
|
|
46
46
|
}, z.core.$strip>>>;
|
|
47
47
|
}, z.core.$strip>>>;
|
|
48
48
|
}, z.core.$strip>>>;
|
|
49
|
+
id: z.ZodCatch<z.ZodString>;
|
|
49
50
|
name: z.ZodString;
|
|
50
51
|
inRoom: z.ZodCatch<z.ZodBoolean>;
|
|
52
|
+
you: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
51
53
|
}, z.core.$strip>;
|
|
54
|
+
export declare const RemoveSignupBodySchema: z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
}, z.core.$strict>;
|
|
57
|
+
export type RemoveSignupBody = z.infer<typeof RemoveSignupBodySchema>;
|
|
52
58
|
export type EventSignup = z.infer<typeof EventSignupSchema>;
|
|
53
59
|
/** One event as `GET /api/events` sends it, scoped to the caller (`mine`): the game's `kind` and `room`. */
|
|
54
60
|
export declare const eventViewSchema: <K extends z.ZodType, R extends z.ZodType>(kind: K, room: R) => z.ZodObject<{
|
|
@@ -81,8 +87,10 @@ export declare const eventViewSchema: <K extends z.ZodType, R extends z.ZodType>
|
|
|
81
87
|
}, z.core.$strip>>>;
|
|
82
88
|
}, z.core.$strip>>>;
|
|
83
89
|
}, z.core.$strip>>>;
|
|
90
|
+
id: z.ZodCatch<z.ZodString>;
|
|
84
91
|
name: z.ZodString;
|
|
85
92
|
inRoom: z.ZodCatch<z.ZodBoolean>;
|
|
93
|
+
you: z.ZodCatch<z.ZodOptional<z.ZodBoolean>>;
|
|
86
94
|
}, z.core.$strip>>>;
|
|
87
95
|
}, z.core.$strip>;
|
|
88
96
|
export declare const eventListSchema: <V extends z.ZodType>(view: V) => z.ZodObject<{
|
package/dist/events.js
CHANGED
|
@@ -42,9 +42,14 @@ export const updateEventBodySchema = (titleMax) => strictBody({ title: eventTitl
|
|
|
42
42
|
* event's room.
|
|
43
43
|
*/
|
|
44
44
|
export const EventSignupSchema = PersonFaceSchema.extend({
|
|
45
|
+
/** Who this is to the event's organizer, to remove them by (`POST /api/events/:id/signups/remove`). */
|
|
46
|
+
id: z.string().catch(''),
|
|
45
47
|
name: z.string(),
|
|
46
48
|
inRoom: z.boolean().catch(false),
|
|
49
|
+
/** Whether this is the caller: the organizer removes anyone but themselves. */
|
|
50
|
+
you: z.boolean().optional().catch(undefined),
|
|
47
51
|
});
|
|
52
|
+
export const RemoveSignupBodySchema = z.object({ id: z.string().min(1).max(64) }).strict();
|
|
48
53
|
/** One event as `GET /api/events` sends it, scoped to the caller (`mine`): the game's `kind` and `room`. */
|
|
49
54
|
export const eventViewSchema = (kind, room) => z.object({
|
|
50
55
|
id: z.string(),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hadoku/platform-wire",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"gitHead": "
|
|
3
|
+
"version": "0.1.73",
|
|
4
|
+
"gitHead": "2ada02180afff2e2d5f9e4c28ee9b97be29d3c66",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "The wire any game speaks: room ids, telemetry, presence, events and tables, the Discord relay, looks, the restart notice, secure random and a generic server envelope. Knows no game; a game's own part rides as a type parameter. MIT; imports only zod.",
|