From 2b0cab005d9b051aa625d94771bc4b8c36dbb2e9 Mon Sep 17 00:00:00 2001 From: yash-rajpal Date: Tue, 23 Jan 2024 01:09:39 +0530 Subject: [PATCH] oops --- packages/rest-typings/src/v1/users.ts | 6 +----- .../rest-typings/src/v1/users/UsersGetNamesParamsGET.ts | 4 +--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/rest-typings/src/v1/users.ts b/packages/rest-typings/src/v1/users.ts index 775855b89ff6..a5c5c765dc19 100644 --- a/packages/rest-typings/src/v1/users.ts +++ b/packages/rest-typings/src/v1/users.ts @@ -371,11 +371,7 @@ export type UsersEndpoints = { '/v1/users.getNames': { GET: (params: UsersGetNamesParamsGET) => { - users: { - userId: string; - username: string; - name: string; - }[]; + users: Pick[]; }; }; }; diff --git a/packages/rest-typings/src/v1/users/UsersGetNamesParamsGET.ts b/packages/rest-typings/src/v1/users/UsersGetNamesParamsGET.ts index eb00e28c9513..a9b57283ebe4 100644 --- a/packages/rest-typings/src/v1/users/UsersGetNamesParamsGET.ts +++ b/packages/rest-typings/src/v1/users/UsersGetNamesParamsGET.ts @@ -7,7 +7,7 @@ const ajv = new Ajv({ export type UsersGetNamesParamsGET = { userIds: string[] } | { usernames: string[] }; const UsersGetNamesParamsGETSchema = { - anyOf: [ + oneOf: [ { type: 'object', properties: { @@ -19,7 +19,6 @@ const UsersGetNamesParamsGETSchema = { }, }, required: ['userIds'], - additionalProperties: false, }, { type: 'object', @@ -32,7 +31,6 @@ const UsersGetNamesParamsGETSchema = { }, }, required: ['usernames'], - additionalProperties: false, }, ], };