From db93735058a695f70f608aafba8634faa28ea700 Mon Sep 17 00:00:00 2001 From: Vargha Csongor Date: Thu, 27 Mar 2025 20:18:46 +0100 Subject: [PATCH] add required field to google id registration --- api/openapi.json | 4 +++ apps/app/src/lib/api/api.gen.ts | 59 +++++++++++++++++++++++++++++---- 2 files changed, 57 insertions(+), 6 deletions(-) diff --git a/api/openapi.json b/api/openapi.json index 332b068..2301f57 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -504,6 +504,10 @@ "application/json": { "schema": { "type": "object", + "required": [ + "invite_code", + "person" + ], "properties": { "invite_code": { "type": "string" diff --git a/apps/app/src/lib/api/api.gen.ts b/apps/app/src/lib/api/api.gen.ts index 5d08eec..eda060b 100644 --- a/apps/app/src/lib/api/api.gen.ts +++ b/apps/app/src/lib/api/api.gen.ts @@ -105,7 +105,8 @@ export interface paths { delete?: never; options?: never; head?: never; - patch?: never; + /** Create a new person by Google ID with invite code */ + patch: operations["createPersonByGoogleIdAndInviteCode"]; trace?: never; }; "/person/{id}/family-tree": { @@ -455,14 +456,22 @@ export interface operations { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + msg?: string; + }; + }; }; /** @description Server is unhealthy */ 503: { headers: { [name: string]: unknown; }; - content?: never; + content: { + "application/json": { + msg?: string; + }; + }; }; }; }; @@ -525,9 +534,7 @@ export interface operations { createPerson: { parameters: { query?: never; - header: { - "X-User-ID": number; - }; + header?: never; path?: never; cookie?: never; }; @@ -800,6 +807,46 @@ export interface operations { }; }; }; + createPersonByGoogleIdAndInviteCode: { + parameters: { + query?: never; + header?: never; + path: { + google_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + invite_code?: string; + person?: components["schemas"]["PersonRegistration"]; + }; + }; + }; + responses: { + /** @description Person created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Person"]; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + msg?: string; + }; + }; + }; + }; + }; getFamilyTreeById: { parameters: { query?: never;