diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca5cb57..60c2305 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,7 +78,7 @@ jobs: run: uv run ruff format --check - name: Run ty type checker - run: uvx ty check src packages/pretalx-client/src + run: uv run ty check src packages/pretalx-client/src test-smoke: name: Test Smoke (3.14/Django ${{ matrix.django }}/${{ matrix.os }}) diff --git a/Makefile b/Makefile index 4a69053..d865e99 100644 --- a/Makefile +++ b/Makefile @@ -118,6 +118,8 @@ pretalx-codegen: ## Full codegen pipeline (validate + models + HTTP client) @$(UV) run python scripts/pretalx/validate_schema.py @$(UV) run python scripts/pretalx/generate_client.py @$(UV) run python scripts/pretalx/generate_http_client.py + @$(UV) run ruff format packages/pretalx-client/src/pretalx_client/generated/ + @$(UV) run ruff check --fix packages/pretalx-client/src/pretalx_client/generated/ pretalx-sync-schema: pretalx-codegen ## Alias for pretalx-codegen (used by CI workflow) diff --git a/packages/pretalx-client/src/pretalx_client/generated/http_client.py b/packages/pretalx-client/src/pretalx_client/generated/http_client.py index 623918c..47af04b 100644 --- a/packages/pretalx-client/src/pretalx_client/generated/http_client.py +++ b/packages/pretalx-client/src/pretalx_client/generated/http_client.py @@ -166,11 +166,22 @@ def _paginate_or_none( logger.debug("Collected %d results from paginated endpoint", len(results)) return results + # =================================================================== # access-codes # =================================================================== - def access_codes_list(self, event: str, *, expand: list[str] | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def access_codes_list( + self, + event: str, + *, + expand: list[str] | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -213,13 +224,27 @@ def access_codes_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/access-codes/{id}/" self._request("DELETE", path, params=params) - return None + return # =================================================================== # answers # =================================================================== - def answers_list(self, event: str, *, expand: list[str] | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, person: str | None = None, q: str | None = None, question: str | None = None, review: str | None = None, submission: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def answers_list( + self, + event: str, + *, + expand: list[str] | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + person: str | None = None, + q: str | None = None, + question: str | None = None, + review: str | None = None, + submission: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -270,9 +295,23 @@ def answers_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/answers/{id}/" self._request("DELETE", path, params=params) - return None + return - def answers_log_list(self, event: str, id: int, *, o: str | None = None, page: int | None = None, page_size: int | None = None, person: str | None = None, q: str | None = None, question: str | None = None, review: str | None = None, submission: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def answers_log_list( + self, + event: str, + id: int, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + person: str | None = None, + q: str | None = None, + question: str | None = None, + review: str | None = None, + submission: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -299,7 +338,9 @@ def answers_log_list(self, event: str, id: int, *, o: str | None = None, page: i # events # =================================================================== - def api_events_list(self, *, is_public: bool | None = None, o: str | None = None, q: str | None = None) -> dict[str, Any]: + def api_events_list( + self, *, is_public: bool | None = None, o: str | None = None, q: str | None = None + ) -> dict[str, Any]: params: dict[str, Any] = {} if is_public is not None: params["is_public"] = is_public @@ -307,7 +348,7 @@ def api_events_list(self, *, is_public: bool | None = None, o: str | None = None params["o"] = o if q is not None: params["q"] = q - path = f"/api/events/" + path = "/api/events/" return self._request("GET", path, params=params or None) def root_retrieve(self, event: str) -> dict[str, Any]: @@ -319,7 +360,18 @@ def root_retrieve(self, event: str) -> dict[str, Any]: # feedback # =================================================================== - def feedback_list(self, event: str, *, expand: list[str] | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, submission: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def feedback_list( + self, + event: str, + *, + expand: list[str] | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + submission: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -354,7 +406,7 @@ def feedback_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/feedback/{id}/" self._request("DELETE", path, params=params) - return None + return # =================================================================== # file-uploads @@ -362,14 +414,23 @@ def feedback_destroy(self, event: str, id: int) -> None: def file_upload(self) -> dict[str, Any]: params = None - path = f"/api/upload/" + path = "/api/upload/" return self._request("POST", path, params=params or None) # =================================================================== # mail-templates # =================================================================== - def mail_templates_list(self, event: str, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def mail_templates_list( + self, + event: str, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -399,7 +460,9 @@ def mail_templates_update(self, event: str, id: int, *, body: dict[str, Any] | N path = f"/api/events/{event}/mail-templates/{id}/" return self._request("PUT", path, params=params or None, json_body=body) - def mail_templates_partial_update(self, event: str, id: int, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def mail_templates_partial_update( + self, event: str, id: int, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/mail-templates/{id}/" return self._request("PATCH", path, params=params or None, json_body=body) @@ -408,9 +471,19 @@ def mail_templates_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/mail-templates/{id}/" self._request("DELETE", path, params=params) - return None + return - def mail_templates_log_list(self, event: str, id: int, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def mail_templates_log_list( + self, + event: str, + id: int, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -429,7 +502,18 @@ def mail_templates_log_list(self, event: str, id: int, *, o: str | None = None, # question-options # =================================================================== - def question_options_list(self, event: str, *, expand: list[str] | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, question: int | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def question_options_list( + self, + event: str, + *, + expand: list[str] | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + question: int | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -465,7 +549,9 @@ def question_options_update(self, event: str, id: int, *, body: dict[str, Any] | path = f"/api/events/{event}/question-options/{id}/" return self._request("PUT", path, params=params or None, json_body=body) - def question_options_partial_update(self, event: str, id: int, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def question_options_partial_update( + self, event: str, id: int, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/question-options/{id}/" return self._request("PATCH", path, params=params or None, json_body=body) @@ -474,9 +560,20 @@ def question_options_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/question-options/{id}/" self._request("DELETE", path, params=params) - return None + return - def question_options_log_list(self, event: str, id: int, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, question: int | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def question_options_log_list( + self, + event: str, + id: int, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + question: int | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -497,7 +594,21 @@ def question_options_log_list(self, event: str, id: int, *, o: str | None = None # questions # =================================================================== - def questions_list(self, event: str, *, expand: list[str] | None = None, is_public: bool | None = None, is_visible_to_reviewers: bool | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, target: str | None = None, variant: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def questions_list( + self, + event: str, + *, + expand: list[str] | None = None, + is_public: bool | None = None, + is_visible_to_reviewers: bool | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + target: str | None = None, + variant: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -548,14 +659,28 @@ def questions_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/questions/{id}/" self._request("DELETE", path, params=params) - return None + return def questions_icon_retrieve(self, event: str, id: int) -> dict[str, Any]: params = None path = f"/api/events/{event}/questions/{id}/icon/" return self._request("GET", path, params=params or None) - def questions_log_list(self, event: str, id: int, *, is_public: bool | None = None, is_visible_to_reviewers: bool | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, target: str | None = None, variant: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def questions_log_list( + self, + event: str, + id: int, + *, + is_public: bool | None = None, + is_visible_to_reviewers: bool | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + target: str | None = None, + variant: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if is_public is not None: params["is_public"] = is_public @@ -582,7 +707,25 @@ def questions_log_list(self, event: str, id: int, *, is_public: bool | None = No # reviews # =================================================================== - def reviews_list(self, event: str, *, expand: list[str] | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, speaker: str | None = None, submission: str | None = None, submission__content_locale: str | None = None, submission__pending_state: list[str] | None = None, submission__state: list[str] | None = None, submission__submission_type: int | None = None, submission__track: int | None = None, user: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def reviews_list( + self, + event: str, + *, + expand: list[str] | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + speaker: str | None = None, + submission: str | None = None, + submission__content_locale: str | None = None, + submission__pending_state: list[str] | None = None, + submission__state: list[str] | None = None, + submission__submission_type: int | None = None, + submission__track: int | None = None, + user: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -641,9 +784,27 @@ def reviews_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/reviews/{id}/" self._request("DELETE", path, params=params) - return None + return - def reviews_log_list(self, event: str, id: int, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, speaker: str | None = None, submission: str | None = None, submission__content_locale: str | None = None, submission__pending_state: list[str] | None = None, submission__state: list[str] | None = None, submission__submission_type: int | None = None, submission__track: int | None = None, user: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def reviews_log_list( + self, + event: str, + id: int, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + speaker: str | None = None, + submission: str | None = None, + submission__content_locale: str | None = None, + submission__pending_state: list[str] | None = None, + submission__state: list[str] | None = None, + submission__submission_type: int | None = None, + submission__track: int | None = None, + user: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -678,7 +839,16 @@ def reviews_log_list(self, event: str, id: int, *, o: str | None = None, page: i # rooms # =================================================================== - def rooms_list(self, event: str, *, limit: int | None = None, o: str | None = None, offset: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def rooms_list( + self, + event: str, + *, + limit: int | None = None, + o: str | None = None, + offset: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if limit is not None: params["limit"] = limit @@ -717,9 +887,19 @@ def rooms_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/rooms/{id}/" self._request("DELETE", path, params=params) - return None + return - def rooms_log_list(self, event: str, id: int, *, limit: int | None = None, o: str | None = None, offset: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def rooms_log_list( + self, + event: str, + id: int, + *, + limit: int | None = None, + o: str | None = None, + offset: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if limit is not None: params["limit"] = limit @@ -740,14 +920,23 @@ def rooms_log_list(self, event: str, id: int, *, limit: int | None = None, o: st def api_retrieve(self) -> dict[str, Any]: params = None - path = f"/api/" + path = "/api/" return self._request("GET", path, params=params or None) # =================================================================== # schedules # =================================================================== - def schedules_list(self, event: str, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def schedules_list( + self, + event: str, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -762,7 +951,9 @@ def schedules_list(self, event: str, *, o: str | None = None, page: int | None = return self._paginate(path, params=params or None) return self._request("GET", path, params=params or None) - def schedules_by_version_retrieve(self, event: str, *, latest: bool | None = None, version: str | None = None) -> dict[str, Any]: + def schedules_by_version_retrieve( + self, event: str, *, latest: bool | None = None, version: str | None = None + ) -> dict[str, Any]: params: dict[str, Any] = {} if latest is not None: params["latest"] = latest @@ -783,7 +974,9 @@ def schedules_retrieve(self, event: str, id: str, *, expand: list[str] | None = path = f"/api/events/{event}/schedules/{id}/" return self._request("GET", path, params=params or None) - def schedules_exporters_retrieve(self, event: str, id: str, name: str, *, lang: str | None = None) -> dict[str, Any]: + def schedules_exporters_retrieve( + self, event: str, id: str, name: str, *, lang: str | None = None + ) -> dict[str, Any]: params: dict[str, Any] = {} if lang is not None: params["lang"] = lang @@ -794,7 +987,23 @@ def schedules_exporters_retrieve(self, event: str, id: str, name: str, *, lang: # slots # =================================================================== - def slots_list(self, event: str, *, expand: list[str] | None = None, is_visible: bool | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, room: int | None = None, schedule: int | None = None, schedule_version: str | None = None, speaker: str | None = None, submission: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def slots_list( + self, + event: str, + *, + expand: list[str] | None = None, + is_visible: bool | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + room: int | None = None, + schedule: int | None = None, + schedule_version: str | None = None, + speaker: str | None = None, + submission: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -849,7 +1058,17 @@ def slots_ical_retrieve(self, event: str, id: int) -> dict[str, Any]: # speaker-information # =================================================================== - def speaker_information_list(self, event: str, *, expand: list[str] | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def speaker_information_list( + self, + event: str, + *, + expand: list[str] | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -883,7 +1102,9 @@ def speaker_information_update(self, event: str, id: int, *, body: dict[str, Any path = f"/api/events/{event}/speaker-information/{id}/" return self._request("PUT", path, params=params or None, json_body=body) - def speaker_information_partial_update(self, event: str, id: int, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def speaker_information_partial_update( + self, event: str, id: int, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/speaker-information/{id}/" return self._request("PATCH", path, params=params or None, json_body=body) @@ -892,9 +1113,19 @@ def speaker_information_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/speaker-information/{id}/" self._request("DELETE", path, params=params) - return None + return - def speaker_information_log_list(self, event: str, id: int, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def speaker_information_log_list( + self, + event: str, + id: int, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -913,7 +1144,16 @@ def speaker_information_log_list(self, event: str, id: int, *, o: str | None = N # speakers # =================================================================== - def speakers_list(self, event: str, *, expand: list[str] | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def speakers_list( + self, + event: str, + *, + expand: list[str] | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -928,19 +1168,25 @@ def speakers_list(self, event: str, *, expand: list[str] | None = None, page: in return self._paginate(path, params=params or None) return self._request("GET", path, params=params or None) - def speakers_retrieve(self, event: str, user__code__iexact: str, *, expand: list[str] | None = None) -> dict[str, Any]: + def speakers_retrieve( + self, event: str, user__code__iexact: str, *, expand: list[str] | None = None + ) -> dict[str, Any]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand path = f"/api/events/{event}/speakers/{user__code__iexact}/" return self._request("GET", path, params=params or None) - def speakers_update(self, event: str, user__code__iexact: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def speakers_update( + self, event: str, user__code__iexact: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/speakers/{user__code__iexact}/" return self._request("PUT", path, params=params or None, json_body=body) - def speakers_partial_update(self, event: str, user__code__iexact: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def speakers_partial_update( + self, event: str, user__code__iexact: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/speakers/{user__code__iexact}/" return self._request("PATCH", path, params=params or None, json_body=body) @@ -949,7 +1195,16 @@ def speakers_partial_update(self, event: str, user__code__iexact: str, *, body: # submission-types # =================================================================== - def submission_types_list(self, event: str, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def submission_types_list( + self, + event: str, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -979,7 +1234,9 @@ def submission_types_update(self, event: str, id: int, *, body: dict[str, Any] | path = f"/api/events/{event}/submission-types/{id}/" return self._request("PUT", path, params=params or None, json_body=body) - def submission_types_partial_update(self, event: str, id: int, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submission_types_partial_update( + self, event: str, id: int, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submission-types/{id}/" return self._request("PATCH", path, params=params or None, json_body=body) @@ -988,9 +1245,19 @@ def submission_types_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/submission-types/{id}/" self._request("DELETE", path, params=params) - return None + return - def submission_types_log_list(self, event: str, id: int, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def submission_types_log_list( + self, + event: str, + id: int, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -1009,7 +1276,23 @@ def submission_types_log_list(self, event: str, id: int, *, o: str | None = None # submissions # =================================================================== - def submissions_list(self, event: str, *, content_locale: str | None = None, expand: list[str] | None = None, is_featured: bool | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, pending_state: list[str] | None = None, q: str | None = None, state: list[str] | None = None, submission_type: int | None = None, track: int | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def submissions_list( + self, + event: str, + *, + content_locale: str | None = None, + expand: list[str] | None = None, + is_featured: bool | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + pending_state: list[str] | None = None, + q: str | None = None, + state: list[str] | None = None, + submission_type: int | None = None, + track: int | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if content_locale is not None: params["content_locale"] = content_locale @@ -1055,12 +1338,16 @@ def submissions_retrieve(self, code__iexact: str, event: str, *, expand: list[st path = f"/api/events/{event}/submissions/{code__iexact}/" return self._request("GET", path, params=params or None) - def submissions_update(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_update( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/" return self._request("PUT", path, params=params or None, json_body=body) - def submissions_partial_update(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_partial_update( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/" return self._request("PATCH", path, params=params or None, json_body=body) @@ -1069,29 +1356,39 @@ def submissions_destroy(self, code__iexact: str, event: str) -> None: params = None path = f"/api/events/{event}/submissions/{code__iexact}/" self._request("DELETE", path, params=params) - return None + return - def submissions_accept_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_accept_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/accept/" return self._request("POST", path, params=params or None, json_body=body) - def submissions_add_speaker_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_add_speaker_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/add-speaker/" return self._request("POST", path, params=params or None, json_body=body) - def submissions_cancel_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_cancel_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/cancel/" return self._request("POST", path, params=params or None, json_body=body) - def submissions_confirm_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_confirm_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/confirm/" return self._request("POST", path, params=params or None, json_body=body) - def submissions_invitations_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_invitations_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/invitations/" return self._request("POST", path, params=params or None, json_body=body) @@ -1100,9 +1397,25 @@ def submissions_invitations_destroy(self, code__iexact: str, event: str, invitat params = None path = f"/api/events/{event}/submissions/{code__iexact}/invitations/{invitation_id}/" self._request("DELETE", path, params=params) - return None + return - def submissions_log_list(self, code__iexact: str, event: str, *, content_locale: str | None = None, is_featured: bool | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, pending_state: list[str] | None = None, q: str | None = None, state: list[str] | None = None, submission_type: int | None = None, track: int | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def submissions_log_list( + self, + code__iexact: str, + event: str, + *, + content_locale: str | None = None, + is_featured: bool | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + pending_state: list[str] | None = None, + q: str | None = None, + state: list[str] | None = None, + submission_type: int | None = None, + track: int | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if content_locale is not None: params["content_locale"] = content_locale @@ -1129,22 +1442,30 @@ def submissions_log_list(self, code__iexact: str, event: str, *, content_locale: return self._paginate(path, params=params or None) return self._request("GET", path, params=params or None) - def submissions_make_submitted_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_make_submitted_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/make-submitted/" return self._request("POST", path, params=params or None, json_body=body) - def submissions_reject_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_reject_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/reject/" return self._request("POST", path, params=params or None, json_body=body) - def submissions_remove_speaker_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_remove_speaker_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/remove-speaker/" return self._request("POST", path, params=params or None, json_body=body) - def submissions_resources_create(self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def submissions_resources_create( + self, code__iexact: str, event: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/events/{event}/submissions/{code__iexact}/resources/" return self._request("POST", path, params=params or None, json_body=body) @@ -1153,7 +1474,7 @@ def submissions_resources_destroy(self, code__iexact: str, event: str, resource_ params = None path = f"/api/events/{event}/submissions/{code__iexact}/resources/{resource_id}/" self._request("DELETE", path, params=params) - return None + return def submissions_favourite_create(self, code: str, event: str) -> dict[str, Any]: params = None @@ -1164,13 +1485,22 @@ def submissions_favourite_destroy(self, code: str, event: str) -> None: params = None path = f"/api/events/{event}/submissions/{code}/favourite/" self._request("DELETE", path, params=params) - return None + return # =================================================================== # tags # =================================================================== - def tags_list(self, event: str, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def tags_list( + self, + event: str, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -1209,9 +1539,19 @@ def tags_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/tags/{id}/" self._request("DELETE", path, params=params) - return None + return - def tags_log_list(self, event: str, id: int, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def tags_log_list( + self, + event: str, + id: int, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -1230,7 +1570,17 @@ def tags_log_list(self, event: str, id: int, *, o: str | None = None, page: int # teams # =================================================================== - def api_organisers_teams_list(self, organiser: str, *, expand: list[str] | None = None, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def api_organisers_teams_list( + self, + organiser: str, + *, + expand: list[str] | None = None, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand @@ -1252,19 +1602,25 @@ def api_organisers_teams_create(self, organiser: str, *, body: dict[str, Any] | path = f"/api/organisers/{organiser}/teams/" return self._request("POST", path, params=params or None, json_body=body) - def api_organisers_teams_retrieve(self, id: int, organiser: str, *, expand: list[str] | None = None) -> dict[str, Any]: + def api_organisers_teams_retrieve( + self, id: int, organiser: str, *, expand: list[str] | None = None + ) -> dict[str, Any]: params: dict[str, Any] = {} if expand is not None: params["expand"] = expand path = f"/api/organisers/{organiser}/teams/{id}/" return self._request("GET", path, params=params or None) - def api_organisers_teams_update(self, id: int, organiser: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def api_organisers_teams_update( + self, id: int, organiser: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/organisers/{organiser}/teams/{id}/" return self._request("PUT", path, params=params or None, json_body=body) - def api_organisers_teams_partial_update(self, id: int, organiser: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def api_organisers_teams_partial_update( + self, id: int, organiser: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/organisers/{organiser}/teams/{id}/" return self._request("PATCH", path, params=params or None, json_body=body) @@ -1273,9 +1629,11 @@ def api_organisers_teams_destroy(self, id: int, organiser: str) -> None: params = None path = f"/api/organisers/{organiser}/teams/{id}/" self._request("DELETE", path, params=params) - return None + return - def api_organisers_teams_invite_create(self, id: int, organiser: str, *, body: dict[str, Any] | None = None) -> dict[str, Any]: + def api_organisers_teams_invite_create( + self, id: int, organiser: str, *, body: dict[str, Any] | None = None + ) -> dict[str, Any]: params = None path = f"/api/organisers/{organiser}/teams/{id}/invite/" return self._request("POST", path, params=params or None, json_body=body) @@ -1284,19 +1642,30 @@ def api_organisers_teams_invites_destroy(self, id: int, invite_id: int, organise params = None path = f"/api/organisers/{organiser}/teams/{id}/invites/{invite_id}/" self._request("DELETE", path, params=params) - return None + return - def api_organisers_teams_remove_member_create(self, id: int, organiser: str, *, body: dict[str, Any] | None = None) -> None: + def api_organisers_teams_remove_member_create( + self, id: int, organiser: str, *, body: dict[str, Any] | None = None + ) -> None: params = None path = f"/api/organisers/{organiser}/teams/{id}/remove_member/" self._request("POST", path, params=params) - return None + return # =================================================================== # tracks # =================================================================== - def tracks_list(self, event: str, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def tracks_list( + self, + event: str, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -1335,9 +1704,19 @@ def tracks_destroy(self, event: str, id: int) -> None: params = None path = f"/api/events/{event}/tracks/{id}/" self._request("DELETE", path, params=params) - return None + return - def tracks_log_list(self, event: str, id: int, *, o: str | None = None, page: int | None = None, page_size: int | None = None, q: str | None = None, auto_paginate: bool = True) -> list[dict[str, Any]]: + def tracks_log_list( + self, + event: str, + id: int, + *, + o: str | None = None, + page: int | None = None, + page_size: int | None = None, + q: str | None = None, + auto_paginate: bool = True, + ) -> list[dict[str, Any]]: params: dict[str, Any] = {} if o is not None: params["o"] = o @@ -1351,4 +1730,3 @@ def tracks_log_list(self, event: str, id: int, *, o: str | None = None, page: in if auto_paginate: return self._paginate(path, params=params or None) return self._request("GET", path, params=params or None) - diff --git a/src/django_program/conference/migrations/0011_merge_20261010_2018.py b/src/django_program/conference/migrations/0011_merge_20261010_2018.py new file mode 100644 index 0000000..94fc798 --- /dev/null +++ b/src/django_program/conference/migrations/0011_merge_20261010_2018.py @@ -0,0 +1,12 @@ +# Generated by Django 5.2.11 on 2026-10-11 01:18 + +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("program_conference", "0010_add_qbo_fields"), + ("program_conference", "0010_alter_conference_options"), + ] + + operations = [] diff --git a/src/django_program/manage/views.py b/src/django_program/manage/views.py index e686bf1..93928f5 100644 --- a/src/django_program/manage/views.py +++ b/src/django_program/manage/views.py @@ -3662,7 +3662,9 @@ def get(self, request: HttpRequest, **kwargs: str) -> HttpResponse: content_type = "application/pdf" if badge.format == Badge.Format.PDF else "image/png" username = badge.attendee.user.username filename = f"badge-{username}.{badge.format}" - response = HttpResponse(badge.file.read(), content_type=content_type) + content = badge.file.read() + badge.file.close() + response = HttpResponse(content, content_type=content_type) response["Content-Disposition"] = f'attachment; filename="{filename}"' return response @@ -3708,6 +3710,7 @@ def get(self, request: HttpRequest, **kwargs: str) -> HttpResponse: # noqa: ARG code = badge.attendee.access_code ext = badge.format zf.writestr(f"badge-{code}.{ext}", badge.file.read()) + badge.file.close() buffer.seek(0) response = HttpResponse(buffer.read(), content_type="application/zip")