From 466ea365de044403acb67dd26c4e3f7964632e44 Mon Sep 17 00:00:00 2001 From: Vargha Csongor Date: Tue, 29 Apr 2025 22:09:31 +0200 Subject: [PATCH] small fixes on profile and nodes --- apps/app/messages/en.json | 2 + apps/app/messages/hu.json | 2 + apps/app/package.json | 2 +- apps/app/src/lib/api/api.gen.ts | 4482 +++++++++-------- apps/app/src/lib/graph/PersonMenu.svelte | 15 +- apps/app/src/lib/graph/PersonNode.svelte | 2 +- apps/app/src/lib/graph/model.ts | 2 +- apps/app/src/lib/profile/Modal.svelte | 2 +- apps/app/src/lib/profile/ProfileHeader.svelte | 20 +- apps/app/src/lib/sidebar/hamburgerIcon.svelte | 2 +- apps/app/src/routes/+page.svelte | 9 +- .../app/src/routes/api/family_tree/+server.ts | 2 +- .../login/google/callback/+page.server.ts | 32 +- 13 files changed, 2300 insertions(+), 2274 deletions(-) diff --git a/apps/app/messages/en.json b/apps/app/messages/en.json index c6e1348..5119f8a 100644 --- a/apps/app/messages/en.json +++ b/apps/app/messages/en.json @@ -36,6 +36,7 @@ "cookie_policy": "Cookie Policy", "country": "Country", "create": "Create", + "create_invite_code": "Create invite code", "create_person": "Create person", "create_relationship_and_person": "Create relationship and person", "dark": "Dark", @@ -76,6 +77,7 @@ "ingridients": "Ingridients", "interest": "Interest", "intersex": "Intersex", + "invite_code": "Invite Code", "language": "Language", "last_name": "Last Name", "life_events": "Life Events", diff --git a/apps/app/messages/hu.json b/apps/app/messages/hu.json index 78615eb..27916ed 100644 --- a/apps/app/messages/hu.json +++ b/apps/app/messages/hu.json @@ -36,6 +36,7 @@ "cookie_policy": "Süti szabályzat", "country": "Ország", "create": "Létrehozás", + "create_invite_code": "Meghívó kód létrehozása", "create_person": "Személy létrehozása", "create_relationship_and_person": "Kapcsolat és személy létrehozása", "dark": "Sötét", @@ -76,6 +77,7 @@ "ingridients": "Hozzávalók", "interest": "Érdeklődés", "intersex": "Interszex", + "invite_code": "Meghívó kód", "language": "Nyelv", "last_name": "Vezetéknév", "life_events": "Életesemények", diff --git a/apps/app/package.json b/apps/app/package.json index 736a328..33bf53f 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -69,4 +69,4 @@ "openapi-fetch": "^0.13.5", "pikaday": "^1.8.2" } -} \ No newline at end of file +} diff --git a/apps/app/src/lib/api/api.gen.ts b/apps/app/src/lib/api/api.gen.ts index e060bf8..e692ac7 100644 --- a/apps/app/src/lib/api/api.gen.ts +++ b/apps/app/src/lib/api/api.gen.ts @@ -4,2243 +4,2259 @@ */ export interface paths { - "/health": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Check the health of the server */ - get: operations["healthCheck"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/person_and_relationship/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Create a person and relationship */ - post: operations["createPersonAndRelationship"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/person": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Create a new person */ - post: operations["createPerson"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/comment/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get comments on person's profile by ID */ - get: operations["GetCommentsOnPerson"]; - put?: never; - /** Comment on person's profile by ID */ - post: operations["commentOnPerson"]; - /** Comment on person's profile by ID */ - delete: operations["deleteCommentOnPerson"]; - options?: never; - head?: never; - /** Edit comment on person's profile by ID */ - patch: operations["editComment"]; - trace?: never; - }; - "/person/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a person by ID */ - get: operations["getPersonById"]; - put?: never; - post?: never; - /** Soft delete a person by ID */ - delete: operations["softDeletePerson"]; - options?: never; - head?: never; - /** Update a person by ID */ - patch: operations["updatePerson"]; - trace?: never; - }; - "/person/{id}/hard-delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Hard delete a person by ID */ - delete: operations["hardDeletePerson"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/person/google/{google_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get a person by Google ID */ - get: operations["getPersonByGoogleId"]; - put?: never; - /** Create a new person by Google ID */ - post: operations["createPersonByGoogleId"]; - delete?: never; - options?: never; - head?: never; - /** Create a new person by Google ID with invite code */ - patch: operations["createPersonByGoogleIdAndInviteCode"]; - trace?: never; - }; - "/family-tree": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get family tree by person ID */ - get: operations["getFamilyTreeById"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/family-tree-with-spouses": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get family tree by person ID with spouses included */ - get: operations["getFamilyTreeWithSpousesById"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/person/{id}/recipes": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get recipes by person ID */ - get: operations["getRecipesByPersonId"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/relationship": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Create a relationship between two persons */ - post: operations["createRelationship"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/relationship/{id1}/{id2}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get relationships between two persons */ - get: operations["getRelationship"]; - put?: never; - post?: never; - /** Delete relationship between two persons */ - delete: operations["deleteRelationship"]; - options?: never; - head?: never; - /** Update a relationship between two persons */ - patch: operations["updateRelationship"]; - trace?: never; - }; - "/admin/{id1}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get profile Admins */ - get: operations["getProfileAdmins"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/admin/{id1}/{id2}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get admin relationship between two persons */ - get: operations["getAdminRelationship"]; - put?: never; - /** Create admin relationship between two persons */ - post: operations["createAdminRelationship"]; - /** Delete admin relationship between two persons */ - delete: operations["deleteAdminRelationship"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/managed_profiles": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get managed profiles */ - get: operations["getManagedProfiles"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/recipe/{id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Soft delete a recipe by ID */ - delete: operations["softDeleteRecipe"]; - options?: never; - head?: never; - /** Update a recipe by ID */ - patch: operations["updateRecipe"]; - trace?: never; - }; - "/recipe/{id}/hard-delete": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** Hard delete a recipe by ID */ - delete: operations["hardDeleteRecipe"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/recipe/{id}/relationship": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** Create a relationship with an existing recipe */ - post: operations["createRecipeRelationship"]; - /** Delete a relationship with a recipe */ - delete: operations["deleteRecipeRelationship"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; + '/health': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Check the health of the server */ + get: operations['healthCheck']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/person_and_relationship/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create a person and relationship */ + post: operations['createPersonAndRelationship']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/person': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create a new person */ + post: operations['createPerson']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/comment/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get comments on person's profile by ID */ + get: operations['GetCommentsOnPerson']; + put?: never; + /** Comment on person's profile by ID */ + post: operations['commentOnPerson']; + /** Comment on person's profile by ID */ + delete: operations['deleteCommentOnPerson']; + options?: never; + head?: never; + /** Edit comment on person's profile by ID */ + patch: operations['editComment']; + trace?: never; + }; + '/person/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a person by ID */ + get: operations['getPersonById']; + put?: never; + post?: never; + /** Soft delete a person by ID */ + delete: operations['softDeletePerson']; + options?: never; + head?: never; + /** Update a person by ID */ + patch: operations['updatePerson']; + trace?: never; + }; + '/person/{id}/hard-delete': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Hard delete a person by ID */ + delete: operations['hardDeletePerson']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/person/google/{google_id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get a person by Google ID */ + get: operations['getPersonByGoogleId']; + put?: never; + /** Create a new person by Google ID */ + post: operations['createPersonByGoogleId']; + delete?: never; + options?: never; + head?: never; + /** Create a new person by Google ID with invite code */ + patch: operations['createPersonByGoogleIdAndInviteCode']; + trace?: never; + }; + '/family-tree': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get family tree by person ID */ + get: operations['getFamilyTreeById']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/family-tree-with-spouses': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get family tree by person ID with spouses included */ + get: operations['getFamilyTreeWithSpousesById']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/person/{id}/recipes': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get recipes by person ID */ + get: operations['getRecipesByPersonId']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/relationship': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create a relationship between two persons */ + post: operations['createRelationship']; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/relationship/{id1}/{id2}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get relationships between two persons */ + get: operations['getRelationship']; + put?: never; + post?: never; + /** Delete relationship between two persons */ + delete: operations['deleteRelationship']; + options?: never; + head?: never; + /** Update a relationship between two persons */ + patch: operations['updateRelationship']; + trace?: never; + }; + '/admin/{id1}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get profile Admins */ + get: operations['getProfileAdmins']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/admin/{id1}/{id2}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get admin relationship between two persons */ + get: operations['getAdminRelationship']; + put?: never; + /** Create admin relationship between two persons */ + post: operations['createAdminRelationship']; + /** Delete admin relationship between two persons */ + delete: operations['deleteAdminRelationship']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/managed_profiles': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** Get managed profiles */ + get: operations['getManagedProfiles']; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/recipe/{id}': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Soft delete a recipe by ID */ + delete: operations['softDeleteRecipe']; + options?: never; + head?: never; + /** Update a recipe by ID */ + patch: operations['updateRecipe']; + trace?: never; + }; + '/recipe/{id}/hard-delete': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** Hard delete a recipe by ID */ + delete: operations['hardDeleteRecipe']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + '/recipe/{id}/relationship': { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** Create a relationship with an existing recipe */ + post: operations['createRecipeRelationship']; + /** Delete a relationship with a recipe */ + delete: operations['deleteRecipeRelationship']; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { - schemas: { - PersonProperties: { - invite_code?: string | null; - google_id?: string | null; - first_name?: string | null; - middle_name?: string | null; - last_name?: string | null; - titles?: string[] | null; - suffixes?: string[] | null; - extra_names?: string[] | null; - aliases?: string[] | null; - mothers_first_name?: string | null; - mothers_last_name?: string | null; - /** @enum {string|null} */ - biological_sex?: "male" | "female" | "intersex" | "unknown" | "other" | null; - /** Format: date */ - born?: string | null; - place_of_birth?: string | null; - /** Format: date */ - died?: string | null; - place_of_death?: string | null; - life_events?: { - /** Format: date */ - from?: string; - /** Format: date */ - to?: string; - description?: string; - }[] | null; - occupations?: string[] | null; - occupation_to_display?: string | null; - limit?: number | null; - photos?: { - url?: string; - description?: string; - /** Format: date */ - date?: string; - name?: string; - }[] | null; - videos?: { - url?: string; - description?: string; - /** Format: date */ - date?: string; - name?: string; - }[] | null; - audios?: { - url?: string; - description?: string; - /** Format: date */ - date?: string; - name?: string; - }[] | null; - profile_picture?: string | null; - verified?: boolean | null; - email?: string | null; - phone?: string | null; - residence?: { - city?: string; - country?: string; - zip_code?: string; - address_line_1?: string; - address_line_2?: string; - } | null; - religion?: string | null; - baptized?: string | null; - ideologies?: string[] | null; - blood_type?: string | null; - allergies?: string[] | null; - medications?: { - name?: string; - description?: string | null; - components?: string | null; - dosage?: string | null; - /** Format: date */ - from?: string | null; - /** Format: date */ - to?: string | null; - }[] | null; - medical_conditions?: Record[] | null; - height?: number | null; - weight?: number | null; - hair_colour?: string | null; - skin_colour?: string | null; - eye_colour?: string | null; - sports?: string[] | null; - hobbies?: string[] | null; - interests?: string[] | null; - languages?: { - language?: string; - level?: string | null; - }[] | null; - notes?: { - /** Format: date */ - date?: string | null; - title?: string | null; - note?: string; - url?: string | null; - }[] | null; - }; - PersonRegistration: { - first_name: string; - last_name: string; - /** Format: email */ - email?: string | null; - limit: number; - /** @enum {string} */ - biological_sex?: "male" | "female" | "intersex" | "unknown" | "other"; - /** Format: date */ - born: string; - mothers_first_name: string; - mothers_last_name: string; - }; - Person: { - Id?: number; - ElementId?: string; - Labels?: string[]; - Props?: components["schemas"]["PersonProperties"]; - }; - FamilyRelationship: { - verified?: boolean | null; - notes?: string | null; - /** Format: date */ - from?: string | null; - /** Format: date */ - to?: string | null; - }; - Relationship: { - id?: number; - type?: string | null; - label?: string | null; - start?: number; - end?: number; - properties?: components["schemas"]["FamilyRelationship"]; - }; - dbtypeRelationship: { - Id?: number; - ElementId?: string; - Type?: string | null; - StartId?: number; - StartElementId?: string; - EndId?: number; - EndElementId?: string; - Props?: components["schemas"]["FamilyRelationship"]; - }; - OptimizedPersonNode: { - id?: number; - labels?: string[]; - type?: string | null; - first_name?: string; - middle_name?: string; - last_name?: string; - /** Format: date */ - born?: string; - /** Format: date */ - died?: string | null; - /** @enum {string|null} */ - biological_sex?: "male" | "female" | "intersex" | "unknown" | "other" | null; - profile_picture?: string | null; - }; - FamilyTree: { - people?: components["schemas"]["OptimizedPersonNode"][]; - relationships?: components["schemas"]["dbtypeRelationship"][]; - }; - RecipeProperties: { - name?: string | null; - origin?: string | null; - allow_admin_access?: { - id?: number; - name?: string; - }[]; - category?: string | null; - /** Format: date */ - first_recorded?: string | null; - description?: string | null; - ingredients?: string[] | null; - instructions?: string[] | null; - photo?: string | null; - notes?: string | null; - others_said?: { - id?: number; - name?: string; - said?: string; - }[] | null; - }; - Recipe: { - Id?: number; - ElementId?: string; - Labels?: string[]; - Props?: components["schemas"]["RecipeProperties"]; - }; - Likes: { - Id?: number; - Type?: string; - StartId?: number; - StartElementId?: string; - EndId?: number; - EndElementId?: string; - Props?: components["schemas"]["LikesProperties"]; - }; - LikesProperties: { - favourite?: boolean | null; - like_it?: boolean | null; - could_make_it?: boolean | null; - }; - Admin: { - id?: number; - first_name?: string; - adminSince?: number; - last_name?: string; - EndId?: number; - EndElementId?: string; - Props?: { - added?: number; - }; - }; - AdminRelationship: { - Id?: number; - Type?: string; - StartId?: number; - StartElementId?: string; - EndId?: number; - EndElementId?: string; - Props?: { - added?: number; - }; - }; - Comment: { - id?: number | null; - start?: number | null; - end?: number | null; - type?: string | null; - label?: string | null; - props?: components["schemas"]["Message"]; - }; - Message: { - message?: string; - /** Format: date-time */ - edited?: string | null; - /** Format: date-time */ - sent_at?: string; - }; - Messages: { - people?: components["schemas"]["OptimizedPersonNode"][]; - comments?: components["schemas"]["Comment"][]; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + PersonProperties: { + invite_code?: string | null; + google_id?: string | null; + first_name?: string | null; + middle_name?: string | null; + last_name?: string | null; + titles?: string[] | null; + suffixes?: string[] | null; + extra_names?: string[] | null; + aliases?: string[] | null; + mothers_first_name?: string | null; + mothers_last_name?: string | null; + /** @enum {string|null} */ + biological_sex?: 'male' | 'female' | 'intersex' | 'unknown' | 'other' | null; + /** Format: date */ + born?: string | null; + place_of_birth?: string | null; + /** Format: date */ + died?: string | null; + place_of_death?: string | null; + life_events?: + | { + /** Format: date */ + from?: string; + /** Format: date */ + to?: string; + description?: string; + }[] + | null; + occupations?: string[] | null; + occupation_to_display?: string | null; + limit?: number | null; + photos?: + | { + url?: string; + description?: string; + /** Format: date */ + date?: string; + name?: string; + }[] + | null; + videos?: + | { + url?: string; + description?: string; + /** Format: date */ + date?: string; + name?: string; + }[] + | null; + audios?: + | { + url?: string; + description?: string; + /** Format: date */ + date?: string; + name?: string; + }[] + | null; + profile_picture?: string | null; + verified?: boolean | null; + email?: string | null; + phone?: string | null; + residence?: { + city?: string; + country?: string; + zip_code?: string; + address_line_1?: string; + address_line_2?: string; + } | null; + religion?: string | null; + baptized?: string | null; + ideologies?: string[] | null; + blood_type?: string | null; + allergies?: string[] | null; + medications?: + | { + name?: string; + description?: string | null; + components?: string | null; + dosage?: string | null; + /** Format: date */ + from?: string | null; + /** Format: date */ + to?: string | null; + }[] + | null; + medical_conditions?: Record[] | null; + height?: number | null; + weight?: number | null; + hair_colour?: string | null; + skin_colour?: string | null; + eye_colour?: string | null; + sports?: string[] | null; + hobbies?: string[] | null; + interests?: string[] | null; + languages?: + | { + language?: string; + level?: string | null; + }[] + | null; + notes?: + | { + /** Format: date */ + date?: string | null; + title?: string | null; + note?: string; + url?: string | null; + }[] + | null; + }; + PersonRegistration: { + first_name: string; + last_name: string; + /** Format: email */ + email?: string | null; + limit: number; + /** @enum {string} */ + biological_sex?: 'male' | 'female' | 'intersex' | 'unknown' | 'other'; + /** Format: date */ + born: string; + mothers_first_name: string; + mothers_last_name: string; + }; + Person: { + Id?: number; + ElementId?: string; + Labels?: string[]; + Props?: components['schemas']['PersonProperties']; + }; + FamilyRelationship: { + verified?: boolean | null; + notes?: string | null; + /** Format: date */ + from?: string | null; + /** Format: date */ + to?: string | null; + }; + Relationship: { + id?: number; + type?: string | null; + label?: string | null; + start?: number; + end?: number; + properties?: components['schemas']['FamilyRelationship']; + }; + dbtypeRelationship: { + Id?: number; + ElementId?: string; + Type?: string | null; + StartId?: number; + StartElementId?: string; + EndId?: number; + EndElementId?: string; + Props?: components['schemas']['FamilyRelationship']; + }; + OptimizedPersonNode: { + id?: number; + labels?: string[]; + type?: string | null; + first_name?: string; + middle_name?: string; + last_name?: string; + /** Format: date */ + born?: string; + /** Format: date */ + died?: string | null; + /** @enum {string|null} */ + biological_sex?: 'male' | 'female' | 'intersex' | 'unknown' | 'other' | null; + profile_picture?: string | null; + }; + FamilyTree: { + people?: components['schemas']['OptimizedPersonNode'][]; + relationships?: components['schemas']['dbtypeRelationship'][]; + }; + RecipeProperties: { + name?: string | null; + origin?: string | null; + allow_admin_access?: { + id?: number; + name?: string; + }[]; + category?: string | null; + /** Format: date */ + first_recorded?: string | null; + description?: string | null; + ingredients?: string[] | null; + instructions?: string[] | null; + photo?: string | null; + notes?: string | null; + others_said?: + | { + id?: number; + name?: string; + said?: string; + }[] + | null; + }; + Recipe: { + Id?: number; + ElementId?: string; + Labels?: string[]; + Props?: components['schemas']['RecipeProperties']; + }; + Likes: { + Id?: number; + Type?: string; + StartId?: number; + StartElementId?: string; + EndId?: number; + EndElementId?: string; + Props?: components['schemas']['LikesProperties']; + }; + LikesProperties: { + favourite?: boolean | null; + like_it?: boolean | null; + could_make_it?: boolean | null; + }; + Admin: { + id?: number; + first_name?: string; + adminSince?: number; + last_name?: string; + EndId?: number; + EndElementId?: string; + Props?: { + added?: number; + }; + }; + AdminRelationship: { + Id?: number; + Type?: string; + StartId?: number; + StartElementId?: string; + EndId?: number; + EndElementId?: string; + Props?: { + added?: number; + }; + }; + Comment: { + id?: number | null; + start?: number | null; + end?: number | null; + type?: string | null; + label?: string | null; + props?: components['schemas']['Message']; + }; + Message: { + message?: string; + /** Format: date-time */ + edited?: string | null; + /** Format: date-time */ + sent_at?: string; + }; + Messages: { + people?: components['schemas']['OptimizedPersonNode'][]; + comments?: components['schemas']['Comment'][]; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export interface operations { - healthCheck: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Server is healthy */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Server is unhealthy */ - 503: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - createPersonAndRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - person: components["schemas"]["PersonRegistration"]; - /** @enum {string} */ - type?: "child" | "parent" | "spouse" | "sibling"; - relationship: components["schemas"]["FamilyRelationship"]; - }; - }; - }; - responses: { - /** @description Person and relationship created */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - person?: components["schemas"]["Person"]; - relationships?: components["schemas"]["Relationship"][]; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - createPerson: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PersonRegistration"]; - }; - }; - responses: { - /** @description Person created */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Person"]; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - GetCommentsOnPerson: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Comments */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Messages"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - commentOnPerson: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["Message"]; - }; - }; - responses: { - /** @description Message updated */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Messages"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - deleteCommentOnPerson: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Deleted comment */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - editComment: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["Message"]; - }; - }; - responses: { - /** @description Comment updated */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Messages"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - getPersonById: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Person retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Person"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - softDeletePerson: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Person soft deleted */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - updatePerson: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PersonProperties"]; - }; - }; - responses: { - /** @description Person updated */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Person"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - hardDeletePerson: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Person hard deleted */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - getPersonByGoogleId: { - parameters: { - query?: never; - header?: never; - path: { - google_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Person retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Person"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - createPersonByGoogleId: { - parameters: { - query?: never; - header?: never; - path: { - google_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": 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; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - 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; - header: { - "X-User-ID": number; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Family tree retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FamilyTree"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - getFamilyTreeWithSpousesById: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Family tree retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["FamilyTree"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - getRecipesByPersonId: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Recipes retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - recipeRelations?: components["schemas"]["Likes"][]; - recipes?: components["schemas"]["Recipe"][]; - }; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - createRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - id1?: number; - id2?: number; - /** @enum {string} */ - type?: "child" | "parent" | "spouse" | "sibling"; - relationship?: components["schemas"]["FamilyRelationship"]; - }; - }; - }; - responses: { - /** @description Relationships created */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["dbtypeRelationship"][]; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - getRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id1: number; - id2: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Relationship retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Relationship"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - deleteRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id1: number; - id2: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Relationship deleted */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - updateRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id1: number; - id2: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - relationship?: components["schemas"]["FamilyRelationship"]; - }; - }; - }; - responses: { - /** @description Relationship created */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Relationship"]; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - getProfileAdmins: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id1: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Admins retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - admins?: components["schemas"]["Admin"][]; - }; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - getAdminRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id1: number; - id2: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Admin retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AdminRelationship"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - createAdminRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id1: number; - id2: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Admin created */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["AdminRelationship"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - deleteAdminRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id1: number; - id2: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Admin deleted */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - getManagedProfiles: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Managed Profiles retrieved */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - admins?: components["schemas"]["Admin"][]; - }; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - softDeleteRecipe: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Recipe soft deleted */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - updateRecipe: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["RecipeProperties"]; - }; - }; - responses: { - /** @description Recipe updated */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Recipe"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - hardDeleteRecipe: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Recipe hard deleted */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - createRecipeRelationship: { - parameters: { - query?: never; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - id: number; - relationship: { - schema?: components["schemas"]["LikesProperties"]; - }; - }; - }; - }; - responses: { - /** @description Relationship with recipe created */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Likes"]; - }; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; - deleteRecipeRelationship: { - parameters: { - query: { - personId: number; - }; - header: { - "X-User-ID": number; - }; - path: { - id: number; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Relationship with recipe deleted */ - 200: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Bad request */ - 400: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - /** @description Internal server error */ - 500: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - msg?: string; - }; - }; - }; - }; - }; + healthCheck: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Server is healthy */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Server is unhealthy */ + 503: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + createPersonAndRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + person: components['schemas']['PersonRegistration']; + /** @enum {string} */ + type?: 'child' | 'parent' | 'spouse' | 'sibling'; + relationship: components['schemas']['FamilyRelationship']; + }; + }; + }; + responses: { + /** @description Person and relationship created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + person?: components['schemas']['Person']; + relationships?: components['schemas']['Relationship'][]; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + createPerson: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PersonRegistration']; + }; + }; + responses: { + /** @description Person created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Person']; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + GetCommentsOnPerson: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Comments */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Messages']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + commentOnPerson: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['Message']; + }; + }; + responses: { + /** @description Message updated */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Messages']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + deleteCommentOnPerson: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Deleted comment */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + editComment: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['Message']; + }; + }; + responses: { + /** @description Comment updated */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Messages']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + getPersonById: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Person retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Person']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + softDeletePerson: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Person soft deleted */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + updatePerson: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['PersonProperties']; + }; + }; + responses: { + /** @description Person updated */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Person']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + hardDeletePerson: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Person hard deleted */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + getPersonByGoogleId: { + parameters: { + query?: never; + header?: never; + path: { + google_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Person retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Person']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + createPersonByGoogleId: { + parameters: { + query?: never; + header?: never; + path: { + google_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': 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; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + 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; + header: { + 'X-User-ID': number; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Family tree retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['FamilyTree']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + getFamilyTreeWithSpousesById: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Family tree retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['FamilyTree']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + getRecipesByPersonId: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Recipes retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + recipeRelations?: components['schemas']['Likes'][]; + recipes?: components['schemas']['Recipe'][]; + }; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + createRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + id1?: number; + id2?: number; + /** @enum {string} */ + type?: 'child' | 'parent' | 'spouse' | 'sibling'; + relationship?: components['schemas']['FamilyRelationship']; + }; + }; + }; + responses: { + /** @description Relationships created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['dbtypeRelationship'][]; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + getRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id1: number; + id2: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Relationship retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Relationship']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + deleteRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id1: number; + id2: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Relationship deleted */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + updateRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id1: number; + id2: number; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + relationship?: components['schemas']['FamilyRelationship']; + }; + }; + }; + responses: { + /** @description Relationship created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Relationship']; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + getProfileAdmins: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id1: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Admins retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + admins?: components['schemas']['Admin'][]; + }; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + getAdminRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id1: number; + id2: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Admin retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AdminRelationship']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + createAdminRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id1: number; + id2: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Admin created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['AdminRelationship']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + deleteAdminRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id1: number; + id2: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Admin deleted */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + getManagedProfiles: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Managed Profiles retrieved */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + admins?: components['schemas']['Admin'][]; + }; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + softDeleteRecipe: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Recipe soft deleted */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + updateRecipe: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': components['schemas']['RecipeProperties']; + }; + }; + responses: { + /** @description Recipe updated */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Recipe']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + hardDeleteRecipe: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Recipe hard deleted */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + createRecipeRelationship: { + parameters: { + query?: never; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody: { + content: { + 'application/json': { + id: number; + relationship: { + schema?: components['schemas']['LikesProperties']; + }; + }; + }; + }; + responses: { + /** @description Relationship with recipe created */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': components['schemas']['Likes']; + }; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; + deleteRecipeRelationship: { + parameters: { + query: { + personId: number; + }; + header: { + 'X-User-ID': number; + }; + path: { + id: number; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Relationship with recipe deleted */ + 200: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Bad request */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Unauthorized */ + 401: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + /** @description Internal server error */ + 500: { + headers: { + [name: string]: unknown; + }; + content: { + 'application/json': { + msg?: string; + }; + }; + }; + }; + }; } diff --git a/apps/app/src/lib/graph/PersonMenu.svelte b/apps/app/src/lib/graph/PersonMenu.svelte index 622eb74..70bd496 100644 --- a/apps/app/src/lib/graph/PersonMenu.svelte +++ b/apps/app/src/lib/graph/PersonMenu.svelte @@ -34,14 +34,15 @@ if (bottom) { contextMenu.style.bottom = `${bottom}px`; } - fetch(`/api/admin/${id}/${XUserId}` - ).then((response) => { - if(response.status === 200){ + fetch(`/api/admin/${id}/${XUserId}`) + .then((response) => { + if (response.status === 200) { isAdmin = true; - }else { - isAdmin = false + } else { + isAdmin = false; } - }).catch((error) => { + }) + .catch((error) => { console.error('Error fetching admin status:', error); }); }); @@ -64,7 +65,7 @@ - {#if (Number(XUserId) !== Number(id)) && isAdmin} + {#if Number(XUserId) !== Number(id) && isAdmin} {/if} diff --git a/apps/app/src/lib/graph/PersonNode.svelte b/apps/app/src/lib/graph/PersonNode.svelte index 08aef73..04bae53 100644 --- a/apps/app/src/lib/graph/PersonNode.svelte +++ b/apps/app/src/lib/graph/PersonNode.svelte @@ -41,7 +41,7 @@ -
+

{data.first_name} {data.middle_name ? data.middle_name : ''} diff --git a/apps/app/src/lib/graph/model.ts b/apps/app/src/lib/graph/model.ts index c25b42c..a693702 100644 --- a/apps/app/src/lib/graph/model.ts +++ b/apps/app/src/lib/graph/model.ts @@ -4,7 +4,7 @@ import PersonNode from './PersonNode.svelte'; export const nodeTypes: NodeTypes = { personNode: PersonNode }; export const edgeTypes: EdgeTypes = { - familyEdge: FamilyEdge + familyEdge: FamilyEdge }; export type NodeMenu = { diff --git a/apps/app/src/lib/profile/Modal.svelte b/apps/app/src/lib/profile/Modal.svelte index fa2694c..5389d3e 100644 --- a/apps/app/src/lib/profile/Modal.svelte +++ b/apps/app/src/lib/profile/Modal.svelte @@ -7,7 +7,7 @@ import LifeEventsTimeline from './LifeEventsTimeline.svelte'; import OtherDetails from './OtherDetails.svelte'; import type { components } from '$lib/api/api.gen.js'; - import { life_events } from '$lib/paraglide/messages'; + let { closeModal = () => {}, person = {} diff --git a/apps/app/src/lib/profile/ProfileHeader.svelte b/apps/app/src/lib/profile/ProfileHeader.svelte index 3332be6..5a7862c 100644 --- a/apps/app/src/lib/profile/ProfileHeader.svelte +++ b/apps/app/src/lib/profile/ProfileHeader.svelte @@ -17,7 +17,8 @@ middle_name, mothers_first_name, mothers_last_name, - profile_picture + profile_picture, + create_invite_code } from '$lib/paraglide/messages'; import { callMessageFunction } from '$lib/i18n'; import type { MessageKeys } from '$lib/i18n'; @@ -80,14 +81,14 @@

- {first_name()}: + {first_name()}: {#if editorMode}{:else}{person.first_name ?? '-'}{/if}

- {last_name()}: + {last_name()}: {#if editorMode}{:else}{person.middle_name ?? '-'}{/if}

- {born()}: + {born()}: {#if editorMode}

- {died()}: + {died()}: {#if editorMode}{:else}{person.died ?? '-'}{/if}

- {biological_sex()}: + {biological_sex()}: {#if editorMode} + { if (connectionState.isValid) return; - const sourceNodeId = connectionState.fromNode?.id + const sourceNodeId = connectionState.fromNode?.id; if (sourceNodeId === undefined) return; relationshipStart = Number(sourceNodeId); createPerson = true; console.log('createPerson', createPerson); console.log('relationshipStart', relationshipStart); - } + }; diff --git a/apps/app/src/routes/api/family_tree/+server.ts b/apps/app/src/routes/api/family_tree/+server.ts index 5f513a4..539a449 100644 --- a/apps/app/src/routes/api/family_tree/+server.ts +++ b/apps/app/src/routes/api/family_tree/+server.ts @@ -35,7 +35,7 @@ export async function GET(event: RequestEvent): Promise { message: 'Family tree is empty' }); } - + var graphToReturn: components['schemas']['FamilyTree'] = { people: [], relationships: response.data.relationships diff --git a/apps/app/src/routes/login/google/callback/+page.server.ts b/apps/app/src/routes/login/google/callback/+page.server.ts index 12f3e25..14b9f73 100644 --- a/apps/app/src/routes/login/google/callback/+page.server.ts +++ b/apps/app/src/routes/login/google/callback/+page.server.ts @@ -34,7 +34,6 @@ export const load: PageServerLoad = async (event: RequestEvent) => { return {}; } - const storedState = event.cookies.get('google_oauth_state') ?? null; const codeVerifier = event.cookies.get('google_code_verifier') ?? null; const code = event.url.searchParams.get('code'); @@ -101,13 +100,13 @@ export const load: PageServerLoad = async (event: RequestEvent) => { email: email }; - event.cookies.set('already_loaded', 'true',{ + event.cookies.set('already_loaded', 'true', { path: '/login/google/callback', sameSite: 'lax', httpOnly: true, maxAge: 60 * 10, - secure: import.meta.env.PROD, - }) + secure: import.meta.env.PROD + }); return { props: personP @@ -133,17 +132,20 @@ async function register(event: RequestEvent) { mothers_first_name: data.get('mothers_first_name'), mothers_last_name: data.get('mothers_last_name'), google_id: data.get('google_id'), - limit: StorageLimit, + limit: StorageLimit } as components['schemas']['PersonRegistration']; if (!event.platform || !event.platform.env || !event.platform.env.GH_SESSIONS) { - return fail(500, { data: parsedData, message: 'Server configuration error. GH_SESSIONS KeyValue store missing' }); + return fail(500, { + data: parsedData, + message: 'Server configuration error. GH_SESSIONS KeyValue store missing' + }); } const first_name_f = data.get('first_name'); if (first_name_f === null || first_name_f === '') { return fail(400, { - data:parsedData, + data: parsedData, message: missing_field({ field: first_name() }) @@ -287,14 +289,12 @@ async function register(event: RequestEvent) { setSessionTokenCookie(event, sessionToken, session.expiresAt); - event.cookies.delete('already_loaded', - { - path: '/login/google/callback', - sameSite: 'lax', - httpOnly: true, - maxAge: 0, - secure: import.meta.env.PROD - } - ); + event.cookies.delete('already_loaded', { + path: '/login/google/callback', + sameSite: 'lax', + httpOnly: true, + maxAge: 0, + secure: import.meta.env.PROD + }); return redirect(302, '/'); }