diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54c1ca8..4dfba75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,27 +15,37 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Resolve server OpenAPI ref + id: server-openapi-ref + run: | + candidate="${SERVER_OPENAPI_REF:-${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}}" + if git ls-remote --exit-code --heads https://github.com/Life-USTC/server.git "$candidate" >/dev/null 2>&1; then + echo "ref=$candidate" >> "$GITHUB_OUTPUT" + else + echo "ref=main" >> "$GITHUB_OUTPUT" + fi + - name: Checkout server OpenAPI source uses: actions/checkout@v4 with: - repository: Life-USTC/server-nextjs - path: server-nextjs + repository: Life-USTC/server + ref: ${{ steps.server-openapi-ref.outputs.ref }} + path: server - uses: actions/setup-go@v5 with: go-version-file: go.mod - - name: OpenAPI spec is synced with server - run: make check-openapi-sync OPENAPI_SOURCE=server-nextjs/public/openapi.generated.json - - name: Build run: make build - name: Test run: make test - - name: Generated files are current - run: make generate && git diff --exit-code + - name: Check generated code is up-to-date + run: | + make sync-openapi generate OPENAPI_SOURCE=server/public/openapi.generated.json + git diff --exit-code lint: runs-on: ubuntu-latest diff --git a/Makefile b/Makefile index 0652bdb..7738c00 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VERSION ?= dev -OPENAPI_SOURCE ?= ../server-nextjs/public/openapi.generated.json +OPENAPI_SOURCE ?= ../server/public/openapi.generated.json LDFLAGS := -ldflags "-X github.com/Life-USTC/CLI/internal/cmd/root.version=$(VERSION)" .PHONY: build clean test lint install generate sync-openapi check-openapi-sync diff --git a/README.md b/README.md index 075702c..c373989 100644 --- a/README.md +++ b/README.md @@ -42,14 +42,17 @@ life-ustc me life-ustc todo --pending life-ustc todo create --title "Write report" --priority high life-ustc todo done +life-ustc todo done life-ustc homework --pending life-ustc homework create --title "Problem Set 1" life-ustc homework create life-ustc homework done +life-ustc homework done life-ustc upload file ./report.pdf life-ustc upload download -o report.pdf life-ustc calendar get life-ustc calendar set +life-ustc calendar import-codes # Browse (no auth required unless noted) # In a terminal, bare course/section/teacher list commands open an interactive TUI. @@ -81,6 +84,7 @@ life-ustc school sync # Community features life-ustc comment list --target-type section --target-id life-ustc comment create --target-type section --target-id --body "Great class!" +life-ustc comment delete life-ustc description get --target-type course --target-id life-ustc description set --target-type course --target-id --content "Good for freshmen." diff --git a/api/openapi.json b/api/openapi.json index 012853b..bfb66f4 100644 --- a/api/openapi.json +++ b/api/openapi.json @@ -3,24 +3,153 @@ "info": { "title": "Life@USTC API", "version": "1.0.0", - "description": "OpenAPI document generated from Next.js route handlers" + "description": "OpenAPI document generated from SvelteKit route handlers" }, "servers": [ { - "url": "http://localhost:3000", - "description": "Local server" + "url": "/", + "description": "Current origin" + } + ], + "tags": [ + { + "name": "Admin", + "description": "Admin and moderation endpoints" + }, + { + "name": "Comments", + "description": "Comment threads, reactions, and moderation" + }, + { + "name": "Homeworks", + "description": "Homework management and completion status" + }, + { + "name": "Uploads", + "description": "Upload session, R2 object write, finalize, and file management" + }, + { + "name": "Descriptions", + "description": "User-generated description content and history" + }, + { + "name": "Sections", + "description": "Course sections, calendars, and schedules" + }, + { + "name": "Courses", + "description": "Course catalog and search" + }, + { + "name": "Teachers", + "description": "Teacher directory and search" + }, + { + "name": "Schedules", + "description": "Schedules search and filtering" + }, + { + "name": "Semesters", + "description": "Semester listing and current semester" + }, + { + "name": "Calendar", + "description": "Calendar selections and exports" + }, + { + "name": "Bus", + "description": "Shuttle bus schedules and preferences" + }, + { + "name": "Todos", + "description": "Personal todo management" + }, + { + "name": "Me", + "description": "Current user profile, subscriptions, and personal data" + }, + { + "name": "DashboardLinks", + "description": "Dashboard link pinning and click tracking", + "x-displayName": "Dashboard Links" + }, + { + "name": "Locale", + "description": "Locale switching and locale cookies" + }, + { + "name": "Metadata", + "description": "Metadata dictionaries for filters" + }, + { + "name": "OpenAPI", + "description": "OpenAPI document endpoint", + "x-displayName": "OpenAPI" + }, + { + "name": "Api", + "description": "General API endpoints" + } + ], + "x-tagGroups": [ + { + "name": "Catalog", + "tags": [ + "Sections", + "Courses", + "Teachers", + "Schedules", + "Semesters" + ] + }, + { + "name": "Workspace", + "tags": [ + "Homeworks", + "Todos", + "Calendar", + "Me", + "DashboardLinks" + ] + }, + { + "name": "Community", + "tags": [ + "Comments", + "Descriptions", + "Uploads" + ] + }, + { + "name": "Campus Services", + "tags": [ + "Bus" + ] + }, + { + "name": "Platform", + "tags": [ + "Metadata", + "Locale", + "OpenAPI", + "Api" + ] + }, + { + "name": "Admin", + "tags": [ + "Admin" + ] } ], "paths": { "/.well-known/oauth-authorization-server": { "get": { "operationId": "listOauthAuthorizationServer", - "summary": "Compatibility alias for legacy clients that probe the root well-known path.", - "description": "", + "summary": "Compatibility alias for legacy clients that probe the root well-known path", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -37,58 +166,10 @@ }, "options": { "operationId": "options-.well-known-oauth-authorization-server", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } - } - }, - "/.well-known/oauth-authorization-server/api/auth": { - "get": { - "operationId": "get-.well-known-oauth-authorization-server-api-auth", - "summary": "Canonical RFC 8414 authorization server metadata for issuer `/api/auth`.", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Response 200" - } - } - }, - "options": { - "operationId": "options-.well-known-oauth-authorization-server-api-auth", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } - } - }, - "/.well-known/oauth-authorization-server/api/mcp": { - "get": { - "operationId": "get-.well-known-oauth-authorization-server-api-mcp", - "summary": "Compatibility alias for clients that probe resource-path authorization-server metadata.", - "description": "", + "summary": "Compatibility alias for legacy clients that probe the root well-known path", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -102,31 +183,15 @@ } } } - }, - "options": { - "operationId": "options-.well-known-oauth-authorization-server-api-mcp", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } } }, "/.well-known/oauth-protected-resource": { "get": { "operationId": "listOauthProtectedResource", - "summary": "Compatibility alias for clients that probe the resource-origin root path.", - "description": "", + "summary": "Compatibility alias for clients that probe the resource-origin root path", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -143,45 +208,21 @@ }, "options": { "operationId": "options-.well-known-oauth-protected-resource", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } - } - }, - "/.well-known/oauth-protected-resource/api/mcp": { - "get": { - "operationId": "get-.well-known-oauth-protected-resource-api-mcp", - "summary": "Canonical RFC 9728 protected resource metadata for MCP.", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Response 200" - } - } - }, - "options": { - "operationId": "options-.well-known-oauth-protected-resource-api-mcp", - "summary": "", - "description": "", + "summary": "Compatibility alias for clients that probe the resource-origin root path", "tags": [ "Api" ], - "parameters": [], "responses": { - "204": { - "description": "Response 204" + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } } } } @@ -189,12 +230,10 @@ "/.well-known/openid-configuration": { "get": { "operationId": "listOpenidConfiguration", - "summary": "Compatibility alias for clients that look up root OpenID discovery directly.", - "description": "", + "summary": "Compatibility alias for clients that look up root OpenID discovery directly", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -211,58 +250,10 @@ }, "options": { "operationId": "options-.well-known-openid-configuration", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } - } - }, - "/.well-known/openid-configuration/api/auth": { - "get": { - "operationId": "get-.well-known-openid-configuration-api-auth", - "summary": "RFC 8414-compatible path form for OpenID provider metadata.", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Response 200" - } - } - }, - "options": { - "operationId": "options-.well-known-openid-configuration-api-auth", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } - } - }, - "/.well-known/openid-configuration/api/mcp": { - "get": { - "operationId": "get-.well-known-openid-configuration-api-mcp", - "summary": "Compatibility alias for clients that probe resource-path OIDC metadata.", - "description": "", + "summary": "Compatibility alias for clients that look up root OpenID discovery directly", "tags": [ "Api" ], - "parameters": [], "responses": { "307": { "description": "Redirect", @@ -276,53 +267,23 @@ } } } - }, - "options": { - "operationId": "options-.well-known-openid-configuration-api-mcp", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } } }, - "/api/admin/comments": { + "/api/bus": { "get": { - "operationId": "listAdminComments", - "summary": "List moderation comments.", - "description": "", + "operationId": "queryBus", + "summary": "Query shuttle buses", "tags": [ - "Admin" + "Bus" ], "parameters": [ { "in": "query", - "name": "status", + "name": "versionKey", "schema": { "type": "string", - "enum": [ - "active", - "softbanned", - "deleted", - "suspended" - ] - }, - "required": false - }, - { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "minLength": 1 + } } ], "responses": { @@ -331,7 +292,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminCommentsResponseSchema" + "$ref": "#/components/schemas/busQueryResponseSchema" } } } @@ -349,33 +310,38 @@ } } }, - "/api/admin/comments/{id}": { - "patch": { - "operationId": "moderateAdminComment", - "summary": "Moderate one comment.", - "description": "", + "/api/calendar-subscriptions": { + "post": { + "operationId": "setCalendarSubscription", + "summary": "Replace section subscriptions", "tags": [ - "Admin" + "Calendar" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionCreateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminModeratedCommentResponseSchema" + "$ref": "#/components/schemas/calendarSubscriptionCreateResponseSchema" } } } @@ -389,86 +355,8 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminModerateCommentRequestSchema" - } - } - } - } - } - }, - "/api/admin/descriptions": { - "get": { - "operationId": "listAdminDescriptions", - "summary": "List descriptions for moderation review.", - "description": "", - "tags": [ - "Admin" - ], - "parameters": [ - { - "in": "query", - "name": "targetType", - "schema": { - "type": "string", - "enum": [ - "all", - "section", - "course", - "teacher", - "homework" - ] - }, - "required": false - }, - { - "in": "query", - "name": "hasContent", - "schema": { - "type": "string", - "enum": [ - "all", - "withContent", - "empty" - ] - }, - "required": false - }, - { - "in": "query", - "name": "search", - "schema": { - "type": "string" - }, - "required": false - }, - { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminDescriptionsResponseSchema" - } - } - } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -479,55 +367,38 @@ } } } - } - }, - "/api/admin/homeworks": { - "get": { - "operationId": "listAdminHomeworks", - "summary": "List moderation homeworks.", - "description": "", + }, + "patch": { + "operationId": "appendCalendarSubscriptionSections", + "summary": "Append section subscriptions", "tags": [ - "Admin" + "Calendar" ], - "parameters": [ - { - "in": "query", - "name": "status", - "schema": { - "type": "string", - "enum": [ - "all", - "active", - "deleted" - ] - }, - "required": false - }, + "security": [ { - "in": "query", - "name": "search", - "schema": { - "type": "string" - }, - "required": false + "bearerAuth": [] }, { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionAppendRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminHomeworksResponseSchema" + "$ref": "#/components/schemas/calendarSubscriptionAppendResponseSchema" } } } @@ -541,37 +412,13 @@ } } } - } - } - } - }, - "/api/admin/homeworks/{id}": { - "delete": { - "operationId": "deleteAdminHomework", - "summary": "Soft delete one homework (admin).", - "description": "", - "tags": [ - "Admin" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" - } - ], - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -587,45 +434,38 @@ } } } - } - }, - "/api/admin/suspensions": { - "get": { - "operationId": "listAdminSuspensions", - "summary": "List suspensions.", - "description": "", + }, + "delete": { + "operationId": "delete-api-calendar-subscriptions", + "summary": "Remove section subscriptions", "tags": [ - "Admin" + "Calendar" ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminSuspensionsResponseSchema" - } + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionRemoveRequestSchema" } } } - } - }, - "post": { - "operationId": "createAdminSuspension", - "summary": "List suspensions.", - "description": "", - "tags": [ - "Admin" - ], - "parameters": [], + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminSuspensionResponseSchema" + "$ref": "#/components/schemas/calendarSubscriptionRemoveResponseSchema" } } } @@ -639,46 +479,13 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminCreateSuspensionRequestSchema" - } - } - } - } - } - }, - "/api/admin/suspensions/{id}": { - "patch": { - "operationId": "updateAdminSuspension", - "summary": "Lift one suspension.", - "description": "", - "tags": [ - "Admin" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" - } - ], - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminSuspensionResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -696,40 +503,83 @@ } } }, - "/api/admin/users": { + "/api/comments": { "get": { - "operationId": "listAdminUsers", - "summary": "List users for admin console.", - "description": "", + "operationId": "listComments", + "summary": "List comments", "tags": [ - "Admin" + "Comments" ], "parameters": [ { "in": "query", - "name": "search", + "name": "targetType", "schema": { - "type": "string" - }, - "required": false - }, - { - "in": "query", - "name": "page", + "type": "string", + "enum": [ + "section", + "course", + "teacher", + "section-teacher", + "homework" + ] + }, + "required": true + }, + { + "in": "query", + "name": "targetId", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "sectionId", "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", - "name": "limit", + "name": "sectionJwId", "schema": { "type": "integer", "format": "int64" - }, - "required": false + } + }, + { + "in": "query", + "name": "courseJwId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "teacherId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "homeworkId", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "sectionTeacherId", + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -738,7 +588,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminUsersResponseSchema" + "$ref": "#/components/schemas/commentsListResponseSchema" } } } @@ -752,37 +602,50 @@ } } } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } - } - }, - "/api/admin/users/{id}": { - "patch": { - "operationId": "updateAdminUser", - "summary": "Update one user.", - "description": "", + }, + "post": { + "operationId": "createComment", + "summary": "Create one comment", "tags": [ - "Admin" + "Comments" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commentCreateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/adminUserResponseSchema" + "$ref": "#/components/schemas/idResponseSchema" } } } @@ -796,243 +659,183 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/adminUpdateUserRequestSchema" + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } - } - } - } - }, - "/api/auth/.well-known/openid-configuration": { - "get": { - "operationId": "get-api-auth-.well-known-openid-configuration", - "summary": "Canonical OpenID Connect Discovery metadata for issuer `/api/auth`.", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Response 200" - } - } - }, - "options": { - "operationId": "options-api-auth-.well-known-openid-configuration", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } - } - }, - "/api/auth/{auth}": { - "get": { - "operationId": "getAuth", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "403": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } - } - } - }, - "post": { - "operationId": "createAuth", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "404": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } - }, - "put": { - "operationId": "setAuth", - "summary": "", - "description": "", + } + }, + "/api/courses": { + "get": { + "operationId": "listCourses", + "summary": "List courses", "tags": [ - "Api" + "Courses" + ], + "parameters": [ + { + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "educationLevelId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "categoryId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "classTypeId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "page", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100 + } + } ], - "parameters": [], "responses": { "200": { "description": "Successful response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/paginatedCourseResponseSchema" + } } } - } - } - }, - "patch": { - "operationId": "updateAuth", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "400": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } - }, - "delete": { - "operationId": "deleteAuth", - "summary": "", - "description": "", + } + }, + "/api/descriptions": { + "get": { + "operationId": "getDescription", + "summary": "Get description history", "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/api/auth/oauth2/device-authorization": { - "post": { - "operationId": "post-api-auth-oauth2-device-authorization", - "summary": "", - "description": "", - "tags": [ - "Api" + "Descriptions" ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": {} - } + "parameters": [ + { + "in": "query", + "name": "targetType", + "schema": { + "type": "string", + "enum": [ + "section", + "course", + "teacher", + "homework" + ] + }, + "required": true + }, + { + "in": "query", + "name": "targetId", + "schema": { + "type": "string", + "minLength": 1 } - } - } - }, - "options": { - "operationId": "options-api-auth-oauth2-device-authorization", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": {} - } + }, + { + "in": "query", + "name": "sectionJwId", + "schema": { + "type": "integer", + "format": "int64" } - } - } - } - }, - "/api/auth/oauth2/token": { - "get": { - "operationId": "get-api-auth-oauth2-token", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": {} - } + }, + { + "in": "query", + "name": "courseJwId", + "schema": { + "type": "integer", + "format": "int64" } - } - } - }, - "post": { - "operationId": "post-api-auth-oauth2-token", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": {} - } + }, + { + "in": "query", + "name": "teacherId", + "schema": { + "type": "integer", + "format": "int64" } - } - } - } - }, - "/api/bus": { - "get": { - "operationId": "queryBus", - "summary": "Public shuttle-bus query API.", - "description": "", - "tags": [ - "Bus" - ], - "parameters": [ + }, { "in": "query", - "name": "versionKey", + "name": "homeworkId", "schema": { "type": "string", "minLength": 1 - }, - "required": false + } } ], "responses": { @@ -1041,7 +844,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/busQueryResponseSchema" + "$ref": "#/components/schemas/descriptionsResponseSchema" } } } @@ -1055,31 +858,8 @@ } } } - } - } - } - }, - "/api/bus/preferences": { - "get": { - "operationId": "getBusPreferences", - "summary": "Get bus preferences for the current user.", - "description": "", - "tags": [ - "Bus" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/busPreferenceResponseSchema" - } - } - } }, - "401": { + "404": { "description": "Error response", "content": { "application/json": { @@ -1092,20 +872,36 @@ } }, "post": { - "operationId": "setBusPreferences", - "summary": "Get bus preferences for the current user.", - "description": "", + "operationId": "upsertDescription", + "summary": "Upsert description", "tags": [ - "Bus" + "Descriptions" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], - "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/descriptionUpsertRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/busPreferenceResponseSchema" + "$ref": "#/components/schemas/descriptionUpsertResponseSchema" } } } @@ -1129,40 +925,18 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/busPreferenceRequestSchema" - } - } - } - } - } - }, - "/api/calendar-subscriptions": { - "post": { - "operationId": "setCalendarSubscription", - "summary": "Replace the current user's section subscriptions.", - "description": "", - "tags": [ - "Calendar" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "403": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/calendarSubscriptionCreateResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "404": { "description": "Error response", "content": { "application/json": { @@ -1172,44 +946,23 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/calendarSubscriptionCreateRequestSchema" - } - } - } } } }, - "/api/calendar-subscriptions/current": { + "/api/health": { "get": { - "operationId": "getCurrentCalendarSubscription", - "summary": "Get the current user's section subscriptions.", - "description": "", + "operationId": "listHealth", + "summary": "Check process liveness", "tags": [ - "Calendar" + "Api" ], - "parameters": [], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/currentCalendarSubscriptionResponseSchema" - } - } - } - }, - "401": { - "description": "Error response", + "description": "Text response", "content": { - "application/json": { + "text/plain": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "type": "string" } } } @@ -1217,55 +970,48 @@ } } }, - "/api/comments": { + "/api/homeworks": { "get": { - "operationId": "listComments", - "summary": "List comments for a target.", - "description": "", + "operationId": "listHomeworks", + "summary": "List homeworks", "tags": [ - "Comments" + "Homeworks" ], "parameters": [ { "in": "query", - "name": "targetType", + "name": "sectionId", "schema": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "section-teacher", - "homework" - ] - }, - "required": true + "type": "integer", + "format": "int64" + } }, { "in": "query", - "name": "targetId", + "name": "sectionIds", "schema": { - "type": "string" - }, - "required": false + "type": "string", + "minLength": 1 + } }, { "in": "query", - "name": "sectionId", + "name": "sectionJwId", "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", - "name": "teacherId", + "name": "includeDeleted", "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "type": "string", + "enum": [ + "true", + "false" + ] + } } ], "responses": { @@ -1274,7 +1020,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/commentsListResponseSchema" + "$ref": "#/components/schemas/homeworksListResponseSchema" } } } @@ -1288,66 +1034,50 @@ } } } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } }, "post": { - "operationId": "createComment", - "summary": "List comments for a target.", - "description": "", + "operationId": "createHomework", + "summary": "Create one homework", "tags": [ - "Comments" + "Homeworks" ], - "parameters": [ - { - "in": "query", - "name": "targetType", - "schema": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "section-teacher", - "homework" - ] - }, - "required": true - }, - { - "in": "query", - "name": "targetId", - "schema": { - "type": "string" - }, - "required": false - }, + "security": [ { - "in": "query", - "name": "sectionId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "bearerAuth": [] }, { - "in": "query", - "name": "teacherId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkCreateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/idResponseSchema" + "$ref": "#/components/schemas/homeworkCreateResponseSchema" } } } @@ -1361,51 +1091,69 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentCreateRequestSchema" + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } } }, - "/api/comments/{id}": { - "get": { - "operationId": "getComment", - "summary": "Get one comment thread by comment ID.", - "description": "", + "/api/locale": { + "post": { + "operationId": "setLocale", + "summary": "Update user locale cookie", "tags": [ - "Comments" + "Locale" ], - "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/localeUpdateRequestSchema" + } + } } - ], + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/commentThreadResponseSchema" + "$ref": "#/components/schemas/successResponseSchema" } } } }, - "404": { + "400": { "description": "Error response", "content": { "application/json": { @@ -1416,38 +1164,35 @@ } } } - }, - "patch": { - "operationId": "updateComment", - "summary": "Get one comment thread by comment ID.", - "description": "", + } + }, + "/api/mcp": { + "get": { + "operationId": "listMcp", + "summary": "Open an MCP Streamable HTTP transport session", "tags": [ - "Comments" + "Api" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "mcpBearerAuth": [] } ], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/commentUpdateResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "403": { "description": "Error response", "content": { "application/json": { @@ -1456,8 +1201,25 @@ } } } + } + } + }, + "post": { + "operationId": "createMcp", + "summary": "Send an MCP Streamable HTTP JSON-RPC message", + "tags": [ + "Api" + ], + "security": [ + { + "mcpBearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Response 200" }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -1466,49 +1228,45 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentUpdateRequestSchema" + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } }, "delete": { - "operationId": "deleteComment", - "summary": "Get one comment thread by comment ID.", - "description": "", + "operationId": "delete-api-mcp", + "summary": "Close an MCP Streamable HTTP transport session", "tags": [ - "Comments" + "Api" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "mcpBearerAuth": [] } ], "responses": { "200": { - "description": "Successful response", + "description": "Response 200" + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "403": { "description": "Error response", "content": { "application/json": { @@ -1517,8 +1275,20 @@ } } } + } + } + }, + "options": { + "operationId": "options-api-mcp", + "summary": "Return MCP transport CORS preflight headers", + "tags": [ + "Api" + ], + "responses": { + "204": { + "description": "Response 204" }, - "404": { + "403": { "description": "Error response", "content": { "application/json": { @@ -1528,36 +1298,22 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentUpdateRequestSchema" - } - } - } } } }, - "/api/comments/{id}/reactions": { - "post": { - "operationId": "addCommentReaction", - "summary": "Add one reaction to a comment.", - "description": "", + "/api/me": { + "get": { + "operationId": "getMe", + "summary": "Get current user", "tags": [ - "Comments" + "Me" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], "responses": { @@ -1566,58 +1322,80 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/meResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentReactionRequestSchema" + } + } + }, + "/api/metadata": { + "get": { + "operationId": "getMetadata", + "summary": "Get metadata", + "tags": [ + "Metadata" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/metadataResponseSchema" + } } } } } - }, - "delete": { - "operationId": "removeCommentReaction", - "summary": "Add one reaction to a comment.", - "description": "", + } + }, + "/api/metrics": { + "get": { + "operationId": "listMetrics", + "summary": "Export internal runtime metrics", "tags": [ - "Comments" + "Api" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "internalBearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Text response", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } }, - { - "in": "query", - "name": "type", - "schema": { - "type": "string", - "enum": [ - "upvote", - "downvote", - "heart", - "laugh", - "hooray", - "confused", - "rocket", - "eyes" - ] - }, - "required": true + "404": { + "description": "Response 404" } + } + } + }, + "/api/openapi": { + "get": { + "operationId": "getOpenApiSpec", + "summary": "Get OpenAPI document", + "tags": [ + "OpenAPI" ], "responses": { "200": { @@ -1625,66 +1403,144 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/openApiDocumentResponseSchema" } } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/commentReactionRequestSchema" + } + } + }, + "/api/readiness": { + "get": { + "operationId": "listReadiness", + "summary": "Check internal dependency readiness", + "tags": [ + "Api" + ], + "security": [ + { + "internalBearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/readinessResponseSchema" + } + } + } + }, + "404": { + "description": "Response 404" + }, + "503": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/readinessResponseSchema" + } } } } } } }, - "/api/courses": { + "/api/schedules": { "get": { - "operationId": "listCourses", - "summary": "List courses with search and pagination.", - "description": "", + "operationId": "listSchedules", + "summary": "List schedules", "tags": [ - "Courses" + "Schedules" ], "parameters": [ { "in": "query", - "name": "search", + "name": "sectionId", "schema": { - "type": "string" - }, - "required": false + "type": "integer", + "format": "int64" + } }, { "in": "query", - "name": "educationLevelId", + "name": "sectionJwId", "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", - "name": "categoryId", + "name": "sectionCode", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "teacherId", "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", - "name": "classTypeId", + "name": "teacherCode", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "roomId", "schema": { "type": "integer", "format": "int64" - }, - "required": false + } + }, + { + "in": "query", + "name": "roomJwId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "weekday", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 7 + } + }, + { + "in": "query", + "name": "dateFrom", + "schema": { + "type": "string", + "minLength": 1, + "description": "YYYY-MM-DD or ISO date/time accepted by parseDateInput" + } + }, + { + "in": "query", + "name": "dateTo", + "schema": { + "type": "string", + "minLength": 1, + "description": "YYYY-MM-DD or ISO date/time accepted by parseDateInput" + } }, { "in": "query", @@ -1692,17 +1548,17 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", "name": "limit", "schema": { "type": "integer", - "format": "int64" - }, - "required": false + "format": "int64", + "minimum": 1, + "maximum": 100 + } } ], "responses": { @@ -1711,7 +1567,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedCourseResponseSchema" + "$ref": "#/components/schemas/paginatedScheduleResponseSchema" } } } @@ -1729,191 +1585,116 @@ } } }, - "/api/courses/{jwId}": { + "/api/sections": { "get": { - "operationId": "getCourse", - "summary": "Get course detail by JW ID.", - "description": "", + "operationId": "listSections", + "summary": "List sections", "tags": [ - "Courses" + "Sections" ], "parameters": [ { - "in": "path", - "name": "jwId", + "in": "query", + "name": "courseId", "schema": { "type": "integer", "format": "int64" - }, - "required": true, - "example": "123" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/courseDetailSchema" - } - } } }, - "404": { - "description": "Error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" - } - } + { + "in": "query", + "name": "courseJwId", + "schema": { + "type": "integer", + "format": "int64" } - } - } - } - }, - "/api/dashboard-links/pin": { - "post": { - "operationId": "pinDashboardLink", - "summary": "Pin or unpin one dashboard link for the current user.", - "description": "", - "tags": [ - "DashboardLinks" - ], - "parameters": [], - "responses": { - "303": { - "description": "Redirect after pin/unpin", - "headers": { - "Location": { - "description": "Redirect target URL", - "schema": { - "type": "string" - } - } + }, + { + "in": "query", + "name": "semesterId", + "schema": { + "type": "integer", + "format": "int64" } - } - }, - "requestBody": { - "required": true, - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" - } + }, + { + "in": "query", + "name": "semesterJwId", + "schema": { + "type": "integer", + "format": "int64" } - } - } - } - }, - "/api/dashboard-links/visit": { - "get": { - "operationId": "visitDashboardLink", - "summary": "Redirect to one dashboard link without side effects.", - "description": "", - "tags": [ - "DashboardLinks" - ], - "parameters": [ + }, { "in": "query", - "name": "slug", + "name": "campusId", "schema": { - "type": "string", - "minLength": 1 - }, - "required": true - } - ], - "responses": { - "307": { - "description": "Temporary redirect to target link", - "headers": { - "Location": { - "description": "Redirect target URL", - "schema": { - "type": "string" - } - } + "type": "integer", + "format": "int64" } - } - } - }, - "post": { - "operationId": "recordDashboardLinkVisit", - "summary": "Redirect to one dashboard link without side effects.", - "description": "", - "tags": [ - "DashboardLinks" - ], - "parameters": [ + }, { "in": "query", - "name": "slug", + "name": "departmentId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "teacherId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "teacherCode", "schema": { "type": "string", "minLength": 1 - }, - "required": true - } - ], - "responses": { - "303": { - "description": "Redirect after recording link click", - "headers": { - "Location": { - "description": "Redirect target URL", - "schema": { - "type": "string" - } - } } - } - }, - "requestBody": { - "required": true, - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/dashboardLinkVisitRequestSchema" - } + }, + { + "in": "query", + "name": "search", + "schema": { + "type": "string" } - } - } - } - }, - "/api/descriptions": { - "get": { - "operationId": "getDescription", - "summary": "Get description and history by target.", - "description": "", - "tags": [ - "Descriptions" - ], - "parameters": [ + }, { "in": "query", - "name": "targetType", + "name": "ids", "schema": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "homework" - ] - }, - "required": true + "type": "string" + } }, { "in": "query", - "name": "targetId", + "name": "jwIds", "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "type": "string" + } + }, + { + "in": "query", + "name": "page", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100 + } } ], "responses": { @@ -1922,7 +1703,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/descriptionsResponseSchema" + "$ref": "#/components/schemas/paginatedSectionResponseSchema" } } } @@ -1938,37 +1719,33 @@ } } } - }, - "post": { - "operationId": "upsertDescription", - "summary": "Get description and history by target.", - "description": "", + } + }, + "/api/semesters": { + "get": { + "operationId": "listSemesters", + "summary": "List semesters", "tags": [ - "Descriptions" + "Semesters" ], "parameters": [ { "in": "query", - "name": "targetType", + "name": "page", "schema": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "homework" - ] - }, - "required": true + "type": "integer", + "format": "int64" + } }, { "in": "query", - "name": "targetId", + "name": "limit", "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100 + } } ], "responses": { @@ -1977,7 +1754,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/descriptionUpsertResponseSchema" + "$ref": "#/components/schemas/paginatedSemesterResponseSchema" } } } @@ -1992,56 +1769,49 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/descriptionUpsertRequestSchema" - } - } - } } } }, - "/api/homeworks": { + "/api/teachers": { "get": { - "operationId": "listHomeworks", - "summary": "List homeworks by section.", - "description": "", + "operationId": "listTeachers", + "summary": "List teachers", "tags": [ - "Homeworks" + "Teachers" ], "parameters": [ { "in": "query", - "name": "sectionId", + "name": "departmentId", "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", - "name": "sectionIds", + "name": "search", "schema": { - "type": "string", - "minLength": 1 - }, - "required": false + "type": "string" + } }, { "in": "query", - "name": "includeDeleted", + "name": "page", "schema": { - "type": "string", - "enum": [ - "true", - "false" - ] - }, - "required": false + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 100 + } } ], "responses": { @@ -2050,7 +1820,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworksListResponseSchema" + "$ref": "#/components/schemas/paginatedTeacherResponseSchema" } } } @@ -2066,44 +1836,74 @@ } } } - }, - "post": { - "operationId": "createHomework", - "summary": "List homeworks by section.", - "description": "", - "tags": [ - "Homeworks" - ], - "parameters": [ + } + }, + "/api/todos": { + "get": { + "operationId": "listTodos", + "summary": "List todos", + "tags": [ + "Todos" + ], + "security": [ { - "in": "query", - "name": "sectionId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "bearerAuth": [] }, + { + "sessionCookie": [] + } + ], + "parameters": [ { "in": "query", - "name": "sectionIds", + "name": "completed", "schema": { "type": "string", - "minLength": 1 - }, - "required": false + "enum": [ + "true", + "false" + ] + } }, { "in": "query", - "name": "includeDeleted", + "name": "priority", "schema": { "type": "string", "enum": [ - "true", - "false" + "low", + "medium", + "high" ] - }, - "required": false + } + }, + { + "in": "query", + "name": "dueBefore", + "schema": { + "type": "string", + "minLength": 1, + "description": "YYYY-MM-DD or ISO date/time accepted by parseDateInput" + } + }, + { + "in": "query", + "name": "dueAfter", + "schema": { + "type": "string", + "minLength": 1, + "description": "YYYY-MM-DD or ISO date/time accepted by parseDateInput" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 200 + } } ], "responses": { @@ -2112,7 +1912,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/idResponseSchema" + "$ref": "#/components/schemas/todosListResponseSchema" } } } @@ -2126,51 +1926,8 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/homeworkCreateRequestSchema" - } - } - } - } - } - }, - "/api/homeworks/{id}": { - "patch": { - "operationId": "updateHomework", - "summary": "Update one homework.", - "description": "", - "tags": [ - "Homeworks" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/successResponseSchema" - } - } - } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2180,43 +1937,39 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/homeworkUpdateRequestSchema" - } - } - } } }, - "delete": { - "operationId": "deleteHomework", - "summary": "Update one homework.", - "description": "", + "post": { + "operationId": "createTodo", + "summary": "Create a todo", "tags": [ - "Homeworks" + "Todos" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoCreateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/idResponseSchema" } } } @@ -2231,7 +1984,7 @@ } } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2241,36 +1994,22 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/homeworkUpdateRequestSchema" - } - } - } } } }, - "/api/homeworks/{id}/completion": { - "put": { - "operationId": "setHomeworkCompletion", - "summary": "Update completion state for one homework.", - "description": "", + "/api/uploads": { + "get": { + "operationId": "listUploads", + "summary": "List uploads", "tags": [ - "Homeworks" + "Uploads" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], "responses": { @@ -2279,12 +2018,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkCompletionResponseSchema" + "$ref": "#/components/schemas/uploadsListResponseSchema" } } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2294,34 +2033,39 @@ } } } - }, + } + }, + "post": { + "operationId": "createUpload", + "summary": "Create a signed upload URL", + "tags": [ + "Uploads" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/homeworkCompletionRequestSchema" + "$ref": "#/components/schemas/uploadCreateRequestSchema" } } } - } - } - }, - "/api/locale": { - "post": { - "operationId": "setLocale", - "summary": "Update user locale cookie.", - "description": "", - "tags": [ - "Locale" - ], - "parameters": [], + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/uploadCreateResponseSchema" } } } @@ -2335,189 +2079,184 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/localeUpdateRequestSchema" + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } - } - } - } - }, - "/api/mcp": { - "get": { - "operationId": "listMcp", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "403": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } - } - } - }, - "post": { - "operationId": "createMcp", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "413": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } - }, - "delete": { - "operationId": "delete-api-mcp", - "summary": "", - "description": "", - "tags": [ - "Api" + } + }, + "/api/admin/comments": { + "get": { + "operationId": "listAdminComments", + "summary": "List moderation comments", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "query", + "name": "status", + "schema": { + "type": "string", + "enum": [ + "all", + "active", + "softbanned", + "deleted", + "suspended" + ] + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" + } + } ], - "parameters": [], "responses": { "200": { "description": "Successful response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/adminCommentsResponseSchema" + } } } - } - } - }, - "options": { - "operationId": "options-api-mcp", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "400": { + "description": "Error response", "content": { "application/json": { - "schema": {} + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } - } - } - } - }, - "/api/mcp/.well-known/oauth-authorization-server": { - "get": { - "operationId": "get-api-mcp-.well-known-oauth-authorization-server", - "summary": "Compatibility alias for clients that probe authorization-server metadata relative to /api/mcp.", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "307": { - "description": "Redirect", - "headers": { - "Location": { + }, + "401": { + "description": "Error response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/openApiErrorSchema" } } } } } - }, - "options": { - "operationId": "options-api-mcp-.well-known-oauth-authorization-server", - "summary": "", - "description": "", - "tags": [ - "Api" - ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" - } - } } }, - "/api/mcp/.well-known/openid-configuration": { + "/api/admin/descriptions": { "get": { - "operationId": "get-api-mcp-.well-known-openid-configuration", - "summary": "Compatibility alias for clients that probe OIDC metadata relative to /api/mcp.", - "description": "", + "operationId": "listAdminDescriptions", + "summary": "List descriptions", "tags": [ - "Api" + "Admin" ], - "parameters": [], - "responses": { - "307": { - "description": "Redirect", - "headers": { - "Location": { - "schema": { - "type": "string", - "format": "uri" - } - } - } + "security": [ + { + "sessionCookie": [] } - } - }, - "options": { - "operationId": "options-api-mcp-.well-known-openid-configuration", - "summary": "", - "description": "", - "tags": [ - "Api" ], - "parameters": [], - "responses": { - "204": { - "description": "Response 204" + "x-auth-role": "admin", + "parameters": [ + { + "in": "query", + "name": "targetType", + "schema": { + "type": "string", + "enum": [ + "all", + "section", + "course", + "teacher", + "homework" + ] + } + }, + { + "in": "query", + "name": "hasContent", + "schema": { + "type": "string", + "enum": [ + "all", + "withContent", + "empty" + ] + } + }, + { + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" + } } - } - } - }, - "/api/me": { - "get": { - "operationId": "getMe", - "summary": "Return the authenticated user's profile.", - "description": "", - "tags": [ - "Me" ], - "parameters": [], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/meResponseSchema" + "$ref": "#/components/schemas/adminDescriptionsResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -2535,22 +2274,65 @@ } } }, - "/api/me/subscriptions/homeworks": { + "/api/admin/homeworks": { "get": { - "operationId": "getSubscribedHomeworks", - "summary": "List homeworks for all subscribed sections in a single call.", - "description": "", + "operationId": "listAdminHomeworks", + "summary": "List moderation homeworks", "tags": [ - "Me" + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "query", + "name": "status", + "schema": { + "type": "string", + "enum": [ + "all", + "active", + "deleted" + ] + } + }, + { + "in": "query", + "name": "search", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64" + } + } ], - "parameters": [], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/subscribedHomeworksResponseSchema" + "$ref": "#/components/schemas/adminHomeworksResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -2568,152 +2350,138 @@ } } }, - "/api/metadata": { + "/api/admin/suspensions": { "get": { - "operationId": "getMetadata", - "summary": "Get metadata dictionaries for filters.", - "description": "", + "operationId": "listAdminSuspensions", + "summary": "List suspensions", "tags": [ - "Metadata" + "Admin" ], - "parameters": [], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/metadataResponseSchema" + "$ref": "#/components/schemas/adminSuspensionsResponseSchema" } } } - } - } - } - }, - "/api/openapi": { - "get": { - "operationId": "getOpenApiSpec", - "summary": "Get generated OpenAPI document.", - "description": "", - "tags": [ - "OpenAPI" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiDocumentResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } } } - } - }, - "/api/schedules": { - "get": { - "operationId": "listSchedules", - "summary": "List schedules with filters and pagination.", - "description": "", + }, + "post": { + "operationId": "createAdminSuspension", + "summary": "Create suspension for one user", "tags": [ - "Schedules" + "Admin" ], - "parameters": [ - { - "in": "query", - "name": "sectionId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - }, - { - "in": "query", - "name": "sectionJwId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - }, - { - "in": "query", - "name": "sectionCode", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": false - }, - { - "in": "query", - "name": "teacherId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - }, + "security": [ { - "in": "query", - "name": "teacherCode", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": false + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminCreateSuspensionRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminSuspensionResponseSchema" + } + } + } }, - { - "in": "query", - "name": "roomId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - { - "in": "query", - "name": "roomJwId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, - { - "in": "query", - "name": "weekday", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/admin/users": { + "get": { + "operationId": "listAdminUsers", + "summary": "List users", + "tags": [ + "Admin" + ], + "security": [ { - "in": "query", - "name": "dateFrom", - "schema": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "required": false - }, + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ { "in": "query", - "name": "dateTo", + "name": "search", "schema": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "required": false + "type": "string" + } }, { "in": "query", @@ -2721,8 +2489,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } }, { "in": "query", @@ -2730,8 +2497,7 @@ "schema": { "type": "integer", "format": "int64" - }, - "required": false + } } ], "responses": { @@ -2740,7 +2506,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedScheduleResponseSchema" + "$ref": "#/components/schemas/adminUsersResponseSchema" } } } @@ -2754,132 +2520,105 @@ } } } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } } } }, - "/api/sections": { + "/api/bus/next": { "get": { - "operationId": "listSections", - "summary": "List sections with filters and pagination.", - "description": "", + "operationId": "get-api-bus-next", + "summary": "Get next shuttle bus departures for an origin and destination campus", "tags": [ - "Sections" + "Bus" ], "parameters": [ { "in": "query", - "name": "courseId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - }, - { - "in": "query", - "name": "courseJwId", + "name": "originCampusId", "schema": { "type": "integer", "format": "int64" }, - "required": false + "required": true }, { "in": "query", - "name": "semesterId", + "name": "destinationCampusId", "schema": { "type": "integer", "format": "int64" }, - "required": false + "required": true }, { "in": "query", - "name": "semesterJwId", + "name": "atTime", "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "type": "string", + "minLength": 1 + } }, { "in": "query", - "name": "campusId", + "name": "dayType", "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "type": "string", + "enum": [ + "auto", + "weekday", + "weekend" + ] + } }, { "in": "query", - "name": "departmentId", + "name": "includeDeparted", "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "type": "string", + "enum": [ + "true", + "false" + ] + } }, { "in": "query", - "name": "teacherId", + "name": "limit", "schema": { "type": "integer", - "format": "int64" - }, - "required": false + "format": "int64", + "minimum": 1, + "maximum": 50 + } }, { "in": "query", - "name": "teacherCode", + "name": "versionKey", "schema": { "type": "string", "minLength": 1 - }, - "required": false - }, - { - "in": "query", - "name": "search", - "schema": { - "type": "string" - }, - "required": false - }, - { - "in": "query", - "name": "ids", - "schema": { - "type": "string" - }, - "required": false - }, - { - "in": "query", - "name": "jwIds", - "schema": { - "type": "string" - }, - "required": false - }, - { - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + } }, { "in": "query", - "name": "limit", + "name": "locale", "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } } ], "responses": { @@ -2888,7 +2627,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedSectionResponseSchema" + "$ref": "#/components/schemas/busNextDeparturesResponseSchema" } } } @@ -2902,40 +2641,6 @@ } } } - } - } - } - }, - "/api/sections/{jwId}": { - "get": { - "operationId": "getSection", - "summary": "Get section detail by JW ID.", - "description": "", - "tags": [ - "Sections" - ], - "parameters": [ - { - "in": "path", - "name": "jwId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": true, - "example": "123" - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/sectionDetailSchema" - } - } - } }, "404": { "description": "Error response", @@ -2950,39 +2655,33 @@ } } }, - "/api/sections/{jwId}/calendar.ics": { + "/api/bus/preferences": { "get": { - "operationId": "getSectionCalendar", - "summary": "Generate calendar ICS for one section.", - "description": "", + "operationId": "getBusPreferences", + "summary": "Get bus preferences", "tags": [ - "Sections" + "Bus" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "jwId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], "responses": { "200": { - "description": "Binary response", + "description": "Successful response", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/busPreferenceResponseSchema" } } } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -2993,41 +2692,53 @@ } } } - } - }, - "/api/sections/{jwId}/schedule-groups": { - "get": { - "operationId": "getSectionScheduleGroups", - "summary": "Get schedule groups for one section.", - "description": "", + }, + "post": { + "operationId": "setBusPreferences", + "summary": "Update bus preferences", "tags": [ - "Sections" + "Bus" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "jwId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/busPreferenceRequestSchema" + } + } + } + }, "responses": { "200": { - "description": "Array response", + "description": "Successful response", "content": { "application/json": { "schema": { - "type": "array", - "items": {} + "$ref": "#/components/schemas/busPreferenceResponseSchema" } } } }, - "404": { + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { "description": "Error response", "content": { "application/json": { @@ -3040,34 +2751,67 @@ } } }, - "/api/sections/{jwId}/schedules": { + "/api/bus/routes": { "get": { - "operationId": "getSectionSchedules", - "summary": "Get all schedules for one section.", - "description": "", + "operationId": "get-api-bus-routes", + "summary": "Search shuttle bus route variants", "tags": [ - "Sections" + "Bus" ], "parameters": [ { - "in": "path", - "name": "jwId", + "in": "query", + "name": "originCampusId", "schema": { "type": "integer", "format": "int64" - }, - "required": true, - "example": "123" + } + }, + { + "in": "query", + "name": "destinationCampusId", + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "in": "query", + "name": "versionKey", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "locale", + "schema": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } } ], "responses": { "200": { - "description": "Array response", + "description": "Successful response", "content": { "application/json": { "schema": { - "type": "array", - "items": {} + "$ref": "#/components/schemas/busRouteSearchResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -3085,33 +2829,38 @@ } } }, - "/api/sections/calendar.ics": { - "get": { - "operationId": "getSectionsCalendar", - "summary": "Generate calendar ICS for multiple sections.", - "description": "", + "/api/calendar-subscriptions/batch": { + "post": { + "operationId": "batchUpdateCalendarSubscription", + "summary": "Batch update calendar section subscriptions", "tags": [ - "Sections" + "Calendar" ], - "parameters": [ + "security": [ { - "in": "query", - "name": "sectionIds", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionBatchRequestSchema" + } + } + } + }, "responses": { "200": { - "description": "Binary response", + "description": "Successful response", "content": { - "application/octet-stream": { + "application/json": { "schema": { - "type": "string", - "format": "binary" + "$ref": "#/components/schemas/calendarSubscriptionBatchResponseSchema" } } } @@ -3125,31 +2874,18 @@ } } } - } - } - } - }, - "/api/sections/match-codes": { - "post": { - "operationId": "matchSectionCodes", - "summary": "Match section codes in one semester.", - "description": "", - "tags": [ - "Sections" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/matchSectionCodesResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "404": { "description": "Error response", "content": { "application/json": { @@ -3159,44 +2895,22 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/matchSectionCodesRequestSchema" - } - } - } } } }, - "/api/semesters": { + "/api/calendar-subscriptions/current": { "get": { - "operationId": "listSemesters", - "summary": "List semesters with pagination.", - "description": "", + "operationId": "getCurrentCalendarSubscription", + "summary": "Get section subscriptions", "tags": [ - "Semesters" + "Calendar" ], - "parameters": [ + "security": [ { - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "bearerAuth": [] }, { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "sessionCookie": [] } ], "responses": { @@ -3205,12 +2919,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedSemesterResponseSchema" + "$ref": "#/components/schemas/currentCalendarSubscriptionResponseSchema" } } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -3223,27 +2937,63 @@ } } }, - "/api/semesters/current": { - "get": { - "operationId": "getCurrentSemester", - "summary": "Get current semester.", - "description": "", + "/api/calendar-subscriptions/import-codes": { + "post": { + "operationId": "post-api-calendar-subscriptions-import-codes", + "summary": "Import section subscriptions by section codes", "tags": [ - "Semesters" + "Calendar" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], - "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/matchSectionCodesRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/semesterSchema" + "$ref": "#/components/schemas/calendarSubscriptionImportResponseSchema" } } } }, - "404": { + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { "description": "Error response", "content": { "application/json": { @@ -3256,58 +3006,38 @@ } } }, - "/api/teachers": { - "get": { - "operationId": "listTeachers", - "summary": "List teachers with department/search filters.", - "description": "", + "/api/calendar-subscriptions/query": { + "post": { + "operationId": "queryCalendarSubscriptionSections", + "summary": "Query sections for calendar subscription changes", "tags": [ - "Teachers" + "Calendar" ], - "parameters": [ - { - "in": "query", - "name": "departmentId", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false - }, - { - "in": "query", - "name": "search", - "schema": { - "type": "string" - }, - "required": false - }, + "security": [ { - "in": "query", - "name": "page", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "bearerAuth": [] }, { - "in": "query", - "name": "limit", - "schema": { - "type": "integer", - "format": "int64" - }, - "required": false + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/calendarSubscriptionQueryRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/paginatedTeacherResponseSchema" + "$ref": "#/components/schemas/calendarSubscriptionQueryResponseSchema" } } } @@ -3321,37 +3051,13 @@ } } } - } - } - } - }, - "/api/teachers/{id}": { - "get": { - "operationId": "getTeacher", - "summary": "Get teacher detail by numeric ID.", - "description": "", - "tags": [ - "Teachers" - ], - "parameters": [ - { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" - } - ], - "responses": { - "200": { - "description": "Successful response", + }, + "401": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/teacherDetailSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } @@ -3369,59 +3075,22 @@ } } }, - "/api/todos": { + "/api/comments/{id}": { "get": { - "operationId": "listTodos", - "summary": "List todos for the current user.", - "description": "", + "operationId": "getComment", + "summary": "Get comment thread", "tags": [ - "Todos" + "Comments" ], "parameters": [ { - "in": "query", - "name": "completed", - "schema": { - "type": "string", - "enum": [ - "true", - "false" - ] - }, - "required": false - }, - { - "in": "query", - "name": "priority", - "schema": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - "required": false - }, - { - "in": "query", - "name": "dueBefore", - "schema": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "required": false - }, - { - "in": "query", - "name": "dueAfter", + "in": "path", + "name": "id", "schema": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "minLength": 1 }, - "required": false + "required": true } ], "responses": { @@ -3430,12 +3099,22 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/todosListResponseSchema" + "$ref": "#/components/schemas/commentThreadResponseSchema" } } } }, - "401": { + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { "description": "Error response", "content": { "application/json": { @@ -3447,67 +3126,48 @@ } } }, - "post": { - "operationId": "createTodo", - "summary": "List todos for the current user.", - "description": "", + "patch": { + "operationId": "updateComment", + "summary": "Update one comment", "tags": [ - "Todos" + "Comments" ], - "parameters": [ - { - "in": "query", - "name": "completed", - "schema": { - "type": "string", - "enum": [ - "true", - "false" - ] - }, - "required": false - }, + "security": [ { - "in": "query", - "name": "priority", - "schema": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - "required": false + "bearerAuth": [] }, { - "in": "query", - "name": "dueBefore", - "schema": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" - }, - "required": false - }, + "sessionCookie": [] + } + ], + "parameters": [ { - "in": "query", - "name": "dueAfter", + "in": "path", + "name": "id", "schema": { "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$" + "minLength": 1 }, - "required": false + "required": true } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commentUpdateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/idResponseSchema" + "$ref": "#/components/schemas/commentUpdateResponseSchema" } } } @@ -3531,26 +3191,42 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/todoCreateRequestSchema" + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } - } - }, - "/api/todos/{id}": { - "patch": { - "operationId": "updateTodo", - "summary": "Update one todo.", - "description": "", + }, + "delete": { + "operationId": "deleteComment", + "summary": "Delete one comment", "tags": [ - "Todos" + "Comments" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "parameters": [ { @@ -3560,8 +3236,7 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { @@ -3575,7 +3250,7 @@ } } }, - "400": { + "401": { "description": "Error response", "content": { "application/json": { @@ -3584,44 +3259,62 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/todoUpdateRequestSchema" - } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } } } } - }, + } + }, + "/api/comments/batch": { "delete": { - "operationId": "deleteTodo", - "summary": "Update one todo.", - "description": "", + "operationId": "delete-api-comments-batch", + "summary": "Delete multiple comments owned by the current user", "tags": [ - "Todos" + "Comments" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commentBatchDeleteRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/successResponseSchema" + "$ref": "#/components/schemas/commentBatchDeleteResponseSchema" } } } @@ -3636,7 +3329,7 @@ } } }, - "404": { + "401": { "description": "Error response", "content": { "application/json": { @@ -3645,61 +3338,60 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/todoUpdateRequestSchema" + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } } }, - "/api/uploads": { + "/api/courses/{jwId}": { "get": { - "operationId": "listUploads", - "summary": "List uploads of current user.", - "description": "", + "operationId": "getCourse", + "summary": "Get course", "tags": [ - "Uploads" + "Courses" + ], + "parameters": [ + { + "in": "path", + "name": "jwId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + } ], - "parameters": [], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/uploadsListResponseSchema" + "$ref": "#/components/schemas/courseDetailSchema" } } } - } - } - }, - "post": { - "operationId": "createUpload", - "summary": "List uploads of current user.", - "description": "", - "tags": [ - "Uploads" - ], - "parameters": [], - "responses": { - "200": { - "description": "Successful response", + }, + "400": { + "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/uploadCreateResponseSchema" + "$ref": "#/components/schemas/openApiErrorSchema" } } } }, - "400": { + "404": { "description": "Error response", "content": { "application/json": { @@ -3709,45 +3401,52 @@ } } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadCreateRequestSchema" - } - } - } } } }, - "/api/uploads/{id}": { - "patch": { - "operationId": "updateUpload", - "summary": "Rename one upload.", - "description": "", + "/api/dashboard-links/pin": { + "post": { + "operationId": "pinDashboardLink", + "summary": "Pin dashboard link", "tags": [ - "Uploads" + "DashboardLinks" ], - "parameters": [ + "security": [ { - "in": "path", - "name": "id", - "schema": { - "type": "string", - "minLength": 1 - }, - "required": true, - "example": "123" + "bearerAuth": [] + }, + { + "sessionCookie": [] } ], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/uploadRenameResponseSchema" + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + } + } + } + }, + "303": { + "description": "Redirect after pin/unpin", + "headers": { + "Location": { + "description": "Redirect target URL", + "schema": { + "type": "string" } } } @@ -3757,7 +3456,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" } } } @@ -3767,38 +3466,101 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" } } } }, - "404": { + "500": { "description": "Error response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/openApiErrorSchema" + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" } } } } - }, + } + } + }, + "/api/dashboard-links/visit": { + "get": { + "operationId": "visitDashboardLink", + "summary": "Preview dashboard link", + "tags": [ + "DashboardLinks" + ], + "parameters": [ + { + "in": "query", + "name": "slug", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "307": { + "description": "Temporary redirect to target link", + "headers": { + "Location": { + "description": "Redirect target URL", + "schema": { + "type": "string" + } + } + } + } + } + }, + "post": { + "operationId": "recordDashboardLinkVisit", + "summary": "Record one dashboard link visit and redirect", + "tags": [ + "DashboardLinks" + ], "requestBody": { + "required": true, "content": { - "application/json": { + "application/x-www-form-urlencoded": { "schema": { - "$ref": "#/components/schemas/uploadRenameRequestSchema" + "$ref": "#/components/schemas/dashboardLinkVisitRequestSchema" + } + } + } + }, + "responses": { + "303": { + "description": "Redirect after recording link click", + "headers": { + "Location": { + "description": "Redirect target URL", + "schema": { + "type": "string" + } } } } } - }, - "delete": { - "operationId": "deleteUpload", - "summary": "Rename one upload.", - "description": "", + } + }, + "/api/homeworks/{id}": { + "patch": { + "operationId": "updateHomework", + "summary": "Update one homework", "tags": [ - "Uploads" + "Homeworks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "parameters": [ { @@ -3808,17 +3570,26 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkUpdateRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/uploadDeleteResponseSchema" + "$ref": "#/components/schemas/homeworkUpdateResponseSchema" } } } @@ -3843,7 +3614,7 @@ } } }, - "404": { + "403": { "description": "Error response", "content": { "application/json": { @@ -3852,26 +3623,32 @@ } } } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadRenameRequestSchema" + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } - } - }, - "/api/uploads/{id}/download": { - "get": { - "operationId": "downloadUpload", - "summary": "Redirect to signed URL for one upload.", - "description": "", + }, + "delete": { + "operationId": "deleteHomework", + "summary": "Soft delete one homework", "tags": [ - "Uploads" + "Homeworks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], "parameters": [ { @@ -3881,18 +3658,16 @@ "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { - "302": { - "description": "Redirect", - "headers": { - "Location": { + "200": { + "description": "Successful response", + "content": { + "application/json": { "schema": { - "type": "string", - "format": "uri" + "$ref": "#/components/schemas/successResponseSchema" } } } @@ -3907,6 +3682,16 @@ } } }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, "404": { "description": "Error response", "content": { @@ -3920,22 +3705,38 @@ } } }, - "/api/uploads/complete": { - "post": { - "operationId": "completeUpload", - "summary": "Finalize one upload after S3 put.", - "description": "", + "/api/homeworks/completions": { + "put": { + "operationId": "put-api-homeworks-completions", + "summary": "Update homework completions in a batch", "tags": [ - "Uploads" + "Homeworks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } ], - "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkCompletionBatchRequestSchema" + } + } + } + }, "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/uploadCompleteResponseSchema" + "$ref": "#/components/schemas/homeworkCompletionBatchResponseSchema" } } } @@ -3949,52 +3750,192 @@ } } } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/uploadCompleteRequestSchema" + } + } + }, + "/api/me/overview": { + "get": { + "operationId": "get-api-me-overview", + "summary": "Get a compact current-user overview for lightweight clients", + "tags": [ + "Me" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "atTime", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "homeworkWindowDays", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 90 + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 50 + } + }, + { + "in": "query", + "name": "locale", + "schema": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/compactOverviewResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } } } } } }, - "/api/users/{userId}/calendar.ics": { + "/api/sections/{jwId}": { "get": { - "operationId": "getUserCalendar", - "summary": "Generate calendar ICS for a user's subscribed sections and personal deadlines.", - "description": "", + "operationId": "getSection", + "summary": "Get section", "tags": [ - "Calendar" + "Sections" ], "parameters": [ { "in": "path", - "name": "userId", + "name": "jwId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/sectionDetailSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/sections/calendar.ics": { + "get": { + "operationId": "getSectionsCalendar", + "summary": "Generate sections calendar", + "tags": [ + "Sections" + ], + "parameters": [ + { + "in": "query", + "name": "sectionIds", "schema": { "type": "string", "minLength": 1 }, - "required": true, - "example": "123" + "required": true } ], "responses": { "200": { - "description": "Binary response", + "description": "Calendar response", "content": { - "application/octet-stream": { + "text/calendar": { "schema": { - "type": "string", - "format": "binary" + "type": "string" } } } }, - "401": { + "400": { "description": "Error response", "content": { "application/json": { @@ -4003,8 +3944,39 @@ } } } + } + } + } + }, + "/api/sections/match-codes": { + "post": { + "operationId": "matchSectionCodes", + "summary": "Match section codes", + "tags": [ + "Sections" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/matchSectionCodesRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/matchSectionCodesResponseSchema" + } + } + } }, - "403": { + "400": { "description": "Error response", "content": { "application/json": { @@ -4026,301 +3998,10026 @@ } } } - } - }, - "components": { - "schemas": { - "adminModeratedCommentResponseSchema": { - "type": "object", - "properties": { - "comment": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" - }, - "visibility": { - "type": "string", - "enum": [ - "public", - "logged_in_only", - "anonymous" - ] - }, - "status": { - "type": "string", - "enum": [ - "active", - "softbanned", - "deleted" - ] - }, - "isAnonymous": { - "type": "boolean" - }, - "authorName": { - "type": "string", - "nullable": true - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "deletedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "moderatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "moderationNote": { - "type": "string", - "nullable": true - }, - "userId": { - "type": "string", - "nullable": true - }, - "moderatedById": { - "type": "string", - "nullable": true - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionTeacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "homeworkId": { - "type": "string", - "nullable": true + }, + "/api/semesters/current": { + "get": { + "operationId": "getCurrentSemester", + "summary": "Get current semester", + "tags": [ + "Semesters" + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/semesterSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } } + } + } + } + } + }, + "/api/teachers/{id}": { + "get": { + "operationId": "getTeacher", + "summary": "Get teacher", + "tags": [ + "Teachers" + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "integer", + "format": "int64" }, - "required": [ - "id", - "body", - "visibility", - "status", - "isAnonymous", - "authorName", - "createdAt", - "updatedAt", - "deletedAt", - "moderatedAt", - "moderationNote", - "userId", - "moderatedById", - "parentId", - "rootId", - "sectionId", - "courseId", - "teacherId", - "sectionTeacherId", - "homeworkId" - ], - "additionalProperties": false + "required": true } - }, - "required": [ - "comment" ], - "additionalProperties": false - }, - "openApiErrorSchema": { - "type": "object", - "properties": { - "error": { - "type": "string" + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/teacherDetailSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } } - }, - "required": [ - "error" + } + } + }, + "/api/todos/{id}": { + "patch": { + "operationId": "updateTodo", + "summary": "Update one todo", + "tags": [ + "Todos" ], - "additionalProperties": false - }, - "adminModerateCommentRequestSchema": { - "type": "object", - "properties": { - "status": { - "type": "string", - "enum": [ - "active", - "softbanned", - "deleted" - ] + "security": [ + { + "bearerAuth": [] }, - "moderationNote": { - "type": "string", - "nullable": true + { + "sessionCookie": [] } - }, - "required": [ - "status" ], - "additionalProperties": false - }, - "adminCommentsResponseSchema": { - "type": "object", - "properties": { - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" - }, - "visibility": { - "type": "string", - "enum": [ - "public", - "logged_in_only", - "anonymous" - ] - }, - "status": { - "type": "string", - "enum": [ - "active", - "softbanned", - "deleted" - ] - }, - "isAnonymous": { - "type": "boolean" - }, - "authorName": { - "type": "string", - "nullable": true - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoUpdateRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoUpdateResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteTodo", + "summary": "Delete one todo", + "tags": [ + "Todos" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/successResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/todos/batch": { + "patch": { + "operationId": "patch-api-todos-batch", + "summary": "Update completion state for multiple todos", + "tags": [ + "Todos" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoCompletionBatchRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoCompletionBatchResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + }, + "delete": { + "operationId": "delete-api-todos-batch", + "summary": "Delete multiple todos by id", + "tags": [ + "Todos" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoBatchDeleteRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/todoBatchDeleteResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/uploads/{id}": { + "patch": { + "operationId": "updateUpload", + "summary": "Rename one upload", + "tags": [ + "Uploads" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/uploadRenameRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/uploadRenameResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + }, + "delete": { + "operationId": "deleteUpload", + "summary": "Delete one upload", + "tags": [ + "Uploads" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/uploadDeleteResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "502": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/uploads/complete": { + "post": { + "operationId": "completeUpload", + "summary": "Complete upload", + "tags": [ + "Uploads" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/uploadCompleteRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/uploadCompleteResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/uploads/object": { + "put": { + "operationId": "put-api-uploads-object", + "summary": "Write upload object", + "tags": [ + "Uploads" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "key", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/successResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "413": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/users/profile": { + "get": { + "operationId": "get-api-users-profile", + "summary": "Get public user profile", + "tags": [ + "Api" + ], + "parameters": [ + { + "in": "query", + "name": "username", + "schema": { + "type": "string", + "minLength": 1 + } + }, + { + "in": "query", + "name": "userId", + "schema": { + "type": "string", + "minLength": 1 + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/publicUserProfileResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/.well-known/oauth-authorization-server/api/auth": { + "get": { + "operationId": "get-.well-known-oauth-authorization-server-api-auth", + "summary": "Canonical RFC 8414 authorization server metadata for issuer `/api/auth`", + "tags": [ + "Api" + ], + "responses": { + "200": { + "description": "Response 200" + } + } + }, + "options": { + "operationId": "options-.well-known-oauth-authorization-server-api-auth", + "summary": "Canonical RFC 8414 authorization server metadata for issuer `/api/auth`", + "tags": [ + "Api" + ], + "responses": { + "200": { + "description": "Response 200" + } + } + } + }, + "/.well-known/oauth-authorization-server/api/mcp": { + "get": { + "operationId": "get-.well-known-oauth-authorization-server-api-mcp", + "summary": "Compatibility alias for clients that probe resource-path authorization-server metadata", + "tags": [ + "Api" + ], + "responses": { + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } + } + } + }, + "options": { + "operationId": "options-.well-known-oauth-authorization-server-api-mcp", + "summary": "Compatibility alias for clients that probe resource-path authorization-server metadata", + "tags": [ + "Api" + ], + "responses": { + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } + } + } + } + }, + "/.well-known/oauth-protected-resource/api/mcp": { + "get": { + "operationId": "get-.well-known-oauth-protected-resource-api-mcp", + "summary": "Canonical RFC 9728 protected resource metadata for MCP", + "tags": [ + "Api" + ], + "responses": { + "200": { + "description": "Response 200" + } + } + }, + "options": { + "operationId": "options-.well-known-oauth-protected-resource-api-mcp", + "summary": "Canonical RFC 9728 protected resource metadata for MCP", + "tags": [ + "Api" + ], + "responses": { + "200": { + "description": "Response 200" + } + } + } + }, + "/.well-known/openid-configuration/api/auth": { + "get": { + "operationId": "get-.well-known-openid-configuration-api-auth", + "summary": "RFC 8414-compatible path form for OpenID provider metadata", + "tags": [ + "Api" + ], + "responses": { + "200": { + "description": "Response 200" + } + } + }, + "options": { + "operationId": "options-.well-known-openid-configuration-api-auth", + "summary": "RFC 8414-compatible path form for OpenID provider metadata", + "tags": [ + "Api" + ], + "responses": { + "200": { + "description": "Response 200" + } + } + } + }, + "/.well-known/openid-configuration/api/mcp": { + "get": { + "operationId": "get-.well-known-openid-configuration-api-mcp", + "summary": "Compatibility alias for clients that probe resource-path OIDC metadata", + "tags": [ + "Api" + ], + "responses": { + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } + } + } + }, + "options": { + "operationId": "options-.well-known-openid-configuration-api-mcp", + "summary": "Compatibility alias for clients that probe resource-path OIDC metadata", + "tags": [ + "Api" + ], + "responses": { + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } + } + } + } + }, + "/api/admin/comments/{id}": { + "patch": { + "operationId": "moderateAdminComment", + "summary": "Moderate one comment", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminModerateCommentRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminModeratedCommentResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/admin/descriptions/{id}": { + "patch": { + "operationId": "updateAdminDescription", + "summary": "Update one description from moderation", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminModerateDescriptionRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminModeratedDescriptionResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/admin/homeworks/{id}": { + "delete": { + "operationId": "deleteAdminHomework", + "summary": "Delete one homework", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/successResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/admin/suspensions/{id}": { + "patch": { + "operationId": "updateAdminSuspension", + "summary": "Lift one suspension", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminSuspensionResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/admin/users/{id}": { + "patch": { + "operationId": "updateAdminUser", + "summary": "Update one user", + "tags": [ + "Admin" + ], + "security": [ + { + "sessionCookie": [] + } + ], + "x-auth-role": "admin", + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminUpdateUserRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/adminUserResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/auth/.well-known/openid-configuration": { + "get": { + "operationId": "get-api-auth-.well-known-openid-configuration", + "summary": "OpenID Connect discovery metadata for issuer `/api/auth`", + "tags": [ + "Api" + ], + "responses": { + "200": { + "description": "Response 200" + } + } + }, + "options": { + "operationId": "options-api-auth-.well-known-openid-configuration", + "summary": "OpenID Connect discovery metadata for issuer `/api/auth`", + "tags": [ + "Api" + ], + "responses": { + "200": { + "description": "Response 200" + } + } + } + }, + "/api/auth/oauth2/device-authorization": { + "post": { + "operationId": "post-api-auth-oauth2-device-authorization", + "summary": "Start OAuth 2.0 device authorization", + "tags": [ + "Api" + ], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/oauthDeviceAuthorizationRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthDeviceAuthorizationResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthErrorResponseSchema" + } + } + } + } + } + }, + "options": { + "operationId": "options-api-auth-oauth2-device-authorization", + "summary": "Return OAuth device authorization CORS preflight headers", + "tags": [ + "Api" + ], + "responses": { + "204": { + "description": "Response 204" + } + } + } + }, + "/api/auth/oauth2/token": { + "get": { + "operationId": "get-api-auth-oauth2-token", + "summary": "Return method guidance for OAuth token clients", + "tags": [ + "Api" + ], + "responses": { + "405": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthErrorResponseSchema" + } + } + } + } + } + }, + "post": { + "operationId": "post-api-auth-oauth2-token", + "summary": "Exchange OAuth 2.0 authorization/device/refresh grants for tokens", + "tags": [ + "Api" + ], + "requestBody": { + "required": true, + "content": { + "application/x-www-form-urlencoded": { + "schema": { + "$ref": "#/components/schemas/oauthTokenRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthTokenResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthErrorResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/oauthErrorResponseSchema" + } + } + } + } + } + } + }, + "/api/comments/{id}/reactions": { + "post": { + "operationId": "addCommentReaction", + "summary": "Add one reaction to a comment", + "tags": [ + "Comments" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/commentReactionRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/successResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + }, + "delete": { + "operationId": "removeCommentReaction", + "summary": "Remove one reaction from a comment", + "tags": [ + "Comments" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + }, + { + "in": "query", + "name": "type", + "schema": { + "type": "string", + "enum": [ + "upvote", + "downvote", + "heart", + "laugh", + "hooray", + "confused", + "rocket", + "eyes" + ] + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/successResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/dashboard-links/pin/batch": { + "post": { + "operationId": "post-api-dashboard-links-pin-batch", + "summary": "Pin or unpin multiple dashboard links in one request", + "tags": [ + "DashboardLinks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinBatchRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "500": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dashboardLinkPinResponseSchema" + } + } + } + } + } + } + }, + "/api/homeworks/{id}/completion": { + "put": { + "operationId": "setHomeworkCompletion", + "summary": "Update homework completion", + "tags": [ + "Homeworks" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkCompletionRequestSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/homeworkCompletionResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/mcp/.well-known/oauth-authorization-server": { + "get": { + "operationId": "get-api-mcp-.well-known-oauth-authorization-server", + "summary": "MCP resource-relative authorization server metadata compatibility alias", + "tags": [ + "Api" + ], + "responses": { + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } + } + } + }, + "options": { + "operationId": "options-api-mcp-.well-known-oauth-authorization-server", + "summary": "MCP resource-relative authorization server metadata compatibility alias", + "tags": [ + "Api" + ], + "responses": { + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } + } + } + } + }, + "/api/mcp/.well-known/openid-configuration": { + "get": { + "operationId": "get-api-mcp-.well-known-openid-configuration", + "summary": "MCP resource-relative OpenID discovery compatibility alias", + "tags": [ + "Api" + ], + "responses": { + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } + } + } + }, + "options": { + "operationId": "options-api-mcp-.well-known-openid-configuration", + "summary": "MCP resource-relative OpenID discovery compatibility alias", + "tags": [ + "Api" + ], + "responses": { + "307": { + "description": "Redirect", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + } + } + } + } + } + } + }, + "/api/me/subscriptions/homeworks": { + "get": { + "operationId": "getSubscribedHomeworks", + "summary": "List subscribed homeworks", + "tags": [ + "Me" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscribedHomeworksResponseSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/me/subscriptions/schedules": { + "get": { + "operationId": "get-api-me-subscriptions-schedules", + "summary": "List schedules across the current user's subscribed sections", + "tags": [ + "Me" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "query", + "name": "dateFrom", + "schema": { + "type": "string", + "minLength": 1, + "description": "YYYY-MM-DD or ISO date/time accepted by parseDateInput" + } + }, + { + "in": "query", + "name": "dateTo", + "schema": { + "type": "string", + "minLength": 1, + "description": "YYYY-MM-DD or ISO date/time accepted by parseDateInput" + } + }, + { + "in": "query", + "name": "weekday", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 7 + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 300 + } + }, + { + "in": "query", + "name": "locale", + "schema": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } + } + ], + "responses": { + "200": { + "description": "Successful response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/subscribedSchedulesResponseSchema" + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/sections/{jwId}/calendar.ics": { + "get": { + "operationId": "getSectionCalendar", + "summary": "Generate section calendar", + "tags": [ + "Sections" + ], + "parameters": [ + { + "in": "path", + "name": "jwId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Calendar response", + "content": { + "text/calendar": { + "schema": { + "type": "string" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/sections/{jwId}/schedule-groups": { + "get": { + "operationId": "getSectionScheduleGroups", + "summary": "Get schedule groups", + "tags": [ + "Sections" + ], + "parameters": [ + { + "in": "path", + "name": "jwId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Array response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/sections/{jwId}/schedules": { + "get": { + "operationId": "getSectionSchedules", + "summary": "Get section schedules", + "tags": [ + "Sections" + ], + "parameters": [ + { + "in": "path", + "name": "jwId", + "schema": { + "type": "integer", + "format": "int64" + }, + "required": true + }, + { + "in": "query", + "name": "dateFrom", + "schema": { + "type": "string", + "minLength": 1, + "description": "YYYY-MM-DD or ISO date/time accepted by parseDateInput" + } + }, + { + "in": "query", + "name": "dateTo", + "schema": { + "type": "string", + "minLength": 1, + "description": "YYYY-MM-DD or ISO date/time accepted by parseDateInput" + } + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "format": "int64", + "minimum": 1, + "maximum": 200 + } + } + ], + "responses": { + "200": { + "description": "Array response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "object" + } + } + } + } + }, + "400": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/uploads/{id}/download": { + "get": { + "operationId": "downloadUpload", + "summary": "Download upload", + "tags": [ + "Uploads" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1 + }, + "required": true + } + ], + "responses": { + "200": { + "description": "Binary response", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + }, + "/api/users/{userId}/calendar.ics": { + "get": { + "operationId": "getUserCalendar", + "summary": "Generate user calendar", + "tags": [ + "Calendar" + ], + "security": [ + { + "bearerAuth": [] + }, + { + "sessionCookie": [] + }, + { + "calendarFeedToken": [] + } + ], + "parameters": [ + { + "in": "path", + "name": "userId", + "schema": { + "type": "string", + "minLength": 1, + "description": "User ID. Token-bearing feed URLs may also use the userId:token path segment form." + }, + "required": true, + "description": "User ID. Token-bearing feed URLs may also use the userId:token path segment form." + }, + { + "in": "query", + "name": "token", + "schema": { + "description": "Calendar feed token for anonymous personal iCal access.", + "type": "string", + "minLength": 1 + }, + "description": "Calendar feed token for anonymous personal iCal access." + } + ], + "responses": { + "200": { + "description": "Calendar response", + "content": { + "text/calendar": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "403": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + }, + "404": { + "description": "Error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/openApiErrorSchema" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "__schema0": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "visibility": { + "type": "string" + }, + "status": { + "type": "string" + }, + "author": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isUstcVerified": { + "type": "boolean" + }, + "isAdmin": { + "type": "boolean" + }, + "isGuest": { + "type": "boolean" + } + }, + "required": [ + "name", + "isUstcVerified", + "isAdmin", + "isGuest" + ] + }, + "authorHidden": { + "type": "boolean" + }, + "isAnonymous": { + "type": "boolean" + }, + "isAuthor": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "parentId": { + "nullable": true, + "type": "string" + }, + "rootId": { + "nullable": true, + "type": "string" + }, + "replies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/__schema0" + } + }, + "attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "uploadId": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "url": { + "type": "string" + }, + "contentType": { + "nullable": true, + "type": "string" + }, + "size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "uploadId", + "filename", + "url", + "contentType", + "size" + ] + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "viewerHasReacted": { + "type": "boolean" + } + }, + "required": [ + "type", + "count", + "viewerHasReacted" + ] + } + }, + "canReact": { + "type": "boolean" + }, + "canReply": { + "type": "boolean" + }, + "canEdit": { + "type": "boolean" + }, + "canDelete": { + "type": "boolean" + }, + "canModerate": { + "type": "boolean" + } + }, + "required": [ + "id", + "body", + "visibility", + "status", + "author", + "authorHidden", + "isAnonymous", + "isAuthor", + "createdAt", + "updatedAt", + "parentId", + "rootId", + "replies", + "attachments", + "reactions", + "canReact", + "canReply", + "canEdit", + "canDelete", + "canModerate" + ] + }, + "semesterSchema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "code": { + "type": "string" + }, + "startDate": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "endDate": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "code", + "startDate", + "endDate" + ] + }, + "__schema1": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "visibility": { + "type": "string" + }, + "status": { + "type": "string" + }, + "author": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isUstcVerified": { + "type": "boolean" + }, + "isAdmin": { + "type": "boolean" + }, + "isGuest": { + "type": "boolean" + } + }, + "required": [ + "name", + "isUstcVerified", + "isAdmin", + "isGuest" + ], + "additionalProperties": false + }, + "authorHidden": { + "type": "boolean" + }, + "isAnonymous": { + "type": "boolean" + }, + "isAuthor": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "parentId": { + "nullable": true, + "type": "string" + }, + "rootId": { + "nullable": true, + "type": "string" + }, + "replies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/__schema1" + } + }, + "attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "uploadId": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "url": { + "type": "string" + }, + "contentType": { + "nullable": true, + "type": "string" + }, + "size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "uploadId", + "filename", + "url", + "contentType", + "size" + ], + "additionalProperties": false + } + }, + "reactions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "viewerHasReacted": { + "type": "boolean" + } + }, + "required": [ + "type", + "count", + "viewerHasReacted" + ], + "additionalProperties": false + } + }, + "canReact": { + "type": "boolean" + }, + "canReply": { + "type": "boolean" + }, + "canEdit": { + "type": "boolean" + }, + "canDelete": { + "type": "boolean" + }, + "canModerate": { + "type": "boolean" + } + }, + "required": [ + "id", + "body", + "visibility", + "status", + "author", + "authorHidden", + "isAnonymous", + "isAuthor", + "createdAt", + "updatedAt", + "parentId", + "rootId", + "replies", + "attachments", + "reactions", + "canReact", + "canReply", + "canEdit", + "canDelete", + "canModerate" + ], + "additionalProperties": false + }, + "busQueryResponseSchema": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "enum": [ + "zh-cn", + "en-us" + ] + }, + "fetchedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "version": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "effectiveFrom": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "effectiveUntil": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "importedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "notice": { + "nullable": true, + "type": "object", + "properties": { + "message": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "message", + "url" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "key", + "title", + "effectiveFrom", + "effectiveUntil", + "importedAt", + "notice" + ], + "additionalProperties": false + }, + "availableVersions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "key": { + "type": "string" + }, + "title": { + "type": "string" + }, + "effectiveFrom": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "effectiveUntil": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "importedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "notice": { + "nullable": true, + "type": "object", + "properties": { + "message": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "message", + "url" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "key", + "title", + "effectiveFrom", + "effectiveUntil", + "importedAt", + "notice" + ], + "additionalProperties": false + } + }, + "campuses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "routes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "descriptionPrimary": { + "type": "string" + }, + "descriptionSecondary": { + "nullable": true, + "type": "string" + }, + "stops": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stopOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campus": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "stopOrder", + "campus" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "descriptionPrimary", + "descriptionSecondary", + "stops" + ], + "additionalProperties": false + } + }, + "trips": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "routeId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "dayType": { + "type": "string", + "enum": [ + "weekday", + "weekend" + ] + }, + "position": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stopTimes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stopOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusName": { + "type": "string" + }, + "time": { + "nullable": true, + "type": "string" + }, + "minutesSinceMidnight": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "isPassThrough": { + "type": "boolean" + } + }, + "required": [ + "stopOrder", + "campusId", + "campusName", + "time", + "minutesSinceMidnight", + "isPassThrough" + ], + "additionalProperties": false + } + }, + "departureTime": { + "nullable": true, + "type": "string" + }, + "departureMinutes": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "arrivalTime": { + "nullable": true, + "type": "string" + }, + "arrivalMinutes": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "routeId", + "dayType", + "position", + "stopTimes", + "departureTime", + "departureMinutes", + "arrivalTime", + "arrivalMinutes" + ], + "additionalProperties": false + } + }, + "preferences": { + "nullable": true, + "type": "object", + "properties": { + "preferredOriginCampusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "preferredDestinationCampusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "showDepartedTrips": { + "type": "boolean" + } + }, + "required": [ + "preferredOriginCampusId", + "preferredDestinationCampusId", + "showDepartedTrips" + ], + "additionalProperties": false + }, + "notice": { + "nullable": true, + "type": "object", + "properties": { + "message": { + "nullable": true, + "type": "string" + }, + "url": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "message", + "url" + ], + "additionalProperties": false + } + }, + "required": [ + "locale", + "fetchedAt", + "version", + "availableVersions", + "campuses", + "routes", + "trips", + "preferences", + "notice" + ], + "additionalProperties": false + }, + "openApiErrorSchema": { + "type": "object", + "properties": { + "error": { + "type": "string" + } + }, + "required": [ + "error" + ], + "additionalProperties": false + }, + "calendarSubscriptionCreateRequestSchema": { + "type": "object", + "properties": { + "sectionIds": { + "type": "array", + "items": { + "type": "integer", + "maximum": 9007199254740991, + "minimum": 1 + } + } + }, + "additionalProperties": false + }, + "calendarSubscriptionCreateResponseSchema": { + "type": "object", + "properties": { + "subscription": { + "nullable": true, + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } + }, + "calendarPath": { + "type": "string" + }, + "calendarUrl": { + "type": "string" + }, + "note": { + "type": "string" + } + }, + "required": [ + "userId", + "sections", + "calendarPath", + "calendarUrl", + "note" + ], + "additionalProperties": false + } + }, + "required": [ + "subscription" + ], + "additionalProperties": false + }, + "calendarSubscriptionAppendRequestSchema": { + "type": "object", + "properties": { + "sectionIds": { + "type": "array", + "items": { + "type": "integer", + "maximum": 9007199254740991, + "minimum": 1 + } + } + }, + "required": [ + "sectionIds" + ], + "additionalProperties": false + }, + "calendarSubscriptionAppendResponseSchema": { + "type": "object", + "properties": { + "subscription": { + "nullable": true, + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } + }, + "calendarPath": { + "type": "string" + }, + "calendarUrl": { + "type": "string" + }, + "note": { + "type": "string" + } + }, + "required": [ + "userId", + "sections", + "calendarPath", + "calendarUrl", + "note" + ], + "additionalProperties": false + }, + "addedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "alreadySubscribedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "subscription", + "addedCount", + "alreadySubscribedCount" + ], + "additionalProperties": false + }, + "calendarSubscriptionRemoveRequestSchema": { + "type": "object", + "properties": { + "sectionIds": { + "type": "array", + "items": { + "type": "integer", + "maximum": 9007199254740991, + "minimum": 1 + } + } + }, + "required": [ + "sectionIds" + ], + "additionalProperties": false + }, + "calendarSubscriptionRemoveResponseSchema": { + "type": "object", + "properties": { + "subscription": { + "nullable": true, + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } + }, + "calendarPath": { + "type": "string" + }, + "calendarUrl": { + "type": "string" + }, + "note": { + "type": "string" + } + }, + "required": [ + "userId", + "sections", + "calendarPath", + "calendarUrl", + "note" + ], + "additionalProperties": false + } + }, + "required": [ + "subscription" + ], + "additionalProperties": false + }, + "commentsListResponseSchema": { + "type": "object", + "properties": { + "comments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/__schema1" + } + }, + "hiddenCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "viewer": { + "type": "object", + "properties": { + "userId": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "isAuthenticated": { + "type": "boolean" + }, + "isSuspended": { + "type": "boolean" + }, + "suspensionReason": { + "nullable": true, + "type": "string" + }, + "suspensionExpiresAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "userId", + "name", + "image", + "isAdmin", + "isAuthenticated", + "isSuspended", + "suspensionReason", + "suspensionExpiresAt" + ], + "additionalProperties": false + }, + "target": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "targetId": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "courseId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + }, + "sectionTeacherSectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherTeacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherSectionJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherSectionCode": { + "nullable": true, + "type": "string" + }, + "sectionTeacherTeacherName": { + "nullable": true, + "type": "string" + }, + "sectionTeacherCourseJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherCourseName": { + "nullable": true, + "type": "string" + }, + "homeworkTitle": { + "nullable": true, + "type": "string" + }, + "homeworkSectionJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkSectionCode": { + "nullable": true, + "type": "string" + }, + "sectionJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionCode": { + "nullable": true, + "type": "string" + }, + "courseJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseName": { + "nullable": true, + "type": "string" + }, + "teacherName": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "type", + "targetId", + "courseId", + "sectionId", + "teacherId", + "sectionTeacherId", + "homeworkId", + "sectionTeacherSectionId", + "sectionTeacherTeacherId", + "sectionTeacherSectionJwId", + "sectionTeacherSectionCode", + "sectionTeacherTeacherName", + "sectionTeacherCourseJwId", + "sectionTeacherCourseName", + "homeworkTitle", + "homeworkSectionJwId", + "homeworkSectionCode", + "sectionJwId", + "sectionCode", + "courseJwId", + "courseName", + "teacherName" + ], + "additionalProperties": false + } + }, + "required": [ + "comments", + "hiddenCount", + "viewer", + "target" + ], + "additionalProperties": false + }, + "commentCreateRequestSchema": { + "type": "object", + "properties": { + "targetType": { + "type": "string", + "enum": [ + "section", + "course", + "teacher", + "section-teacher", + "homework" + ] + }, + "targetId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "sectionId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "sectionJwId": { + "anyOf": [ + { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + { + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991 + } + ] + }, + "courseJwId": { + "anyOf": [ + { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + { + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991 + } + ] + }, + "teacherId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "homeworkId": { + "type": "string", + "minLength": 1 + }, + "sectionTeacherId": { + "anyOf": [ + { + "type": "integer", + "format": "int64", + "minimum": 1 + }, + { + "type": "integer", + "minimum": 1, + "maximum": 9007199254740991 + } + ] + }, + "body": { + "type": "string", + "minLength": 1, + "maxLength": 8000 + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "logged_in_only" + ] + }, + "isAnonymous": { + "type": "boolean" + }, + "parentId": { + "nullable": true, + "type": "string" + }, + "attachmentIds": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "targetType", + "body" + ], + "additionalProperties": false + }, + "idResponseSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + }, + "required": [ + "id" + ], + "additionalProperties": false + }, + "paginatedCourseResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type" + ], + "additionalProperties": false + } + }, + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "pageSize": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalPages": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "page", + "pageSize", + "total", + "totalPages" + ], + "additionalProperties": false + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + }, + "descriptionsResponseSchema": { + "type": "object", + "properties": { + "description": { + "type": "object", + "properties": { + "id": { + "nullable": true, + "type": "string" + }, + "content": { + "type": "string" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "image", + "username" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "content", + "updatedAt", + "lastEditedAt", + "lastEditedBy" + ], + "additionalProperties": false + }, + "history": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "previousContent": { + "nullable": true, + "type": "string" + }, + "nextContent": { + "type": "string" + }, + "editor": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "image", + "username" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "createdAt", + "previousContent", + "nextContent", + "editor" + ], + "additionalProperties": false + } + }, + "viewer": { + "type": "object", + "properties": { + "userId": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "isAuthenticated": { + "type": "boolean" + }, + "isSuspended": { + "type": "boolean" + }, + "suspensionReason": { + "nullable": true, + "type": "string" + }, + "suspensionExpiresAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "userId", + "name", + "image", + "isAdmin", + "isAuthenticated", + "isSuspended", + "suspensionReason", + "suspensionExpiresAt" + ], + "additionalProperties": false + } + }, + "required": [ + "description", + "history", + "viewer" + ], + "additionalProperties": false + }, + "descriptionUpsertRequestSchema": { + "type": "object", + "properties": { + "targetType": { + "type": "string", + "enum": [ + "section", + "course", + "teacher", + "homework" + ] + }, + "targetId": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "number" + } + ] + }, + "sectionJwId": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "number" + } + ] + }, + "courseJwId": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "number" + } + ] + }, + "teacherId": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "number" + } + ] + }, + "homeworkId": { + "type": "string", + "minLength": 1 + }, + "content": { + "type": "string", + "maxLength": 4000 + } + }, + "required": [ + "targetType", + "content" + ], + "additionalProperties": false, + "anyOf": [ + { + "required": [ + "targetId" + ] + }, + { + "properties": { + "targetType": { + "enum": [ + "section" + ], + "type": "string" + } + }, + "required": [ + "sectionJwId" + ] + }, + { + "properties": { + "targetType": { + "enum": [ + "course" + ], + "type": "string" + } + }, + "required": [ + "courseJwId" + ] + }, + { + "properties": { + "targetType": { + "enum": [ + "teacher" + ], + "type": "string" + } + }, + "required": [ + "teacherId" + ] + }, + { + "properties": { + "targetType": { + "enum": [ + "homework" + ], + "type": "string" + } + }, + "required": [ + "homeworkId" + ] + } + ] + }, + "descriptionUpsertResponseSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "updated": { + "type": "boolean" + } + }, + "required": [ + "id", + "updated" + ], + "additionalProperties": false + }, + "homeworksListResponseSchema": { + "type": "object", + "properties": { + "viewer": { + "type": "object", + "properties": { + "userId": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "isAuthenticated": { + "type": "boolean" + }, + "isSuspended": { + "type": "boolean" + }, + "suspensionReason": { + "nullable": true, + "type": "string" + }, + "suspensionExpiresAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "userId", + "name", + "image", + "isAdmin", + "isAuthenticated", + "isSuspended", + "suspensionReason", + "suspensionExpiresAt" + ], + "additionalProperties": false + }, + "homeworks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + }, + "publishedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "submissionStartAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "submissionDueAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "deletedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "createdById": { + "nullable": true, + "type": "string" + }, + "updatedById": { + "nullable": true, + "type": "string" + }, + "deletedById": { + "nullable": true, + "type": "string" + }, + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false + }, + "description": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedById": { + "nullable": true, + "type": "string" + }, + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId" + ], + "additionalProperties": false + }, + "createdBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "updatedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "deletedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "completion": { + "nullable": true, + "type": "object", + "properties": { + "completedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "completedAt" + ], + "additionalProperties": false + }, + "commentCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "title", + "isMajor", + "requiresTeam", + "publishedAt", + "submissionStartAt", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "sectionId", + "createdById", + "updatedById", + "deletedById", + "section", + "description", + "createdBy", + "updatedBy", + "deletedBy", + "completion", + "commentCount" + ], + "additionalProperties": false + } + }, + "auditLogs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "action": { + "type": "string", + "enum": [ + "created", + "deleted" + ] + }, + "titleSnapshot": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + }, + "actorId": { + "nullable": true, + "type": "string" + }, + "actor": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "action", + "titleSnapshot", + "createdAt", + "sectionId", + "homeworkId", + "actorId", + "actor" + ], + "additionalProperties": false + } + } + }, + "required": [ + "viewer", + "homeworks", + "auditLogs" + ], + "additionalProperties": false + }, + "homeworkCreateRequestSchema": { + "anyOf": [ + { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "nullable": true, + "type": "string", + "maxLength": 4000 + }, + "publishedAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionStartAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionDueAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + }, + "sectionId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "sectionJwId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "title", + "sectionId" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "nullable": true, + "type": "string", + "maxLength": 4000 + }, + "publishedAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionStartAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionDueAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + }, + "sectionId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "sectionJwId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "title", + "sectionJwId" + ], + "additionalProperties": false + } + ] + }, + "homeworkCreateResponseSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "homework": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + }, + "publishedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "submissionStartAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "submissionDueAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "deletedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "createdById": { + "nullable": true, + "type": "string" + }, + "updatedById": { + "nullable": true, + "type": "string" + }, + "deletedById": { + "nullable": true, + "type": "string" + }, + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false + }, + "description": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedById": { + "nullable": true, + "type": "string" + }, + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId" + ], + "additionalProperties": false + }, + "createdBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "updatedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "deletedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "completion": { + "nullable": true, + "type": "object", + "properties": { + "completedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "completedAt" + ], + "additionalProperties": false + }, + "commentCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "title", + "isMajor", + "requiresTeam", + "publishedAt", + "submissionStartAt", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "sectionId", + "createdById", + "updatedById", + "deletedById", + "section", + "description", + "createdBy", + "updatedBy", + "deletedBy", + "completion", + "commentCount" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "homework" + ], + "additionalProperties": false + }, + "localeUpdateRequestSchema": { + "type": "object", + "properties": { + "locale": { + "type": "string", + "enum": [ + "en-us", + "zh-cn" + ] + } + }, + "required": [ + "locale" + ], + "additionalProperties": false + }, + "successResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + } + }, + "required": [ + "success" + ], + "additionalProperties": false + }, + "meResponseSchema": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "email": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "id", + "email", + "name", + "image", + "username", + "isAdmin", + "createdAt", + "updatedAt" + ], + "additionalProperties": false + }, + "metadataResponseSchema": { + "type": "object", + "properties": { + "educationLevels": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "courseCategories": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "courseClassifies": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "classTypes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "courseTypes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "courseGradations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "examModes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "teachLanguages": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "campuses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "buildings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "campusId" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "buildings" + ], + "additionalProperties": false + } + } + }, + "required": [ + "educationLevels", + "courseCategories", + "courseClassifies", + "classTypes", + "courseTypes", + "courseGradations", + "examModes", + "teachLanguages", + "campuses" + ], + "additionalProperties": false + }, + "openApiDocumentResponseSchema": { + "type": "object", + "properties": { + "openapi": { + "type": "string" + }, + "info": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "version": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "title", + "version" + ], + "additionalProperties": false + }, + "servers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "url" + ], + "additionalProperties": false + } + }, + "paths": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "openapi", + "info", + "paths" + ], + "additionalProperties": false + }, + "readinessResponseSchema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ok", + "degraded" + ] + }, + "uptimeSeconds": { + "type": "number", + "minimum": 0 + }, + "checks": { + "type": "object", + "properties": { + "database": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "ok", + "error" + ] + }, + "durationMs": { + "type": "number", + "minimum": 0 + } + }, + "required": [ + "status", + "durationMs" + ], + "additionalProperties": false + }, + "storage": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "binding": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "required": [ + "status", + "binding" + ], + "additionalProperties": false + } + }, + "required": [ + "database", + "storage" + ], + "additionalProperties": false + } + }, + "required": [ + "status", + "uptimeSeconds", + "checks" + ], + "additionalProperties": false + }, + "paginatedScheduleResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periods": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "date": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "weekday": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { + "type": "string" + }, + "endTime": { + "type": "string" + }, + "experiment": { + "nullable": true, + "type": "string" + }, + "customPlace": { + "nullable": true, + "type": "string" + }, + "lessonType": { + "nullable": true, + "type": "string" + }, + "weekIndex": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "exerciseClass": { + "nullable": true, + "type": "boolean" + }, + "startUnit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endUnit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "scheduleGroupId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "room": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "floor": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "virtual": { + "type": "boolean" + }, + "seatsForSection": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "seats": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "buildingId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "building": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "campusId", + "namePrimary", + "nameSecondary", + "campus" + ], + "additionalProperties": false + }, + "roomType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "floor", + "virtual", + "seatsForSection", + "remark", + "seats", + "buildingId", + "roomTypeId", + "namePrimary", + "nameSecondary", + "building", + "roomType" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary", + "department" + ], + "additionalProperties": false + } + }, + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false + }, + "scheduleGroup": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "no": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "actualPeriods": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "isDefault": { + "type": "boolean" + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "jwId", + "no", + "limitCount", + "stdCount", + "actualPeriods", + "isDefault", + "sectionId" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "periods", + "date", + "weekday", + "startTime", + "endTime", + "experiment", + "customPlace", + "lessonType", + "weekIndex", + "exerciseClass", + "startUnit", + "endUnit", + "roomId", + "sectionId", + "scheduleGroupId", + "room", + "teachers", + "section", + "scheduleGroup" + ], + "additionalProperties": false + } + }, + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "pageSize": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalPages": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "page", + "pageSize", + "total", + "totalPages" + ], + "additionalProperties": false + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + }, + "paginatedSectionResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "credits": { + "nullable": true, + "type": "number" + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "code": { + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "code" + ], + "additionalProperties": false + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "credits", + "stdCount", + "limitCount", + "courseId", + "semesterId", + "campusId", + "openDepartmentId", + "course", + "semester", + "campus", + "teachers" + ], + "additionalProperties": false + } + }, + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "pageSize": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalPages": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "page", + "pageSize", + "total", + "totalPages" + ], + "additionalProperties": false + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + }, + "paginatedSemesterResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/semesterSchema" + } + }, + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "pageSize": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalPages": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "page", + "pageSize", + "total", + "totalPages" + ], + "additionalProperties": false + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + }, + "paginatedTeacherResponseSchema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "department": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege" + ], + "additionalProperties": false + }, + "teacherTitle": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "enabled": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "enabled" + ], + "additionalProperties": false + }, + "_count": { + "type": "object", + "properties": { + "sections": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "sections" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "department", + "teacherTitle", + "_count" + ], + "additionalProperties": false + } + }, + "pagination": { + "type": "object", + "properties": { + "page": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "pageSize": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "total": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "totalPages": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "page", + "pageSize", + "total", + "totalPages" + ], + "additionalProperties": false + } + }, + "required": [ + "data", + "pagination" + ], + "additionalProperties": false + }, + "todosListResponseSchema": { + "type": "object", + "properties": { + "counts": { + "type": "object", + "properties": { + "incomplete": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "completed": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "overdue": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "incomplete", + "completed", + "overdue" + ], + "additionalProperties": false + }, + "todos": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "nullable": true, + "type": "string" + }, + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "completed": { + "type": "boolean" + }, + "dueAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "id", + "title", + "content", + "priority", + "completed", + "dueAt", + "createdAt", + "updatedAt" + ], + "additionalProperties": false + } + } + }, + "required": [ + "counts", + "todos" + ], + "additionalProperties": false + }, + "todoCreateRequestSchema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "content": { + "nullable": true, + "type": "string", + "maxLength": 4000 + }, + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "dueAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + } + }, + "required": [ + "title" + ], + "additionalProperties": false + }, + "uploadsListResponseSchema": { + "type": "object", + "properties": { + "maxFileSizeBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "quotaBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "uploads": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "key": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "id", + "key", + "filename", + "size", + "createdAt" + ], + "additionalProperties": false + } + }, + "usedBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "maxFileSizeBytes", + "quotaBytes", + "uploads", + "usedBytes" + ], + "additionalProperties": false + }, + "uploadCreateRequestSchema": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "minLength": 1 + }, + "contentType": { + "type": "string" + }, + "size": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + } + }, + "required": [ + "filename", + "size" + ], + "additionalProperties": false + }, + "uploadCreateResponseSchema": { + "type": "object", + "properties": { + "key": { + "type": "string" + }, + "url": { + "type": "string" + }, + "maxFileSizeBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "quotaBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "usedBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "key", + "url", + "maxFileSizeBytes", + "quotaBytes", + "usedBytes" + ], + "additionalProperties": false + }, + "adminCommentsResponseSchema": { + "type": "object", + "properties": { + "comments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "logged_in_only" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "softbanned", + "deleted" + ] + }, + "isAnonymous": { + "type": "boolean" + }, + "authorName": { + "nullable": true, + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "deletedAt": { + "nullable": true, "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "moderatedAt": { + "nullable": true, "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "moderationNote": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "userId": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "moderatedById": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "parentId": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "rootId": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "sectionId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "courseId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "teacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "sectionTeacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "homeworkId": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "user": { + "nullable": true, "type": "object", "properties": { "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ "name" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "section": { + "nullable": true, "type": "object", "properties": { "jwId": { @@ -4359,10 +14056,10 @@ "code", "course" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "course": { + "nullable": true, "type": "object", "properties": { "jwId": { @@ -4382,10 +14079,10 @@ "code", "nameCn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "teacher": { + "nullable": true, "type": "object", "properties": { "id": { @@ -4401,10 +14098,10 @@ "id", "nameCn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "homework": { + "nullable": true, "type": "object", "properties": { "id": { @@ -4431,10 +14128,10 @@ "title", "section" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "sectionTeacher": { + "nullable": true, "type": "object", "properties": { "section": { @@ -4495,8 +14192,7 @@ "section", "teacher" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -4561,54 +14257,55 @@ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lastEditedAt": { + "nullable": true, "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "lastEditedById": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "sectionId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "courseId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "teacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "homeworkId": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "lastEditedBy": { + "nullable": true, "type": "object", "properties": { "id": { "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "username": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -4617,23 +14314,24 @@ "username", "image" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "section": { + "nullable": true, "type": "object", "properties": { "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "code": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "course": { + "nullable": true, "type": "object", "properties": { "jwId": { @@ -4653,8 +14351,7 @@ "code", "nameCn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -4662,10 +14359,10 @@ "code", "course" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "course": { + "nullable": true, "type": "object", "properties": { "jwId": { @@ -4685,10 +14382,10 @@ "code", "nameCn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "teacher": { + "nullable": true, "type": "object", "properties": { "id": { @@ -4704,10 +14401,10 @@ "id", "nameCn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "homework": { + "nullable": true, "type": "object", "properties": { "id": { @@ -4717,19 +14414,21 @@ "type": "string" }, "section": { + "nullable": true, "type": "object", "properties": { "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "code": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "course": { + "nullable": true, "type": "object", "properties": { "jwId": { @@ -4749,8 +14448,7 @@ "code", "nameCn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -4758,8 +14456,7 @@ "code", "course" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -4767,8 +14464,7 @@ "title", "section" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -4797,18 +14493,6 @@ ], "additionalProperties": false }, - "successResponseSchema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" - } - }, - "required": [ - "success" - ], - "additionalProperties": false - }, "adminHomeworksResponseSchema": { "type": "object", "properties": { @@ -4824,10 +14508,10 @@ "type": "string" }, "submissionDueAt": { + "nullable": true, "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "createdAt": { "type": "string", @@ -4840,12 +14524,13 @@ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "deletedAt": { + "nullable": true, "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "section": { + "nullable": true, "type": "object", "properties": { "id": { @@ -4854,14 +14539,14 @@ "maximum": 9007199254740991 }, "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "code": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "course": { "type": "object", @@ -4892,26 +14577,26 @@ "code", "course" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "createdBy": { + "nullable": true, "type": "object", "properties": { "id": { "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "username": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -4920,26 +14605,26 @@ "username", "image" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "updatedBy": { + "nullable": true, "type": "object", "properties": { "id": { "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "username": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -4948,138 +14633,55 @@ "username", "image" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "deletedBy": { + "nullable": true, "type": "object", "properties": { "id": { "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "username": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "image": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "title", - "submissionDueAt", - "createdAt", - "updatedAt", - "deletedAt", - "section", - "createdBy", - "updatedBy", - "deletedBy" - ], - "additionalProperties": false - } - } - }, - "required": [ - "homeworks" - ], - "additionalProperties": false - }, - "adminSuspensionResponseSchema": { - "type": "object", - "properties": { - "suspension": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "userId": { - "type": "string" - }, - "createdById": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "reason": { - "type": "string", - "nullable": true - }, - "note": { - "type": "string", - "nullable": true - }, - "expiresAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "liftedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "liftedById": { - "type": "string", - "nullable": true - }, - "user": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "userId", - "createdById", - "createdAt", - "reason", - "note", - "expiresAt", - "liftedAt", - "liftedById" - ], - "additionalProperties": false + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "title", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "section", + "createdBy", + "updatedBy", + "deletedBy" + ], + "additionalProperties": false + } } }, "required": [ - "suspension" + "homeworks" ], "additionalProperties": false }, @@ -5098,6 +14700,7 @@ "type": "string" }, "createdById": { + "nullable": true, "type": "string" }, "createdAt": { @@ -5106,46 +14709,46 @@ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "reason": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "note": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "expiresAt": { + "nullable": true, "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "liftedAt": { + "nullable": true, "type": "string", "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "liftedById": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "user": { + "nullable": true, "type": "object", "properties": { "id": { "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ "id", "name" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ @@ -5182,8 +14785,18 @@ "type": "string" }, "expiresAt": { - "type": "string", - "nullable": true + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] } }, "required": [ @@ -5191,69 +14804,89 @@ ], "additionalProperties": false }, - "adminUserResponseSchema": { + "adminSuspensionResponseSchema": { "type": "object", "properties": { - "user": { + "suspension": { "type": "object", "properties": { "id": { "type": "string" }, - "name": { - "type": "string", - "nullable": true + "userId": { + "type": "string" }, - "username": { + "createdById": { + "nullable": true, + "type": "string" + }, + "createdAt": { "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "isAdmin": { - "type": "boolean" + "reason": { + "nullable": true, + "type": "string" }, - "createdAt": { + "note": { + "nullable": true, + "type": "string" + }, + "expiresAt": { + "nullable": true, "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "email": { + "liftedAt": { + "nullable": true, "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "liftedById": { + "nullable": true, + "type": "string" + }, + "user": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name" + ], + "additionalProperties": false } }, "required": [ "id", - "name", - "username", - "isAdmin", + "userId", + "createdById", "createdAt", - "email" + "reason", + "note", + "expiresAt", + "liftedAt", + "liftedById" ], "additionalProperties": false } }, "required": [ - "user" + "suspension" ], "additionalProperties": false }, - "adminUpdateUserRequestSchema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "isAdmin": { - "type": "boolean" - } - }, - "additionalProperties": false - }, "adminUsersResponseSchema": { "type": "object", "properties": { @@ -5266,12 +14899,12 @@ "type": "string" }, "name": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "username": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "isAdmin": { "type": "boolean" @@ -5282,8 +14915,8 @@ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "email": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -5336,87 +14969,52 @@ ], "additionalProperties": false }, - "busPreferenceResponseSchema": { + "busNextDeparturesResponseSchema": { "type": "object", "properties": { - "preference": { + "originCampus": { + "nullable": true, "type": "object", "properties": { - "preferredOriginCampusId": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "preferredDestinationCampusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameCn": { + "type": "string" }, - "showDepartedTrips": { - "type": "boolean" + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "preferredOriginCampusId", - "preferredDestinationCampusId", - "showDepartedTrips" + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" ], "additionalProperties": false - } - }, - "required": [ - "preference" - ], - "additionalProperties": false - }, - "busPreferenceRequestSchema": { - "type": "object", - "properties": { - "preferredOriginCampusId": { - "default": null, - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0, - "nullable": true - }, - "preferredDestinationCampusId": { - "default": null, - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0, - "nullable": true - }, - "showDepartedTrips": { - "type": "boolean" - } - }, - "required": [ - "preferredOriginCampusId", - "preferredDestinationCampusId", - "showDepartedTrips" - ], - "additionalProperties": false - }, - "busQueryResponseSchema": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "enum": [ - "zh-cn", - "en-us" - ] - }, - "fetchedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "version": { + "destinationCampus": { + "nullable": true, "type": "object", "properties": { "id": { @@ -5424,274 +15022,200 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "key": { + "nameCn": { "type": "string" }, - "title": { + "nameEn": { + "nullable": true, "type": "string" }, - "effectiveFrom": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "latitude": { + "type": "number" }, - "effectiveUntil": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "longitude": { + "type": "number" }, - "importedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "namePrimary": { + "type": "string" }, - "notice": { - "type": "object", - "properties": { - "message": { - "type": "string", - "nullable": true - }, - "url": { - "type": "string", - "nullable": true - } - }, - "required": [ - "message", - "url" - ], - "additionalProperties": false, - "nullable": true + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "key", - "title", - "effectiveFrom", - "effectiveUntil", - "importedAt", - "notice" + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + }, + "atTime": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "availableVersions": { + "dayType": { + "type": "string", + "enum": [ + "weekday", + "weekend" + ] + }, + "totalRoutes": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "departures": { "type": "array", "items": { "type": "object", "properties": { - "id": { + "tripId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "key": { - "type": "string" - }, - "title": { - "type": "string" - }, - "effectiveFrom": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "effectiveUntil": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "importedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "routeId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "notice": { + "route": { "type": "object", "properties": { - "message": { - "type": "string", - "nullable": true + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "url": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "descriptionPrimary": { + "type": "string" + }, + "descriptionSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "message", - "url" + "id", + "nameCn", + "nameEn", + "descriptionPrimary", + "descriptionSecondary" ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "key", - "title", - "effectiveFrom", - "effectiveUntil", - "importedAt", - "notice" - ], - "additionalProperties": false - } - }, - "campuses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn", - "latitude", - "longitude", - "namePrimary", - "nameSecondary" - ], - "additionalProperties": false - } - }, - "routes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "descriptionPrimary": { - "type": "string" + "additionalProperties": false }, - "descriptionSecondary": { - "type": "string", - "nullable": true + "originCampus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "stops": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stopOrder": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "campus": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn", - "latitude", - "longitude", - "namePrimary", - "nameSecondary" - ], - "additionalProperties": false - } + "destinationCampus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "stopOrder", - "campus" - ], - "additionalProperties": false - } - } - }, - "required": [ - "id", - "nameCn", - "nameEn", - "descriptionPrimary", - "descriptionSecondary", - "stops" - ], - "additionalProperties": false - } - }, - "trips": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "routeId": { + "departureTime": { + "nullable": true, + "type": "string" + }, + "arrivalTime": { + "nullable": true, + "type": "string" + }, + "departureEstimated": { + "type": "boolean" + }, + "arrivalEstimated": { + "type": "boolean" + }, + "minutesUntilDeparture": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 @@ -5703,666 +15227,512 @@ "weekend" ] }, - "position": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "stopTimes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "stopOrder": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "campusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "campusName": { - "type": "string" - }, - "time": { - "type": "string", - "nullable": true - }, - "minutesSinceMidnight": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "isPassThrough": { - "type": "boolean" - } - }, - "required": [ - "stopOrder", - "campusId", - "campusName", - "time", - "minutesSinceMidnight", - "isPassThrough" - ], - "additionalProperties": false - } - }, - "departureTime": { - "type": "string", - "nullable": true - }, - "departureMinutes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "arrivalTime": { + "status": { "type": "string", - "nullable": true - }, - "arrivalMinutes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "enum": [ + "upcoming", + "departed" + ] } }, "required": [ - "id", + "tripId", "routeId", - "dayType", - "position", - "stopTimes", + "route", + "originCampus", + "destinationCampus", "departureTime", - "departureMinutes", "arrivalTime", - "arrivalMinutes" + "departureEstimated", + "arrivalEstimated", + "minutesUntilDeparture", + "dayType", + "status" ], "additionalProperties": false } }, - "preferences": { + "nextAvailableDeparture": { + "nullable": true, + "type": "object", + "properties": { + "tripId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "routeId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "route": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "descriptionPrimary": { + "type": "string" + }, + "descriptionSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "descriptionPrimary", + "descriptionSecondary" + ], + "additionalProperties": false + }, + "originCampus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "destinationCampus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "departureTime": { + "nullable": true, + "type": "string" + }, + "arrivalTime": { + "nullable": true, + "type": "string" + }, + "departureEstimated": { + "type": "boolean" + }, + "arrivalEstimated": { + "type": "boolean" + }, + "minutesUntilDeparture": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "dayType": { + "type": "string", + "enum": [ + "weekday", + "weekend" + ] + }, + "status": { + "type": "string", + "enum": [ + "upcoming", + "departed" + ] + } + }, + "required": [ + "tripId", + "routeId", + "route", + "originCampus", + "destinationCampus", + "departureTime", + "arrivalTime", + "departureEstimated", + "arrivalEstimated", + "minutesUntilDeparture", + "dayType", + "status" + ], + "additionalProperties": false + }, + "message": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "originCampus", + "destinationCampus", + "atTime", + "dayType", + "totalRoutes", + "departures", + "nextAvailableDeparture", + "message" + ], + "additionalProperties": false + }, + "busPreferenceResponseSchema": { + "type": "object", + "properties": { + "preference": { + "type": "object", + "properties": { + "preferredOriginCampusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "preferredDestinationCampusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "showDepartedTrips": { + "type": "boolean" + } + }, + "required": [ + "preferredOriginCampusId", + "preferredDestinationCampusId", + "showDepartedTrips" + ], + "additionalProperties": false + } + }, + "required": [ + "preference" + ], + "additionalProperties": false + }, + "busPreferenceRequestSchema": { + "type": "object", + "properties": { + "preferredOriginCampusId": { + "default": null, + "nullable": true, + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "preferredDestinationCampusId": { + "default": null, + "nullable": true, + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "showDepartedTrips": { + "type": "boolean" + } + }, + "required": [ + "preferredOriginCampusId", + "preferredDestinationCampusId", + "showDepartedTrips" + ], + "additionalProperties": false + }, + "busRouteSearchResponseSchema": { + "type": "object", + "properties": { + "originCampus": { + "nullable": true, "type": "object", "properties": { - "preferredOriginCampusId": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "preferredDestinationCampusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameCn": { + "type": "string" }, - "showDepartedTrips": { - "type": "boolean" + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "preferredOriginCampusId", - "preferredDestinationCampusId", - "showDepartedTrips" + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "notice": { + "destinationCampus": { + "nullable": true, "type": "object", "properties": { - "message": { - "type": "string", - "nullable": true + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "url": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "message", - "url" + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "locale", - "fetchedAt", - "version", - "availableVersions", - "campuses", - "routes", - "trips", - "preferences", - "notice" - ], - "additionalProperties": false - }, - "currentCalendarSubscriptionResponseSchema": { - "type": "object", - "properties": { - "subscription": { - "type": "object", - "properties": { - "userId": { - "type": "string" - }, - "sections": { - "type": "array", - "items": { + "additionalProperties": false + }, + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "routes": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "descriptionPrimary": { + "type": "string" + }, + "descriptionSecondary": { + "nullable": true, + "type": "string" + }, + "originCampus": { + "nullable": true, "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "bizTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "credits": { - "type": "number", - "nullable": true - }, - "period": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "periodsPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "timesPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true - }, - "dateTimePlaceText": { - "type": "string", - "nullable": true - }, - "dateTimePlacePersonText": { - "nullable": true - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true - }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true - }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "remark": { - "type": "string", - "nullable": true - }, - "scheduleRemark": { - "type": "string", - "nullable": true - }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "semesterId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "campusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "examModeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "openDepartmentId": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teachLanguageId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameCn": { + "type": "string" }, - "roomTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "course": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "educationLevelId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "typeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classify": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "educationLevel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "gradation": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "type": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" - ], - "additionalProperties": false + "latitude": { + "type": "number" }, - "semester": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "code": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false, - "nullable": true + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "destinationCampus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "campus": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false, - "nullable": true + "nameCn": { + "type": "string" }, - "openDepartment": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "isCollege": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege" - ], - "additionalProperties": false, - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "teachers": { - "type": "array", - "items": { + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn", + "latitude", + "longitude", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "stopCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "weekdayTrips": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "weekendTrips": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "stops": { + "type": "array", + "items": { + "type": "object", + "properties": { + "stopOrder": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campus": { "type": "object", "properties": { "id": { @@ -6370,571 +15740,435 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true - }, - "age": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, - "qq": { - "type": "string", - "nullable": true + "latitude": { + "type": "number" }, - "wechat": { - "type": "string", - "nullable": true + "longitude": { + "type": "number" }, - "departmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "namePrimary": { + "type": "string" }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "personId", - "teacherId", - "code", "nameCn", "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" + "latitude", + "longitude", + "namePrimary", + "nameSecondary" ], "additionalProperties": false } - } - }, - "required": [ - "id", - "jwId", - "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", - "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "course", - "semester", - "campus", - "openDepartment", - "teachers" - ], - "additionalProperties": false + }, + "required": [ + "stopOrder", + "campus" + ], + "additionalProperties": false + } } }, - "calendarPath": { - "type": "string" - }, - "calendarUrl": { + "required": [ + "id", + "nameCn", + "nameEn", + "descriptionPrimary", + "descriptionSecondary", + "originCampus", + "destinationCampus", + "stopCount", + "weekdayTrips", + "weekendTrips", + "stops" + ], + "additionalProperties": false + } + } + }, + "required": [ + "originCampus", + "destinationCampus", + "total", + "routes" + ], + "additionalProperties": false + }, + "calendarSubscriptionBatchRequestSchema": { + "type": "object", + "properties": { + "sectionIds": { + "maxItems": 500, + "type": "array", + "items": { + "type": "integer", + "maximum": 9007199254740991, + "minimum": 1 + } + }, + "codes": { + "maxItems": 500, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 + } + }, + "semesterId": { + "anyOf": [ + { "type": "string" }, - "note": { - "type": "string" + { + "type": "number" } - }, - "required": [ - "userId", - "sections", - "calendarPath", - "calendarUrl", - "note" - ], - "additionalProperties": false, - "nullable": true + ] + }, + "action": { + "type": "string", + "enum": [ + "add", + "remove", + "set" + ] } }, "required": [ - "subscription" + "action" ], "additionalProperties": false }, - "calendarSubscriptionCreateResponseSchema": { + "calendarSubscriptionBatchResponseSchema": { "type": "object", "properties": { - "subscription": { + "semester": { + "nullable": true, "type": "object", "properties": { - "userId": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "nullable": true, "type": "string" }, - "sections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "bizTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "credits": { - "type": "number", - "nullable": true - }, - "period": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "periodsPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "timesPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true - }, - "dateTimePlaceText": { - "type": "string", - "nullable": true - }, - "dateTimePlacePersonText": { - "nullable": true - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true - }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true - }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "remark": { - "type": "string", - "nullable": true - }, - "scheduleRemark": { - "type": "string", - "nullable": true - }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "semesterId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "campusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "examModeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "openDepartmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teachLanguageId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "roomTypeId": { + "code": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "code" + ], + "additionalProperties": false + }, + "matchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "unmatchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "matchedSectionIds": { + "type": "array", + "items": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + } + }, + "unmatchedSectionIds": { + "type": "array", + "items": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + } + }, + "suggestions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "course": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "educationLevelId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "typeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classify": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "educationLevel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "gradation": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "nameCn": { + "type": "string" }, - "type": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "jwId", - "code", "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" + "nameEn" ], "additionalProperties": false }, - "semester": { + "classType": { + "nullable": true, "type": "object", "properties": { "id": { @@ -6942,7 +16176,26 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 @@ -6950,34 +16203,20 @@ "nameCn": { "type": "string" }, - "code": { + "nameEn": { + "nullable": true, "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true } }, "required": [ "id", - "jwId", "nameCn", - "code", - "startDate", - "endDate" + "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "campus": { + "educationLevel": { + "nullable": true, "type": "object", "properties": { "id": { @@ -6985,35 +16224,23 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ "id", - "jwId", "nameCn", - "nameEn", - "code" + "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "openDepartment": { + "gradation": { + "nullable": true, "type": "object", "properties": { "id": { @@ -7021,2411 +16248,1774 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" - }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true - }, - "isCollege": { - "type": "boolean", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ "id", - "code", "nameCn", - "nameEn", - "isCollege" + "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "teachers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "age": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "qq": { - "type": "string", - "nullable": true - }, - "wechat": { - "type": "string", - "nullable": true - }, - "departmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - } - }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" - ], - "additionalProperties": false - } + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", "jwId", "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", - "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "course", - "semester", - "campus", - "openDepartment", - "teachers" + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" ], "additionalProperties": false - } - }, - "calendarPath": { - "type": "string" - }, - "calendarUrl": { - "type": "string" - }, - "note": { - "type": "string" - } - }, - "required": [ - "userId", - "sections", - "calendarPath", - "calendarUrl", - "note" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "subscription" - ], - "additionalProperties": false - }, - "calendarSubscriptionCreateRequestSchema": { - "type": "object", - "properties": { - "sectionIds": { - "type": "array", - "items": { - "type": "integer", - "exclusiveMinimum": true, - "maximum": 9007199254740991, - "minimum": 0 - } - } - }, - "additionalProperties": false - }, - "commentReactionRequestSchema": { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "upvote", - "downvote", - "heart", - "laugh", - "hooray", - "confused", - "rocket", - "eyes" - ] - } - }, - "required": [ - "type" - ], - "additionalProperties": false - }, - "commentThreadResponseSchema": { - "type": "object", - "properties": { - "thread": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" }, - "visibility": { - "type": "string" + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] }, - "status": { - "type": "string" + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "author": { + "openDepartment": { + "nullable": true, "type": "object", "properties": { "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { "type": "string" }, - "name": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" }, - "image": { - "type": "string", - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "isUstcVerified": { + "isCollege": { + "nullable": true, "type": "boolean" }, - "isAdmin": { - "type": "boolean" + "namePrimary": { + "type": "string" }, - "isGuest": { - "type": "boolean" + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true + "additionalProperties": false }, - "replies": { + "teachers": { "type": "array", "items": { "type": "object", "properties": { "id": { - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "body": { - "type": "string" + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "visibility": { - "type": "string" + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "status": { + "code": { + "nullable": true, "type": "string" }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isUstcVerified": { - "type": "boolean" - }, - "isAdmin": { - "type": "boolean" - }, - "isGuest": { - "type": "boolean" - } - }, - "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" - ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true - }, - "replies": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" - }, - "visibility": { - "type": "string" - }, - "status": { - "type": "string" - }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isUstcVerified": { - "type": "boolean" - }, - "isAdmin": { - "type": "boolean" - }, - "isGuest": { - "type": "boolean" - } - }, - "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" - ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true - }, - "replies": { - "type": "array", - "items": { - "type": "object", - "description": "(recursive)" - } - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "uploadId": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "url": { - "type": "string" - }, - "contentType": { - "type": "string", - "nullable": true - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "viewerHasReacted": { - "type": "boolean" - } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" - } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } + "nameCn": { + "type": "string" }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "uploadId": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "url": { - "type": "string" - }, - "contentType": { - "type": "string", - "nullable": true - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } + "nameEn": { + "nullable": true, + "type": "string" }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "viewerHasReacted": { - "type": "boolean" - } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "canReply": { - "type": "boolean" + "email": { + "nullable": true, + "type": "string" }, - "canEdit": { - "type": "boolean" + "telephone": { + "nullable": true, + "type": "string" }, - "canModerate": { - "type": "boolean" - } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "mobile": { + "nullable": true, "type": "string" }, - "uploadId": { + "address": { + "nullable": true, "type": "string" }, - "filename": { + "postcode": { + "nullable": true, "type": "string" }, - "url": { + "qq": { + "nullable": true, "type": "string" }, - "contentType": { - "type": "string", - "nullable": true + "wechat": { + "nullable": true, + "type": "string" }, - "size": { + "departmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" }, - "count": { + "teacherTitleId": { + "nullable": true, "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "viewerHasReacted": { - "type": "boolean" + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "type", - "count", - "viewerHasReacted" + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" ], "additionalProperties": false } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" } }, "required": [ "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" ], "additionalProperties": false } }, - "focusId": { - "type": "string" + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "action": { + "type": "string", + "enum": [ + "add", + "remove", + "set" + ] }, - "hiddenCount": { + "addedCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, - "viewer": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isAdmin": { - "type": "boolean" - }, - "isAuthenticated": { - "type": "boolean" - }, - "isSuspended": { - "type": "boolean" - }, - "suspensionReason": { - "type": "string", - "nullable": true - }, - "suspensionExpiresAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "userId", - "name", - "image", - "isAdmin", - "isAuthenticated", - "isSuspended", - "suspensionReason", - "suspensionExpiresAt" - ], - "additionalProperties": false + "removedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 }, - "target": { - "type": "object", - "properties": { - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionTeacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionTeacherSectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionTeacherTeacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionTeacherSectionJwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionTeacherSectionCode": { - "type": "string", - "nullable": true - }, - "sectionTeacherTeacherName": { - "type": "string", - "nullable": true - }, - "sectionTeacherCourseJwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionTeacherCourseName": { - "type": "string", - "nullable": true - }, - "homeworkId": { - "type": "string", - "nullable": true - }, - "homeworkTitle": { - "type": "string", - "nullable": true - }, - "homeworkSectionJwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "homeworkSectionCode": { - "type": "string", - "nullable": true - }, - "sectionJwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionCode": { - "type": "string", - "nullable": true - }, - "courseJwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "courseName": { - "type": "string", - "nullable": true - }, - "teacherName": { - "type": "string", - "nullable": true - } - }, - "required": [ - "sectionId", - "courseId", - "teacherId", - "sectionTeacherId", - "sectionTeacherSectionId", - "sectionTeacherTeacherId", - "sectionTeacherSectionJwId", - "sectionTeacherSectionCode", - "sectionTeacherTeacherName", - "sectionTeacherCourseJwId", - "sectionTeacherCourseName", - "homeworkId", - "homeworkTitle", - "homeworkSectionJwId", - "homeworkSectionCode", - "sectionJwId", - "sectionCode", - "courseJwId", - "courseName", - "teacherName" - ], - "additionalProperties": false - } - }, - "required": [ - "thread", - "focusId", - "hiddenCount", - "viewer", - "target" - ], - "additionalProperties": false - }, - "commentUpdateResponseSchema": { - "type": "object", - "properties": { - "success": { - "type": "boolean" + "unchangedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 }, - "comment": { + "subscription": { + "nullable": true, "type": "object", "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" - }, - "visibility": { - "type": "string" - }, - "status": { + "userId": { "type": "string" }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isUstcVerified": { - "type": "boolean" - }, - "isAdmin": { - "type": "boolean" - }, - "isGuest": { - "type": "boolean" - } - }, - "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" - ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true - }, - "replies": { + "sections": { "type": "array", "items": { "type": "object", "properties": { "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, "type": "string" }, - "body": { + "scheduleRemark": { + "nullable": true, "type": "string" }, - "visibility": { - "type": "string" + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] }, - "status": { - "type": "string" + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "author": { + "openDepartment": { + "nullable": true, "type": "object", "properties": { "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { "type": "string" }, - "name": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" }, - "image": { - "type": "string", - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "isUstcVerified": { + "isCollege": { + "nullable": true, "type": "boolean" }, - "isAdmin": { - "type": "boolean" + "namePrimary": { + "type": "string" }, - "isGuest": { - "type": "boolean" + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true + "additionalProperties": false }, - "replies": { + "teachers": { "type": "array", "items": { "type": "object", "properties": { "id": { - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "body": { - "type": "string" + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "visibility": { - "type": "string" + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "status": { + "code": { + "nullable": true, "type": "string" }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isUstcVerified": { - "type": "boolean" - }, - "isAdmin": { - "type": "boolean" - }, - "isGuest": { - "type": "boolean" - } - }, - "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" - ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true - }, - "replies": { - "type": "array", - "items": { - "type": "object", - "description": "(recursive)" - } - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "uploadId": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "url": { - "type": "string" - }, - "contentType": { - "type": "string", - "nullable": true - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "viewerHasReacted": { - "type": "boolean" - } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" + "nameCn": { + "type": "string" }, - "canModerate": { - "type": "boolean" - } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, "type": "string" }, - "uploadId": { + "address": { + "nullable": true, "type": "string" }, - "filename": { + "postcode": { + "nullable": true, "type": "string" }, - "url": { + "qq": { + "nullable": true, "type": "string" }, - "contentType": { - "type": "string", - "nullable": true + "wechat": { + "nullable": true, + "type": "string" }, - "size": { + "departmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" }, - "count": { + "teacherTitleId": { + "nullable": true, "type": "integer", - "minimum": 0, + "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "viewerHasReacted": { - "type": "boolean" - } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" - } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "uploadId": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "url": { - "type": "string" - }, - "contentType": { - "type": "string", - "nullable": true - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "viewerHasReacted": { - "type": "boolean" - } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" - } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } - }, - "required": [ - "success", - "comment" - ], - "additionalProperties": false - }, - "commentUpdateRequestSchema": { - "type": "object", - "properties": { - "body": { - "type": "string", - "minLength": 1, - "maxLength": 8000 - }, - "visibility": { - "type": "string", - "enum": [ - "public", - "logged_in_only", - "anonymous" - ] - }, - "isAnonymous": { - "type": "boolean" - }, - "attachmentIds": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "body" - ], - "additionalProperties": false - }, - "commentsListResponseSchema": { - "type": "object", - "properties": { - "comments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" - }, - "visibility": { - "type": "string" - }, - "status": { - "type": "string" - }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isUstcVerified": { - "type": "boolean" - }, - "isAdmin": { - "type": "boolean" - }, - "isGuest": { - "type": "boolean" - } - }, - "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" - ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true - }, - "replies": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" - }, - "visibility": { - "type": "string" - }, - "status": { - "type": "string" - }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isUstcVerified": { - "type": "boolean" - }, - "isAdmin": { - "type": "boolean" + "namePrimary": { + "type": "string" }, - "isGuest": { - "type": "boolean" + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true - }, - "replies": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "body": { - "type": "string" - }, - "visibility": { - "type": "string" - }, - "status": { - "type": "string" - }, - "author": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isUstcVerified": { - "type": "boolean" - }, - "isAdmin": { - "type": "boolean" - }, - "isGuest": { - "type": "boolean" - } - }, - "required": [ - "name", - "isUstcVerified", - "isAdmin", - "isGuest" - ], - "additionalProperties": false, - "nullable": true - }, - "authorHidden": { - "type": "boolean" - }, - "isAnonymous": { - "type": "boolean" - }, - "isAuthor": { - "type": "boolean" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "rootId": { - "type": "string", - "nullable": true - }, - "replies": { - "type": "array", - "items": { - "type": "object", - "description": "(recursive)" - } - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "uploadId": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "url": { - "type": "string" - }, - "contentType": { - "type": "string", - "nullable": true - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "viewerHasReacted": { - "type": "boolean" - } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" - } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "uploadId": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "url": { - "type": "string" - }, - "contentType": { - "type": "string", - "nullable": true - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "viewerHasReacted": { - "type": "boolean" - } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" - } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } - }, - "attachments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "uploadId": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "url": { - "type": "string" - }, - "contentType": { - "type": "string", - "nullable": true - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "uploadId", - "filename", - "url", - "contentType", - "size" - ], - "additionalProperties": false - } - }, - "reactions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "viewerHasReacted": { - "type": "boolean" + "additionalProperties": false } - }, - "required": [ - "type", - "count", - "viewerHasReacted" - ], - "additionalProperties": false - } - }, - "canReply": { - "type": "boolean" - }, - "canEdit": { - "type": "boolean" - }, - "canModerate": { - "type": "boolean" - } - }, - "required": [ - "id", - "body", - "visibility", - "status", - "author", - "authorHidden", - "isAnonymous", - "isAuthor", - "createdAt", - "updatedAt", - "parentId", - "rootId", - "replies", - "attachments", - "reactions", - "canReply", - "canEdit", - "canModerate" - ], - "additionalProperties": false - } - }, - "hiddenCount": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - }, - "viewer": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isAdmin": { - "type": "boolean" - }, - "isAuthenticated": { - "type": "boolean" - }, - "isSuspended": { - "type": "boolean" - }, - "suspensionReason": { - "type": "string", - "nullable": true + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } }, - "suspensionExpiresAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "userId", - "name", - "image", - "isAdmin", - "isAuthenticated", - "isSuspended", - "suspensionReason", - "suspensionExpiresAt" - ], - "additionalProperties": false - }, - "target": { - "type": "object", - "properties": { - "type": { + "calendarPath": { "type": "string" }, - "targetId": { - "type": "string", - "nullable": true - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionTeacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "calendarUrl": { + "type": "string" }, - "homeworkId": { - "type": "string", - "nullable": true + "note": { + "type": "string" } }, "required": [ - "type", - "targetId", - "sectionId", - "teacherId", - "sectionTeacherId", - "homeworkId" + "userId", + "sections", + "calendarPath", + "calendarUrl", + "note" ], "additionalProperties": false } }, "required": [ - "comments", - "hiddenCount", - "viewer", - "target" - ], - "additionalProperties": false - }, - "idResponseSchema": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - }, - "required": [ - "id" - ], - "additionalProperties": false - }, - "commentCreateRequestSchema": { - "type": "object", - "properties": { - "targetType": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "section-teacher", - "homework" - ] - }, - "targetId": { - "type": "string" - }, - "sectionId": { - "type": "string" - }, - "teacherId": { - "type": "string" - }, - "body": { - "type": "string", - "minLength": 1, - "maxLength": 8000 - }, - "visibility": { - "type": "string", - "enum": [ - "public", - "logged_in_only", - "anonymous" - ] - }, - "isAnonymous": { - "type": "boolean" - }, - "parentId": { - "type": "string", - "nullable": true - }, - "attachmentIds": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "targetType", - "body" + "semester", + "matchedCodes", + "unmatchedCodes", + "matchedSectionIds", + "unmatchedSectionIds", + "suggestions", + "sections", + "total", + "action", + "addedCount", + "removedCount", + "unchangedCount", + "subscription" ], "additionalProperties": false }, - "courseDetailSchema": { + "currentCalendarSubscriptionResponseSchema": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "educationLevelId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "typeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "category": { + "subscription": { + "nullable": true, "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { + "userId": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } }, - "nameCn": { + "calendarPath": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classify": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { + "calendarUrl": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "educationLevel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { + "note": { "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true } }, "required": [ - "id", - "nameCn", - "nameEn" + "userId", + "sections", + "calendarPath", + "calendarUrl", + "note" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + } + }, + "required": [ + "subscription" + ], + "additionalProperties": false + }, + "matchSectionCodesRequestSchema": { + "type": "object", + "properties": { + "codes": { + "minItems": 1, + "maxItems": 500, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^[A-Za-z0-9_.-]+$" + } }, - "gradation": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { + "semesterId": { + "anyOf": [ + { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + { + "type": "number" } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + ] + } + }, + "required": [ + "codes" + ], + "additionalProperties": false + }, + "calendarSubscriptionImportResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" }, - "type": { + "semester": { "type": "object", "properties": { "id": { @@ -9434,20 +18024,38 @@ "maximum": 9007199254740991 }, "nameCn": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "code": { + "nullable": true, + "type": "string" } }, "required": [ "id", "nameCn", - "nameEn" + "code" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + }, + "matchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "unmatchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "ambiguousCodes": { + "type": "array", + "items": { + "type": "string" + } }, "sections": { "type": "array", @@ -9456,478 +18064,168 @@ "properties": { "id": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "bizTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "credits": { - "type": "number", - "nullable": true - }, - "period": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "periodsPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "timesPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true - }, - "dateTimePlaceText": { - "type": "string", - "nullable": true - }, - "dateTimePlacePersonText": { - "nullable": true - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true - }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true - }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "remark": { - "type": "string", - "nullable": true - }, - "scheduleRemark": { - "type": "string", - "nullable": true + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "courseId": { + "jwId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semesterId": { + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "campusId": { + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "examModeId": { + "periodsPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "openDepartmentId": { + "timesPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teachLanguageId": { + "stdCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "roomTypeId": { + "limitCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "semester": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "code": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false, - "nullable": true + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" }, - "campus": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { "nullable": true }, - "teachers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "age": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "qq": { - "type": "string", - "nullable": true - }, - "wechat": { - "type": "string", - "nullable": true - }, - "departmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - } - }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" - ], - "additionalProperties": false - } - } - }, - "required": [ - "id", - "jwId", - "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", - "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "semester", - "campus", - "teachers" - ], - "additionalProperties": false - } - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type", - "sections" - ], - "additionalProperties": false - }, - "paginatedCourseResponseSchema": { - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "actualPeriods": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { + "remark": { + "nullable": true, "type": "string" }, - "nameCn": { + "scheduleRemark": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "categoryId": { + "semesterId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "classTypeId": { + "campusId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "classifyId": { + "examModeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "educationLevelId": { + "openDepartmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "gradationId": { + "teachLanguageId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "typeId": { + "roomTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "category": { + "course": { "type": "object", "properties": { "id": { @@ -9935,638 +18233,656 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classType": { - "type": "object", - "properties": { - "id": { + "jwId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "code": { + "type": "string" + }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classify": { - "type": "object", - "properties": { - "id": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "educationLevel": { - "type": "object", - "properties": { - "id": { + "classifyId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "gradation": { - "type": "object", - "properties": { - "id": { + "gradationId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "type": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "nameCn": { + "namePrimary": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", + "jwId", + "code", "nameCn", - "nameEn" + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" - ], - "additionalProperties": false - } - }, - "pagination": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "pageSize": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "total": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "totalPages": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "page", - "pageSize", - "total", - "totalPages" - ], - "additionalProperties": false - } - }, - "required": [ - "data", - "pagination" - ], - "additionalProperties": false - }, - "dashboardLinkPinRequestSchema": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "minLength": 1 - }, - "returnTo": { - "type": "string" - }, - "action": { - "type": "string", - "enum": [ - "pin", - "unpin" - ] - } - }, - "required": [ - "slug" - ], - "additionalProperties": false - }, - "dashboardLinkVisitRequestSchema": { - "type": "object", - "properties": { - "slug": { - "type": "string", - "minLength": 1 - } - }, - "required": [ - "slug" - ], - "additionalProperties": false - }, - "descriptionsResponseSchema": { - "type": "object", - "properties": { - "description": { - "type": "object", - "properties": { - "id": { - "type": "string", - "nullable": true - }, - "content": { - "type": "string" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "lastEditedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "lastEditedBy": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "image", - "username" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "content", - "updatedAt", - "lastEditedAt", - "lastEditedBy" - ], - "additionalProperties": false - }, - "history": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "previousContent": { - "type": "string", - "nullable": true + "additionalProperties": false }, - "nextContent": { - "type": "string" + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] }, - "editor": { + "campus": { + "nullable": true, "type": "object", "properties": { "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { "type": "string" }, - "name": { - "type": "string", - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "image": { - "type": "string", - "nullable": true + "code": { + "nullable": true, + "type": "string" }, - "username": { - "type": "string", - "nullable": true + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "name", - "image", - "username" + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "createdAt", - "previousContent", - "nextContent", - "editor" - ], - "additionalProperties": false - } - }, - "viewer": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isAdmin": { - "type": "boolean" - }, - "isAuthenticated": { - "type": "boolean" - }, - "isSuspended": { - "type": "boolean" - }, - "suspensionReason": { - "type": "string", - "nullable": true - }, - "suspensionExpiresAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "userId", - "name", - "image", - "isAdmin", - "isAuthenticated", - "isSuspended", - "suspensionReason", - "suspensionExpiresAt" - ], - "additionalProperties": false - } - }, - "required": [ - "description", - "history", - "viewer" - ], - "additionalProperties": false - }, - "descriptionUpsertResponseSchema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "updated": { - "type": "boolean" - } - }, - "required": [ - "id", - "updated" - ], - "additionalProperties": false - }, - "descriptionUpsertRequestSchema": { - "type": "object", - "properties": { - "targetType": { - "type": "string", - "enum": [ - "section", - "course", - "teacher", - "homework" - ] - }, - "targetId": { - "type": "string" - }, - "content": { - "type": "string", - "maxLength": 4000 - } - }, - "required": [ - "targetType", - "targetId", - "content" - ], - "additionalProperties": false - }, - "homeworkCompletionResponseSchema": { - "type": "object", - "properties": { - "completed": { - "type": "boolean" - }, - "completedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "completed", - "completedAt" - ], - "additionalProperties": false - }, - "homeworkCompletionRequestSchema": { - "type": "object", - "properties": { - "completed": { - "type": "boolean" - } - }, - "required": [ - "completed" - ], - "additionalProperties": false - }, - "homeworkUpdateRequestSchema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "publishedAt": { - "type": "string", - "nullable": true - }, - "submissionStartAt": { - "type": "string", - "nullable": true - }, - "submissionDueAt": { - "type": "string", - "nullable": true - }, - "isMajor": { - "type": "boolean" - }, - "requiresTeam": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "homeworksListResponseSchema": { - "type": "object", - "properties": { - "viewer": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isAdmin": { - "type": "boolean" - }, - "isAuthenticated": { - "type": "boolean" - }, - "isSuspended": { - "type": "boolean" - }, - "suspensionReason": { - "type": "string", - "nullable": true + "additionalProperties": false + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + } }, - "suspensionExpiresAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "userId", - "name", - "image", - "isAdmin", - "isAuthenticated", - "isSuspended", - "suspensionReason", - "suspensionExpiresAt" - ], - "additionalProperties": false + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } }, - "homeworks": { + "addedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "addedSections": { "type": "array", "items": { "type": "object", "properties": { "id": { - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "title": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { "type": "string" }, - "isMajor": { - "type": "boolean" + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "requiresTeam": { + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, "type": "boolean" }, - "publishedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { "nullable": true }, - "submissionStartAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { "nullable": true }, - "submissionDueAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { "nullable": true }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "remark": { + "nullable": true, + "type": "string" }, - "deletedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "scheduleRemark": { + "nullable": true, + "type": "string" }, - "sectionId": { + "courseId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "createdById": { - "type": "string", - "nullable": true + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "updatedById": { - "type": "string", - "nullable": true + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "deletedById": { - "type": "string", - "nullable": true + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "section": { + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { "type": "object", "properties": { "id": { @@ -10582,157 +18898,51 @@ "code": { "type": "string" }, - "bizTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "credits": { - "type": "number", - "nullable": true - }, - "period": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "periodsPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "timesPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true - }, - "dateTimePlaceText": { - "type": "string", - "nullable": true - }, - "dateTimePlacePersonText": { - "nullable": true - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true - }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true - }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "remark": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" }, - "scheduleRemark": { - "type": "string", - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "courseId": { + "categoryId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semesterId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "campusId": { + "classTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "examModeId": { + "classifyId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "openDepartmentId": { + "educationLevelId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teachLanguageId": { + "gradationId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "roomTypeId": { + "typeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "course": { + "category": { + "nullable": true, "type": "object", "properties": { "id": { @@ -10740,83 +18950,95 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classTypeId": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameCn": { + "type": "string" }, - "educationLevelId": { + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameCn": { + "type": "string" }, - "typeId": { + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "namePrimary": { + "nameCn": { "type": "string" }, - "nameSecondary": { - "type": "string", - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "jwId", - "code", "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "namePrimary", - "nameSecondary" + "nameEn" ], "additionalProperties": false }, - "semester": { + "gradation": { + "nullable": true, "type": "object", "properties": { "id": { @@ -10824,7 +19046,26 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 @@ -10832,569 +19073,473 @@ "nameCn": { "type": "string" }, - "code": { + "nameEn": { + "nullable": true, "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true } }, "required": [ "id", - "jwId", "nameCn", - "code", - "startDate", - "endDate" + "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", "jwId", "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", - "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "course", - "semester" + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" ], "additionalProperties": false }, - "description": { + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, "type": "object", "properties": { "id": { - "type": "string" - }, - "content": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "lastEditedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "lastEditedById": { - "type": "string", - "nullable": true - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "courseId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teacherId": { + "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "homeworkId": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "content", - "createdAt", - "updatedAt", - "lastEditedAt", - "lastEditedById", - "sectionId", - "courseId", - "teacherId", - "homeworkId" - ], - "additionalProperties": false, - "nullable": true - }, - "createdBy": { - "type": "object", - "properties": { - "id": { + "nameCn": { "type": "string" }, - "name": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true - }, - "updatedBy": { - "type": "object", - "properties": { - "id": { + "nameEn": { + "nullable": true, "type": "string" }, - "name": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true - }, - "deletedBy": { - "type": "object", - "properties": { - "id": { + "code": { + "nullable": true, "type": "string" }, - "name": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true + "namePrimary": { + "type": "string" }, - "image": { - "type": "string", - "nullable": true + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true - }, - "completion": { - "type": "object", - "properties": { - "completedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - } - }, - "required": [ - "completedAt" + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true - }, - "commentCount": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "title", - "isMajor", - "requiresTeam", - "publishedAt", - "submissionStartAt", - "submissionDueAt", - "createdAt", - "updatedAt", - "deletedAt", - "sectionId", - "createdById", - "updatedById", - "deletedById", - "section", - "description", - "createdBy", - "updatedBy", - "deletedBy", - "completion", - "commentCount" - ], - "additionalProperties": false - } - }, - "auditLogs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "action": { - "type": "string", - "enum": [ - "created", - "deleted" - ] - }, - "titleSnapshot": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "homeworkId": { - "type": "string", - "nullable": true - }, - "actorId": { - "type": "string", - "nullable": true + "additionalProperties": false }, - "actor": { + "openDepartment": { + "nullable": true, "type": "object", "properties": { "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { "type": "string" }, - "name": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" }, - "username": { - "type": "string", - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "image": { - "type": "string", - "nullable": true + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "name", - "username", - "image" + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } } }, "required": [ "id", - "action", - "titleSnapshot", - "createdAt", - "sectionId", - "homeworkId", - "actorId", - "actor" + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" ], "additionalProperties": false } - } - }, - "required": [ - "viewer", - "homeworks", - "auditLogs" - ], - "additionalProperties": false - }, - "homeworkCreateRequestSchema": { - "type": "object", - "properties": { - "sectionId": { - "type": "string" - }, - "title": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "description": { - "type": "string", - "maxLength": 4000 - }, - "publishedAt": { - "type": "string", - "nullable": true - }, - "submissionStartAt": { - "type": "string", - "nullable": true - }, - "submissionDueAt": { - "type": "string", - "nullable": true - }, - "isMajor": { - "type": "boolean" - }, - "requiresTeam": { - "type": "boolean" - } - }, - "required": [ - "sectionId", - "title" - ], - "additionalProperties": false - }, - "localeUpdateRequestSchema": { - "type": "object", - "properties": { - "locale": { - "type": "string", - "enum": [ - "en-us", - "zh-cn" - ] - } - }, - "required": [ - "locale" - ], - "additionalProperties": false - }, - "meResponseSchema": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "email": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true }, - "isAdmin": { - "type": "boolean" - } - }, - "required": [ - "id", - "email", - "name", - "image", - "username", - "isAdmin" - ], - "additionalProperties": false - }, - "subscribedHomeworksResponseSchema": { - "type": "object", - "properties": { - "viewer": { - "type": "object", - "properties": { - "userId": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "image": { - "type": "string", - "nullable": true - }, - "isAdmin": { - "type": "boolean" - }, - "isAuthenticated": { - "type": "boolean" - }, - "isSuspended": { - "type": "boolean" - }, - "suspensionReason": { - "type": "string", - "nullable": true - }, - "suspensionExpiresAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "userId", - "name", - "image", - "isAdmin", - "isAuthenticated", - "isSuspended", - "suspensionReason", - "suspensionExpiresAt" - ], - "additionalProperties": false + "alreadySubscribedCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 }, - "homeworks": { + "alreadySubscribedSections": { "type": "array", "items": { "type": "object", "properties": { "id": { - "type": "string" + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "title": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { "type": "string" }, - "isMajor": { - "type": "boolean" + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "requiresTeam": { + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, "type": "boolean" }, - "publishedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { "nullable": true }, - "submissionStartAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { "nullable": true }, - "submissionDueAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { "nullable": true }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "deletedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "sectionId": { + "campusId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "createdById": { - "type": "string", - "nullable": true + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "updatedById": { - "type": "string", - "nullable": true + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "deletedById": { - "type": "string", - "nullable": true + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "section": { + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { "type": "object", "properties": { "id": { @@ -11410,647 +19555,1268 @@ "code": { "type": "string" }, - "bizTypeId": { + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "credits": { - "type": "number", - "nullable": true + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "period": { + "classifyId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "periodsPerWeek": { + "educationLevelId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "timesPerWeek": { + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "stdCount": { + "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameCn": { + "type": "string" }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "dateTimePlaceText": { - "type": "string", - "nullable": true + "code": { + "nullable": true, + "type": "string" }, - "dateTimePlacePersonText": { - "nullable": true + "namePrimary": { + "type": "string" }, - "actualPeriods": { + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true + "maximum": 9007199254740991 }, - "suggestScheduleWeeks": { - "nullable": true + "code": { + "type": "string" }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true + "nameCn": { + "type": "string" }, - "scheduleJsonParams": { - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "selectedStdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "isCollege": { + "nullable": true, + "type": "boolean" }, - "remark": { - "type": "string", - "nullable": true + "namePrimary": { + "type": "string" }, - "scheduleRemark": { - "type": "string", - "nullable": true + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } }, - "courseId": { + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } + }, + "subscription": { + "nullable": true, + "type": "object", + "properties": { + "userId": { + "type": "string" + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semesterId": { + "jwId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "campusId": { + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "examModeId": { + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "openDepartmentId": { + "periodsPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teachLanguageId": { + "timesPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "roomTypeId": { + "stdCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "course": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "educationLevelId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "typeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "namePrimary", - "nameSecondary" - ], - "additionalProperties": false + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "semester": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "code": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", - "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "course", - "semester" - ], - "additionalProperties": false - }, - "description": { - "type": "object", - "properties": { - "id": { - "type": "string" + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" }, - "content": { + "dateTimePlaceText": { + "nullable": true, "type": "string" }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "lastEditedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "lastEditedById": { - "type": "string", + "dateTimePlacePersonText": { "nullable": true }, - "sectionId": { + "actualPeriods": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "theoryPeriods": { + "nullable": true, + "type": "number" }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "practicePeriods": { + "nullable": true, + "type": "number" }, - "homeworkId": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "content", - "createdAt", - "updatedAt", - "lastEditedAt", - "lastEditedById", - "sectionId", - "courseId", - "teacherId", - "homeworkId" - ], - "additionalProperties": false, - "nullable": true - }, - "createdBy": { - "type": "object", - "properties": { - "id": { - "type": "string" + "experimentPeriods": { + "nullable": true, + "type": "number" }, - "name": { - "type": "string", - "nullable": true + "machinePeriods": { + "nullable": true, + "type": "number" }, - "username": { - "type": "string", - "nullable": true + "designPeriods": { + "nullable": true, + "type": "number" }, - "image": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true - }, - "updatedBy": { - "type": "object", - "properties": { - "id": { + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, "type": "string" }, - "name": { - "type": "string", + "suggestScheduleWeeks": { "nullable": true }, - "username": { - "type": "string", - "nullable": true + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" }, - "image": { - "type": "string", + "scheduleJsonParams": { "nullable": true - } - }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true - }, - "deletedBy": { - "type": "object", - "properties": { - "id": { + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, "type": "string" }, - "name": { - "type": "string", - "nullable": true + "scheduleRemark": { + "nullable": true, + "type": "string" }, - "username": { - "type": "string", - "nullable": true + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "image": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "name", - "username", - "image" - ], - "additionalProperties": false, - "nullable": true - }, - "completion": { - "type": "object", - "properties": { - "completedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - } - }, - "required": [ - "completedAt" - ], - "additionalProperties": false, - "nullable": true - }, - "commentCount": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "title", - "isMajor", - "requiresTeam", - "publishedAt", - "submissionStartAt", - "submissionDueAt", - "createdAt", - "updatedAt", - "deletedAt", - "sectionId", - "createdById", - "updatedById", - "deletedById", - "section", - "description", - "createdBy", - "updatedBy", - "deletedBy", - "completion", - "commentCount" - ], - "additionalProperties": false - } - }, - "auditLogs": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "action": { - "type": "string", - "enum": [ - "created", - "deleted" - ] - }, - "titleSnapshot": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "homeworkId": { - "type": "string", - "nullable": true - }, - "actorId": { - "type": "string", - "nullable": true - }, - "actor": { - "type": "object", - "properties": { - "id": { - "type": "string" + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] }, - "name": { - "type": "string", - "nullable": true + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "username": { - "type": "string", - "nullable": true + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "image": { - "type": "string", - "nullable": true + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } } }, "required": [ "id", - "name", - "username", - "image" + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, - "required": [ - "id", - "action", - "titleSnapshot", - "createdAt", - "sectionId", - "homeworkId", - "actorId", - "actor" - ], - "additionalProperties": false - } - }, + "calendarPath": { + "type": "string" + }, + "calendarUrl": { + "type": "string" + }, + "note": { + "type": "string" + } + }, + "required": [ + "userId", + "sections", + "calendarPath", + "calendarUrl", + "note" + ], + "additionalProperties": false + } + }, + "required": [ + "success", + "semester", + "matchedCodes", + "unmatchedCodes", + "ambiguousCodes", + "sections", + "addedCount", + "addedSections", + "alreadySubscribedCount", + "alreadySubscribedSections", + "subscription" + ], + "additionalProperties": false + }, + "calendarSubscriptionQueryRequestSchema": { + "type": "object", + "properties": { "sectionIds": { + "maxItems": 500, "type": "array", "items": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "maximum": 9007199254740991, + "minimum": 1 + } + }, + "codes": { + "maxItems": 500, + "type": "array", + "items": { + "type": "string", + "minLength": 1, + "maxLength": 64 } + }, + "semesterId": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] } }, - "required": [ - "viewer", - "homeworks", - "auditLogs", - "sectionIds" - ], "additionalProperties": false }, - "metadataResponseSchema": { + "calendarSubscriptionQueryResponseSchema": { "type": "object", "properties": { - "educationLevels": { + "semester": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "code" + ], + "additionalProperties": false + }, + "matchedCodes": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false + "type": "string" + } + }, + "unmatchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "matchedSectionIds": { + "type": "array", + "items": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + } + }, + "unmatchedSectionIds": { + "type": "array", + "items": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 } }, - "courseCategories": { + "suggestions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "sections": { "type": "array", "items": { "type": "object", @@ -12060,206 +20826,494 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "courseClassifies": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "bizTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" + "credits": { + "nullable": true, + "type": "number" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "classTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "period": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "courseTypes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "timesPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "courseGradations": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "limitCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", + "dateTimePlacePersonText": { "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "examModes": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + }, + "actualPeriods": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", + "suggestScheduleWeeks": { "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "teachLanguages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { + "remark": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false - } - }, - "campuses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "semesterId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "nameCn": { - "type": "string" + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] }, - "nameEn": { - "type": "string", - "nullable": true + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "code": { - "type": "string", - "nullable": true + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "buildings": { + "teachers": { "type": "array", "items": { "type": "object", @@ -12269,35 +21323,102 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "personId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, - "code": { + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, "type": "string" }, - "campusId": { + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" } }, "required": [ "id", - "jwId", + "personId", + "teacherId", + "code", "nameCn", "nameEn", - "code", - "campusId" + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" ], "additionalProperties": false } @@ -12306,548 +21427,791 @@ "required": [ "id", "jwId", - "nameCn", - "nameEn", "code", - "buildings" + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" ], "additionalProperties": false } + }, + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 } }, "required": [ - "educationLevels", - "courseCategories", - "courseClassifies", - "classTypes", - "courseTypes", - "courseGradations", - "examModes", - "teachLanguages", - "campuses" + "semester", + "matchedCodes", + "unmatchedCodes", + "matchedSectionIds", + "unmatchedSectionIds", + "suggestions", + "sections", + "total" ], "additionalProperties": false }, - "openApiDocumentResponseSchema": { + "commentThreadResponseSchema": { "type": "object", "properties": { - "openapi": { + "thread": { + "type": "array", + "items": { + "$ref": "#/components/schemas/__schema1" + } + }, + "focusId": { "type": "string" }, - "info": { + "hiddenCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "viewer": { "type": "object", "properties": { - "title": { + "userId": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "isAuthenticated": { + "type": "boolean" + }, + "isSuspended": { + "type": "boolean" + }, + "suspensionReason": { + "nullable": true, + "type": "string" + }, + "suspensionExpiresAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "userId", + "name", + "image", + "isAdmin", + "isAuthenticated", + "isSuspended", + "suspensionReason", + "suspensionExpiresAt" + ], + "additionalProperties": false + }, + "target": { + "type": "object", + "properties": { + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherSectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherTeacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherSectionJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherSectionCode": { + "nullable": true, + "type": "string" + }, + "sectionTeacherTeacherName": { + "nullable": true, + "type": "string" + }, + "sectionTeacherCourseJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherCourseName": { + "nullable": true, "type": "string" }, - "version": { + "homeworkId": { + "nullable": true, "type": "string" }, - "description": { + "homeworkTitle": { + "nullable": true, + "type": "string" + }, + "homeworkSectionJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkSectionCode": { + "nullable": true, + "type": "string" + }, + "sectionJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionCode": { + "nullable": true, + "type": "string" + }, + "courseJwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseName": { + "nullable": true, + "type": "string" + }, + "teacherName": { + "nullable": true, "type": "string" } }, "required": [ - "title", - "version" + "sectionId", + "courseId", + "teacherId", + "sectionTeacherId", + "sectionTeacherSectionId", + "sectionTeacherTeacherId", + "sectionTeacherSectionJwId", + "sectionTeacherSectionCode", + "sectionTeacherTeacherName", + "sectionTeacherCourseJwId", + "sectionTeacherCourseName", + "homeworkId", + "homeworkTitle", + "homeworkSectionJwId", + "homeworkSectionCode", + "sectionJwId", + "sectionCode", + "courseJwId", + "courseName", + "teacherName" ], "additionalProperties": false + } + }, + "required": [ + "thread", + "focusId", + "hiddenCount", + "viewer", + "target" + ], + "additionalProperties": false + }, + "commentUpdateRequestSchema": { + "type": "object", + "properties": { + "body": { + "type": "string", + "minLength": 1, + "maxLength": 8000 }, - "servers": { + "visibility": { + "type": "string", + "enum": [ + "public", + "logged_in_only" + ] + }, + "isAnonymous": { + "type": "boolean" + }, + "attachmentIds": { "type": "array", "items": { - "type": "object", - "properties": { - "url": { - "type": "string" - }, - "description": { - "type": "string" - } - }, - "required": [ - "url" - ], - "additionalProperties": false + "type": "string" } + } + }, + "required": [ + "body" + ], + "additionalProperties": false + }, + "commentUpdateResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" }, - "paths": { - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": {} + "comment": { + "$ref": "#/components/schemas/__schema1" } }, "required": [ - "openapi", - "info", - "paths" + "success", + "comment" ], "additionalProperties": false }, - "paginatedScheduleResponseSchema": { + "commentBatchDeleteRequestSchema": { "type": "object", "properties": { - "data": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "periods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "date": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "weekday": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "startTime": { - "type": "string" - }, - "endTime": { - "type": "string" - }, - "experiment": { - "type": "string", - "nullable": true - }, - "customPlace": { - "type": "string", - "nullable": true - }, - "lessonType": { - "type": "string", - "nullable": true - }, - "weekIndex": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "exerciseClass": { - "type": "boolean", - "nullable": true - }, - "startUnit": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "endUnit": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "roomId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "scheduleGroupId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "room": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string" - }, - "floor": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "virtual": { - "type": "boolean" - }, - "seatsForSection": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "remark": { - "type": "string", - "nullable": true - }, - "seats": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "buildingId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "roomTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "ids": { + "minItems": 1, + "maxItems": 50, + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + }, + "required": [ + "ids" + ], + "additionalProperties": false + }, + "commentBatchDeleteResponseSchema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] }, - "namePrimary": { + "id": { "type": "string" + } + }, + "required": [ + "success", + "id" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + false + ] }, - "nameSecondary": { - "type": "string", - "nullable": true + "id": { + "type": "string" }, - "building": { + "error": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, "code": { - "type": "string" - }, - "campusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - }, - "campus": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code", - "namePrimary", - "nameSecondary" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code", - "campusId", - "namePrimary", - "nameSecondary", - "campus" - ], - "additionalProperties": false, - "nullable": true - }, - "roomType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { "type": "string", - "nullable": true - }, - "code": { - "type": "string" + "enum": [ + "not_found", + "forbidden", + "locked" + ] }, - "namePrimary": { + "message": { "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true } }, "required": [ - "id", - "jwId", - "nameCn", - "nameEn", "code", - "namePrimary", - "nameSecondary" + "message" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } }, "required": [ + "success", "id", - "jwId", - "nameCn", - "nameEn", - "code", - "floor", - "virtual", - "seatsForSection", - "remark", - "seats", - "buildingId", - "roomTypeId", - "namePrimary", - "nameSecondary", - "building", - "roomType" + "error" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + } + ], + "type": "object" + } + } + }, + "required": [ + "results" + ], + "additionalProperties": false + }, + "courseDetailSchema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "teachers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "age": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "qq": { - "type": "string", - "nullable": true - }, - "wechat": { - "type": "string", - "nullable": true - }, - "departmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - }, - "department": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "isCollege": { - "type": "boolean", - "nullable": true - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege", - "namePrimary", - "nameSecondary" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId", - "namePrimary", - "nameSecondary", - "department" - ], - "additionalProperties": false - } + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "section": { + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, "type": "object", "properties": { "id": { @@ -12856,1418 +22220,2745 @@ "maximum": 9007199254740991 }, "jwId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { + "nameCn": { "type": "string" }, - "bizTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "credits": { - "type": "number", - "nullable": true - }, - "period": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "periodsPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "timesPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true - }, - "dateTimePlaceText": { - "type": "string", - "nullable": true - }, - "dateTimePlacePersonText": { - "nullable": true - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true - }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true - }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "remark": { - "type": "string", - "nullable": true - }, - "scheduleRemark": { - "type": "string", - "nullable": true - }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "semesterId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "campusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "examModeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "openDepartmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teachLanguageId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "roomTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "code": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } }, - "course": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "educationLevelId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "typeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "namePrimary": { - "type": "string" - }, - "nameSecondary": { - "type": "string", - "nullable": true - } + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "semester", + "campus", + "teachers" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "sections" + ], + "additionalProperties": false + }, + "dashboardLinkPinRequestSchema": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "minLength": 1 + }, + "returnTo": { + "type": "string" + }, + "action": { + "type": "string", + "enum": [ + "pin", + "unpin" + ] + } + }, + "required": [ + "slug" + ], + "additionalProperties": false + }, + "dashboardLinkPinResponseSchema": { + "type": "object", + "properties": { + "pinnedSlugs": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxPinnedLinks": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "error": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "pinnedSlugs", + "maxPinnedLinks", + "error" + ], + "additionalProperties": false + }, + "dashboardLinkVisitRequestSchema": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "slug" + ], + "additionalProperties": false + }, + "homeworkUpdateRequestSchema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "description": { + "nullable": true, + "type": "string", + "maxLength": 4000 + }, + "publishedAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionStartAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "submissionDueAt": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "homeworkUpdateResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "homework": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + }, + "publishedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "submissionStartAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "submissionDueAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "deletedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "createdById": { + "nullable": true, + "type": "string" + }, + "updatedById": { + "nullable": true, + "type": "string" + }, + "deletedById": { + "nullable": true, + "type": "string" + }, + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "namePrimary", - "nameSecondary" - ], - "additionalProperties": false + "nameSecondary": { + "nullable": true, + "type": "string" + } }, - "semester": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "code": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false, - "nullable": true - } + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false }, - "required": [ - "id", - "jwId", - "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", - "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "course", - "semester" - ], - "additionalProperties": false + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } }, - "scheduleGroup": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "no": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "isDefault": { - "type": "boolean" - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false + }, + "description": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" }, - "required": [ - "id", - "jwId", - "no", - "limitCount", - "stdCount", - "actualPeriods", - "isDefault", - "sectionId" - ], - "additionalProperties": false - } + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedById": { + "nullable": true, + "type": "string" + }, + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId" + ], + "additionalProperties": false }, - "required": [ - "id", - "periods", - "date", - "weekday", - "startTime", - "endTime", - "experiment", - "customPlace", - "lessonType", - "weekIndex", - "exerciseClass", - "startUnit", - "endUnit", - "roomId", - "sectionId", - "scheduleGroupId", - "room", - "teachers", - "section", - "scheduleGroup" - ], - "additionalProperties": false - } - }, - "pagination": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "createdBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "updatedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "pageSize": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "deletedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "total": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "completion": { + "nullable": true, + "type": "object", + "properties": { + "completedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "completedAt" + ], + "additionalProperties": false }, - "totalPages": { + "commentCount": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "maximum": 9007199254740991 } }, "required": [ - "page", - "pageSize", - "total", - "totalPages" + "id", + "title", + "isMajor", + "requiresTeam", + "publishedAt", + "submissionStartAt", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "sectionId", + "createdById", + "updatedById", + "deletedById", + "section", + "description", + "createdBy", + "updatedBy", + "deletedBy", + "completion", + "commentCount" ], "additionalProperties": false } }, "required": [ - "data", - "pagination" + "success", + "homework" ], "additionalProperties": false }, - "sectionDetailSchema": { + "homeworkCompletionBatchRequestSchema": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "bizTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "credits": { - "type": "number", - "nullable": true - }, - "period": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "periodsPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "timesPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true - }, - "dateTimePlaceText": { - "type": "string", - "nullable": true - }, - "dateTimePlacePersonText": { - "nullable": true - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true - }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true - }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "remark": { - "type": "string", - "nullable": true - }, - "scheduleRemark": { - "type": "string", - "nullable": true - }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "semesterId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "campusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "examModeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "openDepartmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teachLanguageId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "roomTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "course": { + "items": { + "minItems": 1, + "maxItems": 100, + "type": "array", + "items": { + "type": "object", + "properties": { + "homeworkId": { + "type": "string", + "minLength": 1 + }, + "completed": { + "type": "boolean" + } + }, + "required": [ + "homeworkId", + "completed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "items" + ], + "additionalProperties": false + }, + "homeworkCompletionBatchResponseSchema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + }, + "homeworkId": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "completedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "success", + "homeworkId", + "completed", + "completedAt" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + false + ] + }, + "homeworkId": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "not_found", + "deleted" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "success", + "homeworkId", + "completed", + "error" + ], + "additionalProperties": false + } + ], + "type": "object" + } + } + }, + "required": [ + "results" + ], + "additionalProperties": false + }, + "compactOverviewResponseSchema": { + "type": "object", + "properties": { + "user": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "userId": { + "nullable": true, + "type": "string" }, - "code": { + "name": { + "nullable": true, "type": "string" }, - "nameCn": { + "image": { + "nullable": true, "type": "string" }, - "nameEn": { + "isAdmin": { + "type": "boolean" + } + }, + "required": [ + "userId", + "name", + "image", + "isAdmin" + ], + "additionalProperties": false + }, + "anchor": { + "type": "object", + "properties": { + "atTime": { "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "classTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "todayStart": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "tomorrowStart": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "educationLevelId": { + "homeworkWindowDays": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "exclusiveMinimum": true, + "maximum": 9007199254740991 }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "homeworkWindowEnd": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "typeId": { + "limit": { "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "category": { + "exclusiveMinimum": true, + "maximum": 9007199254740991 + } + }, + "required": [ + "atTime", + "todayStart", + "tomorrowStart", + "homeworkWindowDays", + "homeworkWindowEnd", + "limit" + ], + "additionalProperties": false + }, + "counts": { + "type": "object", + "properties": { + "todos": { "type": "object", "properties": { - "id": { + "incomplete": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classType": { - "type": "object", - "properties": { - "id": { + "completed": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classify": { - "type": "object", - "properties": { - "id": { + "overdue": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true } }, "required": [ - "id", - "nameCn", - "nameEn" + "incomplete", + "completed", + "overdue" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "educationLevel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "pendingHomeworks": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "dueSoonHomeworks": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "todaySchedules": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "upcomingExams": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "todos", + "pendingHomeworks", + "dueSoonHomeworks", + "todaySchedules", + "upcomingExams" + ], + "additionalProperties": false + }, + "schedules": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periods": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "date": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "weekday": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { + "type": "string" + }, + "endTime": { + "type": "string" + }, + "experiment": { + "nullable": true, + "type": "string" + }, + "customPlace": { + "nullable": true, + "type": "string" + }, + "lessonType": { + "nullable": true, + "type": "string" + }, + "weekIndex": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "exerciseClass": { + "nullable": true, + "type": "boolean" + }, + "startUnit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endUnit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "scheduleGroupId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "room": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "floor": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "virtual": { + "type": "boolean" + }, + "seatsForSection": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "seats": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "buildingId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "building": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "campusId", + "namePrimary", + "nameSecondary", + "campus" + ], + "additionalProperties": false + }, + "roomType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "floor", + "virtual", + "seatsForSection", + "remark", + "seats", + "buildingId", + "roomTypeId", + "namePrimary", + "nameSecondary", + "building", + "roomType" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary", + "department" + ], + "additionalProperties": false + } + }, + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false + }, + "scheduleGroup": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "no": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "actualPeriods": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "isDefault": { + "type": "boolean" + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "jwId", + "no", + "limitCount", + "stdCount", + "actualPeriods", + "isDefault", + "sectionId" + ], + "additionalProperties": false + } }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "gradation": { + "required": [ + "id", + "periods", + "date", + "weekday", + "startTime", + "endTime", + "experiment", + "customPlace", + "lessonType", + "weekIndex", + "exerciseClass", + "startUnit", + "endUnit", + "roomId", + "sectionId", + "scheduleGroupId", + "room", + "teachers", + "section", + "scheduleGroup" + ], + "additionalProperties": false + } + } + }, + "required": [ + "total", + "items" + ], + "additionalProperties": false + }, + "todos": { + "type": "object", + "properties": { + "counts": { "type": "object", "properties": { - "id": { + "incomplete": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "type": { - "type": "object", - "properties": { - "id": { + "completed": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true + "overdue": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 } }, "required": [ - "id", - "nameCn", - "nameEn" + "incomplete", + "completed", + "overdue" ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" - ], - "additionalProperties": false - }, - "semester": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "code": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false, - "nullable": true - }, - "campus": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false, - "nullable": true - }, - "openDepartment": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "isCollege": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege" - ], - "additionalProperties": false, - "nullable": true - }, - "examMode": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "teachLanguage": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "roomType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true + "additionalProperties": false }, - "code": { - "type": "string" + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "nullable": true, + "type": "string" + }, + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "completed": { + "type": "boolean" + }, + "dueAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "id", + "title", + "content", + "priority", + "completed", + "dueAt", + "createdAt", + "updatedAt" + ], + "additionalProperties": false + } } }, "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" + "counts", + "items" ], - "additionalProperties": false, - "nullable": true - }, - "schedules": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "periods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "date": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "weekday": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "startTime": { - "type": "string" - }, - "endTime": { - "type": "string" - }, - "experiment": { - "type": "string", - "nullable": true - }, - "customPlace": { - "type": "string", - "nullable": true - }, - "lessonType": { - "type": "string", - "nullable": true - }, - "weekIndex": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "exerciseClass": { - "type": "boolean", - "nullable": true - }, - "startUnit": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "endUnit": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "roomId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "scheduleGroupId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "periods", - "date", - "weekday", - "startTime", - "endTime", - "experiment", - "customPlace", - "lessonType", - "weekIndex", - "exerciseClass", - "startUnit", - "endUnit", - "roomId", - "sectionId", - "scheduleGroupId" - ], - "additionalProperties": false - } + "additionalProperties": false }, - "scheduleGroups": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "no": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "isDefault": { - "type": "boolean" - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } + "dueTodos": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 }, - "required": [ - "id", - "jwId", - "no", - "limitCount", - "stdCount", - "actualPeriods", - "isDefault", - "sectionId" - ], - "additionalProperties": false - } - }, - "teachers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "age": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "qq": { - "type": "string", - "nullable": true - }, - "wechat": { - "type": "string", - "nullable": true - }, - "departmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "department": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "dueAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "id", + "title", + "priority", + "dueAt", + "createdAt" + ], + "additionalProperties": false + } + } + }, + "required": [ + "total", + "items" + ], + "additionalProperties": false + }, + "homeworks": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "items": { + "type": "array", + "items": { "type": "object", "properties": { "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "isMajor": { + "type": "boolean" + }, + "requiresTeam": { + "type": "boolean" + }, + "publishedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "submissionStartAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "submissionDueAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "deletedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "sectionId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" + "createdById": { + "nullable": true, + "type": "string" + }, + "updatedById": { + "nullable": true, + "type": "string" + }, + "deletedById": { + "nullable": true, + "type": "string" + }, + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false + }, + "description": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedById": { + "nullable": true, + "type": "string" + }, + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId" + ], + "additionalProperties": false }, - "nameCn": { - "type": "string" + "createdBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "nameEn": { - "type": "string", - "nullable": true + "updatedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "isCollege": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege" - ], - "additionalProperties": false, - "nullable": true - }, - "teacherTitle": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "deletedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "jwId": { + "completion": { + "nullable": true, + "type": "object", + "properties": { + "completedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "completedAt" + ], + "additionalProperties": false + }, + "commentCount": { "type": "integer", - "minimum": -9007199254740991, + "minimum": 0, "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string" - }, - "enabled": { - "type": "boolean", - "nullable": true } }, "required": [ "id", - "jwId", - "nameCn", - "nameEn", - "code", - "enabled" + "title", + "isMajor", + "requiresTeam", + "publishedAt", + "submissionStartAt", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "sectionId", + "createdById", + "updatedById", + "deletedById", + "section", + "description", + "createdBy", + "updatedBy", + "deletedBy", + "completion", + "commentCount" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } - }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId", - "department", - "teacherTitle" - ], - "additionalProperties": false - } + } + }, + "required": [ + "total", + "items" + ], + "additionalProperties": false }, - "teacherAssignments": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "role": { - "type": "string", - "nullable": true - }, - "period": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "weekIndices": { - "type": "array", - "items": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nullable": true - }, - "weekIndicesMsg": { - "type": "string", - "nullable": true - }, - "teacherLessonTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacher": { + "exams": { + "type": "object", + "properties": { + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "items": { + "type": "array", + "items": { "type": "object", "properties": { "id": { @@ -14275,419 +24966,969 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "personId": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examType": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teacherId": { + "startTime": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true + "maximum": 9007199254740991 }, - "age": { + "endTime": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "qq": { - "type": "string", - "nullable": true + "maximum": 9007199254740991 }, - "wechat": { + "examDate": { + "nullable": true, "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "departmentId": { + "examTakeCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - } - }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" - ], - "additionalProperties": false - }, - "teacherLessonType": { - "type": "object", - "properties": { - "id": { + "examMode": { + "nullable": true, + "type": "string" + }, + "examBatchId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "sectionId": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "code": { - "type": "string" + "examBatch": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "role": { - "type": "string", - "nullable": true + "examRooms": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "room": { + "type": "string" + }, + "count": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "room", + "count", + "examId" + ], + "additionalProperties": false + } }, - "enabled": { - "type": "boolean", - "nullable": true + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false } }, "required": [ "id", "jwId", - "nameCn", - "nameEn", - "code", - "role", - "enabled" + "examType", + "startTime", + "endTime", + "examDate", + "examTakeCount", + "examMode", + "examBatchId", + "sectionId", + "examBatch", + "examRooms", + "section" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false } + } + }, + "required": [ + "total", + "items" + ], + "additionalProperties": false + } + }, + "required": [ + "user", + "anchor", + "counts", + "schedules", + "todos", + "dueTodos", + "homeworks", + "exams" + ], + "additionalProperties": false + }, + "sectionDetailSchema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "teacherId", - "sectionId", - "role", - "period", - "weekIndices", - "weekIndicesMsg", - "teacherLessonTypeId", - "teacher", - "teacherLessonType" - ], - "additionalProperties": false - } - }, - "exams": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "examType": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "startTime": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "endTime": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "examDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "examTakeCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "examMode": { - "type": "string", - "nullable": true - }, - "examBatchId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "sectionId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "examBatch": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "examRooms": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "room": { - "type": "string" - }, - "count": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "examId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "id", - "room", - "count", - "examId" - ], - "additionalProperties": false + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" } - } - }, - "required": [ - "id", - "jwId", - "examType", - "startTime", - "endTime", - "examDate", - "examTakeCount", - "examMode", - "examBatchId", - "sectionId", - "examBatch", - "examRooms" - ], - "additionalProperties": false - } - }, - "adminClasses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "grade": { - "type": "string", - "nullable": true }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "planCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "enabled": { - "type": "boolean", - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "abbrZh": { - "type": "string", - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "abbrEn": { - "type": "string", - "nullable": true - } + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "required": [ - "id", - "jwId", - "code", - "grade", - "nameCn", - "nameEn", - "stdCount", - "planCount", - "enabled", - "abbrZh", - "abbrEn" - ], - "additionalProperties": false - } - } - }, - "required": [ - "id", - "jwId", - "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", - "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "course", - "semester", - "campus", - "openDepartment", - "examMode", - "teachLanguage", - "roomType", - "schedules", - "scheduleGroups", - "teachers", - "teacherAssignments", - "exams", - "adminClasses" - ], - "additionalProperties": false - }, - "matchSectionCodesResponseSchema": { - "type": "object", - "properties": { + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type" + ], + "additionalProperties": false + }, "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code" + ], + "additionalProperties": false + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege" + ], + "additionalProperties": false + }, + "examMode": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "teachLanguage": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "roomType": { + "nullable": true, "type": "object", "properties": { "id": { @@ -14695,35 +25936,32 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "nameCn": { - "type": "string", - "nullable": true + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" }, "code": { - "type": "string", - "nullable": true + "type": "string" } }, "required": [ "id", + "jwId", "nameCn", + "nameEn", "code" ], "additionalProperties": false }, - "matchedCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "unmatchedCodes": { - "type": "array", - "items": { - "type": "string" - } - }, - "sections": { + "schedules": { "type": "array", "items": { "type": "object", @@ -14733,165 +25971,235 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "periods": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" + "date": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "bizTypeId": { + "weekday": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "credits": { - "type": "number", - "nullable": true + "startTime": { + "type": "string" }, - "period": { + "endTime": { + "type": "string" + }, + "experiment": { + "nullable": true, + "type": "string" + }, + "customPlace": { + "nullable": true, + "type": "string" + }, + "lessonType": { + "nullable": true, + "type": "string" + }, + "weekIndex": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "periodsPerWeek": { + "exerciseClass": { + "nullable": true, + "type": "boolean" + }, + "startUnit": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "timesPerWeek": { + "endUnit": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "stdCount": { + "roomId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "limitCount": { + "sectionId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true - }, - "dateTimePlaceText": { - "type": "string", - "nullable": true - }, - "dateTimePlacePersonText": { - "nullable": true + "maximum": 9007199254740991 }, - "actualPeriods": { + "scheduleGroupId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "periods", + "date", + "weekday", + "startTime", + "endTime", + "experiment", + "customPlace", + "lessonType", + "weekIndex", + "exerciseClass", + "startUnit", + "endUnit", + "roomId", + "sectionId", + "scheduleGroupId" + ], + "additionalProperties": false + } + }, + "scheduleGroups": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "suggestScheduleWeeks": { - "nullable": true + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true + "no": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "scheduleJsonParams": { - "nullable": true + "limitCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "selectedStdCount": { + "stdCount": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "remark": { - "type": "string", - "nullable": true + "actualPeriods": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "scheduleRemark": { - "type": "string", - "nullable": true + "isDefault": { + "type": "boolean" }, - "courseId": { + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "jwId", + "no", + "limitCount", + "stdCount", + "actualPeriods", + "isDefault", + "sectionId" + ], + "additionalProperties": false + } + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "semesterId": { + "personId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "campusId": { + "teacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "examModeId": { + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" }, - "openDepartmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "qq": { + "nullable": true, + "type": "string" }, - "teachLanguageId": { + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "roomTypeId": { + "teacherTitleId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "course": { + "department": { + "nullable": true, "type": "object", "properties": { "id": { @@ -14899,11 +26207,6 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, "code": { "type": "string" }, @@ -14911,212 +26214,136 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "educationLevelId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "nullable": true, + "type": "string" }, - "gradationId": { + "isCollege": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege" + ], + "additionalProperties": false + }, + "teacherTitle": { + "nullable": true, + "type": "object", + "properties": { + "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "typeId": { + "jwId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "maximum": 9007199254740991 }, - "classify": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "nameCn": { + "type": "string" }, - "educationLevel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "nameEn": { + "nullable": true, + "type": "string" }, - "gradation": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "code": { + "type": "string" }, - "type": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "enabled": { + "nullable": true, + "type": "boolean" } }, "required": [ "id", "jwId", - "code", "nameCn", "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" + "code", + "enabled" ], "additionalProperties": false + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "department", + "teacherTitle" + ], + "additionalProperties": false + } + }, + "teacherAssignments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "semester": { + "teacherId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "role": { + "nullable": true, + "type": "string" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "weekIndices": { + "nullable": true, + "type": "array", + "items": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "weekIndicesMsg": { + "nullable": true, + "type": "string" + }, + "teacherLessonTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacher": { "type": "object", "properties": { "id": { @@ -15124,42 +26351,98 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "code": { + "nullable": true, + "type": "string" + }, "nameCn": { "type": "string" }, - "code": { + "nameEn": { + "nullable": true, "type": "string" }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 } }, "required": [ "id", - "jwId", - "nameCn", + "personId", + "teacherId", "code", - "startDate", - "endDate" + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "campus": { + "teacherLessonType": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15170,19 +26453,25 @@ "jwId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "code": { - "type": "string", - "nullable": true + "type": "string" + }, + "role": { + "nullable": true, + "type": "string" + }, + "enabled": { + "nullable": true, + "type": "boolean" } }, "required": [ @@ -15190,12 +26479,90 @@ "jwId", "nameCn", "nameEn", - "code" + "code", + "role", + "enabled" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false + } + }, + "required": [ + "id", + "teacherId", + "sectionId", + "role", + "period", + "weekIndices", + "weekIndicesMsg", + "teacherLessonTypeId", + "teacher", + "teacherLessonType" + ], + "additionalProperties": false + } + }, + "exams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "openDepartment": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examType": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endTime": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examDate": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "examTakeCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examMode": { + "nullable": true, + "type": "string" + }, + "examBatchId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examBatch": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15203,32 +26570,22 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" - }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true - }, - "isCollege": { - "type": "boolean", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ "id", - "code", "nameCn", - "nameEn", - "isCollege" + "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "teachers": { + "examRooms": { "type": "array", "items": { "type": "object", @@ -15236,186 +26593,222 @@ "id": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "age": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "qq": { - "type": "string", - "nullable": true + "maximum": 9007199254740991 }, - "wechat": { - "type": "string", - "nullable": true + "room": { + "type": "string" }, - "departmentId": { + "count": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teacherTitleId": { + "examId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 } }, "required": [ "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" + "room", + "count", + "examId" ], "additionalProperties": false } } }, + "required": [ + "id", + "jwId", + "examType", + "startTime", + "endTime", + "examDate", + "examTakeCount", + "examMode", + "examBatchId", + "sectionId", + "examBatch", + "examRooms" + ], + "additionalProperties": false + } + }, + "adminClasses": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "grade": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "planCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "enabled": { + "nullable": true, + "type": "boolean" + }, + "abbrZh": { + "nullable": true, + "type": "string" + }, + "abbrEn": { + "nullable": true, + "type": "string" + } + }, "required": [ "id", "jwId", "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", + "grade", + "nameCn", + "nameEn", "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "course", - "semester", - "campus", - "openDepartment", - "teachers" + "planCount", + "enabled", + "abbrZh", + "abbrEn" ], "additionalProperties": false } - }, - "total": { - "type": "integer", - "minimum": 0, - "maximum": 9007199254740991 } }, "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", "semester", - "matchedCodes", - "unmatchedCodes", - "sections", - "total" + "campus", + "openDepartment", + "examMode", + "teachLanguage", + "roomType", + "schedules", + "scheduleGroups", + "teachers", + "teacherAssignments", + "exams", + "adminClasses" ], "additionalProperties": false }, - "matchSectionCodesRequestSchema": { + "matchSectionCodesResponseSchema": { "type": "object", "properties": { - "codes": { - "minItems": 1, - "maxItems": 500, + "semester": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "code" + ], + "additionalProperties": false + }, + "matchedCodes": { "type": "array", "items": { - "type": "string", - "minLength": 1, - "maxLength": 64, - "pattern": "^[A-Za-z0-9_.-]+$" + "type": "string" } }, - "semesterId": { - "type": "string" - } - }, - "required": [ - "codes" - ], - "additionalProperties": false - }, - "paginatedSectionResponseSchema": { - "type": "object", - "properties": { - "data": { + "unmatchedCodes": { + "type": "array", + "items": { + "type": "string" + } + }, + "suggestions": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "sections": { "type": "array", "items": { "type": "object", @@ -15434,113 +26827,113 @@ "type": "string" }, "bizTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "credits": { - "type": "number", - "nullable": true + "nullable": true, + "type": "number" }, "period": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "periodsPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "timesPerWeek": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "stdCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "limitCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true + "nullable": true, + "type": "boolean" }, "dateTimePlaceText": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "dateTimePlacePersonText": { "nullable": true }, "actualPeriods": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "theoryPeriods": { - "type": "number", - "nullable": true + "nullable": true, + "type": "number" }, "practicePeriods": { - "type": "number", - "nullable": true + "nullable": true, + "type": "number" }, "experimentPeriods": { - "type": "number", - "nullable": true + "nullable": true, + "type": "number" }, "machinePeriods": { - "type": "number", - "nullable": true + "nullable": true, + "type": "number" }, "designPeriods": { - "type": "number", - "nullable": true + "nullable": true, + "type": "number" }, "testPeriods": { - "type": "number", - "nullable": true + "nullable": true, + "type": "number" }, "scheduleState": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "suggestScheduleWeeks": { "nullable": true }, "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "scheduleJsonParams": { "nullable": true }, "selectedStdCount": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "remark": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "scheduleRemark": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "courseId": { "type": "integer", @@ -15548,40 +26941,40 @@ "maximum": 9007199254740991 }, "semesterId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "campusId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "examModeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "openDepartmentId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "teachLanguageId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "roomTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "course": { "type": "object", @@ -15603,46 +26996,47 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, "categoryId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "classTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "classifyId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "educationLevelId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "gradationId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "typeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, "category": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15654,8 +27048,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15663,10 +27057,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "classType": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15678,8 +27072,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15687,10 +27081,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "classify": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15702,8 +27096,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15711,10 +27105,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "educationLevel": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15726,8 +27120,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15735,10 +27129,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "gradation": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15750,8 +27144,8 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, "required": [ @@ -15759,10 +27153,10 @@ "nameCn", "nameEn" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, "type": { + "nullable": true, "type": "object", "properties": { "id": { @@ -15774,41 +27168,632 @@ "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" } }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" - ], - "additionalProperties": false + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "openDepartment": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester", + "campus", + "openDepartment", + "teachers" + ], + "additionalProperties": false + } + }, + "total": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "semester", + "matchedCodes", + "unmatchedCodes", + "suggestions", + "sections", + "total" + ], + "additionalProperties": false + }, + "teacherDetailSchema": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "department": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege" + ], + "additionalProperties": false + }, + "teacherTitle": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "enabled": { + "nullable": true, + "type": "boolean" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "enabled" + ], + "additionalProperties": false + }, + "sections": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "semester": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { "type": "object", "properties": { "id": { @@ -15821,325 +27806,225 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, "code": { "type": "string" }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false, - "nullable": true - }, - "campus": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, "nameCn": { "type": "string" }, "nameEn": { - "type": "string", - "nullable": true + "nullable": true, + "type": "string" }, - "code": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code" - ], - "additionalProperties": false, - "nullable": true - }, - "openDepartment": { - "type": "object", - "properties": { - "id": { + "categoryId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "isCollege": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "id", - "code", - "nameCn", - "nameEn", - "isCollege" - ], - "additionalProperties": false, - "nullable": true - }, - "examMode": { - "type": "object", - "properties": { - "id": { + "classTypeId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "teachLanguage": { - "type": "object", - "properties": { - "id": { + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "teachers": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "age": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "qq": { - "type": "string", - "nullable": true - }, - "wechat": { - "type": "string", - "nullable": true - }, - "departmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "category": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - } + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId" - ], - "additionalProperties": false - } - }, - "adminClasses": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "grade": { - "type": "string", - "nullable": true - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "classType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "planCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "classify": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "enabled": { - "type": "boolean", - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "educationLevel": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "abbrZh": { - "type": "string", - "nullable": true + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + }, + "gradation": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } }, - "abbrEn": { - "type": "string", - "nullable": true - } + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false }, - "required": [ - "id", - "jwId", - "code", - "grade", - "nameCn", - "nameEn", - "stdCount", - "planCount", - "enabled", - "abbrZh", - "abbrEn" - ], - "additionalProperties": false - } + "type": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "nameCn", + "nameEn" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "category", + "classType", + "classify", + "educationLevel", + "gradation", + "type" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] } }, "required": [ @@ -16178,934 +28063,1580 @@ "teachLanguageId", "roomTypeId", "course", - "semester", - "campus", - "openDepartment", - "examMode", - "teachLanguage", - "teachers", - "adminClasses" + "semester" ], "additionalProperties": false } }, - "pagination": { + "_count": { "type": "object", "properties": { - "page": { + "sections": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 + } + }, + "required": [ + "sections" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "department", + "teacherTitle", + "sections", + "_count" + ], + "additionalProperties": false + }, + "todoUpdateRequestSchema": { + "type": "object", + "properties": { + "title": { + "type": "string", + "minLength": 1, + "maxLength": 200 + }, + "content": { + "nullable": true, + "type": "string", + "maxLength": 4000 + }, + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "dueAt": { + "anyOf": [ + { + "type": "string" }, - "pageSize": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "completed": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "todoUpdateResponseSchema": { + "type": "object", + "properties": { + "success": { + "type": "boolean" + }, + "todo": { + "type": "object", + "properties": { + "id": { + "type": "string" }, - "total": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "title": { + "type": "string" }, - "totalPages": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "content": { + "nullable": true, + "type": "string" + }, + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "completed": { + "type": "boolean" + }, + "dueAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ - "page", - "pageSize", - "total", - "totalPages" + "id", + "title", + "content", + "priority", + "completed", + "dueAt", + "createdAt", + "updatedAt" ], "additionalProperties": false } }, "required": [ - "data", - "pagination" + "success", + "todo" + ], + "additionalProperties": false + }, + "todoCompletionBatchRequestSchema": { + "type": "object", + "properties": { + "items": { + "minItems": 1, + "maxItems": 100, + "type": "array", + "items": { + "type": "object", + "properties": { + "todoId": { + "type": "string", + "minLength": 1 + }, + "completed": { + "type": "boolean" + } + }, + "required": [ + "todoId", + "completed" + ], + "additionalProperties": false + } + } + }, + "required": [ + "items" + ], + "additionalProperties": false + }, + "todoCompletionBatchResponseSchema": { + "type": "object", + "properties": { + "results": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + }, + "todoId": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "todo": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "content": { + "nullable": true, + "type": "string" + }, + "priority": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ] + }, + "completed": { + "type": "boolean" + }, + "dueAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "id", + "title", + "content", + "priority", + "completed", + "dueAt", + "createdAt", + "updatedAt" + ], + "additionalProperties": false + } + }, + "required": [ + "success", + "todoId", + "completed", + "todo" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + false + ] + }, + "todoId": { + "type": "string" + }, + "completed": { + "type": "boolean" + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "not_found", + "forbidden" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "success", + "todoId", + "completed", + "error" + ], + "additionalProperties": false + } + ], + "type": "object" + } + } + }, + "required": [ + "results" ], "additionalProperties": false }, - "semesterSchema": { + "todoBatchDeleteRequestSchema": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "code": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "ids": { + "minItems": 1, + "maxItems": 100, + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } }, "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" + "ids" ], "additionalProperties": false }, - "paginatedSemesterResponseSchema": { + "todoBatchDeleteResponseSchema": { "type": "object", "properties": { - "data": { + "results": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "code": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "oneOf": [ + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + true + ] + }, + "id": { + "type": "string" + } + }, + "required": [ + "success", + "id" + ], + "additionalProperties": false }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + { + "type": "object", + "properties": { + "success": { + "type": "boolean", + "enum": [ + false + ] + }, + "id": { + "type": "string" + }, + "error": { + "type": "object", + "properties": { + "code": { + "type": "string", + "enum": [ + "not_found", + "forbidden" + ] + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "additionalProperties": false + } + }, + "required": [ + "success", + "id", + "error" + ], + "additionalProperties": false } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" ], - "additionalProperties": false + "type": "object" } - }, - "pagination": { + } + }, + "required": [ + "results" + ], + "additionalProperties": false + }, + "uploadRenameRequestSchema": { + "type": "object", + "properties": { + "filename": { + "type": "string", + "minLength": 1, + "maxLength": 255 + } + }, + "required": [ + "filename" + ], + "additionalProperties": false + }, + "uploadRenameResponseSchema": { + "type": "object", + "properties": { + "upload": { "type": "object", "properties": { - "page": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "id": { + "type": "string" }, - "pageSize": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "key": { + "type": "string" }, - "total": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "filename": { + "type": "string" }, - "totalPages": { + "size": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ - "page", - "pageSize", - "total", - "totalPages" + "id", + "key", + "filename", + "size", + "createdAt" ], "additionalProperties": false } }, "required": [ - "data", - "pagination" + "upload" ], "additionalProperties": false }, - "teacherDetailSchema": { + "uploadDeleteResponseSchema": { "type": "object", "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { + "deletedId": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true - }, - "age": { + "deletedSize": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "email": { - "type": "string", - "nullable": true - }, - "telephone": { - "type": "string", - "nullable": true - }, - "mobile": { - "type": "string", - "nullable": true - }, - "address": { - "type": "string", - "nullable": true - }, - "postcode": { - "type": "string", - "nullable": true - }, - "qq": { + "maximum": 9007199254740991 + } + }, + "required": [ + "deletedId", + "deletedSize" + ], + "additionalProperties": false + }, + "uploadCompleteRequestSchema": { + "type": "object", + "properties": { + "key": { "type": "string", - "nullable": true + "minLength": 1 }, - "wechat": { + "filename": { "type": "string", - "nullable": true - }, - "departmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "minLength": 1 }, - "department": { + "contentType": { + "type": "string" + } + }, + "required": [ + "key", + "filename" + ], + "additionalProperties": false + }, + "uploadCompleteResponseSchema": { + "type": "object", + "properties": { + "upload": { "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "code": { + "key": { "type": "string" }, - "nameCn": { + "filename": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "size": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "isCollege": { - "type": "boolean", - "nullable": true + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ "id", - "code", - "nameCn", - "nameEn", - "isCollege" + "key", + "filename", + "size", + "createdAt" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "teacherTitle": { + "usedBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "quotaBytes": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "upload", + "usedBytes", + "quotaBytes" + ], + "additionalProperties": false + }, + "publicUserProfileResponseSchema": { + "type": "object", + "properties": { + "user": { "type": "object", "properties": { "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "type": "string" }, - "nameCn": { + "username": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "name": { + "nullable": true, + "type": "string" }, - "code": { + "image": { + "nullable": true, "type": "string" }, - "enabled": { - "type": "boolean", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "nameEn", - "code", - "enabled" - ], - "additionalProperties": false, - "nullable": true - }, - "sections": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "bizTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "credits": { - "type": "number", - "nullable": true - }, - "period": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "periodsPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "timesPerWeek": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "stdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "limitCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "graduateAndPostgraduate": { - "type": "boolean", - "nullable": true - }, - "dateTimePlaceText": { - "type": "string", - "nullable": true - }, - "dateTimePlacePersonText": { - "nullable": true - }, - "actualPeriods": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "theoryPeriods": { - "type": "number", - "nullable": true - }, - "practicePeriods": { - "type": "number", - "nullable": true - }, - "experimentPeriods": { - "type": "number", - "nullable": true - }, - "machinePeriods": { - "type": "number", - "nullable": true - }, - "designPeriods": { - "type": "number", - "nullable": true - }, - "testPeriods": { - "type": "number", - "nullable": true - }, - "scheduleState": { - "type": "string", - "nullable": true - }, - "suggestScheduleWeeks": { - "nullable": true - }, - "suggestScheduleWeekInfo": { - "type": "string", - "nullable": true - }, - "scheduleJsonParams": { - "nullable": true - }, - "selectedStdCount": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "remark": { - "type": "string", - "nullable": true - }, - "scheduleRemark": { - "type": "string", - "nullable": true - }, - "courseId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "semesterId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "campusId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "examModeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "openDepartmentId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teachLanguageId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "_count": { + "type": "object", + "properties": { + "comments": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "uploads": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "homeworksCreated": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "subscribedSections": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } }, - "roomTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "required": [ + "comments", + "uploads", + "homeworksCreated", + "subscribedSections" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "username", + "name", + "image", + "createdAt", + "_count" + ], + "additionalProperties": false + }, + "sectionCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "weeks": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "date": { + "type": "string", + "pattern": "^\\d{4}-\\d{2}-\\d{2}$" + }, + "count": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } }, - "course": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "code": { - "type": "string" - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - }, - "categoryId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classTypeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "classifyId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "educationLevelId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "gradationId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "typeId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "category": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classType": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } + "required": [ + "date", + "count" + ], + "additionalProperties": false + } + } + }, + "totalContributions": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "user", + "sectionCount", + "weeks", + "totalContributions" + ], + "additionalProperties": false + }, + "adminModerateCommentRequestSchema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "active", + "softbanned", + "deleted" + ] + }, + "moderationNote": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "status" + ], + "additionalProperties": false + }, + "adminModeratedCommentResponseSchema": { + "type": "object", + "properties": { + "comment": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "body": { + "type": "string" + }, + "visibility": { + "type": "string", + "enum": [ + "public", + "logged_in_only" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "softbanned", + "deleted" + ] + }, + "isAnonymous": { + "type": "boolean" + }, + "authorName": { + "nullable": true, + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "deletedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "moderatedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "moderationNote": { + "nullable": true, + "type": "string" + }, + "userId": { + "nullable": true, + "type": "string" + }, + "moderatedById": { + "nullable": true, + "type": "string" + }, + "parentId": { + "nullable": true, + "type": "string" + }, + "rootId": { + "nullable": true, + "type": "string" + }, + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionTeacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "body", + "visibility", + "status", + "isAnonymous", + "authorName", + "createdAt", + "updatedAt", + "deletedAt", + "moderatedAt", + "moderationNote", + "userId", + "moderatedById", + "parentId", + "rootId", + "sectionId", + "courseId", + "teacherId", + "sectionTeacherId", + "homeworkId" + ], + "additionalProperties": false + } + }, + "required": [ + "comment" + ], + "additionalProperties": false + }, + "adminModerateDescriptionRequestSchema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "maxLength": 4000 + } + }, + "required": [ + "content" + ], + "additionalProperties": false + }, + "adminModeratedDescriptionResponseSchema": { + "type": "object", + "properties": { + "description": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedById": { + "nullable": true, + "type": "string" + }, + "sectionId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "courseId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + }, + "lastEditedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + }, + "section": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "course": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "classify": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } + "code": { + "type": "string" }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true + "nameCn": { + "type": "string" + } }, - "educationLevel": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + } + }, + "required": [ + "jwId", + "code", + "course" + ], + "additionalProperties": false + }, + "course": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + } + }, + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + }, + "teacher": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + } + }, + "required": [ + "id", + "nameCn" + ], + "additionalProperties": false + }, + "homework": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "section": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "gradation": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true - } + "code": { + "nullable": true, + "type": "string" }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - }, - "type": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" + "course": { + "nullable": true, + "type": "object", + "properties": { + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + } }, - "nameEn": { - "type": "string", - "nullable": true - } - }, - "required": [ - "id", - "nameCn", - "nameEn" - ], - "additionalProperties": false, - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "code", - "nameCn", - "nameEn", - "categoryId", - "classTypeId", - "classifyId", - "educationLevelId", - "gradationId", - "typeId", - "category", - "classType", - "classify", - "educationLevel", - "gradation", - "type" - ], - "additionalProperties": false + "required": [ + "jwId", + "code", + "nameCn" + ], + "additionalProperties": false + } + }, + "required": [ + "jwId", + "code", + "course" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "title", + "section" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId", + "lastEditedBy", + "section", + "course", + "teacher", + "homework" + ], + "additionalProperties": false + } + }, + "required": [ + "description" + ], + "additionalProperties": false + }, + "adminUpdateUserRequestSchema": { + "type": "object", + "properties": { + "name": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "username": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "string", + "nullable": true, + "enum": [ + null + ] + } + ] + }, + "isAdmin": { + "type": "boolean" + } + }, + "additionalProperties": false + }, + "adminUserResponseSchema": { + "type": "object", + "properties": { + "user": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "email": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "isAdmin", + "createdAt", + "email" + ], + "additionalProperties": false + } + }, + "required": [ + "user" + ], + "additionalProperties": false + }, + "oauthDeviceAuthorizationRequestSchema": { + "type": "object", + "properties": { + "client_id": { + "type": "string", + "minLength": 1 + }, + "resource": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + ] + }, + "scope": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "client_id" + ], + "additionalProperties": false + }, + "oauthDeviceAuthorizationResponseSchema": { + "type": "object", + "properties": { + "device_code": { + "type": "string" + }, + "user_code": { + "type": "string" + }, + "verification_uri": { + "type": "string", + "format": "uri" + }, + "verification_uri_complete": { + "type": "string", + "format": "uri" + }, + "expires_in": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "interval": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + } + }, + "required": [ + "device_code", + "user_code", + "verification_uri", + "verification_uri_complete", + "expires_in", + "interval" + ], + "additionalProperties": false + }, + "oauthErrorResponseSchema": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "error_description": { + "type": "string" + } + }, + "required": [ + "error" + ], + "additionalProperties": false + }, + "oauthTokenRequestSchema": { + "type": "object", + "properties": { + "grant_type": { + "type": "string", + "minLength": 1 + }, + "client_id": { + "type": "string", + "minLength": 1 + }, + "client_secret": { + "type": "string" + }, + "code": { + "type": "string", + "minLength": 1 + }, + "code_verifier": { + "type": "string", + "minLength": 1 + }, + "device_code": { + "type": "string", + "minLength": 1 + }, + "redirect_uri": { + "type": "string", + "minLength": 1 + }, + "refresh_token": { + "type": "string", + "minLength": 1 + }, + "resource": { + "anyOf": [ + { + "type": "string", + "minLength": 1 + }, + { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + } + ] + }, + "scope": { + "type": "string", + "minLength": 1 + } + }, + "required": [ + "grant_type" + ], + "additionalProperties": false + }, + "oauthTokenResponseSchema": { + "type": "object", + "properties": { + "access_token": { + "type": "string" + }, + "token_type": { + "type": "string", + "enum": [ + "Bearer" + ] + }, + "expires_in": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "expires_at": { + "type": "integer", + "exclusiveMinimum": true, + "maximum": 9007199254740991 + }, + "refresh_token": { + "type": "string" + }, + "scope": { + "type": "string" + }, + "id_token": { + "type": "string" + } + }, + "required": [ + "access_token", + "token_type", + "expires_in" + ], + "additionalProperties": false + }, + "commentReactionRequestSchema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "upvote", + "downvote", + "heart", + "laugh", + "hooray", + "confused", + "rocket", + "eyes" + ] + } + }, + "required": [ + "type" + ], + "additionalProperties": false + }, + "dashboardLinkPinBatchRequestSchema": { + "type": "object", + "properties": { + "items": { + "minItems": 1, + "maxItems": 10, + "type": "array", + "items": { + "type": "object", + "properties": { + "slug": { + "type": "string", + "minLength": 1 }, - "semester": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "jwId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "nameCn": { - "type": "string" - }, - "code": { - "type": "string" - }, - "startDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - }, - "endDate": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true - } - }, - "required": [ - "id", - "jwId", - "nameCn", - "code", - "startDate", - "endDate" - ], - "additionalProperties": false, - "nullable": true + "action": { + "type": "string", + "enum": [ + "pin", + "unpin" + ] } }, "required": [ - "id", - "jwId", - "code", - "bizTypeId", - "credits", - "period", - "periodsPerWeek", - "timesPerWeek", - "stdCount", - "limitCount", - "graduateAndPostgraduate", - "dateTimePlaceText", - "dateTimePlacePersonText", - "actualPeriods", - "theoryPeriods", - "practicePeriods", - "experimentPeriods", - "machinePeriods", - "designPeriods", - "testPeriods", - "scheduleState", - "suggestScheduleWeeks", - "suggestScheduleWeekInfo", - "scheduleJsonParams", - "selectedStdCount", - "remark", - "scheduleRemark", - "courseId", - "semesterId", - "campusId", - "examModeId", - "openDepartmentId", - "teachLanguageId", - "roomTypeId", - "course", - "semester" + "slug", + "action" ], "additionalProperties": false } + } + }, + "required": [ + "items" + ], + "additionalProperties": false + }, + "homeworkCompletionRequestSchema": { + "type": "object", + "properties": { + "completed": { + "type": "boolean" + } + }, + "required": [ + "completed" + ], + "additionalProperties": false + }, + "homeworkCompletionResponseSchema": { + "type": "object", + "properties": { + "completed": { + "type": "boolean" }, - "_count": { - "type": "object", - "properties": { - "sections": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "sections" - ], - "additionalProperties": false + "completedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" } }, "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId", - "department", - "teacherTitle", - "sections", - "_count" + "completed", + "completedAt" ], "additionalProperties": false }, - "paginatedTeacherResponseSchema": { + "subscribedHomeworksResponseSchema": { "type": "object", "properties": { - "data": { + "viewer": { + "type": "object", + "properties": { + "userId": { + "nullable": true, + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + }, + "isAdmin": { + "type": "boolean" + }, + "isAuthenticated": { + "type": "boolean" + }, + "isSuspended": { + "type": "boolean" + }, + "suspensionReason": { + "nullable": true, + "type": "string" + }, + "suspensionExpiresAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "userId", + "name", + "image", + "isAdmin", + "isAuthenticated", + "isSuspended", + "suspensionReason", + "suspensionExpiresAt" + ], + "additionalProperties": false + }, + "homeworks": { "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "personId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "teacherId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true - }, - "code": { - "type": "string", - "nullable": true - }, - "nameCn": { + "items": { + "type": "object", + "properties": { + "id": { "type": "string" }, - "nameEn": { - "type": "string", - "nullable": true + "title": { + "type": "string" }, - "age": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "isMajor": { + "type": "boolean" }, - "email": { - "type": "string", - "nullable": true + "requiresTeam": { + "type": "boolean" }, - "telephone": { + "publishedAt": { + "nullable": true, "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "mobile": { + "submissionStartAt": { + "nullable": true, "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "address": { + "submissionDueAt": { + "nullable": true, "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "postcode": { + "createdAt": { "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "qq": { + "updatedAt": { "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "wechat": { + "deletedAt": { + "nullable": true, "type": "string", - "nullable": true + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, - "departmentId": { + "sectionId": { "type": "integer", "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "maximum": 9007199254740991 }, - "teacherTitleId": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991, - "nullable": true + "createdById": { + "nullable": true, + "type": "string" }, - "department": { + "updatedById": { + "nullable": true, + "type": "string" + }, + "deletedById": { + "nullable": true, + "type": "string" + }, + "section": { "type": "object", "properties": { "id": { @@ -17113,616 +29644,1467 @@ "minimum": -9007199254740991, "maximum": 9007199254740991 }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, "code": { "type": "string" }, - "nameCn": { + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, "type": "string" }, - "nameEn": { - "type": "string", + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { "nullable": true }, - "isCollege": { - "type": "boolean", - "nullable": true + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] } }, "required": [ "id", + "jwId", "code", - "nameCn", - "nameEn", - "isCollege" + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "teacherTitle": { + "description": { + "nullable": true, "type": "object", "properties": { "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "updatedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedAt": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "lastEditedById": { + "nullable": true, + "type": "string" + }, + "sectionId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "jwId": { + "courseId": { + "nullable": true, "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, - "nameCn": { - "type": "string" - }, - "nameEn": { - "type": "string", - "nullable": true + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 }, - "code": { + "homeworkId": { + "nullable": true, "type": "string" - }, - "enabled": { - "type": "boolean", - "nullable": true } }, "required": [ "id", - "jwId", - "nameCn", - "nameEn", - "code", - "enabled" + "content", + "createdAt", + "updatedAt", + "lastEditedAt", + "lastEditedById", + "sectionId", + "courseId", + "teacherId", + "homeworkId" ], - "additionalProperties": false, - "nullable": true + "additionalProperties": false }, - "_count": { + "createdBy": { + "nullable": true, "type": "object", "properties": { - "sections": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "sections" - ], - "additionalProperties": false - } - }, - "required": [ - "id", - "personId", - "teacherId", - "code", - "nameCn", - "nameEn", - "age", - "email", - "telephone", - "mobile", - "address", - "postcode", - "qq", - "wechat", - "departmentId", - "teacherTitleId", - "department", - "teacherTitle", - "_count" - ], - "additionalProperties": false - } - }, - "pagination": { - "type": "object", - "properties": { - "page": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "pageSize": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "total": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "totalPages": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "page", - "pageSize", - "total", - "totalPages" - ], - "additionalProperties": false - } - }, - "required": [ - "data", - "pagination" - ], - "additionalProperties": false - }, - "todoUpdateRequestSchema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "content": { - "type": "string", - "maxLength": 4000, - "nullable": true - }, - "priority": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - "dueAt": { - "type": "string", - "nullable": true - }, - "completed": { - "type": "boolean" - } - }, - "additionalProperties": false - }, - "todosListResponseSchema": { - "type": "object", - "properties": { - "todos": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "content": { - "type": "string", - "nullable": true - }, - "priority": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - "completed": { - "type": "boolean" + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "dueAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$", - "nullable": true + "updatedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "deletedBy": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false }, - "updatedAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - } - }, - "required": [ - "id", - "title", - "content", - "priority", - "completed", - "dueAt", - "createdAt", - "updatedAt" - ], - "additionalProperties": false - } - } - }, - "required": [ - "todos" - ], - "additionalProperties": false - }, - "todoCreateRequestSchema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "minLength": 1, - "maxLength": 200 - }, - "content": { - "type": "string", - "maxLength": 4000, - "nullable": true - }, - "priority": { - "type": "string", - "enum": [ - "low", - "medium", - "high" - ] - }, - "dueAt": { - "type": "string", - "nullable": true - } - }, - "required": [ - "title" - ], - "additionalProperties": false - }, - "uploadRenameResponseSchema": { - "type": "object", - "properties": { - "upload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "key": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - } - }, - "required": [ - "id", - "key", - "filename", - "size", - "createdAt" - ], - "additionalProperties": false - } - }, - "required": [ - "upload" - ], - "additionalProperties": false - }, - "uploadRenameRequestSchema": { - "type": "object", - "properties": { - "filename": { - "type": "string", - "minLength": 1, - "maxLength": 255 - } - }, - "required": [ - "filename" - ], - "additionalProperties": false - }, - "uploadDeleteResponseSchema": { - "type": "object", - "properties": { - "deletedId": { - "type": "string" - }, - "deletedSize": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "deletedId", - "deletedSize" - ], - "additionalProperties": false - }, - "uploadCompleteResponseSchema": { - "type": "object", - "properties": { - "upload": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "key": { - "type": "string" - }, - "filename": { - "type": "string" - }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" - } - }, - "required": [ - "id", - "key", - "filename", - "size", - "createdAt" - ], - "additionalProperties": false - }, - "usedBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "quotaBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "upload", - "usedBytes", - "quotaBytes" - ], - "additionalProperties": false - }, - "uploadCompleteRequestSchema": { - "type": "object", - "properties": { - "key": { - "type": "string", - "minLength": 1 + "completion": { + "nullable": true, + "type": "object", + "properties": { + "completedAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + } + }, + "required": [ + "completedAt" + ], + "additionalProperties": false + }, + "commentCount": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "title", + "isMajor", + "requiresTeam", + "publishedAt", + "submissionStartAt", + "submissionDueAt", + "createdAt", + "updatedAt", + "deletedAt", + "sectionId", + "createdById", + "updatedById", + "deletedById", + "section", + "description", + "createdBy", + "updatedBy", + "deletedBy", + "completion", + "commentCount" + ], + "additionalProperties": false + } }, - "filename": { - "type": "string", - "minLength": 1 + "auditLogs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "action": { + "type": "string", + "enum": [ + "created", + "deleted" + ] + }, + "titleSnapshot": { + "type": "string" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "homeworkId": { + "nullable": true, + "type": "string" + }, + "actorId": { + "nullable": true, + "type": "string" + }, + "actor": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "nullable": true, + "type": "string" + }, + "username": { + "nullable": true, + "type": "string" + }, + "image": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "name", + "username", + "image" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "action", + "titleSnapshot", + "createdAt", + "sectionId", + "homeworkId", + "actorId", + "actor" + ], + "additionalProperties": false + } }, - "contentType": { - "type": "string" + "sectionIds": { + "type": "array", + "items": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } } }, "required": [ - "key", - "filename" + "viewer", + "homeworks", + "auditLogs", + "sectionIds" ], "additionalProperties": false }, - "uploadsListResponseSchema": { + "subscribedSchedulesResponseSchema": { "type": "object", "properties": { - "maxFileSizeBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "quotaBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "uploads": { + "schedules": { "type": "array", "items": { "type": "object", "properties": { "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periods": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "date": { + "nullable": true, + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "weekday": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "startTime": { "type": "string" }, - "key": { + "endTime": { + "type": "string" + }, + "experiment": { + "nullable": true, "type": "string" }, - "filename": { - "type": "string" + "customPlace": { + "nullable": true, + "type": "string" + }, + "lessonType": { + "nullable": true, + "type": "string" + }, + "weekIndex": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "exerciseClass": { + "nullable": true, + "type": "boolean" + }, + "startUnit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endUnit": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "scheduleGroupId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "room": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "floor": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "virtual": { + "type": "boolean" + }, + "seatsForSection": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "seats": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "buildingId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "building": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "campus": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "nullable": true, + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "campusId", + "namePrimary", + "nameSecondary", + "campus" + ], + "additionalProperties": false + }, + "roomType": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "code": { + "type": "string" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "jwId", + "nameCn", + "nameEn", + "code", + "floor", + "virtual", + "seatsForSection", + "remark", + "seats", + "buildingId", + "roomTypeId", + "namePrimary", + "nameSecondary", + "building", + "roomType" + ], + "additionalProperties": false + }, + "teachers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "personId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "nullable": true, + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "age": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "email": { + "nullable": true, + "type": "string" + }, + "telephone": { + "nullable": true, + "type": "string" + }, + "mobile": { + "nullable": true, + "type": "string" + }, + "address": { + "nullable": true, + "type": "string" + }, + "postcode": { + "nullable": true, + "type": "string" + }, + "qq": { + "nullable": true, + "type": "string" + }, + "wechat": { + "nullable": true, + "type": "string" + }, + "departmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teacherTitleId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + }, + "department": { + "nullable": true, + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "isCollege": { + "nullable": true, + "type": "boolean" + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "code", + "nameCn", + "nameEn", + "isCollege", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + } + }, + "required": [ + "id", + "personId", + "teacherId", + "code", + "nameCn", + "nameEn", + "age", + "email", + "telephone", + "mobile", + "address", + "postcode", + "qq", + "wechat", + "departmentId", + "teacherTitleId", + "namePrimary", + "nameSecondary", + "department" + ], + "additionalProperties": false + } }, - "size": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 + "section": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "bizTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "credits": { + "nullable": true, + "type": "number" + }, + "period": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "periodsPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "timesPerWeek": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "graduateAndPostgraduate": { + "nullable": true, + "type": "boolean" + }, + "dateTimePlaceText": { + "nullable": true, + "type": "string" + }, + "dateTimePlacePersonText": { + "nullable": true + }, + "actualPeriods": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "theoryPeriods": { + "nullable": true, + "type": "number" + }, + "practicePeriods": { + "nullable": true, + "type": "number" + }, + "experimentPeriods": { + "nullable": true, + "type": "number" + }, + "machinePeriods": { + "nullable": true, + "type": "number" + }, + "designPeriods": { + "nullable": true, + "type": "number" + }, + "testPeriods": { + "nullable": true, + "type": "number" + }, + "scheduleState": { + "nullable": true, + "type": "string" + }, + "suggestScheduleWeeks": { + "nullable": true + }, + "suggestScheduleWeekInfo": { + "nullable": true, + "type": "string" + }, + "scheduleJsonParams": { + "nullable": true + }, + "selectedStdCount": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "remark": { + "nullable": true, + "type": "string" + }, + "scheduleRemark": { + "nullable": true, + "type": "string" + }, + "courseId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "semesterId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "campusId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "examModeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "openDepartmentId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "teachLanguageId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "roomTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "course": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "code": { + "type": "string" + }, + "nameCn": { + "type": "string" + }, + "nameEn": { + "nullable": true, + "type": "string" + }, + "categoryId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classTypeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "classifyId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "educationLevelId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "gradationId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "typeId": { + "nullable": true, + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "namePrimary": { + "type": "string" + }, + "nameSecondary": { + "nullable": true, + "type": "string" + } + }, + "required": [ + "id", + "jwId", + "code", + "nameCn", + "nameEn", + "categoryId", + "classTypeId", + "classifyId", + "educationLevelId", + "gradationId", + "typeId", + "namePrimary", + "nameSecondary" + ], + "additionalProperties": false + }, + "semester": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/semesterSchema" + } + ] + } + }, + "required": [ + "id", + "jwId", + "code", + "bizTypeId", + "credits", + "period", + "periodsPerWeek", + "timesPerWeek", + "stdCount", + "limitCount", + "graduateAndPostgraduate", + "dateTimePlaceText", + "dateTimePlacePersonText", + "actualPeriods", + "theoryPeriods", + "practicePeriods", + "experimentPeriods", + "machinePeriods", + "designPeriods", + "testPeriods", + "scheduleState", + "suggestScheduleWeeks", + "suggestScheduleWeekInfo", + "scheduleJsonParams", + "selectedStdCount", + "remark", + "scheduleRemark", + "courseId", + "semesterId", + "campusId", + "examModeId", + "openDepartmentId", + "teachLanguageId", + "roomTypeId", + "course", + "semester" + ], + "additionalProperties": false }, - "createdAt": { - "type": "string", - "format": "date-time", - "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + "scheduleGroup": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "jwId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "no": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "limitCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "stdCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "actualPeriods": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "isDefault": { + "type": "boolean" + }, + "sectionId": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, + "required": [ + "id", + "jwId", + "no", + "limitCount", + "stdCount", + "actualPeriods", + "isDefault", + "sectionId" + ], + "additionalProperties": false } }, "required": [ "id", - "key", - "filename", - "size", - "createdAt" + "periods", + "date", + "weekday", + "startTime", + "endTime", + "experiment", + "customPlace", + "lessonType", + "weekIndex", + "exerciseClass", + "startUnit", + "endUnit", + "roomId", + "sectionId", + "scheduleGroupId", + "room", + "teachers", + "section", + "scheduleGroup" ], "additionalProperties": false } - }, - "usedBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 } }, "required": [ - "maxFileSizeBytes", - "quotaBytes", - "uploads", - "usedBytes" + "schedules" ], "additionalProperties": false + } + }, + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "OAuth access token accepted by protected REST endpoints when it carries a matching feature:read scope for reads or feature:write scope for mutations. These endpoints also accept an in-site Better Auth session cookie." }, - "uploadCreateResponseSchema": { - "type": "object", - "properties": { - "key": { - "type": "string" - }, - "url": { - "type": "string" - }, - "maxFileSizeBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "quotaBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - }, - "usedBytes": { - "type": "integer", - "minimum": -9007199254740991, - "maximum": 9007199254740991 - } - }, - "required": [ - "key", - "url", - "maxFileSizeBytes", - "quotaBytes", - "usedBytes" - ], - "additionalProperties": false + "sessionCookie": { + "type": "apiKey", + "in": "cookie", + "name": "better-auth.session_token", + "description": "Better Auth session cookie used by the web UI. Production cookies may use the __Secure- prefix." }, - "uploadCreateRequestSchema": { - "type": "object", - "properties": { - "filename": { - "type": "string", - "minLength": 1 - }, - "contentType": { - "type": "string" - }, - "size": { - "type": "string" - } - }, - "required": [ - "filename", - "size" - ], - "additionalProperties": false + "mcpBearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT", + "description": "OAuth bearer token for /api/mcp. MCP requires a bearer token with the MCP resource audience and does not accept session cookies." + }, + "internalBearerAuth": { + "type": "http", + "scheme": "bearer", + "description": "Configured internal bearer token for operational endpoints. Localhost requests may also be accepted by the server-side access policy." + }, + "calendarFeedToken": { + "type": "apiKey", + "in": "query", + "name": "token", + "description": "Calendar feed token accepted by the personal iCal endpoint. Token-bearing feed URLs may also embed the token in the userId:token path segment." } } - }, - "tags": [ - { - "name": "Admin", - "description": "Admin and moderation endpoints" - }, - { - "name": "Comments", - "description": "Comment threads, reactions, and moderation" - }, - { - "name": "Homeworks", - "description": "Homework management and completion status" - }, - { - "name": "Uploads", - "description": "Upload presign, finalize, and file management" - }, - { - "name": "Descriptions", - "description": "User-generated description content and history" - }, - { - "name": "Sections", - "description": "Course sections, calendars, and schedules" - }, - { - "name": "Courses", - "description": "Course catalog and search" - }, - { - "name": "Teachers", - "description": "Teacher directory and search" - }, - { - "name": "Schedules", - "description": "Schedules search and filtering" - }, - { - "name": "Semesters", - "description": "Semester listing and current semester" - }, - { - "name": "Calendar", - "description": "Calendar selections and exports" - }, - { - "name": "Bus", - "description": "Shuttle bus schedules and preferences" - }, - { - "name": "Todos", - "description": "Personal todo management" - }, - { - "name": "Me", - "description": "Current user profile, subscriptions, and personal data" - }, - { - "name": "DashboardLinks", - "description": "Dashboard link pinning and click tracking" - }, - { - "name": "Locale", - "description": "Locale switching and locale cookies" - }, - { - "name": "Metadata", - "description": "Metadata dictionaries for filters" - }, - { - "name": "OpenAPI", - "description": "OpenAPI document endpoint" - }, - { - "name": "Api", - "description": "General API endpoints" - } - ] + } } diff --git a/go.mod b/go.mod index 55d9ab0..cf903bd 100644 --- a/go.mod +++ b/go.mod @@ -8,12 +8,14 @@ require ( github.com/charmbracelet/bubbletea v1.3.10 github.com/charmbracelet/lipgloss v1.1.0 github.com/fatih/color v1.19.0 + github.com/go-jose/go-jose/v4 v4.1.4 github.com/itchyny/gojq v0.12.19 github.com/joho/godotenv v1.5.1 github.com/mattn/go-runewidth v0.0.23 github.com/oapi-codegen/runtime v1.4.0 github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.9 + golang.org/x/oauth2 v0.36.0 golang.org/x/term v0.42.0 ) diff --git a/go.sum b/go.sum index 7bf761d..1ab38dc 100644 --- a/go.sum +++ b/go.sum @@ -49,6 +49,8 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/getkin/kin-openapi v0.133.0 h1:pJdmNohVIJ97r4AUFtEXRXwESr8b0bD721u/Tz6k8PQ= github.com/getkin/kin-openapi v0.133.0/go.mod h1:boAciF6cXk5FhPqe/NQeBTeenbjqU4LhWBf09ILVvWE= +github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA= +github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= @@ -210,6 +212,8 @@ golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU= golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/internal/auth/auth.go b/internal/auth/auth.go index 5a56e2c..3fa1a69 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -12,16 +12,49 @@ import ( "io" "net" "net/http" - "net/url" "os/exec" "runtime" "strings" "time" "github.com/Life-USTC/CLI/internal/config" + "golang.org/x/oauth2" ) -const oauthScope = "openid profile email offline_access" +var oauthScope = strings.Join([]string{ + "openid", + "profile", + "email", + "offline_access", + "me:read", + "me:write", + "todo:read", + "todo:write", + "homework:read", + "homework:write", + "subscription:read", + "subscription:write", + "comment:read", + "comment:write", + "description:read", + "description:write", + "upload:read", + "upload:write", + "dashboard:read", + "dashboard:write", + "bus:read", + "bus:write", + "course:read", + "course:write", + "section:read", + "section:write", + "teacher:read", + "teacher:write", + "schedule:read", + "schedule:write", + "exam:read", + "exam:write", +}, " ") func b64url(data []byte) string { return base64.RawURLEncoding.EncodeToString(data) @@ -133,9 +166,9 @@ func Login(server string) (*config.Credential, error) { return nil, err } - authEndpoint, _ := meta["authorization_endpoint"].(string) - tokenEndpoint, _ := meta["token_endpoint"].(string) - regEndpoint, _ := meta["registration_endpoint"].(string) + authEndpoint := stringFromMap(meta, "authorization_endpoint") + tokenEndpoint := stringFromMap(meta, "token_endpoint") + regEndpoint := stringFromMap(meta, "registration_endpoint") if regEndpoint == "" { return nil, fmt.Errorf("server does not advertise a registration_endpoint") } @@ -165,18 +198,23 @@ func Login(server string) (*config.Credential, error) { return nil, err } - // Build auth URL - params := url.Values{ - "client_id": {clientID}, - "redirect_uri": {redirectURI}, - "response_type": {"code"}, - "scope": {oauthScope}, - "state": {state}, - "code_challenge": {challenge}, - "code_challenge_method": {"S256"}, - "resource": {server}, + conf := &oauth2.Config{ + ClientID: clientID, + RedirectURL: redirectURI, + Scopes: strings.Fields(oauthScope), + Endpoint: oauth2.Endpoint{ + AuthURL: authEndpoint, + TokenURL: tokenEndpoint, + }, } - authURL := authEndpoint + "?" + params.Encode() + + ctx := oauth2Context(context.Background(), &http.Client{Timeout: 15 * time.Second}) + + authURL := conf.AuthCodeURL(state, + oauth2.SetAuthURLParam("code_challenge", challenge), + oauth2.SetAuthURLParam("code_challenge_method", "S256"), + oauth2.SetAuthURLParam("resource", server), + ) // Channel for callback result type callbackResult struct { @@ -225,38 +263,41 @@ func Login(server string) (*config.Credential, error) { return nil, fmt.Errorf("state mismatch — possible CSRF attack") } - // Exchange code for tokens - tokenData := url.Values{ - "grant_type": {"authorization_code"}, - "client_id": {clientID}, - "code": {result.code}, - "redirect_uri": {redirectURI}, - "code_verifier": {verifier}, - "resource": {server}, + tok, err := conf.Exchange(ctx, result.code, + oauth2.VerifierOption(verifier), + oauth2.SetAuthURLParam("resource", server), + ) + if err != nil { + return nil, fmt.Errorf("token exchange failed: %w", err) } - httpClient := &http.Client{Timeout: 15 * time.Second} - tokenResp, err := httpClient.PostForm(tokenEndpoint, tokenData) - if err != nil { + vt := newVerifiedToken(tok) + if err := requireIDTokenForOpenID(oauthScope, vt.IDToken); err != nil { return nil, err } - defer func() { _ = tokenResp.Body.Close() }() - - tokenBody, _ := io.ReadAll(tokenResp.Body) - if tokenResp.StatusCode != 200 { - return nil, fmt.Errorf("token exchange failed (%d): %s", tokenResp.StatusCode, string(tokenBody)) + issuer := stringFromMap(meta, "issuer") + if issuer == "" { + issuer = server } - - var tokens map[string]any - if err := json.Unmarshal(tokenBody, &tokens); err != nil { - return nil, fmt.Errorf("failed to decode token response: %w", err) + if err := vt.ValidateIDToken(issuer, clientID); err != nil { + return nil, err } - - return credentialFromTokens(clientID, server, tokens, "", "") + return verifiedTokenToCredential(clientID, server, vt, "", oauthScope, time.Now()) } // RefreshToken attempts to refresh the access token. +// +// Note: oauth2.TokenSource does not expose extra refresh parameters, so the +// original OAuth 2.0 resource indicator is not sent on refresh requests. The +// stored resource (server URL) is preserved in the returned credential, while +// ID token audience validation uses the registered client_id. +// +// The oauth2.Token Expiry is set one hour before the stored ExpiresAt. This +// heuristic causes oauth2.TokenSource to treat the token as expired and +// refresh proactively, rather than risking use of an access token near its +// boundary. func RefreshToken(server string, cred *config.Credential) (*config.Credential, error) { + server = strings.TrimRight(server, "/") if cred.RefreshToken == "" { return nil, fmt.Errorf("no refresh token") } @@ -264,75 +305,39 @@ func RefreshToken(server string, cred *config.Credential) (*config.Credential, e if err != nil { return nil, err } - tokenEndpoint, _ := meta["token_endpoint"].(string) + tokenEndpoint := stringFromMap(meta, "token_endpoint") - data := url.Values{ - "grant_type": {"refresh_token"}, - "client_id": {cred.ClientID}, - "refresh_token": {cred.RefreshToken}, - } - if cred.Resource != "" { - data.Set("resource", cred.Resource) + conf := &oauth2.Config{ + ClientID: cred.ClientID, + Scopes: strings.Fields(cred.Scope), + Endpoint: oauth2.Endpoint{TokenURL: tokenEndpoint}, } - client := &http.Client{Timeout: 15 * time.Second} - resp, err := client.PostForm(tokenEndpoint, data) - if err != nil { - return nil, err + ctx := oauth2Context(context.Background(), &http.Client{Timeout: 15 * time.Second}) + token := &oauth2.Token{ + RefreshToken: cred.RefreshToken, + Expiry: time.Unix(int64(cred.ExpiresAt), 0).Add(-time.Hour), } - defer func() { _ = resp.Body.Close() }() - if resp.StatusCode != 200 { - b, _ := io.ReadAll(resp.Body) - return nil, fmt.Errorf("refresh failed (%d): %s", resp.StatusCode, string(b)) + tok, err := conf.TokenSource(ctx, token).Token() + if err != nil { + return nil, fmt.Errorf("refresh failed: %w", err) } - var tokens map[string]any - if err := json.NewDecoder(resp.Body).Decode(&tokens); err != nil { - return nil, fmt.Errorf("failed to decode refresh response: %w", err) + vt := newVerifiedToken(tok) + if err := requireIDTokenForOpenID(oauthScope, vt.IDToken); err != nil { + return nil, err } - - return credentialFromTokens(cred.ClientID, cred.Resource, tokens, cred.RefreshToken, cred.Scope) -} - -func requiredString(values map[string]any, key string) (string, error) { - if s, ok := values[key].(string); ok && s != "" { - return s, nil + issuer := stringFromMap(meta, "issuer") + if issuer == "" { + issuer = server } - return "", fmt.Errorf("token response missing %q", key) -} - -func strDefault(v any) string { - if s, ok := v.(string); ok { - return s + resource := cred.Resource + if resource == "" { + resource = server } - return "" -} - -func credentialFromTokens(clientID, resource string, tokens map[string]any, fallbackRefresh, fallbackScope string) (*config.Credential, error) { - accessToken, err := requiredString(tokens, "access_token") - if err != nil { + if err := vt.ValidateIDToken(issuer, cred.ClientID); err != nil { return nil, err } - expiresIn := 3600.0 - if ei, ok := tokens["expires_in"].(float64); ok { - expiresIn = ei - } - refreshToken := strDefault(tokens["refresh_token"]) - if refreshToken == "" { - refreshToken = fallbackRefresh - } - scope := strDefault(tokens["scope"]) - if scope == "" { - scope = fallbackScope - } - return &config.Credential{ - ClientID: clientID, - AccessToken: accessToken, - RefreshToken: refreshToken, - TokenType: strDefault(tokens["token_type"]), - ExpiresAt: float64(time.Now().Unix()) + expiresIn, - Scope: scope, - Resource: resource, - }, nil + return verifiedTokenToCredential(cred.ClientID, resource, vt, cred.RefreshToken, cred.Scope, time.Now()) } diff --git a/internal/auth/auth_test.go b/internal/auth/auth_test.go index 813d46a..30f16c5 100644 --- a/internal/auth/auth_test.go +++ b/internal/auth/auth_test.go @@ -1,12 +1,21 @@ package auth -import "testing" +import ( + "crypto/rand" + "crypto/rsa" + "testing" + "time" -func TestCredentialFromTokensUsesFallbacks(t *testing.T) { - cred, err := credentialFromTokens("client", "https://example.test", map[string]any{ - "access_token": "access", - "expires_in": float64(120), - }, "refresh", "openid") + "github.com/go-jose/go-jose/v4" + "github.com/go-jose/go-jose/v4/jwt" +) + +func TestVerifiedTokenToCredentialUsesFallbacks(t *testing.T) { + vt := &VerifiedToken{ + AccessToken: "access", + ExpiresIn: 120, + } + cred, err := verifiedTokenToCredential("client", "https://example.test", vt, "refresh", "openid", time.Now()) if err != nil { t.Fatal(err) } @@ -16,10 +25,71 @@ func TestCredentialFromTokensUsesFallbacks(t *testing.T) { if cred.ExpiresAt == 0 { t.Fatal("ExpiresAt was not populated") } + if cred.Resource != "https://example.test" { + t.Fatalf("resource = %q, want %q", cred.Resource, "https://example.test") + } } -func TestCredentialFromTokensRequiresAccessToken(t *testing.T) { - if _, err := credentialFromTokens("client", "resource", map[string]any{}, "", ""); err == nil { +func TestVerifiedTokenToCredentialRequiresAccessToken(t *testing.T) { + vt := &VerifiedToken{} + if _, err := verifiedTokenToCredential("client", "resource", vt, "", "", time.Now()); err == nil { t.Fatal("expected missing access token error") } } + +func TestVerifiedTokenToCredentialNilGuard(t *testing.T) { + if _, err := verifiedTokenToCredential("client", "resource", nil, "", "", time.Now()); err == nil { + t.Fatal("expected error for nil token") + } +} + +func TestRequireIDTokenForOpenID(t *testing.T) { + if err := requireIDTokenForOpenID("openid profile", ""); err == nil { + t.Fatal("expected error when openid scope requested without id_token") + } + if err := requireIDTokenForOpenID("profile email", ""); err != nil { + t.Fatalf("unexpected error when openid not requested: %v", err) + } + if err := requireIDTokenForOpenID("openid", "idtoken"); err != nil { + t.Fatalf("unexpected error when id_token present: %v", err) + } +} + +func TestValidateIDTokenAudienceIsClientID(t *testing.T) { + key, err := rsa.GenerateKey(rand.Reader, 2048) + if err != nil { + t.Fatal(err) + } + signer, err := jose.NewSigner(jose.SigningKey{Algorithm: jose.RS256, Key: key}, nil) + if err != nil { + t.Fatal(err) + } + build := func(aud any) string { + t.Helper() + claims := map[string]any{ + "iss": "https://issuer.test", + "aud": aud, + "exp": time.Now().Add(time.Hour).Unix(), + } + s, err := jwt.Signed(signer).Claims(claims).Serialize() + if err != nil { + t.Fatal(err) + } + return s + } + + vt := &VerifiedToken{IDToken: build("client-id-123")} + if err := vt.ValidateIDToken("https://issuer.test", "client-id-123"); err != nil { + t.Fatalf("expected client_id audience to validate: %v", err) + } + + vt.IDToken = build("https://server.test") + if err := vt.ValidateIDToken("https://issuer.test", "client-id-123"); err == nil { + t.Fatal("expected server URL audience to fail against client_id expectation") + } + + vt.IDToken = build([]string{"client-id-123", "other"}) + if err := vt.ValidateIDToken("https://issuer.test", "client-id-123"); err != nil { + t.Fatalf("expected audience list containing client_id to validate: %v", err) + } +} diff --git a/internal/auth/device.go b/internal/auth/device.go index 5f03f27..aaf90bf 100644 --- a/internal/auth/device.go +++ b/internal/auth/device.go @@ -1,27 +1,16 @@ package auth import ( - "encoding/json" + "context" "fmt" - "io" "net/http" - "net/url" "strings" "time" "github.com/Life-USTC/CLI/internal/config" + "golang.org/x/oauth2" ) -// deviceAuthResponse matches the RFC 8628 device authorization response. -type deviceAuthResponse struct { - DeviceCode string `json:"device_code"` - UserCode string `json:"user_code"` - VerificationURI string `json:"verification_uri"` - VerificationURIComplete string `json:"verification_uri_complete"` - ExpiresIn int `json:"expires_in"` - Interval int `json:"interval"` -} - // LoginDeviceCode runs the RFC 8628 Device Authorization Grant flow. // It prints a user code for the user to enter in a browser, then polls // the token endpoint until approved, denied, or expired. @@ -34,9 +23,9 @@ func LoginDeviceCode(server string) (*config.Credential, error) { return nil, err } - deviceEndpoint, _ := meta["device_authorization_endpoint"].(string) - tokenEndpoint, _ := meta["token_endpoint"].(string) - regEndpoint, _ := meta["registration_endpoint"].(string) + deviceEndpoint := stringFromMap(meta, "device_authorization_endpoint") + tokenEndpoint := stringFromMap(meta, "token_endpoint") + regEndpoint := stringFromMap(meta, "registration_endpoint") if deviceEndpoint == "" { return nil, fmt.Errorf("server does not support device authorization (no device_authorization_endpoint in metadata)") @@ -57,101 +46,56 @@ func LoginDeviceCode(server string) (*config.Credential, error) { } clientID, _ := clientInfo["client_id"].(string) - // Request device code - httpClient := &http.Client{Timeout: 15 * time.Second} - deviceResp, err := httpClient.PostForm(deviceEndpoint, url.Values{ - "client_id": {clientID}, - "scope": {oauthScope}, - }) - if err != nil { - return nil, fmt.Errorf("device authorization request failed: %w", err) - } - defer func() { _ = deviceResp.Body.Close() }() - - if deviceResp.StatusCode != 200 { - b, _ := io.ReadAll(deviceResp.Body) - return nil, fmt.Errorf("device authorization failed (%d): %s", deviceResp.StatusCode, string(b)) + conf := &oauth2.Config{ + ClientID: clientID, + Scopes: strings.Fields(oauthScope), + Endpoint: oauth2.Endpoint{ + DeviceAuthURL: deviceEndpoint, + TokenURL: tokenEndpoint, + }, } - var devAuth deviceAuthResponse - if err := json.NewDecoder(deviceResp.Body).Decode(&devAuth); err != nil { - return nil, fmt.Errorf("failed to decode device authorization response: %w", err) + ctx := oauth2Context(context.Background(), &http.Client{Timeout: 15 * time.Second}) + res, err := conf.DeviceAuth(ctx, oauth2.SetAuthURLParam("resource", server)) + if err != nil { + return nil, fmt.Errorf("device authorization request failed: %w", err) } // Display instructions to user fmt.Println() fmt.Println("To sign in, visit:") - if devAuth.VerificationURIComplete != "" { - fmt.Printf(" %s\n", devAuth.VerificationURIComplete) + if res.VerificationURIComplete != "" { + fmt.Printf(" %s\n", res.VerificationURIComplete) } else { - fmt.Printf(" %s\n", devAuth.VerificationURI) + fmt.Printf(" %s\n", res.VerificationURI) } fmt.Println() - fmt.Printf("And enter the code: %s\n\n", devAuth.UserCode) + fmt.Printf("And enter the code: %s\n\n", res.UserCode) // Try to open browser - if devAuth.VerificationURIComplete != "" { - _ = openBrowser(devAuth.VerificationURIComplete) + if res.VerificationURIComplete != "" { + _ = openBrowser(res.VerificationURIComplete) } else { - _ = openBrowser(devAuth.VerificationURI) + _ = openBrowser(res.VerificationURI) } fmt.Println("Waiting for authorization...") - // Poll token endpoint - interval := time.Duration(devAuth.Interval) * time.Second - if interval < 5*time.Second { - interval = 5 * time.Second + tok, err := conf.DeviceAccessToken(ctx, res, oauth2.SetAuthURLParam("resource", server)) + if err != nil { + return nil, fmt.Errorf("device authorization failed: %w", err) } - deadline := time.Now().Add(time.Duration(devAuth.ExpiresIn) * time.Second) - - for time.Now().Before(deadline) { - time.Sleep(interval) - - tokenData := url.Values{ - "grant_type": {"urn:ietf:params:oauth:grant-type:device_code"}, - "client_id": {clientID}, - "device_code": {devAuth.DeviceCode}, - } - tokenResp, err := httpClient.PostForm(tokenEndpoint, tokenData) - if err != nil { - return nil, fmt.Errorf("token poll failed: %w", err) - } - - tokenBody, _ := io.ReadAll(tokenResp.Body) - _ = tokenResp.Body.Close() - - if tokenResp.StatusCode == 200 { - var tokens map[string]any - if err := json.Unmarshal(tokenBody, &tokens); err != nil { - return nil, fmt.Errorf("failed to decode token response: %w", err) - } - - return credentialFromTokens(clientID, server, tokens, "", "") - } - - // Parse error response - var errResp struct { - Error string `json:"error"` - } - _ = json.Unmarshal(tokenBody, &errResp) - - switch errResp.Error { - case "authorization_pending": - // keep polling - continue - case "slow_down": - interval += 5 * time.Second - continue - case "expired_token": - return nil, fmt.Errorf("device code expired — please try again") - case "access_denied": - return nil, fmt.Errorf("authorization denied by user") - default: - return nil, fmt.Errorf("token request failed: %s (HTTP %d)", string(tokenBody), tokenResp.StatusCode) - } + vt := newVerifiedToken(tok) + if err := requireIDTokenForOpenID(oauthScope, vt.IDToken); err != nil { + return nil, err } - - return nil, fmt.Errorf("device code expired — please try again") + issuer := stringFromMap(meta, "issuer") + if issuer == "" { + issuer = server + } + if err := vt.ValidateIDToken(issuer, clientID); err != nil { + return nil, err + } + return verifiedTokenToCredential(clientID, server, vt, "", oauthScope, time.Now()) } diff --git a/internal/auth/oauth.go b/internal/auth/oauth.go new file mode 100644 index 0000000..78e28fb --- /dev/null +++ b/internal/auth/oauth.go @@ -0,0 +1,215 @@ +package auth + +import ( + "context" + "errors" + "fmt" + "net/http" + "strconv" + "strings" + "time" + + "github.com/Life-USTC/CLI/internal/config" + "github.com/go-jose/go-jose/v4" + "github.com/go-jose/go-jose/v4/jwt" + "golang.org/x/oauth2" +) + +// VerifiedToken wraps an oauth2.Token and preserves the optional ID token. +type VerifiedToken struct { + AccessToken string + RefreshToken string + TokenType string + Expiry time.Time + ExpiresIn int + Scope string + IDToken string +} + +func newVerifiedToken(tok *oauth2.Token) *VerifiedToken { + if tok == nil { + return nil + } + return &VerifiedToken{ + AccessToken: tok.AccessToken, + RefreshToken: tok.RefreshToken, + TokenType: tok.TokenType, + Expiry: tok.Expiry, + ExpiresIn: tokenExpiresIn(tok, 0), + Scope: tokenExtraString(tok, "scope"), + IDToken: tokenExtraString(tok, "id_token"), + } +} + +func tokenExtraString(tok *oauth2.Token, key string) string { + if tok == nil { + return "" + } + if s, ok := tok.Extra(key).(string); ok { + return strings.TrimSpace(s) + } + return "" +} + +// ValidateIDToken checks the ID token's issuer and audience claims. +// It does not verify the JWT signature; callers should fetch the issuer's +// JWKS and verify the signature when required. +// Empty issuer or audience is treated as an error so checks are never +// silently skipped. +func (t *VerifiedToken) ValidateIDToken(issuer, audience string) error { + if t == nil || t.IDToken == "" { + return nil + } + if issuer == "" { + return errors.New("id_token issuer required") + } + if audience == "" { + return errors.New("id_token audience required") + } + parsed, err := jwt.ParseSigned(t.IDToken, []jose.SignatureAlgorithm{jose.RS256, jose.ES256}) + if err != nil { + return fmt.Errorf("invalid id_token: %w", err) + } + claims := map[string]any{} + if err := parsed.UnsafeClaimsWithoutVerification(&claims); err != nil { + return fmt.Errorf("invalid id_token claims: %w", err) + } + if iss, _ := claims["iss"].(string); strings.TrimSpace(iss) != issuer { + return fmt.Errorf("invalid issuer %q, expected %q", iss, issuer) + } + if !audienceMatches(claims["aud"], audience) { + return fmt.Errorf("invalid audience, expected %q", audience) + } + if exp, ok := expiresAtFromClaim(claims["exp"]); ok && !exp.After(time.Now()) { + return errors.New("id_token expired") + } + return nil +} + +func audienceMatches(audClaim any, expected string) bool { + if s, ok := audClaim.(string); ok { + return strings.TrimSpace(s) == expected + } + if list, ok := audClaim.([]any); ok { + for _, item := range list { + if s, ok := item.(string); ok && strings.TrimSpace(s) == expected { + return true + } + } + } + return false +} + +func expiresAtFromClaim(expClaim any) (time.Time, bool) { + switch v := expClaim.(type) { + case float64: + return time.Unix(int64(v), 0), true + case int: + return time.Unix(int64(v), 0), true + case int64: + return time.Unix(v, 0), true + case string: + if n, err := parseIntString(v); err == nil { + return time.Unix(n, 0), true + } + } + return time.Time{}, false +} + +func parseIntString(s string) (int64, error) { + s = strings.TrimSpace(s) + if s == "" { + return 0, errors.New("empty") + } + return strconv.ParseInt(s, 10, 64) +} + +// scopeIncludes reports whether a space-delimited OAuth scope contains value. +func scopeIncludes(scope, value string) bool { + for _, s := range strings.Fields(scope) { + if s == value { + return true + } + } + return false +} + +// requireIDTokenForOpenID returns an error when the openid scope was requested +// but the token response does not contain an ID token. +func requireIDTokenForOpenID(scope, idToken string) error { + if scopeIncludes(scope, "openid") && strings.TrimSpace(idToken) == "" { + return errors.New("openid scope requested but token response missing id_token") + } + return nil +} + +func verifiedTokenToCredential(clientID, resource string, vt *VerifiedToken, fallbackRefresh, fallbackScope string, now time.Time) (*config.Credential, error) { + if vt == nil { + return nil, errors.New("token response is nil") + } + accessToken := strings.TrimSpace(vt.AccessToken) + if accessToken == "" { + return nil, errors.New("token response missing access_token") + } + expiresIn := vt.ExpiresIn + if expiresIn <= 0 { + expiresIn = 3600 + } + refreshToken := strings.TrimSpace(vt.RefreshToken) + if refreshToken == "" { + refreshToken = fallbackRefresh + } + scope := strings.TrimSpace(vt.Scope) + if scope == "" { + scope = fallbackScope + } + return &config.Credential{ + ClientID: clientID, + AccessToken: accessToken, + RefreshToken: refreshToken, + TokenType: strings.TrimSpace(vt.TokenType), + ExpiresAt: float64(now.Add(time.Duration(expiresIn) * time.Second).Unix()), + Scope: scope, + Resource: resource, + }, nil +} + +func oauth2Context(ctx context.Context, client *http.Client) context.Context { + return context.WithValue(ctx, oauth2.HTTPClient, client) +} + +func stringFromMap(m map[string]any, key string) string { + if s, ok := m[key].(string); ok { + return strings.TrimSpace(s) + } + return "" +} + +func tokenExpiresIn(tok *oauth2.Token, fallback int) int { + if tok == nil { + return fallback + } + if extra := tok.Extra("expires_in"); extra != nil { + switch v := extra.(type) { + case int: + return v + case int64: + return int(v) + case float64: + if v > 0 { + return int(v) + } + case string: + if n, err := parseIntString(v); err == nil && n > 0 { + return int(n) + } + } + } + if !tok.Expiry.IsZero() { + secs := int(time.Until(tok.Expiry).Seconds()) + if secs > 0 { + return secs + } + } + return fallback +} diff --git a/internal/cmd/admin/admin.go b/internal/cmd/admin/admin.go index 0a3273d..f7dfaa5 100644 --- a/internal/cmd/admin/admin.go +++ b/internal/cmd/admin/admin.go @@ -99,11 +99,15 @@ func newCmdUserUpdate() *cobra.Command { reqBody := openapi.UpdateAdminUserJSONRequestBody{} hasUpdate := false if name != "" { - reqBody.Name = &name + nameUnion := openapi.AdminUpdateUserRequestSchema_Name{} + _ = nameUnion.FromAdminUpdateUserRequestSchemaName1(openapi.AdminUpdateUserRequestSchemaName1(name)) + reqBody.Name = &nameUnion hasUpdate = true } if username != "" { - reqBody.Username = &username + usernameUnion := openapi.AdminUpdateUserRequestSchema_Username{} + _ = usernameUnion.FromAdminUpdateUserRequestSchemaUsername1(openapi.AdminUpdateUserRequestSchemaUsername1(username)) + reqBody.Username = &usernameUnion hasUpdate = true } if admin { @@ -193,7 +197,9 @@ func newCmdSuspensionCreate() *cobra.Command { reqBody.Note = ¬e } if expiresAt != "" { - reqBody.ExpiresAt = &expiresAt + expiresAtUnion := openapi.AdminCreateSuspensionRequestSchema_ExpiresAt{} + _ = expiresAtUnion.FromAdminCreateSuspensionRequestSchemaExpiresAt1(openapi.AdminCreateSuspensionRequestSchemaExpiresAt1(expiresAt)) + reqBody.ExpiresAt = &expiresAtUnion } _, err = api.ParseResponseRaw(c.CreateAdminSuspension(api.Ctx(), reqBody)) if err != nil { diff --git a/internal/cmd/apicmd/api_paths_gen.go b/internal/cmd/apicmd/api_paths_gen.go index e02c163..58db7cf 100644 --- a/internal/cmd/apicmd/api_paths_gen.go +++ b/internal/cmd/apicmd/api_paths_gen.go @@ -13,6 +13,7 @@ var generatedAPIPaths = []string{ "/api/admin/comments", "/api/admin/comments/{id}", "/api/admin/descriptions", + "/api/admin/descriptions/{id}", "/api/admin/homeworks", "/api/admin/homeworks/{id}", "/api/admin/suspensions", @@ -22,20 +23,28 @@ var generatedAPIPaths = []string{ "/api/auth/.well-known/openid-configuration", "/api/auth/oauth2/device-authorization", "/api/auth/oauth2/token", - "/api/auth/{auth}", "/api/bus", + "/api/bus/next", "/api/bus/preferences", + "/api/bus/routes", "/api/calendar-subscriptions", + "/api/calendar-subscriptions/batch", "/api/calendar-subscriptions/current", + "/api/calendar-subscriptions/import-codes", + "/api/calendar-subscriptions/query", "/api/comments", + "/api/comments/batch", "/api/comments/{id}", "/api/comments/{id}/reactions", "/api/courses", "/api/courses/{jwId}", "/api/dashboard-links/pin", + "/api/dashboard-links/pin/batch", "/api/dashboard-links/visit", "/api/descriptions", + "/api/health", "/api/homeworks", + "/api/homeworks/completions", "/api/homeworks/{id}", "/api/homeworks/{id}/completion", "/api/locale", @@ -43,9 +52,13 @@ var generatedAPIPaths = []string{ "/api/mcp/.well-known/oauth-authorization-server", "/api/mcp/.well-known/openid-configuration", "/api/me", + "/api/me/overview", "/api/me/subscriptions/homeworks", + "/api/me/subscriptions/schedules", "/api/metadata", + "/api/metrics", "/api/openapi", + "/api/readiness", "/api/schedules", "/api/sections", "/api/sections/calendar.ics", @@ -59,10 +72,13 @@ var generatedAPIPaths = []string{ "/api/teachers", "/api/teachers/{id}", "/api/todos", + "/api/todos/batch", "/api/todos/{id}", "/api/uploads", "/api/uploads/complete", + "/api/uploads/object", "/api/uploads/{id}", "/api/uploads/{id}/download", + "/api/users/profile", "/api/users/{userId}/calendar.ics", } diff --git a/internal/cmd/calendar/calendar.go b/internal/cmd/calendar/calendar.go index 921e359..671c76d 100644 --- a/internal/cmd/calendar/calendar.go +++ b/internal/cmd/calendar/calendar.go @@ -3,6 +3,7 @@ package calendar import ( "fmt" "strconv" + "strings" "github.com/spf13/cobra" @@ -22,7 +23,11 @@ func NewCmdCalendar() *cobra.Command { }, } cmd.AddCommand(newCmdGet()) + cmd.AddCommand(newCmdQuery()) + cmd.AddCommand(newCmdAdd()) + cmd.AddCommand(newCmdRemove()) cmd.AddCommand(newCmdSet()) + cmd.AddCommand(newCmdImportCodes()) return cmd } @@ -79,32 +84,187 @@ func newCmdGet() *cobra.Command { } func newCmdSet() *cobra.Command { - return &cobra.Command{ - Use: "set ...", - Short: "Set calendar section subscriptions", + var semesterID string + cmd := &cobra.Command{ + Use: "set ...", + Short: "Replace calendar section subscriptions", + Args: cobra.MinimumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + return runCalendarBatch(cmd, args, openapi.CalendarSubscriptionBatchRequestSchemaActionSet, semesterID) + }, + } + cmd.Flags().StringVar(&semesterID, "semester-id", "", "Semester ID to narrow code matches") + return cmd +} + +func newCmdAdd() *cobra.Command { + var semesterID string + cmd := &cobra.Command{ + Use: "add ...", + Short: "Add calendar section subscriptions", + Args: cobra.MinimumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + return runCalendarBatch(cmd, args, openapi.CalendarSubscriptionBatchRequestSchemaActionAdd, semesterID) + }, + } + cmd.Flags().StringVar(&semesterID, "semester-id", "", "Semester ID to narrow code matches") + return cmd +} + +func newCmdRemove() *cobra.Command { + var semesterID string + cmd := &cobra.Command{ + Use: "remove ...", + Short: "Remove calendar section subscriptions", + Args: cobra.MinimumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + return runCalendarBatch(cmd, args, openapi.CalendarSubscriptionBatchRequestSchemaActionRemove, semesterID) + }, + } + cmd.Flags().StringVar(&semesterID, "semester-id", "", "Semester ID to narrow code matches") + return cmd +} + +func newCmdQuery() *cobra.Command { + var semesterID string + cmd := &cobra.Command{ + Use: "query ...", + Short: "Search sections for calendar subscription changes", Args: cobra.MinimumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { c, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) if err != nil { return err } - sectionIds := make([]int, len(args)) - for i, arg := range args { - id, err := strconv.Atoi(arg) - if err != nil { - return fmt.Errorf("invalid section ID %q: %w", arg, err) - } - sectionIds[i] = id + sectionIds, codes, err := splitCalendarRefs(args) + if err != nil { + return err + } + body := openapi.QueryCalendarSubscriptionSectionsJSONRequestBody{} + if len(sectionIds) > 0 { + body.SectionIds = §ionIds + } + if len(codes) > 0 { + body.Codes = &codes } - body := openapi.SetCalendarSubscriptionJSONRequestBody{ - SectionIds: §ionIds, + if semesterID != "" { + semester := openapi.CalendarSubscriptionQueryRequestSchema_SemesterId{} + _ = semester.FromCalendarSubscriptionQueryRequestSchemaSemesterId0(semesterID) + body.SemesterId = &semester } - _, err = api.ParseResponseRaw(c.SetCalendarSubscription(api.Ctx(), body)) + data, err := api.ParseResponseRaw(c.QueryCalendarSubscriptionSections(api.Ctx(), body)) if err != nil { return err } - output.Success("Calendar subscriptions updated.") - return nil + return outputCalendarMatchResult(data, "Matched") }, } + cmd.Flags().StringVar(&semesterID, "semester-id", "", "Semester ID to narrow code matches") + return cmd +} + +func newCmdImportCodes() *cobra.Command { + var semesterID string + cmd := &cobra.Command{ + Use: "import-codes ...", + Short: "Import section or course codes into calendar subscriptions", + Long: "Resolve section or course codes to Life@USTC sections and add them to your calendar subscriptions.", + Args: cobra.MinimumNArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + return runCalendarBatch(cmd, args, openapi.CalendarSubscriptionBatchRequestSchemaActionAdd, semesterID) + }, + } + cmd.Flags().StringVar(&semesterID, "semester-id", "", "Semester ID to narrow the match") + return cmd +} + +func runCalendarBatch(cmd *cobra.Command, args []string, action openapi.CalendarSubscriptionBatchRequestSchemaAction, semesterID string) error { + c, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) + if err != nil { + return err + } + sectionIds, codes, err := splitCalendarRefs(args) + if err != nil { + return err + } + body := openapi.BatchUpdateCalendarSubscriptionJSONRequestBody{ + Action: action, + } + if len(sectionIds) > 0 { + body.SectionIds = §ionIds + } + if len(codes) > 0 { + body.Codes = &codes + } + if semesterID != "" { + semester := openapi.CalendarSubscriptionBatchRequestSchema_SemesterId{} + _ = semester.FromCalendarSubscriptionBatchRequestSchemaSemesterId0(semesterID) + body.SemesterId = &semester + } + data, err := api.ParseResponseRaw(c.BatchUpdateCalendarSubscription(api.Ctx(), body)) + if err != nil { + return err + } + return outputCalendarBatchResult(data) +} + +func splitCalendarRefs(args []string) ([]int, []string, error) { + sectionIds := make([]int, 0, len(args)) + codes := make([]string, 0, len(args)) + for _, arg := range args { + value := strings.TrimSpace(arg) + if value == "" { + continue + } + id, err := strconv.Atoi(value) + if err == nil { + if id <= 0 { + return nil, nil, fmt.Errorf("invalid section ID %q", arg) + } + sectionIds = append(sectionIds, id) + continue + } + codes = append(codes, value) + } + return sectionIds, codes, nil +} + +func outputCalendarBatchResult(data any) error { + if output.IsJSON() { + return output.JSON(data) + } + m := cmdutil.AsMap(data) + output.KVWithTitle([]output.KVPair{ + {Key: "Action", Value: m["action"]}, + {Key: "Added", Value: m["addedCount"]}, + {Key: "Removed", Value: m["removedCount"]}, + {Key: "Unchanged", Value: m["unchangedCount"]}, + }, "Calendar subscriptions updated") + fmt.Println() + return outputCalendarMatchResult(data, "Resolved") +} + +func outputCalendarMatchResult(data any, verb string) error { + if output.IsJSON() { + return output.JSON(data) + } + m := cmdutil.AsMap(data) + matchedCodes, _ := m["matchedCodes"].([]any) + matchedSectionIds, _ := m["matchedSectionIds"].([]any) + unmatchedCodes, _ := m["unmatchedCodes"].([]any) + unmatchedSectionIds, _ := m["unmatchedSectionIds"].([]any) + output.Success(fmt.Sprintf("%s %d code(s) and %d section ID(s)", verb, len(matchedCodes), len(matchedSectionIds))) + if len(unmatchedCodes) > 0 || len(unmatchedSectionIds) > 0 { + output.Dim(fmt.Sprintf(" Unmatched: %d code(s), %d section ID(s)", len(unmatchedCodes), len(unmatchedSectionIds))) + } + sectionRows := cmdutil.RowsFromAny(m["sections"]) + if len(sectionRows) > 0 { + output.Table(sectionRows, []output.Column{ + {Header: "ID", Key: "id"}, + {Header: "Code", Key: "code"}, + {Header: "Course", Key: "course.namePrimary"}, + {Header: "Semester", Key: "semester.nameCn"}, + }) + } + return nil } diff --git a/internal/cmd/comment/comment.go b/internal/cmd/comment/comment.go index dda65ea..6ec6edd 100644 --- a/internal/cmd/comment/comment.go +++ b/internal/cmd/comment/comment.go @@ -114,25 +114,6 @@ func runCommentCreate(cmd *cobra.Command, target commentTarget, body, visibility if err != nil { return err } - params := &openapi.CreateCommentParams{ - TargetType: openapi.CreateCommentParamsTargetType(target.targetType), - } - if target.targetID != "" { - params.TargetId = &target.targetID - } - if target.sectionID != "" { - params.SectionId, err = cmdutil.Int64PtrIfSet(target.sectionID) - if err != nil { - return err - } - } - if target.teacherID != "" { - params.TeacherId, err = cmdutil.Int64PtrIfSet(target.teacherID) - if err != nil { - return err - } - } - vis := openapi.CommentCreateRequestSchemaVisibility(visibility) reqBody := openapi.CreateCommentJSONRequestBody{ TargetType: openapi.CommentCreateRequestSchemaTargetType(target.targetType), @@ -141,19 +122,25 @@ func runCommentCreate(cmd *cobra.Command, target commentTarget, body, visibility IsAnonymous: &anonymous, } if target.targetID != "" { - reqBody.TargetId = &target.targetID + targetId := openapi.CommentCreateRequestSchema_TargetId{} + _ = targetId.FromCommentCreateRequestSchemaTargetId0(target.targetID) + reqBody.TargetId = &targetId } if target.sectionID != "" { - reqBody.SectionId = &target.sectionID + sectionId := openapi.CommentCreateRequestSchema_SectionId{} + _ = sectionId.FromCommentCreateRequestSchemaSectionId0(target.sectionID) + reqBody.SectionId = §ionId } if target.teacherID != "" { - reqBody.TeacherId = &target.teacherID + teacherId := openapi.CommentCreateRequestSchema_TeacherId{} + _ = teacherId.FromCommentCreateRequestSchemaTeacherId0(target.teacherID) + reqBody.TeacherId = &teacherId } if parentID != "" { reqBody.ParentId = &parentID } - data, err := api.ParseResponseRaw(c.CreateComment(api.Ctx(), params, reqBody)) + data, err := api.ParseResponseRaw(c.CreateComment(api.Ctx(), reqBody)) if err != nil { return err } @@ -421,18 +408,20 @@ func newCmdUpdate() *cobra.Command { func newCmdDelete() *cobra.Command { var yes bool cmd := &cobra.Command{ - Use: "delete [comment-id]", + Use: "delete [comment-id]...", Aliases: []string{"rm"}, - Short: "Delete a comment", - Long: "Delete a comment. When run interactively without an ID, shows your recent comments and lets you pick one.", - Args: cobra.MaximumNArgs(1), + Short: "Delete comment(s)", + Long: "Delete one or more comments. When run interactively without IDs, shows your recent comments and lets you pick one.", + Args: cobra.ArbitraryArgs, RunE: func(cmd *cobra.Command, args []string) error { - id := "" - var row map[string]any - if len(args) == 1 { - id = strings.TrimSpace(args[0]) - } - if id == "" { + var ids []string + var rows []map[string]any + if len(args) > 0 { + ids = make([]string, len(args)) + for i, arg := range args { + ids[i] = strings.TrimSpace(arg) + } + } else { if !cmdutil.IsInteractive() { return fmt.Errorf("comment id is required in non-interactive mode") } @@ -443,29 +432,93 @@ func newCmdDelete() *cobra.Command { if picked == nil { return nil } - id, _ = picked["id"].(string) - row = picked + id, _ := picked["id"].(string) + ids = []string{id} + rows = []map[string]any{picked} } - label := commentLabelFromRow(row) + + label := commentBatchLabel(rows, len(ids)) if !cmdutil.Confirm(fmt.Sprintf("Delete %s?", label), yes) { return nil } - c, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) - if err != nil { - return err - } - _, err = api.ParseResponseRaw(c.DeleteCommentWithBody(api.Ctx(), id, "application/json", strings.NewReader("{}"))) - if err != nil { - return err - } - output.Success(fmt.Sprintf("Deleted: %s", label)) - return nil + return deleteComments(cmd, ids, rows) }, } cmd.Flags().BoolVarP(&yes, "yes", "y", false, "Skip confirmation") return cmd } +func commentBatchLabel(rows []map[string]any, idCount int) string { + if len(rows) == 1 { + return commentLabelFromRow(rows[0]) + } + if len(rows) > 1 { + return fmt.Sprintf("%d comments", len(rows)) + } + if idCount == 1 { + return "this comment" + } + return fmt.Sprintf("%d comments", idCount) +} + +func deleteComments(cmd *cobra.Command, ids []string, rows []map[string]any) error { + c, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) + if err != nil { + return err + } + body := openapi.DeleteApiCommentsBatchJSONRequestBody{Ids: ids} + data, err := api.ParseResponseRaw(c.DeleteApiCommentsBatch(api.Ctx(), body)) + if err != nil { + return err + } + return reportCommentBatchResults(data, rows) +} + +func reportCommentBatchResults(data any, rows []map[string]any) error { + labels := make(map[string]string, len(rows)) + for _, row := range rows { + id, _ := row["id"].(string) + if id != "" { + labels[id] = commentLabelFromRow(row) + } + } + + m, ok := data.(map[string]any) + if !ok { + return fmt.Errorf("unexpected batch response format") + } + results, _ := m["results"].([]any) + + var failures []string + for _, r := range results { + result, ok := r.(map[string]any) + if !ok { + continue + } + id, _ := result["id"].(string) + success, _ := result["success"].(bool) + if success { + label := labels[id] + if label == "" { + label = "comment " + id + } + output.Success(fmt.Sprintf("Deleted: %s", label)) + continue + } + if errMap, ok := result["error"].(map[string]any); ok { + msg, _ := errMap["message"].(string) + failures = append(failures, fmt.Sprintf("%s: %s", id, msg)) + } else { + failures = append(failures, id) + } + } + + if len(failures) > 0 { + return fmt.Errorf("failed to delete %d comment(s):\n%s", len(failures), strings.Join(failures, "\n")) + } + return nil +} + func newCmdReact() *cobra.Command { var reactionType string var remove bool @@ -482,10 +535,7 @@ func newCmdReact() *cobra.Command { params := &openapi.RemoveCommentReactionParams{ Type: openapi.RemoveCommentReactionParamsType(reactionType), } - body := openapi.RemoveCommentReactionJSONRequestBody{ - Type: openapi.CommentReactionRequestSchemaType(reactionType), - } - _, err = api.ParseResponseRaw(c.RemoveCommentReaction(api.Ctx(), args[0], params, body)) + _, err = api.ParseResponseRaw(c.RemoveCommentReaction(api.Ctx(), args[0], params)) if err != nil { return err } diff --git a/internal/cmd/comment/comment_test.go b/internal/cmd/comment/comment_test.go new file mode 100644 index 0000000..594dfc9 --- /dev/null +++ b/internal/cmd/comment/comment_test.go @@ -0,0 +1,53 @@ +package comment + +import ( + "strings" + "testing" +) + +func TestReportCommentBatchResults_AllSuccess(t *testing.T) { + data := map[string]any{ + "results": []any{ + map[string]any{"id": "c1", "success": true}, + map[string]any{"id": "c2", "success": true}, + }, + } + rows := []map[string]any{ + {"id": "c1", "body": "First comment"}, + {"id": "c2", "body": "Second comment"}, + } + if err := reportCommentBatchResults(data, rows); err != nil { + t.Fatalf("unexpected error: %v", err) + } +} + +func TestReportCommentBatchResults_PartialFailure(t *testing.T) { + data := map[string]any{ + "results": []any{ + map[string]any{"id": "c1", "success": true}, + map[string]any{"id": "c2", "success": false, "error": map[string]any{"message": "not found"}}, + }, + } + err := reportCommentBatchResults(data, []map[string]any{{"id": "c1", "body": "First"}}) + if err == nil { + t.Fatal("expected error for partial failure, got nil") + } + if !strings.Contains(err.Error(), "c2: not found") { + t.Errorf("expected error to contain failed item, got %v", err) + } +} + +func TestCommentBatchLabel(t *testing.T) { + if got := commentBatchLabel([]map[string]any{{"id": "c1", "body": "Hello"}}, 1); got != "Hello" { + t.Errorf("single row label = %q, want %q", got, "Hello") + } + if got := commentBatchLabel([]map[string]any{{"id": "c1"}, {"id": "c2"}}, 2); got != "2 comments" { + t.Errorf("multi row label = %q, want %q", got, "2 comments") + } + if got := commentBatchLabel(nil, 3); got != "3 comments" { + t.Errorf("id-only label = %q, want %q", got, "3 comments") + } + if got := commentBatchLabel(nil, 1); got != "this comment" { + t.Errorf("single id label = %q, want %q", got, "this comment") + } +} diff --git a/internal/cmd/description/description.go b/internal/cmd/description/description.go index a8d743c..7e86145 100644 --- a/internal/cmd/description/description.go +++ b/internal/cmd/description/description.go @@ -64,7 +64,7 @@ func runDescriptionGet(cmd *cobra.Command, targetType, targetID string, includeH } params := &openapi.GetDescriptionParams{ TargetType: openapi.GetDescriptionParamsTargetType(targetType), - TargetId: targetID, + TargetId: &targetID, } data, err := api.ParseResponseRaw(c.GetDescription(api.Ctx(), params)) if err != nil { @@ -81,16 +81,14 @@ func runDescriptionSet(cmd *cobra.Command, targetType, targetID, content string) if err != nil { return err } - params := &openapi.UpsertDescriptionParams{ - TargetType: openapi.UpsertDescriptionParamsTargetType(targetType), - TargetId: targetID, - } + targetIdUnion := openapi.DescriptionUpsertRequestSchema_TargetId{} + _ = targetIdUnion.FromDescriptionUpsertRequestSchemaTargetId0(targetID) reqBody := openapi.UpsertDescriptionJSONRequestBody{ TargetType: openapi.DescriptionUpsertRequestSchemaTargetType(targetType), - TargetId: targetID, + TargetId: &targetIdUnion, Content: content, } - data, err := api.ParseResponseRaw(c.UpsertDescription(api.Ctx(), params, reqBody)) + data, err := api.ParseResponseRaw(c.UpsertDescription(api.Ctx(), reqBody)) if err != nil { return err } diff --git a/internal/cmd/homework/homework.go b/internal/cmd/homework/homework.go index 87bc4f5..87bfad6 100644 --- a/internal/cmd/homework/homework.go +++ b/internal/cmd/homework/homework.go @@ -132,29 +132,39 @@ func newCmdSectionCreate() *cobra.Command { if err != nil { return err } - body := openapi.CreateHomeworkJSONRequestBody{ - SectionId: sectionID, + sectionId := openapi.HomeworkCreateRequestSchema_0_SectionId{} + _ = sectionId.FromHomeworkCreateRequestSchema0SectionId0(sectionID) + schemaBody := openapi.HomeworkCreateRequestSchema0{ + SectionId: sectionId, Title: title, } if desc != "" { - body.Description = &desc + schemaBody.Description = &desc } if publishedAt != "" { - body.PublishedAt = &publishedAt + publishedAtUnion := openapi.HomeworkCreateRequestSchema_0_PublishedAt{} + _ = publishedAtUnion.FromHomeworkCreateRequestSchema0PublishedAt0(publishedAt) + schemaBody.PublishedAt = &publishedAtUnion } if submissionStart != "" { - body.SubmissionStartAt = &submissionStart + submissionStartUnion := openapi.HomeworkCreateRequestSchema_0_SubmissionStartAt{} + _ = submissionStartUnion.FromHomeworkCreateRequestSchema0SubmissionStartAt0(submissionStart) + schemaBody.SubmissionStartAt = &submissionStartUnion } if submissionDue != "" { - body.SubmissionDueAt = &submissionDue + submissionDueUnion := openapi.HomeworkCreateRequestSchema_0_SubmissionDueAt{} + _ = submissionDueUnion.FromHomeworkCreateRequestSchema0SubmissionDueAt0(submissionDue) + schemaBody.SubmissionDueAt = &submissionDueUnion } if major { - body.IsMajor = &major + schemaBody.IsMajor = &major } if requiresTeam { - body.RequiresTeam = &requiresTeam + schemaBody.RequiresTeam = &requiresTeam } - data, err := api.ParseResponseRaw(c.CreateHomework(api.Ctx(), nil, body)) + body := openapi.CreateHomeworkJSONRequestBody{} + _ = body.FromHomeworkCreateRequestSchema0(schemaBody) + data, err := api.ParseResponseRaw(c.CreateHomework(api.Ctx(), body)) if err != nil { return err } @@ -625,15 +635,21 @@ func newCmdUpdate() *cobra.Command { hasUpdate = true } if publishedAt != "" { - body.PublishedAt = &publishedAt + publishedAtUnion := openapi.HomeworkUpdateRequestSchema_PublishedAt{} + _ = publishedAtUnion.FromHomeworkUpdateRequestSchemaPublishedAt0(publishedAt) + body.PublishedAt = &publishedAtUnion hasUpdate = true } if submissionStart != "" { - body.SubmissionStartAt = &submissionStart + submissionStartUnion := openapi.HomeworkUpdateRequestSchema_SubmissionStartAt{} + _ = submissionStartUnion.FromHomeworkUpdateRequestSchemaSubmissionStartAt0(submissionStart) + body.SubmissionStartAt = &submissionStartUnion hasUpdate = true } if submissionDue != "" { - body.SubmissionDueAt = &submissionDue + submissionDueUnion := openapi.HomeworkUpdateRequestSchema_SubmissionDueAt{} + _ = submissionDueUnion.FromHomeworkUpdateRequestSchemaSubmissionDueAt0(submissionDue) + body.SubmissionDueAt = &submissionDueUnion hasUpdate = true } if major { @@ -714,7 +730,7 @@ func newCmdDelete() *cobra.Command { if err != nil { return err } - _, err = api.ParseResponseRaw(c.DeleteHomework(api.Ctx(), id, openapi.DeleteHomeworkJSONRequestBody{})) + _, err = api.ParseResponseRaw(c.DeleteHomework(api.Ctx(), id)) if err != nil { return err } @@ -729,18 +745,20 @@ func newCmdDelete() *cobra.Command { func newCmdComplete() *cobra.Command { var undo bool cmd := &cobra.Command{ - Use: "done [homework-id]", + Use: "done [homework-id]...", Aliases: []string{"complete", "finish"}, - Short: "Mark homework as complete", - Long: "Mark homework as complete. When run interactively without an ID, shows matching homeworks and lets you pick one.", - Args: cobra.MaximumNArgs(1), + Short: "Mark homework(s) as complete", + Long: "Mark one or more homeworks as complete. When run interactively without IDs, shows matching homeworks and lets you pick one.", + Args: cobra.ArbitraryArgs, RunE: func(cmd *cobra.Command, args []string) error { - id := "" - var row map[string]any - if len(args) == 1 { - id = strings.TrimSpace(args[0]) - } - if id == "" { + var ids []string + var rows []map[string]any + if len(args) > 0 { + ids = make([]string, len(args)) + for i, arg := range args { + ids[i] = strings.TrimSpace(arg) + } + } else { if !cmdutil.IsInteractive() { return fmt.Errorf("homework id is required in non-interactive mode") } @@ -757,31 +775,83 @@ func newCmdComplete() *cobra.Command { if picked == nil { return nil } - id, _ = picked["id"].(string) - row = picked + id, _ := picked["id"].(string) + ids = []string{id} + rows = []map[string]any{picked} } - return setHomeworkCompleted(cmd, id, row, !undo) + return setHomeworksCompleted(cmd, ids, rows, !undo) }, } cmd.Flags().BoolVar(&undo, "undo", false, "Mark as not completed") return cmd } -func setHomeworkCompleted(cmd *cobra.Command, id string, row map[string]any, completed bool) error { +func setHomeworksCompleted(cmd *cobra.Command, ids []string, rows []map[string]any, completed bool) error { c, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) if err != nil { return err } - body := openapi.SetHomeworkCompletionJSONRequestBody{Completed: completed} - _, err = api.ParseResponseRaw(c.SetHomeworkCompletion(api.Ctx(), id, body)) + items := make([]struct { + Completed bool `json:"completed"` + HomeworkId string `json:"homeworkId"` + }, len(ids)) + for i, id := range ids { + items[i].Completed = completed + items[i].HomeworkId = id + } + body := openapi.PutApiHomeworksCompletionsJSONRequestBody{Items: items} + data, err := api.ParseResponseRaw(c.PutApiHomeworksCompletions(api.Ctx(), body)) if err != nil { return err } - label := homeworkTitleFromRow(row) - if completed { - output.Success(fmt.Sprintf("Completed: %s", label)) - } else { - output.Success(fmt.Sprintf("Reopened: %s", label)) + return reportHomeworkBatchResults(data, rows, completed) +} + +func reportHomeworkBatchResults(data any, rows []map[string]any, completed bool) error { + labels := make(map[string]string, len(rows)) + for _, row := range rows { + id, _ := row["id"].(string) + if id != "" { + labels[id] = homeworkTitleFromRow(row) + } + } + + m, ok := data.(map[string]any) + if !ok { + return fmt.Errorf("unexpected batch response format") + } + results, _ := m["results"].([]any) + + var failures []string + for _, r := range results { + result, ok := r.(map[string]any) + if !ok { + continue + } + id, _ := result["homeworkId"].(string) + success, _ := result["success"].(bool) + if success { + label := labels[id] + if label == "" { + label = id + } + if completed { + output.Success(fmt.Sprintf("Completed: %s", label)) + } else { + output.Success(fmt.Sprintf("Reopened: %s", label)) + } + continue + } + if errMap, ok := result["error"].(map[string]any); ok { + msg, _ := errMap["message"].(string) + failures = append(failures, fmt.Sprintf("%s: %s", id, msg)) + } else { + failures = append(failures, id) + } + } + + if len(failures) > 0 { + return fmt.Errorf("failed to update %d homework(s):\n%s", len(failures), strings.Join(failures, "\n")) } return nil } diff --git a/internal/cmd/homework/homework_test.go b/internal/cmd/homework/homework_test.go index f776f51..65859ac 100644 --- a/internal/cmd/homework/homework_test.go +++ b/internal/cmd/homework/homework_test.go @@ -1,6 +1,9 @@ package homework -import "testing" +import ( + "strings" + "testing" +) func TestFilterHomeworkRows_UsesCompletionWhenIsCompletedMissing(t *testing.T) { rows := []map[string]any{ @@ -27,3 +30,35 @@ func TestFilterHomeworkRows_UsesCompletionWhenIsCompletedMissing(t *testing.T) { } } } + +func TestReportHomeworkBatchResults_AllSuccess(t *testing.T) { + data := map[string]any{ + "results": []any{ + map[string]any{"homeworkId": "h1", "success": true}, + map[string]any{"homeworkId": "h2", "success": true}, + }, + } + rows := []map[string]any{ + {"id": "h1", "title": "PS1"}, + {"id": "h2", "title": "PS2"}, + } + if err := reportHomeworkBatchResults(data, rows, true); err != nil { + t.Fatalf("unexpected error: %v", err) + } +} + +func TestReportHomeworkBatchResults_PartialFailure(t *testing.T) { + data := map[string]any{ + "results": []any{ + map[string]any{"homeworkId": "h1", "success": true}, + map[string]any{"homeworkId": "h2", "success": false, "error": map[string]any{"message": "not found"}}, + }, + } + err := reportHomeworkBatchResults(data, []map[string]any{{"id": "h1", "title": "PS1"}}, true) + if err == nil { + t.Fatal("expected error for partial failure, got nil") + } + if !strings.Contains(err.Error(), "h2: not found") { + t.Errorf("expected error to contain failed item, got %v", err) + } +} diff --git a/internal/cmd/schedule/schedule.go b/internal/cmd/schedule/schedule.go index 30a7928..fa9632a 100644 --- a/internal/cmd/schedule/schedule.go +++ b/internal/cmd/schedule/schedule.go @@ -70,14 +70,16 @@ func runScheduleList(cmd *cobra.Command, opts scheduleListOpts) error { if err != nil { return fmt.Errorf("invalid --date-from: %w", err) } - params.DateFrom = &t + s := t.Format(time.DateOnly) + params.DateFrom = &s } if opts.dateTo != "" { t, err := time.Parse(time.DateOnly, opts.dateTo) if err != nil { return fmt.Errorf("invalid --date-to: %w", err) } - params.DateTo = &t + s := t.Format(time.DateOnly) + params.DateTo = &s } if opts.weekday > 0 { params.Weekday = cmdutil.Int64PtrIfPositive(opts.weekday) diff --git a/internal/cmd/school/school.go b/internal/cmd/school/school.go index 5ed1e2c..c87440c 100644 --- a/internal/cmd/school/school.go +++ b/internal/cmd/school/school.go @@ -42,6 +42,15 @@ type schoolSyncSource struct { Client *ustcschool.Client } +func newMatchSectionCodesBody(codes []string, semesterID string) openapi.MatchSectionCodesJSONRequestBody { + semesterIDUnion := openapi.MatchSectionCodesRequestSchema_SemesterId{} + _ = semesterIDUnion.FromMatchSectionCodesRequestSchemaSemesterId0(semesterID) + return openapi.MatchSectionCodesJSONRequestBody{ + Codes: codes, + SemesterId: &semesterIDUnion, + } +} + func NewCmdSchool() *cobra.Command { cmd := &cobra.Command{ Use: "school", @@ -497,10 +506,7 @@ func newCmdSchoolSync() *cobra.Command { continue } - matchRaw, err := api.ParseResponseRaw(apiClient.MatchSectionCodes(cmd.Context(), openapi.MatchSectionCodesJSONRequestBody{ - Codes: codes, - SemesterId: &lifeSemesterID, - })) + matchRaw, err := api.ParseResponseRaw(apiClient.MatchSectionCodes(cmd.Context(), newMatchSectionCodesBody(codes, lifeSemesterID))) if err != nil { return err } @@ -539,7 +545,8 @@ func newCmdSchoolSync() *cobra.Command { } if !dryRun && len(sectionIDs) > 0 { - subscribeRaw, err := api.ParseResponseRaw(apiClient.SetCalendarSubscription(cmd.Context(), openapi.SetCalendarSubscriptionJSONRequestBody{ + subscribeRaw, err := api.ParseResponseRaw(apiClient.BatchUpdateCalendarSubscription(cmd.Context(), openapi.BatchUpdateCalendarSubscriptionJSONRequestBody{ + Action: openapi.CalendarSubscriptionBatchRequestSchemaActionSet, SectionIds: §ionIDs, })) if err != nil { @@ -1019,10 +1026,7 @@ func homeworkSectionsByCode(cmd *cobra.Command, apiClient *api.TypedClient, life out := map[string]map[string]any{} for lifeSemesterID, codes := range codesByLifeSemester { codes = uniqueStrings(codes) - matchRaw, err := api.ParseResponseRaw(apiClient.MatchSectionCodes(cmd.Context(), openapi.MatchSectionCodesJSONRequestBody{ - Codes: codes, - SemesterId: &lifeSemesterID, - })) + matchRaw, err := api.ParseResponseRaw(apiClient.MatchSectionCodes(cmd.Context(), newMatchSectionCodesBody(codes, lifeSemesterID))) if err != nil { return nil, err } @@ -1112,10 +1116,7 @@ func homeworkSectionsByCourse(cmd *cobra.Command, apiClient *api.TypedClient, so if firstLifeSemester == nil { firstLifeSemester = lifeSemester } - matchRaw, err := api.ParseResponseRaw(apiClient.MatchSectionCodes(cmd.Context(), openapi.MatchSectionCodesJSONRequestBody{ - Codes: codes, - SemesterId: &lifeSemesterID, - })) + matchRaw, err := api.ParseResponseRaw(apiClient.MatchSectionCodes(cmd.Context(), newMatchSectionCodesBody(codes, lifeSemesterID))) if err != nil { return ustcschool.Semester{}, nil, nil, err } @@ -1230,17 +1231,25 @@ func fetchLifeHomeworksForSection(cmd *cobra.Command, apiClient *api.TypedClient } func createLifeHomework(cmd *cobra.Command, apiClient *api.TypedClient, sectionID string, item ustcschool.HomeworkItem) (map[string]any, error) { - body := openapi.CreateHomeworkJSONRequestBody{ - SectionId: sectionID, + sectionIdUnion := openapi.HomeworkCreateRequestSchema_0_SectionId{} + _ = sectionIdUnion.FromHomeworkCreateRequestSchema0SectionId0(sectionID) + schemaBody := openapi.HomeworkCreateRequestSchema0{ + SectionId: sectionIdUnion, Title: item.Title, } if start := lifeHomeworkTime(item.StartAt); start != "" { - body.SubmissionStartAt = &start + startUnion := openapi.HomeworkCreateRequestSchema_0_SubmissionStartAt{} + _ = startUnion.FromHomeworkCreateRequestSchema0SubmissionStartAt0(start) + schemaBody.SubmissionStartAt = &startUnion } if due := lifeHomeworkTime(item.EndAt); due != "" { - body.SubmissionDueAt = &due + dueUnion := openapi.HomeworkCreateRequestSchema_0_SubmissionDueAt{} + _ = dueUnion.FromHomeworkCreateRequestSchema0SubmissionDueAt0(due) + schemaBody.SubmissionDueAt = &dueUnion } - raw, err := api.ParseResponseRaw(apiClient.CreateHomework(cmd.Context(), nil, body)) + body := openapi.CreateHomeworkJSONRequestBody{} + _ = body.FromHomeworkCreateRequestSchema0(schemaBody) + raw, err := api.ParseResponseRaw(apiClient.CreateHomework(cmd.Context(), body)) if err != nil { return nil, err } diff --git a/internal/cmd/section/section.go b/internal/cmd/section/section.go index 1aed24d..6ae2f8e 100644 --- a/internal/cmd/section/section.go +++ b/internal/cmd/section/section.go @@ -264,7 +264,7 @@ func newCmdSchedules() *cobra.Command { if err != nil { return err } - data, err := api.ParseResponseRaw(c.GetSectionSchedules(api.Ctx(), *jwID)) + data, err := api.ParseResponseRaw(c.GetSectionSchedules(api.Ctx(), *jwID, &openapi.GetSectionSchedulesParams{})) if err != nil { return err } @@ -337,7 +337,9 @@ func newCmdMatchCodes() *cobra.Command { Codes: args, } if semesterID != "" { - body.SemesterId = &semesterID + semesterIDUnion := openapi.MatchSectionCodesRequestSchema_SemesterId{} + _ = semesterIDUnion.FromMatchSectionCodesRequestSchemaSemesterId0(semesterID) + body.SemesterId = &semesterIDUnion } data, err := api.ParseResponseRaw(c.MatchSectionCodes(api.Ctx(), body)) if err != nil { diff --git a/internal/cmd/teacher/teacher.go b/internal/cmd/teacher/teacher.go index 58daff1..53b2944 100644 --- a/internal/cmd/teacher/teacher.go +++ b/internal/cmd/teacher/teacher.go @@ -2,6 +2,7 @@ package teacher import ( "fmt" + "strconv" "github.com/spf13/cobra" @@ -155,7 +156,11 @@ func newCmdView() *cobra.Command { if err != nil { return err } - data, err := api.ParseResponseRaw(c.GetTeacher(api.Ctx(), args[0])) + teacherID, err := strconv.ParseInt(args[0], 10, 64) + if err != nil { + return fmt.Errorf("invalid teacher id %q: %w", args[0], err) + } + data, err := api.ParseResponseRaw(c.GetTeacher(api.Ctx(), teacherID)) if err != nil { return err } diff --git a/internal/cmd/todo/todo.go b/internal/cmd/todo/todo.go index 9012e58..e64a44c 100644 --- a/internal/cmd/todo/todo.go +++ b/internal/cmd/todo/todo.go @@ -75,11 +75,11 @@ func runTodoList(cmd *cobra.Command, opts todoListOpts) error { return fmt.Errorf("--done and --pending cannot be used together") } if opts.done { - v := openapi.ListTodosParamsCompletedTrue + v := openapi.True params.Completed = &v } if opts.pending { - v := openapi.ListTodosParamsCompletedFalse + v := openapi.False params.Completed = &v } if opts.priority != "" { @@ -94,14 +94,16 @@ func runTodoList(cmd *cobra.Command, opts todoListOpts) error { if err != nil { return fmt.Errorf("invalid --before date: %w", err) } - params.DueBefore = &t + s := t.Format(time.RFC3339) + params.DueBefore = &s } if opts.after != "" { t, err := timeutil.ParseUserDateTime(opts.after, false) if err != nil { return fmt.Errorf("invalid --after date: %w", err) } - params.DueAfter = &t + s := t.Format(time.RFC3339) + params.DueAfter = &s } data, err := api.ParseResponseRaw(c.ListTodos(api.Ctx(), params)) @@ -291,11 +293,11 @@ func fetchTodoPickList(cmd *cobra.Command, opts todoListOpts) ([]map[string]any, } params := &openapi.ListTodosParams{} if opts.done { - v := openapi.ListTodosParamsCompletedTrue + v := openapi.True params.Completed = &v } if opts.pending { - v := openapi.ListTodosParamsCompletedFalse + v := openapi.False params.Completed = &v } data, err := api.ParseResponseRaw(c.ListTodos(api.Ctx(), params)) @@ -404,9 +406,11 @@ func newCmdCreate() *cobra.Command { body.Priority = &p } if due != "" { - body.DueAt = &due + dueAt := openapi.TodoCreateRequestSchema_DueAt{} + _ = dueAt.FromTodoCreateRequestSchemaDueAt1(openapi.TodoCreateRequestSchemaDueAt1(due)) + body.DueAt = &dueAt } - data, err := api.ParseResponseRaw(c.CreateTodo(api.Ctx(), nil, body)) + data, err := api.ParseResponseRaw(c.CreateTodo(api.Ctx(), body)) if err != nil { return err } @@ -426,18 +430,20 @@ func newCmdCreate() *cobra.Command { func newCmdDone() *cobra.Command { var undo bool cmd := &cobra.Command{ - Use: "done [todo-id]", + Use: "done [todo-id]...", Aliases: []string{"complete", "finish"}, - Short: "Mark a todo as done", - Long: "Mark a todo as done. When run interactively without an ID, shows matching todos and lets you pick one.", - Args: cobra.MaximumNArgs(1), + Short: "Mark todo(s) as done", + Long: "Mark one or more todos as done. When run interactively without IDs, shows matching todos and lets you pick one.", + Args: cobra.ArbitraryArgs, RunE: func(cmd *cobra.Command, args []string) error { - id := "" - var row map[string]any - if len(args) == 1 { - id = strings.TrimSpace(args[0]) - } - if id == "" { + var ids []string + var rows []map[string]any + if len(args) > 0 { + ids = make([]string, len(args)) + for i, arg := range args { + ids[i] = strings.TrimSpace(arg) + } + } else { if !cmdutil.IsInteractive() { return fmt.Errorf("todo id is required in non-interactive mode") } @@ -454,31 +460,83 @@ func newCmdDone() *cobra.Command { if picked == nil { return nil } - id, _ = picked["id"].(string) - row = picked + id, _ := picked["id"].(string) + ids = []string{id} + rows = []map[string]any{picked} } - return setTodoCompleted(cmd, id, row, !undo) + return setTodosCompleted(cmd, ids, rows, !undo) }, } cmd.Flags().BoolVar(&undo, "undo", false, "Mark as not completed") return cmd } -func setTodoCompleted(cmd *cobra.Command, id string, row map[string]any, completed bool) error { +func setTodosCompleted(cmd *cobra.Command, ids []string, rows []map[string]any, completed bool) error { c, err := api.NewTypedClient(cmdutil.ServerFromCmd(cmd), true) if err != nil { return err } - body := openapi.UpdateTodoJSONRequestBody{Completed: &completed} - _, err = api.ParseResponseRaw(c.UpdateTodo(api.Ctx(), id, body)) + items := make([]struct { + Completed bool `json:"completed"` + TodoId string `json:"todoId"` + }, len(ids)) + for i, id := range ids { + items[i].Completed = completed + items[i].TodoId = id + } + body := openapi.PatchApiTodosBatchJSONRequestBody{Items: items} + data, err := api.ParseResponseRaw(c.PatchApiTodosBatch(api.Ctx(), body)) if err != nil { return err } - label := todoTitleFromRow(row) - if completed { - output.Success(fmt.Sprintf("Completed: %s", label)) - } else { - output.Success(fmt.Sprintf("Reopened: %s", label)) + return reportTodoBatchResults(data, rows, completed) +} + +func reportTodoBatchResults(data any, rows []map[string]any, completed bool) error { + labels := make(map[string]string, len(rows)) + for _, row := range rows { + id, _ := row["id"].(string) + if id != "" { + labels[id] = todoTitleFromRow(row) + } + } + + m, ok := data.(map[string]any) + if !ok { + return fmt.Errorf("unexpected batch response format") + } + results, _ := m["results"].([]any) + + var failures []string + for _, r := range results { + result, ok := r.(map[string]any) + if !ok { + continue + } + id, _ := result["todoId"].(string) + success, _ := result["success"].(bool) + if success { + label := labels[id] + if label == "" { + label = id + } + if completed { + output.Success(fmt.Sprintf("Completed: %s", label)) + } else { + output.Success(fmt.Sprintf("Reopened: %s", label)) + } + continue + } + if errMap, ok := result["error"].(map[string]any); ok { + msg, _ := errMap["message"].(string) + failures = append(failures, fmt.Sprintf("%s: %s", id, msg)) + } else { + failures = append(failures, id) + } + } + + if len(failures) > 0 { + return fmt.Errorf("failed to update %d todo(s):\n%s", len(failures), strings.Join(failures, "\n")) } return nil } @@ -535,7 +593,9 @@ func newCmdUpdate() *cobra.Command { hasUpdate = true } if due != "" { - body.DueAt = &due + dueAt := openapi.TodoUpdateRequestSchema_DueAt{} + _ = dueAt.FromTodoUpdateRequestSchemaDueAt1(openapi.TodoUpdateRequestSchemaDueAt1(due)) + body.DueAt = &dueAt hasUpdate = true } if completed && notCompleted { @@ -609,7 +669,7 @@ func newCmdDelete() *cobra.Command { if err != nil { return err } - _, err = api.ParseResponseRaw(c.DeleteTodo(api.Ctx(), id, openapi.DeleteTodoJSONRequestBody{})) + _, err = api.ParseResponseRaw(c.DeleteTodo(api.Ctx(), id)) if err != nil { return err } diff --git a/internal/cmd/todo/todo_test.go b/internal/cmd/todo/todo_test.go index 17ffebe..a21d054 100644 --- a/internal/cmd/todo/todo_test.go +++ b/internal/cmd/todo/todo_test.go @@ -439,3 +439,35 @@ func TestAnnotateTodoRows_EmptySlice(t *testing.T) { // must not panic annotateTodoRows([]map[string]any{}) } + +func TestReportTodoBatchResults_AllSuccess(t *testing.T) { + data := map[string]any{ + "results": []any{ + map[string]any{"todoId": "t1", "success": true}, + map[string]any{"todoId": "t2", "success": true}, + }, + } + rows := []map[string]any{ + {"id": "t1", "title": "First"}, + {"id": "t2", "title": "Second"}, + } + if err := reportTodoBatchResults(data, rows, true); err != nil { + t.Fatalf("unexpected error: %v", err) + } +} + +func TestReportTodoBatchResults_PartialFailure(t *testing.T) { + data := map[string]any{ + "results": []any{ + map[string]any{"todoId": "t1", "success": true}, + map[string]any{"todoId": "t2", "success": false, "error": map[string]any{"message": "not found"}}, + }, + } + err := reportTodoBatchResults(data, []map[string]any{{"id": "t1", "title": "First"}}, true) + if err == nil { + t.Fatal("expected error for partial failure, got nil") + } + if !strings.Contains(err.Error(), "t2: not found") { + t.Errorf("expected error to contain failed item, got %v", err) + } +} diff --git a/internal/cmd/upload/upload.go b/internal/cmd/upload/upload.go index e0afa0d..e2e7d3c 100644 --- a/internal/cmd/upload/upload.go +++ b/internal/cmd/upload/upload.go @@ -104,7 +104,8 @@ func newCmdFile() *cobra.Command { } // Step 1: Create upload - size := fmt.Sprintf("%d", stat.Size()) + size := openapi.UploadCreateRequestSchema_Size{} + _ = size.FromUploadCreateRequestSchemaSize0(fmt.Sprintf("%d", stat.Size())) reqBody := openapi.CreateUploadJSONRequestBody{ Filename: filepath.Base(filePath), Size: size, @@ -226,7 +227,7 @@ func newCmdDelete() *cobra.Command { if err != nil { return err } - _, err = api.ParseResponseRaw(c.DeleteUploadWithBody(api.Ctx(), id, "application/json", strings.NewReader("{}"))) + _, err = api.ParseResponseRaw(c.DeleteUpload(api.Ctx(), id)) if err != nil { return err } diff --git a/internal/openapi/client.gen.go b/internal/openapi/client.gen.go index a18d62a..ddfa59b 100644 --- a/internal/openapi/client.gen.go +++ b/internal/openapi/client.gen.go @@ -17,6 +17,12 @@ import ( "github.com/oapi-codegen/runtime" ) +const ( + BearerAuthScopes = "bearerAuth.Scopes" + CalendarFeedTokenScopes = "calendarFeedToken.Scopes" + SessionCookieScopes = "sessionCookie.Scopes" +) + // Defines values for AdminCommentsResponseSchemaCommentsStatus. const ( AdminCommentsResponseSchemaCommentsStatusActive AdminCommentsResponseSchemaCommentsStatus = "active" @@ -40,7 +46,6 @@ func (e AdminCommentsResponseSchemaCommentsStatus) Valid() bool { // Defines values for AdminCommentsResponseSchemaCommentsVisibility. const ( - AdminCommentsResponseSchemaCommentsVisibilityAnonymous AdminCommentsResponseSchemaCommentsVisibility = "anonymous" AdminCommentsResponseSchemaCommentsVisibilityLoggedInOnly AdminCommentsResponseSchemaCommentsVisibility = "logged_in_only" AdminCommentsResponseSchemaCommentsVisibilityPublic AdminCommentsResponseSchemaCommentsVisibility = "public" ) @@ -48,8 +53,6 @@ const ( // Valid indicates whether the value is a known member of the AdminCommentsResponseSchemaCommentsVisibility enum. func (e AdminCommentsResponseSchemaCommentsVisibility) Valid() bool { switch e { - case AdminCommentsResponseSchemaCommentsVisibilityAnonymous: - return true case AdminCommentsResponseSchemaCommentsVisibilityLoggedInOnly: return true case AdminCommentsResponseSchemaCommentsVisibilityPublic: @@ -59,6 +62,21 @@ func (e AdminCommentsResponseSchemaCommentsVisibility) Valid() bool { } } +// Defines values for AdminCreateSuspensionRequestSchemaExpiresAt1. +const ( + AdminCreateSuspensionRequestSchemaExpiresAt1LessThannil AdminCreateSuspensionRequestSchemaExpiresAt1 = "" +) + +// Valid indicates whether the value is a known member of the AdminCreateSuspensionRequestSchemaExpiresAt1 enum. +func (e AdminCreateSuspensionRequestSchemaExpiresAt1) Valid() bool { + switch e { + case AdminCreateSuspensionRequestSchemaExpiresAt1LessThannil: + return true + default: + return false + } +} + // Defines values for AdminModerateCommentRequestSchemaStatus. const ( AdminModerateCommentRequestSchemaStatusActive AdminModerateCommentRequestSchemaStatus = "active" @@ -103,7 +121,6 @@ func (e AdminModeratedCommentResponseSchemaCommentStatus) Valid() bool { // Defines values for AdminModeratedCommentResponseSchemaCommentVisibility. const ( - AdminModeratedCommentResponseSchemaCommentVisibilityAnonymous AdminModeratedCommentResponseSchemaCommentVisibility = "anonymous" AdminModeratedCommentResponseSchemaCommentVisibilityLoggedInOnly AdminModeratedCommentResponseSchemaCommentVisibility = "logged_in_only" AdminModeratedCommentResponseSchemaCommentVisibilityPublic AdminModeratedCommentResponseSchemaCommentVisibility = "public" ) @@ -111,8 +128,6 @@ const ( // Valid indicates whether the value is a known member of the AdminModeratedCommentResponseSchemaCommentVisibility enum. func (e AdminModeratedCommentResponseSchemaCommentVisibility) Valid() bool { switch e { - case AdminModeratedCommentResponseSchemaCommentVisibilityAnonymous: - return true case AdminModeratedCommentResponseSchemaCommentVisibilityLoggedInOnly: return true case AdminModeratedCommentResponseSchemaCommentVisibilityPublic: @@ -122,6 +137,126 @@ func (e AdminModeratedCommentResponseSchemaCommentVisibility) Valid() bool { } } +// Defines values for AdminUpdateUserRequestSchemaName1. +const ( + AdminUpdateUserRequestSchemaName1LessThannil AdminUpdateUserRequestSchemaName1 = "" +) + +// Valid indicates whether the value is a known member of the AdminUpdateUserRequestSchemaName1 enum. +func (e AdminUpdateUserRequestSchemaName1) Valid() bool { + switch e { + case AdminUpdateUserRequestSchemaName1LessThannil: + return true + default: + return false + } +} + +// Defines values for AdminUpdateUserRequestSchemaUsername1. +const ( + AdminUpdateUserRequestSchemaUsername1LessThannil AdminUpdateUserRequestSchemaUsername1 = "" +) + +// Valid indicates whether the value is a known member of the AdminUpdateUserRequestSchemaUsername1 enum. +func (e AdminUpdateUserRequestSchemaUsername1) Valid() bool { + switch e { + case AdminUpdateUserRequestSchemaUsername1LessThannil: + return true + default: + return false + } +} + +// Defines values for BusNextDeparturesResponseSchemaDayType. +const ( + BusNextDeparturesResponseSchemaDayTypeWeekday BusNextDeparturesResponseSchemaDayType = "weekday" + BusNextDeparturesResponseSchemaDayTypeWeekend BusNextDeparturesResponseSchemaDayType = "weekend" +) + +// Valid indicates whether the value is a known member of the BusNextDeparturesResponseSchemaDayType enum. +func (e BusNextDeparturesResponseSchemaDayType) Valid() bool { + switch e { + case BusNextDeparturesResponseSchemaDayTypeWeekday: + return true + case BusNextDeparturesResponseSchemaDayTypeWeekend: + return true + default: + return false + } +} + +// Defines values for BusNextDeparturesResponseSchemaDeparturesDayType. +const ( + BusNextDeparturesResponseSchemaDeparturesDayTypeWeekday BusNextDeparturesResponseSchemaDeparturesDayType = "weekday" + BusNextDeparturesResponseSchemaDeparturesDayTypeWeekend BusNextDeparturesResponseSchemaDeparturesDayType = "weekend" +) + +// Valid indicates whether the value is a known member of the BusNextDeparturesResponseSchemaDeparturesDayType enum. +func (e BusNextDeparturesResponseSchemaDeparturesDayType) Valid() bool { + switch e { + case BusNextDeparturesResponseSchemaDeparturesDayTypeWeekday: + return true + case BusNextDeparturesResponseSchemaDeparturesDayTypeWeekend: + return true + default: + return false + } +} + +// Defines values for BusNextDeparturesResponseSchemaDeparturesStatus. +const ( + BusNextDeparturesResponseSchemaDeparturesStatusDeparted BusNextDeparturesResponseSchemaDeparturesStatus = "departed" + BusNextDeparturesResponseSchemaDeparturesStatusUpcoming BusNextDeparturesResponseSchemaDeparturesStatus = "upcoming" +) + +// Valid indicates whether the value is a known member of the BusNextDeparturesResponseSchemaDeparturesStatus enum. +func (e BusNextDeparturesResponseSchemaDeparturesStatus) Valid() bool { + switch e { + case BusNextDeparturesResponseSchemaDeparturesStatusDeparted: + return true + case BusNextDeparturesResponseSchemaDeparturesStatusUpcoming: + return true + default: + return false + } +} + +// Defines values for BusNextDeparturesResponseSchemaNextAvailableDepartureDayType. +const ( + BusNextDeparturesResponseSchemaNextAvailableDepartureDayTypeWeekday BusNextDeparturesResponseSchemaNextAvailableDepartureDayType = "weekday" + BusNextDeparturesResponseSchemaNextAvailableDepartureDayTypeWeekend BusNextDeparturesResponseSchemaNextAvailableDepartureDayType = "weekend" +) + +// Valid indicates whether the value is a known member of the BusNextDeparturesResponseSchemaNextAvailableDepartureDayType enum. +func (e BusNextDeparturesResponseSchemaNextAvailableDepartureDayType) Valid() bool { + switch e { + case BusNextDeparturesResponseSchemaNextAvailableDepartureDayTypeWeekday: + return true + case BusNextDeparturesResponseSchemaNextAvailableDepartureDayTypeWeekend: + return true + default: + return false + } +} + +// Defines values for BusNextDeparturesResponseSchemaNextAvailableDepartureStatus. +const ( + BusNextDeparturesResponseSchemaNextAvailableDepartureStatusDeparted BusNextDeparturesResponseSchemaNextAvailableDepartureStatus = "departed" + BusNextDeparturesResponseSchemaNextAvailableDepartureStatusUpcoming BusNextDeparturesResponseSchemaNextAvailableDepartureStatus = "upcoming" +) + +// Valid indicates whether the value is a known member of the BusNextDeparturesResponseSchemaNextAvailableDepartureStatus enum. +func (e BusNextDeparturesResponseSchemaNextAvailableDepartureStatus) Valid() bool { + switch e { + case BusNextDeparturesResponseSchemaNextAvailableDepartureStatusDeparted: + return true + case BusNextDeparturesResponseSchemaNextAvailableDepartureStatusUpcoming: + return true + default: + return false + } +} + // Defines values for BusQueryResponseSchemaLocale. const ( BusQueryResponseSchemaLocaleEnUs BusQueryResponseSchemaLocale = "en-us" @@ -142,16 +277,109 @@ func (e BusQueryResponseSchemaLocale) Valid() bool { // Defines values for BusQueryResponseSchemaTripsDayType. const ( - Weekday BusQueryResponseSchemaTripsDayType = "weekday" - Weekend BusQueryResponseSchemaTripsDayType = "weekend" + BusQueryResponseSchemaTripsDayTypeWeekday BusQueryResponseSchemaTripsDayType = "weekday" + BusQueryResponseSchemaTripsDayTypeWeekend BusQueryResponseSchemaTripsDayType = "weekend" ) // Valid indicates whether the value is a known member of the BusQueryResponseSchemaTripsDayType enum. func (e BusQueryResponseSchemaTripsDayType) Valid() bool { switch e { - case Weekday: + case BusQueryResponseSchemaTripsDayTypeWeekday: return true - case Weekend: + case BusQueryResponseSchemaTripsDayTypeWeekend: + return true + default: + return false + } +} + +// Defines values for CalendarSubscriptionBatchRequestSchemaAction. +const ( + CalendarSubscriptionBatchRequestSchemaActionAdd CalendarSubscriptionBatchRequestSchemaAction = "add" + CalendarSubscriptionBatchRequestSchemaActionRemove CalendarSubscriptionBatchRequestSchemaAction = "remove" + CalendarSubscriptionBatchRequestSchemaActionSet CalendarSubscriptionBatchRequestSchemaAction = "set" +) + +// Valid indicates whether the value is a known member of the CalendarSubscriptionBatchRequestSchemaAction enum. +func (e CalendarSubscriptionBatchRequestSchemaAction) Valid() bool { + switch e { + case CalendarSubscriptionBatchRequestSchemaActionAdd: + return true + case CalendarSubscriptionBatchRequestSchemaActionRemove: + return true + case CalendarSubscriptionBatchRequestSchemaActionSet: + return true + default: + return false + } +} + +// Defines values for CalendarSubscriptionBatchResponseSchemaAction. +const ( + CalendarSubscriptionBatchResponseSchemaActionAdd CalendarSubscriptionBatchResponseSchemaAction = "add" + CalendarSubscriptionBatchResponseSchemaActionRemove CalendarSubscriptionBatchResponseSchemaAction = "remove" + CalendarSubscriptionBatchResponseSchemaActionSet CalendarSubscriptionBatchResponseSchemaAction = "set" +) + +// Valid indicates whether the value is a known member of the CalendarSubscriptionBatchResponseSchemaAction enum. +func (e CalendarSubscriptionBatchResponseSchemaAction) Valid() bool { + switch e { + case CalendarSubscriptionBatchResponseSchemaActionAdd: + return true + case CalendarSubscriptionBatchResponseSchemaActionRemove: + return true + case CalendarSubscriptionBatchResponseSchemaActionSet: + return true + default: + return false + } +} + +// Defines values for CommentBatchDeleteResponseSchemaResults0Success. +const ( + CommentBatchDeleteResponseSchemaResults0SuccessTrue CommentBatchDeleteResponseSchemaResults0Success = true +) + +// Valid indicates whether the value is a known member of the CommentBatchDeleteResponseSchemaResults0Success enum. +func (e CommentBatchDeleteResponseSchemaResults0Success) Valid() bool { + switch e { + case CommentBatchDeleteResponseSchemaResults0SuccessTrue: + return true + default: + return false + } +} + +// Defines values for CommentBatchDeleteResponseSchemaResults1ErrorCode. +const ( + CommentBatchDeleteResponseSchemaResults1ErrorCodeForbidden CommentBatchDeleteResponseSchemaResults1ErrorCode = "forbidden" + CommentBatchDeleteResponseSchemaResults1ErrorCodeLocked CommentBatchDeleteResponseSchemaResults1ErrorCode = "locked" + CommentBatchDeleteResponseSchemaResults1ErrorCodeNotFound CommentBatchDeleteResponseSchemaResults1ErrorCode = "not_found" +) + +// Valid indicates whether the value is a known member of the CommentBatchDeleteResponseSchemaResults1ErrorCode enum. +func (e CommentBatchDeleteResponseSchemaResults1ErrorCode) Valid() bool { + switch e { + case CommentBatchDeleteResponseSchemaResults1ErrorCodeForbidden: + return true + case CommentBatchDeleteResponseSchemaResults1ErrorCodeLocked: + return true + case CommentBatchDeleteResponseSchemaResults1ErrorCodeNotFound: + return true + default: + return false + } +} + +// Defines values for CommentBatchDeleteResponseSchemaResults1Success. +const ( + CommentBatchDeleteResponseSchemaResults1SuccessFalse CommentBatchDeleteResponseSchemaResults1Success = false +) + +// Valid indicates whether the value is a known member of the CommentBatchDeleteResponseSchemaResults1Success enum. +func (e CommentBatchDeleteResponseSchemaResults1Success) Valid() bool { + switch e { + case CommentBatchDeleteResponseSchemaResults1SuccessFalse: return true default: return false @@ -187,7 +415,6 @@ func (e CommentCreateRequestSchemaTargetType) Valid() bool { // Defines values for CommentCreateRequestSchemaVisibility. const ( - CommentCreateRequestSchemaVisibilityAnonymous CommentCreateRequestSchemaVisibility = "anonymous" CommentCreateRequestSchemaVisibilityLoggedInOnly CommentCreateRequestSchemaVisibility = "logged_in_only" CommentCreateRequestSchemaVisibilityPublic CommentCreateRequestSchemaVisibility = "public" ) @@ -195,8 +422,6 @@ const ( // Valid indicates whether the value is a known member of the CommentCreateRequestSchemaVisibility enum. func (e CommentCreateRequestSchemaVisibility) Valid() bool { switch e { - case CommentCreateRequestSchemaVisibilityAnonymous: - return true case CommentCreateRequestSchemaVisibilityLoggedInOnly: return true case CommentCreateRequestSchemaVisibilityPublic: @@ -244,7 +469,6 @@ func (e CommentReactionRequestSchemaType) Valid() bool { // Defines values for CommentUpdateRequestSchemaVisibility. const ( - CommentUpdateRequestSchemaVisibilityAnonymous CommentUpdateRequestSchemaVisibility = "anonymous" CommentUpdateRequestSchemaVisibilityLoggedInOnly CommentUpdateRequestSchemaVisibility = "logged_in_only" CommentUpdateRequestSchemaVisibilityPublic CommentUpdateRequestSchemaVisibility = "public" ) @@ -252,8 +476,6 @@ const ( // Valid indicates whether the value is a known member of the CommentUpdateRequestSchemaVisibility enum. func (e CommentUpdateRequestSchemaVisibility) Valid() bool { switch e { - case CommentUpdateRequestSchemaVisibilityAnonymous: - return true case CommentUpdateRequestSchemaVisibilityLoggedInOnly: return true case CommentUpdateRequestSchemaVisibilityPublic: @@ -263,18 +485,93 @@ func (e CommentUpdateRequestSchemaVisibility) Valid() bool { } } +// Defines values for CommentsListResponseSchemaTargetTargetId2. +const ( + CommentsListResponseSchemaTargetTargetId2LessThannil CommentsListResponseSchemaTargetTargetId2 = "" +) + +// Valid indicates whether the value is a known member of the CommentsListResponseSchemaTargetTargetId2 enum. +func (e CommentsListResponseSchemaTargetTargetId2) Valid() bool { + switch e { + case CommentsListResponseSchemaTargetTargetId2LessThannil: + return true + default: + return false + } +} + +// Defines values for CompactOverviewResponseSchemaDueTodosItemsPriority. +const ( + CompactOverviewResponseSchemaDueTodosItemsPriorityHigh CompactOverviewResponseSchemaDueTodosItemsPriority = "high" + CompactOverviewResponseSchemaDueTodosItemsPriorityLow CompactOverviewResponseSchemaDueTodosItemsPriority = "low" + CompactOverviewResponseSchemaDueTodosItemsPriorityMedium CompactOverviewResponseSchemaDueTodosItemsPriority = "medium" +) + +// Valid indicates whether the value is a known member of the CompactOverviewResponseSchemaDueTodosItemsPriority enum. +func (e CompactOverviewResponseSchemaDueTodosItemsPriority) Valid() bool { + switch e { + case CompactOverviewResponseSchemaDueTodosItemsPriorityHigh: + return true + case CompactOverviewResponseSchemaDueTodosItemsPriorityLow: + return true + case CompactOverviewResponseSchemaDueTodosItemsPriorityMedium: + return true + default: + return false + } +} + +// Defines values for CompactOverviewResponseSchemaTodosItemsPriority. +const ( + CompactOverviewResponseSchemaTodosItemsPriorityHigh CompactOverviewResponseSchemaTodosItemsPriority = "high" + CompactOverviewResponseSchemaTodosItemsPriorityLow CompactOverviewResponseSchemaTodosItemsPriority = "low" + CompactOverviewResponseSchemaTodosItemsPriorityMedium CompactOverviewResponseSchemaTodosItemsPriority = "medium" +) + +// Valid indicates whether the value is a known member of the CompactOverviewResponseSchemaTodosItemsPriority enum. +func (e CompactOverviewResponseSchemaTodosItemsPriority) Valid() bool { + switch e { + case CompactOverviewResponseSchemaTodosItemsPriorityHigh: + return true + case CompactOverviewResponseSchemaTodosItemsPriorityLow: + return true + case CompactOverviewResponseSchemaTodosItemsPriorityMedium: + return true + default: + return false + } +} + +// Defines values for DashboardLinkPinBatchRequestSchemaItemsAction. +const ( + DashboardLinkPinBatchRequestSchemaItemsActionPin DashboardLinkPinBatchRequestSchemaItemsAction = "pin" + DashboardLinkPinBatchRequestSchemaItemsActionUnpin DashboardLinkPinBatchRequestSchemaItemsAction = "unpin" +) + +// Valid indicates whether the value is a known member of the DashboardLinkPinBatchRequestSchemaItemsAction enum. +func (e DashboardLinkPinBatchRequestSchemaItemsAction) Valid() bool { + switch e { + case DashboardLinkPinBatchRequestSchemaItemsActionPin: + return true + case DashboardLinkPinBatchRequestSchemaItemsActionUnpin: + return true + default: + return false + } +} + // Defines values for DashboardLinkPinRequestSchemaAction. const ( - Pin DashboardLinkPinRequestSchemaAction = "pin" - Unpin DashboardLinkPinRequestSchemaAction = "unpin" + DashboardLinkPinRequestSchemaActionPin DashboardLinkPinRequestSchemaAction = "pin" + DashboardLinkPinRequestSchemaActionUnpin DashboardLinkPinRequestSchemaAction = "unpin" ) // Valid indicates whether the value is a known member of the DashboardLinkPinRequestSchemaAction enum. func (e DashboardLinkPinRequestSchemaAction) Valid() bool { switch e { - case Pin: + case DashboardLinkPinRequestSchemaActionPin: return true - case Unpin: + case DashboardLinkPinRequestSchemaActionUnpin: return true default: return false @@ -305,1807 +602,1169 @@ func (e DescriptionUpsertRequestSchemaTargetType) Valid() bool { } } -// Defines values for HomeworksListResponseSchemaAuditLogsAction. +// Defines values for DescriptionUpsertRequestSchema1TargetType. const ( - HomeworksListResponseSchemaAuditLogsActionCreated HomeworksListResponseSchemaAuditLogsAction = "created" - HomeworksListResponseSchemaAuditLogsActionDeleted HomeworksListResponseSchemaAuditLogsAction = "deleted" + DescriptionUpsertRequestSchema1TargetTypeSection DescriptionUpsertRequestSchema1TargetType = "section" ) -// Valid indicates whether the value is a known member of the HomeworksListResponseSchemaAuditLogsAction enum. -func (e HomeworksListResponseSchemaAuditLogsAction) Valid() bool { +// Valid indicates whether the value is a known member of the DescriptionUpsertRequestSchema1TargetType enum. +func (e DescriptionUpsertRequestSchema1TargetType) Valid() bool { switch e { - case HomeworksListResponseSchemaAuditLogsActionCreated: - return true - case HomeworksListResponseSchemaAuditLogsActionDeleted: + case DescriptionUpsertRequestSchema1TargetTypeSection: return true default: return false } } -// Defines values for LocaleUpdateRequestSchemaLocale. +// Defines values for DescriptionUpsertRequestSchema2TargetType. const ( - LocaleUpdateRequestSchemaLocaleEnUs LocaleUpdateRequestSchemaLocale = "en-us" - LocaleUpdateRequestSchemaLocaleZhCn LocaleUpdateRequestSchemaLocale = "zh-cn" + DescriptionUpsertRequestSchema2TargetTypeCourse DescriptionUpsertRequestSchema2TargetType = "course" ) -// Valid indicates whether the value is a known member of the LocaleUpdateRequestSchemaLocale enum. -func (e LocaleUpdateRequestSchemaLocale) Valid() bool { +// Valid indicates whether the value is a known member of the DescriptionUpsertRequestSchema2TargetType enum. +func (e DescriptionUpsertRequestSchema2TargetType) Valid() bool { switch e { - case LocaleUpdateRequestSchemaLocaleEnUs: - return true - case LocaleUpdateRequestSchemaLocaleZhCn: + case DescriptionUpsertRequestSchema2TargetTypeCourse: return true default: return false } } -// Defines values for SubscribedHomeworksResponseSchemaAuditLogsAction. +// Defines values for DescriptionUpsertRequestSchema3TargetType. const ( - SubscribedHomeworksResponseSchemaAuditLogsActionCreated SubscribedHomeworksResponseSchemaAuditLogsAction = "created" - SubscribedHomeworksResponseSchemaAuditLogsActionDeleted SubscribedHomeworksResponseSchemaAuditLogsAction = "deleted" + DescriptionUpsertRequestSchema3TargetTypeTeacher DescriptionUpsertRequestSchema3TargetType = "teacher" ) -// Valid indicates whether the value is a known member of the SubscribedHomeworksResponseSchemaAuditLogsAction enum. -func (e SubscribedHomeworksResponseSchemaAuditLogsAction) Valid() bool { +// Valid indicates whether the value is a known member of the DescriptionUpsertRequestSchema3TargetType enum. +func (e DescriptionUpsertRequestSchema3TargetType) Valid() bool { switch e { - case SubscribedHomeworksResponseSchemaAuditLogsActionCreated: - return true - case SubscribedHomeworksResponseSchemaAuditLogsActionDeleted: + case DescriptionUpsertRequestSchema3TargetTypeTeacher: return true default: return false } } -// Defines values for TodoCreateRequestSchemaPriority. +// Defines values for DescriptionUpsertRequestSchema4TargetType. const ( - TodoCreateRequestSchemaPriorityHigh TodoCreateRequestSchemaPriority = "high" - TodoCreateRequestSchemaPriorityLow TodoCreateRequestSchemaPriority = "low" - TodoCreateRequestSchemaPriorityMedium TodoCreateRequestSchemaPriority = "medium" + Homework DescriptionUpsertRequestSchema4TargetType = "homework" ) -// Valid indicates whether the value is a known member of the TodoCreateRequestSchemaPriority enum. -func (e TodoCreateRequestSchemaPriority) Valid() bool { +// Valid indicates whether the value is a known member of the DescriptionUpsertRequestSchema4TargetType enum. +func (e DescriptionUpsertRequestSchema4TargetType) Valid() bool { switch e { - case TodoCreateRequestSchemaPriorityHigh: - return true - case TodoCreateRequestSchemaPriorityLow: - return true - case TodoCreateRequestSchemaPriorityMedium: + case Homework: return true default: return false } } -// Defines values for TodoUpdateRequestSchemaPriority. +// Defines values for HomeworkCompletionBatchResponseSchemaResults0Success. const ( - TodoUpdateRequestSchemaPriorityHigh TodoUpdateRequestSchemaPriority = "high" - TodoUpdateRequestSchemaPriorityLow TodoUpdateRequestSchemaPriority = "low" - TodoUpdateRequestSchemaPriorityMedium TodoUpdateRequestSchemaPriority = "medium" + HomeworkCompletionBatchResponseSchemaResults0SuccessTrue HomeworkCompletionBatchResponseSchemaResults0Success = true ) -// Valid indicates whether the value is a known member of the TodoUpdateRequestSchemaPriority enum. -func (e TodoUpdateRequestSchemaPriority) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkCompletionBatchResponseSchemaResults0Success enum. +func (e HomeworkCompletionBatchResponseSchemaResults0Success) Valid() bool { switch e { - case TodoUpdateRequestSchemaPriorityHigh: - return true - case TodoUpdateRequestSchemaPriorityLow: - return true - case TodoUpdateRequestSchemaPriorityMedium: + case HomeworkCompletionBatchResponseSchemaResults0SuccessTrue: return true default: return false } } -// Defines values for TodosListResponseSchemaTodosPriority. +// Defines values for HomeworkCompletionBatchResponseSchemaResults1ErrorCode. const ( - TodosListResponseSchemaTodosPriorityHigh TodosListResponseSchemaTodosPriority = "high" - TodosListResponseSchemaTodosPriorityLow TodosListResponseSchemaTodosPriority = "low" - TodosListResponseSchemaTodosPriorityMedium TodosListResponseSchemaTodosPriority = "medium" + HomeworkCompletionBatchResponseSchemaResults1ErrorCodeDeleted HomeworkCompletionBatchResponseSchemaResults1ErrorCode = "deleted" + HomeworkCompletionBatchResponseSchemaResults1ErrorCodeNotFound HomeworkCompletionBatchResponseSchemaResults1ErrorCode = "not_found" ) -// Valid indicates whether the value is a known member of the TodosListResponseSchemaTodosPriority enum. -func (e TodosListResponseSchemaTodosPriority) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkCompletionBatchResponseSchemaResults1ErrorCode enum. +func (e HomeworkCompletionBatchResponseSchemaResults1ErrorCode) Valid() bool { switch e { - case TodosListResponseSchemaTodosPriorityHigh: + case HomeworkCompletionBatchResponseSchemaResults1ErrorCodeDeleted: return true - case TodosListResponseSchemaTodosPriorityLow: - return true - case TodosListResponseSchemaTodosPriorityMedium: + case HomeworkCompletionBatchResponseSchemaResults1ErrorCodeNotFound: return true default: return false } } -// Defines values for ListAdminCommentsParamsStatus. +// Defines values for HomeworkCompletionBatchResponseSchemaResults1Success. const ( - ListAdminCommentsParamsStatusActive ListAdminCommentsParamsStatus = "active" - ListAdminCommentsParamsStatusDeleted ListAdminCommentsParamsStatus = "deleted" - ListAdminCommentsParamsStatusSoftbanned ListAdminCommentsParamsStatus = "softbanned" - ListAdminCommentsParamsStatusSuspended ListAdminCommentsParamsStatus = "suspended" + HomeworkCompletionBatchResponseSchemaResults1SuccessFalse HomeworkCompletionBatchResponseSchemaResults1Success = false ) -// Valid indicates whether the value is a known member of the ListAdminCommentsParamsStatus enum. -func (e ListAdminCommentsParamsStatus) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkCompletionBatchResponseSchemaResults1Success enum. +func (e HomeworkCompletionBatchResponseSchemaResults1Success) Valid() bool { switch e { - case ListAdminCommentsParamsStatusActive: - return true - case ListAdminCommentsParamsStatusDeleted: - return true - case ListAdminCommentsParamsStatusSoftbanned: - return true - case ListAdminCommentsParamsStatusSuspended: + case HomeworkCompletionBatchResponseSchemaResults1SuccessFalse: return true default: return false } } -// Defines values for ListAdminDescriptionsParamsTargetType. +// Defines values for HomeworkCreateRequestSchema0PublishedAt1. const ( - ListAdminDescriptionsParamsTargetTypeAll ListAdminDescriptionsParamsTargetType = "all" - ListAdminDescriptionsParamsTargetTypeCourse ListAdminDescriptionsParamsTargetType = "course" - ListAdminDescriptionsParamsTargetTypeHomework ListAdminDescriptionsParamsTargetType = "homework" - ListAdminDescriptionsParamsTargetTypeSection ListAdminDescriptionsParamsTargetType = "section" - ListAdminDescriptionsParamsTargetTypeTeacher ListAdminDescriptionsParamsTargetType = "teacher" + HomeworkCreateRequestSchema0PublishedAt1LessThannil HomeworkCreateRequestSchema0PublishedAt1 = "" ) -// Valid indicates whether the value is a known member of the ListAdminDescriptionsParamsTargetType enum. -func (e ListAdminDescriptionsParamsTargetType) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkCreateRequestSchema0PublishedAt1 enum. +func (e HomeworkCreateRequestSchema0PublishedAt1) Valid() bool { switch e { - case ListAdminDescriptionsParamsTargetTypeAll: - return true - case ListAdminDescriptionsParamsTargetTypeCourse: - return true - case ListAdminDescriptionsParamsTargetTypeHomework: - return true - case ListAdminDescriptionsParamsTargetTypeSection: - return true - case ListAdminDescriptionsParamsTargetTypeTeacher: + case HomeworkCreateRequestSchema0PublishedAt1LessThannil: return true default: return false } } -// Defines values for ListAdminDescriptionsParamsHasContent. +// Defines values for HomeworkCreateRequestSchema0SubmissionDueAt1. const ( - ListAdminDescriptionsParamsHasContentAll ListAdminDescriptionsParamsHasContent = "all" - ListAdminDescriptionsParamsHasContentEmpty ListAdminDescriptionsParamsHasContent = "empty" - ListAdminDescriptionsParamsHasContentWithContent ListAdminDescriptionsParamsHasContent = "withContent" + HomeworkCreateRequestSchema0SubmissionDueAt1LessThannil HomeworkCreateRequestSchema0SubmissionDueAt1 = "" ) -// Valid indicates whether the value is a known member of the ListAdminDescriptionsParamsHasContent enum. -func (e ListAdminDescriptionsParamsHasContent) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkCreateRequestSchema0SubmissionDueAt1 enum. +func (e HomeworkCreateRequestSchema0SubmissionDueAt1) Valid() bool { switch e { - case ListAdminDescriptionsParamsHasContentAll: - return true - case ListAdminDescriptionsParamsHasContentEmpty: - return true - case ListAdminDescriptionsParamsHasContentWithContent: + case HomeworkCreateRequestSchema0SubmissionDueAt1LessThannil: return true default: return false } } -// Defines values for ListAdminHomeworksParamsStatus. +// Defines values for HomeworkCreateRequestSchema0SubmissionStartAt1. const ( - Active ListAdminHomeworksParamsStatus = "active" - All ListAdminHomeworksParamsStatus = "all" - Deleted ListAdminHomeworksParamsStatus = "deleted" + HomeworkCreateRequestSchema0SubmissionStartAt1LessThannil HomeworkCreateRequestSchema0SubmissionStartAt1 = "" ) -// Valid indicates whether the value is a known member of the ListAdminHomeworksParamsStatus enum. -func (e ListAdminHomeworksParamsStatus) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkCreateRequestSchema0SubmissionStartAt1 enum. +func (e HomeworkCreateRequestSchema0SubmissionStartAt1) Valid() bool { switch e { - case Active: - return true - case All: - return true - case Deleted: + case HomeworkCreateRequestSchema0SubmissionStartAt1LessThannil: return true default: return false } } -// Defines values for ListCommentsParamsTargetType. +// Defines values for HomeworkCreateRequestSchema1PublishedAt1. const ( - ListCommentsParamsTargetTypeCourse ListCommentsParamsTargetType = "course" - ListCommentsParamsTargetTypeHomework ListCommentsParamsTargetType = "homework" - ListCommentsParamsTargetTypeSection ListCommentsParamsTargetType = "section" - ListCommentsParamsTargetTypeSectionTeacher ListCommentsParamsTargetType = "section-teacher" - ListCommentsParamsTargetTypeTeacher ListCommentsParamsTargetType = "teacher" + HomeworkCreateRequestSchema1PublishedAt1LessThannil HomeworkCreateRequestSchema1PublishedAt1 = "" ) -// Valid indicates whether the value is a known member of the ListCommentsParamsTargetType enum. -func (e ListCommentsParamsTargetType) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkCreateRequestSchema1PublishedAt1 enum. +func (e HomeworkCreateRequestSchema1PublishedAt1) Valid() bool { switch e { - case ListCommentsParamsTargetTypeCourse: - return true - case ListCommentsParamsTargetTypeHomework: - return true - case ListCommentsParamsTargetTypeSection: - return true - case ListCommentsParamsTargetTypeSectionTeacher: - return true - case ListCommentsParamsTargetTypeTeacher: + case HomeworkCreateRequestSchema1PublishedAt1LessThannil: return true default: return false } } -// Defines values for CreateCommentParamsTargetType. +// Defines values for HomeworkCreateRequestSchema1SubmissionDueAt1. const ( - CreateCommentParamsTargetTypeCourse CreateCommentParamsTargetType = "course" - CreateCommentParamsTargetTypeHomework CreateCommentParamsTargetType = "homework" - CreateCommentParamsTargetTypeSection CreateCommentParamsTargetType = "section" - CreateCommentParamsTargetTypeSectionTeacher CreateCommentParamsTargetType = "section-teacher" - CreateCommentParamsTargetTypeTeacher CreateCommentParamsTargetType = "teacher" + HomeworkCreateRequestSchema1SubmissionDueAt1LessThannil HomeworkCreateRequestSchema1SubmissionDueAt1 = "" ) -// Valid indicates whether the value is a known member of the CreateCommentParamsTargetType enum. -func (e CreateCommentParamsTargetType) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkCreateRequestSchema1SubmissionDueAt1 enum. +func (e HomeworkCreateRequestSchema1SubmissionDueAt1) Valid() bool { switch e { - case CreateCommentParamsTargetTypeCourse: - return true - case CreateCommentParamsTargetTypeHomework: - return true - case CreateCommentParamsTargetTypeSection: - return true - case CreateCommentParamsTargetTypeSectionTeacher: + case HomeworkCreateRequestSchema1SubmissionDueAt1LessThannil: return true - case CreateCommentParamsTargetTypeTeacher: + default: + return false + } +} + +// Defines values for HomeworkCreateRequestSchema1SubmissionStartAt1. +const ( + HomeworkCreateRequestSchema1SubmissionStartAt1LessThannil HomeworkCreateRequestSchema1SubmissionStartAt1 = "" +) + +// Valid indicates whether the value is a known member of the HomeworkCreateRequestSchema1SubmissionStartAt1 enum. +func (e HomeworkCreateRequestSchema1SubmissionStartAt1) Valid() bool { + switch e { + case HomeworkCreateRequestSchema1SubmissionStartAt1LessThannil: return true default: return false } } -// Defines values for RemoveCommentReactionParamsType. +// Defines values for HomeworkUpdateRequestSchemaPublishedAt1. const ( - RemoveCommentReactionParamsTypeConfused RemoveCommentReactionParamsType = "confused" - RemoveCommentReactionParamsTypeDownvote RemoveCommentReactionParamsType = "downvote" - RemoveCommentReactionParamsTypeEyes RemoveCommentReactionParamsType = "eyes" - RemoveCommentReactionParamsTypeHeart RemoveCommentReactionParamsType = "heart" - RemoveCommentReactionParamsTypeHooray RemoveCommentReactionParamsType = "hooray" - RemoveCommentReactionParamsTypeLaugh RemoveCommentReactionParamsType = "laugh" - RemoveCommentReactionParamsTypeRocket RemoveCommentReactionParamsType = "rocket" - RemoveCommentReactionParamsTypeUpvote RemoveCommentReactionParamsType = "upvote" + HomeworkUpdateRequestSchemaPublishedAt1LessThannil HomeworkUpdateRequestSchemaPublishedAt1 = "" ) -// Valid indicates whether the value is a known member of the RemoveCommentReactionParamsType enum. -func (e RemoveCommentReactionParamsType) Valid() bool { +// Valid indicates whether the value is a known member of the HomeworkUpdateRequestSchemaPublishedAt1 enum. +func (e HomeworkUpdateRequestSchemaPublishedAt1) Valid() bool { switch e { - case RemoveCommentReactionParamsTypeConfused: + case HomeworkUpdateRequestSchemaPublishedAt1LessThannil: return true - case RemoveCommentReactionParamsTypeDownvote: + default: + return false + } +} + +// Defines values for HomeworkUpdateRequestSchemaSubmissionDueAt1. +const ( + HomeworkUpdateRequestSchemaSubmissionDueAt1LessThannil HomeworkUpdateRequestSchemaSubmissionDueAt1 = "" +) + +// Valid indicates whether the value is a known member of the HomeworkUpdateRequestSchemaSubmissionDueAt1 enum. +func (e HomeworkUpdateRequestSchemaSubmissionDueAt1) Valid() bool { + switch e { + case HomeworkUpdateRequestSchemaSubmissionDueAt1LessThannil: return true - case RemoveCommentReactionParamsTypeEyes: + default: + return false + } +} + +// Defines values for HomeworkUpdateRequestSchemaSubmissionStartAt1. +const ( + HomeworkUpdateRequestSchemaSubmissionStartAt1LessThannil HomeworkUpdateRequestSchemaSubmissionStartAt1 = "" +) + +// Valid indicates whether the value is a known member of the HomeworkUpdateRequestSchemaSubmissionStartAt1 enum. +func (e HomeworkUpdateRequestSchemaSubmissionStartAt1) Valid() bool { + switch e { + case HomeworkUpdateRequestSchemaSubmissionStartAt1LessThannil: return true - case RemoveCommentReactionParamsTypeHeart: + default: + return false + } +} + +// Defines values for HomeworksListResponseSchemaAuditLogsAction. +const ( + HomeworksListResponseSchemaAuditLogsActionCreated HomeworksListResponseSchemaAuditLogsAction = "created" + HomeworksListResponseSchemaAuditLogsActionDeleted HomeworksListResponseSchemaAuditLogsAction = "deleted" +) + +// Valid indicates whether the value is a known member of the HomeworksListResponseSchemaAuditLogsAction enum. +func (e HomeworksListResponseSchemaAuditLogsAction) Valid() bool { + switch e { + case HomeworksListResponseSchemaAuditLogsActionCreated: return true - case RemoveCommentReactionParamsTypeHooray: + case HomeworksListResponseSchemaAuditLogsActionDeleted: return true - case RemoveCommentReactionParamsTypeLaugh: + default: + return false + } +} + +// Defines values for LocaleUpdateRequestSchemaLocale. +const ( + LocaleUpdateRequestSchemaLocaleEnUs LocaleUpdateRequestSchemaLocale = "en-us" + LocaleUpdateRequestSchemaLocaleZhCn LocaleUpdateRequestSchemaLocale = "zh-cn" +) + +// Valid indicates whether the value is a known member of the LocaleUpdateRequestSchemaLocale enum. +func (e LocaleUpdateRequestSchemaLocale) Valid() bool { + switch e { + case LocaleUpdateRequestSchemaLocaleEnUs: return true - case RemoveCommentReactionParamsTypeRocket: + case LocaleUpdateRequestSchemaLocaleZhCn: return true - case RemoveCommentReactionParamsTypeUpvote: + default: + return false + } +} + +// Defines values for OauthTokenResponseSchemaTokenType. +const ( + Bearer OauthTokenResponseSchemaTokenType = "Bearer" +) + +// Valid indicates whether the value is a known member of the OauthTokenResponseSchemaTokenType enum. +func (e OauthTokenResponseSchemaTokenType) Valid() bool { + switch e { + case Bearer: return true default: return false } } -// Defines values for GetDescriptionParamsTargetType. +// Defines values for ReadinessResponseSchemaChecksDatabaseStatus. const ( - GetDescriptionParamsTargetTypeCourse GetDescriptionParamsTargetType = "course" - GetDescriptionParamsTargetTypeHomework GetDescriptionParamsTargetType = "homework" - GetDescriptionParamsTargetTypeSection GetDescriptionParamsTargetType = "section" - GetDescriptionParamsTargetTypeTeacher GetDescriptionParamsTargetType = "teacher" + ReadinessResponseSchemaChecksDatabaseStatusError ReadinessResponseSchemaChecksDatabaseStatus = "error" + ReadinessResponseSchemaChecksDatabaseStatusOk ReadinessResponseSchemaChecksDatabaseStatus = "ok" ) -// Valid indicates whether the value is a known member of the GetDescriptionParamsTargetType enum. -func (e GetDescriptionParamsTargetType) Valid() bool { +// Valid indicates whether the value is a known member of the ReadinessResponseSchemaChecksDatabaseStatus enum. +func (e ReadinessResponseSchemaChecksDatabaseStatus) Valid() bool { switch e { - case GetDescriptionParamsTargetTypeCourse: + case ReadinessResponseSchemaChecksDatabaseStatusError: return true - case GetDescriptionParamsTargetTypeHomework: + case ReadinessResponseSchemaChecksDatabaseStatusOk: return true - case GetDescriptionParamsTargetTypeSection: + default: + return false + } +} + +// Defines values for ReadinessResponseSchemaStatus. +const ( + ReadinessResponseSchemaStatusDegraded ReadinessResponseSchemaStatus = "degraded" + ReadinessResponseSchemaStatusOk ReadinessResponseSchemaStatus = "ok" +) + +// Valid indicates whether the value is a known member of the ReadinessResponseSchemaStatus enum. +func (e ReadinessResponseSchemaStatus) Valid() bool { + switch e { + case ReadinessResponseSchemaStatusDegraded: return true - case GetDescriptionParamsTargetTypeTeacher: + case ReadinessResponseSchemaStatusOk: return true default: return false } } -// Defines values for UpsertDescriptionParamsTargetType. +// Defines values for SubscribedHomeworksResponseSchemaAuditLogsAction. const ( - UpsertDescriptionParamsTargetTypeCourse UpsertDescriptionParamsTargetType = "course" - UpsertDescriptionParamsTargetTypeHomework UpsertDescriptionParamsTargetType = "homework" - UpsertDescriptionParamsTargetTypeSection UpsertDescriptionParamsTargetType = "section" - UpsertDescriptionParamsTargetTypeTeacher UpsertDescriptionParamsTargetType = "teacher" + SubscribedHomeworksResponseSchemaAuditLogsActionCreated SubscribedHomeworksResponseSchemaAuditLogsAction = "created" + SubscribedHomeworksResponseSchemaAuditLogsActionDeleted SubscribedHomeworksResponseSchemaAuditLogsAction = "deleted" ) -// Valid indicates whether the value is a known member of the UpsertDescriptionParamsTargetType enum. -func (e UpsertDescriptionParamsTargetType) Valid() bool { +// Valid indicates whether the value is a known member of the SubscribedHomeworksResponseSchemaAuditLogsAction enum. +func (e SubscribedHomeworksResponseSchemaAuditLogsAction) Valid() bool { switch e { - case UpsertDescriptionParamsTargetTypeCourse: - return true - case UpsertDescriptionParamsTargetTypeHomework: + case SubscribedHomeworksResponseSchemaAuditLogsActionCreated: return true - case UpsertDescriptionParamsTargetTypeSection: + case SubscribedHomeworksResponseSchemaAuditLogsActionDeleted: return true - case UpsertDescriptionParamsTargetTypeTeacher: + default: + return false + } +} + +// Defines values for TodoBatchDeleteResponseSchemaResults0Success. +const ( + TodoBatchDeleteResponseSchemaResults0SuccessTrue TodoBatchDeleteResponseSchemaResults0Success = true +) + +// Valid indicates whether the value is a known member of the TodoBatchDeleteResponseSchemaResults0Success enum. +func (e TodoBatchDeleteResponseSchemaResults0Success) Valid() bool { + switch e { + case TodoBatchDeleteResponseSchemaResults0SuccessTrue: return true default: return false } } -// Defines values for ListHomeworksParamsIncludeDeleted. +// Defines values for TodoBatchDeleteResponseSchemaResults1ErrorCode. const ( - ListHomeworksParamsIncludeDeletedFalse ListHomeworksParamsIncludeDeleted = "false" - ListHomeworksParamsIncludeDeletedTrue ListHomeworksParamsIncludeDeleted = "true" + TodoBatchDeleteResponseSchemaResults1ErrorCodeForbidden TodoBatchDeleteResponseSchemaResults1ErrorCode = "forbidden" + TodoBatchDeleteResponseSchemaResults1ErrorCodeNotFound TodoBatchDeleteResponseSchemaResults1ErrorCode = "not_found" ) -// Valid indicates whether the value is a known member of the ListHomeworksParamsIncludeDeleted enum. -func (e ListHomeworksParamsIncludeDeleted) Valid() bool { +// Valid indicates whether the value is a known member of the TodoBatchDeleteResponseSchemaResults1ErrorCode enum. +func (e TodoBatchDeleteResponseSchemaResults1ErrorCode) Valid() bool { switch e { - case ListHomeworksParamsIncludeDeletedFalse: + case TodoBatchDeleteResponseSchemaResults1ErrorCodeForbidden: return true - case ListHomeworksParamsIncludeDeletedTrue: + case TodoBatchDeleteResponseSchemaResults1ErrorCodeNotFound: return true default: return false } } -// Defines values for CreateHomeworkParamsIncludeDeleted. +// Defines values for TodoBatchDeleteResponseSchemaResults1Success. const ( - CreateHomeworkParamsIncludeDeletedFalse CreateHomeworkParamsIncludeDeleted = "false" - CreateHomeworkParamsIncludeDeletedTrue CreateHomeworkParamsIncludeDeleted = "true" + TodoBatchDeleteResponseSchemaResults1SuccessFalse TodoBatchDeleteResponseSchemaResults1Success = false ) -// Valid indicates whether the value is a known member of the CreateHomeworkParamsIncludeDeleted enum. -func (e CreateHomeworkParamsIncludeDeleted) Valid() bool { +// Valid indicates whether the value is a known member of the TodoBatchDeleteResponseSchemaResults1Success enum. +func (e TodoBatchDeleteResponseSchemaResults1Success) Valid() bool { switch e { - case CreateHomeworkParamsIncludeDeletedFalse: + case TodoBatchDeleteResponseSchemaResults1SuccessFalse: return true - case CreateHomeworkParamsIncludeDeletedTrue: + default: + return false + } +} + +// Defines values for TodoCompletionBatchResponseSchemaResults0Success. +const ( + TodoCompletionBatchResponseSchemaResults0SuccessTrue TodoCompletionBatchResponseSchemaResults0Success = true +) + +// Valid indicates whether the value is a known member of the TodoCompletionBatchResponseSchemaResults0Success enum. +func (e TodoCompletionBatchResponseSchemaResults0Success) Valid() bool { + switch e { + case TodoCompletionBatchResponseSchemaResults0SuccessTrue: return true default: return false } } -// Defines values for ListTodosParamsCompleted. +// Defines values for TodoCompletionBatchResponseSchemaResults0TodoPriority. const ( - ListTodosParamsCompletedFalse ListTodosParamsCompleted = "false" - ListTodosParamsCompletedTrue ListTodosParamsCompleted = "true" + TodoCompletionBatchResponseSchemaResults0TodoPriorityHigh TodoCompletionBatchResponseSchemaResults0TodoPriority = "high" + TodoCompletionBatchResponseSchemaResults0TodoPriorityLow TodoCompletionBatchResponseSchemaResults0TodoPriority = "low" + TodoCompletionBatchResponseSchemaResults0TodoPriorityMedium TodoCompletionBatchResponseSchemaResults0TodoPriority = "medium" ) -// Valid indicates whether the value is a known member of the ListTodosParamsCompleted enum. -func (e ListTodosParamsCompleted) Valid() bool { +// Valid indicates whether the value is a known member of the TodoCompletionBatchResponseSchemaResults0TodoPriority enum. +func (e TodoCompletionBatchResponseSchemaResults0TodoPriority) Valid() bool { switch e { - case ListTodosParamsCompletedFalse: + case TodoCompletionBatchResponseSchemaResults0TodoPriorityHigh: + return true + case TodoCompletionBatchResponseSchemaResults0TodoPriorityLow: return true - case ListTodosParamsCompletedTrue: + case TodoCompletionBatchResponseSchemaResults0TodoPriorityMedium: return true default: return false } } -// Defines values for ListTodosParamsPriority. +// Defines values for TodoCompletionBatchResponseSchemaResults1ErrorCode. const ( - ListTodosParamsPriorityHigh ListTodosParamsPriority = "high" - ListTodosParamsPriorityLow ListTodosParamsPriority = "low" - ListTodosParamsPriorityMedium ListTodosParamsPriority = "medium" + Forbidden TodoCompletionBatchResponseSchemaResults1ErrorCode = "forbidden" + NotFound TodoCompletionBatchResponseSchemaResults1ErrorCode = "not_found" ) -// Valid indicates whether the value is a known member of the ListTodosParamsPriority enum. -func (e ListTodosParamsPriority) Valid() bool { +// Valid indicates whether the value is a known member of the TodoCompletionBatchResponseSchemaResults1ErrorCode enum. +func (e TodoCompletionBatchResponseSchemaResults1ErrorCode) Valid() bool { switch e { - case ListTodosParamsPriorityHigh: - return true - case ListTodosParamsPriorityLow: + case Forbidden: return true - case ListTodosParamsPriorityMedium: + case NotFound: return true default: return false } } -// Defines values for CreateTodoParamsCompleted. +// Defines values for TodoCompletionBatchResponseSchemaResults1Success. const ( - CreateTodoParamsCompletedFalse CreateTodoParamsCompleted = "false" - CreateTodoParamsCompletedTrue CreateTodoParamsCompleted = "true" + TodoCompletionBatchResponseSchemaResults1SuccessFalse TodoCompletionBatchResponseSchemaResults1Success = false ) -// Valid indicates whether the value is a known member of the CreateTodoParamsCompleted enum. -func (e CreateTodoParamsCompleted) Valid() bool { +// Valid indicates whether the value is a known member of the TodoCompletionBatchResponseSchemaResults1Success enum. +func (e TodoCompletionBatchResponseSchemaResults1Success) Valid() bool { switch e { - case CreateTodoParamsCompletedFalse: + case TodoCompletionBatchResponseSchemaResults1SuccessFalse: return true - case CreateTodoParamsCompletedTrue: + default: + return false + } +} + +// Defines values for TodoCreateRequestSchemaDueAt1. +const ( + TodoCreateRequestSchemaDueAt1LessThannil TodoCreateRequestSchemaDueAt1 = "" +) + +// Valid indicates whether the value is a known member of the TodoCreateRequestSchemaDueAt1 enum. +func (e TodoCreateRequestSchemaDueAt1) Valid() bool { + switch e { + case TodoCreateRequestSchemaDueAt1LessThannil: return true default: return false } } -// Defines values for CreateTodoParamsPriority. +// Defines values for TodoCreateRequestSchemaPriority. const ( - High CreateTodoParamsPriority = "high" - Low CreateTodoParamsPriority = "low" - Medium CreateTodoParamsPriority = "medium" + TodoCreateRequestSchemaPriorityHigh TodoCreateRequestSchemaPriority = "high" + TodoCreateRequestSchemaPriorityLow TodoCreateRequestSchemaPriority = "low" + TodoCreateRequestSchemaPriorityMedium TodoCreateRequestSchemaPriority = "medium" ) -// Valid indicates whether the value is a known member of the CreateTodoParamsPriority enum. -func (e CreateTodoParamsPriority) Valid() bool { +// Valid indicates whether the value is a known member of the TodoCreateRequestSchemaPriority enum. +func (e TodoCreateRequestSchemaPriority) Valid() bool { switch e { - case High: + case TodoCreateRequestSchemaPriorityHigh: return true - case Low: + case TodoCreateRequestSchemaPriorityLow: return true - case Medium: + case TodoCreateRequestSchemaPriorityMedium: return true default: return false } } -// AdminCommentsResponseSchema defines model for adminCommentsResponseSchema. -type AdminCommentsResponseSchema struct { - Comments []struct { - AuthorName *string `json:"authorName"` - Body string `json:"body"` - Course *struct { - Code string `json:"code"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - } `json:"course"` - CourseId *int `json:"courseId"` - CreatedAt time.Time `json:"createdAt"` - DeletedAt *time.Time `json:"deletedAt"` - Homework *struct { - Id string `json:"id"` - Section struct { - Code string `json:"code"` - } `json:"section"` - Title string `json:"title"` - } `json:"homework"` - HomeworkId *string `json:"homeworkId"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - ModeratedAt *time.Time `json:"moderatedAt"` - ModeratedById *string `json:"moderatedById"` - ModerationNote *string `json:"moderationNote"` - ParentId *string `json:"parentId"` - RootId *string `json:"rootId"` - Section *struct { - Code string `json:"code"` - Course struct { - Code string `json:"code"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - } `json:"course"` - JwId int `json:"jwId"` - } `json:"section"` - SectionId *int `json:"sectionId"` - SectionTeacher *struct { - Section struct { - Code string `json:"code"` - Course struct { - Code string `json:"code"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - } `json:"course"` - JwId int `json:"jwId"` - } `json:"section"` - Teacher struct { - NameCn string `json:"nameCn"` - } `json:"teacher"` - } `json:"sectionTeacher"` - SectionTeacherId *int `json:"sectionTeacherId"` - Status AdminCommentsResponseSchemaCommentsStatus `json:"status"` - Teacher *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - } `json:"teacher"` - TeacherId *int `json:"teacherId"` - UpdatedAt time.Time `json:"updatedAt"` - User *struct { - Name *string `json:"name"` - } `json:"user"` - UserId *string `json:"userId"` - Visibility AdminCommentsResponseSchemaCommentsVisibility `json:"visibility"` - } `json:"comments"` -} +// Defines values for TodoUpdateRequestSchemaDueAt1. +const ( + LessThannil TodoUpdateRequestSchemaDueAt1 = "" +) -// AdminCommentsResponseSchemaCommentsStatus defines model for AdminCommentsResponseSchema.Comments.Status. -type AdminCommentsResponseSchemaCommentsStatus string +// Valid indicates whether the value is a known member of the TodoUpdateRequestSchemaDueAt1 enum. +func (e TodoUpdateRequestSchemaDueAt1) Valid() bool { + switch e { + case LessThannil: + return true + default: + return false + } +} -// AdminCommentsResponseSchemaCommentsVisibility defines model for AdminCommentsResponseSchema.Comments.Visibility. -type AdminCommentsResponseSchemaCommentsVisibility string +// Defines values for TodoUpdateRequestSchemaPriority. +const ( + TodoUpdateRequestSchemaPriorityHigh TodoUpdateRequestSchemaPriority = "high" + TodoUpdateRequestSchemaPriorityLow TodoUpdateRequestSchemaPriority = "low" + TodoUpdateRequestSchemaPriorityMedium TodoUpdateRequestSchemaPriority = "medium" +) -// AdminCreateSuspensionRequestSchema defines model for adminCreateSuspensionRequestSchema. -type AdminCreateSuspensionRequestSchema struct { - ExpiresAt *string `json:"expiresAt,omitempty"` - Note *string `json:"note,omitempty"` - Reason *string `json:"reason,omitempty"` - UserId string `json:"userId"` +// Valid indicates whether the value is a known member of the TodoUpdateRequestSchemaPriority enum. +func (e TodoUpdateRequestSchemaPriority) Valid() bool { + switch e { + case TodoUpdateRequestSchemaPriorityHigh: + return true + case TodoUpdateRequestSchemaPriorityLow: + return true + case TodoUpdateRequestSchemaPriorityMedium: + return true + default: + return false + } } -// AdminDescriptionsResponseSchema defines model for adminDescriptionsResponseSchema. -type AdminDescriptionsResponseSchema struct { - Descriptions []struct { - Content string `json:"content"` - Course *struct { - Code string `json:"code"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - } `json:"course"` - CourseId *int `json:"courseId"` - CreatedAt time.Time `json:"createdAt"` - Homework *struct { - Id string `json:"id"` - Section *struct { - Code *string `json:"code"` - Course *struct { - Code string `json:"code"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - } `json:"course"` - JwId *int `json:"jwId"` - } `json:"section"` - Title string `json:"title"` - } `json:"homework"` - HomeworkId *string `json:"homeworkId"` - Id string `json:"id"` - LastEditedAt *time.Time `json:"lastEditedAt"` - LastEditedBy *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"lastEditedBy"` - LastEditedById *string `json:"lastEditedById"` - Section *struct { - Code *string `json:"code"` - Course *struct { - Code string `json:"code"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - } `json:"course"` - JwId *int `json:"jwId"` - } `json:"section"` - SectionId *int `json:"sectionId"` - Teacher *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - } `json:"teacher"` - TeacherId *int `json:"teacherId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"descriptions"` -} +// Defines values for TodoUpdateResponseSchemaTodoPriority. +const ( + TodoUpdateResponseSchemaTodoPriorityHigh TodoUpdateResponseSchemaTodoPriority = "high" + TodoUpdateResponseSchemaTodoPriorityLow TodoUpdateResponseSchemaTodoPriority = "low" + TodoUpdateResponseSchemaTodoPriorityMedium TodoUpdateResponseSchemaTodoPriority = "medium" +) -// AdminHomeworksResponseSchema defines model for adminHomeworksResponseSchema. -type AdminHomeworksResponseSchema struct { - Homeworks []struct { - CreatedAt time.Time `json:"createdAt"` - CreatedBy *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"createdBy"` - DeletedAt *time.Time `json:"deletedAt"` - DeletedBy *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"deletedBy"` - Id string `json:"id"` - Section *struct { - Code *string `json:"code"` - Course struct { - Code string `json:"code"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - } `json:"course"` - Id int `json:"id"` - JwId *int `json:"jwId"` - } `json:"section"` - SubmissionDueAt *time.Time `json:"submissionDueAt"` - Title string `json:"title"` - UpdatedAt time.Time `json:"updatedAt"` - UpdatedBy *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"updatedBy"` - } `json:"homeworks"` +// Valid indicates whether the value is a known member of the TodoUpdateResponseSchemaTodoPriority enum. +func (e TodoUpdateResponseSchemaTodoPriority) Valid() bool { + switch e { + case TodoUpdateResponseSchemaTodoPriorityHigh: + return true + case TodoUpdateResponseSchemaTodoPriorityLow: + return true + case TodoUpdateResponseSchemaTodoPriorityMedium: + return true + default: + return false + } } -// AdminModerateCommentRequestSchema defines model for adminModerateCommentRequestSchema. -type AdminModerateCommentRequestSchema struct { - ModerationNote *string `json:"moderationNote,omitempty"` - Status AdminModerateCommentRequestSchemaStatus `json:"status"` +// Defines values for TodosListResponseSchemaTodosPriority. +const ( + TodosListResponseSchemaTodosPriorityHigh TodosListResponseSchemaTodosPriority = "high" + TodosListResponseSchemaTodosPriorityLow TodosListResponseSchemaTodosPriority = "low" + TodosListResponseSchemaTodosPriorityMedium TodosListResponseSchemaTodosPriority = "medium" +) + +// Valid indicates whether the value is a known member of the TodosListResponseSchemaTodosPriority enum. +func (e TodosListResponseSchemaTodosPriority) Valid() bool { + switch e { + case TodosListResponseSchemaTodosPriorityHigh: + return true + case TodosListResponseSchemaTodosPriorityLow: + return true + case TodosListResponseSchemaTodosPriorityMedium: + return true + default: + return false + } } -// AdminModerateCommentRequestSchemaStatus defines model for AdminModerateCommentRequestSchema.Status. -type AdminModerateCommentRequestSchemaStatus string +// Defines values for ListAdminCommentsParamsStatus. +const ( + ListAdminCommentsParamsStatusActive ListAdminCommentsParamsStatus = "active" + ListAdminCommentsParamsStatusAll ListAdminCommentsParamsStatus = "all" + ListAdminCommentsParamsStatusDeleted ListAdminCommentsParamsStatus = "deleted" + ListAdminCommentsParamsStatusSoftbanned ListAdminCommentsParamsStatus = "softbanned" + ListAdminCommentsParamsStatusSuspended ListAdminCommentsParamsStatus = "suspended" +) -// AdminModeratedCommentResponseSchema defines model for adminModeratedCommentResponseSchema. -type AdminModeratedCommentResponseSchema struct { - Comment struct { - AuthorName *string `json:"authorName"` - Body string `json:"body"` - CourseId *int `json:"courseId"` - CreatedAt time.Time `json:"createdAt"` - DeletedAt *time.Time `json:"deletedAt"` - HomeworkId *string `json:"homeworkId"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - ModeratedAt *time.Time `json:"moderatedAt"` - ModeratedById *string `json:"moderatedById"` - ModerationNote *string `json:"moderationNote"` - ParentId *string `json:"parentId"` - RootId *string `json:"rootId"` - SectionId *int `json:"sectionId"` - SectionTeacherId *int `json:"sectionTeacherId"` - Status AdminModeratedCommentResponseSchemaCommentStatus `json:"status"` - TeacherId *int `json:"teacherId"` - UpdatedAt time.Time `json:"updatedAt"` - UserId *string `json:"userId"` - Visibility AdminModeratedCommentResponseSchemaCommentVisibility `json:"visibility"` - } `json:"comment"` +// Valid indicates whether the value is a known member of the ListAdminCommentsParamsStatus enum. +func (e ListAdminCommentsParamsStatus) Valid() bool { + switch e { + case ListAdminCommentsParamsStatusActive: + return true + case ListAdminCommentsParamsStatusAll: + return true + case ListAdminCommentsParamsStatusDeleted: + return true + case ListAdminCommentsParamsStatusSoftbanned: + return true + case ListAdminCommentsParamsStatusSuspended: + return true + default: + return false + } } -// AdminModeratedCommentResponseSchemaCommentStatus defines model for AdminModeratedCommentResponseSchema.Comment.Status. -type AdminModeratedCommentResponseSchemaCommentStatus string - -// AdminModeratedCommentResponseSchemaCommentVisibility defines model for AdminModeratedCommentResponseSchema.Comment.Visibility. -type AdminModeratedCommentResponseSchemaCommentVisibility string +// Defines values for ListAdminDescriptionsParamsTargetType. +const ( + ListAdminDescriptionsParamsTargetTypeAll ListAdminDescriptionsParamsTargetType = "all" + ListAdminDescriptionsParamsTargetTypeCourse ListAdminDescriptionsParamsTargetType = "course" + ListAdminDescriptionsParamsTargetTypeHomework ListAdminDescriptionsParamsTargetType = "homework" + ListAdminDescriptionsParamsTargetTypeSection ListAdminDescriptionsParamsTargetType = "section" + ListAdminDescriptionsParamsTargetTypeTeacher ListAdminDescriptionsParamsTargetType = "teacher" +) -// AdminSuspensionResponseSchema defines model for adminSuspensionResponseSchema. -type AdminSuspensionResponseSchema struct { - Suspension struct { - CreatedAt time.Time `json:"createdAt"` - CreatedById string `json:"createdById"` - ExpiresAt *time.Time `json:"expiresAt"` - Id string `json:"id"` - LiftedAt *time.Time `json:"liftedAt"` - LiftedById *string `json:"liftedById"` - Note *string `json:"note"` - Reason *string `json:"reason"` - User *struct { - Id string `json:"id"` - Name *string `json:"name"` - } `json:"user,omitempty"` - UserId string `json:"userId"` - } `json:"suspension"` +// Valid indicates whether the value is a known member of the ListAdminDescriptionsParamsTargetType enum. +func (e ListAdminDescriptionsParamsTargetType) Valid() bool { + switch e { + case ListAdminDescriptionsParamsTargetTypeAll: + return true + case ListAdminDescriptionsParamsTargetTypeCourse: + return true + case ListAdminDescriptionsParamsTargetTypeHomework: + return true + case ListAdminDescriptionsParamsTargetTypeSection: + return true + case ListAdminDescriptionsParamsTargetTypeTeacher: + return true + default: + return false + } } -// AdminSuspensionsResponseSchema defines model for adminSuspensionsResponseSchema. -type AdminSuspensionsResponseSchema struct { - Suspensions []struct { - CreatedAt time.Time `json:"createdAt"` - CreatedById string `json:"createdById"` - ExpiresAt *time.Time `json:"expiresAt"` - Id string `json:"id"` - LiftedAt *time.Time `json:"liftedAt"` - LiftedById *string `json:"liftedById"` - Note *string `json:"note"` - Reason *string `json:"reason"` - User *struct { - Id string `json:"id"` - Name *string `json:"name"` - } `json:"user,omitempty"` - UserId string `json:"userId"` - } `json:"suspensions"` -} +// Defines values for ListAdminDescriptionsParamsHasContent. +const ( + ListAdminDescriptionsParamsHasContentAll ListAdminDescriptionsParamsHasContent = "all" + ListAdminDescriptionsParamsHasContentEmpty ListAdminDescriptionsParamsHasContent = "empty" + ListAdminDescriptionsParamsHasContentWithContent ListAdminDescriptionsParamsHasContent = "withContent" +) -// AdminUpdateUserRequestSchema defines model for adminUpdateUserRequestSchema. -type AdminUpdateUserRequestSchema struct { - IsAdmin *bool `json:"isAdmin,omitempty"` - Name *string `json:"name,omitempty"` - Username *string `json:"username,omitempty"` +// Valid indicates whether the value is a known member of the ListAdminDescriptionsParamsHasContent enum. +func (e ListAdminDescriptionsParamsHasContent) Valid() bool { + switch e { + case ListAdminDescriptionsParamsHasContentAll: + return true + case ListAdminDescriptionsParamsHasContentEmpty: + return true + case ListAdminDescriptionsParamsHasContentWithContent: + return true + default: + return false + } } -// AdminUserResponseSchema defines model for adminUserResponseSchema. -type AdminUserResponseSchema struct { - User struct { - CreatedAt time.Time `json:"createdAt"` - Email *string `json:"email"` - Id string `json:"id"` - IsAdmin bool `json:"isAdmin"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"user"` -} +// Defines values for ListAdminHomeworksParamsStatus. +const ( + Active ListAdminHomeworksParamsStatus = "active" + All ListAdminHomeworksParamsStatus = "all" + Deleted ListAdminHomeworksParamsStatus = "deleted" +) -// AdminUsersResponseSchema defines model for adminUsersResponseSchema. -type AdminUsersResponseSchema struct { - Data []struct { - CreatedAt time.Time `json:"createdAt"` - Email *string `json:"email"` - Id string `json:"id"` - IsAdmin bool `json:"isAdmin"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"data"` - Pagination struct { - Page int `json:"page"` - PageSize int `json:"pageSize"` - Total int `json:"total"` - TotalPages int `json:"totalPages"` - } `json:"pagination"` +// Valid indicates whether the value is a known member of the ListAdminHomeworksParamsStatus enum. +func (e ListAdminHomeworksParamsStatus) Valid() bool { + switch e { + case Active: + return true + case All: + return true + case Deleted: + return true + default: + return false + } } -// BusPreferenceRequestSchema defines model for busPreferenceRequestSchema. -type BusPreferenceRequestSchema struct { - PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` - PreferredOriginCampusId *int `json:"preferredOriginCampusId"` - ShowDepartedTrips bool `json:"showDepartedTrips"` -} +// Defines values for GetApiBusNextParamsDayType. +const ( + Auto GetApiBusNextParamsDayType = "auto" + Weekday GetApiBusNextParamsDayType = "weekday" + Weekend GetApiBusNextParamsDayType = "weekend" +) -// BusPreferenceResponseSchema defines model for busPreferenceResponseSchema. -type BusPreferenceResponseSchema struct { - Preference struct { - PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` - PreferredOriginCampusId *int `json:"preferredOriginCampusId"` - ShowDepartedTrips bool `json:"showDepartedTrips"` - } `json:"preference"` +// Valid indicates whether the value is a known member of the GetApiBusNextParamsDayType enum. +func (e GetApiBusNextParamsDayType) Valid() bool { + switch e { + case Auto: + return true + case Weekday: + return true + case Weekend: + return true + default: + return false + } } -// BusQueryResponseSchema defines model for busQueryResponseSchema. -type BusQueryResponseSchema struct { - AvailableVersions []struct { - EffectiveFrom *time.Time `json:"effectiveFrom"` - EffectiveUntil *time.Time `json:"effectiveUntil"` - Id int `json:"id"` - ImportedAt time.Time `json:"importedAt"` - Key string `json:"key"` - Notice *struct { - Message *string `json:"message"` - Url *string `json:"url"` - } `json:"notice"` - Title string `json:"title"` - } `json:"availableVersions"` - Campuses []struct { - Id int `json:"id"` - Latitude float32 `json:"latitude"` - Longitude float32 `json:"longitude"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - } `json:"campuses"` - FetchedAt time.Time `json:"fetchedAt"` - Locale BusQueryResponseSchemaLocale `json:"locale"` - Notice *struct { - Message *string `json:"message"` - Url *string `json:"url"` - } `json:"notice"` - Preferences *struct { - PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` - PreferredOriginCampusId *int `json:"preferredOriginCampusId"` - ShowDepartedTrips bool `json:"showDepartedTrips"` - } `json:"preferences"` - Routes []struct { - DescriptionPrimary string `json:"descriptionPrimary"` - DescriptionSecondary *string `json:"descriptionSecondary"` - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - Stops []struct { - Campus struct { - Id int `json:"id"` - Latitude float32 `json:"latitude"` - Longitude float32 `json:"longitude"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - } `json:"campus"` - StopOrder int `json:"stopOrder"` - } `json:"stops"` - } `json:"routes"` - Trips []struct { - ArrivalMinutes *int `json:"arrivalMinutes"` - ArrivalTime *string `json:"arrivalTime"` - DayType BusQueryResponseSchemaTripsDayType `json:"dayType"` - DepartureMinutes *int `json:"departureMinutes"` - DepartureTime *string `json:"departureTime"` - Id int `json:"id"` - Position int `json:"position"` - RouteId int `json:"routeId"` - StopTimes []struct { - CampusId int `json:"campusId"` - CampusName string `json:"campusName"` - IsPassThrough bool `json:"isPassThrough"` - MinutesSinceMidnight *int `json:"minutesSinceMidnight"` - StopOrder int `json:"stopOrder"` - Time *string `json:"time"` - } `json:"stopTimes"` - } `json:"trips"` - Version *struct { - EffectiveFrom *time.Time `json:"effectiveFrom"` - EffectiveUntil *time.Time `json:"effectiveUntil"` - Id int `json:"id"` - ImportedAt time.Time `json:"importedAt"` - Key string `json:"key"` - Notice *struct { - Message *string `json:"message"` - Url *string `json:"url"` - } `json:"notice"` - Title string `json:"title"` - } `json:"version"` -} +// Defines values for GetApiBusNextParamsIncludeDeparted. +const ( + GetApiBusNextParamsIncludeDepartedFalse GetApiBusNextParamsIncludeDeparted = "false" + GetApiBusNextParamsIncludeDepartedTrue GetApiBusNextParamsIncludeDeparted = "true" +) -// BusQueryResponseSchemaLocale defines model for BusQueryResponseSchema.Locale. -type BusQueryResponseSchemaLocale string +// Valid indicates whether the value is a known member of the GetApiBusNextParamsIncludeDeparted enum. +func (e GetApiBusNextParamsIncludeDeparted) Valid() bool { + switch e { + case GetApiBusNextParamsIncludeDepartedFalse: + return true + case GetApiBusNextParamsIncludeDepartedTrue: + return true + default: + return false + } +} -// BusQueryResponseSchemaTripsDayType defines model for BusQueryResponseSchema.Trips.DayType. -type BusQueryResponseSchemaTripsDayType string +// Defines values for GetApiBusNextParamsLocale. +const ( + GetApiBusNextParamsLocaleEnUs GetApiBusNextParamsLocale = "en-us" + GetApiBusNextParamsLocaleZhCn GetApiBusNextParamsLocale = "zh-cn" +) -// CalendarSubscriptionCreateRequestSchema defines model for calendarSubscriptionCreateRequestSchema. -type CalendarSubscriptionCreateRequestSchema struct { - SectionIds *[]int `json:"sectionIds,omitempty"` +// Valid indicates whether the value is a known member of the GetApiBusNextParamsLocale enum. +func (e GetApiBusNextParamsLocale) Valid() bool { + switch e { + case GetApiBusNextParamsLocaleEnUs: + return true + case GetApiBusNextParamsLocaleZhCn: + return true + default: + return false + } } -// CalendarSubscriptionCreateResponseSchema defines model for calendarSubscriptionCreateResponseSchema. -type CalendarSubscriptionCreateResponseSchema struct { - Subscription *struct { - CalendarPath string `json:"calendarPath"` - CalendarUrl string `json:"calendarUrl"` - Note string `json:"note"` - Sections []struct { - ActualPeriods *int `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - Campus *struct { - Code *string `json:"code"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { - Category *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"category"` - CategoryId *int `json:"categoryId"` - ClassType *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classType"` - ClassTypeId *int `json:"classTypeId"` - Classify *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classify"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevel *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"educationLevel"` - EducationLevelId *int `json:"educationLevelId"` - Gradation *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"gradation"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - Type *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"type"` - TypeId *int `json:"typeId"` - } `json:"course"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartment *struct { - Code string `json:"code"` - Id int `json:"id"` - IsCollege *bool `json:"isCollege"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"openDepartment"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguageId *int `json:"teachLanguageId"` - Teachers []struct { - Address *string `json:"address"` - Age *int `json:"age"` - Code *string `json:"code"` - DepartmentId *int `json:"departmentId"` - Email *string `json:"email"` - Id int `json:"id"` - Mobile *string `json:"mobile"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - PersonId *int `json:"personId"` - Postcode *string `json:"postcode"` - Qq *string `json:"qq"` - TeacherId *int `json:"teacherId"` - TeacherTitleId *int `json:"teacherTitleId"` - Telephone *string `json:"telephone"` - Wechat *string `json:"wechat"` - } `json:"teachers"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` - } `json:"sections"` - UserId string `json:"userId"` - } `json:"subscription"` -} +// Defines values for GetApiBusRoutesParamsLocale. +const ( + GetApiBusRoutesParamsLocaleEnUs GetApiBusRoutesParamsLocale = "en-us" + GetApiBusRoutesParamsLocaleZhCn GetApiBusRoutesParamsLocale = "zh-cn" +) -// CommentCreateRequestSchema defines model for commentCreateRequestSchema. -type CommentCreateRequestSchema struct { - AttachmentIds *[]string `json:"attachmentIds,omitempty"` - Body string `json:"body"` - IsAnonymous *bool `json:"isAnonymous,omitempty"` - ParentId *string `json:"parentId,omitempty"` - SectionId *string `json:"sectionId,omitempty"` - TargetId *string `json:"targetId,omitempty"` - TargetType CommentCreateRequestSchemaTargetType `json:"targetType"` - TeacherId *string `json:"teacherId,omitempty"` - Visibility *CommentCreateRequestSchemaVisibility `json:"visibility,omitempty"` +// Valid indicates whether the value is a known member of the GetApiBusRoutesParamsLocale enum. +func (e GetApiBusRoutesParamsLocale) Valid() bool { + switch e { + case GetApiBusRoutesParamsLocaleEnUs: + return true + case GetApiBusRoutesParamsLocaleZhCn: + return true + default: + return false + } } -// CommentCreateRequestSchemaTargetType defines model for CommentCreateRequestSchema.TargetType. -type CommentCreateRequestSchemaTargetType string - -// CommentCreateRequestSchemaVisibility defines model for CommentCreateRequestSchema.Visibility. -type CommentCreateRequestSchemaVisibility string +// Defines values for ListCommentsParamsTargetType. +const ( + ListCommentsParamsTargetTypeCourse ListCommentsParamsTargetType = "course" + ListCommentsParamsTargetTypeHomework ListCommentsParamsTargetType = "homework" + ListCommentsParamsTargetTypeSection ListCommentsParamsTargetType = "section" + ListCommentsParamsTargetTypeSectionTeacher ListCommentsParamsTargetType = "section-teacher" + ListCommentsParamsTargetTypeTeacher ListCommentsParamsTargetType = "teacher" +) -// CommentReactionRequestSchema defines model for commentReactionRequestSchema. -type CommentReactionRequestSchema struct { - Type CommentReactionRequestSchemaType `json:"type"` +// Valid indicates whether the value is a known member of the ListCommentsParamsTargetType enum. +func (e ListCommentsParamsTargetType) Valid() bool { + switch e { + case ListCommentsParamsTargetTypeCourse: + return true + case ListCommentsParamsTargetTypeHomework: + return true + case ListCommentsParamsTargetTypeSection: + return true + case ListCommentsParamsTargetTypeSectionTeacher: + return true + case ListCommentsParamsTargetTypeTeacher: + return true + default: + return false + } } -// CommentReactionRequestSchemaType defines model for CommentReactionRequestSchema.Type. -type CommentReactionRequestSchemaType string - -// CommentThreadResponseSchema defines model for commentThreadResponseSchema. -type CommentThreadResponseSchema struct { - FocusId string `json:"focusId"` - HiddenCount int `json:"hiddenCount"` - Target struct { - CourseId *int `json:"courseId"` - CourseJwId *int `json:"courseJwId"` - CourseName *string `json:"courseName"` - HomeworkId *string `json:"homeworkId"` - HomeworkSectionCode *string `json:"homeworkSectionCode"` - HomeworkSectionJwId *int `json:"homeworkSectionJwId"` - HomeworkTitle *string `json:"homeworkTitle"` - SectionCode *string `json:"sectionCode"` - SectionId *int `json:"sectionId"` - SectionJwId *int `json:"sectionJwId"` - SectionTeacherCourseJwId *int `json:"sectionTeacherCourseJwId"` - SectionTeacherCourseName *string `json:"sectionTeacherCourseName"` - SectionTeacherId *int `json:"sectionTeacherId"` - SectionTeacherSectionCode *string `json:"sectionTeacherSectionCode"` - SectionTeacherSectionId *int `json:"sectionTeacherSectionId"` - SectionTeacherSectionJwId *int `json:"sectionTeacherSectionJwId"` - SectionTeacherTeacherId *int `json:"sectionTeacherTeacherId"` - SectionTeacherTeacherName *string `json:"sectionTeacherTeacherName"` - TeacherId *int `json:"teacherId"` - TeacherName *string `json:"teacherName"` - } `json:"target"` - Thread []struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []map[string]interface{} `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"thread"` - Viewer struct { - Image *string `json:"image"` - IsAdmin bool `json:"isAdmin"` - IsAuthenticated bool `json:"isAuthenticated"` - IsSuspended bool `json:"isSuspended"` - Name *string `json:"name"` - SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` - SuspensionReason *string `json:"suspensionReason"` - UserId *string `json:"userId"` - } `json:"viewer"` -} +// Defines values for RemoveCommentReactionParamsType. +const ( + RemoveCommentReactionParamsTypeConfused RemoveCommentReactionParamsType = "confused" + RemoveCommentReactionParamsTypeDownvote RemoveCommentReactionParamsType = "downvote" + RemoveCommentReactionParamsTypeEyes RemoveCommentReactionParamsType = "eyes" + RemoveCommentReactionParamsTypeHeart RemoveCommentReactionParamsType = "heart" + RemoveCommentReactionParamsTypeHooray RemoveCommentReactionParamsType = "hooray" + RemoveCommentReactionParamsTypeLaugh RemoveCommentReactionParamsType = "laugh" + RemoveCommentReactionParamsTypeRocket RemoveCommentReactionParamsType = "rocket" + RemoveCommentReactionParamsTypeUpvote RemoveCommentReactionParamsType = "upvote" +) -// CommentUpdateRequestSchema defines model for commentUpdateRequestSchema. -type CommentUpdateRequestSchema struct { - AttachmentIds *[]string `json:"attachmentIds,omitempty"` - Body string `json:"body"` - IsAnonymous *bool `json:"isAnonymous,omitempty"` - Visibility *CommentUpdateRequestSchemaVisibility `json:"visibility,omitempty"` +// Valid indicates whether the value is a known member of the RemoveCommentReactionParamsType enum. +func (e RemoveCommentReactionParamsType) Valid() bool { + switch e { + case RemoveCommentReactionParamsTypeConfused: + return true + case RemoveCommentReactionParamsTypeDownvote: + return true + case RemoveCommentReactionParamsTypeEyes: + return true + case RemoveCommentReactionParamsTypeHeart: + return true + case RemoveCommentReactionParamsTypeHooray: + return true + case RemoveCommentReactionParamsTypeLaugh: + return true + case RemoveCommentReactionParamsTypeRocket: + return true + case RemoveCommentReactionParamsTypeUpvote: + return true + default: + return false + } } -// CommentUpdateRequestSchemaVisibility defines model for CommentUpdateRequestSchema.Visibility. -type CommentUpdateRequestSchemaVisibility string +// Defines values for GetDescriptionParamsTargetType. +const ( + GetDescriptionParamsTargetTypeCourse GetDescriptionParamsTargetType = "course" + GetDescriptionParamsTargetTypeHomework GetDescriptionParamsTargetType = "homework" + GetDescriptionParamsTargetTypeSection GetDescriptionParamsTargetType = "section" + GetDescriptionParamsTargetTypeTeacher GetDescriptionParamsTargetType = "teacher" +) -// CommentUpdateResponseSchema defines model for commentUpdateResponseSchema. -type CommentUpdateResponseSchema struct { - Comment struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []map[string]interface{} `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"comment"` - Success bool `json:"success"` +// Valid indicates whether the value is a known member of the GetDescriptionParamsTargetType enum. +func (e GetDescriptionParamsTargetType) Valid() bool { + switch e { + case GetDescriptionParamsTargetTypeCourse: + return true + case GetDescriptionParamsTargetTypeHomework: + return true + case GetDescriptionParamsTargetTypeSection: + return true + case GetDescriptionParamsTargetTypeTeacher: + return true + default: + return false + } } -// CommentsListResponseSchema defines model for commentsListResponseSchema. -type CommentsListResponseSchema struct { - Comments []struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []struct { - Attachments []struct { - ContentType *string `json:"contentType"` - Filename string `json:"filename"` - Id string `json:"id"` - Size int `json:"size"` - UploadId string `json:"uploadId"` - Url string `json:"url"` - } `json:"attachments"` - Author *struct { - Id *string `json:"id,omitempty"` - Image *string `json:"image,omitempty"` - IsAdmin bool `json:"isAdmin"` - IsGuest bool `json:"isGuest"` - IsUstcVerified bool `json:"isUstcVerified"` - Name *string `json:"name"` - } `json:"author"` - AuthorHidden bool `json:"authorHidden"` - Body string `json:"body"` - CanEdit bool `json:"canEdit"` - CanModerate bool `json:"canModerate"` - CanReply bool `json:"canReply"` - CreatedAt time.Time `json:"createdAt"` - Id string `json:"id"` - IsAnonymous bool `json:"isAnonymous"` - IsAuthor bool `json:"isAuthor"` - ParentId *string `json:"parentId"` - Reactions []struct { - Count int `json:"count"` - Type string `json:"type"` - ViewerHasReacted bool `json:"viewerHasReacted"` - } `json:"reactions"` - Replies []map[string]interface{} `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"replies"` - RootId *string `json:"rootId"` - Status string `json:"status"` - UpdatedAt time.Time `json:"updatedAt"` - Visibility string `json:"visibility"` - } `json:"comments"` - HiddenCount int `json:"hiddenCount"` - Target struct { - HomeworkId *string `json:"homeworkId"` - SectionId *int `json:"sectionId"` - SectionTeacherId *int `json:"sectionTeacherId"` - TargetId *string `json:"targetId"` - TeacherId *int `json:"teacherId"` - Type string `json:"type"` - } `json:"target"` - Viewer struct { - Image *string `json:"image"` - IsAdmin bool `json:"isAdmin"` - IsAuthenticated bool `json:"isAuthenticated"` - IsSuspended bool `json:"isSuspended"` - Name *string `json:"name"` - SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` - SuspensionReason *string `json:"suspensionReason"` - UserId *string `json:"userId"` - } `json:"viewer"` -} +// Defines values for ListHomeworksParamsIncludeDeleted. +const ( + ListHomeworksParamsIncludeDeletedFalse ListHomeworksParamsIncludeDeleted = "false" + ListHomeworksParamsIncludeDeletedTrue ListHomeworksParamsIncludeDeleted = "true" +) -// CourseDetailSchema defines model for courseDetailSchema. -type CourseDetailSchema struct { - Category *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"category"` - CategoryId *int `json:"categoryId"` - ClassType *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classType"` - ClassTypeId *int `json:"classTypeId"` - Classify *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classify"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevel *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"educationLevel"` - EducationLevelId *int `json:"educationLevelId"` - Gradation *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"gradation"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - Sections []struct { - ActualPeriods *int `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - Campus *struct { - Code *string `json:"code"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguageId *int `json:"teachLanguageId"` - Teachers []struct { - Address *string `json:"address"` - Age *int `json:"age"` - Code *string `json:"code"` - DepartmentId *int `json:"departmentId"` - Email *string `json:"email"` - Id int `json:"id"` - Mobile *string `json:"mobile"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - PersonId *int `json:"personId"` - Postcode *string `json:"postcode"` - Qq *string `json:"qq"` - TeacherId *int `json:"teacherId"` - TeacherTitleId *int `json:"teacherTitleId"` - Telephone *string `json:"telephone"` - Wechat *string `json:"wechat"` - } `json:"teachers"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` - } `json:"sections"` - Type *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"type"` - TypeId *int `json:"typeId"` +// Valid indicates whether the value is a known member of the ListHomeworksParamsIncludeDeleted enum. +func (e ListHomeworksParamsIncludeDeleted) Valid() bool { + switch e { + case ListHomeworksParamsIncludeDeletedFalse: + return true + case ListHomeworksParamsIncludeDeletedTrue: + return true + default: + return false + } } -// CurrentCalendarSubscriptionResponseSchema defines model for currentCalendarSubscriptionResponseSchema. -type CurrentCalendarSubscriptionResponseSchema struct { - Subscription *struct { - CalendarPath string `json:"calendarPath"` - CalendarUrl string `json:"calendarUrl"` - Note string `json:"note"` - Sections []struct { - ActualPeriods *int `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - Campus *struct { - Code *string `json:"code"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { - Category *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"category"` - CategoryId *int `json:"categoryId"` - ClassType *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classType"` - ClassTypeId *int `json:"classTypeId"` - Classify *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classify"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevel *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"educationLevel"` - EducationLevelId *int `json:"educationLevelId"` - Gradation *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"gradation"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - Type *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"type"` - TypeId *int `json:"typeId"` - } `json:"course"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartment *struct { - Code string `json:"code"` - Id int `json:"id"` - IsCollege *bool `json:"isCollege"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"openDepartment"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguageId *int `json:"teachLanguageId"` - Teachers []struct { - Address *string `json:"address"` - Age *int `json:"age"` - Code *string `json:"code"` - DepartmentId *int `json:"departmentId"` - Email *string `json:"email"` - Id int `json:"id"` - Mobile *string `json:"mobile"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - PersonId *int `json:"personId"` - Postcode *string `json:"postcode"` - Qq *string `json:"qq"` - TeacherId *int `json:"teacherId"` - TeacherTitleId *int `json:"teacherTitleId"` - Telephone *string `json:"telephone"` - Wechat *string `json:"wechat"` - } `json:"teachers"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` - } `json:"sections"` - UserId string `json:"userId"` - } `json:"subscription"` -} +// Defines values for GetApiMeOverviewParamsLocale. +const ( + GetApiMeOverviewParamsLocaleEnUs GetApiMeOverviewParamsLocale = "en-us" + GetApiMeOverviewParamsLocaleZhCn GetApiMeOverviewParamsLocale = "zh-cn" +) -// DashboardLinkPinRequestSchema defines model for dashboardLinkPinRequestSchema. -type DashboardLinkPinRequestSchema struct { - Action *DashboardLinkPinRequestSchemaAction `json:"action,omitempty"` - ReturnTo *string `json:"returnTo,omitempty"` - Slug string `json:"slug"` +// Valid indicates whether the value is a known member of the GetApiMeOverviewParamsLocale enum. +func (e GetApiMeOverviewParamsLocale) Valid() bool { + switch e { + case GetApiMeOverviewParamsLocaleEnUs: + return true + case GetApiMeOverviewParamsLocaleZhCn: + return true + default: + return false + } } -// DashboardLinkPinRequestSchemaAction defines model for DashboardLinkPinRequestSchema.Action. -type DashboardLinkPinRequestSchemaAction string - -// DashboardLinkVisitRequestSchema defines model for dashboardLinkVisitRequestSchema. -type DashboardLinkVisitRequestSchema struct { - Slug string `json:"slug"` -} +// Defines values for GetApiMeSubscriptionsSchedulesParamsLocale. +const ( + GetApiMeSubscriptionsSchedulesParamsLocaleEnUs GetApiMeSubscriptionsSchedulesParamsLocale = "en-us" + GetApiMeSubscriptionsSchedulesParamsLocaleZhCn GetApiMeSubscriptionsSchedulesParamsLocale = "zh-cn" +) -// DescriptionUpsertRequestSchema defines model for descriptionUpsertRequestSchema. -type DescriptionUpsertRequestSchema struct { - Content string `json:"content"` - TargetId string `json:"targetId"` - TargetType DescriptionUpsertRequestSchemaTargetType `json:"targetType"` +// Valid indicates whether the value is a known member of the GetApiMeSubscriptionsSchedulesParamsLocale enum. +func (e GetApiMeSubscriptionsSchedulesParamsLocale) Valid() bool { + switch e { + case GetApiMeSubscriptionsSchedulesParamsLocaleEnUs: + return true + case GetApiMeSubscriptionsSchedulesParamsLocaleZhCn: + return true + default: + return false + } } -// DescriptionUpsertRequestSchemaTargetType defines model for DescriptionUpsertRequestSchema.TargetType. -type DescriptionUpsertRequestSchemaTargetType string +// Defines values for ListTodosParamsCompleted. +const ( + False ListTodosParamsCompleted = "false" + True ListTodosParamsCompleted = "true" +) -// DescriptionUpsertResponseSchema defines model for descriptionUpsertResponseSchema. -type DescriptionUpsertResponseSchema struct { - Id string `json:"id"` - Updated bool `json:"updated"` +// Valid indicates whether the value is a known member of the ListTodosParamsCompleted enum. +func (e ListTodosParamsCompleted) Valid() bool { + switch e { + case False: + return true + case True: + return true + default: + return false + } } -// DescriptionsResponseSchema defines model for descriptionsResponseSchema. -type DescriptionsResponseSchema struct { - Description struct { - Content string `json:"content"` - Id *string `json:"id"` - LastEditedAt *time.Time `json:"lastEditedAt"` - LastEditedBy *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"lastEditedBy"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"description"` - History []struct { - CreatedAt time.Time `json:"createdAt"` - Editor *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"editor"` - Id string `json:"id"` - NextContent string `json:"nextContent"` - PreviousContent *string `json:"previousContent"` - } `json:"history"` - Viewer struct { - Image *string `json:"image"` - IsAdmin bool `json:"isAdmin"` - IsAuthenticated bool `json:"isAuthenticated"` - IsSuspended bool `json:"isSuspended"` - Name *string `json:"name"` - SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` - SuspensionReason *string `json:"suspensionReason"` - UserId *string `json:"userId"` - } `json:"viewer"` +// Defines values for ListTodosParamsPriority. +const ( + ListTodosParamsPriorityHigh ListTodosParamsPriority = "high" + ListTodosParamsPriorityLow ListTodosParamsPriority = "low" + ListTodosParamsPriorityMedium ListTodosParamsPriority = "medium" +) + +// Valid indicates whether the value is a known member of the ListTodosParamsPriority enum. +func (e ListTodosParamsPriority) Valid() bool { + switch e { + case ListTodosParamsPriorityHigh: + return true + case ListTodosParamsPriorityLow: + return true + case ListTodosParamsPriorityMedium: + return true + default: + return false + } } -// HomeworkCompletionRequestSchema defines model for homeworkCompletionRequestSchema. -type HomeworkCompletionRequestSchema struct { - Completed bool `json:"completed"` +// UnderscoreUnderscoreSchema0 defines model for __schema0. +type UnderscoreUnderscoreSchema0 struct { + Attachments []struct { + ContentType *string `json:"contentType"` + Filename string `json:"filename"` + Id string `json:"id"` + Size int `json:"size"` + UploadId string `json:"uploadId"` + Url string `json:"url"` + } `json:"attachments"` + Author *struct { + Id *string `json:"id,omitempty"` + Image *string `json:"image,omitempty"` + IsAdmin bool `json:"isAdmin"` + IsGuest bool `json:"isGuest"` + IsUstcVerified bool `json:"isUstcVerified"` + Name *string `json:"name"` + } `json:"author"` + AuthorHidden bool `json:"authorHidden"` + Body string `json:"body"` + CanDelete bool `json:"canDelete"` + CanEdit bool `json:"canEdit"` + CanModerate bool `json:"canModerate"` + CanReact bool `json:"canReact"` + CanReply bool `json:"canReply"` + CreatedAt time.Time `json:"createdAt"` + Id string `json:"id"` + IsAnonymous bool `json:"isAnonymous"` + IsAuthor bool `json:"isAuthor"` + ParentId *string `json:"parentId"` + Reactions []struct { + Count int `json:"count"` + Type string `json:"type"` + ViewerHasReacted bool `json:"viewerHasReacted"` + } `json:"reactions"` + Replies []UnderscoreUnderscoreSchema0 `json:"replies"` + RootId *string `json:"rootId"` + Status string `json:"status"` + UpdatedAt time.Time `json:"updatedAt"` + Visibility string `json:"visibility"` +} + +// UnderscoreUnderscoreSchema1 defines model for __schema1. +type UnderscoreUnderscoreSchema1 struct { + Attachments []struct { + ContentType *string `json:"contentType"` + Filename string `json:"filename"` + Id string `json:"id"` + Size int `json:"size"` + UploadId string `json:"uploadId"` + Url string `json:"url"` + } `json:"attachments"` + Author *struct { + Id *string `json:"id,omitempty"` + Image *string `json:"image,omitempty"` + IsAdmin bool `json:"isAdmin"` + IsGuest bool `json:"isGuest"` + IsUstcVerified bool `json:"isUstcVerified"` + Name *string `json:"name"` + } `json:"author"` + AuthorHidden bool `json:"authorHidden"` + Body string `json:"body"` + CanDelete bool `json:"canDelete"` + CanEdit bool `json:"canEdit"` + CanModerate bool `json:"canModerate"` + CanReact bool `json:"canReact"` + CanReply bool `json:"canReply"` + CreatedAt time.Time `json:"createdAt"` + Id string `json:"id"` + IsAnonymous bool `json:"isAnonymous"` + IsAuthor bool `json:"isAuthor"` + ParentId *string `json:"parentId"` + Reactions []struct { + Count int `json:"count"` + Type string `json:"type"` + ViewerHasReacted bool `json:"viewerHasReacted"` + } `json:"reactions"` + Replies []UnderscoreUnderscoreSchema1 `json:"replies"` + RootId *string `json:"rootId"` + Status string `json:"status"` + UpdatedAt time.Time `json:"updatedAt"` + Visibility string `json:"visibility"` } -// HomeworkCompletionResponseSchema defines model for homeworkCompletionResponseSchema. -type HomeworkCompletionResponseSchema struct { - Completed bool `json:"completed"` - CompletedAt *time.Time `json:"completedAt"` +// AdminCommentsResponseSchema defines model for adminCommentsResponseSchema. +type AdminCommentsResponseSchema struct { + Comments []struct { + AuthorName *string `json:"authorName"` + Body string `json:"body"` + Course *struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"course"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + DeletedAt *time.Time `json:"deletedAt"` + Homework *struct { + Id string `json:"id"` + Section struct { + Code string `json:"code"` + } `json:"section"` + Title string `json:"title"` + } `json:"homework"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + IsAnonymous bool `json:"isAnonymous"` + ModeratedAt *time.Time `json:"moderatedAt"` + ModeratedById *string `json:"moderatedById"` + ModerationNote *string `json:"moderationNote"` + ParentId *string `json:"parentId"` + RootId *string `json:"rootId"` + Section *struct { + Code string `json:"code"` + Course struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"course"` + JwId int `json:"jwId"` + } `json:"section"` + SectionId *int `json:"sectionId"` + SectionTeacher *struct { + Section struct { + Code string `json:"code"` + Course struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"course"` + JwId int `json:"jwId"` + } `json:"section"` + Teacher struct { + NameCn string `json:"nameCn"` + } `json:"teacher"` + } `json:"sectionTeacher"` + SectionTeacherId *int `json:"sectionTeacherId"` + Status AdminCommentsResponseSchemaCommentsStatus `json:"status"` + Teacher *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + } `json:"teacher"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + User *struct { + Name *string `json:"name"` + } `json:"user"` + UserId *string `json:"userId"` + Visibility AdminCommentsResponseSchemaCommentsVisibility `json:"visibility"` + } `json:"comments"` } -// HomeworkCreateRequestSchema defines model for homeworkCreateRequestSchema. -type HomeworkCreateRequestSchema struct { - Description *string `json:"description,omitempty"` - IsMajor *bool `json:"isMajor,omitempty"` - PublishedAt *string `json:"publishedAt,omitempty"` - RequiresTeam *bool `json:"requiresTeam,omitempty"` - SectionId string `json:"sectionId"` - SubmissionDueAt *string `json:"submissionDueAt,omitempty"` - SubmissionStartAt *string `json:"submissionStartAt,omitempty"` - Title string `json:"title"` +// AdminCommentsResponseSchemaCommentsStatus defines model for AdminCommentsResponseSchema.Comments.Status. +type AdminCommentsResponseSchemaCommentsStatus string + +// AdminCommentsResponseSchemaCommentsVisibility defines model for AdminCommentsResponseSchema.Comments.Visibility. +type AdminCommentsResponseSchemaCommentsVisibility string + +// AdminCreateSuspensionRequestSchema defines model for adminCreateSuspensionRequestSchema. +type AdminCreateSuspensionRequestSchema struct { + ExpiresAt *AdminCreateSuspensionRequestSchema_ExpiresAt `json:"expiresAt,omitempty"` + Note *string `json:"note,omitempty"` + Reason *string `json:"reason,omitempty"` + UserId string `json:"userId"` } -// HomeworkUpdateRequestSchema defines model for homeworkUpdateRequestSchema. -type HomeworkUpdateRequestSchema struct { - IsMajor *bool `json:"isMajor,omitempty"` - PublishedAt *string `json:"publishedAt,omitempty"` - RequiresTeam *bool `json:"requiresTeam,omitempty"` - SubmissionDueAt *string `json:"submissionDueAt,omitempty"` - SubmissionStartAt *string `json:"submissionStartAt,omitempty"` - Title *string `json:"title,omitempty"` +// AdminCreateSuspensionRequestSchemaExpiresAt0 defines model for . +type AdminCreateSuspensionRequestSchemaExpiresAt0 = string + +// AdminCreateSuspensionRequestSchemaExpiresAt1 defines model for AdminCreateSuspensionRequestSchema.ExpiresAt.1. +type AdminCreateSuspensionRequestSchemaExpiresAt1 string + +// AdminCreateSuspensionRequestSchema_ExpiresAt defines model for AdminCreateSuspensionRequestSchema.ExpiresAt. +type AdminCreateSuspensionRequestSchema_ExpiresAt struct { + union json.RawMessage } -// HomeworksListResponseSchema defines model for homeworksListResponseSchema. -type HomeworksListResponseSchema struct { - AuditLogs []struct { - Action HomeworksListResponseSchemaAuditLogsAction `json:"action"` - Actor *struct { +// AdminDescriptionsResponseSchema defines model for adminDescriptionsResponseSchema. +type AdminDescriptionsResponseSchema struct { + Descriptions []struct { + Content string `json:"content"` + Course *struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"course"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + Homework *struct { + Id string `json:"id"` + Section *struct { + Code *string `json:"code"` + Course *struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"course"` + JwId *int `json:"jwId"` + } `json:"section"` + Title string `json:"title"` + } `json:"homework"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + LastEditedAt *time.Time `json:"lastEditedAt"` + LastEditedBy *struct { Id string `json:"id"` Image *string `json:"image"` Name *string `json:"name"` Username *string `json:"username"` - } `json:"actor"` - ActorId *string `json:"actorId"` - CreatedAt time.Time `json:"createdAt"` - HomeworkId *string `json:"homeworkId"` - Id string `json:"id"` - SectionId int `json:"sectionId"` - TitleSnapshot string `json:"titleSnapshot"` - } `json:"auditLogs"` + } `json:"lastEditedBy"` + LastEditedById *string `json:"lastEditedById"` + Section *struct { + Code *string `json:"code"` + Course *struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"course"` + JwId *int `json:"jwId"` + } `json:"section"` + SectionId *int `json:"sectionId"` + Teacher *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + } `json:"teacher"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"descriptions"` +} + +// AdminHomeworksResponseSchema defines model for adminHomeworksResponseSchema. +type AdminHomeworksResponseSchema struct { Homeworks []struct { - CommentCount int `json:"commentCount"` - Completion *struct { - CompletedAt time.Time `json:"completedAt"` - } `json:"completion"` CreatedAt time.Time `json:"createdAt"` CreatedBy *struct { Id string `json:"id"` @@ -2113,401 +1772,223 @@ type HomeworksListResponseSchema struct { Name *string `json:"name"` Username *string `json:"username"` } `json:"createdBy"` - CreatedById *string `json:"createdById"` - DeletedAt *time.Time `json:"deletedAt"` - DeletedBy *struct { + DeletedAt *time.Time `json:"deletedAt"` + DeletedBy *struct { Id string `json:"id"` Image *string `json:"image"` Name *string `json:"name"` Username *string `json:"username"` } `json:"deletedBy"` - DeletedById *string `json:"deletedById"` - Description *struct { - Content string `json:"content"` - CourseId *int `json:"courseId"` - CreatedAt time.Time `json:"createdAt"` - HomeworkId *string `json:"homeworkId"` - Id string `json:"id"` - LastEditedAt *time.Time `json:"lastEditedAt"` - LastEditedById *string `json:"lastEditedById"` - SectionId *int `json:"sectionId"` - TeacherId *int `json:"teacherId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"description"` - Id string `json:"id"` - IsMajor bool `json:"isMajor"` - PublishedAt *time.Time `json:"publishedAt"` - RequiresTeam bool `json:"requiresTeam"` - Section struct { - ActualPeriods *int `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { - CategoryId *int `json:"categoryId"` - ClassTypeId *int `json:"classTypeId"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevelId *int `json:"educationLevelId"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - TypeId *int `json:"typeId"` + Id string `json:"id"` + Section *struct { + Code *string `json:"code"` + Course struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` } `json:"course"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguageId *int `json:"teachLanguageId"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` + Id int `json:"id"` + JwId *int `json:"jwId"` } `json:"section"` - SectionId int `json:"sectionId"` - SubmissionDueAt *time.Time `json:"submissionDueAt"` - SubmissionStartAt *time.Time `json:"submissionStartAt"` - Title string `json:"title"` - UpdatedAt time.Time `json:"updatedAt"` - UpdatedBy *struct { + SubmissionDueAt *time.Time `json:"submissionDueAt"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + UpdatedBy *struct { Id string `json:"id"` Image *string `json:"image"` Name *string `json:"name"` Username *string `json:"username"` } `json:"updatedBy"` - UpdatedById *string `json:"updatedById"` } `json:"homeworks"` - Viewer struct { - Image *string `json:"image"` - IsAdmin bool `json:"isAdmin"` - IsAuthenticated bool `json:"isAuthenticated"` - IsSuspended bool `json:"isSuspended"` - Name *string `json:"name"` - SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` - SuspensionReason *string `json:"suspensionReason"` - UserId *string `json:"userId"` - } `json:"viewer"` } -// HomeworksListResponseSchemaAuditLogsAction defines model for HomeworksListResponseSchema.AuditLogs.Action. -type HomeworksListResponseSchemaAuditLogsAction string +// AdminModerateCommentRequestSchema defines model for adminModerateCommentRequestSchema. +type AdminModerateCommentRequestSchema struct { + ModerationNote *string `json:"moderationNote,omitempty"` + Status AdminModerateCommentRequestSchemaStatus `json:"status"` +} -// IdResponseSchema defines model for idResponseSchema. -type IdResponseSchema struct { - Id string `json:"id"` +// AdminModerateCommentRequestSchemaStatus defines model for AdminModerateCommentRequestSchema.Status. +type AdminModerateCommentRequestSchemaStatus string + +// AdminModerateDescriptionRequestSchema defines model for adminModerateDescriptionRequestSchema. +type AdminModerateDescriptionRequestSchema struct { + Content string `json:"content"` } -// LocaleUpdateRequestSchema defines model for localeUpdateRequestSchema. -type LocaleUpdateRequestSchema struct { - Locale LocaleUpdateRequestSchemaLocale `json:"locale"` +// AdminModeratedCommentResponseSchema defines model for adminModeratedCommentResponseSchema. +type AdminModeratedCommentResponseSchema struct { + Comment struct { + AuthorName *string `json:"authorName"` + Body string `json:"body"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + DeletedAt *time.Time `json:"deletedAt"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + IsAnonymous bool `json:"isAnonymous"` + ModeratedAt *time.Time `json:"moderatedAt"` + ModeratedById *string `json:"moderatedById"` + ModerationNote *string `json:"moderationNote"` + ParentId *string `json:"parentId"` + RootId *string `json:"rootId"` + SectionId *int `json:"sectionId"` + SectionTeacherId *int `json:"sectionTeacherId"` + Status AdminModeratedCommentResponseSchemaCommentStatus `json:"status"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + UserId *string `json:"userId"` + Visibility AdminModeratedCommentResponseSchemaCommentVisibility `json:"visibility"` + } `json:"comment"` } -// LocaleUpdateRequestSchemaLocale defines model for LocaleUpdateRequestSchema.Locale. -type LocaleUpdateRequestSchemaLocale string +// AdminModeratedCommentResponseSchemaCommentStatus defines model for AdminModeratedCommentResponseSchema.Comment.Status. +type AdminModeratedCommentResponseSchemaCommentStatus string -// MatchSectionCodesRequestSchema defines model for matchSectionCodesRequestSchema. -type MatchSectionCodesRequestSchema struct { - Codes []string `json:"codes"` - SemesterId *string `json:"semesterId,omitempty"` -} +// AdminModeratedCommentResponseSchemaCommentVisibility defines model for AdminModeratedCommentResponseSchema.Comment.Visibility. +type AdminModeratedCommentResponseSchemaCommentVisibility string -// MatchSectionCodesResponseSchema defines model for matchSectionCodesResponseSchema. -type MatchSectionCodesResponseSchema struct { - MatchedCodes []string `json:"matchedCodes"` - Sections []struct { - ActualPeriods *int `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - Campus *struct { - Code *string `json:"code"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { - Category *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"category"` - CategoryId *int `json:"categoryId"` - ClassType *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classType"` - ClassTypeId *int `json:"classTypeId"` - Classify *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classify"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevel *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"educationLevel"` - EducationLevelId *int `json:"educationLevelId"` - Gradation *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"gradation"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - Type *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"type"` - TypeId *int `json:"typeId"` +// AdminModeratedDescriptionResponseSchema defines model for adminModeratedDescriptionResponseSchema. +type AdminModeratedDescriptionResponseSchema struct { + Description struct { + Content string `json:"content"` + Course *struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` } `json:"course"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartment *struct { - Code string `json:"code"` - Id int `json:"id"` - IsCollege *bool `json:"isCollege"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"openDepartment"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguageId *int `json:"teachLanguageId"` - Teachers []struct { - Address *string `json:"address"` - Age *int `json:"age"` - Code *string `json:"code"` - DepartmentId *int `json:"departmentId"` - Email *string `json:"email"` - Id int `json:"id"` - Mobile *string `json:"mobile"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - PersonId *int `json:"personId"` - Postcode *string `json:"postcode"` - Qq *string `json:"qq"` - TeacherId *int `json:"teacherId"` - TeacherTitleId *int `json:"teacherTitleId"` - Telephone *string `json:"telephone"` - Wechat *string `json:"wechat"` - } `json:"teachers"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` - } `json:"sections"` - Semester struct { - Code *string `json:"code"` - Id int `json:"id"` - NameCn *string `json:"nameCn"` - } `json:"semester"` - Total int `json:"total"` - UnmatchedCodes []string `json:"unmatchedCodes"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + Homework *struct { + Id string `json:"id"` + Section *struct { + Code *string `json:"code"` + Course *struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"course"` + JwId *int `json:"jwId"` + } `json:"section"` + Title string `json:"title"` + } `json:"homework"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + LastEditedAt *time.Time `json:"lastEditedAt"` + LastEditedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"lastEditedBy"` + LastEditedById *string `json:"lastEditedById"` + Section *struct { + Code *string `json:"code"` + Course *struct { + Code string `json:"code"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"course"` + JwId *int `json:"jwId"` + } `json:"section"` + SectionId *int `json:"sectionId"` + Teacher *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + } `json:"teacher"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"description"` } -// MeResponseSchema defines model for meResponseSchema. -type MeResponseSchema struct { - Email *string `json:"email"` - Id string `json:"id"` - Image *string `json:"image"` - IsAdmin bool `json:"isAdmin"` - Name *string `json:"name"` - Username *string `json:"username"` +// AdminSuspensionResponseSchema defines model for adminSuspensionResponseSchema. +type AdminSuspensionResponseSchema struct { + Suspension struct { + CreatedAt time.Time `json:"createdAt"` + CreatedById *string `json:"createdById"` + ExpiresAt *time.Time `json:"expiresAt"` + Id string `json:"id"` + LiftedAt *time.Time `json:"liftedAt"` + LiftedById *string `json:"liftedById"` + Note *string `json:"note"` + Reason *string `json:"reason"` + User *struct { + Id string `json:"id"` + Name *string `json:"name"` + } `json:"user,omitempty"` + UserId string `json:"userId"` + } `json:"suspension"` } -// MetadataResponseSchema defines model for metadataResponseSchema. -type MetadataResponseSchema struct { - Campuses []struct { - Buildings []struct { - CampusId *int `json:"campusId"` - Code string `json:"code"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"buildings"` - Code *string `json:"code"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"campuses"` - ClassTypes []struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classTypes"` - CourseCategories []struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"courseCategories"` - CourseClassifies []struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"courseClassifies"` - CourseGradations []struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"courseGradations"` - CourseTypes []struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"courseTypes"` - EducationLevels []struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"educationLevels"` - ExamModes []struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"examModes"` - TeachLanguages []struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"teachLanguages"` +// AdminSuspensionsResponseSchema defines model for adminSuspensionsResponseSchema. +type AdminSuspensionsResponseSchema struct { + Suspensions []struct { + CreatedAt time.Time `json:"createdAt"` + CreatedById *string `json:"createdById"` + ExpiresAt *time.Time `json:"expiresAt"` + Id string `json:"id"` + LiftedAt *time.Time `json:"liftedAt"` + LiftedById *string `json:"liftedById"` + Note *string `json:"note"` + Reason *string `json:"reason"` + User *struct { + Id string `json:"id"` + Name *string `json:"name"` + } `json:"user,omitempty"` + UserId string `json:"userId"` + } `json:"suspensions"` } -// OpenApiDocumentResponseSchema defines model for openApiDocumentResponseSchema. -type OpenApiDocumentResponseSchema struct { - Info struct { - Description *string `json:"description,omitempty"` - Title string `json:"title"` - Version string `json:"version"` - } `json:"info"` - Openapi string `json:"openapi"` - Paths map[string]interface{} `json:"paths"` - Servers *[]struct { - Description *string `json:"description,omitempty"` - Url string `json:"url"` - } `json:"servers,omitempty"` +// AdminUpdateUserRequestSchema defines model for adminUpdateUserRequestSchema. +type AdminUpdateUserRequestSchema struct { + IsAdmin *bool `json:"isAdmin,omitempty"` + Name *AdminUpdateUserRequestSchema_Name `json:"name,omitempty"` + Username *AdminUpdateUserRequestSchema_Username `json:"username,omitempty"` } -// OpenApiErrorSchema defines model for openApiErrorSchema. -type OpenApiErrorSchema struct { - Error string `json:"error"` +// AdminUpdateUserRequestSchemaName0 defines model for . +type AdminUpdateUserRequestSchemaName0 = string + +// AdminUpdateUserRequestSchemaName1 defines model for AdminUpdateUserRequestSchema.Name.1. +type AdminUpdateUserRequestSchemaName1 string + +// AdminUpdateUserRequestSchema_Name defines model for AdminUpdateUserRequestSchema.Name. +type AdminUpdateUserRequestSchema_Name struct { + union json.RawMessage } -// PaginatedCourseResponseSchema defines model for paginatedCourseResponseSchema. -type PaginatedCourseResponseSchema struct { +// AdminUpdateUserRequestSchemaUsername0 defines model for . +type AdminUpdateUserRequestSchemaUsername0 = string + +// AdminUpdateUserRequestSchemaUsername1 defines model for AdminUpdateUserRequestSchema.Username.1. +type AdminUpdateUserRequestSchemaUsername1 string + +// AdminUpdateUserRequestSchema_Username defines model for AdminUpdateUserRequestSchema.Username. +type AdminUpdateUserRequestSchema_Username struct { + union json.RawMessage +} + +// AdminUserResponseSchema defines model for adminUserResponseSchema. +type AdminUserResponseSchema struct { + User struct { + CreatedAt time.Time `json:"createdAt"` + Email *string `json:"email"` + Id string `json:"id"` + IsAdmin bool `json:"isAdmin"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"user"` +} + +// AdminUsersResponseSchema defines model for adminUsersResponseSchema. +type AdminUsersResponseSchema struct { Data []struct { - Category *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"category"` - CategoryId *int `json:"categoryId"` - ClassType *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classType"` - ClassTypeId *int `json:"classTypeId"` - Classify *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classify"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevel *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"educationLevel"` - EducationLevelId *int `json:"educationLevelId"` - Gradation *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"gradation"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - Type *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"type"` - TypeId *int `json:"typeId"` + CreatedAt time.Time `json:"createdAt"` + Email *string `json:"email"` + Id string `json:"id"` + IsAdmin bool `json:"isAdmin"` + Name *string `json:"name"` + Username *string `json:"username"` } `json:"data"` Pagination struct { Page int `json:"page"` @@ -2517,404 +1998,3994 @@ type PaginatedCourseResponseSchema struct { } `json:"pagination"` } -// PaginatedScheduleResponseSchema defines model for paginatedScheduleResponseSchema. -type PaginatedScheduleResponseSchema struct { - Data []struct { - CustomPlace *string `json:"customPlace"` - Date *time.Time `json:"date"` - EndTime string `json:"endTime"` - EndUnit int `json:"endUnit"` - ExerciseClass *bool `json:"exerciseClass"` - Experiment *string `json:"experiment"` - Id int `json:"id"` - LessonType *string `json:"lessonType"` - Periods int `json:"periods"` - Room *struct { - Building *struct { - Campus *struct { - Code *string `json:"code"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - } `json:"building"` - BuildingId *int `json:"buildingId"` - Code string `json:"code"` - Floor *int `json:"floor"` +// BusNextDeparturesResponseSchema defines model for busNextDeparturesResponseSchema. +type BusNextDeparturesResponseSchema struct { + AtTime time.Time `json:"atTime"` + DayType BusNextDeparturesResponseSchemaDayType `json:"dayType"` + Departures []struct { + ArrivalEstimated bool `json:"arrivalEstimated"` + ArrivalTime *string `json:"arrivalTime"` + DayType BusNextDeparturesResponseSchemaDeparturesDayType `json:"dayType"` + DepartureEstimated bool `json:"departureEstimated"` + DepartureTime *string `json:"departureTime"` + DestinationCampus *struct { Id int `json:"id"` - JwId int `json:"jwId"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` NameCn string `json:"nameCn"` NameEn *string `json:"nameEn"` NamePrimary string `json:"namePrimary"` NameSecondary *string `json:"nameSecondary"` - Remark *string `json:"remark"` - RoomType *struct { - Code string `json:"code"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - } `json:"roomType"` - RoomTypeId *int `json:"roomTypeId"` - Seats int `json:"seats"` - SeatsForSection int `json:"seatsForSection"` - Virtual bool `json:"virtual"` - } `json:"room"` - RoomId *int `json:"roomId"` - ScheduleGroup struct { - ActualPeriods int `json:"actualPeriods"` - Id int `json:"id"` - IsDefault bool `json:"isDefault"` - JwId int `json:"jwId"` - LimitCount int `json:"limitCount"` - No int `json:"no"` - SectionId int `json:"sectionId"` - StdCount int `json:"stdCount"` - } `json:"scheduleGroup"` - ScheduleGroupId int `json:"scheduleGroupId"` - Section struct { - ActualPeriods *int `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { - CategoryId *int `json:"categoryId"` - ClassTypeId *int `json:"classTypeId"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevelId *int `json:"educationLevelId"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - TypeId *int `json:"typeId"` - } `json:"course"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguageId *int `json:"teachLanguageId"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` - } `json:"section"` - SectionId int `json:"sectionId"` - StartTime string `json:"startTime"` - StartUnit int `json:"startUnit"` - Teachers []struct { - Address *string `json:"address"` - Age *int `json:"age"` - Code *string `json:"code"` - Department *struct { - Code string `json:"code"` - Id int `json:"id"` - IsCollege *bool `json:"isCollege"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - } `json:"department"` - DepartmentId *int `json:"departmentId"` - Email *string `json:"email"` - Id int `json:"id"` - Mobile *string `json:"mobile"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - PersonId *int `json:"personId"` - Postcode *string `json:"postcode"` - Qq *string `json:"qq"` - TeacherId *int `json:"teacherId"` - TeacherTitleId *int `json:"teacherTitleId"` - Telephone *string `json:"telephone"` - Wechat *string `json:"wechat"` - } `json:"teachers"` - WeekIndex int `json:"weekIndex"` - Weekday int `json:"weekday"` - } `json:"data"` - Pagination struct { - Page int `json:"page"` - PageSize int `json:"pageSize"` - Total int `json:"total"` - TotalPages int `json:"totalPages"` - } `json:"pagination"` + } `json:"destinationCampus"` + MinutesUntilDeparture *int `json:"minutesUntilDeparture"` + OriginCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"originCampus"` + Route struct { + DescriptionPrimary string `json:"descriptionPrimary"` + DescriptionSecondary *string `json:"descriptionSecondary"` + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"route"` + RouteId int `json:"routeId"` + Status BusNextDeparturesResponseSchemaDeparturesStatus `json:"status"` + TripId int `json:"tripId"` + } `json:"departures"` + DestinationCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"destinationCampus"` + Message *string `json:"message"` + NextAvailableDeparture *struct { + ArrivalEstimated bool `json:"arrivalEstimated"` + ArrivalTime *string `json:"arrivalTime"` + DayType BusNextDeparturesResponseSchemaNextAvailableDepartureDayType `json:"dayType"` + DepartureEstimated bool `json:"departureEstimated"` + DepartureTime *string `json:"departureTime"` + DestinationCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"destinationCampus"` + MinutesUntilDeparture *int `json:"minutesUntilDeparture"` + OriginCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"originCampus"` + Route struct { + DescriptionPrimary string `json:"descriptionPrimary"` + DescriptionSecondary *string `json:"descriptionSecondary"` + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"route"` + RouteId int `json:"routeId"` + Status BusNextDeparturesResponseSchemaNextAvailableDepartureStatus `json:"status"` + TripId int `json:"tripId"` + } `json:"nextAvailableDeparture"` + OriginCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"originCampus"` + TotalRoutes int `json:"totalRoutes"` } -// PaginatedSectionResponseSchema defines model for paginatedSectionResponseSchema. -type PaginatedSectionResponseSchema struct { - Data []struct { - ActualPeriods *int `json:"actualPeriods"` - AdminClasses []struct { - AbbrEn *string `json:"abbrEn"` - AbbrZh *string `json:"abbrZh"` - Code *string `json:"code"` - Enabled *bool `json:"enabled"` - Grade *string `json:"grade"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - PlanCount *int `json:"planCount"` - StdCount *int `json:"stdCount"` - } `json:"adminClasses"` - BizTypeId *int `json:"bizTypeId"` - Campus *struct { - Code *string `json:"code"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"campus"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { - Category *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"category"` - CategoryId *int `json:"categoryId"` - ClassType *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classType"` - ClassTypeId *int `json:"classTypeId"` - Classify *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classify"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevel *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"educationLevel"` - EducationLevelId *int `json:"educationLevelId"` - Gradation *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"gradation"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - Type *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"type"` - TypeId *int `json:"typeId"` - } `json:"course"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamMode *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"examMode"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartment *struct { - Code string `json:"code"` - Id int `json:"id"` - IsCollege *bool `json:"isCollege"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"openDepartment"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguage *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"teachLanguage"` - TeachLanguageId *int `json:"teachLanguageId"` - Teachers []struct { - Address *string `json:"address"` - Age *int `json:"age"` - Code *string `json:"code"` - DepartmentId *int `json:"departmentId"` - Email *string `json:"email"` - Id int `json:"id"` - Mobile *string `json:"mobile"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - PersonId *int `json:"personId"` - Postcode *string `json:"postcode"` - Qq *string `json:"qq"` - TeacherId *int `json:"teacherId"` - TeacherTitleId *int `json:"teacherTitleId"` - Telephone *string `json:"telephone"` - Wechat *string `json:"wechat"` - } `json:"teachers"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` - } `json:"data"` - Pagination struct { - Page int `json:"page"` - PageSize int `json:"pageSize"` - Total int `json:"total"` - TotalPages int `json:"totalPages"` - } `json:"pagination"` -} +// BusNextDeparturesResponseSchemaDayType defines model for BusNextDeparturesResponseSchema.DayType. +type BusNextDeparturesResponseSchemaDayType string -// PaginatedSemesterResponseSchema defines model for paginatedSemesterResponseSchema. -type PaginatedSemesterResponseSchema struct { - Data []struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"data"` - Pagination struct { - Page int `json:"page"` - PageSize int `json:"pageSize"` - Total int `json:"total"` - TotalPages int `json:"totalPages"` - } `json:"pagination"` +// BusNextDeparturesResponseSchemaDeparturesDayType defines model for BusNextDeparturesResponseSchema.Departures.DayType. +type BusNextDeparturesResponseSchemaDeparturesDayType string + +// BusNextDeparturesResponseSchemaDeparturesStatus defines model for BusNextDeparturesResponseSchema.Departures.Status. +type BusNextDeparturesResponseSchemaDeparturesStatus string + +// BusNextDeparturesResponseSchemaNextAvailableDepartureDayType defines model for BusNextDeparturesResponseSchema.NextAvailableDeparture.DayType. +type BusNextDeparturesResponseSchemaNextAvailableDepartureDayType string + +// BusNextDeparturesResponseSchemaNextAvailableDepartureStatus defines model for BusNextDeparturesResponseSchema.NextAvailableDeparture.Status. +type BusNextDeparturesResponseSchemaNextAvailableDepartureStatus string + +// BusPreferenceRequestSchema defines model for busPreferenceRequestSchema. +type BusPreferenceRequestSchema struct { + PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` + PreferredOriginCampusId *int `json:"preferredOriginCampusId"` + ShowDepartedTrips bool `json:"showDepartedTrips"` } -// PaginatedTeacherResponseSchema defines model for paginatedTeacherResponseSchema. -type PaginatedTeacherResponseSchema struct { - Data []struct { - UnderscoreCount struct { - Sections int `json:"sections"` - } `json:"_count"` - Address *string `json:"address"` - Age *int `json:"age"` - Code *string `json:"code"` - Department *struct { - Code string `json:"code"` - Id int `json:"id"` - IsCollege *bool `json:"isCollege"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"department"` - DepartmentId *int `json:"departmentId"` - Email *string `json:"email"` - Id int `json:"id"` - Mobile *string `json:"mobile"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - PersonId *int `json:"personId"` - Postcode *string `json:"postcode"` - Qq *string `json:"qq"` - TeacherId *int `json:"teacherId"` - TeacherTitle *struct { - Code string `json:"code"` - Enabled *bool `json:"enabled"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"teacherTitle"` - TeacherTitleId *int `json:"teacherTitleId"` - Telephone *string `json:"telephone"` - Wechat *string `json:"wechat"` - } `json:"data"` - Pagination struct { - Page int `json:"page"` - PageSize int `json:"pageSize"` - Total int `json:"total"` - TotalPages int `json:"totalPages"` - } `json:"pagination"` +// BusPreferenceResponseSchema defines model for busPreferenceResponseSchema. +type BusPreferenceResponseSchema struct { + Preference struct { + PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` + PreferredOriginCampusId *int `json:"preferredOriginCampusId"` + ShowDepartedTrips bool `json:"showDepartedTrips"` + } `json:"preference"` } -// SectionDetailSchema defines model for sectionDetailSchema. -type SectionDetailSchema struct { - ActualPeriods *int `json:"actualPeriods"` - AdminClasses []struct { - AbbrEn *string `json:"abbrEn"` - AbbrZh *string `json:"abbrZh"` - Code *string `json:"code"` - Enabled *bool `json:"enabled"` - Grade *string `json:"grade"` - Id int `json:"id"` - JwId *int `json:"jwId"` - NameCn string `json:"nameCn"` +// BusQueryResponseSchema defines model for busQueryResponseSchema. +type BusQueryResponseSchema struct { + AvailableVersions []struct { + EffectiveFrom *time.Time `json:"effectiveFrom"` + EffectiveUntil *time.Time `json:"effectiveUntil"` + Id int `json:"id"` + ImportedAt time.Time `json:"importedAt"` + Key string `json:"key"` + Notice *struct { + Message *string `json:"message"` + Url *string `json:"url"` + } `json:"notice"` + Title string `json:"title"` + } `json:"availableVersions"` + Campuses []struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campuses"` + FetchedAt time.Time `json:"fetchedAt"` + Locale BusQueryResponseSchemaLocale `json:"locale"` + Notice *struct { + Message *string `json:"message"` + Url *string `json:"url"` + } `json:"notice"` + Preferences *struct { + PreferredDestinationCampusId *int `json:"preferredDestinationCampusId"` + PreferredOriginCampusId *int `json:"preferredOriginCampusId"` + ShowDepartedTrips bool `json:"showDepartedTrips"` + } `json:"preferences"` + Routes []struct { + DescriptionPrimary string `json:"descriptionPrimary"` + DescriptionSecondary *string `json:"descriptionSecondary"` + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + Stops []struct { + Campus struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + StopOrder int `json:"stopOrder"` + } `json:"stops"` + } `json:"routes"` + Trips []struct { + ArrivalMinutes *int `json:"arrivalMinutes"` + ArrivalTime *string `json:"arrivalTime"` + DayType BusQueryResponseSchemaTripsDayType `json:"dayType"` + DepartureMinutes *int `json:"departureMinutes"` + DepartureTime *string `json:"departureTime"` + Id int `json:"id"` + Position int `json:"position"` + RouteId int `json:"routeId"` + StopTimes []struct { + CampusId int `json:"campusId"` + CampusName string `json:"campusName"` + IsPassThrough bool `json:"isPassThrough"` + MinutesSinceMidnight *int `json:"minutesSinceMidnight"` + StopOrder int `json:"stopOrder"` + Time *string `json:"time"` + } `json:"stopTimes"` + } `json:"trips"` + Version *struct { + EffectiveFrom *time.Time `json:"effectiveFrom"` + EffectiveUntil *time.Time `json:"effectiveUntil"` + Id int `json:"id"` + ImportedAt time.Time `json:"importedAt"` + Key string `json:"key"` + Notice *struct { + Message *string `json:"message"` + Url *string `json:"url"` + } `json:"notice"` + Title string `json:"title"` + } `json:"version"` +} + +// BusQueryResponseSchemaLocale defines model for BusQueryResponseSchema.Locale. +type BusQueryResponseSchemaLocale string + +// BusQueryResponseSchemaTripsDayType defines model for BusQueryResponseSchema.Trips.DayType. +type BusQueryResponseSchemaTripsDayType string + +// BusRouteSearchResponseSchema defines model for busRouteSearchResponseSchema. +type BusRouteSearchResponseSchema struct { + DestinationCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"destinationCampus"` + OriginCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"originCampus"` + Routes []struct { + DescriptionPrimary string `json:"descriptionPrimary"` + DescriptionSecondary *string `json:"descriptionSecondary"` + DestinationCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"destinationCampus"` + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + OriginCampus *struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"originCampus"` + StopCount int `json:"stopCount"` + Stops []struct { + Campus struct { + Id int `json:"id"` + Latitude float32 `json:"latitude"` + Longitude float32 `json:"longitude"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + StopOrder int `json:"stopOrder"` + } `json:"stops"` + WeekdayTrips int `json:"weekdayTrips"` + WeekendTrips int `json:"weekendTrips"` + } `json:"routes"` + Total int `json:"total"` +} + +// CalendarSubscriptionAppendRequestSchema defines model for calendarSubscriptionAppendRequestSchema. +type CalendarSubscriptionAppendRequestSchema struct { + SectionIds []int `json:"sectionIds"` +} + +// CalendarSubscriptionAppendResponseSchema defines model for calendarSubscriptionAppendResponseSchema. +type CalendarSubscriptionAppendResponseSchema struct { + AddedCount int `json:"addedCount"` + AlreadySubscribedCount int `json:"alreadySubscribedCount"` + Subscription *struct { + CalendarPath string `json:"calendarPath"` + CalendarUrl string `json:"calendarUrl"` + Note string `json:"note"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + UserId string `json:"userId"` + } `json:"subscription"` +} + +// CalendarSubscriptionBatchRequestSchema defines model for calendarSubscriptionBatchRequestSchema. +type CalendarSubscriptionBatchRequestSchema struct { + Action CalendarSubscriptionBatchRequestSchemaAction `json:"action"` + Codes *[]string `json:"codes,omitempty"` + SectionIds *[]int `json:"sectionIds,omitempty"` + SemesterId *CalendarSubscriptionBatchRequestSchema_SemesterId `json:"semesterId,omitempty"` +} + +// CalendarSubscriptionBatchRequestSchemaAction defines model for CalendarSubscriptionBatchRequestSchema.Action. +type CalendarSubscriptionBatchRequestSchemaAction string + +// CalendarSubscriptionBatchRequestSchemaSemesterId0 defines model for . +type CalendarSubscriptionBatchRequestSchemaSemesterId0 = string + +// CalendarSubscriptionBatchRequestSchemaSemesterId1 defines model for . +type CalendarSubscriptionBatchRequestSchemaSemesterId1 = float32 + +// CalendarSubscriptionBatchRequestSchema_SemesterId defines model for CalendarSubscriptionBatchRequestSchema.SemesterId. +type CalendarSubscriptionBatchRequestSchema_SemesterId struct { + union json.RawMessage +} + +// CalendarSubscriptionBatchResponseSchema defines model for calendarSubscriptionBatchResponseSchema. +type CalendarSubscriptionBatchResponseSchema struct { + Action CalendarSubscriptionBatchResponseSchemaAction `json:"action"` + AddedCount int `json:"addedCount"` + MatchedCodes []string `json:"matchedCodes"` + MatchedSectionIds []int `json:"matchedSectionIds"` + RemovedCount int `json:"removedCount"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + Semester *struct { + Code *string `json:"code"` + Id int `json:"id"` + NameCn *string `json:"nameCn"` + } `json:"semester"` + Subscription *struct { + CalendarPath string `json:"calendarPath"` + CalendarUrl string `json:"calendarUrl"` + Note string `json:"note"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + UserId string `json:"userId"` + } `json:"subscription"` + Suggestions map[string][]string `json:"suggestions"` + Total int `json:"total"` + UnchangedCount int `json:"unchangedCount"` + UnmatchedCodes []string `json:"unmatchedCodes"` + UnmatchedSectionIds []int `json:"unmatchedSectionIds"` +} + +// CalendarSubscriptionBatchResponseSchemaAction defines model for CalendarSubscriptionBatchResponseSchema.Action. +type CalendarSubscriptionBatchResponseSchemaAction string + +// CalendarSubscriptionCreateRequestSchema defines model for calendarSubscriptionCreateRequestSchema. +type CalendarSubscriptionCreateRequestSchema struct { + SectionIds *[]int `json:"sectionIds,omitempty"` +} + +// CalendarSubscriptionCreateResponseSchema defines model for calendarSubscriptionCreateResponseSchema. +type CalendarSubscriptionCreateResponseSchema struct { + Subscription *struct { + CalendarPath string `json:"calendarPath"` + CalendarUrl string `json:"calendarUrl"` + Note string `json:"note"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + UserId string `json:"userId"` + } `json:"subscription"` +} + +// CalendarSubscriptionImportResponseSchema defines model for calendarSubscriptionImportResponseSchema. +type CalendarSubscriptionImportResponseSchema struct { + AddedCount int `json:"addedCount"` + AddedSections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"addedSections"` + AlreadySubscribedCount int `json:"alreadySubscribedCount"` + AlreadySubscribedSections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"alreadySubscribedSections"` + AmbiguousCodes []string `json:"ambiguousCodes"` + MatchedCodes []string `json:"matchedCodes"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + Semester struct { + Code *string `json:"code"` + Id int `json:"id"` + NameCn *string `json:"nameCn"` + } `json:"semester"` + Subscription *struct { + CalendarPath string `json:"calendarPath"` + CalendarUrl string `json:"calendarUrl"` + Note string `json:"note"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + UserId string `json:"userId"` + } `json:"subscription"` + Success bool `json:"success"` + UnmatchedCodes []string `json:"unmatchedCodes"` +} + +// CalendarSubscriptionQueryRequestSchema defines model for calendarSubscriptionQueryRequestSchema. +type CalendarSubscriptionQueryRequestSchema struct { + Codes *[]string `json:"codes,omitempty"` + SectionIds *[]int `json:"sectionIds,omitempty"` + SemesterId *CalendarSubscriptionQueryRequestSchema_SemesterId `json:"semesterId,omitempty"` +} + +// CalendarSubscriptionQueryRequestSchemaSemesterId0 defines model for . +type CalendarSubscriptionQueryRequestSchemaSemesterId0 = string + +// CalendarSubscriptionQueryRequestSchemaSemesterId1 defines model for . +type CalendarSubscriptionQueryRequestSchemaSemesterId1 = float32 + +// CalendarSubscriptionQueryRequestSchema_SemesterId defines model for CalendarSubscriptionQueryRequestSchema.SemesterId. +type CalendarSubscriptionQueryRequestSchema_SemesterId struct { + union json.RawMessage +} + +// CalendarSubscriptionQueryResponseSchema defines model for calendarSubscriptionQueryResponseSchema. +type CalendarSubscriptionQueryResponseSchema struct { + MatchedCodes []string `json:"matchedCodes"` + MatchedSectionIds []int `json:"matchedSectionIds"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + Semester *struct { + Code *string `json:"code"` + Id int `json:"id"` + NameCn *string `json:"nameCn"` + } `json:"semester"` + Suggestions map[string][]string `json:"suggestions"` + Total int `json:"total"` + UnmatchedCodes []string `json:"unmatchedCodes"` + UnmatchedSectionIds []int `json:"unmatchedSectionIds"` +} + +// CalendarSubscriptionRemoveRequestSchema defines model for calendarSubscriptionRemoveRequestSchema. +type CalendarSubscriptionRemoveRequestSchema struct { + SectionIds []int `json:"sectionIds"` +} + +// CalendarSubscriptionRemoveResponseSchema defines model for calendarSubscriptionRemoveResponseSchema. +type CalendarSubscriptionRemoveResponseSchema struct { + Subscription *struct { + CalendarPath string `json:"calendarPath"` + CalendarUrl string `json:"calendarUrl"` + Note string `json:"note"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + UserId string `json:"userId"` + } `json:"subscription"` +} + +// CommentBatchDeleteRequestSchema defines model for commentBatchDeleteRequestSchema. +type CommentBatchDeleteRequestSchema struct { + Ids []string `json:"ids"` +} + +// CommentBatchDeleteResponseSchema defines model for commentBatchDeleteResponseSchema. +type CommentBatchDeleteResponseSchema struct { + Results []CommentBatchDeleteResponseSchema_Results_Item `json:"results"` +} + +// CommentBatchDeleteResponseSchemaResults0 defines model for . +type CommentBatchDeleteResponseSchemaResults0 struct { + Id string `json:"id"` + Success CommentBatchDeleteResponseSchemaResults0Success `json:"success"` +} + +// CommentBatchDeleteResponseSchemaResults0Success defines model for CommentBatchDeleteResponseSchema.Results.0.Success. +type CommentBatchDeleteResponseSchemaResults0Success bool + +// CommentBatchDeleteResponseSchemaResults1 defines model for . +type CommentBatchDeleteResponseSchemaResults1 struct { + Error struct { + Code CommentBatchDeleteResponseSchemaResults1ErrorCode `json:"code"` + Message string `json:"message"` + } `json:"error"` + Id string `json:"id"` + Success CommentBatchDeleteResponseSchemaResults1Success `json:"success"` +} + +// CommentBatchDeleteResponseSchemaResults1ErrorCode defines model for CommentBatchDeleteResponseSchema.Results.1.Error.Code. +type CommentBatchDeleteResponseSchemaResults1ErrorCode string + +// CommentBatchDeleteResponseSchemaResults1Success defines model for CommentBatchDeleteResponseSchema.Results.1.Success. +type CommentBatchDeleteResponseSchemaResults1Success bool + +// CommentBatchDeleteResponseSchema_Results_Item defines model for commentBatchDeleteResponseSchema.results.Item. +type CommentBatchDeleteResponseSchema_Results_Item struct { + union json.RawMessage +} + +// CommentCreateRequestSchema defines model for commentCreateRequestSchema. +type CommentCreateRequestSchema struct { + AttachmentIds *[]string `json:"attachmentIds,omitempty"` + Body string `json:"body"` + CourseJwId *CommentCreateRequestSchema_CourseJwId `json:"courseJwId,omitempty"` + HomeworkId *string `json:"homeworkId,omitempty"` + IsAnonymous *bool `json:"isAnonymous,omitempty"` + ParentId *string `json:"parentId,omitempty"` + SectionId *CommentCreateRequestSchema_SectionId `json:"sectionId,omitempty"` + SectionJwId *CommentCreateRequestSchema_SectionJwId `json:"sectionJwId,omitempty"` + SectionTeacherId *CommentCreateRequestSchema_SectionTeacherId `json:"sectionTeacherId,omitempty"` + TargetId *CommentCreateRequestSchema_TargetId `json:"targetId,omitempty"` + TargetType CommentCreateRequestSchemaTargetType `json:"targetType"` + TeacherId *CommentCreateRequestSchema_TeacherId `json:"teacherId,omitempty"` + Visibility *CommentCreateRequestSchemaVisibility `json:"visibility,omitempty"` +} + +// CommentCreateRequestSchemaCourseJwId0 defines model for . +type CommentCreateRequestSchemaCourseJwId0 = int64 + +// CommentCreateRequestSchemaCourseJwId1 defines model for . +type CommentCreateRequestSchemaCourseJwId1 = int + +// CommentCreateRequestSchema_CourseJwId defines model for CommentCreateRequestSchema.CourseJwId. +type CommentCreateRequestSchema_CourseJwId struct { + union json.RawMessage +} + +// CommentCreateRequestSchemaSectionId0 defines model for . +type CommentCreateRequestSchemaSectionId0 = string + +// CommentCreateRequestSchemaSectionId1 defines model for . +type CommentCreateRequestSchemaSectionId1 = float32 + +// CommentCreateRequestSchema_SectionId defines model for CommentCreateRequestSchema.SectionId. +type CommentCreateRequestSchema_SectionId struct { + union json.RawMessage +} + +// CommentCreateRequestSchemaSectionJwId0 defines model for . +type CommentCreateRequestSchemaSectionJwId0 = int64 + +// CommentCreateRequestSchemaSectionJwId1 defines model for . +type CommentCreateRequestSchemaSectionJwId1 = int + +// CommentCreateRequestSchema_SectionJwId defines model for CommentCreateRequestSchema.SectionJwId. +type CommentCreateRequestSchema_SectionJwId struct { + union json.RawMessage +} + +// CommentCreateRequestSchemaSectionTeacherId0 defines model for . +type CommentCreateRequestSchemaSectionTeacherId0 = int64 + +// CommentCreateRequestSchemaSectionTeacherId1 defines model for . +type CommentCreateRequestSchemaSectionTeacherId1 = int + +// CommentCreateRequestSchema_SectionTeacherId defines model for CommentCreateRequestSchema.SectionTeacherId. +type CommentCreateRequestSchema_SectionTeacherId struct { + union json.RawMessage +} + +// CommentCreateRequestSchemaTargetId0 defines model for . +type CommentCreateRequestSchemaTargetId0 = string + +// CommentCreateRequestSchemaTargetId1 defines model for . +type CommentCreateRequestSchemaTargetId1 = float32 + +// CommentCreateRequestSchema_TargetId defines model for CommentCreateRequestSchema.TargetId. +type CommentCreateRequestSchema_TargetId struct { + union json.RawMessage +} + +// CommentCreateRequestSchemaTargetType defines model for CommentCreateRequestSchema.TargetType. +type CommentCreateRequestSchemaTargetType string + +// CommentCreateRequestSchemaTeacherId0 defines model for . +type CommentCreateRequestSchemaTeacherId0 = string + +// CommentCreateRequestSchemaTeacherId1 defines model for . +type CommentCreateRequestSchemaTeacherId1 = float32 + +// CommentCreateRequestSchema_TeacherId defines model for CommentCreateRequestSchema.TeacherId. +type CommentCreateRequestSchema_TeacherId struct { + union json.RawMessage +} + +// CommentCreateRequestSchemaVisibility defines model for CommentCreateRequestSchema.Visibility. +type CommentCreateRequestSchemaVisibility string + +// CommentReactionRequestSchema defines model for commentReactionRequestSchema. +type CommentReactionRequestSchema struct { + Type CommentReactionRequestSchemaType `json:"type"` +} + +// CommentReactionRequestSchemaType defines model for CommentReactionRequestSchema.Type. +type CommentReactionRequestSchemaType string + +// CommentThreadResponseSchema defines model for commentThreadResponseSchema. +type CommentThreadResponseSchema struct { + FocusId string `json:"focusId"` + HiddenCount int `json:"hiddenCount"` + Target struct { + CourseId *int `json:"courseId"` + CourseJwId *int `json:"courseJwId"` + CourseName *string `json:"courseName"` + HomeworkId *string `json:"homeworkId"` + HomeworkSectionCode *string `json:"homeworkSectionCode"` + HomeworkSectionJwId *int `json:"homeworkSectionJwId"` + HomeworkTitle *string `json:"homeworkTitle"` + SectionCode *string `json:"sectionCode"` + SectionId *int `json:"sectionId"` + SectionJwId *int `json:"sectionJwId"` + SectionTeacherCourseJwId *int `json:"sectionTeacherCourseJwId"` + SectionTeacherCourseName *string `json:"sectionTeacherCourseName"` + SectionTeacherId *int `json:"sectionTeacherId"` + SectionTeacherSectionCode *string `json:"sectionTeacherSectionCode"` + SectionTeacherSectionId *int `json:"sectionTeacherSectionId"` + SectionTeacherSectionJwId *int `json:"sectionTeacherSectionJwId"` + SectionTeacherTeacherId *int `json:"sectionTeacherTeacherId"` + SectionTeacherTeacherName *string `json:"sectionTeacherTeacherName"` + TeacherId *int `json:"teacherId"` + TeacherName *string `json:"teacherName"` + } `json:"target"` + Thread []UnderscoreUnderscoreSchema1 `json:"thread"` + Viewer struct { + Image *string `json:"image"` + IsAdmin bool `json:"isAdmin"` + IsAuthenticated bool `json:"isAuthenticated"` + IsSuspended bool `json:"isSuspended"` + Name *string `json:"name"` + SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` + SuspensionReason *string `json:"suspensionReason"` + UserId *string `json:"userId"` + } `json:"viewer"` +} + +// CommentUpdateRequestSchema defines model for commentUpdateRequestSchema. +type CommentUpdateRequestSchema struct { + AttachmentIds *[]string `json:"attachmentIds,omitempty"` + Body string `json:"body"` + IsAnonymous *bool `json:"isAnonymous,omitempty"` + Visibility *CommentUpdateRequestSchemaVisibility `json:"visibility,omitempty"` +} + +// CommentUpdateRequestSchemaVisibility defines model for CommentUpdateRequestSchema.Visibility. +type CommentUpdateRequestSchemaVisibility string + +// CommentUpdateResponseSchema defines model for commentUpdateResponseSchema. +type CommentUpdateResponseSchema struct { + Comment UnderscoreUnderscoreSchema1 `json:"comment"` + Success bool `json:"success"` +} + +// CommentsListResponseSchema defines model for commentsListResponseSchema. +type CommentsListResponseSchema struct { + Comments []UnderscoreUnderscoreSchema1 `json:"comments"` + HiddenCount int `json:"hiddenCount"` + Target struct { + CourseId *int `json:"courseId"` + CourseJwId *int `json:"courseJwId"` + CourseName *string `json:"courseName"` + HomeworkId *string `json:"homeworkId"` + HomeworkSectionCode *string `json:"homeworkSectionCode"` + HomeworkSectionJwId *int `json:"homeworkSectionJwId"` + HomeworkTitle *string `json:"homeworkTitle"` + SectionCode *string `json:"sectionCode"` + SectionId *int `json:"sectionId"` + SectionJwId *int `json:"sectionJwId"` + SectionTeacherCourseJwId *int `json:"sectionTeacherCourseJwId"` + SectionTeacherCourseName *string `json:"sectionTeacherCourseName"` + SectionTeacherId *int `json:"sectionTeacherId"` + SectionTeacherSectionCode *string `json:"sectionTeacherSectionCode"` + SectionTeacherSectionId *int `json:"sectionTeacherSectionId"` + SectionTeacherSectionJwId *int `json:"sectionTeacherSectionJwId"` + SectionTeacherTeacherId *int `json:"sectionTeacherTeacherId"` + SectionTeacherTeacherName *string `json:"sectionTeacherTeacherName"` + TargetId CommentsListResponseSchema_Target_TargetId `json:"targetId"` + TeacherId *int `json:"teacherId"` + TeacherName *string `json:"teacherName"` + Type string `json:"type"` + } `json:"target"` + Viewer struct { + Image *string `json:"image"` + IsAdmin bool `json:"isAdmin"` + IsAuthenticated bool `json:"isAuthenticated"` + IsSuspended bool `json:"isSuspended"` + Name *string `json:"name"` + SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` + SuspensionReason *string `json:"suspensionReason"` + UserId *string `json:"userId"` + } `json:"viewer"` +} + +// CommentsListResponseSchemaTargetTargetId0 defines model for . +type CommentsListResponseSchemaTargetTargetId0 = int + +// CommentsListResponseSchemaTargetTargetId1 defines model for . +type CommentsListResponseSchemaTargetTargetId1 = string + +// CommentsListResponseSchemaTargetTargetId2 defines model for CommentsListResponseSchema.Target.TargetId.2. +type CommentsListResponseSchemaTargetTargetId2 string + +// CommentsListResponseSchema_Target_TargetId defines model for CommentsListResponseSchema.Target.TargetId. +type CommentsListResponseSchema_Target_TargetId struct { + union json.RawMessage +} + +// CompactOverviewResponseSchema defines model for compactOverviewResponseSchema. +type CompactOverviewResponseSchema struct { + Anchor struct { + AtTime time.Time `json:"atTime"` + HomeworkWindowDays int `json:"homeworkWindowDays"` + HomeworkWindowEnd time.Time `json:"homeworkWindowEnd"` + Limit int `json:"limit"` + TodayStart time.Time `json:"todayStart"` + TomorrowStart time.Time `json:"tomorrowStart"` + } `json:"anchor"` + Counts struct { + DueSoonHomeworks int `json:"dueSoonHomeworks"` + PendingHomeworks int `json:"pendingHomeworks"` + TodaySchedules int `json:"todaySchedules"` + Todos struct { + Completed int `json:"completed"` + Incomplete int `json:"incomplete"` + Overdue int `json:"overdue"` + } `json:"todos"` + UpcomingExams int `json:"upcomingExams"` + } `json:"counts"` + DueTodos struct { + Items []struct { + CreatedAt time.Time `json:"createdAt"` + DueAt time.Time `json:"dueAt"` + Id string `json:"id"` + Priority CompactOverviewResponseSchemaDueTodosItemsPriority `json:"priority"` + Title string `json:"title"` + } `json:"items"` + Total int `json:"total"` + } `json:"dueTodos"` + Exams struct { + Items []struct { + EndTime *int `json:"endTime"` + ExamBatch *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"examBatch"` + ExamBatchId *int `json:"examBatchId"` + ExamDate *time.Time `json:"examDate"` + ExamMode *string `json:"examMode"` + ExamRooms []struct { + Count int `json:"count"` + ExamId int `json:"examId"` + Id int `json:"id"` + Room string `json:"room"` + } `json:"examRooms"` + ExamTakeCount *int `json:"examTakeCount"` + ExamType *int `json:"examType"` + Id int `json:"id"` + JwId int `json:"jwId"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + StartTime *int `json:"startTime"` + } `json:"items"` + Total int `json:"total"` + } `json:"exams"` + Homeworks struct { + Items []struct { + CommentCount int `json:"commentCount"` + Completion *struct { + CompletedAt time.Time `json:"completedAt"` + } `json:"completion"` + CreatedAt time.Time `json:"createdAt"` + CreatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"createdBy"` + CreatedById *string `json:"createdById"` + DeletedAt *time.Time `json:"deletedAt"` + DeletedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"deletedBy"` + DeletedById *string `json:"deletedById"` + Description *struct { + Content string `json:"content"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + LastEditedAt *time.Time `json:"lastEditedAt"` + LastEditedById *string `json:"lastEditedById"` + SectionId *int `json:"sectionId"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"description"` + Id string `json:"id"` + IsMajor bool `json:"isMajor"` + PublishedAt *time.Time `json:"publishedAt"` + RequiresTeam bool `json:"requiresTeam"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + SubmissionDueAt *time.Time `json:"submissionDueAt"` + SubmissionStartAt *time.Time `json:"submissionStartAt"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + UpdatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"updatedBy"` + UpdatedById *string `json:"updatedById"` + } `json:"items"` + Total int `json:"total"` + } `json:"homeworks"` + Schedules struct { + Items []struct { + CustomPlace *string `json:"customPlace"` + Date *time.Time `json:"date"` + EndTime string `json:"endTime"` + EndUnit int `json:"endUnit"` + ExerciseClass *bool `json:"exerciseClass"` + Experiment *string `json:"experiment"` + Id int `json:"id"` + LessonType *string `json:"lessonType"` + Periods int `json:"periods"` + Room *struct { + Building *struct { + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"building"` + BuildingId *int `json:"buildingId"` + Code string `json:"code"` + Floor *int `json:"floor"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Remark *string `json:"remark"` + RoomType *struct { + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"roomType"` + RoomTypeId *int `json:"roomTypeId"` + Seats int `json:"seats"` + SeatsForSection int `json:"seatsForSection"` + Virtual bool `json:"virtual"` + } `json:"room"` + RoomId *int `json:"roomId"` + ScheduleGroup struct { + ActualPeriods int `json:"actualPeriods"` + Id int `json:"id"` + IsDefault bool `json:"isDefault"` + JwId int `json:"jwId"` + LimitCount int `json:"limitCount"` + No int `json:"no"` + SectionId int `json:"sectionId"` + StdCount int `json:"stdCount"` + } `json:"scheduleGroup"` + ScheduleGroupId int `json:"scheduleGroupId"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + StartTime string `json:"startTime"` + StartUnit int `json:"startUnit"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + Department *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"department"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + WeekIndex int `json:"weekIndex"` + Weekday int `json:"weekday"` + } `json:"items"` + Total int `json:"total"` + } `json:"schedules"` + Todos struct { + Counts struct { + Completed int `json:"completed"` + Incomplete int `json:"incomplete"` + Overdue int `json:"overdue"` + } `json:"counts"` + Items []struct { + Completed bool `json:"completed"` + Content *string `json:"content"` + CreatedAt time.Time `json:"createdAt"` + DueAt *time.Time `json:"dueAt"` + Id string `json:"id"` + Priority CompactOverviewResponseSchemaTodosItemsPriority `json:"priority"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"items"` + } `json:"todos"` + User struct { + Image *string `json:"image"` + IsAdmin bool `json:"isAdmin"` + Name *string `json:"name"` + UserId *string `json:"userId"` + } `json:"user"` +} + +// CompactOverviewResponseSchemaDueTodosItemsPriority defines model for CompactOverviewResponseSchema.DueTodos.Items.Priority. +type CompactOverviewResponseSchemaDueTodosItemsPriority string + +// CompactOverviewResponseSchemaTodosItemsPriority defines model for CompactOverviewResponseSchema.Todos.Items.Priority. +type CompactOverviewResponseSchemaTodosItemsPriority string + +// CourseDetailSchema defines model for courseDetailSchema. +type CourseDetailSchema struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` +} + +// CurrentCalendarSubscriptionResponseSchema defines model for currentCalendarSubscriptionResponseSchema. +type CurrentCalendarSubscriptionResponseSchema struct { + Subscription *struct { + CalendarPath string `json:"calendarPath"` + CalendarUrl string `json:"calendarUrl"` + Note string `json:"note"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + UserId string `json:"userId"` + } `json:"subscription"` +} + +// DashboardLinkPinBatchRequestSchema defines model for dashboardLinkPinBatchRequestSchema. +type DashboardLinkPinBatchRequestSchema struct { + Items []struct { + Action DashboardLinkPinBatchRequestSchemaItemsAction `json:"action"` + Slug string `json:"slug"` + } `json:"items"` +} + +// DashboardLinkPinBatchRequestSchemaItemsAction defines model for DashboardLinkPinBatchRequestSchema.Items.Action. +type DashboardLinkPinBatchRequestSchemaItemsAction string + +// DashboardLinkPinRequestSchema defines model for dashboardLinkPinRequestSchema. +type DashboardLinkPinRequestSchema struct { + Action *DashboardLinkPinRequestSchemaAction `json:"action,omitempty"` + ReturnTo *string `json:"returnTo,omitempty"` + Slug string `json:"slug"` +} + +// DashboardLinkPinRequestSchemaAction defines model for DashboardLinkPinRequestSchema.Action. +type DashboardLinkPinRequestSchemaAction string + +// DashboardLinkPinResponseSchema defines model for dashboardLinkPinResponseSchema. +type DashboardLinkPinResponseSchema struct { + Error *string `json:"error"` + MaxPinnedLinks int `json:"maxPinnedLinks"` + PinnedSlugs []string `json:"pinnedSlugs"` +} + +// DashboardLinkVisitRequestSchema defines model for dashboardLinkVisitRequestSchema. +type DashboardLinkVisitRequestSchema struct { + Slug string `json:"slug"` +} + +// DescriptionUpsertRequestSchema defines model for descriptionUpsertRequestSchema. +type DescriptionUpsertRequestSchema struct { + Content string `json:"content"` + CourseJwId *DescriptionUpsertRequestSchema_CourseJwId `json:"courseJwId,omitempty"` + HomeworkId *string `json:"homeworkId,omitempty"` + SectionJwId *DescriptionUpsertRequestSchema_SectionJwId `json:"sectionJwId,omitempty"` + TargetId *DescriptionUpsertRequestSchema_TargetId `json:"targetId,omitempty"` + TargetType DescriptionUpsertRequestSchemaTargetType `json:"targetType"` + TeacherId *DescriptionUpsertRequestSchema_TeacherId `json:"teacherId,omitempty"` + union json.RawMessage +} + +// DescriptionUpsertRequestSchemaCourseJwId0 defines model for . +type DescriptionUpsertRequestSchemaCourseJwId0 = string + +// DescriptionUpsertRequestSchemaCourseJwId1 defines model for . +type DescriptionUpsertRequestSchemaCourseJwId1 = float32 + +// DescriptionUpsertRequestSchema_CourseJwId defines model for DescriptionUpsertRequestSchema.CourseJwId. +type DescriptionUpsertRequestSchema_CourseJwId struct { + union json.RawMessage +} + +// DescriptionUpsertRequestSchemaSectionJwId0 defines model for . +type DescriptionUpsertRequestSchemaSectionJwId0 = string + +// DescriptionUpsertRequestSchemaSectionJwId1 defines model for . +type DescriptionUpsertRequestSchemaSectionJwId1 = float32 + +// DescriptionUpsertRequestSchema_SectionJwId defines model for DescriptionUpsertRequestSchema.SectionJwId. +type DescriptionUpsertRequestSchema_SectionJwId struct { + union json.RawMessage +} + +// DescriptionUpsertRequestSchemaTargetId0 defines model for . +type DescriptionUpsertRequestSchemaTargetId0 = string + +// DescriptionUpsertRequestSchemaTargetId1 defines model for . +type DescriptionUpsertRequestSchemaTargetId1 = float32 + +// DescriptionUpsertRequestSchema_TargetId defines model for DescriptionUpsertRequestSchema.TargetId. +type DescriptionUpsertRequestSchema_TargetId struct { + union json.RawMessage +} + +// DescriptionUpsertRequestSchemaTargetType defines model for DescriptionUpsertRequestSchema.TargetType. +type DescriptionUpsertRequestSchemaTargetType string + +// DescriptionUpsertRequestSchemaTeacherId0 defines model for . +type DescriptionUpsertRequestSchemaTeacherId0 = string + +// DescriptionUpsertRequestSchemaTeacherId1 defines model for . +type DescriptionUpsertRequestSchemaTeacherId1 = float32 + +// DescriptionUpsertRequestSchema_TeacherId defines model for DescriptionUpsertRequestSchema.TeacherId. +type DescriptionUpsertRequestSchema_TeacherId struct { + union json.RawMessage +} + +// DescriptionUpsertRequestSchema0 defines model for . +type DescriptionUpsertRequestSchema0 = interface{} + +// DescriptionUpsertRequestSchema1 defines model for . +type DescriptionUpsertRequestSchema1 struct { + TargetType *DescriptionUpsertRequestSchema1TargetType `json:"targetType,omitempty"` +} + +// DescriptionUpsertRequestSchema1TargetType defines model for DescriptionUpsertRequestSchema.1.TargetType. +type DescriptionUpsertRequestSchema1TargetType string + +// DescriptionUpsertRequestSchema2 defines model for . +type DescriptionUpsertRequestSchema2 struct { + TargetType *DescriptionUpsertRequestSchema2TargetType `json:"targetType,omitempty"` +} + +// DescriptionUpsertRequestSchema2TargetType defines model for DescriptionUpsertRequestSchema.2.TargetType. +type DescriptionUpsertRequestSchema2TargetType string + +// DescriptionUpsertRequestSchema3 defines model for . +type DescriptionUpsertRequestSchema3 struct { + TargetType *DescriptionUpsertRequestSchema3TargetType `json:"targetType,omitempty"` +} + +// DescriptionUpsertRequestSchema3TargetType defines model for DescriptionUpsertRequestSchema.3.TargetType. +type DescriptionUpsertRequestSchema3TargetType string + +// DescriptionUpsertRequestSchema4 defines model for . +type DescriptionUpsertRequestSchema4 struct { + TargetType *DescriptionUpsertRequestSchema4TargetType `json:"targetType,omitempty"` +} + +// DescriptionUpsertRequestSchema4TargetType defines model for DescriptionUpsertRequestSchema.4.TargetType. +type DescriptionUpsertRequestSchema4TargetType string + +// DescriptionUpsertResponseSchema defines model for descriptionUpsertResponseSchema. +type DescriptionUpsertResponseSchema struct { + Id string `json:"id"` + Updated bool `json:"updated"` +} + +// DescriptionsResponseSchema defines model for descriptionsResponseSchema. +type DescriptionsResponseSchema struct { + Description struct { + Content string `json:"content"` + Id *string `json:"id"` + LastEditedAt *time.Time `json:"lastEditedAt"` + LastEditedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"lastEditedBy"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"description"` + History []struct { + CreatedAt time.Time `json:"createdAt"` + Editor *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"editor"` + Id string `json:"id"` + NextContent string `json:"nextContent"` + PreviousContent *string `json:"previousContent"` + } `json:"history"` + Viewer struct { + Image *string `json:"image"` + IsAdmin bool `json:"isAdmin"` + IsAuthenticated bool `json:"isAuthenticated"` + IsSuspended bool `json:"isSuspended"` + Name *string `json:"name"` + SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` + SuspensionReason *string `json:"suspensionReason"` + UserId *string `json:"userId"` + } `json:"viewer"` +} + +// HomeworkCompletionBatchRequestSchema defines model for homeworkCompletionBatchRequestSchema. +type HomeworkCompletionBatchRequestSchema struct { + Items []struct { + Completed bool `json:"completed"` + HomeworkId string `json:"homeworkId"` + } `json:"items"` +} + +// HomeworkCompletionBatchResponseSchema defines model for homeworkCompletionBatchResponseSchema. +type HomeworkCompletionBatchResponseSchema struct { + Results []HomeworkCompletionBatchResponseSchema_Results_Item `json:"results"` +} + +// HomeworkCompletionBatchResponseSchemaResults0 defines model for . +type HomeworkCompletionBatchResponseSchemaResults0 struct { + Completed bool `json:"completed"` + CompletedAt *time.Time `json:"completedAt"` + HomeworkId string `json:"homeworkId"` + Success HomeworkCompletionBatchResponseSchemaResults0Success `json:"success"` +} + +// HomeworkCompletionBatchResponseSchemaResults0Success defines model for HomeworkCompletionBatchResponseSchema.Results.0.Success. +type HomeworkCompletionBatchResponseSchemaResults0Success bool + +// HomeworkCompletionBatchResponseSchemaResults1 defines model for . +type HomeworkCompletionBatchResponseSchemaResults1 struct { + Completed bool `json:"completed"` + Error struct { + Code HomeworkCompletionBatchResponseSchemaResults1ErrorCode `json:"code"` + Message string `json:"message"` + } `json:"error"` + HomeworkId string `json:"homeworkId"` + Success HomeworkCompletionBatchResponseSchemaResults1Success `json:"success"` +} + +// HomeworkCompletionBatchResponseSchemaResults1ErrorCode defines model for HomeworkCompletionBatchResponseSchema.Results.1.Error.Code. +type HomeworkCompletionBatchResponseSchemaResults1ErrorCode string + +// HomeworkCompletionBatchResponseSchemaResults1Success defines model for HomeworkCompletionBatchResponseSchema.Results.1.Success. +type HomeworkCompletionBatchResponseSchemaResults1Success bool + +// HomeworkCompletionBatchResponseSchema_Results_Item defines model for homeworkCompletionBatchResponseSchema.results.Item. +type HomeworkCompletionBatchResponseSchema_Results_Item struct { + union json.RawMessage +} + +// HomeworkCompletionRequestSchema defines model for homeworkCompletionRequestSchema. +type HomeworkCompletionRequestSchema struct { + Completed bool `json:"completed"` +} + +// HomeworkCompletionResponseSchema defines model for homeworkCompletionResponseSchema. +type HomeworkCompletionResponseSchema struct { + Completed bool `json:"completed"` + CompletedAt *time.Time `json:"completedAt"` +} + +// HomeworkCreateRequestSchema defines model for homeworkCreateRequestSchema. +type HomeworkCreateRequestSchema struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema0 defines model for . +type HomeworkCreateRequestSchema0 struct { + Description *string `json:"description,omitempty"` + IsMajor *bool `json:"isMajor,omitempty"` + PublishedAt *HomeworkCreateRequestSchema_0_PublishedAt `json:"publishedAt,omitempty"` + RequiresTeam *bool `json:"requiresTeam,omitempty"` + SectionId HomeworkCreateRequestSchema_0_SectionId `json:"sectionId"` + SectionJwId *HomeworkCreateRequestSchema_0_SectionJwId `json:"sectionJwId,omitempty"` + SubmissionDueAt *HomeworkCreateRequestSchema_0_SubmissionDueAt `json:"submissionDueAt,omitempty"` + SubmissionStartAt *HomeworkCreateRequestSchema_0_SubmissionStartAt `json:"submissionStartAt,omitempty"` + Title string `json:"title"` +} + +// HomeworkCreateRequestSchema0PublishedAt0 defines model for . +type HomeworkCreateRequestSchema0PublishedAt0 = string + +// HomeworkCreateRequestSchema0PublishedAt1 defines model for HomeworkCreateRequestSchema.0.PublishedAt.1. +type HomeworkCreateRequestSchema0PublishedAt1 string + +// HomeworkCreateRequestSchema_0_PublishedAt defines model for HomeworkCreateRequestSchema.0.PublishedAt. +type HomeworkCreateRequestSchema_0_PublishedAt struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema0SectionId0 defines model for . +type HomeworkCreateRequestSchema0SectionId0 = string + +// HomeworkCreateRequestSchema0SectionId1 defines model for . +type HomeworkCreateRequestSchema0SectionId1 = float32 + +// HomeworkCreateRequestSchema_0_SectionId defines model for HomeworkCreateRequestSchema.0.SectionId. +type HomeworkCreateRequestSchema_0_SectionId struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema0SectionJwId0 defines model for . +type HomeworkCreateRequestSchema0SectionJwId0 = string + +// HomeworkCreateRequestSchema0SectionJwId1 defines model for . +type HomeworkCreateRequestSchema0SectionJwId1 = float32 + +// HomeworkCreateRequestSchema_0_SectionJwId defines model for HomeworkCreateRequestSchema.0.SectionJwId. +type HomeworkCreateRequestSchema_0_SectionJwId struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema0SubmissionDueAt0 defines model for . +type HomeworkCreateRequestSchema0SubmissionDueAt0 = string + +// HomeworkCreateRequestSchema0SubmissionDueAt1 defines model for HomeworkCreateRequestSchema.0.SubmissionDueAt.1. +type HomeworkCreateRequestSchema0SubmissionDueAt1 string + +// HomeworkCreateRequestSchema_0_SubmissionDueAt defines model for HomeworkCreateRequestSchema.0.SubmissionDueAt. +type HomeworkCreateRequestSchema_0_SubmissionDueAt struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema0SubmissionStartAt0 defines model for . +type HomeworkCreateRequestSchema0SubmissionStartAt0 = string + +// HomeworkCreateRequestSchema0SubmissionStartAt1 defines model for HomeworkCreateRequestSchema.0.SubmissionStartAt.1. +type HomeworkCreateRequestSchema0SubmissionStartAt1 string + +// HomeworkCreateRequestSchema_0_SubmissionStartAt defines model for HomeworkCreateRequestSchema.0.SubmissionStartAt. +type HomeworkCreateRequestSchema_0_SubmissionStartAt struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema1 defines model for . +type HomeworkCreateRequestSchema1 struct { + Description *string `json:"description,omitempty"` + IsMajor *bool `json:"isMajor,omitempty"` + PublishedAt *HomeworkCreateRequestSchema_1_PublishedAt `json:"publishedAt,omitempty"` + RequiresTeam *bool `json:"requiresTeam,omitempty"` + SectionId *HomeworkCreateRequestSchema_1_SectionId `json:"sectionId,omitempty"` + SectionJwId HomeworkCreateRequestSchema_1_SectionJwId `json:"sectionJwId"` + SubmissionDueAt *HomeworkCreateRequestSchema_1_SubmissionDueAt `json:"submissionDueAt,omitempty"` + SubmissionStartAt *HomeworkCreateRequestSchema_1_SubmissionStartAt `json:"submissionStartAt,omitempty"` + Title string `json:"title"` +} + +// HomeworkCreateRequestSchema1PublishedAt0 defines model for . +type HomeworkCreateRequestSchema1PublishedAt0 = string + +// HomeworkCreateRequestSchema1PublishedAt1 defines model for HomeworkCreateRequestSchema.1.PublishedAt.1. +type HomeworkCreateRequestSchema1PublishedAt1 string + +// HomeworkCreateRequestSchema_1_PublishedAt defines model for HomeworkCreateRequestSchema.1.PublishedAt. +type HomeworkCreateRequestSchema_1_PublishedAt struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema1SectionId0 defines model for . +type HomeworkCreateRequestSchema1SectionId0 = string + +// HomeworkCreateRequestSchema1SectionId1 defines model for . +type HomeworkCreateRequestSchema1SectionId1 = float32 + +// HomeworkCreateRequestSchema_1_SectionId defines model for HomeworkCreateRequestSchema.1.SectionId. +type HomeworkCreateRequestSchema_1_SectionId struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema1SectionJwId0 defines model for . +type HomeworkCreateRequestSchema1SectionJwId0 = string + +// HomeworkCreateRequestSchema1SectionJwId1 defines model for . +type HomeworkCreateRequestSchema1SectionJwId1 = float32 + +// HomeworkCreateRequestSchema_1_SectionJwId defines model for HomeworkCreateRequestSchema.1.SectionJwId. +type HomeworkCreateRequestSchema_1_SectionJwId struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema1SubmissionDueAt0 defines model for . +type HomeworkCreateRequestSchema1SubmissionDueAt0 = string + +// HomeworkCreateRequestSchema1SubmissionDueAt1 defines model for HomeworkCreateRequestSchema.1.SubmissionDueAt.1. +type HomeworkCreateRequestSchema1SubmissionDueAt1 string + +// HomeworkCreateRequestSchema_1_SubmissionDueAt defines model for HomeworkCreateRequestSchema.1.SubmissionDueAt. +type HomeworkCreateRequestSchema_1_SubmissionDueAt struct { + union json.RawMessage +} + +// HomeworkCreateRequestSchema1SubmissionStartAt0 defines model for . +type HomeworkCreateRequestSchema1SubmissionStartAt0 = string + +// HomeworkCreateRequestSchema1SubmissionStartAt1 defines model for HomeworkCreateRequestSchema.1.SubmissionStartAt.1. +type HomeworkCreateRequestSchema1SubmissionStartAt1 string + +// HomeworkCreateRequestSchema_1_SubmissionStartAt defines model for HomeworkCreateRequestSchema.1.SubmissionStartAt. +type HomeworkCreateRequestSchema_1_SubmissionStartAt struct { + union json.RawMessage +} + +// HomeworkCreateResponseSchema defines model for homeworkCreateResponseSchema. +type HomeworkCreateResponseSchema struct { + Homework struct { + CommentCount int `json:"commentCount"` + Completion *struct { + CompletedAt time.Time `json:"completedAt"` + } `json:"completion"` + CreatedAt time.Time `json:"createdAt"` + CreatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"createdBy"` + CreatedById *string `json:"createdById"` + DeletedAt *time.Time `json:"deletedAt"` + DeletedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"deletedBy"` + DeletedById *string `json:"deletedById"` + Description *struct { + Content string `json:"content"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + LastEditedAt *time.Time `json:"lastEditedAt"` + LastEditedById *string `json:"lastEditedById"` + SectionId *int `json:"sectionId"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"description"` + Id string `json:"id"` + IsMajor bool `json:"isMajor"` + PublishedAt *time.Time `json:"publishedAt"` + RequiresTeam bool `json:"requiresTeam"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + SubmissionDueAt *time.Time `json:"submissionDueAt"` + SubmissionStartAt *time.Time `json:"submissionStartAt"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + UpdatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"updatedBy"` + UpdatedById *string `json:"updatedById"` + } `json:"homework"` + Id string `json:"id"` +} + +// HomeworkUpdateRequestSchema defines model for homeworkUpdateRequestSchema. +type HomeworkUpdateRequestSchema struct { + Description *string `json:"description,omitempty"` + IsMajor *bool `json:"isMajor,omitempty"` + PublishedAt *HomeworkUpdateRequestSchema_PublishedAt `json:"publishedAt,omitempty"` + RequiresTeam *bool `json:"requiresTeam,omitempty"` + SubmissionDueAt *HomeworkUpdateRequestSchema_SubmissionDueAt `json:"submissionDueAt,omitempty"` + SubmissionStartAt *HomeworkUpdateRequestSchema_SubmissionStartAt `json:"submissionStartAt,omitempty"` + Title *string `json:"title,omitempty"` +} + +// HomeworkUpdateRequestSchemaPublishedAt0 defines model for . +type HomeworkUpdateRequestSchemaPublishedAt0 = string + +// HomeworkUpdateRequestSchemaPublishedAt1 defines model for HomeworkUpdateRequestSchema.PublishedAt.1. +type HomeworkUpdateRequestSchemaPublishedAt1 string + +// HomeworkUpdateRequestSchema_PublishedAt defines model for HomeworkUpdateRequestSchema.PublishedAt. +type HomeworkUpdateRequestSchema_PublishedAt struct { + union json.RawMessage +} + +// HomeworkUpdateRequestSchemaSubmissionDueAt0 defines model for . +type HomeworkUpdateRequestSchemaSubmissionDueAt0 = string + +// HomeworkUpdateRequestSchemaSubmissionDueAt1 defines model for HomeworkUpdateRequestSchema.SubmissionDueAt.1. +type HomeworkUpdateRequestSchemaSubmissionDueAt1 string + +// HomeworkUpdateRequestSchema_SubmissionDueAt defines model for HomeworkUpdateRequestSchema.SubmissionDueAt. +type HomeworkUpdateRequestSchema_SubmissionDueAt struct { + union json.RawMessage +} + +// HomeworkUpdateRequestSchemaSubmissionStartAt0 defines model for . +type HomeworkUpdateRequestSchemaSubmissionStartAt0 = string + +// HomeworkUpdateRequestSchemaSubmissionStartAt1 defines model for HomeworkUpdateRequestSchema.SubmissionStartAt.1. +type HomeworkUpdateRequestSchemaSubmissionStartAt1 string + +// HomeworkUpdateRequestSchema_SubmissionStartAt defines model for HomeworkUpdateRequestSchema.SubmissionStartAt. +type HomeworkUpdateRequestSchema_SubmissionStartAt struct { + union json.RawMessage +} + +// HomeworkUpdateResponseSchema defines model for homeworkUpdateResponseSchema. +type HomeworkUpdateResponseSchema struct { + Homework struct { + CommentCount int `json:"commentCount"` + Completion *struct { + CompletedAt time.Time `json:"completedAt"` + } `json:"completion"` + CreatedAt time.Time `json:"createdAt"` + CreatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"createdBy"` + CreatedById *string `json:"createdById"` + DeletedAt *time.Time `json:"deletedAt"` + DeletedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"deletedBy"` + DeletedById *string `json:"deletedById"` + Description *struct { + Content string `json:"content"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + LastEditedAt *time.Time `json:"lastEditedAt"` + LastEditedById *string `json:"lastEditedById"` + SectionId *int `json:"sectionId"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"description"` + Id string `json:"id"` + IsMajor bool `json:"isMajor"` + PublishedAt *time.Time `json:"publishedAt"` + RequiresTeam bool `json:"requiresTeam"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + SubmissionDueAt *time.Time `json:"submissionDueAt"` + SubmissionStartAt *time.Time `json:"submissionStartAt"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + UpdatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"updatedBy"` + UpdatedById *string `json:"updatedById"` + } `json:"homework"` + Success bool `json:"success"` +} + +// HomeworksListResponseSchema defines model for homeworksListResponseSchema. +type HomeworksListResponseSchema struct { + AuditLogs []struct { + Action HomeworksListResponseSchemaAuditLogsAction `json:"action"` + Actor *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"actor"` + ActorId *string `json:"actorId"` + CreatedAt time.Time `json:"createdAt"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + SectionId int `json:"sectionId"` + TitleSnapshot string `json:"titleSnapshot"` + } `json:"auditLogs"` + Homeworks []struct { + CommentCount int `json:"commentCount"` + Completion *struct { + CompletedAt time.Time `json:"completedAt"` + } `json:"completion"` + CreatedAt time.Time `json:"createdAt"` + CreatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"createdBy"` + CreatedById *string `json:"createdById"` + DeletedAt *time.Time `json:"deletedAt"` + DeletedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"deletedBy"` + DeletedById *string `json:"deletedById"` + Description *struct { + Content string `json:"content"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + LastEditedAt *time.Time `json:"lastEditedAt"` + LastEditedById *string `json:"lastEditedById"` + SectionId *int `json:"sectionId"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"description"` + Id string `json:"id"` + IsMajor bool `json:"isMajor"` + PublishedAt *time.Time `json:"publishedAt"` + RequiresTeam bool `json:"requiresTeam"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + SubmissionDueAt *time.Time `json:"submissionDueAt"` + SubmissionStartAt *time.Time `json:"submissionStartAt"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + UpdatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"updatedBy"` + UpdatedById *string `json:"updatedById"` + } `json:"homeworks"` + Viewer struct { + Image *string `json:"image"` + IsAdmin bool `json:"isAdmin"` + IsAuthenticated bool `json:"isAuthenticated"` + IsSuspended bool `json:"isSuspended"` + Name *string `json:"name"` + SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` + SuspensionReason *string `json:"suspensionReason"` + UserId *string `json:"userId"` + } `json:"viewer"` +} + +// HomeworksListResponseSchemaAuditLogsAction defines model for HomeworksListResponseSchema.AuditLogs.Action. +type HomeworksListResponseSchemaAuditLogsAction string + +// IdResponseSchema defines model for idResponseSchema. +type IdResponseSchema struct { + Id string `json:"id"` +} + +// LocaleUpdateRequestSchema defines model for localeUpdateRequestSchema. +type LocaleUpdateRequestSchema struct { + Locale LocaleUpdateRequestSchemaLocale `json:"locale"` +} + +// LocaleUpdateRequestSchemaLocale defines model for LocaleUpdateRequestSchema.Locale. +type LocaleUpdateRequestSchemaLocale string + +// MatchSectionCodesRequestSchema defines model for matchSectionCodesRequestSchema. +type MatchSectionCodesRequestSchema struct { + Codes []string `json:"codes"` + SemesterId *MatchSectionCodesRequestSchema_SemesterId `json:"semesterId,omitempty"` +} + +// MatchSectionCodesRequestSchemaSemesterId0 defines model for . +type MatchSectionCodesRequestSchemaSemesterId0 = string + +// MatchSectionCodesRequestSchemaSemesterId1 defines model for . +type MatchSectionCodesRequestSchemaSemesterId1 = float32 + +// MatchSectionCodesRequestSchema_SemesterId defines model for MatchSectionCodesRequestSchema.SemesterId. +type MatchSectionCodesRequestSchema_SemesterId struct { + union json.RawMessage +} + +// MatchSectionCodesResponseSchema defines model for matchSectionCodesResponseSchema. +type MatchSectionCodesResponseSchema struct { + MatchedCodes []string `json:"matchedCodes"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartment *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"openDepartment"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + Semester struct { + Code *string `json:"code"` + Id int `json:"id"` + NameCn *string `json:"nameCn"` + } `json:"semester"` + Suggestions map[string][]string `json:"suggestions"` + Total int `json:"total"` + UnmatchedCodes []string `json:"unmatchedCodes"` +} + +// MeResponseSchema defines model for meResponseSchema. +type MeResponseSchema struct { + CreatedAt time.Time `json:"createdAt"` + Email *string `json:"email"` + Id string `json:"id"` + Image *string `json:"image"` + IsAdmin bool `json:"isAdmin"` + Name *string `json:"name"` + UpdatedAt time.Time `json:"updatedAt"` + Username *string `json:"username"` +} + +// MetadataResponseSchema defines model for metadataResponseSchema. +type MetadataResponseSchema struct { + Campuses []struct { + Buildings []struct { + CampusId *int `json:"campusId"` + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"buildings"` + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"campuses"` + ClassTypes []struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classTypes"` + CourseCategories []struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"courseCategories"` + CourseClassifies []struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"courseClassifies"` + CourseGradations []struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"courseGradations"` + CourseTypes []struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"courseTypes"` + EducationLevels []struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevels"` + ExamModes []struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"examModes"` + TeachLanguages []struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"teachLanguages"` +} + +// OauthDeviceAuthorizationRequestSchema defines model for oauthDeviceAuthorizationRequestSchema. +type OauthDeviceAuthorizationRequestSchema struct { + ClientId string `json:"client_id"` + Resource *OauthDeviceAuthorizationRequestSchema_Resource `json:"resource,omitempty"` + Scope *string `json:"scope,omitempty"` +} + +// OauthDeviceAuthorizationRequestSchemaResource0 defines model for . +type OauthDeviceAuthorizationRequestSchemaResource0 = string + +// OauthDeviceAuthorizationRequestSchemaResource1 defines model for . +type OauthDeviceAuthorizationRequestSchemaResource1 = []string + +// OauthDeviceAuthorizationRequestSchema_Resource defines model for OauthDeviceAuthorizationRequestSchema.Resource. +type OauthDeviceAuthorizationRequestSchema_Resource struct { + union json.RawMessage +} + +// OauthDeviceAuthorizationResponseSchema defines model for oauthDeviceAuthorizationResponseSchema. +type OauthDeviceAuthorizationResponseSchema struct { + DeviceCode string `json:"device_code"` + ExpiresIn int `json:"expires_in"` + Interval int `json:"interval"` + UserCode string `json:"user_code"` + VerificationUri string `json:"verification_uri"` + VerificationUriComplete string `json:"verification_uri_complete"` +} + +// OauthErrorResponseSchema defines model for oauthErrorResponseSchema. +type OauthErrorResponseSchema struct { + Error string `json:"error"` + ErrorDescription *string `json:"error_description,omitempty"` +} + +// OauthTokenRequestSchema defines model for oauthTokenRequestSchema. +type OauthTokenRequestSchema struct { + ClientId *string `json:"client_id,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` + Code *string `json:"code,omitempty"` + CodeVerifier *string `json:"code_verifier,omitempty"` + DeviceCode *string `json:"device_code,omitempty"` + GrantType string `json:"grant_type"` + RedirectUri *string `json:"redirect_uri,omitempty"` + RefreshToken *string `json:"refresh_token,omitempty"` + Resource *OauthTokenRequestSchema_Resource `json:"resource,omitempty"` + Scope *string `json:"scope,omitempty"` +} + +// OauthTokenRequestSchemaResource0 defines model for . +type OauthTokenRequestSchemaResource0 = string + +// OauthTokenRequestSchemaResource1 defines model for . +type OauthTokenRequestSchemaResource1 = []string + +// OauthTokenRequestSchema_Resource defines model for OauthTokenRequestSchema.Resource. +type OauthTokenRequestSchema_Resource struct { + union json.RawMessage +} + +// OauthTokenResponseSchema defines model for oauthTokenResponseSchema. +type OauthTokenResponseSchema struct { + AccessToken string `json:"access_token"` + ExpiresAt *int `json:"expires_at,omitempty"` + ExpiresIn int `json:"expires_in"` + IdToken *string `json:"id_token,omitempty"` + RefreshToken *string `json:"refresh_token,omitempty"` + Scope *string `json:"scope,omitempty"` + TokenType OauthTokenResponseSchemaTokenType `json:"token_type"` +} + +// OauthTokenResponseSchemaTokenType defines model for OauthTokenResponseSchema.TokenType. +type OauthTokenResponseSchemaTokenType string + +// OpenApiDocumentResponseSchema defines model for openApiDocumentResponseSchema. +type OpenApiDocumentResponseSchema struct { + Info struct { + Description *string `json:"description,omitempty"` + Title string `json:"title"` + Version string `json:"version"` + } `json:"info"` + Openapi string `json:"openapi"` + Paths map[string]interface{} `json:"paths"` + Servers *[]struct { + Description *string `json:"description,omitempty"` + Url string `json:"url"` + } `json:"servers,omitempty"` +} + +// OpenApiErrorSchema defines model for openApiErrorSchema. +type OpenApiErrorSchema struct { + Error string `json:"error"` +} + +// PaginatedCourseResponseSchema defines model for paginatedCourseResponseSchema. +type PaginatedCourseResponseSchema struct { + Data []struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"data"` + Pagination struct { + Page int `json:"page"` + PageSize int `json:"pageSize"` + Total int `json:"total"` + TotalPages int `json:"totalPages"` + } `json:"pagination"` +} + +// PaginatedScheduleResponseSchema defines model for paginatedScheduleResponseSchema. +type PaginatedScheduleResponseSchema struct { + Data []struct { + CustomPlace *string `json:"customPlace"` + Date *time.Time `json:"date"` + EndTime string `json:"endTime"` + EndUnit int `json:"endUnit"` + ExerciseClass *bool `json:"exerciseClass"` + Experiment *string `json:"experiment"` + Id int `json:"id"` + LessonType *string `json:"lessonType"` + Periods int `json:"periods"` + Room *struct { + Building *struct { + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"building"` + BuildingId *int `json:"buildingId"` + Code string `json:"code"` + Floor *int `json:"floor"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Remark *string `json:"remark"` + RoomType *struct { + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"roomType"` + RoomTypeId *int `json:"roomTypeId"` + Seats int `json:"seats"` + SeatsForSection int `json:"seatsForSection"` + Virtual bool `json:"virtual"` + } `json:"room"` + RoomId *int `json:"roomId"` + ScheduleGroup struct { + ActualPeriods int `json:"actualPeriods"` + Id int `json:"id"` + IsDefault bool `json:"isDefault"` + JwId int `json:"jwId"` + LimitCount int `json:"limitCount"` + No int `json:"no"` + SectionId int `json:"sectionId"` + StdCount int `json:"stdCount"` + } `json:"scheduleGroup"` + ScheduleGroupId int `json:"scheduleGroupId"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + StartTime string `json:"startTime"` + StartUnit int `json:"startUnit"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + Department *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"department"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + WeekIndex int `json:"weekIndex"` + Weekday int `json:"weekday"` + } `json:"data"` + Pagination struct { + Page int `json:"page"` + PageSize int `json:"pageSize"` + Total int `json:"total"` + TotalPages int `json:"totalPages"` + } `json:"pagination"` +} + +// PaginatedSectionResponseSchema defines model for paginatedSectionResponseSchema. +type PaginatedSectionResponseSchema struct { + Data []struct { + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + OpenDepartmentId *int `json:"openDepartmentId"` + Semester *struct { + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + } `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + Teachers []struct { + Code *string `json:"code"` + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + PersonId *int `json:"personId"` + TeacherId *int `json:"teacherId"` + } `json:"teachers"` + } `json:"data"` + Pagination struct { + Page int `json:"page"` + PageSize int `json:"pageSize"` + Total int `json:"total"` + TotalPages int `json:"totalPages"` + } `json:"pagination"` +} + +// PaginatedSemesterResponseSchema defines model for paginatedSemesterResponseSchema. +type PaginatedSemesterResponseSchema struct { + Data []SemesterSchema `json:"data"` + Pagination struct { + Page int `json:"page"` + PageSize int `json:"pageSize"` + Total int `json:"total"` + TotalPages int `json:"totalPages"` + } `json:"pagination"` +} + +// PaginatedTeacherResponseSchema defines model for paginatedTeacherResponseSchema. +type PaginatedTeacherResponseSchema struct { + Data []struct { + UnderscoreCount struct { + Sections int `json:"sections"` + } `json:"_count"` + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + Department *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"department"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitle *struct { + Code string `json:"code"` + Enabled *bool `json:"enabled"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"teacherTitle"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"data"` + Pagination struct { + Page int `json:"page"` + PageSize int `json:"pageSize"` + Total int `json:"total"` + TotalPages int `json:"totalPages"` + } `json:"pagination"` +} + +// PublicUserProfileResponseSchema defines model for publicUserProfileResponseSchema. +type PublicUserProfileResponseSchema struct { + SectionCount int `json:"sectionCount"` + TotalContributions int `json:"totalContributions"` + User struct { + UnderscoreCount struct { + Comments int `json:"comments"` + HomeworksCreated int `json:"homeworksCreated"` + SubscribedSections int `json:"subscribedSections"` + Uploads int `json:"uploads"` + } `json:"_count"` + CreatedAt time.Time `json:"createdAt"` + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"user"` + Weeks [][]struct { + Count int `json:"count"` + Date string `json:"date"` + } `json:"weeks"` +} + +// ReadinessResponseSchema defines model for readinessResponseSchema. +type ReadinessResponseSchema struct { + Checks struct { + Database struct { + DurationMs float32 `json:"durationMs"` + Status ReadinessResponseSchemaChecksDatabaseStatus `json:"status"` + } `json:"database"` + Storage struct { + Binding string `json:"binding"` + Reason *string `json:"reason,omitempty"` + Status string `json:"status"` + } `json:"storage"` + } `json:"checks"` + Status ReadinessResponseSchemaStatus `json:"status"` + UptimeSeconds float32 `json:"uptimeSeconds"` +} + +// ReadinessResponseSchemaChecksDatabaseStatus defines model for ReadinessResponseSchema.Checks.Database.Status. +type ReadinessResponseSchemaChecksDatabaseStatus string + +// ReadinessResponseSchemaStatus defines model for ReadinessResponseSchema.Status. +type ReadinessResponseSchemaStatus string + +// SectionDetailSchema defines model for sectionDetailSchema. +type SectionDetailSchema struct { + ActualPeriods *int `json:"actualPeriods"` + AdminClasses []struct { + AbbrEn *string `json:"abbrEn"` + AbbrZh *string `json:"abbrZh"` + Code *string `json:"code"` + Enabled *bool `json:"enabled"` + Grade *string `json:"grade"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` NameEn *string `json:"nameEn"` PlanCount *int `json:"planCount"` StdCount *int `json:"stdCount"` @@ -3063,19 +6134,12 @@ type SectionDetailSchema struct { WeekIndex int `json:"weekIndex"` Weekday int `json:"weekday"` } `json:"schedules"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` TeachLanguage *struct { Id int `json:"id"` NameCn string `json:"nameCn"` @@ -3157,690 +6221,3799 @@ type SectionDetailSchema struct { TimesPerWeek *int `json:"timesPerWeek"` } -// SemesterSchema defines model for semesterSchema. -type SemesterSchema struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` +// SemesterSchema defines model for semesterSchema. +type SemesterSchema struct { + Code string `json:"code"` + EndDate *time.Time `json:"endDate"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + StartDate *time.Time `json:"startDate"` +} + +// SubscribedHomeworksResponseSchema defines model for subscribedHomeworksResponseSchema. +type SubscribedHomeworksResponseSchema struct { + AuditLogs []struct { + Action SubscribedHomeworksResponseSchemaAuditLogsAction `json:"action"` + Actor *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"actor"` + ActorId *string `json:"actorId"` + CreatedAt time.Time `json:"createdAt"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + SectionId int `json:"sectionId"` + TitleSnapshot string `json:"titleSnapshot"` + } `json:"auditLogs"` + Homeworks []struct { + CommentCount int `json:"commentCount"` + Completion *struct { + CompletedAt time.Time `json:"completedAt"` + } `json:"completion"` + CreatedAt time.Time `json:"createdAt"` + CreatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"createdBy"` + CreatedById *string `json:"createdById"` + DeletedAt *time.Time `json:"deletedAt"` + DeletedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"deletedBy"` + DeletedById *string `json:"deletedById"` + Description *struct { + Content string `json:"content"` + CourseId *int `json:"courseId"` + CreatedAt time.Time `json:"createdAt"` + HomeworkId *string `json:"homeworkId"` + Id string `json:"id"` + LastEditedAt *time.Time `json:"lastEditedAt"` + LastEditedById *string `json:"lastEditedById"` + SectionId *int `json:"sectionId"` + TeacherId *int `json:"teacherId"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"description"` + Id string `json:"id"` + IsMajor bool `json:"isMajor"` + PublishedAt *time.Time `json:"publishedAt"` + RequiresTeam bool `json:"requiresTeam"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + SubmissionDueAt *time.Time `json:"submissionDueAt"` + SubmissionStartAt *time.Time `json:"submissionStartAt"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + UpdatedBy *struct { + Id string `json:"id"` + Image *string `json:"image"` + Name *string `json:"name"` + Username *string `json:"username"` + } `json:"updatedBy"` + UpdatedById *string `json:"updatedById"` + } `json:"homeworks"` + SectionIds []int `json:"sectionIds"` + Viewer struct { + Image *string `json:"image"` + IsAdmin bool `json:"isAdmin"` + IsAuthenticated bool `json:"isAuthenticated"` + IsSuspended bool `json:"isSuspended"` + Name *string `json:"name"` + SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` + SuspensionReason *string `json:"suspensionReason"` + UserId *string `json:"userId"` + } `json:"viewer"` +} + +// SubscribedHomeworksResponseSchemaAuditLogsAction defines model for SubscribedHomeworksResponseSchema.AuditLogs.Action. +type SubscribedHomeworksResponseSchemaAuditLogsAction string + +// SubscribedSchedulesResponseSchema defines model for subscribedSchedulesResponseSchema. +type SubscribedSchedulesResponseSchema struct { + Schedules []struct { + CustomPlace *string `json:"customPlace"` + Date *time.Time `json:"date"` + EndTime string `json:"endTime"` + EndUnit int `json:"endUnit"` + ExerciseClass *bool `json:"exerciseClass"` + Experiment *string `json:"experiment"` + Id int `json:"id"` + LessonType *string `json:"lessonType"` + Periods int `json:"periods"` + Room *struct { + Building *struct { + Campus *struct { + Code *string `json:"code"` + Id int `json:"id"` + JwId *int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"campus"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"building"` + BuildingId *int `json:"buildingId"` + Code string `json:"code"` + Floor *int `json:"floor"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + Remark *string `json:"remark"` + RoomType *struct { + Code string `json:"code"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"roomType"` + RoomTypeId *int `json:"roomTypeId"` + Seats int `json:"seats"` + SeatsForSection int `json:"seatsForSection"` + Virtual bool `json:"virtual"` + } `json:"room"` + RoomId *int `json:"roomId"` + ScheduleGroup struct { + ActualPeriods int `json:"actualPeriods"` + Id int `json:"id"` + IsDefault bool `json:"isDefault"` + JwId int `json:"jwId"` + LimitCount int `json:"limitCount"` + No int `json:"no"` + SectionId int `json:"sectionId"` + StdCount int `json:"stdCount"` + } `json:"scheduleGroup"` + ScheduleGroupId int `json:"scheduleGroupId"` + Section struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + CategoryId *int `json:"categoryId"` + ClassTypeId *int `json:"classTypeId"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevelId *int `json:"educationLevelId"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"section"` + SectionId int `json:"sectionId"` + StartTime string `json:"startTime"` + StartUnit int `json:"startUnit"` + Teachers []struct { + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + Department *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + } `json:"department"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + NamePrimary string `json:"namePrimary"` + NameSecondary *string `json:"nameSecondary"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + TeacherId *int `json:"teacherId"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` + } `json:"teachers"` + WeekIndex int `json:"weekIndex"` + Weekday int `json:"weekday"` + } `json:"schedules"` +} + +// SuccessResponseSchema defines model for successResponseSchema. +type SuccessResponseSchema struct { + Success bool `json:"success"` +} + +// TeacherDetailSchema defines model for teacherDetailSchema. +type TeacherDetailSchema struct { + UnderscoreCount struct { + Sections int `json:"sections"` + } `json:"_count"` + Address *string `json:"address"` + Age *int `json:"age"` + Code *string `json:"code"` + Department *struct { + Code string `json:"code"` + Id int `json:"id"` + IsCollege *bool `json:"isCollege"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"department"` + DepartmentId *int `json:"departmentId"` + Email *string `json:"email"` + Id int `json:"id"` + Mobile *string `json:"mobile"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + PersonId *int `json:"personId"` + Postcode *string `json:"postcode"` + Qq *string `json:"qq"` + Sections []struct { + ActualPeriods *int `json:"actualPeriods"` + BizTypeId *int `json:"bizTypeId"` + CampusId *int `json:"campusId"` + Code string `json:"code"` + Course struct { + Category *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"category"` + CategoryId *int `json:"categoryId"` + ClassType *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classType"` + ClassTypeId *int `json:"classTypeId"` + Classify *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"classify"` + ClassifyId *int `json:"classifyId"` + Code string `json:"code"` + EducationLevel *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"educationLevel"` + EducationLevelId *int `json:"educationLevelId"` + Gradation *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"gradation"` + GradationId *int `json:"gradationId"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + Type *struct { + Id int `json:"id"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"type"` + TypeId *int `json:"typeId"` + } `json:"course"` + CourseId int `json:"courseId"` + Credits *float32 `json:"credits"` + DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` + DateTimePlaceText *string `json:"dateTimePlaceText"` + DesignPeriods *float32 `json:"designPeriods"` + ExamModeId *int `json:"examModeId"` + ExperimentPeriods *float32 `json:"experimentPeriods"` + GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` + Id int `json:"id"` + JwId int `json:"jwId"` + LimitCount *int `json:"limitCount"` + MachinePeriods *float32 `json:"machinePeriods"` + OpenDepartmentId *int `json:"openDepartmentId"` + Period *int `json:"period"` + PeriodsPerWeek *int `json:"periodsPerWeek"` + PracticePeriods *float32 `json:"practicePeriods"` + Remark *string `json:"remark"` + RoomTypeId *int `json:"roomTypeId"` + ScheduleJsonParams interface{} `json:"scheduleJsonParams"` + ScheduleRemark *string `json:"scheduleRemark"` + ScheduleState *string `json:"scheduleState"` + SelectedStdCount *int `json:"selectedStdCount"` + Semester *SemesterSchema `json:"semester"` + SemesterId *int `json:"semesterId"` + StdCount *int `json:"stdCount"` + SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` + SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` + TeachLanguageId *int `json:"teachLanguageId"` + TestPeriods *float32 `json:"testPeriods"` + TheoryPeriods *float32 `json:"theoryPeriods"` + TimesPerWeek *int `json:"timesPerWeek"` + } `json:"sections"` + TeacherId *int `json:"teacherId"` + TeacherTitle *struct { + Code string `json:"code"` + Enabled *bool `json:"enabled"` + Id int `json:"id"` + JwId int `json:"jwId"` + NameCn string `json:"nameCn"` + NameEn *string `json:"nameEn"` + } `json:"teacherTitle"` + TeacherTitleId *int `json:"teacherTitleId"` + Telephone *string `json:"telephone"` + Wechat *string `json:"wechat"` +} + +// TodoBatchDeleteRequestSchema defines model for todoBatchDeleteRequestSchema. +type TodoBatchDeleteRequestSchema struct { + Ids []string `json:"ids"` +} + +// TodoBatchDeleteResponseSchema defines model for todoBatchDeleteResponseSchema. +type TodoBatchDeleteResponseSchema struct { + Results []TodoBatchDeleteResponseSchema_Results_Item `json:"results"` +} + +// TodoBatchDeleteResponseSchemaResults0 defines model for . +type TodoBatchDeleteResponseSchemaResults0 struct { + Id string `json:"id"` + Success TodoBatchDeleteResponseSchemaResults0Success `json:"success"` +} + +// TodoBatchDeleteResponseSchemaResults0Success defines model for TodoBatchDeleteResponseSchema.Results.0.Success. +type TodoBatchDeleteResponseSchemaResults0Success bool + +// TodoBatchDeleteResponseSchemaResults1 defines model for . +type TodoBatchDeleteResponseSchemaResults1 struct { + Error struct { + Code TodoBatchDeleteResponseSchemaResults1ErrorCode `json:"code"` + Message string `json:"message"` + } `json:"error"` + Id string `json:"id"` + Success TodoBatchDeleteResponseSchemaResults1Success `json:"success"` +} + +// TodoBatchDeleteResponseSchemaResults1ErrorCode defines model for TodoBatchDeleteResponseSchema.Results.1.Error.Code. +type TodoBatchDeleteResponseSchemaResults1ErrorCode string + +// TodoBatchDeleteResponseSchemaResults1Success defines model for TodoBatchDeleteResponseSchema.Results.1.Success. +type TodoBatchDeleteResponseSchemaResults1Success bool + +// TodoBatchDeleteResponseSchema_Results_Item defines model for todoBatchDeleteResponseSchema.results.Item. +type TodoBatchDeleteResponseSchema_Results_Item struct { + union json.RawMessage +} + +// TodoCompletionBatchRequestSchema defines model for todoCompletionBatchRequestSchema. +type TodoCompletionBatchRequestSchema struct { + Items []struct { + Completed bool `json:"completed"` + TodoId string `json:"todoId"` + } `json:"items"` +} + +// TodoCompletionBatchResponseSchema defines model for todoCompletionBatchResponseSchema. +type TodoCompletionBatchResponseSchema struct { + Results []TodoCompletionBatchResponseSchema_Results_Item `json:"results"` +} + +// TodoCompletionBatchResponseSchemaResults0 defines model for . +type TodoCompletionBatchResponseSchemaResults0 struct { + Completed bool `json:"completed"` + Success TodoCompletionBatchResponseSchemaResults0Success `json:"success"` + Todo struct { + Completed bool `json:"completed"` + Content *string `json:"content"` + CreatedAt time.Time `json:"createdAt"` + DueAt *time.Time `json:"dueAt"` + Id string `json:"id"` + Priority TodoCompletionBatchResponseSchemaResults0TodoPriority `json:"priority"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"todo"` + TodoId string `json:"todoId"` +} + +// TodoCompletionBatchResponseSchemaResults0Success defines model for TodoCompletionBatchResponseSchema.Results.0.Success. +type TodoCompletionBatchResponseSchemaResults0Success bool + +// TodoCompletionBatchResponseSchemaResults0TodoPriority defines model for TodoCompletionBatchResponseSchema.Results.0.Todo.Priority. +type TodoCompletionBatchResponseSchemaResults0TodoPriority string + +// TodoCompletionBatchResponseSchemaResults1 defines model for . +type TodoCompletionBatchResponseSchemaResults1 struct { + Completed bool `json:"completed"` + Error struct { + Code TodoCompletionBatchResponseSchemaResults1ErrorCode `json:"code"` + Message string `json:"message"` + } `json:"error"` + Success TodoCompletionBatchResponseSchemaResults1Success `json:"success"` + TodoId string `json:"todoId"` +} + +// TodoCompletionBatchResponseSchemaResults1ErrorCode defines model for TodoCompletionBatchResponseSchema.Results.1.Error.Code. +type TodoCompletionBatchResponseSchemaResults1ErrorCode string + +// TodoCompletionBatchResponseSchemaResults1Success defines model for TodoCompletionBatchResponseSchema.Results.1.Success. +type TodoCompletionBatchResponseSchemaResults1Success bool + +// TodoCompletionBatchResponseSchema_Results_Item defines model for todoCompletionBatchResponseSchema.results.Item. +type TodoCompletionBatchResponseSchema_Results_Item struct { + union json.RawMessage +} + +// TodoCreateRequestSchema defines model for todoCreateRequestSchema. +type TodoCreateRequestSchema struct { + Content *string `json:"content,omitempty"` + DueAt *TodoCreateRequestSchema_DueAt `json:"dueAt,omitempty"` + Priority *TodoCreateRequestSchemaPriority `json:"priority,omitempty"` + Title string `json:"title"` +} + +// TodoCreateRequestSchemaDueAt0 defines model for . +type TodoCreateRequestSchemaDueAt0 = string + +// TodoCreateRequestSchemaDueAt1 defines model for TodoCreateRequestSchema.DueAt.1. +type TodoCreateRequestSchemaDueAt1 string + +// TodoCreateRequestSchema_DueAt defines model for TodoCreateRequestSchema.DueAt. +type TodoCreateRequestSchema_DueAt struct { + union json.RawMessage +} + +// TodoCreateRequestSchemaPriority defines model for TodoCreateRequestSchema.Priority. +type TodoCreateRequestSchemaPriority string + +// TodoUpdateRequestSchema defines model for todoUpdateRequestSchema. +type TodoUpdateRequestSchema struct { + Completed *bool `json:"completed,omitempty"` + Content *string `json:"content,omitempty"` + DueAt *TodoUpdateRequestSchema_DueAt `json:"dueAt,omitempty"` + Priority *TodoUpdateRequestSchemaPriority `json:"priority,omitempty"` + Title *string `json:"title,omitempty"` +} + +// TodoUpdateRequestSchemaDueAt0 defines model for . +type TodoUpdateRequestSchemaDueAt0 = string + +// TodoUpdateRequestSchemaDueAt1 defines model for TodoUpdateRequestSchema.DueAt.1. +type TodoUpdateRequestSchemaDueAt1 string + +// TodoUpdateRequestSchema_DueAt defines model for TodoUpdateRequestSchema.DueAt. +type TodoUpdateRequestSchema_DueAt struct { + union json.RawMessage +} + +// TodoUpdateRequestSchemaPriority defines model for TodoUpdateRequestSchema.Priority. +type TodoUpdateRequestSchemaPriority string + +// TodoUpdateResponseSchema defines model for todoUpdateResponseSchema. +type TodoUpdateResponseSchema struct { + Success bool `json:"success"` + Todo struct { + Completed bool `json:"completed"` + Content *string `json:"content"` + CreatedAt time.Time `json:"createdAt"` + DueAt *time.Time `json:"dueAt"` + Id string `json:"id"` + Priority TodoUpdateResponseSchemaTodoPriority `json:"priority"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"todo"` +} + +// TodoUpdateResponseSchemaTodoPriority defines model for TodoUpdateResponseSchema.Todo.Priority. +type TodoUpdateResponseSchemaTodoPriority string + +// TodosListResponseSchema defines model for todosListResponseSchema. +type TodosListResponseSchema struct { + Counts struct { + Completed int `json:"completed"` + Incomplete int `json:"incomplete"` + Overdue int `json:"overdue"` + } `json:"counts"` + Todos []struct { + Completed bool `json:"completed"` + Content *string `json:"content"` + CreatedAt time.Time `json:"createdAt"` + DueAt *time.Time `json:"dueAt"` + Id string `json:"id"` + Priority TodosListResponseSchemaTodosPriority `json:"priority"` + Title string `json:"title"` + UpdatedAt time.Time `json:"updatedAt"` + } `json:"todos"` +} + +// TodosListResponseSchemaTodosPriority defines model for TodosListResponseSchema.Todos.Priority. +type TodosListResponseSchemaTodosPriority string + +// UploadCompleteRequestSchema defines model for uploadCompleteRequestSchema. +type UploadCompleteRequestSchema struct { + ContentType *string `json:"contentType,omitempty"` + Filename string `json:"filename"` + Key string `json:"key"` +} + +// UploadCompleteResponseSchema defines model for uploadCompleteResponseSchema. +type UploadCompleteResponseSchema struct { + QuotaBytes int `json:"quotaBytes"` + Upload struct { + CreatedAt time.Time `json:"createdAt"` + Filename string `json:"filename"` + Id string `json:"id"` + Key string `json:"key"` + Size int `json:"size"` + } `json:"upload"` + UsedBytes int `json:"usedBytes"` +} + +// UploadCreateRequestSchema defines model for uploadCreateRequestSchema. +type UploadCreateRequestSchema struct { + ContentType *string `json:"contentType,omitempty"` + Filename string `json:"filename"` + Size UploadCreateRequestSchema_Size `json:"size"` +} + +// UploadCreateRequestSchemaSize0 defines model for . +type UploadCreateRequestSchemaSize0 = string + +// UploadCreateRequestSchemaSize1 defines model for . +type UploadCreateRequestSchemaSize1 = float32 + +// UploadCreateRequestSchema_Size defines model for UploadCreateRequestSchema.Size. +type UploadCreateRequestSchema_Size struct { + union json.RawMessage +} + +// UploadCreateResponseSchema defines model for uploadCreateResponseSchema. +type UploadCreateResponseSchema struct { + Key string `json:"key"` + MaxFileSizeBytes int `json:"maxFileSizeBytes"` + QuotaBytes int `json:"quotaBytes"` + Url string `json:"url"` + UsedBytes int `json:"usedBytes"` +} + +// UploadDeleteResponseSchema defines model for uploadDeleteResponseSchema. +type UploadDeleteResponseSchema struct { + DeletedId string `json:"deletedId"` + DeletedSize int `json:"deletedSize"` +} + +// UploadRenameRequestSchema defines model for uploadRenameRequestSchema. +type UploadRenameRequestSchema struct { + Filename string `json:"filename"` +} + +// UploadRenameResponseSchema defines model for uploadRenameResponseSchema. +type UploadRenameResponseSchema struct { + Upload struct { + CreatedAt time.Time `json:"createdAt"` + Filename string `json:"filename"` + Id string `json:"id"` + Key string `json:"key"` + Size int `json:"size"` + } `json:"upload"` +} + +// UploadsListResponseSchema defines model for uploadsListResponseSchema. +type UploadsListResponseSchema struct { + MaxFileSizeBytes int `json:"maxFileSizeBytes"` + QuotaBytes int `json:"quotaBytes"` + Uploads []struct { + CreatedAt time.Time `json:"createdAt"` + Filename string `json:"filename"` + Id string `json:"id"` + Key string `json:"key"` + Size int `json:"size"` + } `json:"uploads"` + UsedBytes int `json:"usedBytes"` +} + +// ListAdminCommentsParams defines parameters for ListAdminComments. +type ListAdminCommentsParams struct { + Status *ListAdminCommentsParamsStatus `form:"status,omitempty" json:"status,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// ListAdminCommentsParamsStatus defines parameters for ListAdminComments. +type ListAdminCommentsParamsStatus string + +// ListAdminDescriptionsParams defines parameters for ListAdminDescriptions. +type ListAdminDescriptionsParams struct { + TargetType *ListAdminDescriptionsParamsTargetType `form:"targetType,omitempty" json:"targetType,omitempty"` + HasContent *ListAdminDescriptionsParamsHasContent `form:"hasContent,omitempty" json:"hasContent,omitempty"` + Search *string `form:"search,omitempty" json:"search,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// ListAdminDescriptionsParamsTargetType defines parameters for ListAdminDescriptions. +type ListAdminDescriptionsParamsTargetType string + +// ListAdminDescriptionsParamsHasContent defines parameters for ListAdminDescriptions. +type ListAdminDescriptionsParamsHasContent string + +// ListAdminHomeworksParams defines parameters for ListAdminHomeworks. +type ListAdminHomeworksParams struct { + Status *ListAdminHomeworksParamsStatus `form:"status,omitempty" json:"status,omitempty"` + Search *string `form:"search,omitempty" json:"search,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// ListAdminHomeworksParamsStatus defines parameters for ListAdminHomeworks. +type ListAdminHomeworksParamsStatus string + +// ListAdminUsersParams defines parameters for ListAdminUsers. +type ListAdminUsersParams struct { + Search *string `form:"search,omitempty" json:"search,omitempty"` + Page *int64 `form:"page,omitempty" json:"page,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// QueryBusParams defines parameters for QueryBus. +type QueryBusParams struct { + VersionKey *string `form:"versionKey,omitempty" json:"versionKey,omitempty"` +} + +// GetApiBusNextParams defines parameters for GetApiBusNext. +type GetApiBusNextParams struct { + OriginCampusId int64 `form:"originCampusId" json:"originCampusId"` + DestinationCampusId int64 `form:"destinationCampusId" json:"destinationCampusId"` + AtTime *string `form:"atTime,omitempty" json:"atTime,omitempty"` + DayType *GetApiBusNextParamsDayType `form:"dayType,omitempty" json:"dayType,omitempty"` + IncludeDeparted *GetApiBusNextParamsIncludeDeparted `form:"includeDeparted,omitempty" json:"includeDeparted,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` + VersionKey *string `form:"versionKey,omitempty" json:"versionKey,omitempty"` + Locale *GetApiBusNextParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` +} + +// GetApiBusNextParamsDayType defines parameters for GetApiBusNext. +type GetApiBusNextParamsDayType string + +// GetApiBusNextParamsIncludeDeparted defines parameters for GetApiBusNext. +type GetApiBusNextParamsIncludeDeparted string + +// GetApiBusNextParamsLocale defines parameters for GetApiBusNext. +type GetApiBusNextParamsLocale string + +// GetApiBusRoutesParams defines parameters for GetApiBusRoutes. +type GetApiBusRoutesParams struct { + OriginCampusId *int64 `form:"originCampusId,omitempty" json:"originCampusId,omitempty"` + DestinationCampusId *int64 `form:"destinationCampusId,omitempty" json:"destinationCampusId,omitempty"` + VersionKey *string `form:"versionKey,omitempty" json:"versionKey,omitempty"` + Locale *GetApiBusRoutesParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` +} + +// GetApiBusRoutesParamsLocale defines parameters for GetApiBusRoutes. +type GetApiBusRoutesParamsLocale string + +// ListCommentsParams defines parameters for ListComments. +type ListCommentsParams struct { + TargetType ListCommentsParamsTargetType `form:"targetType" json:"targetType"` + TargetId *string `form:"targetId,omitempty" json:"targetId,omitempty"` + SectionId *int64 `form:"sectionId,omitempty" json:"sectionId,omitempty"` + SectionJwId *int64 `form:"sectionJwId,omitempty" json:"sectionJwId,omitempty"` + CourseJwId *int64 `form:"courseJwId,omitempty" json:"courseJwId,omitempty"` + TeacherId *int64 `form:"teacherId,omitempty" json:"teacherId,omitempty"` + HomeworkId *string `form:"homeworkId,omitempty" json:"homeworkId,omitempty"` + SectionTeacherId *int64 `form:"sectionTeacherId,omitempty" json:"sectionTeacherId,omitempty"` +} + +// ListCommentsParamsTargetType defines parameters for ListComments. +type ListCommentsParamsTargetType string + +// RemoveCommentReactionParams defines parameters for RemoveCommentReaction. +type RemoveCommentReactionParams struct { + Type RemoveCommentReactionParamsType `form:"type" json:"type"` +} + +// RemoveCommentReactionParamsType defines parameters for RemoveCommentReaction. +type RemoveCommentReactionParamsType string + +// ListCoursesParams defines parameters for ListCourses. +type ListCoursesParams struct { + Search *string `form:"search,omitempty" json:"search,omitempty"` + EducationLevelId *int64 `form:"educationLevelId,omitempty" json:"educationLevelId,omitempty"` + CategoryId *int64 `form:"categoryId,omitempty" json:"categoryId,omitempty"` + ClassTypeId *int64 `form:"classTypeId,omitempty" json:"classTypeId,omitempty"` + Page *int64 `form:"page,omitempty" json:"page,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// VisitDashboardLinkParams defines parameters for VisitDashboardLink. +type VisitDashboardLinkParams struct { + Slug string `form:"slug" json:"slug"` +} + +// GetDescriptionParams defines parameters for GetDescription. +type GetDescriptionParams struct { + TargetType GetDescriptionParamsTargetType `form:"targetType" json:"targetType"` + TargetId *string `form:"targetId,omitempty" json:"targetId,omitempty"` + SectionJwId *int64 `form:"sectionJwId,omitempty" json:"sectionJwId,omitempty"` + CourseJwId *int64 `form:"courseJwId,omitempty" json:"courseJwId,omitempty"` + TeacherId *int64 `form:"teacherId,omitempty" json:"teacherId,omitempty"` + HomeworkId *string `form:"homeworkId,omitempty" json:"homeworkId,omitempty"` +} + +// GetDescriptionParamsTargetType defines parameters for GetDescription. +type GetDescriptionParamsTargetType string + +// ListHomeworksParams defines parameters for ListHomeworks. +type ListHomeworksParams struct { + SectionId *int64 `form:"sectionId,omitempty" json:"sectionId,omitempty"` + SectionIds *string `form:"sectionIds,omitempty" json:"sectionIds,omitempty"` + SectionJwId *int64 `form:"sectionJwId,omitempty" json:"sectionJwId,omitempty"` + IncludeDeleted *ListHomeworksParamsIncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` +} + +// ListHomeworksParamsIncludeDeleted defines parameters for ListHomeworks. +type ListHomeworksParamsIncludeDeleted string + +// GetApiMeOverviewParams defines parameters for GetApiMeOverview. +type GetApiMeOverviewParams struct { + AtTime *string `form:"atTime,omitempty" json:"atTime,omitempty"` + HomeworkWindowDays *int64 `form:"homeworkWindowDays,omitempty" json:"homeworkWindowDays,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` + Locale *GetApiMeOverviewParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` +} + +// GetApiMeOverviewParamsLocale defines parameters for GetApiMeOverview. +type GetApiMeOverviewParamsLocale string + +// GetApiMeSubscriptionsSchedulesParams defines parameters for GetApiMeSubscriptionsSchedules. +type GetApiMeSubscriptionsSchedulesParams struct { + DateFrom *string `form:"dateFrom,omitempty" json:"dateFrom,omitempty"` + DateTo *string `form:"dateTo,omitempty" json:"dateTo,omitempty"` + Weekday *int64 `form:"weekday,omitempty" json:"weekday,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` + Locale *GetApiMeSubscriptionsSchedulesParamsLocale `form:"locale,omitempty" json:"locale,omitempty"` +} + +// GetApiMeSubscriptionsSchedulesParamsLocale defines parameters for GetApiMeSubscriptionsSchedules. +type GetApiMeSubscriptionsSchedulesParamsLocale string + +// ListSchedulesParams defines parameters for ListSchedules. +type ListSchedulesParams struct { + SectionId *int64 `form:"sectionId,omitempty" json:"sectionId,omitempty"` + SectionJwId *int64 `form:"sectionJwId,omitempty" json:"sectionJwId,omitempty"` + SectionCode *string `form:"sectionCode,omitempty" json:"sectionCode,omitempty"` + TeacherId *int64 `form:"teacherId,omitempty" json:"teacherId,omitempty"` + TeacherCode *string `form:"teacherCode,omitempty" json:"teacherCode,omitempty"` + RoomId *int64 `form:"roomId,omitempty" json:"roomId,omitempty"` + RoomJwId *int64 `form:"roomJwId,omitempty" json:"roomJwId,omitempty"` + Weekday *int64 `form:"weekday,omitempty" json:"weekday,omitempty"` + DateFrom *string `form:"dateFrom,omitempty" json:"dateFrom,omitempty"` + DateTo *string `form:"dateTo,omitempty" json:"dateTo,omitempty"` + Page *int64 `form:"page,omitempty" json:"page,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// ListSectionsParams defines parameters for ListSections. +type ListSectionsParams struct { + CourseId *int64 `form:"courseId,omitempty" json:"courseId,omitempty"` + CourseJwId *int64 `form:"courseJwId,omitempty" json:"courseJwId,omitempty"` + SemesterId *int64 `form:"semesterId,omitempty" json:"semesterId,omitempty"` + SemesterJwId *int64 `form:"semesterJwId,omitempty" json:"semesterJwId,omitempty"` + CampusId *int64 `form:"campusId,omitempty" json:"campusId,omitempty"` + DepartmentId *int64 `form:"departmentId,omitempty" json:"departmentId,omitempty"` + TeacherId *int64 `form:"teacherId,omitempty" json:"teacherId,omitempty"` + TeacherCode *string `form:"teacherCode,omitempty" json:"teacherCode,omitempty"` + Search *string `form:"search,omitempty" json:"search,omitempty"` + Ids *string `form:"ids,omitempty" json:"ids,omitempty"` + JwIds *string `form:"jwIds,omitempty" json:"jwIds,omitempty"` + Page *int64 `form:"page,omitempty" json:"page,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// GetSectionsCalendarParams defines parameters for GetSectionsCalendar. +type GetSectionsCalendarParams struct { + SectionIds string `form:"sectionIds" json:"sectionIds"` +} + +// GetSectionSchedulesParams defines parameters for GetSectionSchedules. +type GetSectionSchedulesParams struct { + DateFrom *string `form:"dateFrom,omitempty" json:"dateFrom,omitempty"` + DateTo *string `form:"dateTo,omitempty" json:"dateTo,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// ListSemestersParams defines parameters for ListSemesters. +type ListSemestersParams struct { + Page *int64 `form:"page,omitempty" json:"page,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// ListTeachersParams defines parameters for ListTeachers. +type ListTeachersParams struct { + DepartmentId *int64 `form:"departmentId,omitempty" json:"departmentId,omitempty"` + Search *string `form:"search,omitempty" json:"search,omitempty"` + Page *int64 `form:"page,omitempty" json:"page,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// ListTodosParams defines parameters for ListTodos. +type ListTodosParams struct { + Completed *ListTodosParamsCompleted `form:"completed,omitempty" json:"completed,omitempty"` + Priority *ListTodosParamsPriority `form:"priority,omitempty" json:"priority,omitempty"` + DueBefore *string `form:"dueBefore,omitempty" json:"dueBefore,omitempty"` + DueAfter *string `form:"dueAfter,omitempty" json:"dueAfter,omitempty"` + Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +} + +// ListTodosParamsCompleted defines parameters for ListTodos. +type ListTodosParamsCompleted string + +// ListTodosParamsPriority defines parameters for ListTodos. +type ListTodosParamsPriority string + +// PutApiUploadsObjectParams defines parameters for PutApiUploadsObject. +type PutApiUploadsObjectParams struct { + Key string `form:"key" json:"key"` +} + +// GetUserCalendarParams defines parameters for GetUserCalendar. +type GetUserCalendarParams struct { + // Token Calendar feed token for anonymous personal iCal access. + Token *string `form:"token,omitempty" json:"token,omitempty"` +} + +// ModerateAdminCommentJSONRequestBody defines body for ModerateAdminComment for application/json ContentType. +type ModerateAdminCommentJSONRequestBody = AdminModerateCommentRequestSchema + +// UpdateAdminDescriptionJSONRequestBody defines body for UpdateAdminDescription for application/json ContentType. +type UpdateAdminDescriptionJSONRequestBody = AdminModerateDescriptionRequestSchema + +// CreateAdminSuspensionJSONRequestBody defines body for CreateAdminSuspension for application/json ContentType. +type CreateAdminSuspensionJSONRequestBody = AdminCreateSuspensionRequestSchema + +// UpdateAdminUserJSONRequestBody defines body for UpdateAdminUser for application/json ContentType. +type UpdateAdminUserJSONRequestBody = AdminUpdateUserRequestSchema + +// SetBusPreferencesJSONRequestBody defines body for SetBusPreferences for application/json ContentType. +type SetBusPreferencesJSONRequestBody = BusPreferenceRequestSchema + +// DeleteApiCalendarSubscriptionsJSONRequestBody defines body for DeleteApiCalendarSubscriptions for application/json ContentType. +type DeleteApiCalendarSubscriptionsJSONRequestBody = CalendarSubscriptionRemoveRequestSchema + +// AppendCalendarSubscriptionSectionsJSONRequestBody defines body for AppendCalendarSubscriptionSections for application/json ContentType. +type AppendCalendarSubscriptionSectionsJSONRequestBody = CalendarSubscriptionAppendRequestSchema + +// SetCalendarSubscriptionJSONRequestBody defines body for SetCalendarSubscription for application/json ContentType. +type SetCalendarSubscriptionJSONRequestBody = CalendarSubscriptionCreateRequestSchema + +// BatchUpdateCalendarSubscriptionJSONRequestBody defines body for BatchUpdateCalendarSubscription for application/json ContentType. +type BatchUpdateCalendarSubscriptionJSONRequestBody = CalendarSubscriptionBatchRequestSchema + +// PostApiCalendarSubscriptionsImportCodesJSONRequestBody defines body for PostApiCalendarSubscriptionsImportCodes for application/json ContentType. +type PostApiCalendarSubscriptionsImportCodesJSONRequestBody = MatchSectionCodesRequestSchema + +// QueryCalendarSubscriptionSectionsJSONRequestBody defines body for QueryCalendarSubscriptionSections for application/json ContentType. +type QueryCalendarSubscriptionSectionsJSONRequestBody = CalendarSubscriptionQueryRequestSchema + +// CreateCommentJSONRequestBody defines body for CreateComment for application/json ContentType. +type CreateCommentJSONRequestBody = CommentCreateRequestSchema + +// DeleteApiCommentsBatchJSONRequestBody defines body for DeleteApiCommentsBatch for application/json ContentType. +type DeleteApiCommentsBatchJSONRequestBody = CommentBatchDeleteRequestSchema + +// UpdateCommentJSONRequestBody defines body for UpdateComment for application/json ContentType. +type UpdateCommentJSONRequestBody = CommentUpdateRequestSchema + +// AddCommentReactionJSONRequestBody defines body for AddCommentReaction for application/json ContentType. +type AddCommentReactionJSONRequestBody = CommentReactionRequestSchema + +// PinDashboardLinkFormdataRequestBody defines body for PinDashboardLink for application/x-www-form-urlencoded ContentType. +type PinDashboardLinkFormdataRequestBody = DashboardLinkPinRequestSchema + +// PostApiDashboardLinksPinBatchJSONRequestBody defines body for PostApiDashboardLinksPinBatch for application/json ContentType. +type PostApiDashboardLinksPinBatchJSONRequestBody = DashboardLinkPinBatchRequestSchema + +// RecordDashboardLinkVisitFormdataRequestBody defines body for RecordDashboardLinkVisit for application/x-www-form-urlencoded ContentType. +type RecordDashboardLinkVisitFormdataRequestBody = DashboardLinkVisitRequestSchema + +// UpsertDescriptionJSONRequestBody defines body for UpsertDescription for application/json ContentType. +type UpsertDescriptionJSONRequestBody = DescriptionUpsertRequestSchema + +// CreateHomeworkJSONRequestBody defines body for CreateHomework for application/json ContentType. +type CreateHomeworkJSONRequestBody = HomeworkCreateRequestSchema + +// PutApiHomeworksCompletionsJSONRequestBody defines body for PutApiHomeworksCompletions for application/json ContentType. +type PutApiHomeworksCompletionsJSONRequestBody = HomeworkCompletionBatchRequestSchema + +// UpdateHomeworkJSONRequestBody defines body for UpdateHomework for application/json ContentType. +type UpdateHomeworkJSONRequestBody = HomeworkUpdateRequestSchema + +// SetHomeworkCompletionJSONRequestBody defines body for SetHomeworkCompletion for application/json ContentType. +type SetHomeworkCompletionJSONRequestBody = HomeworkCompletionRequestSchema + +// SetLocaleJSONRequestBody defines body for SetLocale for application/json ContentType. +type SetLocaleJSONRequestBody = LocaleUpdateRequestSchema + +// MatchSectionCodesJSONRequestBody defines body for MatchSectionCodes for application/json ContentType. +type MatchSectionCodesJSONRequestBody = MatchSectionCodesRequestSchema + +// CreateTodoJSONRequestBody defines body for CreateTodo for application/json ContentType. +type CreateTodoJSONRequestBody = TodoCreateRequestSchema + +// DeleteApiTodosBatchJSONRequestBody defines body for DeleteApiTodosBatch for application/json ContentType. +type DeleteApiTodosBatchJSONRequestBody = TodoBatchDeleteRequestSchema + +// PatchApiTodosBatchJSONRequestBody defines body for PatchApiTodosBatch for application/json ContentType. +type PatchApiTodosBatchJSONRequestBody = TodoCompletionBatchRequestSchema + +// UpdateTodoJSONRequestBody defines body for UpdateTodo for application/json ContentType. +type UpdateTodoJSONRequestBody = TodoUpdateRequestSchema + +// CreateUploadJSONRequestBody defines body for CreateUpload for application/json ContentType. +type CreateUploadJSONRequestBody = UploadCreateRequestSchema + +// CompleteUploadJSONRequestBody defines body for CompleteUpload for application/json ContentType. +type CompleteUploadJSONRequestBody = UploadCompleteRequestSchema + +// UpdateUploadJSONRequestBody defines body for UpdateUpload for application/json ContentType. +type UpdateUploadJSONRequestBody = UploadRenameRequestSchema + +// AsAdminCreateSuspensionRequestSchemaExpiresAt0 returns the union data inside the AdminCreateSuspensionRequestSchema_ExpiresAt as a AdminCreateSuspensionRequestSchemaExpiresAt0 +func (t AdminCreateSuspensionRequestSchema_ExpiresAt) AsAdminCreateSuspensionRequestSchemaExpiresAt0() (AdminCreateSuspensionRequestSchemaExpiresAt0, error) { + var body AdminCreateSuspensionRequestSchemaExpiresAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAdminCreateSuspensionRequestSchemaExpiresAt0 overwrites any union data inside the AdminCreateSuspensionRequestSchema_ExpiresAt as the provided AdminCreateSuspensionRequestSchemaExpiresAt0 +func (t *AdminCreateSuspensionRequestSchema_ExpiresAt) FromAdminCreateSuspensionRequestSchemaExpiresAt0(v AdminCreateSuspensionRequestSchemaExpiresAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAdminCreateSuspensionRequestSchemaExpiresAt0 performs a merge with any union data inside the AdminCreateSuspensionRequestSchema_ExpiresAt, using the provided AdminCreateSuspensionRequestSchemaExpiresAt0 +func (t *AdminCreateSuspensionRequestSchema_ExpiresAt) MergeAdminCreateSuspensionRequestSchemaExpiresAt0(v AdminCreateSuspensionRequestSchemaExpiresAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsAdminCreateSuspensionRequestSchemaExpiresAt1 returns the union data inside the AdminCreateSuspensionRequestSchema_ExpiresAt as a AdminCreateSuspensionRequestSchemaExpiresAt1 +func (t AdminCreateSuspensionRequestSchema_ExpiresAt) AsAdminCreateSuspensionRequestSchemaExpiresAt1() (AdminCreateSuspensionRequestSchemaExpiresAt1, error) { + var body AdminCreateSuspensionRequestSchemaExpiresAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAdminCreateSuspensionRequestSchemaExpiresAt1 overwrites any union data inside the AdminCreateSuspensionRequestSchema_ExpiresAt as the provided AdminCreateSuspensionRequestSchemaExpiresAt1 +func (t *AdminCreateSuspensionRequestSchema_ExpiresAt) FromAdminCreateSuspensionRequestSchemaExpiresAt1(v AdminCreateSuspensionRequestSchemaExpiresAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAdminCreateSuspensionRequestSchemaExpiresAt1 performs a merge with any union data inside the AdminCreateSuspensionRequestSchema_ExpiresAt, using the provided AdminCreateSuspensionRequestSchemaExpiresAt1 +func (t *AdminCreateSuspensionRequestSchema_ExpiresAt) MergeAdminCreateSuspensionRequestSchemaExpiresAt1(v AdminCreateSuspensionRequestSchemaExpiresAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t AdminCreateSuspensionRequestSchema_ExpiresAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *AdminCreateSuspensionRequestSchema_ExpiresAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsAdminUpdateUserRequestSchemaName0 returns the union data inside the AdminUpdateUserRequestSchema_Name as a AdminUpdateUserRequestSchemaName0 +func (t AdminUpdateUserRequestSchema_Name) AsAdminUpdateUserRequestSchemaName0() (AdminUpdateUserRequestSchemaName0, error) { + var body AdminUpdateUserRequestSchemaName0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAdminUpdateUserRequestSchemaName0 overwrites any union data inside the AdminUpdateUserRequestSchema_Name as the provided AdminUpdateUserRequestSchemaName0 +func (t *AdminUpdateUserRequestSchema_Name) FromAdminUpdateUserRequestSchemaName0(v AdminUpdateUserRequestSchemaName0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAdminUpdateUserRequestSchemaName0 performs a merge with any union data inside the AdminUpdateUserRequestSchema_Name, using the provided AdminUpdateUserRequestSchemaName0 +func (t *AdminUpdateUserRequestSchema_Name) MergeAdminUpdateUserRequestSchemaName0(v AdminUpdateUserRequestSchemaName0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsAdminUpdateUserRequestSchemaName1 returns the union data inside the AdminUpdateUserRequestSchema_Name as a AdminUpdateUserRequestSchemaName1 +func (t AdminUpdateUserRequestSchema_Name) AsAdminUpdateUserRequestSchemaName1() (AdminUpdateUserRequestSchemaName1, error) { + var body AdminUpdateUserRequestSchemaName1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAdminUpdateUserRequestSchemaName1 overwrites any union data inside the AdminUpdateUserRequestSchema_Name as the provided AdminUpdateUserRequestSchemaName1 +func (t *AdminUpdateUserRequestSchema_Name) FromAdminUpdateUserRequestSchemaName1(v AdminUpdateUserRequestSchemaName1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAdminUpdateUserRequestSchemaName1 performs a merge with any union data inside the AdminUpdateUserRequestSchema_Name, using the provided AdminUpdateUserRequestSchemaName1 +func (t *AdminUpdateUserRequestSchema_Name) MergeAdminUpdateUserRequestSchemaName1(v AdminUpdateUserRequestSchemaName1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t AdminUpdateUserRequestSchema_Name) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *AdminUpdateUserRequestSchema_Name) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsAdminUpdateUserRequestSchemaUsername0 returns the union data inside the AdminUpdateUserRequestSchema_Username as a AdminUpdateUserRequestSchemaUsername0 +func (t AdminUpdateUserRequestSchema_Username) AsAdminUpdateUserRequestSchemaUsername0() (AdminUpdateUserRequestSchemaUsername0, error) { + var body AdminUpdateUserRequestSchemaUsername0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAdminUpdateUserRequestSchemaUsername0 overwrites any union data inside the AdminUpdateUserRequestSchema_Username as the provided AdminUpdateUserRequestSchemaUsername0 +func (t *AdminUpdateUserRequestSchema_Username) FromAdminUpdateUserRequestSchemaUsername0(v AdminUpdateUserRequestSchemaUsername0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAdminUpdateUserRequestSchemaUsername0 performs a merge with any union data inside the AdminUpdateUserRequestSchema_Username, using the provided AdminUpdateUserRequestSchemaUsername0 +func (t *AdminUpdateUserRequestSchema_Username) MergeAdminUpdateUserRequestSchemaUsername0(v AdminUpdateUserRequestSchemaUsername0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsAdminUpdateUserRequestSchemaUsername1 returns the union data inside the AdminUpdateUserRequestSchema_Username as a AdminUpdateUserRequestSchemaUsername1 +func (t AdminUpdateUserRequestSchema_Username) AsAdminUpdateUserRequestSchemaUsername1() (AdminUpdateUserRequestSchemaUsername1, error) { + var body AdminUpdateUserRequestSchemaUsername1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAdminUpdateUserRequestSchemaUsername1 overwrites any union data inside the AdminUpdateUserRequestSchema_Username as the provided AdminUpdateUserRequestSchemaUsername1 +func (t *AdminUpdateUserRequestSchema_Username) FromAdminUpdateUserRequestSchemaUsername1(v AdminUpdateUserRequestSchemaUsername1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAdminUpdateUserRequestSchemaUsername1 performs a merge with any union data inside the AdminUpdateUserRequestSchema_Username, using the provided AdminUpdateUserRequestSchemaUsername1 +func (t *AdminUpdateUserRequestSchema_Username) MergeAdminUpdateUserRequestSchemaUsername1(v AdminUpdateUserRequestSchemaUsername1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t AdminUpdateUserRequestSchema_Username) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *AdminUpdateUserRequestSchema_Username) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCalendarSubscriptionBatchRequestSchemaSemesterId0 returns the union data inside the CalendarSubscriptionBatchRequestSchema_SemesterId as a CalendarSubscriptionBatchRequestSchemaSemesterId0 +func (t CalendarSubscriptionBatchRequestSchema_SemesterId) AsCalendarSubscriptionBatchRequestSchemaSemesterId0() (CalendarSubscriptionBatchRequestSchemaSemesterId0, error) { + var body CalendarSubscriptionBatchRequestSchemaSemesterId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCalendarSubscriptionBatchRequestSchemaSemesterId0 overwrites any union data inside the CalendarSubscriptionBatchRequestSchema_SemesterId as the provided CalendarSubscriptionBatchRequestSchemaSemesterId0 +func (t *CalendarSubscriptionBatchRequestSchema_SemesterId) FromCalendarSubscriptionBatchRequestSchemaSemesterId0(v CalendarSubscriptionBatchRequestSchemaSemesterId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCalendarSubscriptionBatchRequestSchemaSemesterId0 performs a merge with any union data inside the CalendarSubscriptionBatchRequestSchema_SemesterId, using the provided CalendarSubscriptionBatchRequestSchemaSemesterId0 +func (t *CalendarSubscriptionBatchRequestSchema_SemesterId) MergeCalendarSubscriptionBatchRequestSchemaSemesterId0(v CalendarSubscriptionBatchRequestSchemaSemesterId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCalendarSubscriptionBatchRequestSchemaSemesterId1 returns the union data inside the CalendarSubscriptionBatchRequestSchema_SemesterId as a CalendarSubscriptionBatchRequestSchemaSemesterId1 +func (t CalendarSubscriptionBatchRequestSchema_SemesterId) AsCalendarSubscriptionBatchRequestSchemaSemesterId1() (CalendarSubscriptionBatchRequestSchemaSemesterId1, error) { + var body CalendarSubscriptionBatchRequestSchemaSemesterId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCalendarSubscriptionBatchRequestSchemaSemesterId1 overwrites any union data inside the CalendarSubscriptionBatchRequestSchema_SemesterId as the provided CalendarSubscriptionBatchRequestSchemaSemesterId1 +func (t *CalendarSubscriptionBatchRequestSchema_SemesterId) FromCalendarSubscriptionBatchRequestSchemaSemesterId1(v CalendarSubscriptionBatchRequestSchemaSemesterId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCalendarSubscriptionBatchRequestSchemaSemesterId1 performs a merge with any union data inside the CalendarSubscriptionBatchRequestSchema_SemesterId, using the provided CalendarSubscriptionBatchRequestSchemaSemesterId1 +func (t *CalendarSubscriptionBatchRequestSchema_SemesterId) MergeCalendarSubscriptionBatchRequestSchemaSemesterId1(v CalendarSubscriptionBatchRequestSchemaSemesterId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CalendarSubscriptionBatchRequestSchema_SemesterId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CalendarSubscriptionBatchRequestSchema_SemesterId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCalendarSubscriptionQueryRequestSchemaSemesterId0 returns the union data inside the CalendarSubscriptionQueryRequestSchema_SemesterId as a CalendarSubscriptionQueryRequestSchemaSemesterId0 +func (t CalendarSubscriptionQueryRequestSchema_SemesterId) AsCalendarSubscriptionQueryRequestSchemaSemesterId0() (CalendarSubscriptionQueryRequestSchemaSemesterId0, error) { + var body CalendarSubscriptionQueryRequestSchemaSemesterId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCalendarSubscriptionQueryRequestSchemaSemesterId0 overwrites any union data inside the CalendarSubscriptionQueryRequestSchema_SemesterId as the provided CalendarSubscriptionQueryRequestSchemaSemesterId0 +func (t *CalendarSubscriptionQueryRequestSchema_SemesterId) FromCalendarSubscriptionQueryRequestSchemaSemesterId0(v CalendarSubscriptionQueryRequestSchemaSemesterId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCalendarSubscriptionQueryRequestSchemaSemesterId0 performs a merge with any union data inside the CalendarSubscriptionQueryRequestSchema_SemesterId, using the provided CalendarSubscriptionQueryRequestSchemaSemesterId0 +func (t *CalendarSubscriptionQueryRequestSchema_SemesterId) MergeCalendarSubscriptionQueryRequestSchemaSemesterId0(v CalendarSubscriptionQueryRequestSchemaSemesterId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCalendarSubscriptionQueryRequestSchemaSemesterId1 returns the union data inside the CalendarSubscriptionQueryRequestSchema_SemesterId as a CalendarSubscriptionQueryRequestSchemaSemesterId1 +func (t CalendarSubscriptionQueryRequestSchema_SemesterId) AsCalendarSubscriptionQueryRequestSchemaSemesterId1() (CalendarSubscriptionQueryRequestSchemaSemesterId1, error) { + var body CalendarSubscriptionQueryRequestSchemaSemesterId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCalendarSubscriptionQueryRequestSchemaSemesterId1 overwrites any union data inside the CalendarSubscriptionQueryRequestSchema_SemesterId as the provided CalendarSubscriptionQueryRequestSchemaSemesterId1 +func (t *CalendarSubscriptionQueryRequestSchema_SemesterId) FromCalendarSubscriptionQueryRequestSchemaSemesterId1(v CalendarSubscriptionQueryRequestSchemaSemesterId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCalendarSubscriptionQueryRequestSchemaSemesterId1 performs a merge with any union data inside the CalendarSubscriptionQueryRequestSchema_SemesterId, using the provided CalendarSubscriptionQueryRequestSchemaSemesterId1 +func (t *CalendarSubscriptionQueryRequestSchema_SemesterId) MergeCalendarSubscriptionQueryRequestSchemaSemesterId1(v CalendarSubscriptionQueryRequestSchemaSemesterId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CalendarSubscriptionQueryRequestSchema_SemesterId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CalendarSubscriptionQueryRequestSchema_SemesterId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCommentBatchDeleteResponseSchemaResults0 returns the union data inside the CommentBatchDeleteResponseSchema_Results_Item as a CommentBatchDeleteResponseSchemaResults0 +func (t CommentBatchDeleteResponseSchema_Results_Item) AsCommentBatchDeleteResponseSchemaResults0() (CommentBatchDeleteResponseSchemaResults0, error) { + var body CommentBatchDeleteResponseSchemaResults0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentBatchDeleteResponseSchemaResults0 overwrites any union data inside the CommentBatchDeleteResponseSchema_Results_Item as the provided CommentBatchDeleteResponseSchemaResults0 +func (t *CommentBatchDeleteResponseSchema_Results_Item) FromCommentBatchDeleteResponseSchemaResults0(v CommentBatchDeleteResponseSchemaResults0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentBatchDeleteResponseSchemaResults0 performs a merge with any union data inside the CommentBatchDeleteResponseSchema_Results_Item, using the provided CommentBatchDeleteResponseSchemaResults0 +func (t *CommentBatchDeleteResponseSchema_Results_Item) MergeCommentBatchDeleteResponseSchemaResults0(v CommentBatchDeleteResponseSchemaResults0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentBatchDeleteResponseSchemaResults1 returns the union data inside the CommentBatchDeleteResponseSchema_Results_Item as a CommentBatchDeleteResponseSchemaResults1 +func (t CommentBatchDeleteResponseSchema_Results_Item) AsCommentBatchDeleteResponseSchemaResults1() (CommentBatchDeleteResponseSchemaResults1, error) { + var body CommentBatchDeleteResponseSchemaResults1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentBatchDeleteResponseSchemaResults1 overwrites any union data inside the CommentBatchDeleteResponseSchema_Results_Item as the provided CommentBatchDeleteResponseSchemaResults1 +func (t *CommentBatchDeleteResponseSchema_Results_Item) FromCommentBatchDeleteResponseSchemaResults1(v CommentBatchDeleteResponseSchemaResults1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentBatchDeleteResponseSchemaResults1 performs a merge with any union data inside the CommentBatchDeleteResponseSchema_Results_Item, using the provided CommentBatchDeleteResponseSchemaResults1 +func (t *CommentBatchDeleteResponseSchema_Results_Item) MergeCommentBatchDeleteResponseSchemaResults1(v CommentBatchDeleteResponseSchemaResults1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CommentBatchDeleteResponseSchema_Results_Item) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CommentBatchDeleteResponseSchema_Results_Item) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCommentCreateRequestSchemaCourseJwId0 returns the union data inside the CommentCreateRequestSchema_CourseJwId as a CommentCreateRequestSchemaCourseJwId0 +func (t CommentCreateRequestSchema_CourseJwId) AsCommentCreateRequestSchemaCourseJwId0() (CommentCreateRequestSchemaCourseJwId0, error) { + var body CommentCreateRequestSchemaCourseJwId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaCourseJwId0 overwrites any union data inside the CommentCreateRequestSchema_CourseJwId as the provided CommentCreateRequestSchemaCourseJwId0 +func (t *CommentCreateRequestSchema_CourseJwId) FromCommentCreateRequestSchemaCourseJwId0(v CommentCreateRequestSchemaCourseJwId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaCourseJwId0 performs a merge with any union data inside the CommentCreateRequestSchema_CourseJwId, using the provided CommentCreateRequestSchemaCourseJwId0 +func (t *CommentCreateRequestSchema_CourseJwId) MergeCommentCreateRequestSchemaCourseJwId0(v CommentCreateRequestSchemaCourseJwId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentCreateRequestSchemaCourseJwId1 returns the union data inside the CommentCreateRequestSchema_CourseJwId as a CommentCreateRequestSchemaCourseJwId1 +func (t CommentCreateRequestSchema_CourseJwId) AsCommentCreateRequestSchemaCourseJwId1() (CommentCreateRequestSchemaCourseJwId1, error) { + var body CommentCreateRequestSchemaCourseJwId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaCourseJwId1 overwrites any union data inside the CommentCreateRequestSchema_CourseJwId as the provided CommentCreateRequestSchemaCourseJwId1 +func (t *CommentCreateRequestSchema_CourseJwId) FromCommentCreateRequestSchemaCourseJwId1(v CommentCreateRequestSchemaCourseJwId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaCourseJwId1 performs a merge with any union data inside the CommentCreateRequestSchema_CourseJwId, using the provided CommentCreateRequestSchemaCourseJwId1 +func (t *CommentCreateRequestSchema_CourseJwId) MergeCommentCreateRequestSchemaCourseJwId1(v CommentCreateRequestSchemaCourseJwId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CommentCreateRequestSchema_CourseJwId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CommentCreateRequestSchema_CourseJwId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCommentCreateRequestSchemaSectionId0 returns the union data inside the CommentCreateRequestSchema_SectionId as a CommentCreateRequestSchemaSectionId0 +func (t CommentCreateRequestSchema_SectionId) AsCommentCreateRequestSchemaSectionId0() (CommentCreateRequestSchemaSectionId0, error) { + var body CommentCreateRequestSchemaSectionId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaSectionId0 overwrites any union data inside the CommentCreateRequestSchema_SectionId as the provided CommentCreateRequestSchemaSectionId0 +func (t *CommentCreateRequestSchema_SectionId) FromCommentCreateRequestSchemaSectionId0(v CommentCreateRequestSchemaSectionId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaSectionId0 performs a merge with any union data inside the CommentCreateRequestSchema_SectionId, using the provided CommentCreateRequestSchemaSectionId0 +func (t *CommentCreateRequestSchema_SectionId) MergeCommentCreateRequestSchemaSectionId0(v CommentCreateRequestSchemaSectionId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentCreateRequestSchemaSectionId1 returns the union data inside the CommentCreateRequestSchema_SectionId as a CommentCreateRequestSchemaSectionId1 +func (t CommentCreateRequestSchema_SectionId) AsCommentCreateRequestSchemaSectionId1() (CommentCreateRequestSchemaSectionId1, error) { + var body CommentCreateRequestSchemaSectionId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaSectionId1 overwrites any union data inside the CommentCreateRequestSchema_SectionId as the provided CommentCreateRequestSchemaSectionId1 +func (t *CommentCreateRequestSchema_SectionId) FromCommentCreateRequestSchemaSectionId1(v CommentCreateRequestSchemaSectionId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaSectionId1 performs a merge with any union data inside the CommentCreateRequestSchema_SectionId, using the provided CommentCreateRequestSchemaSectionId1 +func (t *CommentCreateRequestSchema_SectionId) MergeCommentCreateRequestSchemaSectionId1(v CommentCreateRequestSchemaSectionId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CommentCreateRequestSchema_SectionId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CommentCreateRequestSchema_SectionId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCommentCreateRequestSchemaSectionJwId0 returns the union data inside the CommentCreateRequestSchema_SectionJwId as a CommentCreateRequestSchemaSectionJwId0 +func (t CommentCreateRequestSchema_SectionJwId) AsCommentCreateRequestSchemaSectionJwId0() (CommentCreateRequestSchemaSectionJwId0, error) { + var body CommentCreateRequestSchemaSectionJwId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaSectionJwId0 overwrites any union data inside the CommentCreateRequestSchema_SectionJwId as the provided CommentCreateRequestSchemaSectionJwId0 +func (t *CommentCreateRequestSchema_SectionJwId) FromCommentCreateRequestSchemaSectionJwId0(v CommentCreateRequestSchemaSectionJwId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaSectionJwId0 performs a merge with any union data inside the CommentCreateRequestSchema_SectionJwId, using the provided CommentCreateRequestSchemaSectionJwId0 +func (t *CommentCreateRequestSchema_SectionJwId) MergeCommentCreateRequestSchemaSectionJwId0(v CommentCreateRequestSchemaSectionJwId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentCreateRequestSchemaSectionJwId1 returns the union data inside the CommentCreateRequestSchema_SectionJwId as a CommentCreateRequestSchemaSectionJwId1 +func (t CommentCreateRequestSchema_SectionJwId) AsCommentCreateRequestSchemaSectionJwId1() (CommentCreateRequestSchemaSectionJwId1, error) { + var body CommentCreateRequestSchemaSectionJwId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaSectionJwId1 overwrites any union data inside the CommentCreateRequestSchema_SectionJwId as the provided CommentCreateRequestSchemaSectionJwId1 +func (t *CommentCreateRequestSchema_SectionJwId) FromCommentCreateRequestSchemaSectionJwId1(v CommentCreateRequestSchemaSectionJwId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaSectionJwId1 performs a merge with any union data inside the CommentCreateRequestSchema_SectionJwId, using the provided CommentCreateRequestSchemaSectionJwId1 +func (t *CommentCreateRequestSchema_SectionJwId) MergeCommentCreateRequestSchemaSectionJwId1(v CommentCreateRequestSchemaSectionJwId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CommentCreateRequestSchema_SectionJwId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CommentCreateRequestSchema_SectionJwId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCommentCreateRequestSchemaSectionTeacherId0 returns the union data inside the CommentCreateRequestSchema_SectionTeacherId as a CommentCreateRequestSchemaSectionTeacherId0 +func (t CommentCreateRequestSchema_SectionTeacherId) AsCommentCreateRequestSchemaSectionTeacherId0() (CommentCreateRequestSchemaSectionTeacherId0, error) { + var body CommentCreateRequestSchemaSectionTeacherId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaSectionTeacherId0 overwrites any union data inside the CommentCreateRequestSchema_SectionTeacherId as the provided CommentCreateRequestSchemaSectionTeacherId0 +func (t *CommentCreateRequestSchema_SectionTeacherId) FromCommentCreateRequestSchemaSectionTeacherId0(v CommentCreateRequestSchemaSectionTeacherId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaSectionTeacherId0 performs a merge with any union data inside the CommentCreateRequestSchema_SectionTeacherId, using the provided CommentCreateRequestSchemaSectionTeacherId0 +func (t *CommentCreateRequestSchema_SectionTeacherId) MergeCommentCreateRequestSchemaSectionTeacherId0(v CommentCreateRequestSchemaSectionTeacherId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentCreateRequestSchemaSectionTeacherId1 returns the union data inside the CommentCreateRequestSchema_SectionTeacherId as a CommentCreateRequestSchemaSectionTeacherId1 +func (t CommentCreateRequestSchema_SectionTeacherId) AsCommentCreateRequestSchemaSectionTeacherId1() (CommentCreateRequestSchemaSectionTeacherId1, error) { + var body CommentCreateRequestSchemaSectionTeacherId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaSectionTeacherId1 overwrites any union data inside the CommentCreateRequestSchema_SectionTeacherId as the provided CommentCreateRequestSchemaSectionTeacherId1 +func (t *CommentCreateRequestSchema_SectionTeacherId) FromCommentCreateRequestSchemaSectionTeacherId1(v CommentCreateRequestSchemaSectionTeacherId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaSectionTeacherId1 performs a merge with any union data inside the CommentCreateRequestSchema_SectionTeacherId, using the provided CommentCreateRequestSchemaSectionTeacherId1 +func (t *CommentCreateRequestSchema_SectionTeacherId) MergeCommentCreateRequestSchemaSectionTeacherId1(v CommentCreateRequestSchemaSectionTeacherId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CommentCreateRequestSchema_SectionTeacherId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CommentCreateRequestSchema_SectionTeacherId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCommentCreateRequestSchemaTargetId0 returns the union data inside the CommentCreateRequestSchema_TargetId as a CommentCreateRequestSchemaTargetId0 +func (t CommentCreateRequestSchema_TargetId) AsCommentCreateRequestSchemaTargetId0() (CommentCreateRequestSchemaTargetId0, error) { + var body CommentCreateRequestSchemaTargetId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaTargetId0 overwrites any union data inside the CommentCreateRequestSchema_TargetId as the provided CommentCreateRequestSchemaTargetId0 +func (t *CommentCreateRequestSchema_TargetId) FromCommentCreateRequestSchemaTargetId0(v CommentCreateRequestSchemaTargetId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaTargetId0 performs a merge with any union data inside the CommentCreateRequestSchema_TargetId, using the provided CommentCreateRequestSchemaTargetId0 +func (t *CommentCreateRequestSchema_TargetId) MergeCommentCreateRequestSchemaTargetId0(v CommentCreateRequestSchemaTargetId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentCreateRequestSchemaTargetId1 returns the union data inside the CommentCreateRequestSchema_TargetId as a CommentCreateRequestSchemaTargetId1 +func (t CommentCreateRequestSchema_TargetId) AsCommentCreateRequestSchemaTargetId1() (CommentCreateRequestSchemaTargetId1, error) { + var body CommentCreateRequestSchemaTargetId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaTargetId1 overwrites any union data inside the CommentCreateRequestSchema_TargetId as the provided CommentCreateRequestSchemaTargetId1 +func (t *CommentCreateRequestSchema_TargetId) FromCommentCreateRequestSchemaTargetId1(v CommentCreateRequestSchemaTargetId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaTargetId1 performs a merge with any union data inside the CommentCreateRequestSchema_TargetId, using the provided CommentCreateRequestSchemaTargetId1 +func (t *CommentCreateRequestSchema_TargetId) MergeCommentCreateRequestSchemaTargetId1(v CommentCreateRequestSchemaTargetId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CommentCreateRequestSchema_TargetId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CommentCreateRequestSchema_TargetId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCommentCreateRequestSchemaTeacherId0 returns the union data inside the CommentCreateRequestSchema_TeacherId as a CommentCreateRequestSchemaTeacherId0 +func (t CommentCreateRequestSchema_TeacherId) AsCommentCreateRequestSchemaTeacherId0() (CommentCreateRequestSchemaTeacherId0, error) { + var body CommentCreateRequestSchemaTeacherId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaTeacherId0 overwrites any union data inside the CommentCreateRequestSchema_TeacherId as the provided CommentCreateRequestSchemaTeacherId0 +func (t *CommentCreateRequestSchema_TeacherId) FromCommentCreateRequestSchemaTeacherId0(v CommentCreateRequestSchemaTeacherId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaTeacherId0 performs a merge with any union data inside the CommentCreateRequestSchema_TeacherId, using the provided CommentCreateRequestSchemaTeacherId0 +func (t *CommentCreateRequestSchema_TeacherId) MergeCommentCreateRequestSchemaTeacherId0(v CommentCreateRequestSchemaTeacherId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentCreateRequestSchemaTeacherId1 returns the union data inside the CommentCreateRequestSchema_TeacherId as a CommentCreateRequestSchemaTeacherId1 +func (t CommentCreateRequestSchema_TeacherId) AsCommentCreateRequestSchemaTeacherId1() (CommentCreateRequestSchemaTeacherId1, error) { + var body CommentCreateRequestSchemaTeacherId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentCreateRequestSchemaTeacherId1 overwrites any union data inside the CommentCreateRequestSchema_TeacherId as the provided CommentCreateRequestSchemaTeacherId1 +func (t *CommentCreateRequestSchema_TeacherId) FromCommentCreateRequestSchemaTeacherId1(v CommentCreateRequestSchemaTeacherId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentCreateRequestSchemaTeacherId1 performs a merge with any union data inside the CommentCreateRequestSchema_TeacherId, using the provided CommentCreateRequestSchemaTeacherId1 +func (t *CommentCreateRequestSchema_TeacherId) MergeCommentCreateRequestSchemaTeacherId1(v CommentCreateRequestSchemaTeacherId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CommentCreateRequestSchema_TeacherId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CommentCreateRequestSchema_TeacherId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsCommentsListResponseSchemaTargetTargetId0 returns the union data inside the CommentsListResponseSchema_Target_TargetId as a CommentsListResponseSchemaTargetTargetId0 +func (t CommentsListResponseSchema_Target_TargetId) AsCommentsListResponseSchemaTargetTargetId0() (CommentsListResponseSchemaTargetTargetId0, error) { + var body CommentsListResponseSchemaTargetTargetId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentsListResponseSchemaTargetTargetId0 overwrites any union data inside the CommentsListResponseSchema_Target_TargetId as the provided CommentsListResponseSchemaTargetTargetId0 +func (t *CommentsListResponseSchema_Target_TargetId) FromCommentsListResponseSchemaTargetTargetId0(v CommentsListResponseSchemaTargetTargetId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentsListResponseSchemaTargetTargetId0 performs a merge with any union data inside the CommentsListResponseSchema_Target_TargetId, using the provided CommentsListResponseSchemaTargetTargetId0 +func (t *CommentsListResponseSchema_Target_TargetId) MergeCommentsListResponseSchemaTargetTargetId0(v CommentsListResponseSchemaTargetTargetId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentsListResponseSchemaTargetTargetId1 returns the union data inside the CommentsListResponseSchema_Target_TargetId as a CommentsListResponseSchemaTargetTargetId1 +func (t CommentsListResponseSchema_Target_TargetId) AsCommentsListResponseSchemaTargetTargetId1() (CommentsListResponseSchemaTargetTargetId1, error) { + var body CommentsListResponseSchemaTargetTargetId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentsListResponseSchemaTargetTargetId1 overwrites any union data inside the CommentsListResponseSchema_Target_TargetId as the provided CommentsListResponseSchemaTargetTargetId1 +func (t *CommentsListResponseSchema_Target_TargetId) FromCommentsListResponseSchemaTargetTargetId1(v CommentsListResponseSchemaTargetTargetId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentsListResponseSchemaTargetTargetId1 performs a merge with any union data inside the CommentsListResponseSchema_Target_TargetId, using the provided CommentsListResponseSchemaTargetTargetId1 +func (t *CommentsListResponseSchema_Target_TargetId) MergeCommentsListResponseSchemaTargetTargetId1(v CommentsListResponseSchemaTargetTargetId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCommentsListResponseSchemaTargetTargetId2 returns the union data inside the CommentsListResponseSchema_Target_TargetId as a CommentsListResponseSchemaTargetTargetId2 +func (t CommentsListResponseSchema_Target_TargetId) AsCommentsListResponseSchemaTargetTargetId2() (CommentsListResponseSchemaTargetTargetId2, error) { + var body CommentsListResponseSchemaTargetTargetId2 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCommentsListResponseSchemaTargetTargetId2 overwrites any union data inside the CommentsListResponseSchema_Target_TargetId as the provided CommentsListResponseSchemaTargetTargetId2 +func (t *CommentsListResponseSchema_Target_TargetId) FromCommentsListResponseSchemaTargetTargetId2(v CommentsListResponseSchemaTargetTargetId2) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCommentsListResponseSchemaTargetTargetId2 performs a merge with any union data inside the CommentsListResponseSchema_Target_TargetId, using the provided CommentsListResponseSchemaTargetTargetId2 +func (t *CommentsListResponseSchema_Target_TargetId) MergeCommentsListResponseSchemaTargetTargetId2(v CommentsListResponseSchemaTargetTargetId2) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t CommentsListResponseSchema_Target_TargetId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *CommentsListResponseSchema_Target_TargetId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsDescriptionUpsertRequestSchema0 returns the union data inside the DescriptionUpsertRequestSchema as a DescriptionUpsertRequestSchema0 +func (t DescriptionUpsertRequestSchema) AsDescriptionUpsertRequestSchema0() (DescriptionUpsertRequestSchema0, error) { + var body DescriptionUpsertRequestSchema0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchema0 overwrites any union data inside the DescriptionUpsertRequestSchema as the provided DescriptionUpsertRequestSchema0 +func (t *DescriptionUpsertRequestSchema) FromDescriptionUpsertRequestSchema0(v DescriptionUpsertRequestSchema0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchema0 performs a merge with any union data inside the DescriptionUpsertRequestSchema, using the provided DescriptionUpsertRequestSchema0 +func (t *DescriptionUpsertRequestSchema) MergeDescriptionUpsertRequestSchema0(v DescriptionUpsertRequestSchema0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDescriptionUpsertRequestSchema1 returns the union data inside the DescriptionUpsertRequestSchema as a DescriptionUpsertRequestSchema1 +func (t DescriptionUpsertRequestSchema) AsDescriptionUpsertRequestSchema1() (DescriptionUpsertRequestSchema1, error) { + var body DescriptionUpsertRequestSchema1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchema1 overwrites any union data inside the DescriptionUpsertRequestSchema as the provided DescriptionUpsertRequestSchema1 +func (t *DescriptionUpsertRequestSchema) FromDescriptionUpsertRequestSchema1(v DescriptionUpsertRequestSchema1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchema1 performs a merge with any union data inside the DescriptionUpsertRequestSchema, using the provided DescriptionUpsertRequestSchema1 +func (t *DescriptionUpsertRequestSchema) MergeDescriptionUpsertRequestSchema1(v DescriptionUpsertRequestSchema1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDescriptionUpsertRequestSchema2 returns the union data inside the DescriptionUpsertRequestSchema as a DescriptionUpsertRequestSchema2 +func (t DescriptionUpsertRequestSchema) AsDescriptionUpsertRequestSchema2() (DescriptionUpsertRequestSchema2, error) { + var body DescriptionUpsertRequestSchema2 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchema2 overwrites any union data inside the DescriptionUpsertRequestSchema as the provided DescriptionUpsertRequestSchema2 +func (t *DescriptionUpsertRequestSchema) FromDescriptionUpsertRequestSchema2(v DescriptionUpsertRequestSchema2) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchema2 performs a merge with any union data inside the DescriptionUpsertRequestSchema, using the provided DescriptionUpsertRequestSchema2 +func (t *DescriptionUpsertRequestSchema) MergeDescriptionUpsertRequestSchema2(v DescriptionUpsertRequestSchema2) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDescriptionUpsertRequestSchema3 returns the union data inside the DescriptionUpsertRequestSchema as a DescriptionUpsertRequestSchema3 +func (t DescriptionUpsertRequestSchema) AsDescriptionUpsertRequestSchema3() (DescriptionUpsertRequestSchema3, error) { + var body DescriptionUpsertRequestSchema3 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchema3 overwrites any union data inside the DescriptionUpsertRequestSchema as the provided DescriptionUpsertRequestSchema3 +func (t *DescriptionUpsertRequestSchema) FromDescriptionUpsertRequestSchema3(v DescriptionUpsertRequestSchema3) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchema3 performs a merge with any union data inside the DescriptionUpsertRequestSchema, using the provided DescriptionUpsertRequestSchema3 +func (t *DescriptionUpsertRequestSchema) MergeDescriptionUpsertRequestSchema3(v DescriptionUpsertRequestSchema3) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDescriptionUpsertRequestSchema4 returns the union data inside the DescriptionUpsertRequestSchema as a DescriptionUpsertRequestSchema4 +func (t DescriptionUpsertRequestSchema) AsDescriptionUpsertRequestSchema4() (DescriptionUpsertRequestSchema4, error) { + var body DescriptionUpsertRequestSchema4 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchema4 overwrites any union data inside the DescriptionUpsertRequestSchema as the provided DescriptionUpsertRequestSchema4 +func (t *DescriptionUpsertRequestSchema) FromDescriptionUpsertRequestSchema4(v DescriptionUpsertRequestSchema4) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchema4 performs a merge with any union data inside the DescriptionUpsertRequestSchema, using the provided DescriptionUpsertRequestSchema4 +func (t *DescriptionUpsertRequestSchema) MergeDescriptionUpsertRequestSchema4(v DescriptionUpsertRequestSchema4) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t DescriptionUpsertRequestSchema) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + if err != nil { + return nil, err + } + object := make(map[string]json.RawMessage) + if t.union != nil { + err = json.Unmarshal(b, &object) + if err != nil { + return nil, err + } + } + + object["content"], err = json.Marshal(t.Content) + if err != nil { + return nil, fmt.Errorf("error marshaling 'content': %w", err) + } + + if t.CourseJwId != nil { + object["courseJwId"], err = json.Marshal(t.CourseJwId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'courseJwId': %w", err) + } + } + + if t.HomeworkId != nil { + object["homeworkId"], err = json.Marshal(t.HomeworkId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'homeworkId': %w", err) + } + } + + if t.SectionJwId != nil { + object["sectionJwId"], err = json.Marshal(t.SectionJwId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'sectionJwId': %w", err) + } + } + + if t.TargetId != nil { + object["targetId"], err = json.Marshal(t.TargetId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'targetId': %w", err) + } + } + + object["targetType"], err = json.Marshal(t.TargetType) + if err != nil { + return nil, fmt.Errorf("error marshaling 'targetType': %w", err) + } + + if t.TeacherId != nil { + object["teacherId"], err = json.Marshal(t.TeacherId) + if err != nil { + return nil, fmt.Errorf("error marshaling 'teacherId': %w", err) + } + } + b, err = json.Marshal(object) + return b, err +} + +func (t *DescriptionUpsertRequestSchema) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + if err != nil { + return err + } + object := make(map[string]json.RawMessage) + err = json.Unmarshal(b, &object) + if err != nil { + return err + } + + if raw, found := object["content"]; found { + err = json.Unmarshal(raw, &t.Content) + if err != nil { + return fmt.Errorf("error reading 'content': %w", err) + } + } + + if raw, found := object["courseJwId"]; found { + err = json.Unmarshal(raw, &t.CourseJwId) + if err != nil { + return fmt.Errorf("error reading 'courseJwId': %w", err) + } + } + + if raw, found := object["homeworkId"]; found { + err = json.Unmarshal(raw, &t.HomeworkId) + if err != nil { + return fmt.Errorf("error reading 'homeworkId': %w", err) + } + } + + if raw, found := object["sectionJwId"]; found { + err = json.Unmarshal(raw, &t.SectionJwId) + if err != nil { + return fmt.Errorf("error reading 'sectionJwId': %w", err) + } + } + + if raw, found := object["targetId"]; found { + err = json.Unmarshal(raw, &t.TargetId) + if err != nil { + return fmt.Errorf("error reading 'targetId': %w", err) + } + } + + if raw, found := object["targetType"]; found { + err = json.Unmarshal(raw, &t.TargetType) + if err != nil { + return fmt.Errorf("error reading 'targetType': %w", err) + } + } + + if raw, found := object["teacherId"]; found { + err = json.Unmarshal(raw, &t.TeacherId) + if err != nil { + return fmt.Errorf("error reading 'teacherId': %w", err) + } + } + + return err +} + +// AsDescriptionUpsertRequestSchemaCourseJwId0 returns the union data inside the DescriptionUpsertRequestSchema_CourseJwId as a DescriptionUpsertRequestSchemaCourseJwId0 +func (t DescriptionUpsertRequestSchema_CourseJwId) AsDescriptionUpsertRequestSchemaCourseJwId0() (DescriptionUpsertRequestSchemaCourseJwId0, error) { + var body DescriptionUpsertRequestSchemaCourseJwId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchemaCourseJwId0 overwrites any union data inside the DescriptionUpsertRequestSchema_CourseJwId as the provided DescriptionUpsertRequestSchemaCourseJwId0 +func (t *DescriptionUpsertRequestSchema_CourseJwId) FromDescriptionUpsertRequestSchemaCourseJwId0(v DescriptionUpsertRequestSchemaCourseJwId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchemaCourseJwId0 performs a merge with any union data inside the DescriptionUpsertRequestSchema_CourseJwId, using the provided DescriptionUpsertRequestSchemaCourseJwId0 +func (t *DescriptionUpsertRequestSchema_CourseJwId) MergeDescriptionUpsertRequestSchemaCourseJwId0(v DescriptionUpsertRequestSchemaCourseJwId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDescriptionUpsertRequestSchemaCourseJwId1 returns the union data inside the DescriptionUpsertRequestSchema_CourseJwId as a DescriptionUpsertRequestSchemaCourseJwId1 +func (t DescriptionUpsertRequestSchema_CourseJwId) AsDescriptionUpsertRequestSchemaCourseJwId1() (DescriptionUpsertRequestSchemaCourseJwId1, error) { + var body DescriptionUpsertRequestSchemaCourseJwId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchemaCourseJwId1 overwrites any union data inside the DescriptionUpsertRequestSchema_CourseJwId as the provided DescriptionUpsertRequestSchemaCourseJwId1 +func (t *DescriptionUpsertRequestSchema_CourseJwId) FromDescriptionUpsertRequestSchemaCourseJwId1(v DescriptionUpsertRequestSchemaCourseJwId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchemaCourseJwId1 performs a merge with any union data inside the DescriptionUpsertRequestSchema_CourseJwId, using the provided DescriptionUpsertRequestSchemaCourseJwId1 +func (t *DescriptionUpsertRequestSchema_CourseJwId) MergeDescriptionUpsertRequestSchemaCourseJwId1(v DescriptionUpsertRequestSchemaCourseJwId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t DescriptionUpsertRequestSchema_CourseJwId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *DescriptionUpsertRequestSchema_CourseJwId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsDescriptionUpsertRequestSchemaSectionJwId0 returns the union data inside the DescriptionUpsertRequestSchema_SectionJwId as a DescriptionUpsertRequestSchemaSectionJwId0 +func (t DescriptionUpsertRequestSchema_SectionJwId) AsDescriptionUpsertRequestSchemaSectionJwId0() (DescriptionUpsertRequestSchemaSectionJwId0, error) { + var body DescriptionUpsertRequestSchemaSectionJwId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchemaSectionJwId0 overwrites any union data inside the DescriptionUpsertRequestSchema_SectionJwId as the provided DescriptionUpsertRequestSchemaSectionJwId0 +func (t *DescriptionUpsertRequestSchema_SectionJwId) FromDescriptionUpsertRequestSchemaSectionJwId0(v DescriptionUpsertRequestSchemaSectionJwId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchemaSectionJwId0 performs a merge with any union data inside the DescriptionUpsertRequestSchema_SectionJwId, using the provided DescriptionUpsertRequestSchemaSectionJwId0 +func (t *DescriptionUpsertRequestSchema_SectionJwId) MergeDescriptionUpsertRequestSchemaSectionJwId0(v DescriptionUpsertRequestSchemaSectionJwId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDescriptionUpsertRequestSchemaSectionJwId1 returns the union data inside the DescriptionUpsertRequestSchema_SectionJwId as a DescriptionUpsertRequestSchemaSectionJwId1 +func (t DescriptionUpsertRequestSchema_SectionJwId) AsDescriptionUpsertRequestSchemaSectionJwId1() (DescriptionUpsertRequestSchemaSectionJwId1, error) { + var body DescriptionUpsertRequestSchemaSectionJwId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchemaSectionJwId1 overwrites any union data inside the DescriptionUpsertRequestSchema_SectionJwId as the provided DescriptionUpsertRequestSchemaSectionJwId1 +func (t *DescriptionUpsertRequestSchema_SectionJwId) FromDescriptionUpsertRequestSchemaSectionJwId1(v DescriptionUpsertRequestSchemaSectionJwId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchemaSectionJwId1 performs a merge with any union data inside the DescriptionUpsertRequestSchema_SectionJwId, using the provided DescriptionUpsertRequestSchemaSectionJwId1 +func (t *DescriptionUpsertRequestSchema_SectionJwId) MergeDescriptionUpsertRequestSchemaSectionJwId1(v DescriptionUpsertRequestSchemaSectionJwId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t DescriptionUpsertRequestSchema_SectionJwId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *DescriptionUpsertRequestSchema_SectionJwId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsDescriptionUpsertRequestSchemaTargetId0 returns the union data inside the DescriptionUpsertRequestSchema_TargetId as a DescriptionUpsertRequestSchemaTargetId0 +func (t DescriptionUpsertRequestSchema_TargetId) AsDescriptionUpsertRequestSchemaTargetId0() (DescriptionUpsertRequestSchemaTargetId0, error) { + var body DescriptionUpsertRequestSchemaTargetId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchemaTargetId0 overwrites any union data inside the DescriptionUpsertRequestSchema_TargetId as the provided DescriptionUpsertRequestSchemaTargetId0 +func (t *DescriptionUpsertRequestSchema_TargetId) FromDescriptionUpsertRequestSchemaTargetId0(v DescriptionUpsertRequestSchemaTargetId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchemaTargetId0 performs a merge with any union data inside the DescriptionUpsertRequestSchema_TargetId, using the provided DescriptionUpsertRequestSchemaTargetId0 +func (t *DescriptionUpsertRequestSchema_TargetId) MergeDescriptionUpsertRequestSchemaTargetId0(v DescriptionUpsertRequestSchemaTargetId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDescriptionUpsertRequestSchemaTargetId1 returns the union data inside the DescriptionUpsertRequestSchema_TargetId as a DescriptionUpsertRequestSchemaTargetId1 +func (t DescriptionUpsertRequestSchema_TargetId) AsDescriptionUpsertRequestSchemaTargetId1() (DescriptionUpsertRequestSchemaTargetId1, error) { + var body DescriptionUpsertRequestSchemaTargetId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchemaTargetId1 overwrites any union data inside the DescriptionUpsertRequestSchema_TargetId as the provided DescriptionUpsertRequestSchemaTargetId1 +func (t *DescriptionUpsertRequestSchema_TargetId) FromDescriptionUpsertRequestSchemaTargetId1(v DescriptionUpsertRequestSchemaTargetId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchemaTargetId1 performs a merge with any union data inside the DescriptionUpsertRequestSchema_TargetId, using the provided DescriptionUpsertRequestSchemaTargetId1 +func (t *DescriptionUpsertRequestSchema_TargetId) MergeDescriptionUpsertRequestSchemaTargetId1(v DescriptionUpsertRequestSchemaTargetId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t DescriptionUpsertRequestSchema_TargetId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *DescriptionUpsertRequestSchema_TargetId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsDescriptionUpsertRequestSchemaTeacherId0 returns the union data inside the DescriptionUpsertRequestSchema_TeacherId as a DescriptionUpsertRequestSchemaTeacherId0 +func (t DescriptionUpsertRequestSchema_TeacherId) AsDescriptionUpsertRequestSchemaTeacherId0() (DescriptionUpsertRequestSchemaTeacherId0, error) { + var body DescriptionUpsertRequestSchemaTeacherId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchemaTeacherId0 overwrites any union data inside the DescriptionUpsertRequestSchema_TeacherId as the provided DescriptionUpsertRequestSchemaTeacherId0 +func (t *DescriptionUpsertRequestSchema_TeacherId) FromDescriptionUpsertRequestSchemaTeacherId0(v DescriptionUpsertRequestSchemaTeacherId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchemaTeacherId0 performs a merge with any union data inside the DescriptionUpsertRequestSchema_TeacherId, using the provided DescriptionUpsertRequestSchemaTeacherId0 +func (t *DescriptionUpsertRequestSchema_TeacherId) MergeDescriptionUpsertRequestSchemaTeacherId0(v DescriptionUpsertRequestSchemaTeacherId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDescriptionUpsertRequestSchemaTeacherId1 returns the union data inside the DescriptionUpsertRequestSchema_TeacherId as a DescriptionUpsertRequestSchemaTeacherId1 +func (t DescriptionUpsertRequestSchema_TeacherId) AsDescriptionUpsertRequestSchemaTeacherId1() (DescriptionUpsertRequestSchemaTeacherId1, error) { + var body DescriptionUpsertRequestSchemaTeacherId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDescriptionUpsertRequestSchemaTeacherId1 overwrites any union data inside the DescriptionUpsertRequestSchema_TeacherId as the provided DescriptionUpsertRequestSchemaTeacherId1 +func (t *DescriptionUpsertRequestSchema_TeacherId) FromDescriptionUpsertRequestSchemaTeacherId1(v DescriptionUpsertRequestSchemaTeacherId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDescriptionUpsertRequestSchemaTeacherId1 performs a merge with any union data inside the DescriptionUpsertRequestSchema_TeacherId, using the provided DescriptionUpsertRequestSchemaTeacherId1 +func (t *DescriptionUpsertRequestSchema_TeacherId) MergeDescriptionUpsertRequestSchemaTeacherId1(v DescriptionUpsertRequestSchemaTeacherId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t DescriptionUpsertRequestSchema_TeacherId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *DescriptionUpsertRequestSchema_TeacherId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCompletionBatchResponseSchemaResults0 returns the union data inside the HomeworkCompletionBatchResponseSchema_Results_Item as a HomeworkCompletionBatchResponseSchemaResults0 +func (t HomeworkCompletionBatchResponseSchema_Results_Item) AsHomeworkCompletionBatchResponseSchemaResults0() (HomeworkCompletionBatchResponseSchemaResults0, error) { + var body HomeworkCompletionBatchResponseSchemaResults0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCompletionBatchResponseSchemaResults0 overwrites any union data inside the HomeworkCompletionBatchResponseSchema_Results_Item as the provided HomeworkCompletionBatchResponseSchemaResults0 +func (t *HomeworkCompletionBatchResponseSchema_Results_Item) FromHomeworkCompletionBatchResponseSchemaResults0(v HomeworkCompletionBatchResponseSchemaResults0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCompletionBatchResponseSchemaResults0 performs a merge with any union data inside the HomeworkCompletionBatchResponseSchema_Results_Item, using the provided HomeworkCompletionBatchResponseSchemaResults0 +func (t *HomeworkCompletionBatchResponseSchema_Results_Item) MergeHomeworkCompletionBatchResponseSchemaResults0(v HomeworkCompletionBatchResponseSchemaResults0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCompletionBatchResponseSchemaResults1 returns the union data inside the HomeworkCompletionBatchResponseSchema_Results_Item as a HomeworkCompletionBatchResponseSchemaResults1 +func (t HomeworkCompletionBatchResponseSchema_Results_Item) AsHomeworkCompletionBatchResponseSchemaResults1() (HomeworkCompletionBatchResponseSchemaResults1, error) { + var body HomeworkCompletionBatchResponseSchemaResults1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCompletionBatchResponseSchemaResults1 overwrites any union data inside the HomeworkCompletionBatchResponseSchema_Results_Item as the provided HomeworkCompletionBatchResponseSchemaResults1 +func (t *HomeworkCompletionBatchResponseSchema_Results_Item) FromHomeworkCompletionBatchResponseSchemaResults1(v HomeworkCompletionBatchResponseSchemaResults1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCompletionBatchResponseSchemaResults1 performs a merge with any union data inside the HomeworkCompletionBatchResponseSchema_Results_Item, using the provided HomeworkCompletionBatchResponseSchemaResults1 +func (t *HomeworkCompletionBatchResponseSchema_Results_Item) MergeHomeworkCompletionBatchResponseSchemaResults1(v HomeworkCompletionBatchResponseSchemaResults1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCompletionBatchResponseSchema_Results_Item) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCompletionBatchResponseSchema_Results_Item) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema0 returns the union data inside the HomeworkCreateRequestSchema as a HomeworkCreateRequestSchema0 +func (t HomeworkCreateRequestSchema) AsHomeworkCreateRequestSchema0() (HomeworkCreateRequestSchema0, error) { + var body HomeworkCreateRequestSchema0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0 overwrites any union data inside the HomeworkCreateRequestSchema as the provided HomeworkCreateRequestSchema0 +func (t *HomeworkCreateRequestSchema) FromHomeworkCreateRequestSchema0(v HomeworkCreateRequestSchema0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0 performs a merge with any union data inside the HomeworkCreateRequestSchema, using the provided HomeworkCreateRequestSchema0 +func (t *HomeworkCreateRequestSchema) MergeHomeworkCreateRequestSchema0(v HomeworkCreateRequestSchema0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema1 returns the union data inside the HomeworkCreateRequestSchema as a HomeworkCreateRequestSchema1 +func (t HomeworkCreateRequestSchema) AsHomeworkCreateRequestSchema1() (HomeworkCreateRequestSchema1, error) { + var body HomeworkCreateRequestSchema1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1 overwrites any union data inside the HomeworkCreateRequestSchema as the provided HomeworkCreateRequestSchema1 +func (t *HomeworkCreateRequestSchema) FromHomeworkCreateRequestSchema1(v HomeworkCreateRequestSchema1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1 performs a merge with any union data inside the HomeworkCreateRequestSchema, using the provided HomeworkCreateRequestSchema1 +func (t *HomeworkCreateRequestSchema) MergeHomeworkCreateRequestSchema1(v HomeworkCreateRequestSchema1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema0PublishedAt0 returns the union data inside the HomeworkCreateRequestSchema_0_PublishedAt as a HomeworkCreateRequestSchema0PublishedAt0 +func (t HomeworkCreateRequestSchema_0_PublishedAt) AsHomeworkCreateRequestSchema0PublishedAt0() (HomeworkCreateRequestSchema0PublishedAt0, error) { + var body HomeworkCreateRequestSchema0PublishedAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0PublishedAt0 overwrites any union data inside the HomeworkCreateRequestSchema_0_PublishedAt as the provided HomeworkCreateRequestSchema0PublishedAt0 +func (t *HomeworkCreateRequestSchema_0_PublishedAt) FromHomeworkCreateRequestSchema0PublishedAt0(v HomeworkCreateRequestSchema0PublishedAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0PublishedAt0 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_PublishedAt, using the provided HomeworkCreateRequestSchema0PublishedAt0 +func (t *HomeworkCreateRequestSchema_0_PublishedAt) MergeHomeworkCreateRequestSchema0PublishedAt0(v HomeworkCreateRequestSchema0PublishedAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema0PublishedAt1 returns the union data inside the HomeworkCreateRequestSchema_0_PublishedAt as a HomeworkCreateRequestSchema0PublishedAt1 +func (t HomeworkCreateRequestSchema_0_PublishedAt) AsHomeworkCreateRequestSchema0PublishedAt1() (HomeworkCreateRequestSchema0PublishedAt1, error) { + var body HomeworkCreateRequestSchema0PublishedAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0PublishedAt1 overwrites any union data inside the HomeworkCreateRequestSchema_0_PublishedAt as the provided HomeworkCreateRequestSchema0PublishedAt1 +func (t *HomeworkCreateRequestSchema_0_PublishedAt) FromHomeworkCreateRequestSchema0PublishedAt1(v HomeworkCreateRequestSchema0PublishedAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0PublishedAt1 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_PublishedAt, using the provided HomeworkCreateRequestSchema0PublishedAt1 +func (t *HomeworkCreateRequestSchema_0_PublishedAt) MergeHomeworkCreateRequestSchema0PublishedAt1(v HomeworkCreateRequestSchema0PublishedAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_0_PublishedAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_0_PublishedAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema0SectionId0 returns the union data inside the HomeworkCreateRequestSchema_0_SectionId as a HomeworkCreateRequestSchema0SectionId0 +func (t HomeworkCreateRequestSchema_0_SectionId) AsHomeworkCreateRequestSchema0SectionId0() (HomeworkCreateRequestSchema0SectionId0, error) { + var body HomeworkCreateRequestSchema0SectionId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0SectionId0 overwrites any union data inside the HomeworkCreateRequestSchema_0_SectionId as the provided HomeworkCreateRequestSchema0SectionId0 +func (t *HomeworkCreateRequestSchema_0_SectionId) FromHomeworkCreateRequestSchema0SectionId0(v HomeworkCreateRequestSchema0SectionId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0SectionId0 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_SectionId, using the provided HomeworkCreateRequestSchema0SectionId0 +func (t *HomeworkCreateRequestSchema_0_SectionId) MergeHomeworkCreateRequestSchema0SectionId0(v HomeworkCreateRequestSchema0SectionId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema0SectionId1 returns the union data inside the HomeworkCreateRequestSchema_0_SectionId as a HomeworkCreateRequestSchema0SectionId1 +func (t HomeworkCreateRequestSchema_0_SectionId) AsHomeworkCreateRequestSchema0SectionId1() (HomeworkCreateRequestSchema0SectionId1, error) { + var body HomeworkCreateRequestSchema0SectionId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0SectionId1 overwrites any union data inside the HomeworkCreateRequestSchema_0_SectionId as the provided HomeworkCreateRequestSchema0SectionId1 +func (t *HomeworkCreateRequestSchema_0_SectionId) FromHomeworkCreateRequestSchema0SectionId1(v HomeworkCreateRequestSchema0SectionId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0SectionId1 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_SectionId, using the provided HomeworkCreateRequestSchema0SectionId1 +func (t *HomeworkCreateRequestSchema_0_SectionId) MergeHomeworkCreateRequestSchema0SectionId1(v HomeworkCreateRequestSchema0SectionId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_0_SectionId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_0_SectionId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema0SectionJwId0 returns the union data inside the HomeworkCreateRequestSchema_0_SectionJwId as a HomeworkCreateRequestSchema0SectionJwId0 +func (t HomeworkCreateRequestSchema_0_SectionJwId) AsHomeworkCreateRequestSchema0SectionJwId0() (HomeworkCreateRequestSchema0SectionJwId0, error) { + var body HomeworkCreateRequestSchema0SectionJwId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0SectionJwId0 overwrites any union data inside the HomeworkCreateRequestSchema_0_SectionJwId as the provided HomeworkCreateRequestSchema0SectionJwId0 +func (t *HomeworkCreateRequestSchema_0_SectionJwId) FromHomeworkCreateRequestSchema0SectionJwId0(v HomeworkCreateRequestSchema0SectionJwId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0SectionJwId0 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_SectionJwId, using the provided HomeworkCreateRequestSchema0SectionJwId0 +func (t *HomeworkCreateRequestSchema_0_SectionJwId) MergeHomeworkCreateRequestSchema0SectionJwId0(v HomeworkCreateRequestSchema0SectionJwId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema0SectionJwId1 returns the union data inside the HomeworkCreateRequestSchema_0_SectionJwId as a HomeworkCreateRequestSchema0SectionJwId1 +func (t HomeworkCreateRequestSchema_0_SectionJwId) AsHomeworkCreateRequestSchema0SectionJwId1() (HomeworkCreateRequestSchema0SectionJwId1, error) { + var body HomeworkCreateRequestSchema0SectionJwId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0SectionJwId1 overwrites any union data inside the HomeworkCreateRequestSchema_0_SectionJwId as the provided HomeworkCreateRequestSchema0SectionJwId1 +func (t *HomeworkCreateRequestSchema_0_SectionJwId) FromHomeworkCreateRequestSchema0SectionJwId1(v HomeworkCreateRequestSchema0SectionJwId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0SectionJwId1 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_SectionJwId, using the provided HomeworkCreateRequestSchema0SectionJwId1 +func (t *HomeworkCreateRequestSchema_0_SectionJwId) MergeHomeworkCreateRequestSchema0SectionJwId1(v HomeworkCreateRequestSchema0SectionJwId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_0_SectionJwId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_0_SectionJwId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema0SubmissionDueAt0 returns the union data inside the HomeworkCreateRequestSchema_0_SubmissionDueAt as a HomeworkCreateRequestSchema0SubmissionDueAt0 +func (t HomeworkCreateRequestSchema_0_SubmissionDueAt) AsHomeworkCreateRequestSchema0SubmissionDueAt0() (HomeworkCreateRequestSchema0SubmissionDueAt0, error) { + var body HomeworkCreateRequestSchema0SubmissionDueAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0SubmissionDueAt0 overwrites any union data inside the HomeworkCreateRequestSchema_0_SubmissionDueAt as the provided HomeworkCreateRequestSchema0SubmissionDueAt0 +func (t *HomeworkCreateRequestSchema_0_SubmissionDueAt) FromHomeworkCreateRequestSchema0SubmissionDueAt0(v HomeworkCreateRequestSchema0SubmissionDueAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0SubmissionDueAt0 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_SubmissionDueAt, using the provided HomeworkCreateRequestSchema0SubmissionDueAt0 +func (t *HomeworkCreateRequestSchema_0_SubmissionDueAt) MergeHomeworkCreateRequestSchema0SubmissionDueAt0(v HomeworkCreateRequestSchema0SubmissionDueAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema0SubmissionDueAt1 returns the union data inside the HomeworkCreateRequestSchema_0_SubmissionDueAt as a HomeworkCreateRequestSchema0SubmissionDueAt1 +func (t HomeworkCreateRequestSchema_0_SubmissionDueAt) AsHomeworkCreateRequestSchema0SubmissionDueAt1() (HomeworkCreateRequestSchema0SubmissionDueAt1, error) { + var body HomeworkCreateRequestSchema0SubmissionDueAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0SubmissionDueAt1 overwrites any union data inside the HomeworkCreateRequestSchema_0_SubmissionDueAt as the provided HomeworkCreateRequestSchema0SubmissionDueAt1 +func (t *HomeworkCreateRequestSchema_0_SubmissionDueAt) FromHomeworkCreateRequestSchema0SubmissionDueAt1(v HomeworkCreateRequestSchema0SubmissionDueAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0SubmissionDueAt1 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_SubmissionDueAt, using the provided HomeworkCreateRequestSchema0SubmissionDueAt1 +func (t *HomeworkCreateRequestSchema_0_SubmissionDueAt) MergeHomeworkCreateRequestSchema0SubmissionDueAt1(v HomeworkCreateRequestSchema0SubmissionDueAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_0_SubmissionDueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_0_SubmissionDueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema0SubmissionStartAt0 returns the union data inside the HomeworkCreateRequestSchema_0_SubmissionStartAt as a HomeworkCreateRequestSchema0SubmissionStartAt0 +func (t HomeworkCreateRequestSchema_0_SubmissionStartAt) AsHomeworkCreateRequestSchema0SubmissionStartAt0() (HomeworkCreateRequestSchema0SubmissionStartAt0, error) { + var body HomeworkCreateRequestSchema0SubmissionStartAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0SubmissionStartAt0 overwrites any union data inside the HomeworkCreateRequestSchema_0_SubmissionStartAt as the provided HomeworkCreateRequestSchema0SubmissionStartAt0 +func (t *HomeworkCreateRequestSchema_0_SubmissionStartAt) FromHomeworkCreateRequestSchema0SubmissionStartAt0(v HomeworkCreateRequestSchema0SubmissionStartAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0SubmissionStartAt0 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_SubmissionStartAt, using the provided HomeworkCreateRequestSchema0SubmissionStartAt0 +func (t *HomeworkCreateRequestSchema_0_SubmissionStartAt) MergeHomeworkCreateRequestSchema0SubmissionStartAt0(v HomeworkCreateRequestSchema0SubmissionStartAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema0SubmissionStartAt1 returns the union data inside the HomeworkCreateRequestSchema_0_SubmissionStartAt as a HomeworkCreateRequestSchema0SubmissionStartAt1 +func (t HomeworkCreateRequestSchema_0_SubmissionStartAt) AsHomeworkCreateRequestSchema0SubmissionStartAt1() (HomeworkCreateRequestSchema0SubmissionStartAt1, error) { + var body HomeworkCreateRequestSchema0SubmissionStartAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema0SubmissionStartAt1 overwrites any union data inside the HomeworkCreateRequestSchema_0_SubmissionStartAt as the provided HomeworkCreateRequestSchema0SubmissionStartAt1 +func (t *HomeworkCreateRequestSchema_0_SubmissionStartAt) FromHomeworkCreateRequestSchema0SubmissionStartAt1(v HomeworkCreateRequestSchema0SubmissionStartAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema0SubmissionStartAt1 performs a merge with any union data inside the HomeworkCreateRequestSchema_0_SubmissionStartAt, using the provided HomeworkCreateRequestSchema0SubmissionStartAt1 +func (t *HomeworkCreateRequestSchema_0_SubmissionStartAt) MergeHomeworkCreateRequestSchema0SubmissionStartAt1(v HomeworkCreateRequestSchema0SubmissionStartAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_0_SubmissionStartAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_0_SubmissionStartAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema1PublishedAt0 returns the union data inside the HomeworkCreateRequestSchema_1_PublishedAt as a HomeworkCreateRequestSchema1PublishedAt0 +func (t HomeworkCreateRequestSchema_1_PublishedAt) AsHomeworkCreateRequestSchema1PublishedAt0() (HomeworkCreateRequestSchema1PublishedAt0, error) { + var body HomeworkCreateRequestSchema1PublishedAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1PublishedAt0 overwrites any union data inside the HomeworkCreateRequestSchema_1_PublishedAt as the provided HomeworkCreateRequestSchema1PublishedAt0 +func (t *HomeworkCreateRequestSchema_1_PublishedAt) FromHomeworkCreateRequestSchema1PublishedAt0(v HomeworkCreateRequestSchema1PublishedAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1PublishedAt0 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_PublishedAt, using the provided HomeworkCreateRequestSchema1PublishedAt0 +func (t *HomeworkCreateRequestSchema_1_PublishedAt) MergeHomeworkCreateRequestSchema1PublishedAt0(v HomeworkCreateRequestSchema1PublishedAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema1PublishedAt1 returns the union data inside the HomeworkCreateRequestSchema_1_PublishedAt as a HomeworkCreateRequestSchema1PublishedAt1 +func (t HomeworkCreateRequestSchema_1_PublishedAt) AsHomeworkCreateRequestSchema1PublishedAt1() (HomeworkCreateRequestSchema1PublishedAt1, error) { + var body HomeworkCreateRequestSchema1PublishedAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1PublishedAt1 overwrites any union data inside the HomeworkCreateRequestSchema_1_PublishedAt as the provided HomeworkCreateRequestSchema1PublishedAt1 +func (t *HomeworkCreateRequestSchema_1_PublishedAt) FromHomeworkCreateRequestSchema1PublishedAt1(v HomeworkCreateRequestSchema1PublishedAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1PublishedAt1 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_PublishedAt, using the provided HomeworkCreateRequestSchema1PublishedAt1 +func (t *HomeworkCreateRequestSchema_1_PublishedAt) MergeHomeworkCreateRequestSchema1PublishedAt1(v HomeworkCreateRequestSchema1PublishedAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_1_PublishedAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_1_PublishedAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema1SectionId0 returns the union data inside the HomeworkCreateRequestSchema_1_SectionId as a HomeworkCreateRequestSchema1SectionId0 +func (t HomeworkCreateRequestSchema_1_SectionId) AsHomeworkCreateRequestSchema1SectionId0() (HomeworkCreateRequestSchema1SectionId0, error) { + var body HomeworkCreateRequestSchema1SectionId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1SectionId0 overwrites any union data inside the HomeworkCreateRequestSchema_1_SectionId as the provided HomeworkCreateRequestSchema1SectionId0 +func (t *HomeworkCreateRequestSchema_1_SectionId) FromHomeworkCreateRequestSchema1SectionId0(v HomeworkCreateRequestSchema1SectionId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1SectionId0 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_SectionId, using the provided HomeworkCreateRequestSchema1SectionId0 +func (t *HomeworkCreateRequestSchema_1_SectionId) MergeHomeworkCreateRequestSchema1SectionId0(v HomeworkCreateRequestSchema1SectionId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema1SectionId1 returns the union data inside the HomeworkCreateRequestSchema_1_SectionId as a HomeworkCreateRequestSchema1SectionId1 +func (t HomeworkCreateRequestSchema_1_SectionId) AsHomeworkCreateRequestSchema1SectionId1() (HomeworkCreateRequestSchema1SectionId1, error) { + var body HomeworkCreateRequestSchema1SectionId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1SectionId1 overwrites any union data inside the HomeworkCreateRequestSchema_1_SectionId as the provided HomeworkCreateRequestSchema1SectionId1 +func (t *HomeworkCreateRequestSchema_1_SectionId) FromHomeworkCreateRequestSchema1SectionId1(v HomeworkCreateRequestSchema1SectionId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1SectionId1 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_SectionId, using the provided HomeworkCreateRequestSchema1SectionId1 +func (t *HomeworkCreateRequestSchema_1_SectionId) MergeHomeworkCreateRequestSchema1SectionId1(v HomeworkCreateRequestSchema1SectionId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_1_SectionId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_1_SectionId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema1SectionJwId0 returns the union data inside the HomeworkCreateRequestSchema_1_SectionJwId as a HomeworkCreateRequestSchema1SectionJwId0 +func (t HomeworkCreateRequestSchema_1_SectionJwId) AsHomeworkCreateRequestSchema1SectionJwId0() (HomeworkCreateRequestSchema1SectionJwId0, error) { + var body HomeworkCreateRequestSchema1SectionJwId0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1SectionJwId0 overwrites any union data inside the HomeworkCreateRequestSchema_1_SectionJwId as the provided HomeworkCreateRequestSchema1SectionJwId0 +func (t *HomeworkCreateRequestSchema_1_SectionJwId) FromHomeworkCreateRequestSchema1SectionJwId0(v HomeworkCreateRequestSchema1SectionJwId0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1SectionJwId0 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_SectionJwId, using the provided HomeworkCreateRequestSchema1SectionJwId0 +func (t *HomeworkCreateRequestSchema_1_SectionJwId) MergeHomeworkCreateRequestSchema1SectionJwId0(v HomeworkCreateRequestSchema1SectionJwId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema1SectionJwId1 returns the union data inside the HomeworkCreateRequestSchema_1_SectionJwId as a HomeworkCreateRequestSchema1SectionJwId1 +func (t HomeworkCreateRequestSchema_1_SectionJwId) AsHomeworkCreateRequestSchema1SectionJwId1() (HomeworkCreateRequestSchema1SectionJwId1, error) { + var body HomeworkCreateRequestSchema1SectionJwId1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1SectionJwId1 overwrites any union data inside the HomeworkCreateRequestSchema_1_SectionJwId as the provided HomeworkCreateRequestSchema1SectionJwId1 +func (t *HomeworkCreateRequestSchema_1_SectionJwId) FromHomeworkCreateRequestSchema1SectionJwId1(v HomeworkCreateRequestSchema1SectionJwId1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1SectionJwId1 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_SectionJwId, using the provided HomeworkCreateRequestSchema1SectionJwId1 +func (t *HomeworkCreateRequestSchema_1_SectionJwId) MergeHomeworkCreateRequestSchema1SectionJwId1(v HomeworkCreateRequestSchema1SectionJwId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_1_SectionJwId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_1_SectionJwId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema1SubmissionDueAt0 returns the union data inside the HomeworkCreateRequestSchema_1_SubmissionDueAt as a HomeworkCreateRequestSchema1SubmissionDueAt0 +func (t HomeworkCreateRequestSchema_1_SubmissionDueAt) AsHomeworkCreateRequestSchema1SubmissionDueAt0() (HomeworkCreateRequestSchema1SubmissionDueAt0, error) { + var body HomeworkCreateRequestSchema1SubmissionDueAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1SubmissionDueAt0 overwrites any union data inside the HomeworkCreateRequestSchema_1_SubmissionDueAt as the provided HomeworkCreateRequestSchema1SubmissionDueAt0 +func (t *HomeworkCreateRequestSchema_1_SubmissionDueAt) FromHomeworkCreateRequestSchema1SubmissionDueAt0(v HomeworkCreateRequestSchema1SubmissionDueAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1SubmissionDueAt0 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_SubmissionDueAt, using the provided HomeworkCreateRequestSchema1SubmissionDueAt0 +func (t *HomeworkCreateRequestSchema_1_SubmissionDueAt) MergeHomeworkCreateRequestSchema1SubmissionDueAt0(v HomeworkCreateRequestSchema1SubmissionDueAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema1SubmissionDueAt1 returns the union data inside the HomeworkCreateRequestSchema_1_SubmissionDueAt as a HomeworkCreateRequestSchema1SubmissionDueAt1 +func (t HomeworkCreateRequestSchema_1_SubmissionDueAt) AsHomeworkCreateRequestSchema1SubmissionDueAt1() (HomeworkCreateRequestSchema1SubmissionDueAt1, error) { + var body HomeworkCreateRequestSchema1SubmissionDueAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1SubmissionDueAt1 overwrites any union data inside the HomeworkCreateRequestSchema_1_SubmissionDueAt as the provided HomeworkCreateRequestSchema1SubmissionDueAt1 +func (t *HomeworkCreateRequestSchema_1_SubmissionDueAt) FromHomeworkCreateRequestSchema1SubmissionDueAt1(v HomeworkCreateRequestSchema1SubmissionDueAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1SubmissionDueAt1 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_SubmissionDueAt, using the provided HomeworkCreateRequestSchema1SubmissionDueAt1 +func (t *HomeworkCreateRequestSchema_1_SubmissionDueAt) MergeHomeworkCreateRequestSchema1SubmissionDueAt1(v HomeworkCreateRequestSchema1SubmissionDueAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_1_SubmissionDueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_1_SubmissionDueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkCreateRequestSchema1SubmissionStartAt0 returns the union data inside the HomeworkCreateRequestSchema_1_SubmissionStartAt as a HomeworkCreateRequestSchema1SubmissionStartAt0 +func (t HomeworkCreateRequestSchema_1_SubmissionStartAt) AsHomeworkCreateRequestSchema1SubmissionStartAt0() (HomeworkCreateRequestSchema1SubmissionStartAt0, error) { + var body HomeworkCreateRequestSchema1SubmissionStartAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1SubmissionStartAt0 overwrites any union data inside the HomeworkCreateRequestSchema_1_SubmissionStartAt as the provided HomeworkCreateRequestSchema1SubmissionStartAt0 +func (t *HomeworkCreateRequestSchema_1_SubmissionStartAt) FromHomeworkCreateRequestSchema1SubmissionStartAt0(v HomeworkCreateRequestSchema1SubmissionStartAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1SubmissionStartAt0 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_SubmissionStartAt, using the provided HomeworkCreateRequestSchema1SubmissionStartAt0 +func (t *HomeworkCreateRequestSchema_1_SubmissionStartAt) MergeHomeworkCreateRequestSchema1SubmissionStartAt0(v HomeworkCreateRequestSchema1SubmissionStartAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkCreateRequestSchema1SubmissionStartAt1 returns the union data inside the HomeworkCreateRequestSchema_1_SubmissionStartAt as a HomeworkCreateRequestSchema1SubmissionStartAt1 +func (t HomeworkCreateRequestSchema_1_SubmissionStartAt) AsHomeworkCreateRequestSchema1SubmissionStartAt1() (HomeworkCreateRequestSchema1SubmissionStartAt1, error) { + var body HomeworkCreateRequestSchema1SubmissionStartAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkCreateRequestSchema1SubmissionStartAt1 overwrites any union data inside the HomeworkCreateRequestSchema_1_SubmissionStartAt as the provided HomeworkCreateRequestSchema1SubmissionStartAt1 +func (t *HomeworkCreateRequestSchema_1_SubmissionStartAt) FromHomeworkCreateRequestSchema1SubmissionStartAt1(v HomeworkCreateRequestSchema1SubmissionStartAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkCreateRequestSchema1SubmissionStartAt1 performs a merge with any union data inside the HomeworkCreateRequestSchema_1_SubmissionStartAt, using the provided HomeworkCreateRequestSchema1SubmissionStartAt1 +func (t *HomeworkCreateRequestSchema_1_SubmissionStartAt) MergeHomeworkCreateRequestSchema1SubmissionStartAt1(v HomeworkCreateRequestSchema1SubmissionStartAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkCreateRequestSchema_1_SubmissionStartAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkCreateRequestSchema_1_SubmissionStartAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkUpdateRequestSchemaPublishedAt0 returns the union data inside the HomeworkUpdateRequestSchema_PublishedAt as a HomeworkUpdateRequestSchemaPublishedAt0 +func (t HomeworkUpdateRequestSchema_PublishedAt) AsHomeworkUpdateRequestSchemaPublishedAt0() (HomeworkUpdateRequestSchemaPublishedAt0, error) { + var body HomeworkUpdateRequestSchemaPublishedAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkUpdateRequestSchemaPublishedAt0 overwrites any union data inside the HomeworkUpdateRequestSchema_PublishedAt as the provided HomeworkUpdateRequestSchemaPublishedAt0 +func (t *HomeworkUpdateRequestSchema_PublishedAt) FromHomeworkUpdateRequestSchemaPublishedAt0(v HomeworkUpdateRequestSchemaPublishedAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkUpdateRequestSchemaPublishedAt0 performs a merge with any union data inside the HomeworkUpdateRequestSchema_PublishedAt, using the provided HomeworkUpdateRequestSchemaPublishedAt0 +func (t *HomeworkUpdateRequestSchema_PublishedAt) MergeHomeworkUpdateRequestSchemaPublishedAt0(v HomeworkUpdateRequestSchemaPublishedAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkUpdateRequestSchemaPublishedAt1 returns the union data inside the HomeworkUpdateRequestSchema_PublishedAt as a HomeworkUpdateRequestSchemaPublishedAt1 +func (t HomeworkUpdateRequestSchema_PublishedAt) AsHomeworkUpdateRequestSchemaPublishedAt1() (HomeworkUpdateRequestSchemaPublishedAt1, error) { + var body HomeworkUpdateRequestSchemaPublishedAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkUpdateRequestSchemaPublishedAt1 overwrites any union data inside the HomeworkUpdateRequestSchema_PublishedAt as the provided HomeworkUpdateRequestSchemaPublishedAt1 +func (t *HomeworkUpdateRequestSchema_PublishedAt) FromHomeworkUpdateRequestSchemaPublishedAt1(v HomeworkUpdateRequestSchemaPublishedAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkUpdateRequestSchemaPublishedAt1 performs a merge with any union data inside the HomeworkUpdateRequestSchema_PublishedAt, using the provided HomeworkUpdateRequestSchemaPublishedAt1 +func (t *HomeworkUpdateRequestSchema_PublishedAt) MergeHomeworkUpdateRequestSchemaPublishedAt1(v HomeworkUpdateRequestSchemaPublishedAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// SubscribedHomeworksResponseSchema defines model for subscribedHomeworksResponseSchema. -type SubscribedHomeworksResponseSchema struct { - AuditLogs []struct { - Action SubscribedHomeworksResponseSchemaAuditLogsAction `json:"action"` - Actor *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"actor"` - ActorId *string `json:"actorId"` - CreatedAt time.Time `json:"createdAt"` - HomeworkId *string `json:"homeworkId"` - Id string `json:"id"` - SectionId int `json:"sectionId"` - TitleSnapshot string `json:"titleSnapshot"` - } `json:"auditLogs"` - Homeworks []struct { - CommentCount int `json:"commentCount"` - Completion *struct { - CompletedAt time.Time `json:"completedAt"` - } `json:"completion"` - CreatedAt time.Time `json:"createdAt"` - CreatedBy *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"createdBy"` - CreatedById *string `json:"createdById"` - DeletedAt *time.Time `json:"deletedAt"` - DeletedBy *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"deletedBy"` - DeletedById *string `json:"deletedById"` - Description *struct { - Content string `json:"content"` - CourseId *int `json:"courseId"` - CreatedAt time.Time `json:"createdAt"` - HomeworkId *string `json:"homeworkId"` - Id string `json:"id"` - LastEditedAt *time.Time `json:"lastEditedAt"` - LastEditedById *string `json:"lastEditedById"` - SectionId *int `json:"sectionId"` - TeacherId *int `json:"teacherId"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"description"` - Id string `json:"id"` - IsMajor bool `json:"isMajor"` - PublishedAt *time.Time `json:"publishedAt"` - RequiresTeam bool `json:"requiresTeam"` - Section struct { - ActualPeriods *int `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { - CategoryId *int `json:"categoryId"` - ClassTypeId *int `json:"classTypeId"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevelId *int `json:"educationLevelId"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - NamePrimary string `json:"namePrimary"` - NameSecondary *string `json:"nameSecondary"` - TypeId *int `json:"typeId"` - } `json:"course"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguageId *int `json:"teachLanguageId"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` - } `json:"section"` - SectionId int `json:"sectionId"` - SubmissionDueAt *time.Time `json:"submissionDueAt"` - SubmissionStartAt *time.Time `json:"submissionStartAt"` - Title string `json:"title"` - UpdatedAt time.Time `json:"updatedAt"` - UpdatedBy *struct { - Id string `json:"id"` - Image *string `json:"image"` - Name *string `json:"name"` - Username *string `json:"username"` - } `json:"updatedBy"` - UpdatedById *string `json:"updatedById"` - } `json:"homeworks"` - SectionIds []int `json:"sectionIds"` - Viewer struct { - Image *string `json:"image"` - IsAdmin bool `json:"isAdmin"` - IsAuthenticated bool `json:"isAuthenticated"` - IsSuspended bool `json:"isSuspended"` - Name *string `json:"name"` - SuspensionExpiresAt *time.Time `json:"suspensionExpiresAt"` - SuspensionReason *string `json:"suspensionReason"` - UserId *string `json:"userId"` - } `json:"viewer"` +func (t HomeworkUpdateRequestSchema_PublishedAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err } -// SubscribedHomeworksResponseSchemaAuditLogsAction defines model for SubscribedHomeworksResponseSchema.AuditLogs.Action. -type SubscribedHomeworksResponseSchemaAuditLogsAction string +func (t *HomeworkUpdateRequestSchema_PublishedAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} -// SuccessResponseSchema defines model for successResponseSchema. -type SuccessResponseSchema struct { - Success bool `json:"success"` +// AsHomeworkUpdateRequestSchemaSubmissionDueAt0 returns the union data inside the HomeworkUpdateRequestSchema_SubmissionDueAt as a HomeworkUpdateRequestSchemaSubmissionDueAt0 +func (t HomeworkUpdateRequestSchema_SubmissionDueAt) AsHomeworkUpdateRequestSchemaSubmissionDueAt0() (HomeworkUpdateRequestSchemaSubmissionDueAt0, error) { + var body HomeworkUpdateRequestSchemaSubmissionDueAt0 + err := json.Unmarshal(t.union, &body) + return body, err } -// TeacherDetailSchema defines model for teacherDetailSchema. -type TeacherDetailSchema struct { - UnderscoreCount struct { - Sections int `json:"sections"` - } `json:"_count"` - Address *string `json:"address"` - Age *int `json:"age"` - Code *string `json:"code"` - Department *struct { - Code string `json:"code"` - Id int `json:"id"` - IsCollege *bool `json:"isCollege"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"department"` - DepartmentId *int `json:"departmentId"` - Email *string `json:"email"` - Id int `json:"id"` - Mobile *string `json:"mobile"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - PersonId *int `json:"personId"` - Postcode *string `json:"postcode"` - Qq *string `json:"qq"` - Sections []struct { - ActualPeriods *int `json:"actualPeriods"` - BizTypeId *int `json:"bizTypeId"` - CampusId *int `json:"campusId"` - Code string `json:"code"` - Course struct { - Category *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"category"` - CategoryId *int `json:"categoryId"` - ClassType *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classType"` - ClassTypeId *int `json:"classTypeId"` - Classify *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"classify"` - ClassifyId *int `json:"classifyId"` - Code string `json:"code"` - EducationLevel *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"educationLevel"` - EducationLevelId *int `json:"educationLevelId"` - Gradation *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"gradation"` - GradationId *int `json:"gradationId"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - Type *struct { - Id int `json:"id"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"type"` - TypeId *int `json:"typeId"` - } `json:"course"` - CourseId int `json:"courseId"` - Credits *float32 `json:"credits"` - DateTimePlacePersonText interface{} `json:"dateTimePlacePersonText"` - DateTimePlaceText *string `json:"dateTimePlaceText"` - DesignPeriods *float32 `json:"designPeriods"` - ExamModeId *int `json:"examModeId"` - ExperimentPeriods *float32 `json:"experimentPeriods"` - GraduateAndPostgraduate *bool `json:"graduateAndPostgraduate"` - Id int `json:"id"` - JwId int `json:"jwId"` - LimitCount *int `json:"limitCount"` - MachinePeriods *float32 `json:"machinePeriods"` - OpenDepartmentId *int `json:"openDepartmentId"` - Period *int `json:"period"` - PeriodsPerWeek *int `json:"periodsPerWeek"` - PracticePeriods *float32 `json:"practicePeriods"` - Remark *string `json:"remark"` - RoomTypeId *int `json:"roomTypeId"` - ScheduleJsonParams interface{} `json:"scheduleJsonParams"` - ScheduleRemark *string `json:"scheduleRemark"` - ScheduleState *string `json:"scheduleState"` - SelectedStdCount *int `json:"selectedStdCount"` - Semester *struct { - Code string `json:"code"` - EndDate *time.Time `json:"endDate"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - StartDate *time.Time `json:"startDate"` - } `json:"semester"` - SemesterId *int `json:"semesterId"` - StdCount *int `json:"stdCount"` - SuggestScheduleWeekInfo *string `json:"suggestScheduleWeekInfo"` - SuggestScheduleWeeks interface{} `json:"suggestScheduleWeeks"` - TeachLanguageId *int `json:"teachLanguageId"` - TestPeriods *float32 `json:"testPeriods"` - TheoryPeriods *float32 `json:"theoryPeriods"` - TimesPerWeek *int `json:"timesPerWeek"` - } `json:"sections"` - TeacherId *int `json:"teacherId"` - TeacherTitle *struct { - Code string `json:"code"` - Enabled *bool `json:"enabled"` - Id int `json:"id"` - JwId int `json:"jwId"` - NameCn string `json:"nameCn"` - NameEn *string `json:"nameEn"` - } `json:"teacherTitle"` - TeacherTitleId *int `json:"teacherTitleId"` - Telephone *string `json:"telephone"` - Wechat *string `json:"wechat"` +// FromHomeworkUpdateRequestSchemaSubmissionDueAt0 overwrites any union data inside the HomeworkUpdateRequestSchema_SubmissionDueAt as the provided HomeworkUpdateRequestSchemaSubmissionDueAt0 +func (t *HomeworkUpdateRequestSchema_SubmissionDueAt) FromHomeworkUpdateRequestSchemaSubmissionDueAt0(v HomeworkUpdateRequestSchemaSubmissionDueAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkUpdateRequestSchemaSubmissionDueAt0 performs a merge with any union data inside the HomeworkUpdateRequestSchema_SubmissionDueAt, using the provided HomeworkUpdateRequestSchemaSubmissionDueAt0 +func (t *HomeworkUpdateRequestSchema_SubmissionDueAt) MergeHomeworkUpdateRequestSchemaSubmissionDueAt0(v HomeworkUpdateRequestSchemaSubmissionDueAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkUpdateRequestSchemaSubmissionDueAt1 returns the union data inside the HomeworkUpdateRequestSchema_SubmissionDueAt as a HomeworkUpdateRequestSchemaSubmissionDueAt1 +func (t HomeworkUpdateRequestSchema_SubmissionDueAt) AsHomeworkUpdateRequestSchemaSubmissionDueAt1() (HomeworkUpdateRequestSchemaSubmissionDueAt1, error) { + var body HomeworkUpdateRequestSchemaSubmissionDueAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkUpdateRequestSchemaSubmissionDueAt1 overwrites any union data inside the HomeworkUpdateRequestSchema_SubmissionDueAt as the provided HomeworkUpdateRequestSchemaSubmissionDueAt1 +func (t *HomeworkUpdateRequestSchema_SubmissionDueAt) FromHomeworkUpdateRequestSchemaSubmissionDueAt1(v HomeworkUpdateRequestSchemaSubmissionDueAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkUpdateRequestSchemaSubmissionDueAt1 performs a merge with any union data inside the HomeworkUpdateRequestSchema_SubmissionDueAt, using the provided HomeworkUpdateRequestSchemaSubmissionDueAt1 +func (t *HomeworkUpdateRequestSchema_SubmissionDueAt) MergeHomeworkUpdateRequestSchemaSubmissionDueAt1(v HomeworkUpdateRequestSchemaSubmissionDueAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t HomeworkUpdateRequestSchema_SubmissionDueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *HomeworkUpdateRequestSchema_SubmissionDueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsHomeworkUpdateRequestSchemaSubmissionStartAt0 returns the union data inside the HomeworkUpdateRequestSchema_SubmissionStartAt as a HomeworkUpdateRequestSchemaSubmissionStartAt0 +func (t HomeworkUpdateRequestSchema_SubmissionStartAt) AsHomeworkUpdateRequestSchemaSubmissionStartAt0() (HomeworkUpdateRequestSchemaSubmissionStartAt0, error) { + var body HomeworkUpdateRequestSchemaSubmissionStartAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromHomeworkUpdateRequestSchemaSubmissionStartAt0 overwrites any union data inside the HomeworkUpdateRequestSchema_SubmissionStartAt as the provided HomeworkUpdateRequestSchemaSubmissionStartAt0 +func (t *HomeworkUpdateRequestSchema_SubmissionStartAt) FromHomeworkUpdateRequestSchemaSubmissionStartAt0(v HomeworkUpdateRequestSchemaSubmissionStartAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeHomeworkUpdateRequestSchemaSubmissionStartAt0 performs a merge with any union data inside the HomeworkUpdateRequestSchema_SubmissionStartAt, using the provided HomeworkUpdateRequestSchemaSubmissionStartAt0 +func (t *HomeworkUpdateRequestSchema_SubmissionStartAt) MergeHomeworkUpdateRequestSchemaSubmissionStartAt0(v HomeworkUpdateRequestSchemaSubmissionStartAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsHomeworkUpdateRequestSchemaSubmissionStartAt1 returns the union data inside the HomeworkUpdateRequestSchema_SubmissionStartAt as a HomeworkUpdateRequestSchemaSubmissionStartAt1 +func (t HomeworkUpdateRequestSchema_SubmissionStartAt) AsHomeworkUpdateRequestSchemaSubmissionStartAt1() (HomeworkUpdateRequestSchemaSubmissionStartAt1, error) { + var body HomeworkUpdateRequestSchemaSubmissionStartAt1 + err := json.Unmarshal(t.union, &body) + return body, err } -// TodoCreateRequestSchema defines model for todoCreateRequestSchema. -type TodoCreateRequestSchema struct { - Content *string `json:"content,omitempty"` - DueAt *string `json:"dueAt,omitempty"` - Priority *TodoCreateRequestSchemaPriority `json:"priority,omitempty"` - Title string `json:"title"` +// FromHomeworkUpdateRequestSchemaSubmissionStartAt1 overwrites any union data inside the HomeworkUpdateRequestSchema_SubmissionStartAt as the provided HomeworkUpdateRequestSchemaSubmissionStartAt1 +func (t *HomeworkUpdateRequestSchema_SubmissionStartAt) FromHomeworkUpdateRequestSchemaSubmissionStartAt1(v HomeworkUpdateRequestSchemaSubmissionStartAt1) error { + b, err := json.Marshal(v) + t.union = b + return err } -// TodoCreateRequestSchemaPriority defines model for TodoCreateRequestSchema.Priority. -type TodoCreateRequestSchemaPriority string +// MergeHomeworkUpdateRequestSchemaSubmissionStartAt1 performs a merge with any union data inside the HomeworkUpdateRequestSchema_SubmissionStartAt, using the provided HomeworkUpdateRequestSchemaSubmissionStartAt1 +func (t *HomeworkUpdateRequestSchema_SubmissionStartAt) MergeHomeworkUpdateRequestSchemaSubmissionStartAt1(v HomeworkUpdateRequestSchemaSubmissionStartAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// TodoUpdateRequestSchema defines model for todoUpdateRequestSchema. -type TodoUpdateRequestSchema struct { - Completed *bool `json:"completed,omitempty"` - Content *string `json:"content,omitempty"` - DueAt *string `json:"dueAt,omitempty"` - Priority *TodoUpdateRequestSchemaPriority `json:"priority,omitempty"` - Title *string `json:"title,omitempty"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// TodoUpdateRequestSchemaPriority defines model for TodoUpdateRequestSchema.Priority. -type TodoUpdateRequestSchemaPriority string +func (t HomeworkUpdateRequestSchema_SubmissionStartAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// TodosListResponseSchema defines model for todosListResponseSchema. -type TodosListResponseSchema struct { - Todos []struct { - Completed bool `json:"completed"` - Content *string `json:"content"` - CreatedAt time.Time `json:"createdAt"` - DueAt *time.Time `json:"dueAt"` - Id string `json:"id"` - Priority TodosListResponseSchemaTodosPriority `json:"priority"` - Title string `json:"title"` - UpdatedAt time.Time `json:"updatedAt"` - } `json:"todos"` +func (t *HomeworkUpdateRequestSchema_SubmissionStartAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// TodosListResponseSchemaTodosPriority defines model for TodosListResponseSchema.Todos.Priority. -type TodosListResponseSchemaTodosPriority string +// AsMatchSectionCodesRequestSchemaSemesterId0 returns the union data inside the MatchSectionCodesRequestSchema_SemesterId as a MatchSectionCodesRequestSchemaSemesterId0 +func (t MatchSectionCodesRequestSchema_SemesterId) AsMatchSectionCodesRequestSchemaSemesterId0() (MatchSectionCodesRequestSchemaSemesterId0, error) { + var body MatchSectionCodesRequestSchemaSemesterId0 + err := json.Unmarshal(t.union, &body) + return body, err +} -// UploadCompleteRequestSchema defines model for uploadCompleteRequestSchema. -type UploadCompleteRequestSchema struct { - ContentType *string `json:"contentType,omitempty"` - Filename string `json:"filename"` - Key string `json:"key"` +// FromMatchSectionCodesRequestSchemaSemesterId0 overwrites any union data inside the MatchSectionCodesRequestSchema_SemesterId as the provided MatchSectionCodesRequestSchemaSemesterId0 +func (t *MatchSectionCodesRequestSchema_SemesterId) FromMatchSectionCodesRequestSchemaSemesterId0(v MatchSectionCodesRequestSchemaSemesterId0) error { + b, err := json.Marshal(v) + t.union = b + return err } -// UploadCompleteResponseSchema defines model for uploadCompleteResponseSchema. -type UploadCompleteResponseSchema struct { - QuotaBytes int `json:"quotaBytes"` - Upload struct { - CreatedAt time.Time `json:"createdAt"` - Filename string `json:"filename"` - Id string `json:"id"` - Key string `json:"key"` - Size int `json:"size"` - } `json:"upload"` - UsedBytes int `json:"usedBytes"` +// MergeMatchSectionCodesRequestSchemaSemesterId0 performs a merge with any union data inside the MatchSectionCodesRequestSchema_SemesterId, using the provided MatchSectionCodesRequestSchemaSemesterId0 +func (t *MatchSectionCodesRequestSchema_SemesterId) MergeMatchSectionCodesRequestSchemaSemesterId0(v MatchSectionCodesRequestSchemaSemesterId0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// UploadCreateRequestSchema defines model for uploadCreateRequestSchema. -type UploadCreateRequestSchema struct { - ContentType *string `json:"contentType,omitempty"` - Filename string `json:"filename"` - Size string `json:"size"` +// AsMatchSectionCodesRequestSchemaSemesterId1 returns the union data inside the MatchSectionCodesRequestSchema_SemesterId as a MatchSectionCodesRequestSchemaSemesterId1 +func (t MatchSectionCodesRequestSchema_SemesterId) AsMatchSectionCodesRequestSchemaSemesterId1() (MatchSectionCodesRequestSchemaSemesterId1, error) { + var body MatchSectionCodesRequestSchemaSemesterId1 + err := json.Unmarshal(t.union, &body) + return body, err } -// UploadCreateResponseSchema defines model for uploadCreateResponseSchema. -type UploadCreateResponseSchema struct { - Key string `json:"key"` - MaxFileSizeBytes int `json:"maxFileSizeBytes"` - QuotaBytes int `json:"quotaBytes"` - Url string `json:"url"` - UsedBytes int `json:"usedBytes"` +// FromMatchSectionCodesRequestSchemaSemesterId1 overwrites any union data inside the MatchSectionCodesRequestSchema_SemesterId as the provided MatchSectionCodesRequestSchemaSemesterId1 +func (t *MatchSectionCodesRequestSchema_SemesterId) FromMatchSectionCodesRequestSchemaSemesterId1(v MatchSectionCodesRequestSchemaSemesterId1) error { + b, err := json.Marshal(v) + t.union = b + return err } -// UploadDeleteResponseSchema defines model for uploadDeleteResponseSchema. -type UploadDeleteResponseSchema struct { - DeletedId string `json:"deletedId"` - DeletedSize int `json:"deletedSize"` +// MergeMatchSectionCodesRequestSchemaSemesterId1 performs a merge with any union data inside the MatchSectionCodesRequestSchema_SemesterId, using the provided MatchSectionCodesRequestSchemaSemesterId1 +func (t *MatchSectionCodesRequestSchema_SemesterId) MergeMatchSectionCodesRequestSchemaSemesterId1(v MatchSectionCodesRequestSchemaSemesterId1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// UploadRenameRequestSchema defines model for uploadRenameRequestSchema. -type UploadRenameRequestSchema struct { - Filename string `json:"filename"` +func (t MatchSectionCodesRequestSchema_SemesterId) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err } -// UploadRenameResponseSchema defines model for uploadRenameResponseSchema. -type UploadRenameResponseSchema struct { - Upload struct { - CreatedAt time.Time `json:"createdAt"` - Filename string `json:"filename"` - Id string `json:"id"` - Key string `json:"key"` - Size int `json:"size"` - } `json:"upload"` +func (t *MatchSectionCodesRequestSchema_SemesterId) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// UploadsListResponseSchema defines model for uploadsListResponseSchema. -type UploadsListResponseSchema struct { - MaxFileSizeBytes int `json:"maxFileSizeBytes"` - QuotaBytes int `json:"quotaBytes"` - Uploads []struct { - CreatedAt time.Time `json:"createdAt"` - Filename string `json:"filename"` - Id string `json:"id"` - Key string `json:"key"` - Size int `json:"size"` - } `json:"uploads"` - UsedBytes int `json:"usedBytes"` +// AsOauthDeviceAuthorizationRequestSchemaResource0 returns the union data inside the OauthDeviceAuthorizationRequestSchema_Resource as a OauthDeviceAuthorizationRequestSchemaResource0 +func (t OauthDeviceAuthorizationRequestSchema_Resource) AsOauthDeviceAuthorizationRequestSchemaResource0() (OauthDeviceAuthorizationRequestSchemaResource0, error) { + var body OauthDeviceAuthorizationRequestSchemaResource0 + err := json.Unmarshal(t.union, &body) + return body, err } -// ListAdminCommentsParams defines parameters for ListAdminComments. -type ListAdminCommentsParams struct { - Status *ListAdminCommentsParamsStatus `form:"status,omitempty" json:"status,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +// FromOauthDeviceAuthorizationRequestSchemaResource0 overwrites any union data inside the OauthDeviceAuthorizationRequestSchema_Resource as the provided OauthDeviceAuthorizationRequestSchemaResource0 +func (t *OauthDeviceAuthorizationRequestSchema_Resource) FromOauthDeviceAuthorizationRequestSchemaResource0(v OauthDeviceAuthorizationRequestSchemaResource0) error { + b, err := json.Marshal(v) + t.union = b + return err } -// ListAdminCommentsParamsStatus defines parameters for ListAdminComments. -type ListAdminCommentsParamsStatus string +// MergeOauthDeviceAuthorizationRequestSchemaResource0 performs a merge with any union data inside the OauthDeviceAuthorizationRequestSchema_Resource, using the provided OauthDeviceAuthorizationRequestSchemaResource0 +func (t *OauthDeviceAuthorizationRequestSchema_Resource) MergeOauthDeviceAuthorizationRequestSchemaResource0(v OauthDeviceAuthorizationRequestSchemaResource0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// ListAdminDescriptionsParams defines parameters for ListAdminDescriptions. -type ListAdminDescriptionsParams struct { - TargetType *ListAdminDescriptionsParamsTargetType `form:"targetType,omitempty" json:"targetType,omitempty"` - HasContent *ListAdminDescriptionsParamsHasContent `form:"hasContent,omitempty" json:"hasContent,omitempty"` - Search *string `form:"search,omitempty" json:"search,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// ListAdminDescriptionsParamsTargetType defines parameters for ListAdminDescriptions. -type ListAdminDescriptionsParamsTargetType string +// AsOauthDeviceAuthorizationRequestSchemaResource1 returns the union data inside the OauthDeviceAuthorizationRequestSchema_Resource as a OauthDeviceAuthorizationRequestSchemaResource1 +func (t OauthDeviceAuthorizationRequestSchema_Resource) AsOauthDeviceAuthorizationRequestSchemaResource1() (OauthDeviceAuthorizationRequestSchemaResource1, error) { + var body OauthDeviceAuthorizationRequestSchemaResource1 + err := json.Unmarshal(t.union, &body) + return body, err +} -// ListAdminDescriptionsParamsHasContent defines parameters for ListAdminDescriptions. -type ListAdminDescriptionsParamsHasContent string +// FromOauthDeviceAuthorizationRequestSchemaResource1 overwrites any union data inside the OauthDeviceAuthorizationRequestSchema_Resource as the provided OauthDeviceAuthorizationRequestSchemaResource1 +func (t *OauthDeviceAuthorizationRequestSchema_Resource) FromOauthDeviceAuthorizationRequestSchemaResource1(v OauthDeviceAuthorizationRequestSchemaResource1) error { + b, err := json.Marshal(v) + t.union = b + return err +} -// ListAdminHomeworksParams defines parameters for ListAdminHomeworks. -type ListAdminHomeworksParams struct { - Status *ListAdminHomeworksParamsStatus `form:"status,omitempty" json:"status,omitempty"` - Search *string `form:"search,omitempty" json:"search,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +// MergeOauthDeviceAuthorizationRequestSchemaResource1 performs a merge with any union data inside the OauthDeviceAuthorizationRequestSchema_Resource, using the provided OauthDeviceAuthorizationRequestSchemaResource1 +func (t *OauthDeviceAuthorizationRequestSchema_Resource) MergeOauthDeviceAuthorizationRequestSchemaResource1(v OauthDeviceAuthorizationRequestSchemaResource1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// ListAdminHomeworksParamsStatus defines parameters for ListAdminHomeworks. -type ListAdminHomeworksParamsStatus string +func (t OauthDeviceAuthorizationRequestSchema_Resource) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// ListAdminUsersParams defines parameters for ListAdminUsers. -type ListAdminUsersParams struct { - Search *string `form:"search,omitempty" json:"search,omitempty"` - Page *int64 `form:"page,omitempty" json:"page,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +func (t *OauthDeviceAuthorizationRequestSchema_Resource) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// QueryBusParams defines parameters for QueryBus. -type QueryBusParams struct { - VersionKey *string `form:"versionKey,omitempty" json:"versionKey,omitempty"` +// AsOauthTokenRequestSchemaResource0 returns the union data inside the OauthTokenRequestSchema_Resource as a OauthTokenRequestSchemaResource0 +func (t OauthTokenRequestSchema_Resource) AsOauthTokenRequestSchemaResource0() (OauthTokenRequestSchemaResource0, error) { + var body OauthTokenRequestSchemaResource0 + err := json.Unmarshal(t.union, &body) + return body, err } -// ListCommentsParams defines parameters for ListComments. -type ListCommentsParams struct { - TargetType ListCommentsParamsTargetType `form:"targetType" json:"targetType"` - TargetId *string `form:"targetId,omitempty" json:"targetId,omitempty"` - SectionId *int64 `form:"sectionId,omitempty" json:"sectionId,omitempty"` - TeacherId *int64 `form:"teacherId,omitempty" json:"teacherId,omitempty"` +// FromOauthTokenRequestSchemaResource0 overwrites any union data inside the OauthTokenRequestSchema_Resource as the provided OauthTokenRequestSchemaResource0 +func (t *OauthTokenRequestSchema_Resource) FromOauthTokenRequestSchemaResource0(v OauthTokenRequestSchemaResource0) error { + b, err := json.Marshal(v) + t.union = b + return err } -// ListCommentsParamsTargetType defines parameters for ListComments. -type ListCommentsParamsTargetType string +// MergeOauthTokenRequestSchemaResource0 performs a merge with any union data inside the OauthTokenRequestSchema_Resource, using the provided OauthTokenRequestSchemaResource0 +func (t *OauthTokenRequestSchema_Resource) MergeOauthTokenRequestSchemaResource0(v OauthTokenRequestSchemaResource0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// CreateCommentParams defines parameters for CreateComment. -type CreateCommentParams struct { - TargetType CreateCommentParamsTargetType `form:"targetType" json:"targetType"` - TargetId *string `form:"targetId,omitempty" json:"targetId,omitempty"` - SectionId *int64 `form:"sectionId,omitempty" json:"sectionId,omitempty"` - TeacherId *int64 `form:"teacherId,omitempty" json:"teacherId,omitempty"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// CreateCommentParamsTargetType defines parameters for CreateComment. -type CreateCommentParamsTargetType string +// AsOauthTokenRequestSchemaResource1 returns the union data inside the OauthTokenRequestSchema_Resource as a OauthTokenRequestSchemaResource1 +func (t OauthTokenRequestSchema_Resource) AsOauthTokenRequestSchemaResource1() (OauthTokenRequestSchemaResource1, error) { + var body OauthTokenRequestSchemaResource1 + err := json.Unmarshal(t.union, &body) + return body, err +} -// RemoveCommentReactionParams defines parameters for RemoveCommentReaction. -type RemoveCommentReactionParams struct { - Type RemoveCommentReactionParamsType `form:"type" json:"type"` +// FromOauthTokenRequestSchemaResource1 overwrites any union data inside the OauthTokenRequestSchema_Resource as the provided OauthTokenRequestSchemaResource1 +func (t *OauthTokenRequestSchema_Resource) FromOauthTokenRequestSchemaResource1(v OauthTokenRequestSchemaResource1) error { + b, err := json.Marshal(v) + t.union = b + return err } -// RemoveCommentReactionParamsType defines parameters for RemoveCommentReaction. -type RemoveCommentReactionParamsType string +// MergeOauthTokenRequestSchemaResource1 performs a merge with any union data inside the OauthTokenRequestSchema_Resource, using the provided OauthTokenRequestSchemaResource1 +func (t *OauthTokenRequestSchema_Resource) MergeOauthTokenRequestSchemaResource1(v OauthTokenRequestSchemaResource1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// ListCoursesParams defines parameters for ListCourses. -type ListCoursesParams struct { - Search *string `form:"search,omitempty" json:"search,omitempty"` - EducationLevelId *int64 `form:"educationLevelId,omitempty" json:"educationLevelId,omitempty"` - CategoryId *int64 `form:"categoryId,omitempty" json:"categoryId,omitempty"` - ClassTypeId *int64 `form:"classTypeId,omitempty" json:"classTypeId,omitempty"` - Page *int64 `form:"page,omitempty" json:"page,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// VisitDashboardLinkParams defines parameters for VisitDashboardLink. -type VisitDashboardLinkParams struct { - Slug string `form:"slug" json:"slug"` +func (t OauthTokenRequestSchema_Resource) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err } -// RecordDashboardLinkVisitParams defines parameters for RecordDashboardLinkVisit. -type RecordDashboardLinkVisitParams struct { - Slug string `form:"slug" json:"slug"` +func (t *OauthTokenRequestSchema_Resource) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// GetDescriptionParams defines parameters for GetDescription. -type GetDescriptionParams struct { - TargetType GetDescriptionParamsTargetType `form:"targetType" json:"targetType"` - TargetId string `form:"targetId" json:"targetId"` +// AsTodoBatchDeleteResponseSchemaResults0 returns the union data inside the TodoBatchDeleteResponseSchema_Results_Item as a TodoBatchDeleteResponseSchemaResults0 +func (t TodoBatchDeleteResponseSchema_Results_Item) AsTodoBatchDeleteResponseSchemaResults0() (TodoBatchDeleteResponseSchemaResults0, error) { + var body TodoBatchDeleteResponseSchemaResults0 + err := json.Unmarshal(t.union, &body) + return body, err } -// GetDescriptionParamsTargetType defines parameters for GetDescription. -type GetDescriptionParamsTargetType string +// FromTodoBatchDeleteResponseSchemaResults0 overwrites any union data inside the TodoBatchDeleteResponseSchema_Results_Item as the provided TodoBatchDeleteResponseSchemaResults0 +func (t *TodoBatchDeleteResponseSchema_Results_Item) FromTodoBatchDeleteResponseSchemaResults0(v TodoBatchDeleteResponseSchemaResults0) error { + b, err := json.Marshal(v) + t.union = b + return err +} -// UpsertDescriptionParams defines parameters for UpsertDescription. -type UpsertDescriptionParams struct { - TargetType UpsertDescriptionParamsTargetType `form:"targetType" json:"targetType"` - TargetId string `form:"targetId" json:"targetId"` +// MergeTodoBatchDeleteResponseSchemaResults0 performs a merge with any union data inside the TodoBatchDeleteResponseSchema_Results_Item, using the provided TodoBatchDeleteResponseSchemaResults0 +func (t *TodoBatchDeleteResponseSchema_Results_Item) MergeTodoBatchDeleteResponseSchemaResults0(v TodoBatchDeleteResponseSchemaResults0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// UpsertDescriptionParamsTargetType defines parameters for UpsertDescription. -type UpsertDescriptionParamsTargetType string +// AsTodoBatchDeleteResponseSchemaResults1 returns the union data inside the TodoBatchDeleteResponseSchema_Results_Item as a TodoBatchDeleteResponseSchemaResults1 +func (t TodoBatchDeleteResponseSchema_Results_Item) AsTodoBatchDeleteResponseSchemaResults1() (TodoBatchDeleteResponseSchemaResults1, error) { + var body TodoBatchDeleteResponseSchemaResults1 + err := json.Unmarshal(t.union, &body) + return body, err +} -// ListHomeworksParams defines parameters for ListHomeworks. -type ListHomeworksParams struct { - SectionId *int64 `form:"sectionId,omitempty" json:"sectionId,omitempty"` - SectionIds *string `form:"sectionIds,omitempty" json:"sectionIds,omitempty"` - IncludeDeleted *ListHomeworksParamsIncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` +// FromTodoBatchDeleteResponseSchemaResults1 overwrites any union data inside the TodoBatchDeleteResponseSchema_Results_Item as the provided TodoBatchDeleteResponseSchemaResults1 +func (t *TodoBatchDeleteResponseSchema_Results_Item) FromTodoBatchDeleteResponseSchemaResults1(v TodoBatchDeleteResponseSchemaResults1) error { + b, err := json.Marshal(v) + t.union = b + return err } -// ListHomeworksParamsIncludeDeleted defines parameters for ListHomeworks. -type ListHomeworksParamsIncludeDeleted string +// MergeTodoBatchDeleteResponseSchemaResults1 performs a merge with any union data inside the TodoBatchDeleteResponseSchema_Results_Item, using the provided TodoBatchDeleteResponseSchemaResults1 +func (t *TodoBatchDeleteResponseSchema_Results_Item) MergeTodoBatchDeleteResponseSchemaResults1(v TodoBatchDeleteResponseSchemaResults1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// CreateHomeworkParams defines parameters for CreateHomework. -type CreateHomeworkParams struct { - SectionId *int64 `form:"sectionId,omitempty" json:"sectionId,omitempty"` - SectionIds *string `form:"sectionIds,omitempty" json:"sectionIds,omitempty"` - IncludeDeleted *CreateHomeworkParamsIncludeDeleted `form:"includeDeleted,omitempty" json:"includeDeleted,omitempty"` + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// CreateHomeworkParamsIncludeDeleted defines parameters for CreateHomework. -type CreateHomeworkParamsIncludeDeleted string +func (t TodoBatchDeleteResponseSchema_Results_Item) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// ListSchedulesParams defines parameters for ListSchedules. -type ListSchedulesParams struct { - SectionId *int64 `form:"sectionId,omitempty" json:"sectionId,omitempty"` - SectionJwId *int64 `form:"sectionJwId,omitempty" json:"sectionJwId,omitempty"` - SectionCode *string `form:"sectionCode,omitempty" json:"sectionCode,omitempty"` - TeacherId *int64 `form:"teacherId,omitempty" json:"teacherId,omitempty"` - TeacherCode *string `form:"teacherCode,omitempty" json:"teacherCode,omitempty"` - RoomId *int64 `form:"roomId,omitempty" json:"roomId,omitempty"` - RoomJwId *int64 `form:"roomJwId,omitempty" json:"roomJwId,omitempty"` - Weekday *int64 `form:"weekday,omitempty" json:"weekday,omitempty"` - DateFrom *time.Time `form:"dateFrom,omitempty" json:"dateFrom,omitempty"` - DateTo *time.Time `form:"dateTo,omitempty" json:"dateTo,omitempty"` - Page *int64 `form:"page,omitempty" json:"page,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +func (t *TodoBatchDeleteResponseSchema_Results_Item) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// ListSectionsParams defines parameters for ListSections. -type ListSectionsParams struct { - CourseId *int64 `form:"courseId,omitempty" json:"courseId,omitempty"` - CourseJwId *int64 `form:"courseJwId,omitempty" json:"courseJwId,omitempty"` - SemesterId *int64 `form:"semesterId,omitempty" json:"semesterId,omitempty"` - SemesterJwId *int64 `form:"semesterJwId,omitempty" json:"semesterJwId,omitempty"` - CampusId *int64 `form:"campusId,omitempty" json:"campusId,omitempty"` - DepartmentId *int64 `form:"departmentId,omitempty" json:"departmentId,omitempty"` - TeacherId *int64 `form:"teacherId,omitempty" json:"teacherId,omitempty"` - TeacherCode *string `form:"teacherCode,omitempty" json:"teacherCode,omitempty"` - Search *string `form:"search,omitempty" json:"search,omitempty"` - Ids *string `form:"ids,omitempty" json:"ids,omitempty"` - JwIds *string `form:"jwIds,omitempty" json:"jwIds,omitempty"` - Page *int64 `form:"page,omitempty" json:"page,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +// AsTodoCompletionBatchResponseSchemaResults0 returns the union data inside the TodoCompletionBatchResponseSchema_Results_Item as a TodoCompletionBatchResponseSchemaResults0 +func (t TodoCompletionBatchResponseSchema_Results_Item) AsTodoCompletionBatchResponseSchemaResults0() (TodoCompletionBatchResponseSchemaResults0, error) { + var body TodoCompletionBatchResponseSchemaResults0 + err := json.Unmarshal(t.union, &body) + return body, err } -// GetSectionsCalendarParams defines parameters for GetSectionsCalendar. -type GetSectionsCalendarParams struct { - SectionIds string `form:"sectionIds" json:"sectionIds"` +// FromTodoCompletionBatchResponseSchemaResults0 overwrites any union data inside the TodoCompletionBatchResponseSchema_Results_Item as the provided TodoCompletionBatchResponseSchemaResults0 +func (t *TodoCompletionBatchResponseSchema_Results_Item) FromTodoCompletionBatchResponseSchemaResults0(v TodoCompletionBatchResponseSchemaResults0) error { + b, err := json.Marshal(v) + t.union = b + return err } -// ListSemestersParams defines parameters for ListSemesters. -type ListSemestersParams struct { - Page *int64 `form:"page,omitempty" json:"page,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +// MergeTodoCompletionBatchResponseSchemaResults0 performs a merge with any union data inside the TodoCompletionBatchResponseSchema_Results_Item, using the provided TodoCompletionBatchResponseSchemaResults0 +func (t *TodoCompletionBatchResponseSchema_Results_Item) MergeTodoCompletionBatchResponseSchemaResults0(v TodoCompletionBatchResponseSchemaResults0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err } -// ListTeachersParams defines parameters for ListTeachers. -type ListTeachersParams struct { - DepartmentId *int64 `form:"departmentId,omitempty" json:"departmentId,omitempty"` - Search *string `form:"search,omitempty" json:"search,omitempty"` - Page *int64 `form:"page,omitempty" json:"page,omitempty"` - Limit *int64 `form:"limit,omitempty" json:"limit,omitempty"` +// AsTodoCompletionBatchResponseSchemaResults1 returns the union data inside the TodoCompletionBatchResponseSchema_Results_Item as a TodoCompletionBatchResponseSchemaResults1 +func (t TodoCompletionBatchResponseSchema_Results_Item) AsTodoCompletionBatchResponseSchemaResults1() (TodoCompletionBatchResponseSchemaResults1, error) { + var body TodoCompletionBatchResponseSchemaResults1 + err := json.Unmarshal(t.union, &body) + return body, err } -// ListTodosParams defines parameters for ListTodos. -type ListTodosParams struct { - Completed *ListTodosParamsCompleted `form:"completed,omitempty" json:"completed,omitempty"` - Priority *ListTodosParamsPriority `form:"priority,omitempty" json:"priority,omitempty"` - DueBefore *time.Time `form:"dueBefore,omitempty" json:"dueBefore,omitempty"` - DueAfter *time.Time `form:"dueAfter,omitempty" json:"dueAfter,omitempty"` +// FromTodoCompletionBatchResponseSchemaResults1 overwrites any union data inside the TodoCompletionBatchResponseSchema_Results_Item as the provided TodoCompletionBatchResponseSchemaResults1 +func (t *TodoCompletionBatchResponseSchema_Results_Item) FromTodoCompletionBatchResponseSchemaResults1(v TodoCompletionBatchResponseSchemaResults1) error { + b, err := json.Marshal(v) + t.union = b + return err } -// ListTodosParamsCompleted defines parameters for ListTodos. -type ListTodosParamsCompleted string +// MergeTodoCompletionBatchResponseSchemaResults1 performs a merge with any union data inside the TodoCompletionBatchResponseSchema_Results_Item, using the provided TodoCompletionBatchResponseSchemaResults1 +func (t *TodoCompletionBatchResponseSchema_Results_Item) MergeTodoCompletionBatchResponseSchemaResults1(v TodoCompletionBatchResponseSchemaResults1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// ListTodosParamsPriority defines parameters for ListTodos. -type ListTodosParamsPriority string + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t TodoCompletionBatchResponseSchema_Results_Item) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// CreateTodoParams defines parameters for CreateTodo. -type CreateTodoParams struct { - Completed *CreateTodoParamsCompleted `form:"completed,omitempty" json:"completed,omitempty"` - Priority *CreateTodoParamsPriority `form:"priority,omitempty" json:"priority,omitempty"` - DueBefore *time.Time `form:"dueBefore,omitempty" json:"dueBefore,omitempty"` - DueAfter *time.Time `form:"dueAfter,omitempty" json:"dueAfter,omitempty"` +func (t *TodoCompletionBatchResponseSchema_Results_Item) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err } -// CreateTodoParamsCompleted defines parameters for CreateTodo. -type CreateTodoParamsCompleted string +// AsTodoCreateRequestSchemaDueAt0 returns the union data inside the TodoCreateRequestSchema_DueAt as a TodoCreateRequestSchemaDueAt0 +func (t TodoCreateRequestSchema_DueAt) AsTodoCreateRequestSchemaDueAt0() (TodoCreateRequestSchemaDueAt0, error) { + var body TodoCreateRequestSchemaDueAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} -// CreateTodoParamsPriority defines parameters for CreateTodo. -type CreateTodoParamsPriority string +// FromTodoCreateRequestSchemaDueAt0 overwrites any union data inside the TodoCreateRequestSchema_DueAt as the provided TodoCreateRequestSchemaDueAt0 +func (t *TodoCreateRequestSchema_DueAt) FromTodoCreateRequestSchemaDueAt0(v TodoCreateRequestSchemaDueAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} -// ModerateAdminCommentJSONRequestBody defines body for ModerateAdminComment for application/json ContentType. -type ModerateAdminCommentJSONRequestBody = AdminModerateCommentRequestSchema +// MergeTodoCreateRequestSchemaDueAt0 performs a merge with any union data inside the TodoCreateRequestSchema_DueAt, using the provided TodoCreateRequestSchemaDueAt0 +func (t *TodoCreateRequestSchema_DueAt) MergeTodoCreateRequestSchemaDueAt0(v TodoCreateRequestSchemaDueAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// CreateAdminSuspensionJSONRequestBody defines body for CreateAdminSuspension for application/json ContentType. -type CreateAdminSuspensionJSONRequestBody = AdminCreateSuspensionRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// UpdateAdminUserJSONRequestBody defines body for UpdateAdminUser for application/json ContentType. -type UpdateAdminUserJSONRequestBody = AdminUpdateUserRequestSchema +// AsTodoCreateRequestSchemaDueAt1 returns the union data inside the TodoCreateRequestSchema_DueAt as a TodoCreateRequestSchemaDueAt1 +func (t TodoCreateRequestSchema_DueAt) AsTodoCreateRequestSchemaDueAt1() (TodoCreateRequestSchemaDueAt1, error) { + var body TodoCreateRequestSchemaDueAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} -// SetBusPreferencesJSONRequestBody defines body for SetBusPreferences for application/json ContentType. -type SetBusPreferencesJSONRequestBody = BusPreferenceRequestSchema +// FromTodoCreateRequestSchemaDueAt1 overwrites any union data inside the TodoCreateRequestSchema_DueAt as the provided TodoCreateRequestSchemaDueAt1 +func (t *TodoCreateRequestSchema_DueAt) FromTodoCreateRequestSchemaDueAt1(v TodoCreateRequestSchemaDueAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} -// SetCalendarSubscriptionJSONRequestBody defines body for SetCalendarSubscription for application/json ContentType. -type SetCalendarSubscriptionJSONRequestBody = CalendarSubscriptionCreateRequestSchema +// MergeTodoCreateRequestSchemaDueAt1 performs a merge with any union data inside the TodoCreateRequestSchema_DueAt, using the provided TodoCreateRequestSchemaDueAt1 +func (t *TodoCreateRequestSchema_DueAt) MergeTodoCreateRequestSchemaDueAt1(v TodoCreateRequestSchemaDueAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// CreateCommentJSONRequestBody defines body for CreateComment for application/json ContentType. -type CreateCommentJSONRequestBody = CommentCreateRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// DeleteCommentJSONRequestBody defines body for DeleteComment for application/json ContentType. -type DeleteCommentJSONRequestBody = CommentUpdateRequestSchema +func (t TodoCreateRequestSchema_DueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// UpdateCommentJSONRequestBody defines body for UpdateComment for application/json ContentType. -type UpdateCommentJSONRequestBody = CommentUpdateRequestSchema +func (t *TodoCreateRequestSchema_DueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsTodoUpdateRequestSchemaDueAt0 returns the union data inside the TodoUpdateRequestSchema_DueAt as a TodoUpdateRequestSchemaDueAt0 +func (t TodoUpdateRequestSchema_DueAt) AsTodoUpdateRequestSchemaDueAt0() (TodoUpdateRequestSchemaDueAt0, error) { + var body TodoUpdateRequestSchemaDueAt0 + err := json.Unmarshal(t.union, &body) + return body, err +} -// RemoveCommentReactionJSONRequestBody defines body for RemoveCommentReaction for application/json ContentType. -type RemoveCommentReactionJSONRequestBody = CommentReactionRequestSchema +// FromTodoUpdateRequestSchemaDueAt0 overwrites any union data inside the TodoUpdateRequestSchema_DueAt as the provided TodoUpdateRequestSchemaDueAt0 +func (t *TodoUpdateRequestSchema_DueAt) FromTodoUpdateRequestSchemaDueAt0(v TodoUpdateRequestSchemaDueAt0) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeTodoUpdateRequestSchemaDueAt0 performs a merge with any union data inside the TodoUpdateRequestSchema_DueAt, using the provided TodoUpdateRequestSchemaDueAt0 +func (t *TodoUpdateRequestSchema_DueAt) MergeTodoUpdateRequestSchemaDueAt0(v TodoUpdateRequestSchemaDueAt0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// AddCommentReactionJSONRequestBody defines body for AddCommentReaction for application/json ContentType. -type AddCommentReactionJSONRequestBody = CommentReactionRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// PinDashboardLinkFormdataRequestBody defines body for PinDashboardLink for application/x-www-form-urlencoded ContentType. -type PinDashboardLinkFormdataRequestBody = DashboardLinkPinRequestSchema +// AsTodoUpdateRequestSchemaDueAt1 returns the union data inside the TodoUpdateRequestSchema_DueAt as a TodoUpdateRequestSchemaDueAt1 +func (t TodoUpdateRequestSchema_DueAt) AsTodoUpdateRequestSchemaDueAt1() (TodoUpdateRequestSchemaDueAt1, error) { + var body TodoUpdateRequestSchemaDueAt1 + err := json.Unmarshal(t.union, &body) + return body, err +} -// RecordDashboardLinkVisitFormdataRequestBody defines body for RecordDashboardLinkVisit for application/x-www-form-urlencoded ContentType. -type RecordDashboardLinkVisitFormdataRequestBody = DashboardLinkVisitRequestSchema +// FromTodoUpdateRequestSchemaDueAt1 overwrites any union data inside the TodoUpdateRequestSchema_DueAt as the provided TodoUpdateRequestSchemaDueAt1 +func (t *TodoUpdateRequestSchema_DueAt) FromTodoUpdateRequestSchemaDueAt1(v TodoUpdateRequestSchemaDueAt1) error { + b, err := json.Marshal(v) + t.union = b + return err +} -// UpsertDescriptionJSONRequestBody defines body for UpsertDescription for application/json ContentType. -type UpsertDescriptionJSONRequestBody = DescriptionUpsertRequestSchema +// MergeTodoUpdateRequestSchemaDueAt1 performs a merge with any union data inside the TodoUpdateRequestSchema_DueAt, using the provided TodoUpdateRequestSchemaDueAt1 +func (t *TodoUpdateRequestSchema_DueAt) MergeTodoUpdateRequestSchemaDueAt1(v TodoUpdateRequestSchemaDueAt1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// CreateHomeworkJSONRequestBody defines body for CreateHomework for application/json ContentType. -type CreateHomeworkJSONRequestBody = HomeworkCreateRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// DeleteHomeworkJSONRequestBody defines body for DeleteHomework for application/json ContentType. -type DeleteHomeworkJSONRequestBody = HomeworkUpdateRequestSchema +func (t TodoUpdateRequestSchema_DueAt) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// UpdateHomeworkJSONRequestBody defines body for UpdateHomework for application/json ContentType. -type UpdateHomeworkJSONRequestBody = HomeworkUpdateRequestSchema +func (t *TodoUpdateRequestSchema_DueAt) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} -// SetHomeworkCompletionJSONRequestBody defines body for SetHomeworkCompletion for application/json ContentType. -type SetHomeworkCompletionJSONRequestBody = HomeworkCompletionRequestSchema +// AsUploadCreateRequestSchemaSize0 returns the union data inside the UploadCreateRequestSchema_Size as a UploadCreateRequestSchemaSize0 +func (t UploadCreateRequestSchema_Size) AsUploadCreateRequestSchemaSize0() (UploadCreateRequestSchemaSize0, error) { + var body UploadCreateRequestSchemaSize0 + err := json.Unmarshal(t.union, &body) + return body, err +} -// SetLocaleJSONRequestBody defines body for SetLocale for application/json ContentType. -type SetLocaleJSONRequestBody = LocaleUpdateRequestSchema +// FromUploadCreateRequestSchemaSize0 overwrites any union data inside the UploadCreateRequestSchema_Size as the provided UploadCreateRequestSchemaSize0 +func (t *UploadCreateRequestSchema_Size) FromUploadCreateRequestSchemaSize0(v UploadCreateRequestSchemaSize0) error { + b, err := json.Marshal(v) + t.union = b + return err +} -// MatchSectionCodesJSONRequestBody defines body for MatchSectionCodes for application/json ContentType. -type MatchSectionCodesJSONRequestBody = MatchSectionCodesRequestSchema +// MergeUploadCreateRequestSchemaSize0 performs a merge with any union data inside the UploadCreateRequestSchema_Size, using the provided UploadCreateRequestSchemaSize0 +func (t *UploadCreateRequestSchema_Size) MergeUploadCreateRequestSchemaSize0(v UploadCreateRequestSchemaSize0) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// CreateTodoJSONRequestBody defines body for CreateTodo for application/json ContentType. -type CreateTodoJSONRequestBody = TodoCreateRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// DeleteTodoJSONRequestBody defines body for DeleteTodo for application/json ContentType. -type DeleteTodoJSONRequestBody = TodoUpdateRequestSchema +// AsUploadCreateRequestSchemaSize1 returns the union data inside the UploadCreateRequestSchema_Size as a UploadCreateRequestSchemaSize1 +func (t UploadCreateRequestSchema_Size) AsUploadCreateRequestSchemaSize1() (UploadCreateRequestSchemaSize1, error) { + var body UploadCreateRequestSchemaSize1 + err := json.Unmarshal(t.union, &body) + return body, err +} -// UpdateTodoJSONRequestBody defines body for UpdateTodo for application/json ContentType. -type UpdateTodoJSONRequestBody = TodoUpdateRequestSchema +// FromUploadCreateRequestSchemaSize1 overwrites any union data inside the UploadCreateRequestSchema_Size as the provided UploadCreateRequestSchemaSize1 +func (t *UploadCreateRequestSchema_Size) FromUploadCreateRequestSchemaSize1(v UploadCreateRequestSchemaSize1) error { + b, err := json.Marshal(v) + t.union = b + return err +} -// CreateUploadJSONRequestBody defines body for CreateUpload for application/json ContentType. -type CreateUploadJSONRequestBody = UploadCreateRequestSchema +// MergeUploadCreateRequestSchemaSize1 performs a merge with any union data inside the UploadCreateRequestSchema_Size, using the provided UploadCreateRequestSchemaSize1 +func (t *UploadCreateRequestSchema_Size) MergeUploadCreateRequestSchemaSize1(v UploadCreateRequestSchemaSize1) error { + b, err := json.Marshal(v) + if err != nil { + return err + } -// CompleteUploadJSONRequestBody defines body for CompleteUpload for application/json ContentType. -type CompleteUploadJSONRequestBody = UploadCompleteRequestSchema + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} -// DeleteUploadJSONRequestBody defines body for DeleteUpload for application/json ContentType. -type DeleteUploadJSONRequestBody = UploadRenameRequestSchema +func (t UploadCreateRequestSchema_Size) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} -// UpdateUploadJSONRequestBody defines body for UpdateUpload for application/json ContentType. -type UpdateUploadJSONRequestBody = UploadRenameRequestSchema +func (t *UploadCreateRequestSchema_Size) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} // RequestEditorFn is the function signature for the RequestEditor callback function type RequestEditorFn func(ctx context.Context, req *http.Request) error @@ -3926,6 +10099,11 @@ type ClientInterface interface { // ListAdminDescriptions request ListAdminDescriptions(ctx context.Context, params *ListAdminDescriptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // UpdateAdminDescriptionWithBody request with any body + UpdateAdminDescriptionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateAdminDescription(ctx context.Context, id string, body UpdateAdminDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListAdminHomeworks request ListAdminHomeworks(ctx context.Context, params *ListAdminHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3954,6 +10132,9 @@ type ClientInterface interface { // QueryBus request QueryBus(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiBusNext request + GetApiBusNext(ctx context.Context, params *GetApiBusNextParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetBusPreferences request GetBusPreferences(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3962,26 +10143,57 @@ type ClientInterface interface { SetBusPreferences(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetApiBusRoutes request + GetApiBusRoutes(ctx context.Context, params *GetApiBusRoutesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiCalendarSubscriptionsWithBody request with any body + DeleteApiCalendarSubscriptionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteApiCalendarSubscriptions(ctx context.Context, body DeleteApiCalendarSubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // AppendCalendarSubscriptionSectionsWithBody request with any body + AppendCalendarSubscriptionSectionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + AppendCalendarSubscriptionSections(ctx context.Context, body AppendCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // SetCalendarSubscriptionWithBody request with any body SetCalendarSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) SetCalendarSubscription(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // BatchUpdateCalendarSubscriptionWithBody request with any body + BatchUpdateCalendarSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + BatchUpdateCalendarSubscription(ctx context.Context, body BatchUpdateCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // GetCurrentCalendarSubscription request GetCurrentCalendarSubscription(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostApiCalendarSubscriptionsImportCodesWithBody request with any body + PostApiCalendarSubscriptionsImportCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiCalendarSubscriptionsImportCodes(ctx context.Context, body PostApiCalendarSubscriptionsImportCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // QueryCalendarSubscriptionSectionsWithBody request with any body + QueryCalendarSubscriptionSectionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + QueryCalendarSubscriptionSections(ctx context.Context, body QueryCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // ListComments request ListComments(ctx context.Context, params *ListCommentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateCommentWithBody request with any body - CreateCommentWithBody(ctx context.Context, params *CreateCommentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateCommentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - CreateComment(ctx context.Context, params *CreateCommentParams, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + CreateComment(ctx context.Context, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteCommentWithBody request with any body - DeleteCommentWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // DeleteApiCommentsBatchWithBody request with any body + DeleteApiCommentsBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - DeleteComment(ctx context.Context, id string, body DeleteCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + DeleteApiCommentsBatch(ctx context.Context, body DeleteApiCommentsBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteComment request + DeleteComment(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetComment request GetComment(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -3991,10 +10203,8 @@ type ClientInterface interface { UpdateComment(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // RemoveCommentReactionWithBody request with any body - RemoveCommentReactionWithBody(ctx context.Context, id string, params *RemoveCommentReactionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - RemoveCommentReaction(ctx context.Context, id string, params *RemoveCommentReactionParams, body RemoveCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // RemoveCommentReaction request + RemoveCommentReaction(ctx context.Context, id string, params *RemoveCommentReactionParams, reqEditors ...RequestEditorFn) (*http.Response, error) // AddCommentReactionWithBody request with any body AddCommentReactionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -4012,150 +10222,821 @@ type ClientInterface interface { PinDashboardLinkWithFormdataBody(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // PostApiDashboardLinksPinBatchWithBody request with any body + PostApiDashboardLinksPinBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostApiDashboardLinksPinBatch(ctx context.Context, body PostApiDashboardLinksPinBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // VisitDashboardLink request VisitDashboardLink(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*http.Response, error) // RecordDashboardLinkVisitWithBody request with any body - RecordDashboardLinkVisitWithBody(ctx context.Context, params *RecordDashboardLinkVisitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + RecordDashboardLinkVisitWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, params *RecordDashboardLinkVisitParams, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // GetDescription request GetDescription(ctx context.Context, params *GetDescriptionParams, reqEditors ...RequestEditorFn) (*http.Response, error) // UpsertDescriptionWithBody request with any body - UpsertDescriptionWithBody(ctx context.Context, params *UpsertDescriptionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + UpsertDescriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpsertDescription(ctx context.Context, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListHomeworks request + ListHomeworks(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateHomeworkWithBody request with any body + CreateHomeworkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateHomework(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiHomeworksCompletionsWithBody request with any body + PutApiHomeworksCompletionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutApiHomeworksCompletions(ctx context.Context, body PutApiHomeworksCompletionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteHomework request + DeleteHomework(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateHomeworkWithBody request with any body + UpdateHomeworkWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateHomework(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SetHomeworkCompletionWithBody request with any body + SetHomeworkCompletionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SetHomeworkCompletion(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // SetLocaleWithBody request with any body + SetLocaleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetMe request + GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiMeOverview request + GetApiMeOverview(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSubscribedHomeworks request + GetSubscribedHomeworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetApiMeSubscriptionsSchedules request + GetApiMeSubscriptionsSchedules(ctx context.Context, params *GetApiMeSubscriptionsSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetMetadata request + GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOpenApiSpec request + GetOpenApiSpec(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListSchedules request + ListSchedules(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListSections request + ListSections(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSectionsCalendar request + GetSectionsCalendar(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // MatchSectionCodesWithBody request with any body + MatchSectionCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + MatchSectionCodes(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSection request + GetSection(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSectionCalendar request + GetSectionCalendar(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSectionScheduleGroups request + GetSectionScheduleGroups(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSectionSchedules request + GetSectionSchedules(ctx context.Context, jwId int64, params *GetSectionSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListSemesters request + ListSemesters(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCurrentSemester request + GetCurrentSemester(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListTeachers request + ListTeachers(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTeacher request + GetTeacher(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListTodos request + ListTodos(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateTodoWithBody request with any body + CreateTodoWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateTodo(ctx context.Context, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteApiTodosBatchWithBody request with any body + DeleteApiTodosBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteApiTodosBatch(ctx context.Context, body DeleteApiTodosBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchApiTodosBatchWithBody request with any body + PatchApiTodosBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchApiTodosBatch(ctx context.Context, body PatchApiTodosBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteTodo request + DeleteTodo(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateTodoWithBody request with any body + UpdateTodoWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateTodo(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // ListUploads request + ListUploads(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CreateUploadWithBody request with any body + CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // CompleteUploadWithBody request with any body + CompleteUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + CompleteUpload(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutApiUploadsObjectWithBody request with any body + PutApiUploadsObjectWithBody(ctx context.Context, params *PutApiUploadsObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteUpload request + DeleteUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // UpdateUploadWithBody request with any body + UpdateUploadWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + UpdateUpload(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DownloadUpload request + DownloadUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetUserCalendar request + GetUserCalendar(ctx context.Context, userId string, params *GetUserCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) ListAdminComments(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAdminCommentsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ModerateAdminCommentWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewModerateAdminCommentRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ModerateAdminComment(ctx context.Context, id string, body ModerateAdminCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewModerateAdminCommentRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListAdminDescriptions(ctx context.Context, params *ListAdminDescriptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAdminDescriptionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateAdminDescriptionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAdminDescriptionRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) UpdateAdminDescription(ctx context.Context, id string, body UpdateAdminDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAdminDescriptionRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) ListAdminHomeworks(ctx context.Context, params *ListAdminHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAdminHomeworksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - UpsertDescription(ctx context.Context, params *UpsertDescriptionParams, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) DeleteAdminHomework(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAdminHomeworkRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // ListHomeworks request - ListHomeworks(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) ListAdminSuspensions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAdminSuspensionsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // CreateHomeworkWithBody request with any body - CreateHomeworkWithBody(ctx context.Context, params *CreateHomeworkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) CreateAdminSuspensionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAdminSuspensionRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - CreateHomework(ctx context.Context, params *CreateHomeworkParams, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) CreateAdminSuspension(ctx context.Context, body CreateAdminSuspensionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAdminSuspensionRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // DeleteHomeworkWithBody request with any body - DeleteHomeworkWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) UpdateAdminSuspension(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAdminSuspensionRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - DeleteHomework(ctx context.Context, id string, body DeleteHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) ListAdminUsers(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAdminUsersRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // UpdateHomeworkWithBody request with any body - UpdateHomeworkWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) UpdateAdminUserWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAdminUserRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - UpdateHomework(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) UpdateAdminUser(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAdminUserRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // SetHomeworkCompletionWithBody request with any body - SetHomeworkCompletionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) QueryBus(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewQueryBusRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - SetHomeworkCompletion(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) GetApiBusNext(ctx context.Context, params *GetApiBusNextParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiBusNextRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // SetLocaleWithBody request with any body - SetLocaleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) GetBusPreferences(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetBusPreferencesRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) SetBusPreferencesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetBusPreferencesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetMe request - GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) SetBusPreferences(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetBusPreferencesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetSubscribedHomeworks request - GetSubscribedHomeworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) GetApiBusRoutes(ctx context.Context, params *GetApiBusRoutesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiBusRoutesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetMetadata request - GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) DeleteApiCalendarSubscriptionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiCalendarSubscriptionsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetOpenApiSpec request - GetOpenApiSpec(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) DeleteApiCalendarSubscriptions(ctx context.Context, body DeleteApiCalendarSubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiCalendarSubscriptionsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // ListSchedules request - ListSchedules(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) AppendCalendarSubscriptionSectionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAppendCalendarSubscriptionSectionsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // ListSections request - ListSections(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) AppendCalendarSubscriptionSections(ctx context.Context, body AppendCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAppendCalendarSubscriptionSectionsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetSectionsCalendar request - GetSectionsCalendar(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) SetCalendarSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetCalendarSubscriptionRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // MatchSectionCodesWithBody request with any body - MatchSectionCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) SetCalendarSubscription(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetCalendarSubscriptionRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - MatchSectionCodes(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) BatchUpdateCalendarSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBatchUpdateCalendarSubscriptionRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetSection request - GetSection(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) BatchUpdateCalendarSubscription(ctx context.Context, body BatchUpdateCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewBatchUpdateCalendarSubscriptionRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetSectionCalendar request - GetSectionCalendar(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) GetCurrentCalendarSubscription(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentCalendarSubscriptionRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetSectionScheduleGroups request - GetSectionScheduleGroups(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) PostApiCalendarSubscriptionsImportCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiCalendarSubscriptionsImportCodesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetSectionSchedules request - GetSectionSchedules(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) PostApiCalendarSubscriptionsImportCodes(ctx context.Context, body PostApiCalendarSubscriptionsImportCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiCalendarSubscriptionsImportCodesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // ListSemesters request - ListSemesters(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) QueryCalendarSubscriptionSectionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewQueryCalendarSubscriptionSectionsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetCurrentSemester request - GetCurrentSemester(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) QueryCalendarSubscriptionSections(ctx context.Context, body QueryCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewQueryCalendarSubscriptionSectionsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // ListTeachers request - ListTeachers(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) ListComments(ctx context.Context, params *ListCommentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListCommentsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetTeacher request - GetTeacher(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) CreateCommentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCommentRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // ListTodos request - ListTodos(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) CreateComment(ctx context.Context, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateCommentRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // CreateTodoWithBody request with any body - CreateTodoWithBody(ctx context.Context, params *CreateTodoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) DeleteApiCommentsBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiCommentsBatchRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - CreateTodo(ctx context.Context, params *CreateTodoParams, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) DeleteApiCommentsBatch(ctx context.Context, body DeleteApiCommentsBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiCommentsBatchRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // DeleteTodoWithBody request with any body - DeleteTodoWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) DeleteComment(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteCommentRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - DeleteTodo(ctx context.Context, id string, body DeleteTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) GetComment(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCommentRequest(c.Server, id) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // UpdateTodoWithBody request with any body - UpdateTodoWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) UpdateCommentWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCommentRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - UpdateTodo(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) UpdateComment(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateCommentRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // ListUploads request - ListUploads(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) RemoveCommentReaction(ctx context.Context, id string, params *RemoveCommentReactionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRemoveCommentReactionRequest(c.Server, id, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // CreateUploadWithBody request with any body - CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) AddCommentReactionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAddCommentReactionRequestWithBody(c.Server, id, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) AddCommentReaction(ctx context.Context, id string, body AddCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAddCommentReactionRequest(c.Server, id, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // CompleteUploadWithBody request with any body - CompleteUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) ListCourses(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListCoursesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - CompleteUpload(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) GetCourse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCourseRequest(c.Server, jwId) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // DeleteUploadWithBody request with any body - DeleteUploadWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) PinDashboardLinkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPinDashboardLinkRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - DeleteUpload(ctx context.Context, id string, body DeleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) PinDashboardLinkWithFormdataBody(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPinDashboardLinkRequestWithFormdataBody(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // UpdateUploadWithBody request with any body - UpdateUploadWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) PostApiDashboardLinksPinBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiDashboardLinksPinBatchRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - UpdateUpload(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) PostApiDashboardLinksPinBatch(ctx context.Context, body PostApiDashboardLinksPinBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostApiDashboardLinksPinBatchRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // DownloadUpload request - DownloadUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) VisitDashboardLink(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewVisitDashboardLinkRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} - // GetUserCalendar request - GetUserCalendar(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) +func (c *Client) RecordDashboardLinkVisitWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRecordDashboardLinkVisitRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) } -func (c *Client) ListAdminComments(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListAdminCommentsRequest(c.Server, params) +func (c *Client) RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewRecordDashboardLinkVisitRequestWithFormdataBody(c.Server, body) if err != nil { return nil, err } @@ -4166,8 +11047,8 @@ func (c *Client) ListAdminComments(ctx context.Context, params *ListAdminComment return c.Client.Do(req) } -func (c *Client) ModerateAdminCommentWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewModerateAdminCommentRequestWithBody(c.Server, id, contentType, body) +func (c *Client) GetDescription(ctx context.Context, params *GetDescriptionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDescriptionRequest(c.Server, params) if err != nil { return nil, err } @@ -4178,8 +11059,8 @@ func (c *Client) ModerateAdminCommentWithBody(ctx context.Context, id string, co return c.Client.Do(req) } -func (c *Client) ModerateAdminComment(ctx context.Context, id string, body ModerateAdminCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewModerateAdminCommentRequest(c.Server, id, body) +func (c *Client) UpsertDescriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpsertDescriptionRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4190,8 +11071,8 @@ func (c *Client) ModerateAdminComment(ctx context.Context, id string, body Moder return c.Client.Do(req) } -func (c *Client) ListAdminDescriptions(ctx context.Context, params *ListAdminDescriptionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListAdminDescriptionsRequest(c.Server, params) +func (c *Client) UpsertDescription(ctx context.Context, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpsertDescriptionRequest(c.Server, body) if err != nil { return nil, err } @@ -4202,8 +11083,8 @@ func (c *Client) ListAdminDescriptions(ctx context.Context, params *ListAdminDes return c.Client.Do(req) } -func (c *Client) ListAdminHomeworks(ctx context.Context, params *ListAdminHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListAdminHomeworksRequest(c.Server, params) +func (c *Client) ListHomeworks(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListHomeworksRequest(c.Server, params) if err != nil { return nil, err } @@ -4214,8 +11095,8 @@ func (c *Client) ListAdminHomeworks(ctx context.Context, params *ListAdminHomewo return c.Client.Do(req) } -func (c *Client) DeleteAdminHomework(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteAdminHomeworkRequest(c.Server, id) +func (c *Client) CreateHomeworkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateHomeworkRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4226,8 +11107,8 @@ func (c *Client) DeleteAdminHomework(ctx context.Context, id string, reqEditors return c.Client.Do(req) } -func (c *Client) ListAdminSuspensions(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListAdminSuspensionsRequest(c.Server) +func (c *Client) CreateHomework(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateHomeworkRequest(c.Server, body) if err != nil { return nil, err } @@ -4238,8 +11119,8 @@ func (c *Client) ListAdminSuspensions(ctx context.Context, reqEditors ...Request return c.Client.Do(req) } -func (c *Client) CreateAdminSuspensionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateAdminSuspensionRequestWithBody(c.Server, contentType, body) +func (c *Client) PutApiHomeworksCompletionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiHomeworksCompletionsRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4250,8 +11131,8 @@ func (c *Client) CreateAdminSuspensionWithBody(ctx context.Context, contentType return c.Client.Do(req) } -func (c *Client) CreateAdminSuspension(ctx context.Context, body CreateAdminSuspensionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateAdminSuspensionRequest(c.Server, body) +func (c *Client) PutApiHomeworksCompletions(ctx context.Context, body PutApiHomeworksCompletionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiHomeworksCompletionsRequest(c.Server, body) if err != nil { return nil, err } @@ -4262,8 +11143,8 @@ func (c *Client) CreateAdminSuspension(ctx context.Context, body CreateAdminSusp return c.Client.Do(req) } -func (c *Client) UpdateAdminSuspension(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAdminSuspensionRequest(c.Server, id) +func (c *Client) DeleteHomework(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteHomeworkRequest(c.Server, id) if err != nil { return nil, err } @@ -4274,8 +11155,8 @@ func (c *Client) UpdateAdminSuspension(ctx context.Context, id string, reqEditor return c.Client.Do(req) } -func (c *Client) ListAdminUsers(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListAdminUsersRequest(c.Server, params) +func (c *Client) UpdateHomeworkWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateHomeworkRequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err } @@ -4286,8 +11167,8 @@ func (c *Client) ListAdminUsers(ctx context.Context, params *ListAdminUsersParam return c.Client.Do(req) } -func (c *Client) UpdateAdminUserWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAdminUserRequestWithBody(c.Server, id, contentType, body) +func (c *Client) UpdateHomework(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateHomeworkRequest(c.Server, id, body) if err != nil { return nil, err } @@ -4298,8 +11179,8 @@ func (c *Client) UpdateAdminUserWithBody(ctx context.Context, id string, content return c.Client.Do(req) } -func (c *Client) UpdateAdminUser(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateAdminUserRequest(c.Server, id, body) +func (c *Client) SetHomeworkCompletionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetHomeworkCompletionRequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err } @@ -4310,8 +11191,8 @@ func (c *Client) UpdateAdminUser(ctx context.Context, id string, body UpdateAdmi return c.Client.Do(req) } -func (c *Client) QueryBus(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewQueryBusRequest(c.Server, params) +func (c *Client) SetHomeworkCompletion(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetHomeworkCompletionRequest(c.Server, id, body) if err != nil { return nil, err } @@ -4322,8 +11203,8 @@ func (c *Client) QueryBus(ctx context.Context, params *QueryBusParams, reqEditor return c.Client.Do(req) } -func (c *Client) GetBusPreferences(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetBusPreferencesRequest(c.Server) +func (c *Client) SetLocaleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetLocaleRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4334,8 +11215,8 @@ func (c *Client) GetBusPreferences(ctx context.Context, reqEditors ...RequestEdi return c.Client.Do(req) } -func (c *Client) SetBusPreferencesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetBusPreferencesRequestWithBody(c.Server, contentType, body) +func (c *Client) SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewSetLocaleRequest(c.Server, body) if err != nil { return nil, err } @@ -4346,8 +11227,8 @@ func (c *Client) SetBusPreferencesWithBody(ctx context.Context, contentType stri return c.Client.Do(req) } -func (c *Client) SetBusPreferences(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetBusPreferencesRequest(c.Server, body) +func (c *Client) GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetMeRequest(c.Server) if err != nil { return nil, err } @@ -4358,8 +11239,8 @@ func (c *Client) SetBusPreferences(ctx context.Context, body SetBusPreferencesJS return c.Client.Do(req) } -func (c *Client) SetCalendarSubscriptionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetCalendarSubscriptionRequestWithBody(c.Server, contentType, body) +func (c *Client) GetApiMeOverview(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiMeOverviewRequest(c.Server, params) if err != nil { return nil, err } @@ -4370,8 +11251,8 @@ func (c *Client) SetCalendarSubscriptionWithBody(ctx context.Context, contentTyp return c.Client.Do(req) } -func (c *Client) SetCalendarSubscription(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetCalendarSubscriptionRequest(c.Server, body) +func (c *Client) GetSubscribedHomeworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSubscribedHomeworksRequest(c.Server) if err != nil { return nil, err } @@ -4382,8 +11263,8 @@ func (c *Client) SetCalendarSubscription(ctx context.Context, body SetCalendarSu return c.Client.Do(req) } -func (c *Client) GetCurrentCalendarSubscription(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrentCalendarSubscriptionRequest(c.Server) +func (c *Client) GetApiMeSubscriptionsSchedules(ctx context.Context, params *GetApiMeSubscriptionsSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetApiMeSubscriptionsSchedulesRequest(c.Server, params) if err != nil { return nil, err } @@ -4394,8 +11275,8 @@ func (c *Client) GetCurrentCalendarSubscription(ctx context.Context, reqEditors return c.Client.Do(req) } -func (c *Client) ListComments(ctx context.Context, params *ListCommentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListCommentsRequest(c.Server, params) +func (c *Client) GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetMetadataRequest(c.Server) if err != nil { return nil, err } @@ -4406,8 +11287,8 @@ func (c *Client) ListComments(ctx context.Context, params *ListCommentsParams, r return c.Client.Do(req) } -func (c *Client) CreateCommentWithBody(ctx context.Context, params *CreateCommentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateCommentRequestWithBody(c.Server, params, contentType, body) +func (c *Client) GetOpenApiSpec(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOpenApiSpecRequest(c.Server) if err != nil { return nil, err } @@ -4418,8 +11299,8 @@ func (c *Client) CreateCommentWithBody(ctx context.Context, params *CreateCommen return c.Client.Do(req) } -func (c *Client) CreateComment(ctx context.Context, params *CreateCommentParams, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateCommentRequest(c.Server, params, body) +func (c *Client) ListSchedules(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSchedulesRequest(c.Server, params) if err != nil { return nil, err } @@ -4430,8 +11311,8 @@ func (c *Client) CreateComment(ctx context.Context, params *CreateCommentParams, return c.Client.Do(req) } -func (c *Client) DeleteCommentWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteCommentRequestWithBody(c.Server, id, contentType, body) +func (c *Client) ListSections(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSectionsRequest(c.Server, params) if err != nil { return nil, err } @@ -4442,8 +11323,8 @@ func (c *Client) DeleteCommentWithBody(ctx context.Context, id string, contentTy return c.Client.Do(req) } -func (c *Client) DeleteComment(ctx context.Context, id string, body DeleteCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteCommentRequest(c.Server, id, body) +func (c *Client) GetSectionsCalendar(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionsCalendarRequest(c.Server, params) if err != nil { return nil, err } @@ -4454,8 +11335,8 @@ func (c *Client) DeleteComment(ctx context.Context, id string, body DeleteCommen return c.Client.Do(req) } -func (c *Client) GetComment(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCommentRequest(c.Server, id) +func (c *Client) MatchSectionCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewMatchSectionCodesRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4466,8 +11347,8 @@ func (c *Client) GetComment(ctx context.Context, id string, reqEditors ...Reques return c.Client.Do(req) } -func (c *Client) UpdateCommentWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateCommentRequestWithBody(c.Server, id, contentType, body) +func (c *Client) MatchSectionCodes(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewMatchSectionCodesRequest(c.Server, body) if err != nil { return nil, err } @@ -4478,8 +11359,8 @@ func (c *Client) UpdateCommentWithBody(ctx context.Context, id string, contentTy return c.Client.Do(req) } -func (c *Client) UpdateComment(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateCommentRequest(c.Server, id, body) +func (c *Client) GetSection(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionRequest(c.Server, jwId) if err != nil { return nil, err } @@ -4490,8 +11371,8 @@ func (c *Client) UpdateComment(ctx context.Context, id string, body UpdateCommen return c.Client.Do(req) } -func (c *Client) RemoveCommentReactionWithBody(ctx context.Context, id string, params *RemoveCommentReactionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRemoveCommentReactionRequestWithBody(c.Server, id, params, contentType, body) +func (c *Client) GetSectionCalendar(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionCalendarRequest(c.Server, jwId) if err != nil { return nil, err } @@ -4502,8 +11383,8 @@ func (c *Client) RemoveCommentReactionWithBody(ctx context.Context, id string, p return c.Client.Do(req) } -func (c *Client) RemoveCommentReaction(ctx context.Context, id string, params *RemoveCommentReactionParams, body RemoveCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRemoveCommentReactionRequest(c.Server, id, params, body) +func (c *Client) GetSectionScheduleGroups(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionScheduleGroupsRequest(c.Server, jwId) if err != nil { return nil, err } @@ -4514,8 +11395,8 @@ func (c *Client) RemoveCommentReaction(ctx context.Context, id string, params *R return c.Client.Do(req) } -func (c *Client) AddCommentReactionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAddCommentReactionRequestWithBody(c.Server, id, contentType, body) +func (c *Client) GetSectionSchedules(ctx context.Context, jwId int64, params *GetSectionSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSectionSchedulesRequest(c.Server, jwId, params) if err != nil { return nil, err } @@ -4526,8 +11407,8 @@ func (c *Client) AddCommentReactionWithBody(ctx context.Context, id string, cont return c.Client.Do(req) } -func (c *Client) AddCommentReaction(ctx context.Context, id string, body AddCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAddCommentReactionRequest(c.Server, id, body) +func (c *Client) ListSemesters(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListSemestersRequest(c.Server, params) if err != nil { return nil, err } @@ -4538,8 +11419,8 @@ func (c *Client) AddCommentReaction(ctx context.Context, id string, body AddComm return c.Client.Do(req) } -func (c *Client) ListCourses(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListCoursesRequest(c.Server, params) +func (c *Client) GetCurrentSemester(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrentSemesterRequest(c.Server) if err != nil { return nil, err } @@ -4550,8 +11431,8 @@ func (c *Client) ListCourses(ctx context.Context, params *ListCoursesParams, req return c.Client.Do(req) } -func (c *Client) GetCourse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCourseRequest(c.Server, jwId) +func (c *Client) ListTeachers(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTeachersRequest(c.Server, params) if err != nil { return nil, err } @@ -4562,8 +11443,8 @@ func (c *Client) GetCourse(ctx context.Context, jwId int64, reqEditors ...Reques return c.Client.Do(req) } -func (c *Client) PinDashboardLinkWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPinDashboardLinkRequestWithBody(c.Server, contentType, body) +func (c *Client) GetTeacher(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTeacherRequest(c.Server, id) if err != nil { return nil, err } @@ -4574,8 +11455,8 @@ func (c *Client) PinDashboardLinkWithBody(ctx context.Context, contentType strin return c.Client.Do(req) } -func (c *Client) PinDashboardLinkWithFormdataBody(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPinDashboardLinkRequestWithFormdataBody(c.Server, body) +func (c *Client) ListTodos(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTodosRequest(c.Server, params) if err != nil { return nil, err } @@ -4586,8 +11467,8 @@ func (c *Client) PinDashboardLinkWithFormdataBody(ctx context.Context, body PinD return c.Client.Do(req) } -func (c *Client) VisitDashboardLink(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewVisitDashboardLinkRequest(c.Server, params) +func (c *Client) CreateTodoWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTodoRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4598,8 +11479,8 @@ func (c *Client) VisitDashboardLink(ctx context.Context, params *VisitDashboardL return c.Client.Do(req) } -func (c *Client) RecordDashboardLinkVisitWithBody(ctx context.Context, params *RecordDashboardLinkVisitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRecordDashboardLinkVisitRequestWithBody(c.Server, params, contentType, body) +func (c *Client) CreateTodo(ctx context.Context, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateTodoRequest(c.Server, body) if err != nil { return nil, err } @@ -4610,8 +11491,8 @@ func (c *Client) RecordDashboardLinkVisitWithBody(ctx context.Context, params *R return c.Client.Do(req) } -func (c *Client) RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, params *RecordDashboardLinkVisitParams, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewRecordDashboardLinkVisitRequestWithFormdataBody(c.Server, params, body) +func (c *Client) DeleteApiTodosBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiTodosBatchRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4622,8 +11503,8 @@ func (c *Client) RecordDashboardLinkVisitWithFormdataBody(ctx context.Context, p return c.Client.Do(req) } -func (c *Client) GetDescription(ctx context.Context, params *GetDescriptionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDescriptionRequest(c.Server, params) +func (c *Client) DeleteApiTodosBatch(ctx context.Context, body DeleteApiTodosBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteApiTodosBatchRequest(c.Server, body) if err != nil { return nil, err } @@ -4634,8 +11515,8 @@ func (c *Client) GetDescription(ctx context.Context, params *GetDescriptionParam return c.Client.Do(req) } -func (c *Client) UpsertDescriptionWithBody(ctx context.Context, params *UpsertDescriptionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpsertDescriptionRequestWithBody(c.Server, params, contentType, body) +func (c *Client) PatchApiTodosBatchWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiTodosBatchRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4646,8 +11527,8 @@ func (c *Client) UpsertDescriptionWithBody(ctx context.Context, params *UpsertDe return c.Client.Do(req) } -func (c *Client) UpsertDescription(ctx context.Context, params *UpsertDescriptionParams, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpsertDescriptionRequest(c.Server, params, body) +func (c *Client) PatchApiTodosBatch(ctx context.Context, body PatchApiTodosBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchApiTodosBatchRequest(c.Server, body) if err != nil { return nil, err } @@ -4658,8 +11539,8 @@ func (c *Client) UpsertDescription(ctx context.Context, params *UpsertDescriptio return c.Client.Do(req) } -func (c *Client) ListHomeworks(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListHomeworksRequest(c.Server, params) +func (c *Client) DeleteTodo(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTodoRequest(c.Server, id) if err != nil { return nil, err } @@ -4670,8 +11551,8 @@ func (c *Client) ListHomeworks(ctx context.Context, params *ListHomeworksParams, return c.Client.Do(req) } -func (c *Client) CreateHomeworkWithBody(ctx context.Context, params *CreateHomeworkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateHomeworkRequestWithBody(c.Server, params, contentType, body) +func (c *Client) UpdateTodoWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateTodoRequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err } @@ -4682,8 +11563,8 @@ func (c *Client) CreateHomeworkWithBody(ctx context.Context, params *CreateHomew return c.Client.Do(req) } -func (c *Client) CreateHomework(ctx context.Context, params *CreateHomeworkParams, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateHomeworkRequest(c.Server, params, body) +func (c *Client) UpdateTodo(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateTodoRequest(c.Server, id, body) if err != nil { return nil, err } @@ -4694,8 +11575,8 @@ func (c *Client) CreateHomework(ctx context.Context, params *CreateHomeworkParam return c.Client.Do(req) } -func (c *Client) DeleteHomeworkWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteHomeworkRequestWithBody(c.Server, id, contentType, body) +func (c *Client) ListUploads(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListUploadsRequest(c.Server) if err != nil { return nil, err } @@ -4706,8 +11587,8 @@ func (c *Client) DeleteHomeworkWithBody(ctx context.Context, id string, contentT return c.Client.Do(req) } -func (c *Client) DeleteHomework(ctx context.Context, id string, body DeleteHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteHomeworkRequest(c.Server, id, body) +func (c *Client) CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUploadRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4718,8 +11599,8 @@ func (c *Client) DeleteHomework(ctx context.Context, id string, body DeleteHomew return c.Client.Do(req) } -func (c *Client) UpdateHomeworkWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateHomeworkRequestWithBody(c.Server, id, contentType, body) +func (c *Client) CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateUploadRequest(c.Server, body) if err != nil { return nil, err } @@ -4730,8 +11611,8 @@ func (c *Client) UpdateHomeworkWithBody(ctx context.Context, id string, contentT return c.Client.Do(req) } -func (c *Client) UpdateHomework(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateHomeworkRequest(c.Server, id, body) +func (c *Client) CompleteUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCompleteUploadRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -4742,8 +11623,8 @@ func (c *Client) UpdateHomework(ctx context.Context, id string, body UpdateHomew return c.Client.Do(req) } -func (c *Client) SetHomeworkCompletionWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetHomeworkCompletionRequestWithBody(c.Server, id, contentType, body) +func (c *Client) CompleteUpload(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCompleteUploadRequest(c.Server, body) if err != nil { return nil, err } @@ -4754,8 +11635,8 @@ func (c *Client) SetHomeworkCompletionWithBody(ctx context.Context, id string, c return c.Client.Do(req) } -func (c *Client) SetHomeworkCompletion(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetHomeworkCompletionRequest(c.Server, id, body) +func (c *Client) PutApiUploadsObjectWithBody(ctx context.Context, params *PutApiUploadsObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutApiUploadsObjectRequestWithBody(c.Server, params, contentType, body) if err != nil { return nil, err } @@ -4766,8 +11647,8 @@ func (c *Client) SetHomeworkCompletion(ctx context.Context, id string, body SetH return c.Client.Do(req) } -func (c *Client) SetLocaleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetLocaleRequestWithBody(c.Server, contentType, body) +func (c *Client) DeleteUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteUploadRequest(c.Server, id) if err != nil { return nil, err } @@ -4778,8 +11659,8 @@ func (c *Client) SetLocaleWithBody(ctx context.Context, contentType string, body return c.Client.Do(req) } -func (c *Client) SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewSetLocaleRequest(c.Server, body) +func (c *Client) UpdateUploadWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateUploadRequestWithBody(c.Server, id, contentType, body) if err != nil { return nil, err } @@ -4790,8 +11671,8 @@ func (c *Client) SetLocale(ctx context.Context, body SetLocaleJSONRequestBody, r return c.Client.Do(req) } -func (c *Client) GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetMeRequest(c.Server) +func (c *Client) UpdateUpload(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateUploadRequest(c.Server, id, body) if err != nil { return nil, err } @@ -4802,8 +11683,8 @@ func (c *Client) GetMe(ctx context.Context, reqEditors ...RequestEditorFn) (*htt return c.Client.Do(req) } -func (c *Client) GetSubscribedHomeworks(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSubscribedHomeworksRequest(c.Server) +func (c *Client) DownloadUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDownloadUploadRequest(c.Server, id) if err != nil { return nil, err } @@ -4814,8 +11695,8 @@ func (c *Client) GetSubscribedHomeworks(ctx context.Context, reqEditors ...Reque return c.Client.Do(req) } -func (c *Client) GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetMetadataRequest(c.Server) +func (c *Client) GetUserCalendar(ctx context.Context, userId string, params *GetUserCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetUserCalendarRequest(c.Server, userId, params) if err != nil { return nil, err } @@ -4826,392 +11707,480 @@ func (c *Client) GetMetadata(ctx context.Context, reqEditors ...RequestEditorFn) return c.Client.Do(req) } -func (c *Client) GetOpenApiSpec(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOpenApiSpecRequest(c.Server) +// NewListAdminCommentsRequest generates requests for ListAdminComments +func NewListAdminCommentsRequest(server string, params *ListAdminCommentsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/admin/comments") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewModerateAdminCommentRequest calls the generic ModerateAdminComment builder with application/json body +func NewModerateAdminCommentRequest(server string, id string, body ModerateAdminCommentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewModerateAdminCommentRequestWithBody(server, id, "application/json", bodyReader) } -func (c *Client) ListSchedules(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSchedulesRequest(c.Server, params) +// NewModerateAdminCommentRequestWithBody generates requests for ModerateAdminComment with any type of body +func NewModerateAdminCommentRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) ListSections(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSectionsRequest(c.Server, params) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/api/admin/comments/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) GetSectionsCalendar(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSectionsCalendarRequest(c.Server, params) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { return nil, err } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) MatchSectionCodesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewMatchSectionCodesRequestWithBody(c.Server, contentType, body) +// NewListAdminDescriptionsRequest generates requests for ListAdminDescriptions +func NewListAdminDescriptionsRequest(server string, params *ListAdminDescriptionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/api/admin/descriptions") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) MatchSectionCodes(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewMatchSectionCodesRequest(c.Server, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + if params != nil { + queryValues := queryURL.Query() + + if params.TargetType != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetType", *params.TargetType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HasContent != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "hasContent", *params.HasContent, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Search != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) GetSection(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSectionRequest(c.Server, jwId) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) GetSectionCalendar(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSectionCalendarRequest(c.Server, jwId) +// NewUpdateAdminDescriptionRequest calls the generic UpdateAdminDescription builder with application/json body +func NewUpdateAdminDescriptionRequest(server string, id string, body UpdateAdminDescriptionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewUpdateAdminDescriptionRequestWithBody(server, id, "application/json", bodyReader) } -func (c *Client) GetSectionScheduleGroups(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSectionScheduleGroupsRequest(c.Server, jwId) +// NewUpdateAdminDescriptionRequestWithBody generates requests for UpdateAdminDescription with any type of body +func NewUpdateAdminDescriptionRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) GetSectionSchedules(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSectionSchedulesRequest(c.Server, jwId) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/api/admin/descriptions/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) ListSemesters(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListSemestersRequest(c.Server, params) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { return nil, err } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) GetCurrentSemester(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrentSemesterRequest(c.Server) +// NewListAdminHomeworksRequest generates requests for ListAdminHomeworks +func NewListAdminHomeworksRequest(server string, params *ListAdminHomeworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { + + operationPath := fmt.Sprintf("/api/admin/homeworks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { return nil, err } - return c.Client.Do(req) -} -func (c *Client) ListTeachers(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTeachersRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} + if params != nil { + queryValues := queryURL.Query() + + if params.Status != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Search != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } -func (c *Client) GetTeacher(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTeacherRequest(c.Server, id) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } - return c.Client.Do(req) -} -func (c *Client) ListTodos(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTodosRequest(c.Server, params) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) CreateTodoWithBody(ctx context.Context, params *CreateTodoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTodoRequestWithBody(c.Server, params, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + return req, nil } -func (c *Client) CreateTodo(ctx context.Context, params *CreateTodoParams, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateTodoRequest(c.Server, params, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} +// NewDeleteAdminHomeworkRequest generates requests for DeleteAdminHomework +func NewDeleteAdminHomeworkRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string -func (c *Client) DeleteTodoWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTodoRequestWithBody(c.Server, id, contentType, body) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) DeleteTodo(ctx context.Context, id string, body DeleteTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTodoRequest(c.Server, id, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/api/admin/homeworks/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) UpdateTodoWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateTodoRequestWithBody(c.Server, id, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) UpdateTodo(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateTodoRequest(c.Server, id, body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) ListUploads(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListUploadsRequest(c.Server) +// NewListAdminSuspensionsRequest generates requests for ListAdminSuspensions +func NewListAdminSuspensionsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/api/admin/suspensions") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) CreateUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUploadRequestWithBody(c.Server, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) CreateUpload(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateUploadRequest(c.Server, body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -func (c *Client) CompleteUploadWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCompleteUploadRequestWithBody(c.Server, contentType, body) +// NewCreateAdminSuspensionRequest calls the generic CreateAdminSuspension builder with application/json body +func NewCreateAdminSuspensionRequest(server string, body CreateAdminSuspensionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + bodyReader = bytes.NewReader(buf) + return NewCreateAdminSuspensionRequestWithBody(server, "application/json", bodyReader) } -func (c *Client) CompleteUpload(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCompleteUploadRequest(c.Server, body) +// NewCreateAdminSuspensionRequestWithBody generates requests for CreateAdminSuspension with any type of body +func NewCreateAdminSuspensionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/api/admin/suspensions") + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) DeleteUploadWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteUploadRequestWithBody(c.Server, id, contentType, body) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) DeleteUpload(ctx context.Context, id string, body DeleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteUploadRequest(c.Server, id, body) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + req.Header.Add("Content-Type", contentType) + + return req, nil } -func (c *Client) UpdateUploadWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateUploadRequestWithBody(c.Server, id, contentType, body) +// NewUpdateAdminSuspensionRequest generates requests for UpdateAdminSuspension +func NewUpdateAdminSuspensionRequest(server string, id string) (*http.Request, error) { + var err error + + var pathParam0 string + + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) UpdateUpload(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateUploadRequest(c.Server, id, body) + serverURL, err := url.Parse(server) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err + + operationPath := fmt.Sprintf("/api/admin/suspensions/%s", pathParam0) + if operationPath[0] == '/' { + operationPath = "." + operationPath } - return c.Client.Do(req) -} -func (c *Client) DownloadUpload(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDownloadUploadRequest(c.Server, id) + queryURL, err := serverURL.Parse(operationPath) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} -func (c *Client) GetUserCalendar(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetUserCalendarRequest(c.Server, userId) + req, err := http.NewRequest("PATCH", queryURL.String(), nil) if err != nil { return nil, err } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) + + return req, nil } -// NewListAdminCommentsRequest generates requests for ListAdminComments -func NewListAdminCommentsRequest(server string, params *ListAdminCommentsParams) (*http.Request, error) { +// NewListAdminUsersRequest generates requests for ListAdminUsers +func NewListAdminUsersRequest(server string, params *ListAdminUsersParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5219,7 +12188,7 @@ func NewListAdminCommentsRequest(server string, params *ListAdminCommentsParams) return nil, err } - operationPath := fmt.Sprintf("/api/admin/comments") + operationPath := fmt.Sprintf("/api/admin/users") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5232,9 +12201,25 @@ func NewListAdminCommentsRequest(server string, params *ListAdminCommentsParams) if params != nil { queryValues := queryURL.Query() - if params.Status != nil { + if params.Search != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5275,19 +12260,19 @@ func NewListAdminCommentsRequest(server string, params *ListAdminCommentsParams) return req, nil } -// NewModerateAdminCommentRequest calls the generic ModerateAdminComment builder with application/json body -func NewModerateAdminCommentRequest(server string, id string, body ModerateAdminCommentJSONRequestBody) (*http.Request, error) { +// NewUpdateAdminUserRequest calls the generic UpdateAdminUser builder with application/json body +func NewUpdateAdminUserRequest(server string, id string, body UpdateAdminUserJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewModerateAdminCommentRequestWithBody(server, id, "application/json", bodyReader) + return NewUpdateAdminUserRequestWithBody(server, id, "application/json", bodyReader) } -// NewModerateAdminCommentRequestWithBody generates requests for ModerateAdminComment with any type of body -func NewModerateAdminCommentRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateAdminUserRequestWithBody generates requests for UpdateAdminUser with any type of body +func NewUpdateAdminUserRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string @@ -5302,7 +12287,7 @@ func NewModerateAdminCommentRequestWithBody(server string, id string, contentTyp return nil, err } - operationPath := fmt.Sprintf("/api/admin/comments/%s", pathParam0) + operationPath := fmt.Sprintf("/api/admin/users/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5322,8 +12307,8 @@ func NewModerateAdminCommentRequestWithBody(server string, id string, contentTyp return req, nil } -// NewListAdminDescriptionsRequest generates requests for ListAdminDescriptions -func NewListAdminDescriptionsRequest(server string, params *ListAdminDescriptionsParams) (*http.Request, error) { +// NewQueryBusRequest generates requests for QueryBus +func NewQueryBusRequest(server string, params *QueryBusParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5331,7 +12316,7 @@ func NewListAdminDescriptionsRequest(server string, params *ListAdminDescription return nil, err } - operationPath := fmt.Sprintf("/api/admin/descriptions") + operationPath := fmt.Sprintf("/api/bus") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5344,9 +12329,9 @@ func NewListAdminDescriptionsRequest(server string, params *ListAdminDescription if params != nil { queryValues := queryURL.Query() - if params.TargetType != nil { + if params.VersionKey != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetType", *params.TargetType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "versionKey", *params.VersionKey, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5360,9 +12345,66 @@ func NewListAdminDescriptionsRequest(server string, params *ListAdminDescription } - if params.HasContent != nil { + queryURL.RawQuery = queryValues.Encode() + } - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "hasContent", *params.HasContent, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiBusNextRequest generates requests for GetApiBusNext +func NewGetApiBusNextRequest(server string, params *GetApiBusNextParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/bus/next") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "originCampusId", params.OriginCampusId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "destinationCampusId", params.DestinationCampusId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + if params.AtTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "atTime", *params.AtTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5376,9 +12418,9 @@ func NewListAdminDescriptionsRequest(server string, params *ListAdminDescription } - if params.Search != nil { + if params.DayType != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dayType", *params.DayType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5392,9 +12434,9 @@ func NewListAdminDescriptionsRequest(server string, params *ListAdminDescription } - if params.Limit != nil { + if params.IncludeDeparted != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "includeDeparted", *params.IncludeDeparted, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5408,42 +12450,9 @@ func NewListAdminDescriptionsRequest(server string, params *ListAdminDescription } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListAdminHomeworksRequest generates requests for ListAdminHomeworks -func NewListAdminHomeworksRequest(server string, params *ListAdminHomeworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/admin/homeworks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Status != nil { + if params.Limit != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "status", *params.Status, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5457,9 +12466,9 @@ func NewListAdminHomeworksRequest(server string, params *ListAdminHomeworksParam } - if params.Search != nil { + if params.VersionKey != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "versionKey", *params.VersionKey, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5473,9 +12482,9 @@ func NewListAdminHomeworksRequest(server string, params *ListAdminHomeworksParam } - if params.Limit != nil { + if params.Locale != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "locale", *params.Locale, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5500,42 +12509,8 @@ func NewListAdminHomeworksRequest(server string, params *ListAdminHomeworksParam return req, nil } -// NewDeleteAdminHomeworkRequest generates requests for DeleteAdminHomework -func NewDeleteAdminHomeworkRequest(server string, id string) (*http.Request, error) { - var err error - - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/admin/homeworks/%s", pathParam0) - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListAdminSuspensionsRequest generates requests for ListAdminSuspensions -func NewListAdminSuspensionsRequest(server string) (*http.Request, error) { +// NewGetBusPreferencesRequest generates requests for GetBusPreferences +func NewGetBusPreferencesRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5543,7 +12518,7 @@ func NewListAdminSuspensionsRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/api/admin/suspensions") + operationPath := fmt.Sprintf("/api/bus/preferences") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5561,19 +12536,19 @@ func NewListAdminSuspensionsRequest(server string) (*http.Request, error) { return req, nil } -// NewCreateAdminSuspensionRequest calls the generic CreateAdminSuspension builder with application/json body -func NewCreateAdminSuspensionRequest(server string, body CreateAdminSuspensionJSONRequestBody) (*http.Request, error) { +// NewSetBusPreferencesRequest calls the generic SetBusPreferences builder with application/json body +func NewSetBusPreferencesRequest(server string, body SetBusPreferencesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateAdminSuspensionRequestWithBody(server, "application/json", bodyReader) + return NewSetBusPreferencesRequestWithBody(server, "application/json", bodyReader) } -// NewCreateAdminSuspensionRequestWithBody generates requests for CreateAdminSuspension with any type of body -func NewCreateAdminSuspensionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewSetBusPreferencesRequestWithBody generates requests for SetBusPreferences with any type of body +func NewSetBusPreferencesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5581,7 +12556,7 @@ func NewCreateAdminSuspensionRequestWithBody(server string, contentType string, return nil, err } - operationPath := fmt.Sprintf("/api/admin/suspensions") + operationPath := fmt.Sprintf("/api/bus/preferences") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5601,23 +12576,16 @@ func NewCreateAdminSuspensionRequestWithBody(server string, contentType string, return req, nil } -// NewUpdateAdminSuspensionRequest generates requests for UpdateAdminSuspension -func NewUpdateAdminSuspensionRequest(server string, id string) (*http.Request, error) { +// NewGetApiBusRoutesRequest generates requests for GetApiBusRoutes +func NewGetApiBusRoutesRequest(server string, params *GetApiBusRoutesParams) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/admin/suspensions/%s", pathParam0) + operationPath := fmt.Sprintf("/api/bus/routes") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5627,39 +12595,28 @@ func NewUpdateAdminSuspensionRequest(server string, id string) (*http.Request, e return nil, err } - req, err := http.NewRequest("PATCH", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewListAdminUsersRequest generates requests for ListAdminUsers -func NewListAdminUsersRequest(server string, params *ListAdminUsersParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if params != nil { + queryValues := queryURL.Query() - operationPath := fmt.Sprintf("/api/admin/users") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.OriginCampusId != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "originCampusId", *params.OriginCampusId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params != nil { - queryValues := queryURL.Query() + } - if params.Search != nil { + if params.DestinationCampusId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "search", *params.Search, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "destinationCampusId", *params.DestinationCampusId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5673,9 +12630,9 @@ func NewListAdminUsersRequest(server string, params *ListAdminUsersParams) (*htt } - if params.Page != nil { + if params.VersionKey != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "page", *params.Page, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "versionKey", *params.VersionKey, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5689,9 +12646,9 @@ func NewListAdminUsersRequest(server string, params *ListAdminUsersParams) (*htt } - if params.Limit != nil { + if params.Locale != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "locale", *params.Locale, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -5708,42 +12665,75 @@ func NewListAdminUsersRequest(server string, params *ListAdminUsersParams) (*htt queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteApiCalendarSubscriptionsRequest calls the generic DeleteApiCalendarSubscriptions builder with application/json body +func NewDeleteApiCalendarSubscriptionsRequest(server string, body DeleteApiCalendarSubscriptionsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteApiCalendarSubscriptionsRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteApiCalendarSubscriptionsRequestWithBody generates requests for DeleteApiCalendarSubscriptions with any type of body +func NewDeleteApiCalendarSubscriptionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/calendar-subscriptions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } -// NewUpdateAdminUserRequest calls the generic UpdateAdminUser builder with application/json body -func NewUpdateAdminUserRequest(server string, id string, body UpdateAdminUserJSONRequestBody) (*http.Request, error) { +// NewAppendCalendarSubscriptionSectionsRequest calls the generic AppendCalendarSubscriptionSections builder with application/json body +func NewAppendCalendarSubscriptionSectionsRequest(server string, body AppendCalendarSubscriptionSectionsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateAdminUserRequestWithBody(server, id, "application/json", bodyReader) + return NewAppendCalendarSubscriptionSectionsRequestWithBody(server, "application/json", bodyReader) } -// NewUpdateAdminUserRequestWithBody generates requests for UpdateAdminUser with any type of body -func NewUpdateAdminUserRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewAppendCalendarSubscriptionSectionsRequestWithBody generates requests for AppendCalendarSubscriptionSections with any type of body +func NewAppendCalendarSubscriptionSectionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error - var pathParam0 string - - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) - if err != nil { - return nil, err - } - serverURL, err := url.Parse(server) if err != nil { return nil, err } - operationPath := fmt.Sprintf("/api/admin/users/%s", pathParam0) + operationPath := fmt.Sprintf("/api/calendar-subscriptions") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5763,8 +12753,19 @@ func NewUpdateAdminUserRequestWithBody(server string, id string, contentType str return req, nil } -// NewQueryBusRequest generates requests for QueryBus -func NewQueryBusRequest(server string, params *QueryBusParams) (*http.Request, error) { +// NewSetCalendarSubscriptionRequest calls the generic SetCalendarSubscription builder with application/json body +func NewSetCalendarSubscriptionRequest(server string, body SetCalendarSubscriptionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewSetCalendarSubscriptionRequestWithBody(server, "application/json", bodyReader) +} + +// NewSetCalendarSubscriptionRequestWithBody generates requests for SetCalendarSubscription with any type of body +func NewSetCalendarSubscriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5772,7 +12773,7 @@ func NewQueryBusRequest(server string, params *QueryBusParams) (*http.Request, e return nil, err } - operationPath := fmt.Sprintf("/api/bus") + operationPath := fmt.Sprintf("/api/calendar-subscriptions") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5782,38 +12783,29 @@ func NewQueryBusRequest(server string, params *QueryBusParams) (*http.Request, e return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.VersionKey != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "versionKey", *params.VersionKey, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - } + req.Header.Add("Content-Type", contentType) - queryURL.RawQuery = queryValues.Encode() - } + return req, nil +} - req, err := http.NewRequest("GET", queryURL.String(), nil) +// NewBatchUpdateCalendarSubscriptionRequest calls the generic BatchUpdateCalendarSubscription builder with application/json body +func NewBatchUpdateCalendarSubscriptionRequest(server string, body BatchUpdateCalendarSubscriptionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) if err != nil { return nil, err } - - return req, nil + bodyReader = bytes.NewReader(buf) + return NewBatchUpdateCalendarSubscriptionRequestWithBody(server, "application/json", bodyReader) } -// NewGetBusPreferencesRequest generates requests for GetBusPreferences -func NewGetBusPreferencesRequest(server string) (*http.Request, error) { +// NewBatchUpdateCalendarSubscriptionRequestWithBody generates requests for BatchUpdateCalendarSubscription with any type of body +func NewBatchUpdateCalendarSubscriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5821,7 +12813,7 @@ func NewGetBusPreferencesRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/api/bus/preferences") + operationPath := fmt.Sprintf("/api/calendar-subscriptions/batch") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5831,27 +12823,18 @@ func NewGetBusPreferencesRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewSetBusPreferencesRequest calls the generic SetBusPreferences builder with application/json body -func NewSetBusPreferencesRequest(server string, body SetBusPreferencesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewSetBusPreferencesRequestWithBody(server, "application/json", bodyReader) + return req, nil } -// NewSetBusPreferencesRequestWithBody generates requests for SetBusPreferences with any type of body -func NewSetBusPreferencesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewGetCurrentCalendarSubscriptionRequest generates requests for GetCurrentCalendarSubscription +func NewGetCurrentCalendarSubscriptionRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5859,7 +12842,7 @@ func NewSetBusPreferencesRequestWithBody(server string, contentType string, body return nil, err } - operationPath := fmt.Sprintf("/api/bus/preferences") + operationPath := fmt.Sprintf("/api/calendar-subscriptions/current") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5869,29 +12852,27 @@ func NewSetBusPreferencesRequestWithBody(server string, contentType string, body return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewSetCalendarSubscriptionRequest calls the generic SetCalendarSubscription builder with application/json body -func NewSetCalendarSubscriptionRequest(server string, body SetCalendarSubscriptionJSONRequestBody) (*http.Request, error) { +// NewPostApiCalendarSubscriptionsImportCodesRequest calls the generic PostApiCalendarSubscriptionsImportCodes builder with application/json body +func NewPostApiCalendarSubscriptionsImportCodesRequest(server string, body PostApiCalendarSubscriptionsImportCodesJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewSetCalendarSubscriptionRequestWithBody(server, "application/json", bodyReader) + return NewPostApiCalendarSubscriptionsImportCodesRequestWithBody(server, "application/json", bodyReader) } -// NewSetCalendarSubscriptionRequestWithBody generates requests for SetCalendarSubscription with any type of body -func NewSetCalendarSubscriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewPostApiCalendarSubscriptionsImportCodesRequestWithBody generates requests for PostApiCalendarSubscriptionsImportCodes with any type of body +func NewPostApiCalendarSubscriptionsImportCodesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5899,7 +12880,7 @@ func NewSetCalendarSubscriptionRequestWithBody(server string, contentType string return nil, err } - operationPath := fmt.Sprintf("/api/calendar-subscriptions") + operationPath := fmt.Sprintf("/api/calendar-subscriptions/import-codes") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5919,8 +12900,19 @@ func NewSetCalendarSubscriptionRequestWithBody(server string, contentType string return req, nil } -// NewGetCurrentCalendarSubscriptionRequest generates requests for GetCurrentCalendarSubscription -func NewGetCurrentCalendarSubscriptionRequest(server string) (*http.Request, error) { +// NewQueryCalendarSubscriptionSectionsRequest calls the generic QueryCalendarSubscriptionSections builder with application/json body +func NewQueryCalendarSubscriptionSectionsRequest(server string, body QueryCalendarSubscriptionSectionsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewQueryCalendarSubscriptionSectionsRequestWithBody(server, "application/json", bodyReader) +} + +// NewQueryCalendarSubscriptionSectionsRequestWithBody generates requests for QueryCalendarSubscriptionSections with any type of body +func NewQueryCalendarSubscriptionSectionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -5928,7 +12920,7 @@ func NewGetCurrentCalendarSubscriptionRequest(server string) (*http.Request, err return nil, err } - operationPath := fmt.Sprintf("/api/calendar-subscriptions/current") + operationPath := fmt.Sprintf("/api/calendar-subscriptions/query") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5938,11 +12930,13 @@ func NewGetCurrentCalendarSubscriptionRequest(server string) (*http.Request, err return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } + req.Header.Add("Content-Type", contentType) + return req, nil } @@ -6012,9 +13006,9 @@ func NewListCommentsRequest(server string, params *ListCommentsParams) (*http.Re } - if params.TeacherId != nil { + if params.SectionJwId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "teacherId", *params.TeacherId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionJwId", *params.SectionJwId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6028,65 +13022,25 @@ func NewListCommentsRequest(server string, params *ListCommentsParams) (*http.Re } - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewCreateCommentRequest calls the generic CreateComment builder with application/json body -func NewCreateCommentRequest(server string, params *CreateCommentParams, body CreateCommentJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewCreateCommentRequestWithBody(server, params, "application/json", bodyReader) -} - -// NewCreateCommentRequestWithBody generates requests for CreateComment with any type of body -func NewCreateCommentRequestWithBody(server string, params *CreateCommentParams, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/api/comments") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() + if params.CourseJwId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetType", params.TargetType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "courseJwId", *params.CourseJwId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } + } - if params.TargetId != nil { + if params.TeacherId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetId", *params.TargetId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "teacherId", *params.TeacherId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6100,9 +13054,9 @@ func NewCreateCommentRequestWithBody(server string, params *CreateCommentParams, } - if params.SectionId != nil { + if params.HomeworkId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionId", *params.SectionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "homeworkId", *params.HomeworkId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6116,9 +13070,9 @@ func NewCreateCommentRequestWithBody(server string, params *CreateCommentParams, } - if params.TeacherId != nil { + if params.SectionTeacherId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "teacherId", *params.TeacherId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionTeacherId", *params.SectionTeacherId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6135,6 +13089,44 @@ func NewCreateCommentRequestWithBody(server string, params *CreateCommentParams, queryURL.RawQuery = queryValues.Encode() } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateCommentRequest calls the generic CreateComment builder with application/json body +func NewCreateCommentRequest(server string, body CreateCommentJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateCommentRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateCommentRequestWithBody generates requests for CreateComment with any type of body +func NewCreateCommentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/comments") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err @@ -6145,19 +13137,48 @@ func NewCreateCommentRequestWithBody(server string, params *CreateCommentParams, return req, nil } -// NewDeleteCommentRequest calls the generic DeleteComment builder with application/json body -func NewDeleteCommentRequest(server string, id string, body DeleteCommentJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteCommentRequestWithBody(server, id, "application/json", bodyReader) -} - -// NewDeleteCommentRequestWithBody generates requests for DeleteComment with any type of body -func NewDeleteCommentRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteApiCommentsBatchRequest calls the generic DeleteApiCommentsBatch builder with application/json body +func NewDeleteApiCommentsBatchRequest(server string, body DeleteApiCommentsBatchJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteApiCommentsBatchRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteApiCommentsBatchRequestWithBody generates requests for DeleteApiCommentsBatch with any type of body +func NewDeleteApiCommentsBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/comments/batch") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteCommentRequest generates requests for DeleteComment +func NewDeleteCommentRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -6182,13 +13203,11 @@ func NewDeleteCommentRequestWithBody(server string, id string, contentType strin return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } @@ -6273,19 +13292,8 @@ func NewUpdateCommentRequestWithBody(server string, id string, contentType strin return req, nil } -// NewRemoveCommentReactionRequest calls the generic RemoveCommentReaction builder with application/json body -func NewRemoveCommentReactionRequest(server string, id string, params *RemoveCommentReactionParams, body RemoveCommentReactionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewRemoveCommentReactionRequestWithBody(server, id, params, "application/json", bodyReader) -} - -// NewRemoveCommentReactionRequestWithBody generates requests for RemoveCommentReaction with any type of body -func NewRemoveCommentReactionRequestWithBody(server string, id string, params *RemoveCommentReactionParams, contentType string, body io.Reader) (*http.Request, error) { +// NewRemoveCommentReactionRequest generates requests for RemoveCommentReaction +func NewRemoveCommentReactionRequest(server string, id string, params *RemoveCommentReactionParams) (*http.Request, error) { var err error var pathParam0 string @@ -6328,13 +13336,11 @@ func NewRemoveCommentReactionRequestWithBody(server string, id string, params *R queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } @@ -6588,8 +13594,19 @@ func NewPinDashboardLinkRequestWithBody(server string, contentType string, body return req, nil } -// NewVisitDashboardLinkRequest generates requests for VisitDashboardLink -func NewVisitDashboardLinkRequest(server string, params *VisitDashboardLinkParams) (*http.Request, error) { +// NewPostApiDashboardLinksPinBatchRequest calls the generic PostApiDashboardLinksPinBatch builder with application/json body +func NewPostApiDashboardLinksPinBatchRequest(server string, body PostApiDashboardLinksPinBatchJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostApiDashboardLinksPinBatchRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostApiDashboardLinksPinBatchRequestWithBody generates requests for PostApiDashboardLinksPinBatch with any type of body +func NewPostApiDashboardLinksPinBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6597,7 +13614,7 @@ func NewVisitDashboardLinkRequest(server string, params *VisitDashboardLinkParam return nil, err } - operationPath := fmt.Sprintf("/api/dashboard-links/visit") + operationPath := fmt.Sprintf("/api/dashboard-links/pin/batch") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6607,45 +13624,18 @@ func NewVisitDashboardLinkRequest(server string, params *VisitDashboardLinkParam return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "slug", params.Slug, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewRecordDashboardLinkVisitRequestWithFormdataBody calls the generic RecordDashboardLinkVisit builder with application/x-www-form-urlencoded body -func NewRecordDashboardLinkVisitRequestWithFormdataBody(server string, params *RecordDashboardLinkVisitParams, body RecordDashboardLinkVisitFormdataRequestBody) (*http.Request, error) { - var bodyReader io.Reader - bodyStr, err := runtime.MarshalForm(body, nil) - if err != nil { - return nil, err - } - bodyReader = strings.NewReader(bodyStr.Encode()) - return NewRecordDashboardLinkVisitRequestWithBody(server, params, "application/x-www-form-urlencoded", bodyReader) + return req, nil } -// NewRecordDashboardLinkVisitRequestWithBody generates requests for RecordDashboardLinkVisit with any type of body -func NewRecordDashboardLinkVisitRequestWithBody(server string, params *RecordDashboardLinkVisitParams, contentType string, body io.Reader) (*http.Request, error) { +// NewVisitDashboardLinkRequest generates requests for VisitDashboardLink +func NewVisitDashboardLinkRequest(server string, params *VisitDashboardLinkParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6681,18 +13671,27 @@ func NewRecordDashboardLinkVisitRequestWithBody(server string, params *RecordDas queryURL.RawQuery = queryValues.Encode() } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } -// NewGetDescriptionRequest generates requests for GetDescription -func NewGetDescriptionRequest(server string, params *GetDescriptionParams) (*http.Request, error) { +// NewRecordDashboardLinkVisitRequestWithFormdataBody calls the generic RecordDashboardLinkVisit builder with application/x-www-form-urlencoded body +func NewRecordDashboardLinkVisitRequestWithFormdataBody(server string, body RecordDashboardLinkVisitFormdataRequestBody) (*http.Request, error) { + var bodyReader io.Reader + bodyStr, err := runtime.MarshalForm(body, nil) + if err != nil { + return nil, err + } + bodyReader = strings.NewReader(bodyStr.Encode()) + return NewRecordDashboardLinkVisitRequestWithBody(server, "application/x-www-form-urlencoded", bodyReader) +} + +// NewRecordDashboardLinkVisitRequestWithBody generates requests for RecordDashboardLinkVisit with any type of body +func NewRecordDashboardLinkVisitRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6700,7 +13699,7 @@ func NewGetDescriptionRequest(server string, params *GetDescriptionParams) (*htt return nil, err } - operationPath := fmt.Sprintf("/api/descriptions") + operationPath := fmt.Sprintf("/api/dashboard-links/visit") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -6710,57 +13709,18 @@ func NewGetDescriptionRequest(server string, params *GetDescriptionParams) (*htt return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetType", params.TargetType, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetId", params.TargetId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err } - return req, nil -} + req.Header.Add("Content-Type", contentType) -// NewUpsertDescriptionRequest calls the generic UpsertDescription builder with application/json body -func NewUpsertDescriptionRequest(server string, params *UpsertDescriptionParams, body UpsertDescriptionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewUpsertDescriptionRequestWithBody(server, params, "application/json", bodyReader) + return req, nil } -// NewUpsertDescriptionRequestWithBody generates requests for UpsertDescription with any type of body -func NewUpsertDescriptionRequestWithBody(server string, params *UpsertDescriptionParams, contentType string, body io.Reader) (*http.Request, error) { +// NewGetDescriptionRequest generates requests for GetDescription +func NewGetDescriptionRequest(server string, params *GetDescriptionParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6793,56 +13753,41 @@ func NewUpsertDescriptionRequestWithBody(server string, params *UpsertDescriptio } } - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetId", params.TargetId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) + if params.TargetId != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "targetId", *params.TargetId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } } } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewListHomeworksRequest generates requests for ListHomeworks -func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + } - operationPath := fmt.Sprintf("/api/homeworks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + if params.SectionJwId != nil { - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionJwId", *params.SectionJwId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - if params != nil { - queryValues := queryURL.Query() + } - if params.SectionId != nil { + if params.CourseJwId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionId", *params.SectionId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "courseJwId", *params.CourseJwId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6856,9 +13801,9 @@ func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http. } - if params.SectionIds != nil { + if params.TeacherId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionIds", *params.SectionIds, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "teacherId", *params.TeacherId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6872,9 +13817,9 @@ func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http. } - if params.IncludeDeleted != nil { + if params.HomeworkId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "includeDeleted", *params.IncludeDeleted, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "homeworkId", *params.HomeworkId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6899,19 +13844,48 @@ func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http. return req, nil } -// NewCreateHomeworkRequest calls the generic CreateHomework builder with application/json body -func NewCreateHomeworkRequest(server string, params *CreateHomeworkParams, body CreateHomeworkJSONRequestBody) (*http.Request, error) { +// NewUpsertDescriptionRequest calls the generic UpsertDescription builder with application/json body +func NewUpsertDescriptionRequest(server string, body UpsertDescriptionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateHomeworkRequestWithBody(server, params, "application/json", bodyReader) + return NewUpsertDescriptionRequestWithBody(server, "application/json", bodyReader) } -// NewCreateHomeworkRequestWithBody generates requests for CreateHomework with any type of body -func NewCreateHomeworkRequestWithBody(server string, params *CreateHomeworkParams, contentType string, body io.Reader) (*http.Request, error) { +// NewUpsertDescriptionRequestWithBody generates requests for UpsertDescription with any type of body +func NewUpsertDescriptionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/descriptions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewListHomeworksRequest generates requests for ListHomeworks +func NewListHomeworksRequest(server string, params *ListHomeworksParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -6950,7 +13924,23 @@ func NewCreateHomeworkRequestWithBody(server string, params *CreateHomeworkParam if params.SectionIds != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionIds", *params.SectionIds, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionIds", *params.SectionIds, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.SectionJwId != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "sectionJwId", *params.SectionJwId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -6983,6 +13973,44 @@ func NewCreateHomeworkRequestWithBody(server string, params *CreateHomeworkParam queryURL.RawQuery = queryValues.Encode() } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewCreateHomeworkRequest calls the generic CreateHomework builder with application/json body +func NewCreateHomeworkRequest(server string, body CreateHomeworkJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewCreateHomeworkRequestWithBody(server, "application/json", bodyReader) +} + +// NewCreateHomeworkRequestWithBody generates requests for CreateHomework with any type of body +func NewCreateHomeworkRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/homeworks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + req, err := http.NewRequest("POST", queryURL.String(), body) if err != nil { return nil, err @@ -6993,19 +14021,48 @@ func NewCreateHomeworkRequestWithBody(server string, params *CreateHomeworkParam return req, nil } -// NewDeleteHomeworkRequest calls the generic DeleteHomework builder with application/json body -func NewDeleteHomeworkRequest(server string, id string, body DeleteHomeworkJSONRequestBody) (*http.Request, error) { +// NewPutApiHomeworksCompletionsRequest calls the generic PutApiHomeworksCompletions builder with application/json body +func NewPutApiHomeworksCompletionsRequest(server string, body PutApiHomeworksCompletionsJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeleteHomeworkRequestWithBody(server, id, "application/json", bodyReader) + return NewPutApiHomeworksCompletionsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPutApiHomeworksCompletionsRequestWithBody generates requests for PutApiHomeworksCompletions with any type of body +func NewPutApiHomeworksCompletionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/homeworks/completions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// NewDeleteHomeworkRequestWithBody generates requests for DeleteHomework with any type of body -func NewDeleteHomeworkRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteHomeworkRequest generates requests for DeleteHomework +func NewDeleteHomeworkRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -7030,13 +14087,11 @@ func NewDeleteHomeworkRequestWithBody(server string, id string, contentType stri return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } @@ -7193,31 +14248,241 @@ func NewGetMeRequest(server string) (*http.Request, error) { return nil, err } - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiMeOverviewRequest generates requests for GetApiMeOverview +func NewGetApiMeOverviewRequest(server string, params *GetApiMeOverviewParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/me/overview") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.AtTime != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "atTime", *params.AtTime, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.HomeworkWindowDays != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "homeworkWindowDays", *params.HomeworkWindowDays, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Locale != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "locale", *params.Locale, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetSubscribedHomeworksRequest generates requests for GetSubscribedHomeworks +func NewGetSubscribedHomeworksRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/me/subscriptions/homeworks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetApiMeSubscriptionsSchedulesRequest generates requests for GetApiMeSubscriptionsSchedules +func NewGetApiMeSubscriptionsSchedulesRequest(server string, params *GetApiMeSubscriptionsSchedulesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/me/subscriptions/schedules") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateFrom", *params.DateFrom, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateTo", *params.DateTo, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Weekday != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "weekday", *params.Weekday, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - return req, nil -} + } -// NewGetSubscribedHomeworksRequest generates requests for GetSubscribedHomeworks -func NewGetSubscribedHomeworksRequest(server string) (*http.Request, error) { - var err error + if params.Locale != nil { - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "locale", *params.Locale, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } - operationPath := fmt.Sprintf("/api/me/subscriptions/homeworks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } + } - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err + queryURL.RawQuery = queryValues.Encode() } req, err := http.NewRequest("GET", queryURL.String(), nil) @@ -7434,7 +14699,7 @@ func NewListSchedulesRequest(server string, params *ListSchedulesParams) (*http. if params.DateFrom != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateFrom", *params.DateFrom, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateFrom", *params.DateFrom, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7450,7 +14715,7 @@ func NewListSchedulesRequest(server string, params *ListSchedulesParams) (*http. if params.DateTo != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateTo", *params.DateTo, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateTo", *params.DateTo, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -7936,7 +15201,7 @@ func NewGetSectionScheduleGroupsRequest(server string, jwId int64) (*http.Reques } // NewGetSectionSchedulesRequest generates requests for GetSectionSchedules -func NewGetSectionSchedulesRequest(server string, jwId int64) (*http.Request, error) { +func NewGetSectionSchedulesRequest(server string, jwId int64, params *GetSectionSchedulesParams) (*http.Request, error) { var err error var pathParam0 string @@ -7961,6 +15226,60 @@ func NewGetSectionSchedulesRequest(server string, jwId int64) (*http.Request, er return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.DateFrom != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateFrom", *params.DateFrom, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DateTo != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dateTo", *params.DateTo, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -8159,12 +15478,12 @@ func NewListTeachersRequest(server string, params *ListTeachersParams) (*http.Re } // NewGetTeacherRequest generates requests for GetTeacher -func NewGetTeacherRequest(server string, id string) (*http.Request, error) { +func NewGetTeacherRequest(server string, id int64) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "id", id, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "integer", Format: "int64"}) if err != nil { return nil, err } @@ -8248,7 +15567,7 @@ func NewListTodosRequest(server string, params *ListTodosParams) (*http.Request, if params.DueBefore != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dueBefore", *params.DueBefore, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dueBefore", *params.DueBefore, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8264,7 +15583,23 @@ func NewListTodosRequest(server string, params *ListTodosParams) (*http.Request, if params.DueAfter != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dueAfter", *params.DueAfter, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dueAfter", *params.DueAfter, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Limit != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "limit", *params.Limit, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "integer", Format: "int64"}); err != nil { return nil, err } else if parsed, err := url.ParseQuery(queryFrag); err != nil { return nil, err @@ -8290,18 +15625,18 @@ func NewListTodosRequest(server string, params *ListTodosParams) (*http.Request, } // NewCreateTodoRequest calls the generic CreateTodo builder with application/json body -func NewCreateTodoRequest(server string, params *CreateTodoParams, body CreateTodoJSONRequestBody) (*http.Request, error) { +func NewCreateTodoRequest(server string, body CreateTodoJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateTodoRequestWithBody(server, params, "application/json", bodyReader) + return NewCreateTodoRequestWithBody(server, "application/json", bodyReader) } // NewCreateTodoRequestWithBody generates requests for CreateTodo with any type of body -func NewCreateTodoRequestWithBody(server string, params *CreateTodoParams, contentType string, body io.Reader) (*http.Request, error) { +func NewCreateTodoRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -8319,77 +15654,47 @@ func NewCreateTodoRequestWithBody(server string, params *CreateTodoParams, conte return nil, err } - if params != nil { - queryValues := queryURL.Query() - - if params.Completed != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "completed", *params.Completed, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Priority != nil { - - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "priority", *params.Priority, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } - if params.DueBefore != nil { + req.Header.Add("Content-Type", contentType) - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dueBefore", *params.DueBefore, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + return req, nil +} - } +// NewDeleteApiTodosBatchRequest calls the generic DeleteApiTodosBatch builder with application/json body +func NewDeleteApiTodosBatchRequest(server string, body DeleteApiTodosBatchJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteApiTodosBatchRequestWithBody(server, "application/json", bodyReader) +} - if params.DueAfter != nil { +// NewDeleteApiTodosBatchRequestWithBody generates requests for DeleteApiTodosBatch with any type of body +func NewDeleteApiTodosBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "dueAfter", *params.DueAfter, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: "date-time"}); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } - } + operationPath := fmt.Sprintf("/api/todos/batch") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } - queryURL.RawQuery = queryValues.Encode() + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), body) if err != nil { return nil, err } @@ -8399,19 +15704,48 @@ func NewCreateTodoRequestWithBody(server string, params *CreateTodoParams, conte return req, nil } -// NewDeleteTodoRequest calls the generic DeleteTodo builder with application/json body -func NewDeleteTodoRequest(server string, id string, body DeleteTodoJSONRequestBody) (*http.Request, error) { +// NewPatchApiTodosBatchRequest calls the generic PatchApiTodosBatch builder with application/json body +func NewPatchApiTodosBatchRequest(server string, body PatchApiTodosBatchJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeleteTodoRequestWithBody(server, id, "application/json", bodyReader) + return NewPatchApiTodosBatchRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchApiTodosBatchRequestWithBody generates requests for PatchApiTodosBatch with any type of body +func NewPatchApiTodosBatchRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/todos/batch") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil } -// NewDeleteTodoRequestWithBody generates requests for DeleteTodo with any type of body -func NewDeleteTodoRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteTodoRequest generates requests for DeleteTodo +func NewDeleteTodoRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -8436,13 +15770,11 @@ func NewDeleteTodoRequestWithBody(server string, id string, contentType string, return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } @@ -8571,8 +15903,37 @@ func NewCompleteUploadRequest(server string, body CompleteUploadJSONRequestBody) return NewCompleteUploadRequestWithBody(server, "application/json", bodyReader) } -// NewCompleteUploadRequestWithBody generates requests for CompleteUpload with any type of body -func NewCompleteUploadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCompleteUploadRequestWithBody generates requests for CompleteUpload with any type of body +func NewCompleteUploadRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/api/uploads/complete") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPutApiUploadsObjectRequestWithBody generates requests for PutApiUploadsObject with any type of body +func NewPutApiUploadsObjectRequestWithBody(server string, params *PutApiUploadsObjectParams, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -8580,7 +15941,7 @@ func NewCompleteUploadRequestWithBody(server string, contentType string, body io return nil, err } - operationPath := fmt.Sprintf("/api/uploads/complete") + operationPath := fmt.Sprintf("/api/uploads/object") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -8590,7 +15951,25 @@ func NewCompleteUploadRequestWithBody(server string, contentType string, body io return nil, err } - req, err := http.NewRequest("POST", queryURL.String(), body) + if params != nil { + queryValues := queryURL.Query() + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "key", params.Key, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) if err != nil { return nil, err } @@ -8600,19 +15979,8 @@ func NewCompleteUploadRequestWithBody(server string, contentType string, body io return req, nil } -// NewDeleteUploadRequest calls the generic DeleteUpload builder with application/json body -func NewDeleteUploadRequest(server string, id string, body DeleteUploadJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteUploadRequestWithBody(server, id, "application/json", bodyReader) -} - -// NewDeleteUploadRequestWithBody generates requests for DeleteUpload with any type of body -func NewDeleteUploadRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error) { +// NewDeleteUploadRequest generates requests for DeleteUpload +func NewDeleteUploadRequest(server string, id string) (*http.Request, error) { var err error var pathParam0 string @@ -8637,13 +16005,11 @@ func NewDeleteUploadRequestWithBody(server string, id string, contentType string return nil, err } - req, err := http.NewRequest("DELETE", queryURL.String(), body) + req, err := http.NewRequest("DELETE", queryURL.String(), nil) if err != nil { return nil, err } - req.Header.Add("Content-Type", contentType) - return req, nil } @@ -8729,7 +16095,7 @@ func NewDownloadUploadRequest(server string, id string) (*http.Request, error) { } // NewGetUserCalendarRequest generates requests for GetUserCalendar -func NewGetUserCalendarRequest(server string, userId string) (*http.Request, error) { +func NewGetUserCalendarRequest(server string, userId string, params *GetUserCalendarParams) (*http.Request, error) { var err error var pathParam0 string @@ -8754,6 +16120,28 @@ func NewGetUserCalendarRequest(server string, userId string) (*http.Request, err return nil, err } + if params != nil { + queryValues := queryURL.Query() + + if params.Token != nil { + + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "token", *params.Token, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + req, err := http.NewRequest("GET", queryURL.String(), nil) if err != nil { return nil, err @@ -8816,243 +16204,918 @@ type ClientWithResponsesInterface interface { // ListAdminDescriptionsWithResponse request ListAdminDescriptionsWithResponse(ctx context.Context, params *ListAdminDescriptionsParams, reqEditors ...RequestEditorFn) (*ListAdminDescriptionsResponse, error) - // ListAdminHomeworksWithResponse request - ListAdminHomeworksWithResponse(ctx context.Context, params *ListAdminHomeworksParams, reqEditors ...RequestEditorFn) (*ListAdminHomeworksResponse, error) + // UpdateAdminDescriptionWithBodyWithResponse request with any body + UpdateAdminDescriptionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminDescriptionResponse, error) + + UpdateAdminDescriptionWithResponse(ctx context.Context, id string, body UpdateAdminDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminDescriptionResponse, error) + + // ListAdminHomeworksWithResponse request + ListAdminHomeworksWithResponse(ctx context.Context, params *ListAdminHomeworksParams, reqEditors ...RequestEditorFn) (*ListAdminHomeworksResponse, error) + + // DeleteAdminHomeworkWithResponse request + DeleteAdminHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAdminHomeworkResponse, error) + + // ListAdminSuspensionsWithResponse request + ListAdminSuspensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminSuspensionsResponse, error) + + // CreateAdminSuspensionWithBodyWithResponse request with any body + CreateAdminSuspensionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) + + CreateAdminSuspensionWithResponse(ctx context.Context, body CreateAdminSuspensionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) + + // UpdateAdminSuspensionWithResponse request + UpdateAdminSuspensionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UpdateAdminSuspensionResponse, error) + + // ListAdminUsersWithResponse request + ListAdminUsersWithResponse(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*ListAdminUsersResponse, error) + + // UpdateAdminUserWithBodyWithResponse request with any body + UpdateAdminUserWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) + + UpdateAdminUserWithResponse(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) + + // QueryBusWithResponse request + QueryBusWithResponse(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*QueryBusResponse, error) + + // GetApiBusNextWithResponse request + GetApiBusNextWithResponse(ctx context.Context, params *GetApiBusNextParams, reqEditors ...RequestEditorFn) (*GetApiBusNextResponse, error) + + // GetBusPreferencesWithResponse request + GetBusPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBusPreferencesResponse, error) + + // SetBusPreferencesWithBodyWithResponse request with any body + SetBusPreferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) + + SetBusPreferencesWithResponse(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) + + // GetApiBusRoutesWithResponse request + GetApiBusRoutesWithResponse(ctx context.Context, params *GetApiBusRoutesParams, reqEditors ...RequestEditorFn) (*GetApiBusRoutesResponse, error) + + // DeleteApiCalendarSubscriptionsWithBodyWithResponse request with any body + DeleteApiCalendarSubscriptionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiCalendarSubscriptionsResponse, error) + + DeleteApiCalendarSubscriptionsWithResponse(ctx context.Context, body DeleteApiCalendarSubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiCalendarSubscriptionsResponse, error) + + // AppendCalendarSubscriptionSectionsWithBodyWithResponse request with any body + AppendCalendarSubscriptionSectionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AppendCalendarSubscriptionSectionsResponse, error) + + AppendCalendarSubscriptionSectionsWithResponse(ctx context.Context, body AppendCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*AppendCalendarSubscriptionSectionsResponse, error) + + // SetCalendarSubscriptionWithBodyWithResponse request with any body + SetCalendarSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) + + SetCalendarSubscriptionWithResponse(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) + + // BatchUpdateCalendarSubscriptionWithBodyWithResponse request with any body + BatchUpdateCalendarSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BatchUpdateCalendarSubscriptionResponse, error) + + BatchUpdateCalendarSubscriptionWithResponse(ctx context.Context, body BatchUpdateCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*BatchUpdateCalendarSubscriptionResponse, error) + + // GetCurrentCalendarSubscriptionWithResponse request + GetCurrentCalendarSubscriptionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentCalendarSubscriptionResponse, error) + + // PostApiCalendarSubscriptionsImportCodesWithBodyWithResponse request with any body + PostApiCalendarSubscriptionsImportCodesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiCalendarSubscriptionsImportCodesResponse, error) + + PostApiCalendarSubscriptionsImportCodesWithResponse(ctx context.Context, body PostApiCalendarSubscriptionsImportCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiCalendarSubscriptionsImportCodesResponse, error) + + // QueryCalendarSubscriptionSectionsWithBodyWithResponse request with any body + QueryCalendarSubscriptionSectionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryCalendarSubscriptionSectionsResponse, error) + + QueryCalendarSubscriptionSectionsWithResponse(ctx context.Context, body QueryCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryCalendarSubscriptionSectionsResponse, error) + + // ListCommentsWithResponse request + ListCommentsWithResponse(ctx context.Context, params *ListCommentsParams, reqEditors ...RequestEditorFn) (*ListCommentsResponse, error) + + // CreateCommentWithBodyWithResponse request with any body + CreateCommentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) + + CreateCommentWithResponse(ctx context.Context, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) + + // DeleteApiCommentsBatchWithBodyWithResponse request with any body + DeleteApiCommentsBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiCommentsBatchResponse, error) + + DeleteApiCommentsBatchWithResponse(ctx context.Context, body DeleteApiCommentsBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiCommentsBatchResponse, error) + + // DeleteCommentWithResponse request + DeleteCommentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) + + // GetCommentWithResponse request + GetCommentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetCommentResponse, error) + + // UpdateCommentWithBodyWithResponse request with any body + UpdateCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) + + UpdateCommentWithResponse(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) + + // RemoveCommentReactionWithResponse request + RemoveCommentReactionWithResponse(ctx context.Context, id string, params *RemoveCommentReactionParams, reqEditors ...RequestEditorFn) (*RemoveCommentReactionResponse, error) + + // AddCommentReactionWithBodyWithResponse request with any body + AddCommentReactionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) + + AddCommentReactionWithResponse(ctx context.Context, id string, body AddCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) + + // ListCoursesWithResponse request + ListCoursesWithResponse(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*ListCoursesResponse, error) + + // GetCourseWithResponse request + GetCourseWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetCourseResponse, error) + + // PinDashboardLinkWithBodyWithResponse request with any body + PinDashboardLinkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) + + PinDashboardLinkWithFormdataBodyWithResponse(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) + + // PostApiDashboardLinksPinBatchWithBodyWithResponse request with any body + PostApiDashboardLinksPinBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiDashboardLinksPinBatchResponse, error) + + PostApiDashboardLinksPinBatchWithResponse(ctx context.Context, body PostApiDashboardLinksPinBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiDashboardLinksPinBatchResponse, error) + + // VisitDashboardLinkWithResponse request + VisitDashboardLinkWithResponse(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*VisitDashboardLinkResponse, error) + + // RecordDashboardLinkVisitWithBodyWithResponse request with any body + RecordDashboardLinkVisitWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) + + RecordDashboardLinkVisitWithFormdataBodyWithResponse(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) + + // GetDescriptionWithResponse request + GetDescriptionWithResponse(ctx context.Context, params *GetDescriptionParams, reqEditors ...RequestEditorFn) (*GetDescriptionResponse, error) + + // UpsertDescriptionWithBodyWithResponse request with any body + UpsertDescriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) + + UpsertDescriptionWithResponse(ctx context.Context, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) + + // ListHomeworksWithResponse request + ListHomeworksWithResponse(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*ListHomeworksResponse, error) + + // CreateHomeworkWithBodyWithResponse request with any body + CreateHomeworkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) + + CreateHomeworkWithResponse(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) + + // PutApiHomeworksCompletionsWithBodyWithResponse request with any body + PutApiHomeworksCompletionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiHomeworksCompletionsResponse, error) + + PutApiHomeworksCompletionsWithResponse(ctx context.Context, body PutApiHomeworksCompletionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiHomeworksCompletionsResponse, error) + + // DeleteHomeworkWithResponse request + DeleteHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) + + // UpdateHomeworkWithBodyWithResponse request with any body + UpdateHomeworkWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) + + UpdateHomeworkWithResponse(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) + + // SetHomeworkCompletionWithBodyWithResponse request with any body + SetHomeworkCompletionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) + + SetHomeworkCompletionWithResponse(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) + + // SetLocaleWithBodyWithResponse request with any body + SetLocaleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) + + SetLocaleWithResponse(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) + + // GetMeWithResponse request + GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, error) + + // GetApiMeOverviewWithResponse request + GetApiMeOverviewWithResponse(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*GetApiMeOverviewResponse, error) + + // GetSubscribedHomeworksWithResponse request + GetSubscribedHomeworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSubscribedHomeworksResponse, error) + + // GetApiMeSubscriptionsSchedulesWithResponse request + GetApiMeSubscriptionsSchedulesWithResponse(ctx context.Context, params *GetApiMeSubscriptionsSchedulesParams, reqEditors ...RequestEditorFn) (*GetApiMeSubscriptionsSchedulesResponse, error) + + // GetMetadataWithResponse request + GetMetadataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetadataResponse, error) + + // GetOpenApiSpecWithResponse request + GetOpenApiSpecWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenApiSpecResponse, error) + + // ListSchedulesWithResponse request + ListSchedulesWithResponse(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error) + + // ListSectionsWithResponse request + ListSectionsWithResponse(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*ListSectionsResponse, error) + + // GetSectionsCalendarWithResponse request + GetSectionsCalendarWithResponse(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*GetSectionsCalendarResponse, error) + + // MatchSectionCodesWithBodyWithResponse request with any body + MatchSectionCodesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MatchSectionCodesResponse, error) + + MatchSectionCodesWithResponse(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*MatchSectionCodesResponse, error) + + // GetSectionWithResponse request + GetSectionWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionResponse, error) + + // GetSectionCalendarWithResponse request + GetSectionCalendarWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionCalendarResponse, error) + + // GetSectionScheduleGroupsWithResponse request + GetSectionScheduleGroupsWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionScheduleGroupsResponse, error) + + // GetSectionSchedulesWithResponse request + GetSectionSchedulesWithResponse(ctx context.Context, jwId int64, params *GetSectionSchedulesParams, reqEditors ...RequestEditorFn) (*GetSectionSchedulesResponse, error) + + // ListSemestersWithResponse request + ListSemestersWithResponse(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*ListSemestersResponse, error) + + // GetCurrentSemesterWithResponse request + GetCurrentSemesterWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentSemesterResponse, error) + + // ListTeachersWithResponse request + ListTeachersWithResponse(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*ListTeachersResponse, error) + + // GetTeacherWithResponse request + GetTeacherWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetTeacherResponse, error) + + // ListTodosWithResponse request + ListTodosWithResponse(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*ListTodosResponse, error) + + // CreateTodoWithBodyWithResponse request with any body + CreateTodoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) + + CreateTodoWithResponse(ctx context.Context, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) + + // DeleteApiTodosBatchWithBodyWithResponse request with any body + DeleteApiTodosBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiTodosBatchResponse, error) + + DeleteApiTodosBatchWithResponse(ctx context.Context, body DeleteApiTodosBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiTodosBatchResponse, error) + + // PatchApiTodosBatchWithBodyWithResponse request with any body + PatchApiTodosBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiTodosBatchResponse, error) + + PatchApiTodosBatchWithResponse(ctx context.Context, body PatchApiTodosBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiTodosBatchResponse, error) + + // DeleteTodoWithResponse request + DeleteTodoWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) + + // UpdateTodoWithBodyWithResponse request with any body + UpdateTodoWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) + + UpdateTodoWithResponse(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) + + // ListUploadsWithResponse request + ListUploadsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUploadsResponse, error) + + // CreateUploadWithBodyWithResponse request with any body + CreateUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) - // DeleteAdminHomeworkWithResponse request - DeleteAdminHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAdminHomeworkResponse, error) + CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) - // ListAdminSuspensionsWithResponse request - ListAdminSuspensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminSuspensionsResponse, error) + // CompleteUploadWithBodyWithResponse request with any body + CompleteUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) - // CreateAdminSuspensionWithBodyWithResponse request with any body - CreateAdminSuspensionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) + CompleteUploadWithResponse(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) - CreateAdminSuspensionWithResponse(ctx context.Context, body CreateAdminSuspensionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) + // PutApiUploadsObjectWithBodyWithResponse request with any body + PutApiUploadsObjectWithBodyWithResponse(ctx context.Context, params *PutApiUploadsObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiUploadsObjectResponse, error) - // UpdateAdminSuspensionWithResponse request - UpdateAdminSuspensionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UpdateAdminSuspensionResponse, error) + // DeleteUploadWithResponse request + DeleteUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteUploadResponse, error) - // ListAdminUsersWithResponse request - ListAdminUsersWithResponse(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*ListAdminUsersResponse, error) + // UpdateUploadWithBodyWithResponse request with any body + UpdateUploadWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) - // UpdateAdminUserWithBodyWithResponse request with any body - UpdateAdminUserWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) + UpdateUploadWithResponse(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) - UpdateAdminUserWithResponse(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) + // DownloadUploadWithResponse request + DownloadUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DownloadUploadResponse, error) - // QueryBusWithResponse request - QueryBusWithResponse(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*QueryBusResponse, error) + // GetUserCalendarWithResponse request + GetUserCalendarWithResponse(ctx context.Context, userId string, params *GetUserCalendarParams, reqEditors ...RequestEditorFn) (*GetUserCalendarResponse, error) +} - // GetBusPreferencesWithResponse request - GetBusPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBusPreferencesResponse, error) +type ListAdminCommentsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminCommentsResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - // SetBusPreferencesWithBodyWithResponse request with any body - SetBusPreferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) +// Status returns HTTPResponse.Status +func (r ListAdminCommentsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - SetBusPreferencesWithResponse(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminCommentsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // SetCalendarSubscriptionWithBodyWithResponse request with any body - SetCalendarSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) +type ModerateAdminCommentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminModeratedCommentResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - SetCalendarSubscriptionWithResponse(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) +// Status returns HTTPResponse.Status +func (r ModerateAdminCommentResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetCurrentCalendarSubscriptionWithResponse request - GetCurrentCalendarSubscriptionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentCalendarSubscriptionResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ModerateAdminCommentResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // ListCommentsWithResponse request - ListCommentsWithResponse(ctx context.Context, params *ListCommentsParams, reqEditors ...RequestEditorFn) (*ListCommentsResponse, error) +type ListAdminDescriptionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminDescriptionsResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - // CreateCommentWithBodyWithResponse request with any body - CreateCommentWithBodyWithResponse(ctx context.Context, params *CreateCommentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) +// Status returns HTTPResponse.Status +func (r ListAdminDescriptionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - CreateCommentWithResponse(ctx context.Context, params *CreateCommentParams, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminDescriptionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // DeleteCommentWithBodyWithResponse request with any body - DeleteCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) +type UpdateAdminDescriptionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminModeratedDescriptionResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - DeleteCommentWithResponse(ctx context.Context, id string, body DeleteCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) +// Status returns HTTPResponse.Status +func (r UpdateAdminDescriptionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetCommentWithResponse request - GetCommentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetCommentResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAdminDescriptionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // UpdateCommentWithBodyWithResponse request with any body - UpdateCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) +type ListAdminHomeworksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminHomeworksResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - UpdateCommentWithResponse(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) +// Status returns HTTPResponse.Status +func (r ListAdminHomeworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // RemoveCommentReactionWithBodyWithResponse request with any body - RemoveCommentReactionWithBodyWithResponse(ctx context.Context, id string, params *RemoveCommentReactionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveCommentReactionResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminHomeworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - RemoveCommentReactionWithResponse(ctx context.Context, id string, params *RemoveCommentReactionParams, body RemoveCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveCommentReactionResponse, error) +type DeleteAdminHomeworkResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *SuccessResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // AddCommentReactionWithBodyWithResponse request with any body - AddCommentReactionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) +// Status returns HTTPResponse.Status +func (r DeleteAdminHomeworkResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - AddCommentReactionWithResponse(ctx context.Context, id string, body AddCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAdminHomeworkResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // ListCoursesWithResponse request - ListCoursesWithResponse(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*ListCoursesResponse, error) +type ListAdminSuspensionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminSuspensionsResponseSchema + JSON401 *OpenApiErrorSchema +} - // GetCourseWithResponse request - GetCourseWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetCourseResponse, error) +// Status returns HTTPResponse.Status +func (r ListAdminSuspensionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // PinDashboardLinkWithBodyWithResponse request with any body - PinDashboardLinkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminSuspensionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - PinDashboardLinkWithFormdataBodyWithResponse(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) +type CreateAdminSuspensionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminSuspensionResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // VisitDashboardLinkWithResponse request - VisitDashboardLinkWithResponse(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*VisitDashboardLinkResponse, error) +// Status returns HTTPResponse.Status +func (r CreateAdminSuspensionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // RecordDashboardLinkVisitWithBodyWithResponse request with any body - RecordDashboardLinkVisitWithBodyWithResponse(ctx context.Context, params *RecordDashboardLinkVisitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r CreateAdminSuspensionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type UpdateAdminSuspensionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminSuspensionResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - RecordDashboardLinkVisitWithFormdataBodyWithResponse(ctx context.Context, params *RecordDashboardLinkVisitParams, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) +// Status returns HTTPResponse.Status +func (r UpdateAdminSuspensionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetDescriptionWithResponse request - GetDescriptionWithResponse(ctx context.Context, params *GetDescriptionParams, reqEditors ...RequestEditorFn) (*GetDescriptionResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAdminSuspensionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // UpsertDescriptionWithBodyWithResponse request with any body - UpsertDescriptionWithBodyWithResponse(ctx context.Context, params *UpsertDescriptionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) +type ListAdminUsersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminUsersResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - UpsertDescriptionWithResponse(ctx context.Context, params *UpsertDescriptionParams, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) +// Status returns HTTPResponse.Status +func (r ListAdminUsersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // ListHomeworksWithResponse request - ListHomeworksWithResponse(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*ListHomeworksResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListAdminUsersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // CreateHomeworkWithBodyWithResponse request with any body - CreateHomeworkWithBodyWithResponse(ctx context.Context, params *CreateHomeworkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) +type UpdateAdminUserResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *AdminUserResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - CreateHomeworkWithResponse(ctx context.Context, params *CreateHomeworkParams, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) +// Status returns HTTPResponse.Status +func (r UpdateAdminUserResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // DeleteHomeworkWithBodyWithResponse request with any body - DeleteHomeworkWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r UpdateAdminUserResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - DeleteHomeworkWithResponse(ctx context.Context, id string, body DeleteHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) +type QueryBusResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BusQueryResponseSchema + JSON400 *OpenApiErrorSchema +} - // UpdateHomeworkWithBodyWithResponse request with any body - UpdateHomeworkWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) +// Status returns HTTPResponse.Status +func (r QueryBusResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - UpdateHomeworkWithResponse(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r QueryBusResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // SetHomeworkCompletionWithBodyWithResponse request with any body - SetHomeworkCompletionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) +type GetApiBusNextResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BusNextDeparturesResponseSchema + JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - SetHomeworkCompletionWithResponse(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) +// Status returns HTTPResponse.Status +func (r GetApiBusNextResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // SetLocaleWithBodyWithResponse request with any body - SetLocaleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiBusNextResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - SetLocaleWithResponse(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) +type GetBusPreferencesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BusPreferenceResponseSchema + JSON401 *OpenApiErrorSchema +} - // GetMeWithResponse request - GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, error) +// Status returns HTTPResponse.Status +func (r GetBusPreferencesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetSubscribedHomeworksWithResponse request - GetSubscribedHomeworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSubscribedHomeworksResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r GetBusPreferencesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // GetMetadataWithResponse request - GetMetadataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetadataResponse, error) +type SetBusPreferencesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BusPreferenceResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - // GetOpenApiSpecWithResponse request - GetOpenApiSpecWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenApiSpecResponse, error) +// Status returns HTTPResponse.Status +func (r SetBusPreferencesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // ListSchedulesWithResponse request - ListSchedulesWithResponse(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r SetBusPreferencesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // ListSectionsWithResponse request - ListSectionsWithResponse(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*ListSectionsResponse, error) +type GetApiBusRoutesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *BusRouteSearchResponseSchema + JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // GetSectionsCalendarWithResponse request - GetSectionsCalendarWithResponse(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*GetSectionsCalendarResponse, error) +// Status returns HTTPResponse.Status +func (r GetApiBusRoutesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // MatchSectionCodesWithBodyWithResponse request with any body - MatchSectionCodesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MatchSectionCodesResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r GetApiBusRoutesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - MatchSectionCodesWithResponse(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*MatchSectionCodesResponse, error) +type DeleteApiCalendarSubscriptionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionRemoveResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // GetSectionWithResponse request - GetSectionWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionResponse, error) +// Status returns HTTPResponse.Status +func (r DeleteApiCalendarSubscriptionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetSectionCalendarWithResponse request - GetSectionCalendarWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionCalendarResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteApiCalendarSubscriptionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // GetSectionScheduleGroupsWithResponse request - GetSectionScheduleGroupsWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionScheduleGroupsResponse, error) +type AppendCalendarSubscriptionSectionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionAppendResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // GetSectionSchedulesWithResponse request - GetSectionSchedulesWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionSchedulesResponse, error) +// Status returns HTTPResponse.Status +func (r AppendCalendarSubscriptionSectionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // ListSemestersWithResponse request - ListSemestersWithResponse(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*ListSemestersResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r AppendCalendarSubscriptionSectionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // GetCurrentSemesterWithResponse request - GetCurrentSemesterWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentSemesterResponse, error) +type SetCalendarSubscriptionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionCreateResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema +} - // ListTeachersWithResponse request - ListTeachersWithResponse(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*ListTeachersResponse, error) +// Status returns HTTPResponse.Status +func (r SetCalendarSubscriptionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetTeacherWithResponse request - GetTeacherWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetTeacherResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r SetCalendarSubscriptionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // ListTodosWithResponse request - ListTodosWithResponse(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*ListTodosResponse, error) +type BatchUpdateCalendarSubscriptionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionBatchResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // CreateTodoWithBodyWithResponse request with any body - CreateTodoWithBodyWithResponse(ctx context.Context, params *CreateTodoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) +// Status returns HTTPResponse.Status +func (r BatchUpdateCalendarSubscriptionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - CreateTodoWithResponse(ctx context.Context, params *CreateTodoParams, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r BatchUpdateCalendarSubscriptionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // DeleteTodoWithBodyWithResponse request with any body - DeleteTodoWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) +type GetCurrentCalendarSubscriptionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CurrentCalendarSubscriptionResponseSchema + JSON401 *OpenApiErrorSchema +} - DeleteTodoWithResponse(ctx context.Context, id string, body DeleteTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) +// Status returns HTTPResponse.Status +func (r GetCurrentCalendarSubscriptionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // UpdateTodoWithBodyWithResponse request with any body - UpdateTodoWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r GetCurrentCalendarSubscriptionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - UpdateTodoWithResponse(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) +type PostApiCalendarSubscriptionsImportCodesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionImportResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // ListUploadsWithResponse request - ListUploadsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUploadsResponse, error) +// Status returns HTTPResponse.Status +func (r PostApiCalendarSubscriptionsImportCodesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // CreateUploadWithBodyWithResponse request with any body - CreateUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r PostApiCalendarSubscriptionsImportCodesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) +type QueryCalendarSubscriptionSectionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CalendarSubscriptionQueryResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // CompleteUploadWithBodyWithResponse request with any body - CompleteUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) +// Status returns HTTPResponse.Status +func (r QueryCalendarSubscriptionSectionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - CompleteUploadWithResponse(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r QueryCalendarSubscriptionSectionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - // DeleteUploadWithBodyWithResponse request with any body - DeleteUploadWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteUploadResponse, error) +type ListCommentsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *CommentsListResponseSchema + JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - DeleteUploadWithResponse(ctx context.Context, id string, body DeleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUploadResponse, error) +// Status returns HTTPResponse.Status +func (r ListCommentsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // UpdateUploadWithBodyWithResponse request with any body - UpdateUploadWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r ListCommentsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} - UpdateUploadWithResponse(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) +type CreateCommentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *IdResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema +} - // DownloadUploadWithResponse request - DownloadUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DownloadUploadResponse, error) +// Status returns HTTPResponse.Status +func (r CreateCommentResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} - // GetUserCalendarWithResponse request - GetUserCalendarWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserCalendarResponse, error) +// StatusCode returns HTTPResponse.StatusCode +func (r CreateCommentResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 } -type ListAdminCommentsResponse struct { +type DeleteApiCommentsBatchResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminCommentsResponseSchema + JSON200 *CommentBatchDeleteResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListAdminCommentsResponse) Status() string { +func (r DeleteApiCommentsBatchResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9060,22 +17123,24 @@ func (r ListAdminCommentsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminCommentsResponse) StatusCode() int { +func (r DeleteApiCommentsBatchResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ModerateAdminCommentResponse struct { +type DeleteCommentResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminModeratedCommentResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *SuccessResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ModerateAdminCommentResponse) Status() string { +func (r DeleteCommentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9083,22 +17148,23 @@ func (r ModerateAdminCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ModerateAdminCommentResponse) StatusCode() int { +func (r DeleteCommentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAdminDescriptionsResponse struct { +type GetCommentResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminDescriptionsResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *CommentThreadResponseSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListAdminDescriptionsResponse) Status() string { +func (r GetCommentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9106,22 +17172,25 @@ func (r ListAdminDescriptionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminDescriptionsResponse) StatusCode() int { +func (r GetCommentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAdminHomeworksResponse struct { +type UpdateCommentResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminHomeworksResponseSchema + JSON200 *CommentUpdateResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListAdminHomeworksResponse) Status() string { +func (r UpdateCommentResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9129,22 +17198,24 @@ func (r ListAdminHomeworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminHomeworksResponse) StatusCode() int { +func (r UpdateCommentResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteAdminHomeworkResponse struct { +type RemoveCommentReactionResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SuccessResponseSchema - JSON404 *OpenApiErrorSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r DeleteAdminHomeworkResponse) Status() string { +func (r RemoveCommentReactionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9152,21 +17223,25 @@ func (r DeleteAdminHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteAdminHomeworkResponse) StatusCode() int { +func (r RemoveCommentReactionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAdminSuspensionsResponse struct { +type AddCommentReactionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminSuspensionsResponseSchema + JSON200 *SuccessResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListAdminSuspensionsResponse) Status() string { +func (r AddCommentReactionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9174,22 +17249,22 @@ func (r ListAdminSuspensionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminSuspensionsResponse) StatusCode() int { +func (r AddCommentReactionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateAdminSuspensionResponse struct { +type ListCoursesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminSuspensionResponseSchema + JSON200 *PaginatedCourseResponseSchema JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r CreateAdminSuspensionResponse) Status() string { +func (r ListCoursesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9197,22 +17272,23 @@ func (r CreateAdminSuspensionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateAdminSuspensionResponse) StatusCode() int { +func (r ListCoursesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateAdminSuspensionResponse struct { +type GetCourseResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminSuspensionResponseSchema + JSON200 *CourseDetailSchema + JSON400 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpdateAdminSuspensionResponse) Status() string { +func (r GetCourseResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9220,22 +17296,24 @@ func (r UpdateAdminSuspensionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateAdminSuspensionResponse) StatusCode() int { +func (r GetCourseResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListAdminUsersResponse struct { +type PinDashboardLinkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminUsersResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *DashboardLinkPinResponseSchema + JSON400 *DashboardLinkPinResponseSchema + JSON401 *DashboardLinkPinResponseSchema + JSON500 *DashboardLinkPinResponseSchema } // Status returns HTTPResponse.Status -func (r ListAdminUsersResponse) Status() string { +func (r PinDashboardLinkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9243,22 +17321,24 @@ func (r ListAdminUsersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListAdminUsersResponse) StatusCode() int { +func (r PinDashboardLinkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateAdminUserResponse struct { +type PostApiDashboardLinksPinBatchResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *AdminUserResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *DashboardLinkPinResponseSchema + JSON400 *DashboardLinkPinResponseSchema + JSON401 *OpenApiErrorSchema + JSON500 *DashboardLinkPinResponseSchema } // Status returns HTTPResponse.Status -func (r UpdateAdminUserResponse) Status() string { +func (r PostApiDashboardLinksPinBatchResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9266,22 +17346,20 @@ func (r UpdateAdminUserResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateAdminUserResponse) StatusCode() int { +func (r PostApiDashboardLinksPinBatchResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type QueryBusResponse struct { +type VisitDashboardLinkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BusQueryResponseSchema - JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r QueryBusResponse) Status() string { +func (r VisitDashboardLinkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9289,22 +17367,20 @@ func (r QueryBusResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r QueryBusResponse) StatusCode() int { +func (r VisitDashboardLinkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetBusPreferencesResponse struct { +type RecordDashboardLinkVisitResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BusPreferenceResponseSchema - JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetBusPreferencesResponse) Status() string { +func (r RecordDashboardLinkVisitResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9312,23 +17388,23 @@ func (r GetBusPreferencesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetBusPreferencesResponse) StatusCode() int { +func (r RecordDashboardLinkVisitResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetBusPreferencesResponse struct { +type GetDescriptionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *BusPreferenceResponseSchema + JSON200 *DescriptionsResponseSchema JSON400 *OpenApiErrorSchema - JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r SetBusPreferencesResponse) Status() string { +func (r GetDescriptionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9336,22 +17412,25 @@ func (r SetBusPreferencesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetBusPreferencesResponse) StatusCode() int { +func (r GetDescriptionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetCalendarSubscriptionResponse struct { +type UpsertDescriptionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CalendarSubscriptionCreateResponseSchema + JSON200 *DescriptionUpsertResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r SetCalendarSubscriptionResponse) Status() string { +func (r UpsertDescriptionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9359,22 +17438,23 @@ func (r SetCalendarSubscriptionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetCalendarSubscriptionResponse) StatusCode() int { +func (r UpsertDescriptionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCurrentCalendarSubscriptionResponse struct { +type ListHomeworksResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CurrentCalendarSubscriptionResponseSchema - JSON401 *OpenApiErrorSchema + JSON200 *HomeworksListResponseSchema + JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetCurrentCalendarSubscriptionResponse) Status() string { +func (r ListHomeworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9382,22 +17462,25 @@ func (r GetCurrentCalendarSubscriptionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentCalendarSubscriptionResponse) StatusCode() int { +func (r ListHomeworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListCommentsResponse struct { +type CreateHomeworkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CommentsListResponseSchema + JSON200 *HomeworkCreateResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListCommentsResponse) Status() string { +func (r CreateHomeworkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9405,22 +17488,23 @@ func (r ListCommentsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListCommentsResponse) StatusCode() int { +func (r CreateHomeworkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateCommentResponse struct { +type PutApiHomeworksCompletionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IdResponseSchema + JSON200 *HomeworkCompletionBatchResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r CreateCommentResponse) Status() string { +func (r PutApiHomeworksCompletionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9428,23 +17512,24 @@ func (r CreateCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateCommentResponse) StatusCode() int { +func (r PutApiHomeworksCompletionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteCommentResponse struct { +type DeleteHomeworkResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SuccessResponseSchema - JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r DeleteCommentResponse) Status() string { +func (r DeleteHomeworkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9452,22 +17537,25 @@ func (r DeleteCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteCommentResponse) StatusCode() int { +func (r DeleteHomeworkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCommentResponse struct { +type UpdateHomeworkResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CommentThreadResponseSchema + JSON200 *HomeworkUpdateResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetCommentResponse) Status() string { +func (r UpdateHomeworkResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9475,23 +17563,24 @@ func (r GetCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCommentResponse) StatusCode() int { +func (r UpdateHomeworkResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateCommentResponse struct { +type SetHomeworkCompletionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CommentUpdateResponseSchema + JSON200 *HomeworkCompletionResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpdateCommentResponse) Status() string { +func (r SetHomeworkCompletionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9499,21 +17588,22 @@ func (r UpdateCommentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateCommentResponse) StatusCode() int { +func (r SetHomeworkCompletionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type RemoveCommentReactionResponse struct { +type SetLocaleResponse struct { Body []byte HTTPResponse *http.Response JSON200 *SuccessResponseSchema + JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r RemoveCommentReactionResponse) Status() string { +func (r SetLocaleResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9521,21 +17611,22 @@ func (r RemoveCommentReactionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r RemoveCommentReactionResponse) StatusCode() int { +func (r SetLocaleResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type AddCommentReactionResponse struct { +type GetMeResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema + JSON200 *MeResponseSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r AddCommentReactionResponse) Status() string { +func (r GetMeResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9543,22 +17634,23 @@ func (r AddCommentReactionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AddCommentReactionResponse) StatusCode() int { +func (r GetMeResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListCoursesResponse struct { +type GetApiMeOverviewResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedCourseResponseSchema + JSON200 *CompactOverviewResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListCoursesResponse) Status() string { +func (r GetApiMeOverviewResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9566,22 +17658,22 @@ func (r ListCoursesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListCoursesResponse) StatusCode() int { +func (r GetApiMeOverviewResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCourseResponse struct { +type GetSubscribedHomeworksResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *CourseDetailSchema - JSON404 *OpenApiErrorSchema + JSON200 *SubscribedHomeworksResponseSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetCourseResponse) Status() string { +func (r GetSubscribedHomeworksResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9589,20 +17681,23 @@ func (r GetCourseResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCourseResponse) StatusCode() int { +func (r GetSubscribedHomeworksResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type PinDashboardLinkResponse struct { +type GetApiMeSubscriptionsSchedulesResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *SubscribedSchedulesResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r PinDashboardLinkResponse) Status() string { +func (r GetApiMeSubscriptionsSchedulesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9610,20 +17705,21 @@ func (r PinDashboardLinkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r PinDashboardLinkResponse) StatusCode() int { +func (r GetApiMeSubscriptionsSchedulesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type VisitDashboardLinkResponse struct { +type GetMetadataResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *MetadataResponseSchema } // Status returns HTTPResponse.Status -func (r VisitDashboardLinkResponse) Status() string { +func (r GetMetadataResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9631,20 +17727,21 @@ func (r VisitDashboardLinkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r VisitDashboardLinkResponse) StatusCode() int { +func (r GetMetadataResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type RecordDashboardLinkVisitResponse struct { +type GetOpenApiSpecResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *OpenApiDocumentResponseSchema } // Status returns HTTPResponse.Status -func (r RecordDashboardLinkVisitResponse) Status() string { +func (r GetOpenApiSpecResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9652,22 +17749,22 @@ func (r RecordDashboardLinkVisitResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r RecordDashboardLinkVisitResponse) StatusCode() int { +func (r GetOpenApiSpecResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetDescriptionResponse struct { +type ListSchedulesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DescriptionsResponseSchema + JSON200 *PaginatedScheduleResponseSchema JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetDescriptionResponse) Status() string { +func (r ListSchedulesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9675,22 +17772,22 @@ func (r GetDescriptionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDescriptionResponse) StatusCode() int { +func (r ListSchedulesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpsertDescriptionResponse struct { +type ListSectionsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *DescriptionUpsertResponseSchema + JSON200 *PaginatedSectionResponseSchema JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpsertDescriptionResponse) Status() string { +func (r ListSectionsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9698,22 +17795,21 @@ func (r UpsertDescriptionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpsertDescriptionResponse) StatusCode() int { +func (r ListSectionsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListHomeworksResponse struct { +type GetSectionsCalendarResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *HomeworksListResponseSchema JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListHomeworksResponse) Status() string { +func (r GetSectionsCalendarResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9721,22 +17817,23 @@ func (r ListHomeworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListHomeworksResponse) StatusCode() int { +func (r GetSectionsCalendarResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateHomeworkResponse struct { +type MatchSectionCodesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IdResponseSchema + JSON200 *MatchSectionCodesResponseSchema JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r CreateHomeworkResponse) Status() string { +func (r MatchSectionCodesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9744,23 +17841,23 @@ func (r CreateHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateHomeworkResponse) StatusCode() int { +func (r MatchSectionCodesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteHomeworkResponse struct { +type GetSectionResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema + JSON200 *SectionDetailSchema JSON400 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r DeleteHomeworkResponse) Status() string { +func (r GetSectionResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9768,22 +17865,21 @@ func (r DeleteHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteHomeworkResponse) StatusCode() int { +func (r GetSectionResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type UpdateHomeworkResponse struct { +type GetSectionCalendarResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema - JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r UpdateHomeworkResponse) Status() string { +func (r GetSectionCalendarResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9791,22 +17887,22 @@ func (r UpdateHomeworkResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateHomeworkResponse) StatusCode() int { +func (r GetSectionCalendarResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetHomeworkCompletionResponse struct { +type GetSectionScheduleGroupsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *HomeworkCompletionResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *[]map[string]interface{} + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r SetHomeworkCompletionResponse) Status() string { +func (r GetSectionScheduleGroupsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9814,22 +17910,23 @@ func (r SetHomeworkCompletionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetHomeworkCompletionResponse) StatusCode() int { +func (r GetSectionScheduleGroupsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type SetLocaleResponse struct { +type GetSectionSchedulesResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SuccessResponseSchema + JSON200 *[]map[string]interface{} JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r SetLocaleResponse) Status() string { +func (r GetSectionSchedulesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9837,22 +17934,22 @@ func (r SetLocaleResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r SetLocaleResponse) StatusCode() int { +func (r GetSectionSchedulesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetMeResponse struct { +type ListSemestersResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MeResponseSchema - JSON401 *OpenApiErrorSchema + JSON200 *PaginatedSemesterResponseSchema + JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetMeResponse) Status() string { +func (r ListSemestersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9860,22 +17957,22 @@ func (r GetMeResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMeResponse) StatusCode() int { +func (r ListSemestersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSubscribedHomeworksResponse struct { +type GetCurrentSemesterResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SubscribedHomeworksResponseSchema - JSON401 *OpenApiErrorSchema + JSON200 *SemesterSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSubscribedHomeworksResponse) Status() string { +func (r GetCurrentSemesterResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9883,21 +17980,22 @@ func (r GetSubscribedHomeworksResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSubscribedHomeworksResponse) StatusCode() int { +func (r GetCurrentSemesterResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetMetadataResponse struct { +type ListTeachersResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MetadataResponseSchema + JSON200 *PaginatedTeacherResponseSchema + JSON400 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetMetadataResponse) Status() string { +func (r ListTeachersResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9905,21 +18003,23 @@ func (r GetMetadataResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetMetadataResponse) StatusCode() int { +func (r ListTeachersResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetOpenApiSpecResponse struct { +type GetTeacherResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *OpenApiDocumentResponseSchema + JSON200 *TeacherDetailSchema + JSON400 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetOpenApiSpecResponse) Status() string { +func (r GetTeacherResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9927,22 +18027,23 @@ func (r GetOpenApiSpecResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetOpenApiSpecResponse) StatusCode() int { +func (r GetTeacherResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSchedulesResponse struct { +type ListTodosResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedScheduleResponseSchema + JSON200 *TodosListResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListSchedulesResponse) Status() string { +func (r ListTodosResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9950,22 +18051,23 @@ func (r ListSchedulesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSchedulesResponse) StatusCode() int { +func (r ListTodosResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSectionsResponse struct { +type CreateTodoResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedSectionResponseSchema + JSON200 *IdResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListSectionsResponse) Status() string { +func (r CreateTodoResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9973,21 +18075,23 @@ func (r ListSectionsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSectionsResponse) StatusCode() int { +func (r CreateTodoResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionsCalendarResponse struct { +type DeleteApiTodosBatchResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *TodoBatchDeleteResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionsCalendarResponse) Status() string { +func (r DeleteApiTodosBatchResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -9995,22 +18099,23 @@ func (r GetSectionsCalendarResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionsCalendarResponse) StatusCode() int { +func (r DeleteApiTodosBatchResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type MatchSectionCodesResponse struct { +type PatchApiTodosBatchResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *MatchSectionCodesResponseSchema + JSON200 *TodoCompletionBatchResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r MatchSectionCodesResponse) Status() string { +func (r PatchApiTodosBatchResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10018,22 +18123,24 @@ func (r MatchSectionCodesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r MatchSectionCodesResponse) StatusCode() int { +func (r PatchApiTodosBatchResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionResponse struct { +type DeleteTodoResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SectionDetailSchema + JSON200 *SuccessResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionResponse) Status() string { +func (r DeleteTodoResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10041,21 +18148,25 @@ func (r GetSectionResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionResponse) StatusCode() int { +func (r DeleteTodoResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionCalendarResponse struct { +type UpdateTodoResponse struct { Body []byte HTTPResponse *http.Response + JSON200 *TodoUpdateResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionCalendarResponse) Status() string { +func (r UpdateTodoResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10063,22 +18174,22 @@ func (r GetSectionCalendarResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionCalendarResponse) StatusCode() int { +func (r UpdateTodoResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionScheduleGroupsResponse struct { +type ListUploadsResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]interface{} - JSON404 *OpenApiErrorSchema + JSON200 *UploadsListResponseSchema + JSON401 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionScheduleGroupsResponse) Status() string { +func (r ListUploadsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10086,22 +18197,25 @@ func (r GetSectionScheduleGroupsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionScheduleGroupsResponse) StatusCode() int { +func (r ListUploadsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetSectionSchedulesResponse struct { +type CreateUploadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *[]interface{} - JSON404 *OpenApiErrorSchema + JSON200 *UploadCreateResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON413 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetSectionSchedulesResponse) Status() string { +func (r CreateUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10109,22 +18223,24 @@ func (r GetSectionSchedulesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetSectionSchedulesResponse) StatusCode() int { +func (r CreateUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListSemestersResponse struct { +type CompleteUploadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedSemesterResponseSchema + JSON200 *UploadCompleteResponseSchema JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListSemestersResponse) Status() string { +func (r CompleteUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10132,22 +18248,25 @@ func (r ListSemestersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListSemestersResponse) StatusCode() int { +func (r CompleteUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetCurrentSemesterResponse struct { +type PutApiUploadsObjectResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *SemesterSchema - JSON404 *OpenApiErrorSchema + JSON200 *SuccessResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON413 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetCurrentSemesterResponse) Status() string { +func (r PutApiUploadsObjectResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10155,22 +18274,25 @@ func (r GetCurrentSemesterResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetCurrentSemesterResponse) StatusCode() int { +func (r PutApiUploadsObjectResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListTeachersResponse struct { +type DeleteUploadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *PaginatedTeacherResponseSchema - JSON400 *OpenApiErrorSchema + JSON200 *UploadDeleteResponseSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema + JSON502 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListTeachersResponse) Status() string { +func (r DeleteUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10178,22 +18300,25 @@ func (r ListTeachersResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTeachersResponse) StatusCode() int { +func (r DeleteUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type GetTeacherResponse struct { +type UpdateUploadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *TeacherDetailSchema + JSON200 *UploadRenameResponseSchema + JSON400 *OpenApiErrorSchema + JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r GetTeacherResponse) Status() string { +func (r UpdateUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10201,22 +18326,22 @@ func (r GetTeacherResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetTeacherResponse) StatusCode() int { +func (r UpdateUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type ListTodosResponse struct { +type DownloadUploadResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *TodosListResponseSchema JSON401 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r ListTodosResponse) Status() string { +func (r DownloadUploadResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10224,23 +18349,23 @@ func (r ListTodosResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListTodosResponse) StatusCode() int { +func (r DownloadUploadResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type CreateTodoResponse struct { +type GetUserCalendarResponse struct { Body []byte HTTPResponse *http.Response - JSON200 *IdResponseSchema - JSON400 *OpenApiErrorSchema JSON401 *OpenApiErrorSchema + JSON403 *OpenApiErrorSchema + JSON404 *OpenApiErrorSchema } // Status returns HTTPResponse.Status -func (r CreateTodoResponse) Status() string { +func (r GetUserCalendarResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -10248,1007 +18373,1490 @@ func (r CreateTodoResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateTodoResponse) StatusCode() int { +func (r GetUserCalendarResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } return 0 } -type DeleteTodoResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SuccessResponseSchema - JSON400 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema +// ListAdminCommentsWithResponse request returning *ListAdminCommentsResponse +func (c *ClientWithResponses) ListAdminCommentsWithResponse(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*ListAdminCommentsResponse, error) { + rsp, err := c.ListAdminComments(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAdminCommentsResponse(rsp) +} + +// ModerateAdminCommentWithBodyWithResponse request with arbitrary body returning *ModerateAdminCommentResponse +func (c *ClientWithResponses) ModerateAdminCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) { + rsp, err := c.ModerateAdminCommentWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseModerateAdminCommentResponse(rsp) +} + +func (c *ClientWithResponses) ModerateAdminCommentWithResponse(ctx context.Context, id string, body ModerateAdminCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) { + rsp, err := c.ModerateAdminComment(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseModerateAdminCommentResponse(rsp) +} + +// ListAdminDescriptionsWithResponse request returning *ListAdminDescriptionsResponse +func (c *ClientWithResponses) ListAdminDescriptionsWithResponse(ctx context.Context, params *ListAdminDescriptionsParams, reqEditors ...RequestEditorFn) (*ListAdminDescriptionsResponse, error) { + rsp, err := c.ListAdminDescriptions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAdminDescriptionsResponse(rsp) +} + +// UpdateAdminDescriptionWithBodyWithResponse request with arbitrary body returning *UpdateAdminDescriptionResponse +func (c *ClientWithResponses) UpdateAdminDescriptionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminDescriptionResponse, error) { + rsp, err := c.UpdateAdminDescriptionWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAdminDescriptionResponse(rsp) +} + +func (c *ClientWithResponses) UpdateAdminDescriptionWithResponse(ctx context.Context, id string, body UpdateAdminDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminDescriptionResponse, error) { + rsp, err := c.UpdateAdminDescription(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAdminDescriptionResponse(rsp) +} + +// ListAdminHomeworksWithResponse request returning *ListAdminHomeworksResponse +func (c *ClientWithResponses) ListAdminHomeworksWithResponse(ctx context.Context, params *ListAdminHomeworksParams, reqEditors ...RequestEditorFn) (*ListAdminHomeworksResponse, error) { + rsp, err := c.ListAdminHomeworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAdminHomeworksResponse(rsp) +} + +// DeleteAdminHomeworkWithResponse request returning *DeleteAdminHomeworkResponse +func (c *ClientWithResponses) DeleteAdminHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAdminHomeworkResponse, error) { + rsp, err := c.DeleteAdminHomework(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAdminHomeworkResponse(rsp) +} + +// ListAdminSuspensionsWithResponse request returning *ListAdminSuspensionsResponse +func (c *ClientWithResponses) ListAdminSuspensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminSuspensionsResponse, error) { + rsp, err := c.ListAdminSuspensions(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAdminSuspensionsResponse(rsp) +} + +// CreateAdminSuspensionWithBodyWithResponse request with arbitrary body returning *CreateAdminSuspensionResponse +func (c *ClientWithResponses) CreateAdminSuspensionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) { + rsp, err := c.CreateAdminSuspensionWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAdminSuspensionResponse(rsp) +} + +func (c *ClientWithResponses) CreateAdminSuspensionWithResponse(ctx context.Context, body CreateAdminSuspensionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) { + rsp, err := c.CreateAdminSuspension(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseCreateAdminSuspensionResponse(rsp) +} + +// UpdateAdminSuspensionWithResponse request returning *UpdateAdminSuspensionResponse +func (c *ClientWithResponses) UpdateAdminSuspensionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UpdateAdminSuspensionResponse, error) { + rsp, err := c.UpdateAdminSuspension(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAdminSuspensionResponse(rsp) +} + +// ListAdminUsersWithResponse request returning *ListAdminUsersResponse +func (c *ClientWithResponses) ListAdminUsersWithResponse(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*ListAdminUsersResponse, error) { + rsp, err := c.ListAdminUsers(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListAdminUsersResponse(rsp) +} + +// UpdateAdminUserWithBodyWithResponse request with arbitrary body returning *UpdateAdminUserResponse +func (c *ClientWithResponses) UpdateAdminUserWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) { + rsp, err := c.UpdateAdminUserWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAdminUserResponse(rsp) +} + +func (c *ClientWithResponses) UpdateAdminUserWithResponse(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) { + rsp, err := c.UpdateAdminUser(ctx, id, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseUpdateAdminUserResponse(rsp) +} + +// QueryBusWithResponse request returning *QueryBusResponse +func (c *ClientWithResponses) QueryBusWithResponse(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*QueryBusResponse, error) { + rsp, err := c.QueryBus(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseQueryBusResponse(rsp) +} + +// GetApiBusNextWithResponse request returning *GetApiBusNextResponse +func (c *ClientWithResponses) GetApiBusNextWithResponse(ctx context.Context, params *GetApiBusNextParams, reqEditors ...RequestEditorFn) (*GetApiBusNextResponse, error) { + rsp, err := c.GetApiBusNext(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiBusNextResponse(rsp) +} + +// GetBusPreferencesWithResponse request returning *GetBusPreferencesResponse +func (c *ClientWithResponses) GetBusPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBusPreferencesResponse, error) { + rsp, err := c.GetBusPreferences(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetBusPreferencesResponse(rsp) +} + +// SetBusPreferencesWithBodyWithResponse request with arbitrary body returning *SetBusPreferencesResponse +func (c *ClientWithResponses) SetBusPreferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) { + rsp, err := c.SetBusPreferencesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetBusPreferencesResponse(rsp) +} + +func (c *ClientWithResponses) SetBusPreferencesWithResponse(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) { + rsp, err := c.SetBusPreferences(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetBusPreferencesResponse(rsp) +} + +// GetApiBusRoutesWithResponse request returning *GetApiBusRoutesResponse +func (c *ClientWithResponses) GetApiBusRoutesWithResponse(ctx context.Context, params *GetApiBusRoutesParams, reqEditors ...RequestEditorFn) (*GetApiBusRoutesResponse, error) { + rsp, err := c.GetApiBusRoutes(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetApiBusRoutesResponse(rsp) +} + +// DeleteApiCalendarSubscriptionsWithBodyWithResponse request with arbitrary body returning *DeleteApiCalendarSubscriptionsResponse +func (c *ClientWithResponses) DeleteApiCalendarSubscriptionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiCalendarSubscriptionsResponse, error) { + rsp, err := c.DeleteApiCalendarSubscriptionsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiCalendarSubscriptionsResponse(rsp) +} + +func (c *ClientWithResponses) DeleteApiCalendarSubscriptionsWithResponse(ctx context.Context, body DeleteApiCalendarSubscriptionsJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiCalendarSubscriptionsResponse, error) { + rsp, err := c.DeleteApiCalendarSubscriptions(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiCalendarSubscriptionsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r DeleteTodoResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// AppendCalendarSubscriptionSectionsWithBodyWithResponse request with arbitrary body returning *AppendCalendarSubscriptionSectionsResponse +func (c *ClientWithResponses) AppendCalendarSubscriptionSectionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AppendCalendarSubscriptionSectionsResponse, error) { + rsp, err := c.AppendCalendarSubscriptionSectionsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseAppendCalendarSubscriptionSectionsResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTodoResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) AppendCalendarSubscriptionSectionsWithResponse(ctx context.Context, body AppendCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*AppendCalendarSubscriptionSectionsResponse, error) { + rsp, err := c.AppendCalendarSubscriptionSections(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseAppendCalendarSubscriptionSectionsResponse(rsp) } -type UpdateTodoResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *SuccessResponseSchema - JSON400 *OpenApiErrorSchema +// SetCalendarSubscriptionWithBodyWithResponse request with arbitrary body returning *SetCalendarSubscriptionResponse +func (c *ClientWithResponses) SetCalendarSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) { + rsp, err := c.SetCalendarSubscriptionWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseSetCalendarSubscriptionResponse(rsp) } -// Status returns HTTPResponse.Status -func (r UpdateTodoResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +func (c *ClientWithResponses) SetCalendarSubscriptionWithResponse(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) { + rsp, err := c.SetCalendarSubscription(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseSetCalendarSubscriptionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateTodoResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// BatchUpdateCalendarSubscriptionWithBodyWithResponse request with arbitrary body returning *BatchUpdateCalendarSubscriptionResponse +func (c *ClientWithResponses) BatchUpdateCalendarSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BatchUpdateCalendarSubscriptionResponse, error) { + rsp, err := c.BatchUpdateCalendarSubscriptionWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseBatchUpdateCalendarSubscriptionResponse(rsp) } -type ListUploadsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadsListResponseSchema +func (c *ClientWithResponses) BatchUpdateCalendarSubscriptionWithResponse(ctx context.Context, body BatchUpdateCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*BatchUpdateCalendarSubscriptionResponse, error) { + rsp, err := c.BatchUpdateCalendarSubscription(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseBatchUpdateCalendarSubscriptionResponse(rsp) } -// Status returns HTTPResponse.Status -func (r ListUploadsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// GetCurrentCalendarSubscriptionWithResponse request returning *GetCurrentCalendarSubscriptionResponse +func (c *ClientWithResponses) GetCurrentCalendarSubscriptionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentCalendarSubscriptionResponse, error) { + rsp, err := c.GetCurrentCalendarSubscription(ctx, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseGetCurrentCalendarSubscriptionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r ListUploadsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// PostApiCalendarSubscriptionsImportCodesWithBodyWithResponse request with arbitrary body returning *PostApiCalendarSubscriptionsImportCodesResponse +func (c *ClientWithResponses) PostApiCalendarSubscriptionsImportCodesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiCalendarSubscriptionsImportCodesResponse, error) { + rsp, err := c.PostApiCalendarSubscriptionsImportCodesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParsePostApiCalendarSubscriptionsImportCodesResponse(rsp) } -type CreateUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadCreateResponseSchema - JSON400 *OpenApiErrorSchema +func (c *ClientWithResponses) PostApiCalendarSubscriptionsImportCodesWithResponse(ctx context.Context, body PostApiCalendarSubscriptionsImportCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiCalendarSubscriptionsImportCodesResponse, error) { + rsp, err := c.PostApiCalendarSubscriptionsImportCodes(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostApiCalendarSubscriptionsImportCodesResponse(rsp) } -// Status returns HTTPResponse.Status -func (r CreateUploadResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// QueryCalendarSubscriptionSectionsWithBodyWithResponse request with arbitrary body returning *QueryCalendarSubscriptionSectionsResponse +func (c *ClientWithResponses) QueryCalendarSubscriptionSectionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryCalendarSubscriptionSectionsResponse, error) { + rsp, err := c.QueryCalendarSubscriptionSectionsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseQueryCalendarSubscriptionSectionsResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CreateUploadResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) QueryCalendarSubscriptionSectionsWithResponse(ctx context.Context, body QueryCalendarSubscriptionSectionsJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryCalendarSubscriptionSectionsResponse, error) { + rsp, err := c.QueryCalendarSubscriptionSections(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseQueryCalendarSubscriptionSectionsResponse(rsp) } -type CompleteUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadCompleteResponseSchema - JSON400 *OpenApiErrorSchema +// ListCommentsWithResponse request returning *ListCommentsResponse +func (c *ClientWithResponses) ListCommentsWithResponse(ctx context.Context, params *ListCommentsParams, reqEditors ...RequestEditorFn) (*ListCommentsResponse, error) { + rsp, err := c.ListComments(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListCommentsResponse(rsp) } -// Status returns HTTPResponse.Status -func (r CompleteUploadResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// CreateCommentWithBodyWithResponse request with arbitrary body returning *CreateCommentResponse +func (c *ClientWithResponses) CreateCommentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) { + rsp, err := c.CreateCommentWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseCreateCommentResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r CompleteUploadResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) CreateCommentWithResponse(ctx context.Context, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) { + rsp, err := c.CreateComment(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseCreateCommentResponse(rsp) } -type DeleteUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadDeleteResponseSchema - JSON400 *OpenApiErrorSchema - JSON401 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema +// DeleteApiCommentsBatchWithBodyWithResponse request with arbitrary body returning *DeleteApiCommentsBatchResponse +func (c *ClientWithResponses) DeleteApiCommentsBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiCommentsBatchResponse, error) { + rsp, err := c.DeleteApiCommentsBatchWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteApiCommentsBatchResponse(rsp) } -// Status returns HTTPResponse.Status -func (r DeleteUploadResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +func (c *ClientWithResponses) DeleteApiCommentsBatchWithResponse(ctx context.Context, body DeleteApiCommentsBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiCommentsBatchResponse, error) { + rsp, err := c.DeleteApiCommentsBatch(ctx, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseDeleteApiCommentsBatchResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteUploadResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// DeleteCommentWithResponse request returning *DeleteCommentResponse +func (c *ClientWithResponses) DeleteCommentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) { + rsp, err := c.DeleteComment(ctx, id, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseDeleteCommentResponse(rsp) } -type UpdateUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *UploadRenameResponseSchema - JSON400 *OpenApiErrorSchema - JSON401 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema +// GetCommentWithResponse request returning *GetCommentResponse +func (c *ClientWithResponses) GetCommentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetCommentResponse, error) { + rsp, err := c.GetComment(ctx, id, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCommentResponse(rsp) } -// Status returns HTTPResponse.Status -func (r UpdateUploadResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// UpdateCommentWithBodyWithResponse request with arbitrary body returning *UpdateCommentResponse +func (c *ClientWithResponses) UpdateCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) { + rsp, err := c.UpdateCommentWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseUpdateCommentResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r UpdateUploadResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) UpdateCommentWithResponse(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) { + rsp, err := c.UpdateComment(ctx, id, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseUpdateCommentResponse(rsp) } -type DownloadUploadResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema +// RemoveCommentReactionWithResponse request returning *RemoveCommentReactionResponse +func (c *ClientWithResponses) RemoveCommentReactionWithResponse(ctx context.Context, id string, params *RemoveCommentReactionParams, reqEditors ...RequestEditorFn) (*RemoveCommentReactionResponse, error) { + rsp, err := c.RemoveCommentReaction(ctx, id, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseRemoveCommentReactionResponse(rsp) } -// Status returns HTTPResponse.Status -func (r DownloadUploadResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// AddCommentReactionWithBodyWithResponse request with arbitrary body returning *AddCommentReactionResponse +func (c *ClientWithResponses) AddCommentReactionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) { + rsp, err := c.AddCommentReactionWithBody(ctx, id, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseAddCommentReactionResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r DownloadUploadResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +func (c *ClientWithResponses) AddCommentReactionWithResponse(ctx context.Context, id string, body AddCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) { + rsp, err := c.AddCommentReaction(ctx, id, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParseAddCommentReactionResponse(rsp) } -type GetUserCalendarResponse struct { - Body []byte - HTTPResponse *http.Response - JSON401 *OpenApiErrorSchema - JSON403 *OpenApiErrorSchema - JSON404 *OpenApiErrorSchema +// ListCoursesWithResponse request returning *ListCoursesResponse +func (c *ClientWithResponses) ListCoursesWithResponse(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*ListCoursesResponse, error) { + rsp, err := c.ListCourses(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseListCoursesResponse(rsp) } -// Status returns HTTPResponse.Status -func (r GetUserCalendarResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status +// GetCourseWithResponse request returning *GetCourseResponse +func (c *ClientWithResponses) GetCourseWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetCourseResponse, error) { + rsp, err := c.GetCourse(ctx, jwId, reqEditors...) + if err != nil { + return nil, err } - return http.StatusText(0) + return ParseGetCourseResponse(rsp) } -// StatusCode returns HTTPResponse.StatusCode -func (r GetUserCalendarResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode +// PinDashboardLinkWithBodyWithResponse request with arbitrary body returning *PinDashboardLinkResponse +func (c *ClientWithResponses) PinDashboardLinkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) { + rsp, err := c.PinDashboardLinkWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err } - return 0 + return ParsePinDashboardLinkResponse(rsp) } -// ListAdminCommentsWithResponse request returning *ListAdminCommentsResponse -func (c *ClientWithResponses) ListAdminCommentsWithResponse(ctx context.Context, params *ListAdminCommentsParams, reqEditors ...RequestEditorFn) (*ListAdminCommentsResponse, error) { - rsp, err := c.ListAdminComments(ctx, params, reqEditors...) +func (c *ClientWithResponses) PinDashboardLinkWithFormdataBodyWithResponse(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) { + rsp, err := c.PinDashboardLinkWithFormdataBody(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseListAdminCommentsResponse(rsp) + return ParsePinDashboardLinkResponse(rsp) } -// ModerateAdminCommentWithBodyWithResponse request with arbitrary body returning *ModerateAdminCommentResponse -func (c *ClientWithResponses) ModerateAdminCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) { - rsp, err := c.ModerateAdminCommentWithBody(ctx, id, contentType, body, reqEditors...) +// PostApiDashboardLinksPinBatchWithBodyWithResponse request with arbitrary body returning *PostApiDashboardLinksPinBatchResponse +func (c *ClientWithResponses) PostApiDashboardLinksPinBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostApiDashboardLinksPinBatchResponse, error) { + rsp, err := c.PostApiDashboardLinksPinBatchWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseModerateAdminCommentResponse(rsp) + return ParsePostApiDashboardLinksPinBatchResponse(rsp) } -func (c *ClientWithResponses) ModerateAdminCommentWithResponse(ctx context.Context, id string, body ModerateAdminCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*ModerateAdminCommentResponse, error) { - rsp, err := c.ModerateAdminComment(ctx, id, body, reqEditors...) +func (c *ClientWithResponses) PostApiDashboardLinksPinBatchWithResponse(ctx context.Context, body PostApiDashboardLinksPinBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PostApiDashboardLinksPinBatchResponse, error) { + rsp, err := c.PostApiDashboardLinksPinBatch(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseModerateAdminCommentResponse(rsp) + return ParsePostApiDashboardLinksPinBatchResponse(rsp) } -// ListAdminDescriptionsWithResponse request returning *ListAdminDescriptionsResponse -func (c *ClientWithResponses) ListAdminDescriptionsWithResponse(ctx context.Context, params *ListAdminDescriptionsParams, reqEditors ...RequestEditorFn) (*ListAdminDescriptionsResponse, error) { - rsp, err := c.ListAdminDescriptions(ctx, params, reqEditors...) +// VisitDashboardLinkWithResponse request returning *VisitDashboardLinkResponse +func (c *ClientWithResponses) VisitDashboardLinkWithResponse(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*VisitDashboardLinkResponse, error) { + rsp, err := c.VisitDashboardLink(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseListAdminDescriptionsResponse(rsp) + return ParseVisitDashboardLinkResponse(rsp) } -// ListAdminHomeworksWithResponse request returning *ListAdminHomeworksResponse -func (c *ClientWithResponses) ListAdminHomeworksWithResponse(ctx context.Context, params *ListAdminHomeworksParams, reqEditors ...RequestEditorFn) (*ListAdminHomeworksResponse, error) { - rsp, err := c.ListAdminHomeworks(ctx, params, reqEditors...) +// RecordDashboardLinkVisitWithBodyWithResponse request with arbitrary body returning *RecordDashboardLinkVisitResponse +func (c *ClientWithResponses) RecordDashboardLinkVisitWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) { + rsp, err := c.RecordDashboardLinkVisitWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseListAdminHomeworksResponse(rsp) + return ParseRecordDashboardLinkVisitResponse(rsp) } -// DeleteAdminHomeworkWithResponse request returning *DeleteAdminHomeworkResponse -func (c *ClientWithResponses) DeleteAdminHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteAdminHomeworkResponse, error) { - rsp, err := c.DeleteAdminHomework(ctx, id, reqEditors...) +func (c *ClientWithResponses) RecordDashboardLinkVisitWithFormdataBodyWithResponse(ctx context.Context, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) { + rsp, err := c.RecordDashboardLinkVisitWithFormdataBody(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteAdminHomeworkResponse(rsp) + return ParseRecordDashboardLinkVisitResponse(rsp) } -// ListAdminSuspensionsWithResponse request returning *ListAdminSuspensionsResponse -func (c *ClientWithResponses) ListAdminSuspensionsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListAdminSuspensionsResponse, error) { - rsp, err := c.ListAdminSuspensions(ctx, reqEditors...) +// GetDescriptionWithResponse request returning *GetDescriptionResponse +func (c *ClientWithResponses) GetDescriptionWithResponse(ctx context.Context, params *GetDescriptionParams, reqEditors ...RequestEditorFn) (*GetDescriptionResponse, error) { + rsp, err := c.GetDescription(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseListAdminSuspensionsResponse(rsp) + return ParseGetDescriptionResponse(rsp) } -// CreateAdminSuspensionWithBodyWithResponse request with arbitrary body returning *CreateAdminSuspensionResponse -func (c *ClientWithResponses) CreateAdminSuspensionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) { - rsp, err := c.CreateAdminSuspensionWithBody(ctx, contentType, body, reqEditors...) +// UpsertDescriptionWithBodyWithResponse request with arbitrary body returning *UpsertDescriptionResponse +func (c *ClientWithResponses) UpsertDescriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) { + rsp, err := c.UpsertDescriptionWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateAdminSuspensionResponse(rsp) + return ParseUpsertDescriptionResponse(rsp) } -func (c *ClientWithResponses) CreateAdminSuspensionWithResponse(ctx context.Context, body CreateAdminSuspensionJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAdminSuspensionResponse, error) { - rsp, err := c.CreateAdminSuspension(ctx, body, reqEditors...) +func (c *ClientWithResponses) UpsertDescriptionWithResponse(ctx context.Context, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) { + rsp, err := c.UpsertDescription(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateAdminSuspensionResponse(rsp) + return ParseUpsertDescriptionResponse(rsp) } -// UpdateAdminSuspensionWithResponse request returning *UpdateAdminSuspensionResponse -func (c *ClientWithResponses) UpdateAdminSuspensionWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*UpdateAdminSuspensionResponse, error) { - rsp, err := c.UpdateAdminSuspension(ctx, id, reqEditors...) +// ListHomeworksWithResponse request returning *ListHomeworksResponse +func (c *ClientWithResponses) ListHomeworksWithResponse(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*ListHomeworksResponse, error) { + rsp, err := c.ListHomeworks(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseUpdateAdminSuspensionResponse(rsp) + return ParseListHomeworksResponse(rsp) } -// ListAdminUsersWithResponse request returning *ListAdminUsersResponse -func (c *ClientWithResponses) ListAdminUsersWithResponse(ctx context.Context, params *ListAdminUsersParams, reqEditors ...RequestEditorFn) (*ListAdminUsersResponse, error) { - rsp, err := c.ListAdminUsers(ctx, params, reqEditors...) +// CreateHomeworkWithBodyWithResponse request with arbitrary body returning *CreateHomeworkResponse +func (c *ClientWithResponses) CreateHomeworkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) { + rsp, err := c.CreateHomeworkWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseListAdminUsersResponse(rsp) + return ParseCreateHomeworkResponse(rsp) } -// UpdateAdminUserWithBodyWithResponse request with arbitrary body returning *UpdateAdminUserResponse -func (c *ClientWithResponses) UpdateAdminUserWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) { - rsp, err := c.UpdateAdminUserWithBody(ctx, id, contentType, body, reqEditors...) +func (c *ClientWithResponses) CreateHomeworkWithResponse(ctx context.Context, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) { + rsp, err := c.CreateHomework(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateAdminUserResponse(rsp) + return ParseCreateHomeworkResponse(rsp) } -func (c *ClientWithResponses) UpdateAdminUserWithResponse(ctx context.Context, id string, body UpdateAdminUserJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAdminUserResponse, error) { - rsp, err := c.UpdateAdminUser(ctx, id, body, reqEditors...) +// PutApiHomeworksCompletionsWithBodyWithResponse request with arbitrary body returning *PutApiHomeworksCompletionsResponse +func (c *ClientWithResponses) PutApiHomeworksCompletionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiHomeworksCompletionsResponse, error) { + rsp, err := c.PutApiHomeworksCompletionsWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateAdminUserResponse(rsp) + return ParsePutApiHomeworksCompletionsResponse(rsp) } -// QueryBusWithResponse request returning *QueryBusResponse -func (c *ClientWithResponses) QueryBusWithResponse(ctx context.Context, params *QueryBusParams, reqEditors ...RequestEditorFn) (*QueryBusResponse, error) { - rsp, err := c.QueryBus(ctx, params, reqEditors...) +func (c *ClientWithResponses) PutApiHomeworksCompletionsWithResponse(ctx context.Context, body PutApiHomeworksCompletionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PutApiHomeworksCompletionsResponse, error) { + rsp, err := c.PutApiHomeworksCompletions(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseQueryBusResponse(rsp) + return ParsePutApiHomeworksCompletionsResponse(rsp) } -// GetBusPreferencesWithResponse request returning *GetBusPreferencesResponse -func (c *ClientWithResponses) GetBusPreferencesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetBusPreferencesResponse, error) { - rsp, err := c.GetBusPreferences(ctx, reqEditors...) +// DeleteHomeworkWithResponse request returning *DeleteHomeworkResponse +func (c *ClientWithResponses) DeleteHomeworkWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) { + rsp, err := c.DeleteHomework(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseGetBusPreferencesResponse(rsp) + return ParseDeleteHomeworkResponse(rsp) } -// SetBusPreferencesWithBodyWithResponse request with arbitrary body returning *SetBusPreferencesResponse -func (c *ClientWithResponses) SetBusPreferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) { - rsp, err := c.SetBusPreferencesWithBody(ctx, contentType, body, reqEditors...) +// UpdateHomeworkWithBodyWithResponse request with arbitrary body returning *UpdateHomeworkResponse +func (c *ClientWithResponses) UpdateHomeworkWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) { + rsp, err := c.UpdateHomeworkWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseSetBusPreferencesResponse(rsp) + return ParseUpdateHomeworkResponse(rsp) } -func (c *ClientWithResponses) SetBusPreferencesWithResponse(ctx context.Context, body SetBusPreferencesJSONRequestBody, reqEditors ...RequestEditorFn) (*SetBusPreferencesResponse, error) { - rsp, err := c.SetBusPreferences(ctx, body, reqEditors...) +func (c *ClientWithResponses) UpdateHomeworkWithResponse(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) { + rsp, err := c.UpdateHomework(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseSetBusPreferencesResponse(rsp) + return ParseUpdateHomeworkResponse(rsp) } -// SetCalendarSubscriptionWithBodyWithResponse request with arbitrary body returning *SetCalendarSubscriptionResponse -func (c *ClientWithResponses) SetCalendarSubscriptionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) { - rsp, err := c.SetCalendarSubscriptionWithBody(ctx, contentType, body, reqEditors...) +// SetHomeworkCompletionWithBodyWithResponse request with arbitrary body returning *SetHomeworkCompletionResponse +func (c *ClientWithResponses) SetHomeworkCompletionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) { + rsp, err := c.SetHomeworkCompletionWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseSetCalendarSubscriptionResponse(rsp) + return ParseSetHomeworkCompletionResponse(rsp) } -func (c *ClientWithResponses) SetCalendarSubscriptionWithResponse(ctx context.Context, body SetCalendarSubscriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetCalendarSubscriptionResponse, error) { - rsp, err := c.SetCalendarSubscription(ctx, body, reqEditors...) +func (c *ClientWithResponses) SetHomeworkCompletionWithResponse(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) { + rsp, err := c.SetHomeworkCompletion(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseSetCalendarSubscriptionResponse(rsp) + return ParseSetHomeworkCompletionResponse(rsp) } -// GetCurrentCalendarSubscriptionWithResponse request returning *GetCurrentCalendarSubscriptionResponse -func (c *ClientWithResponses) GetCurrentCalendarSubscriptionWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentCalendarSubscriptionResponse, error) { - rsp, err := c.GetCurrentCalendarSubscription(ctx, reqEditors...) +// SetLocaleWithBodyWithResponse request with arbitrary body returning *SetLocaleResponse +func (c *ClientWithResponses) SetLocaleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) { + rsp, err := c.SetLocaleWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetCurrentCalendarSubscriptionResponse(rsp) + return ParseSetLocaleResponse(rsp) } -// ListCommentsWithResponse request returning *ListCommentsResponse -func (c *ClientWithResponses) ListCommentsWithResponse(ctx context.Context, params *ListCommentsParams, reqEditors ...RequestEditorFn) (*ListCommentsResponse, error) { - rsp, err := c.ListComments(ctx, params, reqEditors...) +func (c *ClientWithResponses) SetLocaleWithResponse(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) { + rsp, err := c.SetLocale(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseListCommentsResponse(rsp) + return ParseSetLocaleResponse(rsp) } -// CreateCommentWithBodyWithResponse request with arbitrary body returning *CreateCommentResponse -func (c *ClientWithResponses) CreateCommentWithBodyWithResponse(ctx context.Context, params *CreateCommentParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) { - rsp, err := c.CreateCommentWithBody(ctx, params, contentType, body, reqEditors...) +// GetMeWithResponse request returning *GetMeResponse +func (c *ClientWithResponses) GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, error) { + rsp, err := c.GetMe(ctx, reqEditors...) if err != nil { return nil, err } - return ParseCreateCommentResponse(rsp) + return ParseGetMeResponse(rsp) } -func (c *ClientWithResponses) CreateCommentWithResponse(ctx context.Context, params *CreateCommentParams, body CreateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateCommentResponse, error) { - rsp, err := c.CreateComment(ctx, params, body, reqEditors...) +// GetApiMeOverviewWithResponse request returning *GetApiMeOverviewResponse +func (c *ClientWithResponses) GetApiMeOverviewWithResponse(ctx context.Context, params *GetApiMeOverviewParams, reqEditors ...RequestEditorFn) (*GetApiMeOverviewResponse, error) { + rsp, err := c.GetApiMeOverview(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseCreateCommentResponse(rsp) + return ParseGetApiMeOverviewResponse(rsp) } -// DeleteCommentWithBodyWithResponse request with arbitrary body returning *DeleteCommentResponse -func (c *ClientWithResponses) DeleteCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) { - rsp, err := c.DeleteCommentWithBody(ctx, id, contentType, body, reqEditors...) +// GetSubscribedHomeworksWithResponse request returning *GetSubscribedHomeworksResponse +func (c *ClientWithResponses) GetSubscribedHomeworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSubscribedHomeworksResponse, error) { + rsp, err := c.GetSubscribedHomeworks(ctx, reqEditors...) if err != nil { return nil, err } - return ParseDeleteCommentResponse(rsp) + return ParseGetSubscribedHomeworksResponse(rsp) } -func (c *ClientWithResponses) DeleteCommentWithResponse(ctx context.Context, id string, body DeleteCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteCommentResponse, error) { - rsp, err := c.DeleteComment(ctx, id, body, reqEditors...) +// GetApiMeSubscriptionsSchedulesWithResponse request returning *GetApiMeSubscriptionsSchedulesResponse +func (c *ClientWithResponses) GetApiMeSubscriptionsSchedulesWithResponse(ctx context.Context, params *GetApiMeSubscriptionsSchedulesParams, reqEditors ...RequestEditorFn) (*GetApiMeSubscriptionsSchedulesResponse, error) { + rsp, err := c.GetApiMeSubscriptionsSchedules(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseDeleteCommentResponse(rsp) + return ParseGetApiMeSubscriptionsSchedulesResponse(rsp) } -// GetCommentWithResponse request returning *GetCommentResponse -func (c *ClientWithResponses) GetCommentWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetCommentResponse, error) { - rsp, err := c.GetComment(ctx, id, reqEditors...) +// GetMetadataWithResponse request returning *GetMetadataResponse +func (c *ClientWithResponses) GetMetadataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetadataResponse, error) { + rsp, err := c.GetMetadata(ctx, reqEditors...) if err != nil { return nil, err } - return ParseGetCommentResponse(rsp) + return ParseGetMetadataResponse(rsp) } -// UpdateCommentWithBodyWithResponse request with arbitrary body returning *UpdateCommentResponse -func (c *ClientWithResponses) UpdateCommentWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) { - rsp, err := c.UpdateCommentWithBody(ctx, id, contentType, body, reqEditors...) +// GetOpenApiSpecWithResponse request returning *GetOpenApiSpecResponse +func (c *ClientWithResponses) GetOpenApiSpecWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenApiSpecResponse, error) { + rsp, err := c.GetOpenApiSpec(ctx, reqEditors...) if err != nil { return nil, err } - return ParseUpdateCommentResponse(rsp) + return ParseGetOpenApiSpecResponse(rsp) } -func (c *ClientWithResponses) UpdateCommentWithResponse(ctx context.Context, id string, body UpdateCommentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateCommentResponse, error) { - rsp, err := c.UpdateComment(ctx, id, body, reqEditors...) +// ListSchedulesWithResponse request returning *ListSchedulesResponse +func (c *ClientWithResponses) ListSchedulesWithResponse(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error) { + rsp, err := c.ListSchedules(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseUpdateCommentResponse(rsp) + return ParseListSchedulesResponse(rsp) } -// RemoveCommentReactionWithBodyWithResponse request with arbitrary body returning *RemoveCommentReactionResponse -func (c *ClientWithResponses) RemoveCommentReactionWithBodyWithResponse(ctx context.Context, id string, params *RemoveCommentReactionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveCommentReactionResponse, error) { - rsp, err := c.RemoveCommentReactionWithBody(ctx, id, params, contentType, body, reqEditors...) +// ListSectionsWithResponse request returning *ListSectionsResponse +func (c *ClientWithResponses) ListSectionsWithResponse(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*ListSectionsResponse, error) { + rsp, err := c.ListSections(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseRemoveCommentReactionResponse(rsp) + return ParseListSectionsResponse(rsp) } -func (c *ClientWithResponses) RemoveCommentReactionWithResponse(ctx context.Context, id string, params *RemoveCommentReactionParams, body RemoveCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveCommentReactionResponse, error) { - rsp, err := c.RemoveCommentReaction(ctx, id, params, body, reqEditors...) +// GetSectionsCalendarWithResponse request returning *GetSectionsCalendarResponse +func (c *ClientWithResponses) GetSectionsCalendarWithResponse(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*GetSectionsCalendarResponse, error) { + rsp, err := c.GetSectionsCalendar(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseRemoveCommentReactionResponse(rsp) + return ParseGetSectionsCalendarResponse(rsp) } -// AddCommentReactionWithBodyWithResponse request with arbitrary body returning *AddCommentReactionResponse -func (c *ClientWithResponses) AddCommentReactionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) { - rsp, err := c.AddCommentReactionWithBody(ctx, id, contentType, body, reqEditors...) +// MatchSectionCodesWithBodyWithResponse request with arbitrary body returning *MatchSectionCodesResponse +func (c *ClientWithResponses) MatchSectionCodesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MatchSectionCodesResponse, error) { + rsp, err := c.MatchSectionCodesWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseAddCommentReactionResponse(rsp) + return ParseMatchSectionCodesResponse(rsp) } -func (c *ClientWithResponses) AddCommentReactionWithResponse(ctx context.Context, id string, body AddCommentReactionJSONRequestBody, reqEditors ...RequestEditorFn) (*AddCommentReactionResponse, error) { - rsp, err := c.AddCommentReaction(ctx, id, body, reqEditors...) +func (c *ClientWithResponses) MatchSectionCodesWithResponse(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*MatchSectionCodesResponse, error) { + rsp, err := c.MatchSectionCodes(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseAddCommentReactionResponse(rsp) + return ParseMatchSectionCodesResponse(rsp) } -// ListCoursesWithResponse request returning *ListCoursesResponse -func (c *ClientWithResponses) ListCoursesWithResponse(ctx context.Context, params *ListCoursesParams, reqEditors ...RequestEditorFn) (*ListCoursesResponse, error) { - rsp, err := c.ListCourses(ctx, params, reqEditors...) +// GetSectionWithResponse request returning *GetSectionResponse +func (c *ClientWithResponses) GetSectionWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionResponse, error) { + rsp, err := c.GetSection(ctx, jwId, reqEditors...) if err != nil { return nil, err } - return ParseListCoursesResponse(rsp) + return ParseGetSectionResponse(rsp) } -// GetCourseWithResponse request returning *GetCourseResponse -func (c *ClientWithResponses) GetCourseWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetCourseResponse, error) { - rsp, err := c.GetCourse(ctx, jwId, reqEditors...) +// GetSectionCalendarWithResponse request returning *GetSectionCalendarResponse +func (c *ClientWithResponses) GetSectionCalendarWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionCalendarResponse, error) { + rsp, err := c.GetSectionCalendar(ctx, jwId, reqEditors...) if err != nil { return nil, err } - return ParseGetCourseResponse(rsp) + return ParseGetSectionCalendarResponse(rsp) } -// PinDashboardLinkWithBodyWithResponse request with arbitrary body returning *PinDashboardLinkResponse -func (c *ClientWithResponses) PinDashboardLinkWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) { - rsp, err := c.PinDashboardLinkWithBody(ctx, contentType, body, reqEditors...) +// GetSectionScheduleGroupsWithResponse request returning *GetSectionScheduleGroupsResponse +func (c *ClientWithResponses) GetSectionScheduleGroupsWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionScheduleGroupsResponse, error) { + rsp, err := c.GetSectionScheduleGroups(ctx, jwId, reqEditors...) if err != nil { return nil, err } - return ParsePinDashboardLinkResponse(rsp) + return ParseGetSectionScheduleGroupsResponse(rsp) } -func (c *ClientWithResponses) PinDashboardLinkWithFormdataBodyWithResponse(ctx context.Context, body PinDashboardLinkFormdataRequestBody, reqEditors ...RequestEditorFn) (*PinDashboardLinkResponse, error) { - rsp, err := c.PinDashboardLinkWithFormdataBody(ctx, body, reqEditors...) +// GetSectionSchedulesWithResponse request returning *GetSectionSchedulesResponse +func (c *ClientWithResponses) GetSectionSchedulesWithResponse(ctx context.Context, jwId int64, params *GetSectionSchedulesParams, reqEditors ...RequestEditorFn) (*GetSectionSchedulesResponse, error) { + rsp, err := c.GetSectionSchedules(ctx, jwId, params, reqEditors...) if err != nil { return nil, err } - return ParsePinDashboardLinkResponse(rsp) + return ParseGetSectionSchedulesResponse(rsp) } -// VisitDashboardLinkWithResponse request returning *VisitDashboardLinkResponse -func (c *ClientWithResponses) VisitDashboardLinkWithResponse(ctx context.Context, params *VisitDashboardLinkParams, reqEditors ...RequestEditorFn) (*VisitDashboardLinkResponse, error) { - rsp, err := c.VisitDashboardLink(ctx, params, reqEditors...) +// ListSemestersWithResponse request returning *ListSemestersResponse +func (c *ClientWithResponses) ListSemestersWithResponse(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*ListSemestersResponse, error) { + rsp, err := c.ListSemesters(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseVisitDashboardLinkResponse(rsp) + return ParseListSemestersResponse(rsp) } -// RecordDashboardLinkVisitWithBodyWithResponse request with arbitrary body returning *RecordDashboardLinkVisitResponse -func (c *ClientWithResponses) RecordDashboardLinkVisitWithBodyWithResponse(ctx context.Context, params *RecordDashboardLinkVisitParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) { - rsp, err := c.RecordDashboardLinkVisitWithBody(ctx, params, contentType, body, reqEditors...) +// GetCurrentSemesterWithResponse request returning *GetCurrentSemesterResponse +func (c *ClientWithResponses) GetCurrentSemesterWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentSemesterResponse, error) { + rsp, err := c.GetCurrentSemester(ctx, reqEditors...) if err != nil { return nil, err } - return ParseRecordDashboardLinkVisitResponse(rsp) + return ParseGetCurrentSemesterResponse(rsp) } -func (c *ClientWithResponses) RecordDashboardLinkVisitWithFormdataBodyWithResponse(ctx context.Context, params *RecordDashboardLinkVisitParams, body RecordDashboardLinkVisitFormdataRequestBody, reqEditors ...RequestEditorFn) (*RecordDashboardLinkVisitResponse, error) { - rsp, err := c.RecordDashboardLinkVisitWithFormdataBody(ctx, params, body, reqEditors...) +// ListTeachersWithResponse request returning *ListTeachersResponse +func (c *ClientWithResponses) ListTeachersWithResponse(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*ListTeachersResponse, error) { + rsp, err := c.ListTeachers(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseRecordDashboardLinkVisitResponse(rsp) + return ParseListTeachersResponse(rsp) } -// GetDescriptionWithResponse request returning *GetDescriptionResponse -func (c *ClientWithResponses) GetDescriptionWithResponse(ctx context.Context, params *GetDescriptionParams, reqEditors ...RequestEditorFn) (*GetDescriptionResponse, error) { - rsp, err := c.GetDescription(ctx, params, reqEditors...) +// GetTeacherWithResponse request returning *GetTeacherResponse +func (c *ClientWithResponses) GetTeacherWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetTeacherResponse, error) { + rsp, err := c.GetTeacher(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseGetDescriptionResponse(rsp) + return ParseGetTeacherResponse(rsp) } -// UpsertDescriptionWithBodyWithResponse request with arbitrary body returning *UpsertDescriptionResponse -func (c *ClientWithResponses) UpsertDescriptionWithBodyWithResponse(ctx context.Context, params *UpsertDescriptionParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) { - rsp, err := c.UpsertDescriptionWithBody(ctx, params, contentType, body, reqEditors...) +// ListTodosWithResponse request returning *ListTodosResponse +func (c *ClientWithResponses) ListTodosWithResponse(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*ListTodosResponse, error) { + rsp, err := c.ListTodos(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseUpsertDescriptionResponse(rsp) + return ParseListTodosResponse(rsp) } -func (c *ClientWithResponses) UpsertDescriptionWithResponse(ctx context.Context, params *UpsertDescriptionParams, body UpsertDescriptionJSONRequestBody, reqEditors ...RequestEditorFn) (*UpsertDescriptionResponse, error) { - rsp, err := c.UpsertDescription(ctx, params, body, reqEditors...) +// CreateTodoWithBodyWithResponse request with arbitrary body returning *CreateTodoResponse +func (c *ClientWithResponses) CreateTodoWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) { + rsp, err := c.CreateTodoWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpsertDescriptionResponse(rsp) + return ParseCreateTodoResponse(rsp) } -// ListHomeworksWithResponse request returning *ListHomeworksResponse -func (c *ClientWithResponses) ListHomeworksWithResponse(ctx context.Context, params *ListHomeworksParams, reqEditors ...RequestEditorFn) (*ListHomeworksResponse, error) { - rsp, err := c.ListHomeworks(ctx, params, reqEditors...) +func (c *ClientWithResponses) CreateTodoWithResponse(ctx context.Context, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) { + rsp, err := c.CreateTodo(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseListHomeworksResponse(rsp) + return ParseCreateTodoResponse(rsp) } -// CreateHomeworkWithBodyWithResponse request with arbitrary body returning *CreateHomeworkResponse -func (c *ClientWithResponses) CreateHomeworkWithBodyWithResponse(ctx context.Context, params *CreateHomeworkParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) { - rsp, err := c.CreateHomeworkWithBody(ctx, params, contentType, body, reqEditors...) +// DeleteApiTodosBatchWithBodyWithResponse request with arbitrary body returning *DeleteApiTodosBatchResponse +func (c *ClientWithResponses) DeleteApiTodosBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteApiTodosBatchResponse, error) { + rsp, err := c.DeleteApiTodosBatchWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateHomeworkResponse(rsp) + return ParseDeleteApiTodosBatchResponse(rsp) } -func (c *ClientWithResponses) CreateHomeworkWithResponse(ctx context.Context, params *CreateHomeworkParams, body CreateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateHomeworkResponse, error) { - rsp, err := c.CreateHomework(ctx, params, body, reqEditors...) +func (c *ClientWithResponses) DeleteApiTodosBatchWithResponse(ctx context.Context, body DeleteApiTodosBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteApiTodosBatchResponse, error) { + rsp, err := c.DeleteApiTodosBatch(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateHomeworkResponse(rsp) + return ParseDeleteApiTodosBatchResponse(rsp) } -// DeleteHomeworkWithBodyWithResponse request with arbitrary body returning *DeleteHomeworkResponse -func (c *ClientWithResponses) DeleteHomeworkWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) { - rsp, err := c.DeleteHomeworkWithBody(ctx, id, contentType, body, reqEditors...) +// PatchApiTodosBatchWithBodyWithResponse request with arbitrary body returning *PatchApiTodosBatchResponse +func (c *ClientWithResponses) PatchApiTodosBatchWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchApiTodosBatchResponse, error) { + rsp, err := c.PatchApiTodosBatchWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteHomeworkResponse(rsp) + return ParsePatchApiTodosBatchResponse(rsp) } -func (c *ClientWithResponses) DeleteHomeworkWithResponse(ctx context.Context, id string, body DeleteHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteHomeworkResponse, error) { - rsp, err := c.DeleteHomework(ctx, id, body, reqEditors...) +func (c *ClientWithResponses) PatchApiTodosBatchWithResponse(ctx context.Context, body PatchApiTodosBatchJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchApiTodosBatchResponse, error) { + rsp, err := c.PatchApiTodosBatch(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseDeleteHomeworkResponse(rsp) + return ParsePatchApiTodosBatchResponse(rsp) } -// UpdateHomeworkWithBodyWithResponse request with arbitrary body returning *UpdateHomeworkResponse -func (c *ClientWithResponses) UpdateHomeworkWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) { - rsp, err := c.UpdateHomeworkWithBody(ctx, id, contentType, body, reqEditors...) +// DeleteTodoWithResponse request returning *DeleteTodoResponse +func (c *ClientWithResponses) DeleteTodoWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) { + rsp, err := c.DeleteTodo(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseUpdateHomeworkResponse(rsp) + return ParseDeleteTodoResponse(rsp) } -func (c *ClientWithResponses) UpdateHomeworkWithResponse(ctx context.Context, id string, body UpdateHomeworkJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateHomeworkResponse, error) { - rsp, err := c.UpdateHomework(ctx, id, body, reqEditors...) +// UpdateTodoWithBodyWithResponse request with arbitrary body returning *UpdateTodoResponse +func (c *ClientWithResponses) UpdateTodoWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) { + rsp, err := c.UpdateTodoWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateHomeworkResponse(rsp) + return ParseUpdateTodoResponse(rsp) } -// SetHomeworkCompletionWithBodyWithResponse request with arbitrary body returning *SetHomeworkCompletionResponse -func (c *ClientWithResponses) SetHomeworkCompletionWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) { - rsp, err := c.SetHomeworkCompletionWithBody(ctx, id, contentType, body, reqEditors...) +func (c *ClientWithResponses) UpdateTodoWithResponse(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) { + rsp, err := c.UpdateTodo(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseSetHomeworkCompletionResponse(rsp) + return ParseUpdateTodoResponse(rsp) } -func (c *ClientWithResponses) SetHomeworkCompletionWithResponse(ctx context.Context, id string, body SetHomeworkCompletionJSONRequestBody, reqEditors ...RequestEditorFn) (*SetHomeworkCompletionResponse, error) { - rsp, err := c.SetHomeworkCompletion(ctx, id, body, reqEditors...) +// ListUploadsWithResponse request returning *ListUploadsResponse +func (c *ClientWithResponses) ListUploadsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUploadsResponse, error) { + rsp, err := c.ListUploads(ctx, reqEditors...) if err != nil { return nil, err } - return ParseSetHomeworkCompletionResponse(rsp) + return ParseListUploadsResponse(rsp) } -// SetLocaleWithBodyWithResponse request with arbitrary body returning *SetLocaleResponse -func (c *ClientWithResponses) SetLocaleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) { - rsp, err := c.SetLocaleWithBody(ctx, contentType, body, reqEditors...) +// CreateUploadWithBodyWithResponse request with arbitrary body returning *CreateUploadResponse +func (c *ClientWithResponses) CreateUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) { + rsp, err := c.CreateUploadWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseSetLocaleResponse(rsp) + return ParseCreateUploadResponse(rsp) } -func (c *ClientWithResponses) SetLocaleWithResponse(ctx context.Context, body SetLocaleJSONRequestBody, reqEditors ...RequestEditorFn) (*SetLocaleResponse, error) { - rsp, err := c.SetLocale(ctx, body, reqEditors...) +func (c *ClientWithResponses) CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) { + rsp, err := c.CreateUpload(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseSetLocaleResponse(rsp) + return ParseCreateUploadResponse(rsp) } -// GetMeWithResponse request returning *GetMeResponse -func (c *ClientWithResponses) GetMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMeResponse, error) { - rsp, err := c.GetMe(ctx, reqEditors...) +// CompleteUploadWithBodyWithResponse request with arbitrary body returning *CompleteUploadResponse +func (c *ClientWithResponses) CompleteUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) { + rsp, err := c.CompleteUploadWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetMeResponse(rsp) + return ParseCompleteUploadResponse(rsp) } -// GetSubscribedHomeworksWithResponse request returning *GetSubscribedHomeworksResponse -func (c *ClientWithResponses) GetSubscribedHomeworksWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetSubscribedHomeworksResponse, error) { - rsp, err := c.GetSubscribedHomeworks(ctx, reqEditors...) +func (c *ClientWithResponses) CompleteUploadWithResponse(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) { + rsp, err := c.CompleteUpload(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseGetSubscribedHomeworksResponse(rsp) + return ParseCompleteUploadResponse(rsp) } -// GetMetadataWithResponse request returning *GetMetadataResponse -func (c *ClientWithResponses) GetMetadataWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetMetadataResponse, error) { - rsp, err := c.GetMetadata(ctx, reqEditors...) +// PutApiUploadsObjectWithBodyWithResponse request with arbitrary body returning *PutApiUploadsObjectResponse +func (c *ClientWithResponses) PutApiUploadsObjectWithBodyWithResponse(ctx context.Context, params *PutApiUploadsObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutApiUploadsObjectResponse, error) { + rsp, err := c.PutApiUploadsObjectWithBody(ctx, params, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseGetMetadataResponse(rsp) + return ParsePutApiUploadsObjectResponse(rsp) } -// GetOpenApiSpecWithResponse request returning *GetOpenApiSpecResponse -func (c *ClientWithResponses) GetOpenApiSpecWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOpenApiSpecResponse, error) { - rsp, err := c.GetOpenApiSpec(ctx, reqEditors...) +// DeleteUploadWithResponse request returning *DeleteUploadResponse +func (c *ClientWithResponses) DeleteUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteUploadResponse, error) { + rsp, err := c.DeleteUpload(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseGetOpenApiSpecResponse(rsp) + return ParseDeleteUploadResponse(rsp) } -// ListSchedulesWithResponse request returning *ListSchedulesResponse -func (c *ClientWithResponses) ListSchedulesWithResponse(ctx context.Context, params *ListSchedulesParams, reqEditors ...RequestEditorFn) (*ListSchedulesResponse, error) { - rsp, err := c.ListSchedules(ctx, params, reqEditors...) +// UpdateUploadWithBodyWithResponse request with arbitrary body returning *UpdateUploadResponse +func (c *ClientWithResponses) UpdateUploadWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) { + rsp, err := c.UpdateUploadWithBody(ctx, id, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseListSchedulesResponse(rsp) + return ParseUpdateUploadResponse(rsp) } -// ListSectionsWithResponse request returning *ListSectionsResponse -func (c *ClientWithResponses) ListSectionsWithResponse(ctx context.Context, params *ListSectionsParams, reqEditors ...RequestEditorFn) (*ListSectionsResponse, error) { - rsp, err := c.ListSections(ctx, params, reqEditors...) +func (c *ClientWithResponses) UpdateUploadWithResponse(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) { + rsp, err := c.UpdateUpload(ctx, id, body, reqEditors...) if err != nil { return nil, err } - return ParseListSectionsResponse(rsp) + return ParseUpdateUploadResponse(rsp) } -// GetSectionsCalendarWithResponse request returning *GetSectionsCalendarResponse -func (c *ClientWithResponses) GetSectionsCalendarWithResponse(ctx context.Context, params *GetSectionsCalendarParams, reqEditors ...RequestEditorFn) (*GetSectionsCalendarResponse, error) { - rsp, err := c.GetSectionsCalendar(ctx, params, reqEditors...) +// DownloadUploadWithResponse request returning *DownloadUploadResponse +func (c *ClientWithResponses) DownloadUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DownloadUploadResponse, error) { + rsp, err := c.DownloadUpload(ctx, id, reqEditors...) if err != nil { return nil, err } - return ParseGetSectionsCalendarResponse(rsp) + return ParseDownloadUploadResponse(rsp) } -// MatchSectionCodesWithBodyWithResponse request with arbitrary body returning *MatchSectionCodesResponse -func (c *ClientWithResponses) MatchSectionCodesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*MatchSectionCodesResponse, error) { - rsp, err := c.MatchSectionCodesWithBody(ctx, contentType, body, reqEditors...) +// GetUserCalendarWithResponse request returning *GetUserCalendarResponse +func (c *ClientWithResponses) GetUserCalendarWithResponse(ctx context.Context, userId string, params *GetUserCalendarParams, reqEditors ...RequestEditorFn) (*GetUserCalendarResponse, error) { + rsp, err := c.GetUserCalendar(ctx, userId, params, reqEditors...) if err != nil { return nil, err } - return ParseMatchSectionCodesResponse(rsp) + return ParseGetUserCalendarResponse(rsp) } -func (c *ClientWithResponses) MatchSectionCodesWithResponse(ctx context.Context, body MatchSectionCodesJSONRequestBody, reqEditors ...RequestEditorFn) (*MatchSectionCodesResponse, error) { - rsp, err := c.MatchSectionCodes(ctx, body, reqEditors...) +// ParseListAdminCommentsResponse parses an HTTP response from a ListAdminCommentsWithResponse call +func ParseListAdminCommentsResponse(rsp *http.Response) (*ListAdminCommentsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseMatchSectionCodesResponse(rsp) + + response := &ListAdminCommentsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminCommentsResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil } -// GetSectionWithResponse request returning *GetSectionResponse -func (c *ClientWithResponses) GetSectionWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionResponse, error) { - rsp, err := c.GetSection(ctx, jwId, reqEditors...) +// ParseModerateAdminCommentResponse parses an HTTP response from a ModerateAdminCommentWithResponse call +func ParseModerateAdminCommentResponse(rsp *http.Response) (*ModerateAdminCommentResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetSectionResponse(rsp) + + response := &ModerateAdminCommentResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminModeratedCommentResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil } -// GetSectionCalendarWithResponse request returning *GetSectionCalendarResponse -func (c *ClientWithResponses) GetSectionCalendarWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionCalendarResponse, error) { - rsp, err := c.GetSectionCalendar(ctx, jwId, reqEditors...) +// ParseListAdminDescriptionsResponse parses an HTTP response from a ListAdminDescriptionsWithResponse call +func ParseListAdminDescriptionsResponse(rsp *http.Response) (*ListAdminDescriptionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetSectionCalendarResponse(rsp) + + response := &ListAdminDescriptionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminDescriptionsResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil } -// GetSectionScheduleGroupsWithResponse request returning *GetSectionScheduleGroupsResponse -func (c *ClientWithResponses) GetSectionScheduleGroupsWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionScheduleGroupsResponse, error) { - rsp, err := c.GetSectionScheduleGroups(ctx, jwId, reqEditors...) +// ParseUpdateAdminDescriptionResponse parses an HTTP response from a UpdateAdminDescriptionWithResponse call +func ParseUpdateAdminDescriptionResponse(rsp *http.Response) (*UpdateAdminDescriptionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetSectionScheduleGroupsResponse(rsp) -} -// GetSectionSchedulesWithResponse request returning *GetSectionSchedulesResponse -func (c *ClientWithResponses) GetSectionSchedulesWithResponse(ctx context.Context, jwId int64, reqEditors ...RequestEditorFn) (*GetSectionSchedulesResponse, error) { - rsp, err := c.GetSectionSchedules(ctx, jwId, reqEditors...) - if err != nil { - return nil, err + response := &UpdateAdminDescriptionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminModeratedDescriptionResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } - return ParseGetSectionSchedulesResponse(rsp) + + return response, nil } -// ListSemestersWithResponse request returning *ListSemestersResponse -func (c *ClientWithResponses) ListSemestersWithResponse(ctx context.Context, params *ListSemestersParams, reqEditors ...RequestEditorFn) (*ListSemestersResponse, error) { - rsp, err := c.ListSemesters(ctx, params, reqEditors...) +// ParseListAdminHomeworksResponse parses an HTTP response from a ListAdminHomeworksWithResponse call +func ParseListAdminHomeworksResponse(rsp *http.Response) (*ListAdminHomeworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseListSemestersResponse(rsp) -} -// GetCurrentSemesterWithResponse request returning *GetCurrentSemesterResponse -func (c *ClientWithResponses) GetCurrentSemesterWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetCurrentSemesterResponse, error) { - rsp, err := c.GetCurrentSemester(ctx, reqEditors...) - if err != nil { - return nil, err + response := &ListAdminHomeworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseGetCurrentSemesterResponse(rsp) -} -// ListTeachersWithResponse request returning *ListTeachersResponse -func (c *ClientWithResponses) ListTeachersWithResponse(ctx context.Context, params *ListTeachersParams, reqEditors ...RequestEditorFn) (*ListTeachersResponse, error) { - rsp, err := c.ListTeachers(ctx, params, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminHomeworksResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + } - return ParseListTeachersResponse(rsp) + + return response, nil } -// GetTeacherWithResponse request returning *GetTeacherResponse -func (c *ClientWithResponses) GetTeacherWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetTeacherResponse, error) { - rsp, err := c.GetTeacher(ctx, id, reqEditors...) +// ParseDeleteAdminHomeworkResponse parses an HTTP response from a DeleteAdminHomeworkWithResponse call +func ParseDeleteAdminHomeworkResponse(rsp *http.Response) (*DeleteAdminHomeworkResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseGetTeacherResponse(rsp) -} -// ListTodosWithResponse request returning *ListTodosResponse -func (c *ClientWithResponses) ListTodosWithResponse(ctx context.Context, params *ListTodosParams, reqEditors ...RequestEditorFn) (*ListTodosResponse, error) { - rsp, err := c.ListTodos(ctx, params, reqEditors...) - if err != nil { - return nil, err + response := &DeleteAdminHomeworkResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseListTodosResponse(rsp) -} -// CreateTodoWithBodyWithResponse request with arbitrary body returning *CreateTodoResponse -func (c *ClientWithResponses) CreateTodoWithBodyWithResponse(ctx context.Context, params *CreateTodoParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) { - rsp, err := c.CreateTodoWithBody(ctx, params, contentType, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SuccessResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } - return ParseCreateTodoResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) CreateTodoWithResponse(ctx context.Context, params *CreateTodoParams, body CreateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateTodoResponse, error) { - rsp, err := c.CreateTodo(ctx, params, body, reqEditors...) +// ParseListAdminSuspensionsResponse parses an HTTP response from a ListAdminSuspensionsWithResponse call +func ParseListAdminSuspensionsResponse(rsp *http.Response) (*ListAdminSuspensionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCreateTodoResponse(rsp) -} -// DeleteTodoWithBodyWithResponse request with arbitrary body returning *DeleteTodoResponse -func (c *ClientWithResponses) DeleteTodoWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) { - rsp, err := c.DeleteTodoWithBody(ctx, id, contentType, body, reqEditors...) - if err != nil { - return nil, err + response := &ListAdminSuspensionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseDeleteTodoResponse(rsp) -} -func (c *ClientWithResponses) DeleteTodoWithResponse(ctx context.Context, id string, body DeleteTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTodoResponse, error) { - rsp, err := c.DeleteTodo(ctx, id, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminSuspensionsResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + } - return ParseDeleteTodoResponse(rsp) + + return response, nil } -// UpdateTodoWithBodyWithResponse request with arbitrary body returning *UpdateTodoResponse -func (c *ClientWithResponses) UpdateTodoWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) { - rsp, err := c.UpdateTodoWithBody(ctx, id, contentType, body, reqEditors...) +// ParseCreateAdminSuspensionResponse parses an HTTP response from a CreateAdminSuspensionWithResponse call +func ParseCreateAdminSuspensionResponse(rsp *http.Response) (*CreateAdminSuspensionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseUpdateTodoResponse(rsp) -} -func (c *ClientWithResponses) UpdateTodoWithResponse(ctx context.Context, id string, body UpdateTodoJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTodoResponse, error) { - rsp, err := c.UpdateTodo(ctx, id, body, reqEditors...) - if err != nil { - return nil, err + response := &CreateAdminSuspensionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseUpdateTodoResponse(rsp) -} -// ListUploadsWithResponse request returning *ListUploadsResponse -func (c *ClientWithResponses) ListUploadsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListUploadsResponse, error) { - rsp, err := c.ListUploads(ctx, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminSuspensionResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } - return ParseListUploadsResponse(rsp) + + return response, nil } -// CreateUploadWithBodyWithResponse request with arbitrary body returning *CreateUploadResponse -func (c *ClientWithResponses) CreateUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) { - rsp, err := c.CreateUploadWithBody(ctx, contentType, body, reqEditors...) +// ParseUpdateAdminSuspensionResponse parses an HTTP response from a UpdateAdminSuspensionWithResponse call +func ParseUpdateAdminSuspensionResponse(rsp *http.Response) (*UpdateAdminSuspensionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseCreateUploadResponse(rsp) -} -func (c *ClientWithResponses) CreateUploadWithResponse(ctx context.Context, body CreateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateUploadResponse, error) { - rsp, err := c.CreateUpload(ctx, body, reqEditors...) - if err != nil { - return nil, err + response := &UpdateAdminSuspensionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseCreateUploadResponse(rsp) -} -// CompleteUploadWithBodyWithResponse request with arbitrary body returning *CompleteUploadResponse -func (c *ClientWithResponses) CompleteUploadWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) { - rsp, err := c.CompleteUploadWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminSuspensionResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } - return ParseCompleteUploadResponse(rsp) -} -func (c *ClientWithResponses) CompleteUploadWithResponse(ctx context.Context, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*CompleteUploadResponse, error) { - rsp, err := c.CompleteUpload(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseCompleteUploadResponse(rsp) + return response, nil } -// DeleteUploadWithBodyWithResponse request with arbitrary body returning *DeleteUploadResponse -func (c *ClientWithResponses) DeleteUploadWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteUploadResponse, error) { - rsp, err := c.DeleteUploadWithBody(ctx, id, contentType, body, reqEditors...) +// ParseListAdminUsersResponse parses an HTTP response from a ListAdminUsersWithResponse call +func ParseListAdminUsersResponse(rsp *http.Response) (*ListAdminUsersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseDeleteUploadResponse(rsp) -} -func (c *ClientWithResponses) DeleteUploadWithResponse(ctx context.Context, id string, body DeleteUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteUploadResponse, error) { - rsp, err := c.DeleteUpload(ctx, id, body, reqEditors...) - if err != nil { - return nil, err + response := &ListAdminUsersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseDeleteUploadResponse(rsp) -} -// UpdateUploadWithBodyWithResponse request with arbitrary body returning *UpdateUploadResponse -func (c *ClientWithResponses) UpdateUploadWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) { - rsp, err := c.UpdateUploadWithBody(ctx, id, contentType, body, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminUsersResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + } - return ParseUpdateUploadResponse(rsp) + + return response, nil } -func (c *ClientWithResponses) UpdateUploadWithResponse(ctx context.Context, id string, body UpdateUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateUploadResponse, error) { - rsp, err := c.UpdateUpload(ctx, id, body, reqEditors...) +// ParseUpdateAdminUserResponse parses an HTTP response from a UpdateAdminUserWithResponse call +func ParseUpdateAdminUserResponse(rsp *http.Response) (*UpdateAdminUserResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - return ParseUpdateUploadResponse(rsp) -} -// DownloadUploadWithResponse request returning *DownloadUploadResponse -func (c *ClientWithResponses) DownloadUploadWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DownloadUploadResponse, error) { - rsp, err := c.DownloadUpload(ctx, id, reqEditors...) - if err != nil { - return nil, err + response := &UpdateAdminUserResponse{ + Body: bodyBytes, + HTTPResponse: rsp, } - return ParseDownloadUploadResponse(rsp) -} -// GetUserCalendarWithResponse request returning *GetUserCalendarResponse -func (c *ClientWithResponses) GetUserCalendarWithResponse(ctx context.Context, userId string, reqEditors ...RequestEditorFn) (*GetUserCalendarResponse, error) { - rsp, err := c.GetUserCalendar(ctx, userId, reqEditors...) - if err != nil { - return nil, err + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest AdminUserResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } - return ParseGetUserCalendarResponse(rsp) + + return response, nil } -// ParseListAdminCommentsResponse parses an HTTP response from a ListAdminCommentsWithResponse call -func ParseListAdminCommentsResponse(rsp *http.Response) (*ListAdminCommentsResponse, error) { +// ParseQueryBusResponse parses an HTTP response from a QueryBusWithResponse call +func ParseQueryBusResponse(rsp *http.Response) (*QueryBusResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAdminCommentsResponse{ + response := &QueryBusResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminCommentsResponseSchema + var dest BusQueryResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11266,22 +19874,22 @@ func ParseListAdminCommentsResponse(rsp *http.Response) (*ListAdminCommentsRespo return response, nil } -// ParseModerateAdminCommentResponse parses an HTTP response from a ModerateAdminCommentWithResponse call -func ParseModerateAdminCommentResponse(rsp *http.Response) (*ModerateAdminCommentResponse, error) { +// ParseGetApiBusNextResponse parses an HTTP response from a GetApiBusNextWithResponse call +func ParseGetApiBusNextResponse(rsp *http.Response) (*GetApiBusNextResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ModerateAdminCommentResponse{ + response := &GetApiBusNextResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminModeratedCommentResponseSchema + var dest BusNextDeparturesResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11294,60 +19902,67 @@ func ParseModerateAdminCommentResponse(rsp *http.Response) (*ModerateAdminCommen } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseListAdminDescriptionsResponse parses an HTTP response from a ListAdminDescriptionsWithResponse call -func ParseListAdminDescriptionsResponse(rsp *http.Response) (*ListAdminDescriptionsResponse, error) { +// ParseGetBusPreferencesResponse parses an HTTP response from a GetBusPreferencesWithResponse call +func ParseGetBusPreferencesResponse(rsp *http.Response) (*GetBusPreferencesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAdminDescriptionsResponse{ + response := &GetBusPreferencesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminDescriptionsResponseSchema + var dest BusPreferenceResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest } return response, nil } -// ParseListAdminHomeworksResponse parses an HTTP response from a ListAdminHomeworksWithResponse call -func ParseListAdminHomeworksResponse(rsp *http.Response) (*ListAdminHomeworksResponse, error) { +// ParseSetBusPreferencesResponse parses an HTTP response from a SetBusPreferencesWithResponse call +func ParseSetBusPreferencesResponse(rsp *http.Response) (*SetBusPreferencesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAdminHomeworksResponse{ + response := &SetBusPreferencesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminHomeworksResponseSchema + var dest BusPreferenceResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11360,32 +19975,46 @@ func ParseListAdminHomeworksResponse(rsp *http.Response) (*ListAdminHomeworksRes } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + } return response, nil } -// ParseDeleteAdminHomeworkResponse parses an HTTP response from a DeleteAdminHomeworkWithResponse call -func ParseDeleteAdminHomeworkResponse(rsp *http.Response) (*DeleteAdminHomeworkResponse, error) { +// ParseGetApiBusRoutesResponse parses an HTTP response from a GetApiBusRoutesWithResponse call +func ParseGetApiBusRoutesResponse(rsp *http.Response) (*GetApiBusRoutesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteAdminHomeworkResponse{ + response := &GetApiBusRoutesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + var dest BusRouteSearchResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11398,48 +20027,69 @@ func ParseDeleteAdminHomeworkResponse(rsp *http.Response) (*DeleteAdminHomeworkR return response, nil } -// ParseListAdminSuspensionsResponse parses an HTTP response from a ListAdminSuspensionsWithResponse call -func ParseListAdminSuspensionsResponse(rsp *http.Response) (*ListAdminSuspensionsResponse, error) { +// ParseDeleteApiCalendarSubscriptionsResponse parses an HTTP response from a DeleteApiCalendarSubscriptionsWithResponse call +func ParseDeleteApiCalendarSubscriptionsResponse(rsp *http.Response) (*DeleteApiCalendarSubscriptionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAdminSuspensionsResponse{ + response := &DeleteApiCalendarSubscriptionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminSuspensionsResponseSchema + var dest CalendarSubscriptionRemoveResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseCreateAdminSuspensionResponse parses an HTTP response from a CreateAdminSuspensionWithResponse call -func ParseCreateAdminSuspensionResponse(rsp *http.Response) (*CreateAdminSuspensionResponse, error) { +// ParseAppendCalendarSubscriptionSectionsResponse parses an HTTP response from a AppendCalendarSubscriptionSectionsWithResponse call +func ParseAppendCalendarSubscriptionSectionsResponse(rsp *http.Response) (*AppendCalendarSubscriptionSectionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateAdminSuspensionResponse{ + response := &AppendCalendarSubscriptionSectionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminSuspensionResponseSchema + var dest CalendarSubscriptionAppendResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11452,60 +20102,81 @@ func ParseCreateAdminSuspensionResponse(rsp *http.Response) (*CreateAdminSuspens } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseUpdateAdminSuspensionResponse parses an HTTP response from a UpdateAdminSuspensionWithResponse call -func ParseUpdateAdminSuspensionResponse(rsp *http.Response) (*UpdateAdminSuspensionResponse, error) { +// ParseSetCalendarSubscriptionResponse parses an HTTP response from a SetCalendarSubscriptionWithResponse call +func ParseSetCalendarSubscriptionResponse(rsp *http.Response) (*SetCalendarSubscriptionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAdminSuspensionResponse{ + response := &SetCalendarSubscriptionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminSuspensionResponseSchema + var dest CalendarSubscriptionCreateResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest } return response, nil } -// ParseListAdminUsersResponse parses an HTTP response from a ListAdminUsersWithResponse call -func ParseListAdminUsersResponse(rsp *http.Response) (*ListAdminUsersResponse, error) { +// ParseBatchUpdateCalendarSubscriptionResponse parses an HTTP response from a BatchUpdateCalendarSubscriptionWithResponse call +func ParseBatchUpdateCalendarSubscriptionResponse(rsp *http.Response) (*BatchUpdateCalendarSubscriptionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListAdminUsersResponse{ + response := &BatchUpdateCalendarSubscriptionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminUsersResponseSchema + var dest CalendarSubscriptionBatchResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11518,60 +20189,74 @@ func ParseListAdminUsersResponse(rsp *http.Response) (*ListAdminUsersResponse, e } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseUpdateAdminUserResponse parses an HTTP response from a UpdateAdminUserWithResponse call -func ParseUpdateAdminUserResponse(rsp *http.Response) (*UpdateAdminUserResponse, error) { +// ParseGetCurrentCalendarSubscriptionResponse parses an HTTP response from a GetCurrentCalendarSubscriptionWithResponse call +func ParseGetCurrentCalendarSubscriptionResponse(rsp *http.Response) (*GetCurrentCalendarSubscriptionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateAdminUserResponse{ + response := &GetCurrentCalendarSubscriptionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest AdminUserResponseSchema + var dest CurrentCalendarSubscriptionResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest } return response, nil } -// ParseQueryBusResponse parses an HTTP response from a QueryBusWithResponse call -func ParseQueryBusResponse(rsp *http.Response) (*QueryBusResponse, error) { +// ParsePostApiCalendarSubscriptionsImportCodesResponse parses an HTTP response from a PostApiCalendarSubscriptionsImportCodesWithResponse call +func ParsePostApiCalendarSubscriptionsImportCodesResponse(rsp *http.Response) (*PostApiCalendarSubscriptionsImportCodesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &QueryBusResponse{ + response := &PostApiCalendarSubscriptionsImportCodesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest BusQueryResponseSchema + var dest CalendarSubscriptionImportResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11584,32 +20269,53 @@ func ParseQueryBusResponse(rsp *http.Response) (*QueryBusResponse, error) { } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseGetBusPreferencesResponse parses an HTTP response from a GetBusPreferencesWithResponse call -func ParseGetBusPreferencesResponse(rsp *http.Response) (*GetBusPreferencesResponse, error) { +// ParseQueryCalendarSubscriptionSectionsResponse parses an HTTP response from a QueryCalendarSubscriptionSectionsWithResponse call +func ParseQueryCalendarSubscriptionSectionsResponse(rsp *http.Response) (*QueryCalendarSubscriptionSectionsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetBusPreferencesResponse{ + response := &QueryCalendarSubscriptionSectionsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest BusPreferenceResponseSchema + var dest CalendarSubscriptionQueryResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11617,27 +20323,34 @@ func ParseGetBusPreferencesResponse(rsp *http.Response) (*GetBusPreferencesRespo } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseSetBusPreferencesResponse parses an HTTP response from a SetBusPreferencesWithResponse call -func ParseSetBusPreferencesResponse(rsp *http.Response) (*SetBusPreferencesResponse, error) { +// ParseListCommentsResponse parses an HTTP response from a ListCommentsWithResponse call +func ParseListCommentsResponse(rsp *http.Response) (*ListCommentsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SetBusPreferencesResponse{ + response := &ListCommentsResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest BusPreferenceResponseSchema + var dest CommentsListResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11650,34 +20363,34 @@ func ParseSetBusPreferencesResponse(rsp *http.Response) (*SetBusPreferencesRespo } response.JSON400 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON401 = &dest + response.JSON404 = &dest } return response, nil } -// ParseSetCalendarSubscriptionResponse parses an HTTP response from a SetCalendarSubscriptionWithResponse call -func ParseSetCalendarSubscriptionResponse(rsp *http.Response) (*SetCalendarSubscriptionResponse, error) { +// ParseCreateCommentResponse parses an HTTP response from a CreateCommentWithResponse call +func ParseCreateCommentResponse(rsp *http.Response) (*CreateCommentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &SetCalendarSubscriptionResponse{ + response := &CreateCommentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CalendarSubscriptionCreateResponseSchema + var dest IdResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11690,32 +20403,60 @@ func ParseSetCalendarSubscriptionResponse(rsp *http.Response) (*SetCalendarSubsc } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseGetCurrentCalendarSubscriptionResponse parses an HTTP response from a GetCurrentCalendarSubscriptionWithResponse call -func ParseGetCurrentCalendarSubscriptionResponse(rsp *http.Response) (*GetCurrentCalendarSubscriptionResponse, error) { +// ParseDeleteApiCommentsBatchResponse parses an HTTP response from a DeleteApiCommentsBatchWithResponse call +func ParseDeleteApiCommentsBatchResponse(rsp *http.Response) (*DeleteApiCommentsBatchResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetCurrentCalendarSubscriptionResponse{ + response := &DeleteApiCommentsBatchResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CurrentCalendarSubscriptionResponseSchema + var dest CommentBatchDeleteResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11723,93 +20464,121 @@ func ParseGetCurrentCalendarSubscriptionResponse(rsp *http.Response) (*GetCurren } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + } return response, nil } -// ParseListCommentsResponse parses an HTTP response from a ListCommentsWithResponse call -func ParseListCommentsResponse(rsp *http.Response) (*ListCommentsResponse, error) { +// ParseDeleteCommentResponse parses an HTTP response from a DeleteCommentWithResponse call +func ParseDeleteCommentResponse(rsp *http.Response) (*DeleteCommentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListCommentsResponse{ + response := &DeleteCommentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CommentsListResponseSchema + var dest SuccessResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest } return response, nil } -// ParseCreateCommentResponse parses an HTTP response from a CreateCommentWithResponse call -func ParseCreateCommentResponse(rsp *http.Response) (*CreateCommentResponse, error) { +// ParseGetCommentResponse parses an HTTP response from a GetCommentWithResponse call +func ParseGetCommentResponse(rsp *http.Response) (*GetCommentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateCommentResponse{ + response := &GetCommentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest IdResponseSchema + var dest CommentThreadResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest } return response, nil } -// ParseDeleteCommentResponse parses an HTTP response from a DeleteCommentWithResponse call -func ParseDeleteCommentResponse(rsp *http.Response) (*DeleteCommentResponse, error) { +// ParseUpdateCommentResponse parses an HTTP response from a UpdateCommentWithResponse call +func ParseUpdateCommentResponse(rsp *http.Response) (*UpdateCommentResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteCommentResponse{ + response := &UpdateCommentResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + var dest CommentUpdateResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11822,6 +20591,20 @@ func ParseDeleteCommentResponse(rsp *http.Response) (*DeleteCommentResponse, err } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11834,55 +20617,69 @@ func ParseDeleteCommentResponse(rsp *http.Response) (*DeleteCommentResponse, err return response, nil } -// ParseGetCommentResponse parses an HTTP response from a GetCommentWithResponse call -func ParseGetCommentResponse(rsp *http.Response) (*GetCommentResponse, error) { +// ParseRemoveCommentReactionResponse parses an HTTP response from a RemoveCommentReactionWithResponse call +func ParseRemoveCommentReactionResponse(rsp *http.Response) (*RemoveCommentReactionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetCommentResponse{ + response := &RemoveCommentReactionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CommentThreadResponseSchema + var dest SuccessResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest } return response, nil } -// ParseUpdateCommentResponse parses an HTTP response from a UpdateCommentWithResponse call -func ParseUpdateCommentResponse(rsp *http.Response) (*UpdateCommentResponse, error) { +// ParseAddCommentReactionResponse parses an HTTP response from a AddCommentReactionWithResponse call +func ParseAddCommentReactionResponse(rsp *http.Response) (*AddCommentReactionResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateCommentResponse{ + response := &AddCommentReactionResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CommentUpdateResponseSchema + var dest SuccessResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11895,6 +20692,20 @@ func ParseUpdateCommentResponse(rsp *http.Response) (*UpdateCommentResponse, err } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -11907,135 +20718,168 @@ func ParseUpdateCommentResponse(rsp *http.Response) (*UpdateCommentResponse, err return response, nil } -// ParseRemoveCommentReactionResponse parses an HTTP response from a RemoveCommentReactionWithResponse call -func ParseRemoveCommentReactionResponse(rsp *http.Response) (*RemoveCommentReactionResponse, error) { +// ParseListCoursesResponse parses an HTTP response from a ListCoursesWithResponse call +func ParseListCoursesResponse(rsp *http.Response) (*ListCoursesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &RemoveCommentReactionResponse{ + response := &ListCoursesResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + var dest PaginatedCourseResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + } return response, nil } -// ParseAddCommentReactionResponse parses an HTTP response from a AddCommentReactionWithResponse call -func ParseAddCommentReactionResponse(rsp *http.Response) (*AddCommentReactionResponse, error) { +// ParseGetCourseResponse parses an HTTP response from a GetCourseWithResponse call +func ParseGetCourseResponse(rsp *http.Response) (*GetCourseResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AddCommentReactionResponse{ + response := &GetCourseResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + var dest CourseDetailSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil } -// ParseListCoursesResponse parses an HTTP response from a ListCoursesWithResponse call -func ParseListCoursesResponse(rsp *http.Response) (*ListCoursesResponse, error) { +// ParsePinDashboardLinkResponse parses an HTTP response from a PinDashboardLinkWithResponse call +func ParsePinDashboardLinkResponse(rsp *http.Response) (*PinDashboardLinkResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListCoursesResponse{ + response := &PinDashboardLinkResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest PaginatedCourseResponseSchema + var dest DashboardLinkPinResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest OpenApiErrorSchema + var dest DashboardLinkPinResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest DashboardLinkPinResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest DashboardLinkPinResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest + } return response, nil } -// ParseGetCourseResponse parses an HTTP response from a GetCourseWithResponse call -func ParseGetCourseResponse(rsp *http.Response) (*GetCourseResponse, error) { +// ParsePostApiDashboardLinksPinBatchResponse parses an HTTP response from a PostApiDashboardLinksPinBatchWithResponse call +func ParsePostApiDashboardLinksPinBatchResponse(rsp *http.Response) (*PostApiDashboardLinksPinBatchResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetCourseResponse{ + response := &PostApiDashboardLinksPinBatchResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest CourseDetailSchema + var dest DashboardLinkPinResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OpenApiErrorSchema + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest DashboardLinkPinResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON404 = &dest - - } + response.JSON400 = &dest - return response, nil -} + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest -// ParsePinDashboardLinkResponse parses an HTTP response from a PinDashboardLinkWithResponse call -func ParsePinDashboardLinkResponse(rsp *http.Response) (*PinDashboardLinkResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: + var dest DashboardLinkPinResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON500 = &dest - response := &PinDashboardLinkResponse{ - Body: bodyBytes, - HTTPResponse: rsp, } return response, nil @@ -12101,6 +20945,13 @@ func ParseGetDescriptionResponse(rsp *http.Response) (*GetDescriptionResponse, e } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil @@ -12134,6 +20985,27 @@ func ParseUpsertDescriptionResponse(rsp *http.Response) (*UpsertDescriptionRespo } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil @@ -12167,6 +21039,13 @@ func ParseListHomeworksResponse(rsp *http.Response) (*ListHomeworksResponse, err } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil @@ -12187,7 +21066,61 @@ func ParseCreateHomeworkResponse(rsp *http.Response) (*CreateHomeworkResponse, e switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest IdResponseSchema + var dest HomeworkCreateResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + } + + return response, nil +} + +// ParsePutApiHomeworksCompletionsResponse parses an HTTP response from a PutApiHomeworksCompletionsWithResponse call +func ParsePutApiHomeworksCompletionsResponse(rsp *http.Response) (*PutApiHomeworksCompletionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutApiHomeworksCompletionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest HomeworkCompletionBatchResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12200,6 +21133,13 @@ func ParseCreateHomeworkResponse(rsp *http.Response) (*CreateHomeworkResponse, e } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + } return response, nil @@ -12226,12 +21166,19 @@ func ParseDeleteHomeworkResponse(rsp *http.Response) (*DeleteHomeworkResponse, e } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema @@ -12260,7 +21207,7 @@ func ParseUpdateHomeworkResponse(rsp *http.Response) (*UpdateHomeworkResponse, e switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + var dest HomeworkUpdateResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12273,6 +21220,27 @@ func ParseUpdateHomeworkResponse(rsp *http.Response) (*UpdateHomeworkResponse, e } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil @@ -12306,6 +21274,20 @@ func ParseSetHomeworkCompletionResponse(rsp *http.Response) (*SetHomeworkComplet } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil @@ -12377,6 +21359,46 @@ func ParseGetMeResponse(rsp *http.Response) (*GetMeResponse, error) { return response, nil } +// ParseGetApiMeOverviewResponse parses an HTTP response from a GetApiMeOverviewWithResponse call +func ParseGetApiMeOverviewResponse(rsp *http.Response) (*GetApiMeOverviewResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiMeOverviewResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest CompactOverviewResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + // ParseGetSubscribedHomeworksResponse parses an HTTP response from a GetSubscribedHomeworksWithResponse call func ParseGetSubscribedHomeworksResponse(rsp *http.Response) (*GetSubscribedHomeworksResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -12410,6 +21432,46 @@ func ParseGetSubscribedHomeworksResponse(rsp *http.Response) (*GetSubscribedHome return response, nil } +// ParseGetApiMeSubscriptionsSchedulesResponse parses an HTTP response from a GetApiMeSubscriptionsSchedulesWithResponse call +func ParseGetApiMeSubscriptionsSchedulesResponse(rsp *http.Response) (*GetApiMeSubscriptionsSchedulesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetApiMeSubscriptionsSchedulesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest SubscribedSchedulesResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + // ParseGetMetadataResponse parses an HTTP response from a GetMetadataWithResponse call func ParseGetMetadataResponse(rsp *http.Response) (*GetMetadataResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -12582,6 +21644,13 @@ func ParseMatchSectionCodesResponse(rsp *http.Response) (*MatchSectionCodesRespo } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil @@ -12608,6 +21677,13 @@ func ParseGetSectionResponse(rsp *http.Response) (*GetSectionResponse, error) { } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12661,7 +21737,7 @@ func ParseGetSectionScheduleGroupsResponse(rsp *http.Response) (*GetSectionSched switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []interface{} + var dest []map[string]interface{} if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12694,12 +21770,19 @@ func ParseGetSectionSchedulesResponse(rsp *http.Response) (*GetSectionSchedulesR switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest []interface{} + var dest []map[string]interface{} if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12832,6 +21915,13 @@ func ParseGetTeacherResponse(rsp *http.Response) (*GetTeacherResponse, error) { } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12865,6 +21955,13 @@ func ParseListTodosResponse(rsp *http.Response) (*ListTodosResponse, error) { } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -12917,6 +22014,86 @@ func ParseCreateTodoResponse(rsp *http.Response) (*CreateTodoResponse, error) { return response, nil } +// ParseDeleteApiTodosBatchResponse parses an HTTP response from a DeleteApiTodosBatchWithResponse call +func ParseDeleteApiTodosBatchResponse(rsp *http.Response) (*DeleteApiTodosBatchResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteApiTodosBatchResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TodoBatchDeleteResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + +// ParsePatchApiTodosBatchResponse parses an HTTP response from a PatchApiTodosBatchWithResponse call +func ParsePatchApiTodosBatchResponse(rsp *http.Response) (*PatchApiTodosBatchResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchApiTodosBatchResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest TodoCompletionBatchResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + } + + return response, nil +} + // ParseDeleteTodoResponse parses an HTTP response from a DeleteTodoWithResponse call func ParseDeleteTodoResponse(rsp *http.Response) (*DeleteTodoResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) @@ -12938,12 +22115,19 @@ func ParseDeleteTodoResponse(rsp *http.Response) (*DeleteTodoResponse, error) { } response.JSON200 = &dest - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } - response.JSON400 = &dest + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema @@ -12972,7 +22156,7 @@ func ParseUpdateTodoResponse(rsp *http.Response) (*UpdateTodoResponse, error) { switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest SuccessResponseSchema + var dest TodoUpdateResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -12985,6 +22169,27 @@ func ParseUpdateTodoResponse(rsp *http.Response) (*UpdateTodoResponse, error) { } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + } return response, nil @@ -13011,6 +22216,13 @@ func ParseListUploadsResponse(rsp *http.Response) (*ListUploadsResponse, error) } response.JSON200 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + } return response, nil @@ -13044,6 +22256,27 @@ func ParseCreateUploadResponse(rsp *http.Response) (*CreateUploadResponse, error } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 413: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON413 = &dest + } return response, nil @@ -13077,27 +22310,41 @@ func ParseCompleteUploadResponse(rsp *http.Response) (*CompleteUploadResponse, e } response.JSON400 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + } return response, nil } -// ParseDeleteUploadResponse parses an HTTP response from a DeleteUploadWithResponse call -func ParseDeleteUploadResponse(rsp *http.Response) (*DeleteUploadResponse, error) { +// ParsePutApiUploadsObjectResponse parses an HTTP response from a PutApiUploadsObjectWithResponse call +func ParsePutApiUploadsObjectResponse(rsp *http.Response) (*PutApiUploadsObjectResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteUploadResponse{ + response := &PutApiUploadsObjectResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest UploadDeleteResponseSchema + var dest SuccessResponseSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -13117,6 +22364,60 @@ func ParseDeleteUploadResponse(rsp *http.Response) (*DeleteUploadResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 413: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON413 = &dest + + } + + return response, nil +} + +// ParseDeleteUploadResponse parses an HTTP response from a DeleteUploadWithResponse call +func ParseDeleteUploadResponse(rsp *http.Response) (*DeleteUploadResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteUploadResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest UploadDeleteResponseSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 401: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON401 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -13124,6 +22425,13 @@ func ParseDeleteUploadResponse(rsp *http.Response) (*DeleteUploadResponse, error } response.JSON404 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 502: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON502 = &dest + } return response, nil @@ -13164,6 +22472,13 @@ func ParseUpdateUploadResponse(rsp *http.Response) (*UpdateUploadResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OpenApiErrorSchema + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest OpenApiErrorSchema if err := json.Unmarshal(bodyBytes, &dest); err != nil {