diff --git a/apps/meteor/app/api/server/v1/invites.ts b/apps/meteor/app/api/server/v1/invites.ts index 637da81892c03..816476eb22b27 100644 --- a/apps/meteor/app/api/server/v1/invites.ts +++ b/apps/meteor/app/api/server/v1/invites.ts @@ -170,19 +170,23 @@ const invites = API.v1 return API.v1.success((await findOrCreateInvite(this.userId, { rid, days, maxUses })) as IInvite); }, - ); - -API.v1.addRoute( - 'removeInvite/:_id', - { authRequired: true }, - { - async delete() { + ) + .delete( + 'removeInvite/:_id', + { + authRequired: true, + response: { + 200: ajv.compile({ + type: 'boolean', + }), + }, + }, + async function () { const { _id } = this.urlParams; return API.v1.success(await removeInvite(this.userId, { _id })); }, - }, -); + ); API.v1.addRoute( 'useInviteToken', @@ -238,6 +242,6 @@ API.v1.addRoute( type InvitesEndpoints = ExtractRoutesFromAPI; declare module '@rocket.chat/rest-typings' { - // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-interface + // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type, @typescript-eslint/no-empty-interface interface Endpoints extends InvitesEndpoints {} } diff --git a/packages/rest-typings/src/v1/invites.ts b/packages/rest-typings/src/v1/invites.ts index 95ceed82aacb7..17e26567fbb79 100644 --- a/packages/rest-typings/src/v1/invites.ts +++ b/packages/rest-typings/src/v1/invites.ts @@ -79,9 +79,6 @@ const SendInvitationEmailParamsSchema: JSONSchemaType export const isSendInvitationEmailParams = ajv.compile(SendInvitationEmailParamsSchema); export type InvitesEndpoints = { - '/v1/removeInvite/:_id': { - DELETE: () => boolean; - }; '/v1/useInviteToken': { POST: (params: UseInviteTokenProps) => { room: {