From 36aa79c85f1b790a33197823cfa2272f48e08de7 Mon Sep 17 00:00:00 2001 From: Felix <122696847+felix-schott@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:15:34 +0000 Subject: [PATCH] upgrade to svelte 5 (issue #30) (#36) * close #30 * changelog, fix go repo path --- CHANGELOG.md | 17 + backend/cmd/dbcli/cli.go | 4 +- backend/cmd/dbcli/cli_test.go | 4 +- backend/cmd/server/handlers.go | 4 +- backend/cmd/server/handlers_test.go | 4 +- backend/cmd/server/main.go | 2 +- backend/doc/openapi.json | 2 +- backend/go.mod | 2 +- backend/internal/db/db_test.go | 2 +- frontend/package-lock.json | 206 ++++------ frontend/package.json | 14 +- frontend/src/lib/AddSessionPopup.svelte | 400 ++++++++++--------- frontend/src/lib/ButtonGroup.svelte | 15 +- frontend/src/lib/EditSessionPopup.svelte | 56 +-- frontend/src/lib/FilterMenu.svelte | 85 ++-- frontend/src/lib/Header.svelte | 8 +- frontend/src/lib/InfoPopup.svelte | 3 +- frontend/src/lib/LoadingScreen.svelte | 8 +- frontend/src/lib/Map.svelte | 35 +- frontend/src/lib/Message.svelte | 10 +- frontend/src/lib/Modal.svelte | 38 +- frontend/src/lib/MultiSelect.svelte | 25 +- frontend/src/lib/Popup.svelte | 50 ++- frontend/src/lib/Rating.svelte | 10 +- frontend/src/lib/SelectRating.svelte | 27 +- frontend/src/lib/SessionDetails.svelte | 105 ++--- frontend/src/lib/SessionPopup.svelte | 126 +++--- frontend/src/lib/VenuePopup.svelte | 14 - frontend/src/lib/WindowControlButton.svelte | 21 +- frontend/src/lib/icons/ArrowLeftIcon.svelte | 21 +- frontend/src/lib/icons/EditIcon.svelte | 26 +- frontend/src/lib/icons/ExpandIcon.svelte | 19 +- frontend/src/lib/icons/FileTrayIcon.svelte | 19 +- frontend/src/lib/icons/InfoIcon.svelte | 29 +- frontend/src/lib/icons/LocationIcon.svelte | 19 +- frontend/src/lib/icons/MicrophoneIcon.svelte | 19 +- frontend/src/lib/icons/PlusIcon.svelte | 25 +- frontend/src/lib/icons/PlusIconCircle.svelte | 35 +- frontend/src/lib/icons/ResetIcon.svelte | 26 +- frontend/src/lib/icons/SettingsIcon.svelte | 22 +- frontend/src/lib/icons/ShareIcon.svelte | 26 +- frontend/src/lib/icons/StarEmptyIcon.svelte | 14 +- frontend/src/lib/icons/StarFilledIcon.svelte | 14 +- frontend/src/lib/icons/StarHalfIcon.svelte | 8 +- frontend/src/lib/icons/TimeIcon.svelte | 19 +- frontend/src/routes/+layout.svelte | 9 +- frontend/src/routes/[sessionId]/+page.svelte | 6 +- 47 files changed, 939 insertions(+), 714 deletions(-) delete mode 100644 frontend/src/lib/VenuePopup.svelte diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ea71a4..73a8030 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Calendar Versioning](https://calver.org/) (`YYYY.MM.MICRO-TAG`). +## [v2024.10.3-beta] - 2024-10-29 + +### Added + +- Store author and time alongside comment content in separate DB table; implement UI (PR [#34](https://github.com/felix-schott/jamsessions/pull/34)) +- Add rating functionality with new DB table/API routes and UI changes (PR [#34](https://github.com/felix-schott/jamsessions/pull/34)) +- Add UI to change backline and genre information in `EditSessionPopup.svelte` (PR [#35](https://github.com/felix-schott/jamsessions/issues/35)) + +### Changed + +- Upgrade frontend code to Svelte 5 (PR [#36](https://github.com/felix-schott/jamsessions/pull/34)) + +### Fixed + +- Fixed a bug that occurred with an empty database (PR [#28](https://github.com/felix-schott/jamsessions/pull/28)) +- Propagate release tag from `install.sh` to the docker image version in `docker-compose.yml` (PR [#33](https://github.com/felix-schott/jamsessions/pull/33)) + ## [v2024.10.2-beta] - 2024-10-24 ### Added diff --git a/backend/cmd/dbcli/cli.go b/backend/cmd/dbcli/cli.go index 648aa62..652ea51 100644 --- a/backend/cmd/dbcli/cli.go +++ b/backend/cmd/dbcli/cli.go @@ -6,8 +6,8 @@ import ( "fmt" "log" - dbutils "github.com/felix-schott/london-jam-sessions/internal/db" - "github.com/felix-schott/london-jam-sessions/internal/geocoding" + dbutils "github.com/felix-schott/jamsessions/backend/internal/db" + "github.com/felix-schott/jamsessions/backend/internal/geocoding" "github.com/alexflint/go-arg" ) diff --git a/backend/cmd/dbcli/cli_test.go b/backend/cmd/dbcli/cli_test.go index 52944b6..291aafa 100644 --- a/backend/cmd/dbcli/cli_test.go +++ b/backend/cmd/dbcli/cli_test.go @@ -15,8 +15,8 @@ import ( "testing" "time" - dbutils "github.com/felix-schott/london-jam-sessions/internal/db" - "github.com/felix-schott/london-jam-sessions/internal/types" + dbutils "github.com/felix-schott/jamsessions/backend/internal/db" + "github.com/felix-schott/jamsessions/backend/internal/types" "github.com/jackc/pgx/v5/pgtype" geom "github.com/twpayne/go-geom" ) diff --git a/backend/cmd/server/handlers.go b/backend/cmd/server/handlers.go index 2f7f415..8a5c7e7 100644 --- a/backend/cmd/server/handlers.go +++ b/backend/cmd/server/handlers.go @@ -12,8 +12,8 @@ import ( "strings" "time" - dbutils "github.com/felix-schott/london-jam-sessions/internal/db" - types "github.com/felix-schott/london-jam-sessions/internal/types" + dbutils "github.com/felix-schott/jamsessions/backend/internal/db" + types "github.com/felix-schott/jamsessions/backend/internal/types" "github.com/go-fuego/fuego" "github.com/jackc/pgx/v5/pgtype" ) diff --git a/backend/cmd/server/handlers_test.go b/backend/cmd/server/handlers_test.go index 47e8215..fa6d262 100644 --- a/backend/cmd/server/handlers_test.go +++ b/backend/cmd/server/handlers_test.go @@ -20,8 +20,8 @@ import ( "github.com/jackc/pgx/v5/pgtype" geom "github.com/twpayne/go-geom" - dbutils "github.com/felix-schott/london-jam-sessions/internal/db" - "github.com/felix-schott/london-jam-sessions/internal/types" + dbutils "github.com/felix-schott/jamsessions/backend/internal/db" + "github.com/felix-schott/jamsessions/backend/internal/types" "github.com/go-fuego/fuego" ) diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index 634833e..0f2aeeb 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -6,7 +6,7 @@ import ( "log" "os" - dbutils "github.com/felix-schott/london-jam-sessions/internal/db" + dbutils "github.com/felix-schott/jamsessions/backend/internal/db" "github.com/getkin/kin-openapi/openapi3" "github.com/go-fuego/fuego" "github.com/rs/cors" diff --git a/backend/doc/openapi.json b/backend/doc/openapi.json index 450c709..42c6329 100644 --- a/backend/doc/openapi.json +++ b/backend/doc/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","components":{"requestBodies":{"CommentBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentBody"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CommentBody"}}},"description":"Request body for main.CommentBody","required":true},"SessionProperties":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProperties"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionProperties"}}},"description":"Request body for types.SessionProperties","required":true},"SessionPropertiesWithVenue":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionPropertiesWithVenue"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionPropertiesWithVenue"}}},"description":"Request body for types.SessionPropertiesWithVenue","required":true},"VenueProperties":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueProperties"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueProperties"}}},"description":"Request body for types.VenueProperties","required":true}},"schemas":{"CommentBody":{"description":"CommentBody schema","properties":{"author":{"type":"string"},"content":{"type":"string"},"session":{"type":"integer"}},"type":"object"},"FeatureCollection[github.com/felix-schott/london-jam-sessions/internal/types.SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionPropertiesWithVenue]]":{"description":"FeatureCollection[github.com/felix-schott/london-jam-sessions/internal/types.SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionPropertiesWithVenue]] schema","properties":{"features":{"items":{"properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"description":{"description":"string schema","type":"string"},"dt_updated_utc":{"format":"date-time","type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"interval":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"rating":{"format":"float","type":"number"},"session_id":{"format":"int32","type":"integer"},"session_name":{"description":"string schema","type":"string"},"session_website":{"description":"string schema","type":"string"},"start_time_utc":{"format":"date-time","type":"string"},"venue":{"format":"int32","type":"integer"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"type":"array"},"type":{"type":"string"}},"type":"object"},"FeatureCollection[github.com/felix-schott/london-jam-sessions/internal/types.VenueFeature]":{"description":"FeatureCollection[github.com/felix-schott/london-jam-sessions/internal/types.VenueFeature] schema","properties":{"features":{"items":{"properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"type":"array"},"type":{"type":"string"}},"type":"object"},"GetCommentsBySessionIdRow":{"description":"GetCommentsBySessionIdRow schema","properties":{"author":{"type":"string"},"comment_id":{"format":"int32","type":"integer"},"content":{"type":"string"},"dt_posted":{"properties":{"InfinityModifier":{"maximum":127,"minimum":-128,"type":"integer"},"Time":{"format":"date-time","type":"string"},"Valid":{"type":"boolean"}},"type":"object"},"rating":{"maximum":32767,"minimum":-32768,"type":"integer"},"session":{"format":"int32","type":"integer"}},"type":"object"},"HTTPError":{"description":"HTTPError schema","properties":{"detail":{"description":"Human readable error message","nullable":true,"type":"string"},"errors":{"items":{"properties":{"more":{"additionalProperties":{},"type":"object"},"name":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"nullable":true,"type":"array"},"instance":{"nullable":true,"type":"string"},"status":{"description":"HTTP status code","example":403,"nullable":true,"type":"integer"},"title":{"description":"Short title of the error","nullable":true,"type":"string"},"type":{"description":"URL of the error type. Can be used to lookup the error in a documentation","nullable":true,"type":"string"}},"type":"object"},"SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionPropertiesWithVenue]":{"description":"SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionPropertiesWithVenue] schema","properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"description":{"description":"string schema","type":"string"},"dt_updated_utc":{"format":"date-time","type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"interval":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"rating":{"format":"float","type":"number"},"session_id":{"format":"int32","type":"integer"},"session_name":{"description":"string schema","type":"string"},"session_website":{"description":"string schema","type":"string"},"start_time_utc":{"format":"date-time","type":"string"},"venue":{"format":"int32","type":"integer"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]":{"description":"SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties] schema","properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"description":{"description":"string schema","type":"string"},"dt_updated_utc":{"format":"date-time","type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"interval":{"description":"string schema","type":"string"},"rating":{"format":"float","type":"number"},"session_id":{"format":"int32","type":"integer"},"session_name":{"description":"string schema","type":"string"},"session_website":{"description":"string schema","type":"string"},"start_time_utc":{"format":"date-time","type":"string"},"venue":{"format":"int32","type":"integer"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"SessionProperties":{"description":"SessionProperties schema","properties":{"description":{"description":"string schema","nullable":true,"type":"string"},"dt_updated_utc":{"format":"date-time","nullable":true,"type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"nullable":true,"type":"integer"},"genres":{"items":{"type":"string"},"nullable":true,"type":"array"},"interval":{"description":"string schema","nullable":true,"type":"string"},"rating":{"format":"float","nullable":true,"type":"number"},"session_id":{"format":"int32","nullable":true,"type":"integer"},"session_name":{"description":"string schema","nullable":true,"type":"string"},"session_website":{"description":"string schema","nullable":true,"type":"string"},"start_time_utc":{"format":"date-time","nullable":true,"type":"string"},"venue":{"format":"int32","nullable":true,"type":"integer"}},"type":"object"},"SessionPropertiesWithVenue":{"description":"SessionPropertiesWithVenue schema","properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"description":{"description":"string schema","type":"string"},"dt_updated_utc":{"format":"date-time","type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"interval":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"rating":{"format":"float","type":"number"},"session_id":{"format":"int32","type":"integer"},"session_name":{"description":"string schema","type":"string"},"session_website":{"description":"string schema","type":"string"},"start_time_utc":{"format":"date-time","type":"string"},"venue":{"format":"int32","type":"integer"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"VenueFeature":{"description":"VenueFeature schema","properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"VenueProperties":{"description":"VenueProperties schema","properties":{"address_first_line":{"description":"string schema","nullable":true,"type":"string"},"address_second_line":{"description":"string schema","nullable":true,"type":"string"},"backline":{"items":{"type":"string"},"nullable":true,"type":"array"},"city":{"description":"string schema","nullable":true,"type":"string"},"postcode":{"description":"string schema","nullable":true,"type":"string"},"venue_comments":{"items":{"type":"string"},"nullable":true,"type":"array"},"venue_dt_updated_utc":{"format":"date-time","nullable":true,"type":"string"},"venue_id":{"format":"int32","nullable":true,"type":"integer"},"venue_name":{"description":"string schema","nullable":true,"type":"string"},"venue_website":{"description":"string schema","nullable":true,"type":"string"}},"type":"object"},"string":{"description":"string schema","type":"string"},"unknown-interface":{"description":"unknown-interface schema"}}},"info":{"description":"PLACEHOLDER","title":"Jam Sessions","version":"0.0.1"},"paths":{"/v1/":{"get":{"description":"controller: `main.main.func1`\n\n---\n\n","operationId":"GET_/v1/","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/string"}},"application/xml":{"schema":{"$ref":"#/components/schemas/string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"func1","tags":["v1"]}},"/v1/jamsessions":{"get":{"description":"Use '/v1/jamsessions?date=2024-01-30' to list jamsessions happening on a particular date. The result is inferred and may not be accurate, especially for past time frames. Use '/jamsessions?backline=PA,Drums' to filter by backline provided (accepted values: 'PA', 'Drums', 'Guitar_Amp', 'Bass_Amp', 'Microphone', 'MiscPercussion'.","operationId":"GET_/v1/jamsessions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCollection[github.com/felix-schott/london-jam-sessions/internal/types.SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionPropertiesWithVenue]]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/FeatureCollection[github.com/felix-schott/london-jam-sessions/internal/types.SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionPropertiesWithVenue]]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get all jam sessions","tags":["v1"]},"post":{"description":"controller: `main.PostSession`\n\n---\n\n","operationId":"POST_/v1/jamsessions","requestBody":{"$ref":"#/components/requestBodies/SessionPropertiesWithVenue"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Add a jam session","tags":["v1"]}},"/v1/jamsessions/{id}":{"delete":{"description":"controller: `main.DeleteSessionById`\n\n---\n\n","operationId":"DELETE_/v1/jamsessions/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Delete a jam session by ID","tags":["v1"]},"get":{"description":"controller: `main.GetSessionById`\n\n---\n\n","operationId":"GET_/v1/jamsessions/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionPropertiesWithVenue]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionPropertiesWithVenue]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get a jam session by ID","tags":["v1"]},"patch":{"description":"controller: `main.PatchSessionById`\n\n---\n\n","operationId":"PATCH_/v1/jamsessions/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/SessionProperties"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Update a jam session by ID","tags":["v1"]}},"/v1/jamsessions/{id}/comments":{"get":{"description":"controller: `main.GetCommentsBySessionId`\n\n---\n\n","operationId":"GET_/v1/jamsessions/:id/comments","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GetCommentsBySessionIdRow"},"type":"array"}},"application/xml":{"schema":{"items":{"$ref":"#/components/schemas/GetCommentsBySessionIdRow"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get all comments for a session by ID","tags":["v1"]},"post":{"description":"controller: `main.PostCommentForSessionById`\n\n---\n\n","operationId":"POST_/v1/jamsessions/:id/comments","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/CommentBody"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Post a comment for a session by ID","tags":["v1"]}},"/v1/jamsessions/{id}/suggestions":{"post":{"description":"controller: `main.PostSuggestionsForSessionById`\n\n---\n\n","operationId":"POST_/v1/jamsessions/:id/suggestions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/CommentBody"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/london-jam-sessions/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Post feedback/suggest changes for a session by ID","tags":["v1"]}},"/v1/venues":{"get":{"description":"controller: `main.GetVenues`\n\n---\n\n","operationId":"GET_/v1/venues","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCollection[github.com/felix-schott/london-jam-sessions/internal/types.VenueFeature]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/FeatureCollection[github.com/felix-schott/london-jam-sessions/internal/types.VenueFeature]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get all venues","tags":["v1"]},"post":{"description":"controller: `main.PostVenue`\n\n---\n\n","operationId":"POST_/v1/venues","requestBody":{"$ref":"#/components/requestBodies/VenueProperties"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueFeature"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueFeature"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Add a venue","tags":["v1"]}},"/v1/venues/{id}":{"delete":{"description":"controller: `main.DeleteVenueById`\n\n---\n\n","operationId":"DELETE_/v1/venues/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueFeature"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueFeature"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Delete a venue by ID","tags":["v1"]},"get":{"description":"controller: `main.GetVenueById`\n\n---\n\n","operationId":"GET_/v1/venues/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueFeature"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueFeature"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get a venues by its ID","tags":["v1"]},"patch":{"description":"controller: `main.PatchVenueById`\n\n---\n\n","operationId":"PATCH_/v1/venues/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/VenueProperties"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueFeature"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueFeature"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Update a venue by ID","tags":["v1"]}}},"servers":[{"description":"local server","url":"http://0.0.0.0:80"}],"tags":[{"name":"v1"}]} \ No newline at end of file +{"openapi":"3.1.0","components":{"requestBodies":{"CommentBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentBody"}},"application/xml":{"schema":{"$ref":"#/components/schemas/CommentBody"}}},"description":"Request body for main.CommentBody","required":true},"SessionProperties":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionProperties"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionProperties"}}},"description":"Request body for types.SessionProperties","required":true},"SessionPropertiesWithVenue":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionPropertiesWithVenue"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionPropertiesWithVenue"}}},"description":"Request body for types.SessionPropertiesWithVenue","required":true},"VenueProperties":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueProperties"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueProperties"}}},"description":"Request body for types.VenueProperties","required":true}},"schemas":{"CommentBody":{"description":"CommentBody schema","properties":{"author":{"type":"string"},"content":{"type":"string"},"session":{"type":"integer"}},"type":"object"},"FeatureCollection[github.com/felix-schott/jamsessions/backend/internal/types.SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionPropertiesWithVenue]]":{"description":"FeatureCollection[github.com/felix-schott/jamsessions/backend/internal/types.SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionPropertiesWithVenue]] schema","properties":{"features":{"items":{"properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"description":{"description":"string schema","type":"string"},"dt_updated_utc":{"format":"date-time","type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"interval":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"rating":{"format":"float","type":"number"},"session_id":{"format":"int32","type":"integer"},"session_name":{"description":"string schema","type":"string"},"session_website":{"description":"string schema","type":"string"},"start_time_utc":{"format":"date-time","type":"string"},"venue":{"format":"int32","type":"integer"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"type":"array"},"type":{"type":"string"}},"type":"object"},"FeatureCollection[github.com/felix-schott/jamsessions/backend/internal/types.VenueFeature]":{"description":"FeatureCollection[github.com/felix-schott/jamsessions/backend/internal/types.VenueFeature] schema","properties":{"features":{"items":{"properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"type":"array"},"type":{"type":"string"}},"type":"object"},"GetCommentsBySessionIdRow":{"description":"GetCommentsBySessionIdRow schema","properties":{"author":{"type":"string"},"comment_id":{"format":"int32","type":"integer"},"content":{"type":"string"},"dt_posted":{"properties":{"InfinityModifier":{"maximum":127,"minimum":-128,"type":"integer"},"Time":{"format":"date-time","type":"string"},"Valid":{"type":"boolean"}},"type":"object"},"rating":{"maximum":32767,"minimum":-32768,"type":"integer"},"session":{"format":"int32","type":"integer"}},"type":"object"},"HTTPError":{"description":"HTTPError schema","properties":{"detail":{"description":"Human readable error message","nullable":true,"type":"string"},"errors":{"items":{"properties":{"more":{"additionalProperties":{},"type":"object"},"name":{"type":"string"},"reason":{"type":"string"}},"type":"object"},"nullable":true,"type":"array"},"instance":{"nullable":true,"type":"string"},"status":{"description":"HTTP status code","example":403,"nullable":true,"type":"integer"},"title":{"description":"Short title of the error","nullable":true,"type":"string"},"type":{"description":"URL of the error type. Can be used to lookup the error in a documentation","nullable":true,"type":"string"}},"type":"object"},"SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionPropertiesWithVenue]":{"description":"SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionPropertiesWithVenue] schema","properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"description":{"description":"string schema","type":"string"},"dt_updated_utc":{"format":"date-time","type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"interval":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"rating":{"format":"float","type":"number"},"session_id":{"format":"int32","type":"integer"},"session_name":{"description":"string schema","type":"string"},"session_website":{"description":"string schema","type":"string"},"start_time_utc":{"format":"date-time","type":"string"},"venue":{"format":"int32","type":"integer"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]":{"description":"SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties] schema","properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"description":{"description":"string schema","type":"string"},"dt_updated_utc":{"format":"date-time","type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"interval":{"description":"string schema","type":"string"},"rating":{"format":"float","type":"number"},"session_id":{"format":"int32","type":"integer"},"session_name":{"description":"string schema","type":"string"},"session_website":{"description":"string schema","type":"string"},"start_time_utc":{"format":"date-time","type":"string"},"venue":{"format":"int32","type":"integer"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"SessionProperties":{"description":"SessionProperties schema","properties":{"description":{"description":"string schema","nullable":true,"type":"string"},"dt_updated_utc":{"format":"date-time","nullable":true,"type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"nullable":true,"type":"integer"},"genres":{"items":{"type":"string"},"nullable":true,"type":"array"},"interval":{"description":"string schema","nullable":true,"type":"string"},"rating":{"format":"float","nullable":true,"type":"number"},"session_id":{"format":"int32","nullable":true,"type":"integer"},"session_name":{"description":"string schema","nullable":true,"type":"string"},"session_website":{"description":"string schema","nullable":true,"type":"string"},"start_time_utc":{"format":"date-time","nullable":true,"type":"string"},"venue":{"format":"int32","nullable":true,"type":"integer"}},"type":"object"},"SessionPropertiesWithVenue":{"description":"SessionPropertiesWithVenue schema","properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"description":{"description":"string schema","type":"string"},"dt_updated_utc":{"format":"date-time","type":"string"},"duration_minutes":{"maximum":32767,"minimum":-32768,"type":"integer"},"genres":{"items":{"type":"string"},"type":"array"},"interval":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"rating":{"format":"float","type":"number"},"session_id":{"format":"int32","type":"integer"},"session_name":{"description":"string schema","type":"string"},"session_website":{"description":"string schema","type":"string"},"start_time_utc":{"format":"date-time","type":"string"},"venue":{"format":"int32","type":"integer"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"VenueFeature":{"description":"VenueFeature schema","properties":{"geometry":{"properties":{"coordinates":{"items":{"format":"double","type":"number"},"type":"array"},"type":{"type":"string"}},"type":"object"},"properties":{"properties":{"address_first_line":{"description":"string schema","type":"string"},"address_second_line":{"description":"string schema","type":"string"},"backline":{"items":{"type":"string"},"type":"array"},"city":{"description":"string schema","type":"string"},"postcode":{"description":"string schema","type":"string"},"venue_comments":{"items":{"type":"string"},"type":"array"},"venue_dt_updated_utc":{"format":"date-time","type":"string"},"venue_id":{"format":"int32","type":"integer"},"venue_name":{"description":"string schema","type":"string"},"venue_website":{"description":"string schema","type":"string"}},"type":"object"},"type":{"type":"string"}},"type":"object"},"VenueProperties":{"description":"VenueProperties schema","properties":{"address_first_line":{"description":"string schema","nullable":true,"type":"string"},"address_second_line":{"description":"string schema","nullable":true,"type":"string"},"backline":{"items":{"type":"string"},"nullable":true,"type":"array"},"city":{"description":"string schema","nullable":true,"type":"string"},"postcode":{"description":"string schema","nullable":true,"type":"string"},"venue_comments":{"items":{"type":"string"},"nullable":true,"type":"array"},"venue_dt_updated_utc":{"format":"date-time","nullable":true,"type":"string"},"venue_id":{"format":"int32","nullable":true,"type":"integer"},"venue_name":{"description":"string schema","nullable":true,"type":"string"},"venue_website":{"description":"string schema","nullable":true,"type":"string"}},"type":"object"},"string":{"description":"string schema","type":"string"},"unknown-interface":{"description":"unknown-interface schema"}}},"info":{"description":"PLACEHOLDER","title":"Jam Sessions","version":"0.0.1"},"paths":{"/v1/":{"get":{"description":"controller: `main.main.func1`\n\n---\n\n","operationId":"GET_/v1/","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/string"}},"application/xml":{"schema":{"$ref":"#/components/schemas/string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"func1","tags":["v1"]}},"/v1/jamsessions":{"get":{"description":"Use '/v1/jamsessions?date=2024-01-30' to list jamsessions happening on a particular date. The result is inferred and may not be accurate, especially for past time frames. Use '/jamsessions?backline=PA,Drums' to filter by backline provided (accepted values: 'PA', 'Drums', 'Guitar_Amp', 'Bass_Amp', 'Microphone', 'MiscPercussion'.","operationId":"GET_/v1/jamsessions","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCollection[github.com/felix-schott/jamsessions/backend/internal/types.SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionPropertiesWithVenue]]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/FeatureCollection[github.com/felix-schott/jamsessions/backend/internal/types.SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionPropertiesWithVenue]]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get all jam sessions","tags":["v1"]},"post":{"description":"controller: `main.PostSession`\n\n---\n\n","operationId":"POST_/v1/jamsessions","requestBody":{"$ref":"#/components/requestBodies/SessionPropertiesWithVenue"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Add a jam session","tags":["v1"]}},"/v1/jamsessions/{id}":{"delete":{"description":"controller: `main.DeleteSessionById`\n\n---\n\n","operationId":"DELETE_/v1/jamsessions/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Delete a jam session by ID","tags":["v1"]},"get":{"description":"controller: `main.GetSessionById`\n\n---\n\n","operationId":"GET_/v1/jamsessions/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionPropertiesWithVenue]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionPropertiesWithVenue]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get a jam session by ID","tags":["v1"]},"patch":{"description":"controller: `main.PatchSessionById`\n\n---\n\n","operationId":"PATCH_/v1/jamsessions/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/SessionProperties"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Update a jam session by ID","tags":["v1"]}},"/v1/jamsessions/{id}/comments":{"get":{"description":"controller: `main.GetCommentsBySessionId`\n\n---\n\n","operationId":"GET_/v1/jamsessions/:id/comments","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GetCommentsBySessionIdRow"},"type":"array"}},"application/xml":{"schema":{"items":{"$ref":"#/components/schemas/GetCommentsBySessionIdRow"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get all comments for a session by ID","tags":["v1"]},"post":{"description":"controller: `main.PostCommentForSessionById`\n\n---\n\n","operationId":"POST_/v1/jamsessions/:id/comments","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/CommentBody"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Post a comment for a session by ID","tags":["v1"]}},"/v1/jamsessions/{id}/suggestions":{"post":{"description":"controller: `main.PostSuggestionsForSessionById`\n\n---\n\n","operationId":"POST_/v1/jamsessions/:id/suggestions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/CommentBody"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/SessionFeature[github.com/felix-schott/jamsessions/backend/internal/types.SessionProperties]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Post feedback/suggest changes for a session by ID","tags":["v1"]}},"/v1/venues":{"get":{"description":"controller: `main.GetVenues`\n\n---\n\n","operationId":"GET_/v1/venues","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCollection[github.com/felix-schott/jamsessions/backend/internal/types.VenueFeature]"}},"application/xml":{"schema":{"$ref":"#/components/schemas/FeatureCollection[github.com/felix-schott/jamsessions/backend/internal/types.VenueFeature]"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get all venues","tags":["v1"]},"post":{"description":"controller: `main.PostVenue`\n\n---\n\n","operationId":"POST_/v1/venues","requestBody":{"$ref":"#/components/requestBodies/VenueProperties"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueFeature"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueFeature"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Add a venue","tags":["v1"]}},"/v1/venues/{id}":{"delete":{"description":"controller: `main.DeleteVenueById`\n\n---\n\n","operationId":"DELETE_/v1/venues/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueFeature"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueFeature"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Delete a venue by ID","tags":["v1"]},"get":{"description":"controller: `main.GetVenueById`\n\n---\n\n","operationId":"GET_/v1/venues/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueFeature"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueFeature"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Get a venues by its ID","tags":["v1"]},"patch":{"description":"controller: `main.PatchVenueById`\n\n---\n\n","operationId":"PATCH_/v1/venues/:id","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/VenueProperties"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VenueFeature"}},"application/xml":{"schema":{"$ref":"#/components/schemas/VenueFeature"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Bad Request _(validation or deserialization error)_"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPError"}}},"description":"Internal Server Error _(panics)_"},"default":{"description":""}},"summary":"Update a venue by ID","tags":["v1"]}}},"servers":[{"description":"local server","url":"http://0.0.0.0:80"}],"tags":[{"name":"v1"}]} \ No newline at end of file diff --git a/backend/go.mod b/backend/go.mod index 14ca6e6..e387d88 100644 --- a/backend/go.mod +++ b/backend/go.mod @@ -1,4 +1,4 @@ -module github.com/felix-schott/london-jam-sessions +module github.com/felix-schott/jamsessions/backend go 1.22.5 diff --git a/backend/internal/db/db_test.go b/backend/internal/db/db_test.go index 06dbbf0..fe85066 100644 --- a/backend/internal/db/db_test.go +++ b/backend/internal/db/db_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/felix-schott/london-jam-sessions/internal/types" + "github.com/felix-schott/jamsessions/backend/internal/types" "github.com/jackc/pgx/v5/pgtype" geom "github.com/twpayne/go-geom" ) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index c619e97..769b245 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -10,22 +10,22 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-node": "^5.2.8", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@sveltejs/kit": "^2.5.27", + "@sveltejs/vite-plugin-svelte": "^4.0.0", "@types/eslint": "^9.6.0", "@types/geojson": "^7946.0.14", "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-svelte": "^2.36.0", + "eslint-plugin-svelte": "^2.45.1", "globals": "^15.0.0", "ol": "^10.1.0", "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "svelte": "^4.2.7", + "prettier-plugin-svelte": "^3.2.6", + "svelte": "^5.0.0", "svelte-check": "^4.0.0", - "typescript": "^5.0.0", + "typescript": "^5.5.0", "typescript-eslint": "^8.0.0", - "vite": "^5.0.3", + "vite": "^5.4.4", "vitest": "^2.1.2" } }, @@ -1145,43 +1145,42 @@ } }, "node_modules/@sveltejs/vite-plugin-svelte": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-3.1.2.tgz", - "integrity": "sha512-Txsm1tJvtiYeLUVRNqxZGKR/mI+CzuIQuc2gn+YCs9rMTowpNZ2Nqt53JdL8KF9bLhAf2ruR/dr9eZCwdTriRA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-4.0.0.tgz", + "integrity": "sha512-kpVJwF+gNiMEsoHaw+FJL76IYiwBikkxYU83+BpqQLdVMff19KeRKLd2wisS8niNBMJ2omv5gG+iGDDwd8jzag==", "dev": true, "license": "MIT", "dependencies": { - "@sveltejs/vite-plugin-svelte-inspector": "^2.1.0", - "debug": "^4.3.4", + "@sveltejs/vite-plugin-svelte-inspector": "^3.0.0-next.0||^3.0.0", + "debug": "^4.3.7", "deepmerge": "^4.3.1", "kleur": "^4.1.5", - "magic-string": "^0.30.10", - "svelte-hmr": "^0.16.0", - "vitefu": "^0.2.5" + "magic-string": "^0.30.12", + "vitefu": "^1.0.3" }, "engines": { - "node": "^18.0.0 || >=20" + "node": "^18.0.0 || ^20.0.0 || >=22" }, "peerDependencies": { - "svelte": "^4.0.0 || ^5.0.0-next.0", + "svelte": "^5.0.0-next.96 || ^5.0.0", "vite": "^5.0.0" } }, "node_modules/@sveltejs/vite-plugin-svelte-inspector": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-2.1.0.tgz", - "integrity": "sha512-9QX28IymvBlSCqsCll5t0kQVxipsfhFFL+L2t3nTWfXnddYwxBuAEtTtlaVQpRz9c37BhJjltSeY4AJSC03SSg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-3.0.1.tgz", + "integrity": "sha512-2CKypmj1sM4GE7HjllT7UKmo4Q6L5xFRd7VMGEWhYnZ+wc6AUVU01IBd7yUi6WnFndEwWoMNOd6e8UjoN0nbvQ==", "dev": true, "license": "MIT", "dependencies": { - "debug": "^4.3.4" + "debug": "^4.3.7" }, "engines": { - "node": "^18.0.0 || >=20" + "node": "^18.0.0 || ^20.0.0 || >=22" }, "peerDependencies": { - "@sveltejs/vite-plugin-svelte": "^3.0.0", - "svelte": "^4.0.0 || ^5.0.0-next.0", + "@sveltejs/vite-plugin-svelte": "^4.0.0-next.0||^4.0.0", + "svelte": "^5.0.0-next.96 || ^5.0.0", "vite": "^5.0.0" } }, @@ -1604,6 +1603,16 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/acorn-typescript": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/acorn-typescript/-/acorn-typescript-1.4.13.tgz", + "integrity": "sha512-xsc9Xv0xlVfwp2o7sQ+GCQ1PgbkdcpWdTzrwXxO3xDMTAywVS3oXVOcOHuRjAPkS4P9b+yc/qNF15460v+jp4Q==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": ">=8.9.0" + } + }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -1785,20 +1794,6 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/code-red": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", - "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15", - "@types/estree": "^1.0.1", - "acorn": "^8.10.0", - "estree-walker": "^3.0.3", - "periscopic": "^3.1.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1896,20 +1891,6 @@ "node": ">= 8" } }, - "node_modules/css-tree": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", - "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", - "dev": true, - "license": "MIT", - "dependencies": { - "mdn-data": "2.0.30", - "source-map-js": "^1.0.1" - }, - "engines": { - "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" - } - }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -2125,9 +2106,9 @@ } }, "node_modules/eslint-plugin-svelte": { - "version": "2.44.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.44.1.tgz", - "integrity": "sha512-w6wkoJPw1FJKFtM/2oln21rlu5+HTd2CSkkzhm32A+trNoW2EYQqTQAbDTU6k2GI/6Vh64rBHYQejqEgDld7fw==", + "version": "2.46.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.46.0.tgz", + "integrity": "sha512-1A7iEMkzmCZ9/Iz+EAfOGYL8IoIG6zeKEq1SmpxGeM5SXmoQq+ZNnCpXFVJpsxPWYx8jIVGMerQMzX20cqUl0g==", "dev": true, "license": "MIT", "dependencies": { @@ -2135,13 +2116,13 @@ "@jridgewell/sourcemap-codec": "^1.4.15", "eslint-compat-utils": "^0.5.1", "esutils": "^2.0.3", - "known-css-properties": "^0.34.0", + "known-css-properties": "^0.35.0", "postcss": "^8.4.38", "postcss-load-config": "^3.1.4", "postcss-safe-parser": "^6.0.0", "postcss-selector-parser": "^6.1.0", "semver": "^7.6.2", - "svelte-eslint-parser": "^0.41.1" + "svelte-eslint-parser": "^0.43.0" }, "engines": { "node": "^14.17.0 || >=16.0.0" @@ -2151,7 +2132,7 @@ }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0-0 || ^9.0.0-0", - "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0-next.191" + "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" }, "peerDependenciesMeta": { "svelte": { @@ -2227,6 +2208,17 @@ "node": ">=0.10" } }, + "node_modules/esrap": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-1.2.2.tgz", + "integrity": "sha512-F2pSJklxx1BlQIQgooczXCPHmcWpn6EsP5oo73LQfonG9fIlIENQ8vMmfGXeojP9MrkzUNAfyU5vdFlR9shHAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15", + "@types/estree": "^1.0.1" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -2701,9 +2693,9 @@ } }, "node_modules/known-css-properties": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.34.0.tgz", - "integrity": "sha512-tBECoUqNFbyAY4RrbqsBQqDFpGXAEbdD5QKr8kACx3+rnArmuuR22nKQWKazvp07N9yjTyDZaw/20UIH8tL9DQ==", + "version": "0.35.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.35.0.tgz", + "integrity": "sha512-a/RAk2BfKk+WFGhhOCAYqSiFLc34k8Mt/6NWRI4joER0EYUzXIcFivjjnoD3+XU1DggLn/tZc3DOAgke7l8a4A==", "dev": true, "license": "MIT" }, @@ -2785,13 +2777,6 @@ "@jridgewell/sourcemap-codec": "^1.5.0" } }, - "node_modules/mdn-data": { - "version": "2.0.30", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", - "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", - "dev": true, - "license": "CC0-1.0" - }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -3049,18 +3034,6 @@ "pbf": "bin/pbf" } }, - "node_modules/periscopic": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", - "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0", - "estree-walker": "^3.0.0", - "is-reference": "^3.0.0" - } - }, "node_modules/picocolors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", @@ -3568,29 +3541,28 @@ } }, "node_modules/svelte": { - "version": "4.2.19", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz", - "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.1.4.tgz", + "integrity": "sha512-qgHDV7AyvBZa2pbf+V0tnvWrN1LKD8LdUsBkR/SSYVVN6zXexiXnOy5Pjcjft2y/2NJJVa8ORUHFVn3oiWCLVQ==", "dev": true, "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.2.1", - "@jridgewell/sourcemap-codec": "^1.4.15", - "@jridgewell/trace-mapping": "^0.3.18", - "@types/estree": "^1.0.1", - "acorn": "^8.9.0", - "aria-query": "^5.3.0", - "axobject-query": "^4.0.0", - "code-red": "^1.0.3", - "css-tree": "^2.3.1", - "estree-walker": "^3.0.3", - "is-reference": "^3.0.1", + "@ampproject/remapping": "^2.3.0", + "@jridgewell/sourcemap-codec": "^1.5.0", + "@types/estree": "^1.0.5", + "acorn": "^8.12.1", + "acorn-typescript": "^1.4.13", + "aria-query": "^5.3.1", + "axobject-query": "^4.1.0", + "esm-env": "^1.0.0", + "esrap": "^1.2.2", + "is-reference": "^3.0.2", "locate-character": "^3.0.0", - "magic-string": "^0.30.4", - "periscopic": "^3.1.0" + "magic-string": "^0.30.11", + "zimmerframe": "^1.1.2" }, "engines": { - "node": ">=16" + "node": ">=18" } }, "node_modules/svelte-check": { @@ -3618,9 +3590,9 @@ } }, "node_modules/svelte-eslint-parser": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.41.1.tgz", - "integrity": "sha512-08ndI6zTghzI8SuJAFpvMbA/haPSGn3xz19pjre19yYMw8Nw/wQJ2PrZBI/L8ijGTgtkWCQQiLLy+Z1tfaCwNA==", + "version": "0.43.0", + "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.43.0.tgz", + "integrity": "sha512-GpU52uPKKcVnh8tKN5P4UZpJ/fUDndmq7wfsvoVXsyP+aY0anol7Yqo01fyrlaWGMFfm4av5DyrjlaXdLRJvGA==", "dev": true, "license": "MIT", "dependencies": { @@ -3637,7 +3609,7 @@ "url": "https://github.com/sponsors/ota-meshi" }, "peerDependencies": { - "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0-next.191" + "svelte": "^3.37.0 || ^4.0.0 || ^5.0.0" }, "peerDependenciesMeta": { "svelte": { @@ -3693,19 +3665,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/svelte-hmr": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.16.0.tgz", - "integrity": "sha512-Gyc7cOS3VJzLlfj7wKS0ZnzDVdv3Pn2IuVeJPk9m2skfhcu5bq3wtIZyQGggr7/Iim5rH5cncyQft/kRLupcnA==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^12.20 || ^14.13.1 || >= 16" - }, - "peerDependencies": { - "svelte": "^3.19.0 || ^4.0.0" - } - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -3955,13 +3914,17 @@ } }, "node_modules/vitefu": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz", - "integrity": "sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.3.tgz", + "integrity": "sha512-iKKfOMBHob2WxEJbqbJjHAkmYgvFDPhuqrO82om83S8RLk+17FtyMBfcyeH8GqD0ihShtkMW/zzJgiA51hCNCQ==", "dev": true, "license": "MIT", + "workspaces": [ + "tests/deps/*", + "tests/projects/*" + ], "peerDependencies": { - "vite": "^3.0.0 || ^4.0.0 || ^5.0.0" + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0-beta.0" }, "peerDependenciesMeta": { "vite": { @@ -4114,6 +4077,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/zimmerframe": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/zimmerframe/-/zimmerframe-1.1.2.tgz", + "integrity": "sha512-rAbqEGa8ovJy4pyBxZM70hg4pE6gDgaQ0Sl9M3enG3I0d6H4XSAM3GeNGLKnsBpuijUow064sf7ww1nutC5/3w==", + "dev": true, + "license": "MIT" + }, "node_modules/zstddec": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/zstddec/-/zstddec-0.1.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 407df91..ff38c0d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,22 +15,22 @@ "devDependencies": { "@sveltejs/adapter-auto": "^3.0.0", "@sveltejs/adapter-node": "^5.2.8", - "@sveltejs/kit": "^2.0.0", - "@sveltejs/vite-plugin-svelte": "^3.0.0", + "@sveltejs/kit": "^2.5.27", + "@sveltejs/vite-plugin-svelte": "^4.0.0", "@types/eslint": "^9.6.0", "@types/geojson": "^7946.0.14", "eslint": "^9.0.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-svelte": "^2.36.0", + "eslint-plugin-svelte": "^2.45.1", "globals": "^15.0.0", "ol": "^10.1.0", "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", - "svelte": "^4.2.7", + "prettier-plugin-svelte": "^3.2.6", + "svelte": "^5.0.0", "svelte-check": "^4.0.0", - "typescript": "^5.0.0", + "typescript": "^5.5.0", "typescript-eslint": "^8.0.0", - "vite": "^5.0.3", + "vite": "^5.4.4", "vitest": "^2.1.2" }, "type": "module" diff --git a/frontend/src/lib/AddSessionPopup.svelte b/frontend/src/lib/AddSessionPopup.svelte index 15d6a7e..f0e93de 100644 --- a/frontend/src/lib/AddSessionPopup.svelte +++ b/frontend/src/lib/AddSessionPopup.svelte @@ -8,47 +8,51 @@ Genre, Interval, type SessionProperties, - type VenueProperties + type VenueProperties, + + type VenuesFeatureCollection + } from '../types'; import InfoIcon from './icons/InfoIcon.svelte'; import { constructIntervalString, minutesBetweenTimestamps } from './timeUtils'; - let venueId: string; - let form: HTMLFormElement; + let venueId: string = $state(''); + let form: HTMLFormElement | undefined = $state(); - let sessionName: string; - let sessionTimeStart: string; - let sessionTimeFinish: string; - let sessionDescription: string; - let sessionWebsite: string; - let sessionInterval: Interval; - let sessionDate: string; - let venueName: string; - let venueAddress1: string; - let venueAddress2: string; - let venueCity: string; - let venuePostcode: string; - let venueWebsite: string; + let sessionName: string = $state(''); + let sessionTimeStart: string = $state(''); + let sessionTimeFinish: string = $state(''); + let sessionDescription: string = $state(''); + let sessionWebsite: string = $state(''); + let sessionInterval: Interval | undefined = $state(); + let sessionDate: string = $state(''); + let venueName: string = $state(''); + let venueAddress1: string = $state(''); + let venueAddress2: string = $state(''); + let venueCity: string = $state(''); + let venuePostcode: string = $state(''); + let venueWebsite: string = $state(''); let venueParams: VenueProperties; - let venuesLoaded: boolean = false; + let venuesLoaded: boolean = $state(false); - $: newVenueHidden = venueId != 'new-venue' && venuesLoaded; - $: buttonDisabled = - !sessionName && !sessionTimeStart && !sessionTimeFinish && !sessionDescription; + let newVenueHidden = $derived(venueId != 'new-venue' && venuesLoaded); + let buttonDisabled = $derived( + !sessionName && !sessionTimeStart && !sessionTimeFinish && !sessionDescription + ); - // small wrapper around getVenues for better state management + // small wrapper around getVenues for better state management // (venuesLoaded controls whether the menu to add a venue is shown) const getVenuesContext = async () => { const venues = await getVenues(); if (venues && venues.features) { venuesLoaded = true; - return venues + return venues; } venuesLoaded = false; - return [] - } + return []; + }; const onSubmit = async (ev: MouseEvent) => { ev.preventDefault(); @@ -88,7 +92,7 @@ let sessionParams: SessionProperties = { session_name: sessionName, description: sessionDescription, - interval: sessionInterval, + interval: sessionInterval!, start_time_utc: new Date(sessionDate).toISOString(), duration_minutes: minutesBetweenTimestamps(sessionTimeStart, sessionTimeFinish), genres: Array.from(document.querySelectorAll('.genre-checkbox:checked')).map( @@ -101,7 +105,9 @@ Object.assign(sessionParams, venueParams); // merge venue and session params - postSession can handle a new venue too } await postSession(sessionParams); - alert('Thank you for submitting a new session! We\'ll review your suggestions and apply the changes. If there is anything else, you can email felix.schott@proton.me') + alert( + "Thank you for submitting a new session! We'll review your suggestions and apply the changes. If there is anything else, you can email felix.schott@proton.me" + ); $addSessionPopupVisible = false; } catch (e) { alert( @@ -112,193 +118,195 @@ {#await getVenuesContext() then venues} - $addSessionPopupVisible} - hide={() => { - $addSessionPopupVisible = false; - }} - > -
-

Add new session to the database

-
-

Venue

- {#if venuesLoaded} - + {#each (venues as VenuesFeatureCollection).features as venue, idx} + {#if idx === 0} + + {:else} + + {/if} + {/each} + + + {/if} +
+
+
+ Add new venue to the database +
+ + + + + + - {:else} - - {/if} - {/each} - - - {/if} -
-
-
- Add new venue to the database
- - - - -
+
+
+
+

Session details

+
+ -
+
- Backline provided + Main genre(s)
- {#each Object.values(Backline) as backline} - + {#each Object.values(Genre) as genre} + {#if genre != 'ANY'} + + {/if} {/each}
-
-
-
-

Session details

-
- -
- - - + -
How often does the session happen?
-
-
diff --git a/frontend/src/lib/SessionPopup.svelte b/frontend/src/lib/SessionPopup.svelte index 11ea317..39450c5 100644 --- a/frontend/src/lib/SessionPopup.svelte +++ b/frontend/src/lib/SessionPopup.svelte @@ -4,7 +4,13 @@ import TimeIcon from './icons/TimeIcon.svelte'; import FileTrayIcon from './icons/FileTrayIcon.svelte'; - export let propertiesList: SessionPropertiesWithVenue[]; + interface Props { + propertiesList: SessionPropertiesWithVenue[]; + onclick?: () => any; + onclose: () => any; + } + + let { propertiesList, onclick, onclose }: Props = $props(); let id = 'popup-session-' + propertiesList.map((i) => i.session_id).join('-'); // : "venue-" + properties.venue_id}`; @@ -15,67 +21,73 @@ {#if propertiesList.length == 1} - - onClick(propertiesList[0].session_id)}> - {propertiesList[0].session_name} at {propertiesList[0].venue_name} - - -
onClick(propertiesList[0].session_id)} - > -
- - {new Date(propertiesList[0].start_time_utc).toLocaleTimeString()} - - {new Date( - new Date(propertiesList[0].start_time_utc).getTime() + - propertiesList[0].duration_minutes * 60000 - ).toLocaleTimeString()} - -
-
- - {propertiesList[0].genres.map((i) => i.replace('_', ' ')).join(', ')} - + + {#snippet heading()} + onClick(propertiesList[0].session_id!)}> + {propertiesList[0].session_name} at {propertiesList[0].venue_name} + + {/snippet} + {#snippet content()} + +
onClick(propertiesList[0].session_id!)} + > +
+ + {new Date(propertiesList[0].start_time_utc).toLocaleTimeString()} - + {new Date( + new Date(propertiesList[0].start_time_utc).getTime() + + propertiesList[0].duration_minutes * 60000 + ).toLocaleTimeString()} + +
+
+ + {propertiesList[0].genres.map((i) => i.replace('_', ' ')).join(', ')} + +
-
- + + {/snippet} {:else} - - + + {#snippet heading()}
{propertiesList[0].venue_name}
-
- -
- {#each propertiesList as properties, idx} - onClick(properties.session_id)}> -
- {properties.session_name}
- - {new Date(properties.start_time_utc).toLocaleTimeString()} - - {new Date( - new Date(properties.start_time_utc).getTime() + - properties.duration_minutes * 60000 - ).toLocaleTimeString()} - -
-
- - {properties.genres.map((i) => i.replace('_', ' ')).join(', ')} - -
-
- View more ... -
- -
- {/each} -
-
+ {/snippet} + {#snippet content()} + +
+ {#each propertiesList as properties, idx} + onClick(properties.session_id!)}> +
+ {properties.session_name}
+ + {new Date(properties.start_time_utc).toLocaleTimeString()} - + {new Date( + new Date(properties.start_time_utc).getTime() + + properties.duration_minutes * 60000 + ).toLocaleTimeString()} + +
+
+ + {properties.genres.map((i) => i.replace('_', ' ')).join(', ')} + +
+
+ View more ... +
+ +
+ {/each} +
+
+ {/snippet}
{/if} diff --git a/frontend/src/lib/VenuePopup.svelte b/frontend/src/lib/VenuePopup.svelte deleted file mode 100644 index 4ec2687..0000000 --- a/frontend/src/lib/VenuePopup.svelte +++ /dev/null @@ -1,14 +0,0 @@ - - - - - ${properties.venue_name} - - \ No newline at end of file diff --git a/frontend/src/lib/WindowControlButton.svelte b/frontend/src/lib/WindowControlButton.svelte index 0be4069..71bafd8 100644 --- a/frontend/src/lib/WindowControlButton.svelte +++ b/frontend/src/lib/WindowControlButton.svelte @@ -8,12 +8,18 @@ --> -