Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Emit schema descriptions, examples and named components in the v1 OpenAPI spec (#3217)
Luke Vella0ecd230fca35
diff --git a/apps/web/package.json b/apps/web/package.jsonindex d8dc74428..97bd03c40 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -26,7 +26,6 @@"@casl/react": "^5.0.0","@hono-rate-limiter/redis": "^0.1.4","@hono/standard-validator": "^0.2.1",- "@hono/zod-openapi": "^1.2.0","@hono/zod-validator": "^0.7.2","@hookform/resolvers": "^5.2.2","@marsidev/react-turnstile": "^1.5.3",diff --git a/apps/web/src/app/api/middleware/openapi.ts b/apps/web/src/app/api/middleware/openapi.tsnew file mode 100644index 000000000..94d3b084f--- /dev/null+++ b/apps/web/src/app/api/middleware/openapi.ts@@ -0,0 +1,65 @@+import type { loadVendor } from "hono-openapi";+import * as z from "zod";++type ToOpenApiSchema = NonNullable<+ Parameters<typeof loadVendor>[1]["toOpenAPISchema"]+>;+// hono-openapi's own converter returns `{ $ref }` nodes too; only its type+// omits them.+type OpenApiSchema = Awaited<ReturnType<ToOpenApiSchema>>;++const DEFS_PREFIX = "#/$defs/";+const COMPONENTS_PREFIX = "#/components/schemas/";++function rewriteRefs(node: unknown): unknown {+ if (Array.isArray(node)) {+ return node.map(rewriteRefs);+ }+ if (!node || typeof node !== "object") {+ return node;+ }+ return Object.fromEntries(+ Object.entries(node).map(([key, value]) => [+ key,+ key === "$ref" && typeof value === "string"+ ? value.replace(DEFS_PREFIX, COMPONENTS_PREFIX)+ : rewriteRefs(value),+ ]),+ );+}++/**+ * Converts a zod schema for hono-openapi. Zod's own `toJSONSchema` is the+ * only converter that reads `.meta()` / `.describe()` metadata, but it keeps+ * named schemas in a root `$defs` block and marks the root with `id`, and+ * hono-openapi's default converter only hoists the `$defs` when the root is+ * itself a `$ref`. This hoists every named schema into `components.schemas`+ * so each `$ref` resolves and the spec carries no stray `$defs`, `id` or+ * `$schema` keys.+ */+export const toOpenApiSchema: ToOpenApiSchema = (schema, context) => {+ const {+ $schema: _,+ $defs,+ id,+ ...root+ } = z.toJSONSchema(schema as z.ZodType, {+ io: "input",+ ...context.options,+ });++ const schemas = context.components.schemas ?? {};+ context.components.schemas = schemas;+ for (const [name, { id: _id, ...definition }] of Object.entries(+ $defs ?? {},+ )) {+ schemas[name] = rewriteRefs(definition) as OpenApiSchema;+ }++ const body = rewriteRefs(root) as OpenApiSchema;+ if (typeof id === "string") {+ schemas[id] = body;+ return { $ref: `${COMPONENTS_PREFIX}${id}` } as OpenApiSchema;+ }+ return body;+};diff --git a/apps/web/src/app/api/private/[...route]/route.test.ts b/apps/web/src/app/api/private/[...route]/route.test.tsindex d30cba900..a336210b9 100644--- a/apps/web/src/app/api/private/[...route]/route.test.ts+++ b/apps/web/src/app/api/private/[...route]/route.test.ts@@ -935,6 +935,30 @@ describe("Private API - /polls", () => {expect(json.info.title).toBe("Rallly Private API");});+ it("should resolve every schema reference", async () => {+ const res = await app.request("/api/private/openapi");++ expect(res.status).toBe(200);+ const json = await res.json();+ const schemas = json.components.schemas;++ expect(schemas.OptionResult.properties.score.description).toBeDefined();++ const refs = new Set<string>();+ const leaked: string[] = [];+ JSON.stringify(json, (key, value) => {+ if (key === "$ref") refs.add(value);+ if (key === "$defs" || key === "$schema") leaked.push(key);+ if (key === "id" && typeof value === "string") leaked.push(key);+ return value;+ });+ expect(leaked).toEqual([]);+ for (const ref of refs) {+ expect(ref).toMatch(/^#\/components\/schemas\//);+ expect(schemas[ref.split("/").pop() as string]).toBeDefined();+ }+ });+it("should include create poll request examples that match the input schema", async () => {const res = await app.request("/api/private/openapi");diff --git a/apps/web/src/app/api/private/[...route]/route.ts b/apps/web/src/app/api/private/[...route]/route.tsindex cdfe62e42..291fe795d 100644--- a/apps/web/src/app/api/private/[...route]/route.ts+++ b/apps/web/src/app/api/private/[...route]/route.ts@@ -7,6 +7,7 @@ import { handle } from "hono/vercel";import {describeRoute,generateSpecs,+ loadVendor,resolver,validator,} from "hono-openapi";@@ -29,6 +30,7 @@ import { isMaintenanceModeEnabled } from "@/lib/maintenance";import { flushPostHog, identifyGroup, track } from "@/lib/posthog";import { apiError } from "../../middleware/api-error";import { spaceApiKeyAuth } from "../../middleware/api-key";+import { toOpenApiSchema } from "../../middleware/openapi";import {RATE_LIMIT_PER_DAY,RATE_LIMIT_PER_MINUTE,@@ -66,6 +68,8 @@ type Env = {const app = new Hono<Env>().basePath("/api/private");+loadVendor("zod", { toOpenAPISchema: toOpenApiSchema });+function toPollResponseBody(poll: {id: string;title: string;diff --git a/apps/web/src/app/api/private/schemas.ts b/apps/web/src/app/api/private/schemas.tsindex f622d2693..f5bdca861 100644--- a/apps/web/src/app/api/private/schemas.ts+++ b/apps/web/src/app/api/private/schemas.ts@@ -1,13 +1,13 @@-import { z } from "@hono/zod-openapi";+import * as z from "zod";import { MAX_SLOT_GENERATION_DAYS } from "@/lib/datetime/slot-generator";import { timezoneSchema } from "@/lib/utils/timezone-schema";-export const dateSchema = z.iso.date().openapi({+export const dateSchema = z.iso.date().meta({description: "Date in YYYY-MM-DD format",example: "2025-12-23",});-export const timeSchema = z.iso.time().openapi({+export const timeSchema = z.iso.time().meta({description: "Time in HH:mm (24-hour) format",example: "09:30",});@@ -19,7 +19,7 @@ export const slotGeneratorSchema = zdays: z.array(z.enum(["mon", "tue", "wed", "thu", "fri", "sat", "sun"])),startTime: timeSchema,endTime: timeSchema,- interval: z.number().int().min(15).max(1440).optional().openapi({+ interval: z.number().int().min(15).max(1440).optional().meta({description: "Interval in minutes between slots. Defaults to duration.",example: 30,}),@@ -38,15 +38,15 @@ export const slotGeneratorSchema = zpath: ["endDate"],},)- .openapi("SlotGenerator");+ .meta({ id: "SlotGenerator" });const slotsInputSchema = z.object({- duration: z.number().int().min(15).max(1440).openapi({+ duration: z.number().int().min(15).max(1440).meta({description: "Duration in minutes for each time slot",example: 30,}),- timezone: timezoneSchema.optional().openapi({+ timezone: timezoneSchema.optional().meta({description:"IANA timezone. Datetime strings without an offset are interpreted in this timezone. If omitted, offset-less datetimes are treated as floating times (no timezone conversion) and the poll has no timezone set.",example: "Europe/London",@@ -54,7 +54,7 @@ const slotsInputSchema = ztimes: z.array(z.union([- z.iso.datetime({ local: true, offset: true }).openapi({+ z.iso.datetime({ local: true, offset: true }).meta({description:"ISO datetime start time. Strings without an offset are interpreted as wall-clock in `timezone` (e.g. `2025-01-15T09:00:00` with `timezone: Europe/London` means 09:00 in London). Strings with an offset or `Z` are treated as absolute instants.",example: "2025-01-15T09:00:00",@@ -63,67 +63,62 @@ const slotsInputSchema = z]),).min(1)- .openapi({+ .meta({description:"Times to include. An array of ISO datetime strings and/or slot generators.",}),})- .openapi("SlotsInput");+ .meta({ id: "SlotsInput" });const datesInputSchema = z.array(z.iso.date()).min(1)- .openapi({+ .meta({description: "Array of ISO dates for all-day options",example: ["2025-01-15", "2025-01-16", "2025-01-17"],});export const createPollInputSchema = z.object({- title: z.string().trim().min(1).openapi({ example: "Team sync" }),+ title: z.string().trim().min(1).meta({ example: "Team sync" }),description: z.string().trim().max(1000).optional()- .openapi({ example: "Pick a time that works for everyone" }),- location: z- .string()- .trim()- .max(255)- .optional()- .openapi({ example: "Zoom" }),- requireEmail: z.boolean().optional().openapi({+ .meta({ example: "Pick a time that works for everyone" }),+ location: z.string().trim().max(255).optional().meta({ example: "Zoom" }),+ requireEmail: z.boolean().optional().meta({description: "Require participants to provide their email address",example: true,}),- hideParticipants: z.boolean().optional().openapi({+ hideParticipants: z.boolean().optional().meta({description: "Hide participant names from other participants",example: false,}),- hideScores: z.boolean().optional().openapi({+ hideScores: z.boolean().optional().meta({description: "Hide vote counts from participants",example: false,}),- disableComments: z.boolean().optional().openapi({+ disableComments: z.boolean().optional().meta({description:"Disable the comments section. Defaults to true: new polls have comments disabled unless this is set to false.",example: false,}),- spaceId: z.string().optional().openapi({+ spaceId: z.string().optional().meta({description:"ID of the space to create the poll in. Defaults to user's most recently used space.",example: "space_abc123",}),organizer: z.object({- email: z.email().openapi({+ email: z.email().meta({description: "Email address of the organizer",example: "[email protected]",}),}).optional()- .openapi({+ .meta({description:"Organizer of the poll. Defaults to the space owner if not provided. The organizer must be a member of the space.",}),@@ -136,116 +131,112 @@ export const createPollInputSchema = z.refine((data) => !(data.dates && data.slots), {message: "Cannot provide both 'dates' and 'slots'",})- .openapi("CreatePollInput");+ .meta({ id: "CreatePollInput" });export const errorResponseSchema = z.object({error: z.object({- code: z.string().openapi({ example: "TIMEZONE_REQUIRED" }),- message: z.string().openapi({+ code: z.string().meta({ example: "TIMEZONE_REQUIRED" }),+ message: z.string().meta({example:"Timezone is required. Either provide a timezone in the request or set one in your profile.",}),}),})- .openapi("ErrorResponse");+ .meta({ id: "ErrorResponse" });export const deletePollSuccessResponseSchema = z.object({data: z.object({- id: z.string().openapi({ example: "p_123abc" }),- deleted: z.literal(true).openapi({ example: true }),+ id: z.string().meta({ example: "p_123abc" }),+ deleted: z.literal(true).meta({ example: true }),}),})- .openapi("DeletePollResponse");+ .meta({ id: "DeletePollResponse" });export const pollStatusSchema = z.enum(["open", "closed", "scheduled", "canceled"])- .openapi("PollStatus");+ .meta({ id: "PollStatus" });export const pollOptionSchema = z.object({- id: z.string().openapi({ example: "opt_abc123" }),- startTime: z.iso.datetime().openapi({ example: "2025-01-15T09:00:00Z" }),- duration: z.number().int().openapi({+ id: z.string().meta({ example: "opt_abc123" }),+ startTime: z.iso.datetime().meta({ example: "2025-01-15T09:00:00Z" }),+ duration: z.number().int().meta({description: "Duration in minutes. 0 indicates an all-day option.",example: 30,}),})- .openapi("PollOption");+ .meta({ id: "PollOption" });export const pollUserSchema = z.object({- name: z.string().openapi({ example: "John Doe" }),+ name: z.string().meta({ example: "John Doe" }),image: z.string().nullable()- .openapi({ example: "https://example.com/avatar.jpg" }),+ .meta({ example: "https://example.com/avatar.jpg" }),})- .openapi("PollUser");+ .meta({ id: "PollUser" });const pollSchema = z.object({- id: z.string().openapi({ example: "p_123abc" }),- title: z.string().openapi({ example: "Team sync" }),- description: z.string().nullable().openapi({+ id: z.string().meta({ example: "p_123abc" }),+ title: z.string().meta({ example: "Team sync" }),+ description: z.string().nullable().meta({example: "Pick a time that works for everyone",}),- location: z.string().nullable().openapi({ example: "Zoom" }),- timezone: z.string().nullable().openapi({ example: "Europe/London" }),+ location: z.string().nullable().meta({ example: "Zoom" }),+ timezone: z.string().nullable().meta({ example: "Europe/London" }),status: pollStatusSchema,- createdAt: z- .string()- .datetime()- .openapi({ example: "2025-01-10T12:00:00Z" }),- user: pollUserSchema.nullable().openapi({+ createdAt: z.string().datetime().meta({ example: "2025-01-10T12:00:00Z" }),+ user: pollUserSchema.nullable().meta({description: "The poll organizer",}),options: z.array(pollOptionSchema),- adminUrl: z- .string()- .openapi({ example: "https://example.com/poll/p_123abc" }),+ adminUrl: z.string().meta({ example: "https://example.com/poll/p_123abc" }),inviteUrl: z.string()- .openapi({ example: "https://example.com/invite/p_123abc" }),+ .meta({ example: "https://example.com/invite/p_123abc" }),})- .openapi("Poll");+ .meta({ id: "Poll" });export const getPollSuccessResponseSchema = z.object({data: pollSchema,})- .openapi("GetPollResponse");+ .meta({ id: "GetPollResponse" });export const patchPollInputSchema = z.object({- status: pollStatusSchema.openapi({+ status: pollStatusSchema.meta({description:"The status to transition the poll to. Only `closed` is currently accepted; the other statuses are reserved for future transitions.",example: "closed",}),})- .openapi("PatchPollInput");+ .meta({ id: "PatchPollInput" });// Updating a poll returns the same shape as get poll-export const patchPollSuccessResponseSchema =- getPollSuccessResponseSchema.openapi("PatchPollResponse");+export const patchPollSuccessResponseSchema = getPollSuccessResponseSchema.meta(+ { id: "PatchPollResponse" },+);// Create poll returns the same shape as get pollexport const createPollSuccessResponseSchema =- getPollSuccessResponseSchema.openapi("CreatePollResponse");+ getPollSuccessResponseSchema.meta({ id: "CreatePollResponse" });export const listPollsQuerySchema = z.object({- status: pollStatusSchema.optional().openapi({+ status: pollStatusSchema.optional().meta({description: "Filter polls by status. Omit to include all statuses.",example: "open",}),- cursor: z.string().optional().openapi({+ cursor: z.string().optional().meta({description:"Cursor for pagination. Pass the `nextCursor` value from the previous response to fetch the next page.",example: "p_123abc",}),- limit: z.coerce.number().int().min(1).max(100).default(20).openapi({+ limit: z.coerce.number().int().min(1).max(100).default(20).meta({description: "Number of polls to return per page (1-100).",example: 20,}),@@ -253,96 +244,96 @@ export const listPollsQuerySchema = z.object({export const listPollItemSchema = pollSchema.extend({- participantCount: z.int().nonnegative().openapi({+ participantCount: z.int().nonnegative().meta({description: "Number of participants who have responded to the poll",example: 3,}),})- .openapi("ListPollItem");+ .meta({ id: "ListPollItem" });export const listPollsSuccessResponseSchema = z.object({data: z.array(listPollItemSchema),- nextCursor: z.string().nullable().openapi({+ nextCursor: z.string().nullable().meta({description:"Cursor to fetch the next page. `null` when there are no more results.",example: "p_123abc",}),})- .openapi("ListPollsResponse");+ .meta({ id: "ListPollsResponse" });export const voteCountSchema = z.object({- type: z.string().openapi({+ type: z.string().meta({description: "The vote type (e.g., yes, ifNeedBe, no)",example: "yes",}),- count: z.int().nonnegative().openapi({+ count: z.int().nonnegative().meta({description: "Number of votes of this type",example: 5,}),})- .openapi("VoteCount");+ .meta({ id: "VoteCount" });export const optionResultSchema = z.object({- id: z.string().openapi({ example: "opt_abc123" }),- startTime: z.iso.datetime().openapi({ example: "2025-01-15T09:00:00Z" }),- duration: z.int().nonnegative().openapi({+ id: z.string().meta({ example: "opt_abc123" }),+ startTime: z.iso.datetime().meta({ example: "2025-01-15T09:00:00Z" }),+ duration: z.int().nonnegative().meta({description: "Duration in minutes. 0 indicates an all-day option.",example: 30,}),- votes: z.array(voteCountSchema).openapi({+ votes: z.array(voteCountSchema).meta({description: "Array of vote counts by type",}),- score: z.int().nonnegative().openapi({+ score: z.int().nonnegative().meta({description:"Ranking score: (yes + ifNeedBe) * 1000 + yes. Total availability is primary, yes votes break ties.",example: 5004,}),- isTopChoice: z.boolean().openapi({+ isTopChoice: z.boolean().meta({description: "Whether this option has the highest score",example: true,}),})- .openapi("OptionResult");+ .meta({ id: "OptionResult" });export const getPollResultsSuccessResponseSchema = z.object({data: z.object({- pollId: z.string().openapi({ example: "p_123abc" }),- status: pollStatusSchema.openapi({+ pollId: z.string().meta({ example: "p_123abc" }),+ status: pollStatusSchema.meta({description:"Current poll status. Polls close automatically when all options are in the past.",example: "open",}),- participantCount: z.int().nonnegative().openapi({+ participantCount: z.int().nonnegative().meta({description: "Total number of participants",example: 8,}),options: z.array(optionResultSchema),- highScore: z.int().nonnegative().openapi({+ highScore: z.int().nonnegative().meta({description: "Highest score across all options",example: 7,}),}),})- .openapi("GetPollResultsResponse");+ .meta({ id: "GetPollResultsResponse" });export const participantSchema = z.object({- id: z.string().openapi({ example: "participant_abc123" }),- name: z.string().openapi({ example: "Jane Smith" }),- email: z.string().nullable().openapi({ example: "[email protected]" }),- createdAt: z.iso.datetime().openapi({ example: "2025-01-10T12:00:00Z" }),+ id: z.string().meta({ example: "participant_abc123" }),+ name: z.string().meta({ example: "Jane Smith" }),+ email: z.string().nullable().meta({ example: "[email protected]" }),+ createdAt: z.iso.datetime().meta({ example: "2025-01-10T12:00:00Z" }),})- .openapi("Participant");+ .meta({ id: "Participant" });export const getPollParticipantsSuccessResponseSchema = z.object({data: z.object({- pollId: z.string().openapi({ example: "p_123abc" }),+ pollId: z.string().meta({ example: "p_123abc" }),participants: z.array(participantSchema),}),})- .openapi("GetPollParticipantsResponse");+ .meta({ id: "GetPollParticipantsResponse" });diff --git a/apps/web/src/app/api/v1/[...route]/route.test.ts b/apps/web/src/app/api/v1/[...route]/route.test.tsindex 90fef8d07..b75fc7f6c 100644--- a/apps/web/src/app/api/v1/[...route]/route.test.ts+++ b/apps/web/src/app/api/v1/[...route]/route.test.ts@@ -87,14 +87,12 @@ import {} from "../examples";import {createPollInputSchema,- createPollSuccessResponseSchema,deletePollSuccessResponseSchema,errorResponseSchema,getPollParticipantsSuccessResponseSchema,getPollResultsSuccessResponseSchema,- getPollSuccessResponseSchema,listPollsSuccessResponseSchema,- patchPollSuccessResponseSchema,+ pollResponseSchema,} from "../schemas";import { app } from "./route";@@ -484,7 +482,7 @@ describe("API v1 - /polls", () => {expect(res.status).toBe(200);const json = await res.json();- expectMatchesContract(createPollSuccessResponseSchema, json);+ expectMatchesContract(pollResponseSchema, json);expect(json.data.id).toBe("test-poll-id");expect(json.data.adminUrl).toBe("https://example.com/poll/test-poll-id");expect(json.data.inviteUrl).toBe(@@ -632,7 +630,7 @@ describe("API v1 - /polls", () => {expect(res.status).toBe(200);const json = await res.json();- expectMatchesContract(createPollSuccessResponseSchema, json);+ expectMatchesContract(pollResponseSchema, json);expect(json.data.id).toBe("test-poll-id");expect(mockCreatePoll).toHaveBeenCalledWith(@@ -1009,6 +1007,72 @@ describe("API v1 - /polls", () => {);});+ it("should emit schema descriptions, examples and named components", async () => {+ const res = await app.request("/api/v1/openapi");++ expect(res.status).toBe(200);+ const json = await res.json();+ const schemas = json.components.schemas;++ expect(Object.keys(schemas)).toEqual(+ expect.arrayContaining([+ "CreatePollInput",+ "SlotsInput",+ "SlotGenerator",+ "Poll",+ "PollStatus",+ "PollResponse",+ "OptionResult",+ "ErrorResponse",+ ]),+ );+ expect(schemas.OptionResult.properties.score.description).toContain(+ "Ranking score",+ );+ expect(schemas.Poll.properties.title.example).toBe("Team sync");+ expect(+ json.paths["/api/v1/polls"].post.requestBody.content["application/json"]+ .schema,+ ).toEqual({ $ref: "#/components/schemas/CreatePollInput" });+ expect(schemas.SlotsInput.properties.times.items.anyOf).toContainEqual({+ $ref: "#/components/schemas/SlotGenerator",+ });++ // Contextual .meta() clones keep pointing at the shared component.+ const pollStatusRef = "#/components/schemas/PollStatus";+ expect(+ schemas.GetPollResultsResponse.properties.data.properties.status,+ ).toMatchObject({+ $ref: pollStatusRef,+ description: expect.stringContaining("close automatically"),+ });+ expect(schemas.PatchPollInput.properties.status).toMatchObject({+ $ref: pollStatusRef,+ example: "closed",+ });+ expect(json.paths["/api/v1/polls"].get.parameters).toContainEqual(+ expect.objectContaining({+ name: "status",+ schema: expect.objectContaining({ $ref: pollStatusRef }),+ }),+ );++ // Every $ref must resolve, and zod's intermediate keys must not leak.+ const refs = new Set<string>();+ const leaked: string[] = [];+ JSON.stringify(json, (key, value) => {+ if (key === "$ref") refs.add(value);+ if (key === "$defs" || key === "$schema") leaked.push(key);+ if (key === "id" && typeof value === "string") leaked.push(key);+ return value;+ });+ expect(leaked).toEqual([]);+ for (const ref of refs) {+ expect(ref).toMatch(/^#\/components\/schemas\//);+ expect(schemas[ref.split("/").pop() as string]).toBeDefined();+ }+ });+it("should not serve a docs page (the reference lives in the docs site)", async () => {const res = await app.request("/api/v1/docs");@@ -1043,7 +1107,7 @@ describe("API v1 - /polls", () => {expect(res.status).toBe(200);const json = await res.json();- expectMatchesContract(patchPollSuccessResponseSchema, json);+ expectMatchesContract(pollResponseSchema, json);expect(json.data.id).toBe("test-poll-id");expect(json.data.status).toBe("closed");@@ -1252,7 +1316,7 @@ describe("API v1 - /polls", () => {expect(res.status).toBe(200);const json = await res.json();- expectMatchesContract(getPollSuccessResponseSchema, json);+ expectMatchesContract(pollResponseSchema, json);expect(json.data.id).toBe("test-poll-id");expect(json.data.title).toBe("Team sync");expect(json.data.description).toBe("Weekly team meeting");diff --git a/apps/web/src/app/api/v1/[...route]/route.ts b/apps/web/src/app/api/v1/[...route]/route.tsindex 620e426a3..57fa24ab3 100644--- a/apps/web/src/app/api/v1/[...route]/route.ts+++ b/apps/web/src/app/api/v1/[...route]/route.ts@@ -5,6 +5,7 @@ import { handle } from "hono/vercel";import {describeRoute,generateSpecs,+ loadVendor,resolver,validator,} from "hono-openapi";@@ -30,6 +31,7 @@ import { isMaintenanceModeEnabled } from "@/lib/maintenance";import { flushPostHog, identifyGroup, track } from "@/lib/posthog";import { apiError, validationHook } from "../../middleware/api-error";import { spaceApiKeyAuth } from "../../middleware/api-key";+import { toOpenApiSchema } from "../../middleware/openapi";import {RATE_LIMIT_PER_DAY,RATE_LIMIT_PER_MINUTE,@@ -42,16 +44,14 @@ import {} from "../examples";import {createPollInputSchema,- createPollSuccessResponseSchema,deletePollSuccessResponseSchema,errorResponseSchema,getPollParticipantsSuccessResponseSchema,getPollResultsSuccessResponseSchema,- getPollSuccessResponseSchema,listPollsQuerySchema,listPollsSuccessResponseSchema,patchPollInputSchema,- patchPollSuccessResponseSchema,+ pollResponseSchema,} from "../schemas";type Env = {@@ -67,6 +67,11 @@ type Env = {const app = new Hono<Env>().basePath("/api/v1");+// Process-wide: hono-openapi keys converters by schema vendor, and every zod+// schema reports "zod". Schemas without native `.meta()` ids convert exactly as+// before, so the frozen /api/private route is unaffected.+loadVendor("zod", { toOpenAPISchema: toOpenApiSchema });+function toPollResponseBody(poll: {id: string;title: string;@@ -287,7 +292,7 @@ app.post(description: "Successful response",content: {"application/json": {- schema: resolver(createPollSuccessResponseSchema),+ schema: resolver(pollResponseSchema),},},},@@ -423,9 +428,7 @@ app.post(trackPollCreated(poll);- return c.json(- createPollSuccessResponseSchema.parse(toPollResponseBody(poll)),- );+ return c.json(pollResponseSchema.parse(toPollResponseBody(poll)));}// Process slots (time-based options)@@ -498,9 +501,7 @@ app.post(trackPollCreated(poll);- return c.json(- createPollSuccessResponseSchema.parse(toPollResponseBody(poll)),- );+ return c.json(pollResponseSchema.parse(toPollResponseBody(poll)));},);@@ -578,7 +579,7 @@ app.get(description: "Successful response",content: {"application/json": {- schema: resolver(getPollSuccessResponseSchema),+ schema: resolver(pollResponseSchema),},},},@@ -611,7 +612,7 @@ app.get();}- return c.json(getPollSuccessResponseSchema.parse(toPollResponseBody(poll)));+ return c.json(pollResponseSchema.parse(toPollResponseBody(poll)));},);@@ -635,7 +636,7 @@ app.patch(description: "Poll updated successfully",content: {"application/json": {- schema: resolver(patchPollSuccessResponseSchema),+ schema: resolver(pollResponseSchema),},},},@@ -688,9 +689,7 @@ app.patch();}- return c.json(- patchPollSuccessResponseSchema.parse(toPollResponseBody(poll)),- );+ return c.json(pollResponseSchema.parse(toPollResponseBody(poll)));},);diff --git a/apps/web/src/app/api/v1/schemas.ts b/apps/web/src/app/api/v1/schemas.tsindex 2a24bcea2..6195313bf 100644--- a/apps/web/src/app/api/v1/schemas.ts+++ b/apps/web/src/app/api/v1/schemas.ts@@ -1,13 +1,13 @@-import { z } from "@hono/zod-openapi";+import * as z from "zod";import { MAX_SLOT_GENERATION_DAYS } from "@/lib/datetime/slot-generator";import { timezoneSchema } from "@/lib/utils/timezone-schema";-export const dateSchema = z.iso.date().openapi({+export const dateSchema = z.iso.date().meta({description: "Date in YYYY-MM-DD format",example: "2025-12-23",});-export const timeSchema = z.iso.time().openapi({+export const timeSchema = z.iso.time().meta({description: "Time in HH:mm (24-hour) format",example: "09:30",});@@ -19,7 +19,7 @@ export const slotGeneratorSchema = zdays: z.array(z.enum(["mon", "tue", "wed", "thu", "fri", "sat", "sun"])),startTime: timeSchema,endTime: timeSchema,- interval: z.number().int().min(15).max(1440).optional().openapi({+ interval: z.number().int().min(15).max(1440).optional().meta({description: "Interval in minutes between slots. Defaults to duration.",example: 30,}),@@ -38,15 +38,15 @@ export const slotGeneratorSchema = zpath: ["endDate"],},)- .openapi("SlotGenerator");+ .meta({ id: "SlotGenerator" });const slotsInputSchema = z.object({- duration: z.number().int().min(15).max(1440).openapi({+ duration: z.number().int().min(15).max(1440).meta({description: "Duration in minutes for each time slot",example: 30,}),- timezone: timezoneSchema.optional().openapi({+ timezone: timezoneSchema.optional().meta({description:"IANA timezone. Datetime strings without an offset are interpreted in this timezone. If omitted, offset-less datetimes are treated as floating times (no timezone conversion) and the poll has no timezone set.",example: "Europe/London",@@ -54,7 +54,7 @@ const slotsInputSchema = ztimes: z.array(z.union([- z.iso.datetime({ local: true, offset: true }).openapi({+ z.iso.datetime({ local: true, offset: true }).meta({description:"ISO datetime start time. Strings without an offset are interpreted as wall-clock in `timezone` (e.g. `2025-01-15T09:00:00` with `timezone: Europe/London` means 09:00 in London). Strings with an offset or `Z` are treated as absolute instants.",example: "2025-01-15T09:00:00",@@ -63,67 +63,62 @@ const slotsInputSchema = z]),).min(1)- .openapi({+ .meta({description:"Times to include. An array of ISO datetime strings and/or slot generators.",}),})- .openapi("SlotsInput");+ .meta({ id: "SlotsInput" });const datesInputSchema = z.array(z.iso.date()).min(1)- .openapi({+ .meta({description: "Array of ISO dates for all-day options",example: ["2025-01-15", "2025-01-16", "2025-01-17"],});export const createPollInputSchema = z.object({- title: z.string().trim().min(1).openapi({ example: "Team sync" }),+ title: z.string().trim().min(1).meta({ example: "Team sync" }),description: z.string().trim().max(1000).optional()- .openapi({ example: "Pick a time that works for everyone" }),- location: z- .string()- .trim()- .max(255)- .optional()- .openapi({ example: "Zoom" }),- requireEmail: z.boolean().optional().openapi({+ .meta({ example: "Pick a time that works for everyone" }),+ location: z.string().trim().max(255).optional().meta({ example: "Zoom" }),+ requireEmail: z.boolean().optional().meta({description: "Require participants to provide their email address",example: true,}),- hideParticipants: z.boolean().optional().openapi({+ hideParticipants: z.boolean().optional().meta({description: "Hide participant names from other participants",example: false,}),- hideScores: z.boolean().optional().openapi({+ hideScores: z.boolean().optional().meta({description: "Hide vote counts from participants",example: false,}),- disableComments: z.boolean().optional().openapi({+ disableComments: z.boolean().optional().meta({description:"Disable the comments section. Defaults to true: new polls have comments disabled unless this is set to false.",example: false,}),- spaceId: z.string().optional().openapi({+ spaceId: z.string().optional().meta({description:"ID of the space to create the poll in. Defaults to user's most recently used space.",example: "space_abc123",}),organizer: z.object({- email: z.email().openapi({+ email: z.email().meta({description: "Email address of the organizer",example: "[email protected]",}),}).optional()- .openapi({+ .meta({description:"Organizer of the poll. Defaults to the space owner if not provided. The organizer must be a member of the space.",}),@@ -136,121 +131,108 @@ export const createPollInputSchema = z.refine((data) => !(data.dates && data.slots), {message: "Cannot provide both 'dates' and 'slots'",})- .openapi("CreatePollInput");+ .meta({ id: "CreatePollInput" });export const errorResponseSchema = z.object({error: z.object({- code: z.string().openapi({+ code: z.string().meta({description:"Machine-readable error code. The full list is in the API description.",example: "VALIDATION_ERROR",}),- message: z.string().openapi({+ message: z.string().meta({description:"Human-readable explanation. For `VALIDATION_ERROR` it names each offending field, e.g. `title: Invalid input: expected string, received undefined; dates.0: Invalid ISO date`.",example: "title: Invalid input: expected string, received undefined",}),}),})- .openapi("ErrorResponse");+ .meta({ id: "ErrorResponse" });export const deletePollSuccessResponseSchema = z.object({data: z.object({- id: z.string().openapi({ example: "p_123abc" }),- deleted: z.literal(true).openapi({ example: true }),+ id: z.string().meta({ example: "p_123abc" }),+ deleted: z.literal(true).meta({ example: true }),}),})- .openapi("DeletePollResponse");+ .meta({ id: "DeletePollResponse" });export const pollStatusSchema = z.enum(["open", "closed", "scheduled", "canceled"])- .openapi("PollStatus");+ .meta({ id: "PollStatus" });export const pollOptionSchema = z.object({- id: z.string().openapi({ example: "opt_abc123" }),- startTime: z.iso.datetime().openapi({ example: "2025-01-15T09:00:00Z" }),- duration: z.number().int().openapi({+ id: z.string().meta({ example: "opt_abc123" }),+ startTime: z.iso.datetime().meta({ example: "2025-01-15T09:00:00Z" }),+ duration: z.number().int().meta({description: "Duration in minutes. 0 indicates an all-day option.",example: 30,}),})- .openapi("PollOption");+ .meta({ id: "PollOption" });export const pollUserSchema = z.object({- name: z.string().openapi({ example: "John Doe" }),+ name: z.string().meta({ example: "John Doe" }),image: z.string().nullable()- .openapi({ example: "https://example.com/avatar.jpg" }),+ .meta({ example: "https://example.com/avatar.jpg" }),})- .openapi("PollUser");+ .meta({ id: "PollUser" });const pollSchema = z.object({- id: z.string().openapi({ example: "p_123abc" }),- title: z.string().openapi({ example: "Team sync" }),- description: z.string().nullable().openapi({+ id: z.string().meta({ example: "p_123abc" }),+ title: z.string().meta({ example: "Team sync" }),+ description: z.string().nullable().meta({example: "Pick a time that works for everyone",}),- location: z.string().nullable().openapi({ example: "Zoom" }),- timezone: z.string().nullable().openapi({ example: "Europe/London" }),+ location: z.string().nullable().meta({ example: "Zoom" }),+ timezone: z.string().nullable().meta({ example: "Europe/London" }),status: pollStatusSchema,- createdAt: z- .string()- .datetime()- .openapi({ example: "2025-01-10T12:00:00Z" }),- user: pollUserSchema.nullable().openapi({+ createdAt: z.string().datetime().meta({ example: "2025-01-10T12:00:00Z" }),+ user: pollUserSchema.nullable().meta({description: "The poll organizer",}),options: z.array(pollOptionSchema),- adminUrl: z- .string()- .openapi({ example: "https://example.com/poll/p_123abc" }),+ adminUrl: z.string().meta({ example: "https://example.com/poll/p_123abc" }),inviteUrl: z.string()- .openapi({ example: "https://example.com/invite/p_123abc" }),+ .meta({ example: "https://example.com/invite/p_123abc" }),})- .openapi("Poll");+ .meta({ id: "Poll" });-export const getPollSuccessResponseSchema = z+export const pollResponseSchema = z.object({data: pollSchema,})- .openapi("GetPollResponse");+ .meta({ id: "PollResponse" });export const patchPollInputSchema = z.object({- status: pollStatusSchema.openapi({+ status: pollStatusSchema.meta({description:"The status to transition the poll to. Only `closed` is currently accepted; the other statuses are reserved for future transitions.",example: "closed",}),})- .openapi("PatchPollInput");--// Updating a poll returns the same shape as get poll-export const patchPollSuccessResponseSchema =- getPollSuccessResponseSchema.openapi("PatchPollResponse");--// Create poll returns the same shape as get poll-export const createPollSuccessResponseSchema =- getPollSuccessResponseSchema.openapi("CreatePollResponse");+ .meta({ id: "PatchPollInput" });export const listPollsQuerySchema = z.object({- status: pollStatusSchema.optional().openapi({+ status: pollStatusSchema.optional().meta({description: "Filter polls by status. Omit to include all statuses.",example: "open",}),- cursor: z.string().optional().openapi({+ cursor: z.string().optional().meta({description:"Cursor for pagination. Pass the `nextCursor` value from the previous response to fetch the next page.",example: "p_123abc",}),- limit: z.coerce.number().int().min(1).max(100).default(20).openapi({+ limit: z.coerce.number().int().min(1).max(100).default(20).meta({description: "Number of polls to return per page (1-100).",example: 20,}),@@ -258,96 +240,96 @@ export const listPollsQuerySchema = z.object({export const listPollItemSchema = pollSchema.extend({- participantCount: z.int().nonnegative().openapi({+ participantCount: z.int().nonnegative().meta({description: "Number of participants who have responded to the poll",example: 3,}),})- .openapi("ListPollItem");+ .meta({ id: "ListPollItem" });export const listPollsSuccessResponseSchema = z.object({data: z.array(listPollItemSchema),- nextCursor: z.string().nullable().openapi({+ nextCursor: z.string().nullable().meta({description:"Cursor to fetch the next page. `null` when there are no more results.",example: "p_123abc",}),})- .openapi("ListPollsResponse");+ .meta({ id: "ListPollsResponse" });export const voteCountSchema = z.object({- type: z.string().openapi({+ type: z.string().meta({description: "The vote type (e.g., yes, ifNeedBe, no)",example: "yes",}),- count: z.int().nonnegative().openapi({+ count: z.int().nonnegative().meta({description: "Number of votes of this type",example: 5,}),})- .openapi("VoteCount");+ .meta({ id: "VoteCount" });export const optionResultSchema = z.object({- id: z.string().openapi({ example: "opt_abc123" }),- startTime: z.iso.datetime().openapi({ example: "2025-01-15T09:00:00Z" }),- duration: z.int().nonnegative().openapi({+ id: z.string().meta({ example: "opt_abc123" }),+ startTime: z.iso.datetime().meta({ example: "2025-01-15T09:00:00Z" }),+ duration: z.int().nonnegative().meta({description: "Duration in minutes. 0 indicates an all-day option.",example: 30,}),- votes: z.array(voteCountSchema).openapi({+ votes: z.array(voteCountSchema).meta({description: "Array of vote counts by type",}),- score: z.int().nonnegative().openapi({+ score: z.int().nonnegative().meta({description:"Ranking score: (yes + ifNeedBe) * 1000 + yes. Total availability is primary, yes votes break ties.",example: 5004,}),- isTopChoice: z.boolean().openapi({+ isTopChoice: z.boolean().meta({description: "Whether this option has the highest score",example: true,}),})- .openapi("OptionResult");+ .meta({ id: "OptionResult" });export const getPollResultsSuccessResponseSchema = z.object({data: z.object({- pollId: z.string().openapi({ example: "p_123abc" }),- status: pollStatusSchema.openapi({+ pollId: z.string().meta({ example: "p_123abc" }),+ status: pollStatusSchema.meta({description:"Current poll status. Polls close automatically when all options are in the past.",example: "open",}),- participantCount: z.int().nonnegative().openapi({+ participantCount: z.int().nonnegative().meta({description: "Total number of participants",example: 8,}),options: z.array(optionResultSchema),- highScore: z.int().nonnegative().openapi({+ highScore: z.int().nonnegative().meta({description: "Highest score across all options",example: 7,}),}),})- .openapi("GetPollResultsResponse");+ .meta({ id: "GetPollResultsResponse" });export const participantSchema = z.object({- id: z.string().openapi({ example: "participant_abc123" }),- name: z.string().openapi({ example: "Jane Smith" }),- email: z.string().nullable().openapi({ example: "[email protected]" }),- createdAt: z.iso.datetime().openapi({ example: "2025-01-10T12:00:00Z" }),+ id: z.string().meta({ example: "participant_abc123" }),+ name: z.string().meta({ example: "Jane Smith" }),+ email: z.string().nullable().meta({ example: "[email protected]" }),+ createdAt: z.iso.datetime().meta({ example: "2025-01-10T12:00:00Z" }),})- .openapi("Participant");+ .meta({ id: "Participant" });export const getPollParticipantsSuccessResponseSchema = z.object({data: z.object({- pollId: z.string().openapi({ example: "p_123abc" }),+ pollId: z.string().meta({ example: "p_123abc" }),participants: z.array(participantSchema),}),})- .openapi("GetPollParticipantsResponse");+ .meta({ id: "GetPollParticipantsResponse" });diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 92366d032..8707bc63e 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -100,7 +100,7 @@ importers:version: 8.1.0([email protected])'@vercel/analytics':specifier: ^1.5.0- version: 1.6.1([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])+ version: 1.6.1([email protected](@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])dayjs:specifier: ^1.11.13version: 1.11.19@@ -116,12 +116,12 @@ importers:i18next-resources-to-backend:specifier: ^1.2.1version: 1.2.1- js-cookie:- specifier: ^3.0.1- version: 3.0.5intl-messageformat:specifier: ^10.7.15version: 10.7.18+ js-cookie:+ specifier: ^3.0.1+ version: 3.0.5lodash:specifier: ^4.17.21version: 4.17.23@@ -142,7 +142,7 @@ importers:version: 6.0.0(@types/[email protected])([email protected])next-seo:specifier: ^6.1.0- version: 6.8.0([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])+ version: 6.8.0([email protected](@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected])pg:specifier: ^8.17.1version: 8.18.0@@ -219,9 +219,6 @@ importers:'@hono/standard-validator':specifier: ^0.2.1version: 0.2.2(@standard-schema/[email protected])([email protected])- '@hono/zod-openapi':- specifier: ^1.2.0- version: 1.2.1([email protected])([email protected])'@hono/zod-validator':specifier: ^0.7.2version: 0.7.6([email protected])([email protected])@@ -541,7 +538,7 @@ importers:version: link:../tsconfigvitest:specifier: ^4.0.16- version: 4.0.18(@opentelemetry/[email protected])(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])+ version: 4.0.18(@opentelemetry/[email protected])(@types/[email protected])([email protected])([email protected])([email protected])([email protected])([email protected])([email protected])packages/database:dependencies:@@ -968,11 +965,6 @@ packages:'@asamuzakjp/[email protected]':resolution: {integrity: sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==}- '@asteasolutions/[email protected]':- resolution: {integrity: sha512-Ckp971tmTw4pnv+o7iK85ldBHBKk6gxMaoNyLn3c2Th/fKoTG8G3jdYuOanpdGqwlDB0z01FOjry2d32lfTqrA==}- peerDependencies:- zod: ^4.0.0-'@asyncapi/[email protected]':resolution: {integrity: sha512-Sxn74oHiZSU6+cVeZy62iPZMFMvKp4jupMFHelSICCMw1qELmUHPvuZSr+ZHDmNGgHcEpzJM5HN02kR7T4g+PQ==}@@ -2540,13 +2532,6 @@ packages:'@standard-schema/spec': ^1.0.0hono: '>=3.9.0'- '@hono/[email protected]':- resolution: {integrity: sha512-aZza4V8wkqpdHBWFNPiCeWd0cGOXbYuQW9AyezHs/jwQm5p67GkUyXwfthAooAwnG7thTpvOJkThZpCoY6us8w==}- engines: {node: '>=16.0.0'}- peerDependencies:- hono: '>=4.3.6'- zod: ^4.0.0-'@hono/[email protected]':resolution: {integrity: sha512-Io1B6d011Gj1KknV4rXYz4le5+5EubcWEU/speUjuw9XMMIaP3n78yXLhjd2A3PXaXaUwEAluOiAyLqhBEJgsw==}peerDependencies:@@ -9650,9 +9635,6 @@ packages:resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==}- resolution: {integrity: sha512-jaL+HgTq2Gj5jRcfdutgRGLosCy/hT8sQf6VOy+P+g36cZOjI1iukdPnijC+4CmeRzg/jEllJUboEic2FhxhtQ==}-resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==}hasBin: true@@ -11927,11 +11909,6 @@ snapshots:'@csstools/css-tokenizer': 3.0.4lru-cache: 10.4.3- '@asteasolutions/[email protected]([email protected])':- dependencies:- openapi3-ts: 4.5.0- zod: 4.3.6-'@asyncapi/[email protected]':dependencies:'@asyncapi/specs': 6.8.1@@ -13807,14 +13784,6 @@ snapshots:'@standard-schema/spec': 1.1.0hono: 4.11.7- dependencies:- '@asteasolutions/zod-to-openapi': 8.4.0([email protected])- '@hono/zod-validator': 0.7.6([email protected])([email protected])- hono: 4.11.7- openapi3-ts: 4.5.0- zod: 4.3.6-dependencies:hono: 4.11.7@@ -18639,9 +18608,9 @@ snapshots:dependencies:uncrypto: 0.1.3- '@vercel/[email protected]([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])':+ '@vercel/[email protected]([email protected](@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected])':optionalDependencies:- next: 16.3.3(@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ next: 16.3.3(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])react: 19.2.6'@vercel/[email protected](@aws-sdk/[email protected])':@@ -22490,9 +22459,9 @@ snapshots:react: 19.2.6react-dom: 19.2.6([email protected])- [email protected]([email protected](@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]):+ [email protected]([email protected](@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]))([email protected]([email protected]))([email protected]):dependencies:- next: 16.3.3(@babel/[email protected])(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])+ next: 16.3.3(@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected])react: 19.2.6react-dom: 19.2.6([email protected])@@ -22528,6 +22497,33 @@ snapshots:- '@types/node'- babel-plugin-macros+ [email protected](@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]):+ dependencies:+ '@next/env': 16.3.3+ '@swc/helpers': 0.5.23+ baseline-browser-mapping: 2.11.19+ caniuse-lite: 1.0.30001810+ postcss: 8.5.23+ react: 19.2.6+ react-dom: 19.2.6([email protected])+ styled-jsx: 5.1.6(@babel/[email protected])([email protected])+ optionalDependencies:+ '@next/swc-darwin-arm64': 16.3.3+ '@next/swc-darwin-x64': 16.3.3+ '@next/swc-linux-arm64-gnu': 16.3.3+ '@next/swc-linux-arm64-musl': 16.3.3+ '@next/swc-linux-x64-gnu': 16.3.3+ '@next/swc-linux-x64-musl': 16.3.3+ '@next/swc-win32-arm64-msvc': 16.3.3+ '@next/swc-win32-x64-msvc': 16.3.3+ '@opentelemetry/api': 1.9.0+ '@playwright/test': 1.58.1+ sharp: 0.35.3(@types/[email protected])+ transitivePeerDependencies:+ - '@babel/core'+ - '@types/node'+ - babel-plugin-macros+[email protected](@opentelemetry/[email protected])(@playwright/[email protected])(@types/[email protected])([email protected]([email protected]))([email protected]):dependencies:'@next/env': 16.3.3@@ -22676,10 +22672,6 @@ snapshots:- dependencies:- yaml: 2.8.2-